licp
2024-06-07 32a95699e59c5c65e18c08643266c9cbfa380ee4
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -356,7 +356,7 @@
      :data="{
        orderId:id
      }"
      v-show="state==1"
      v-show="state==1&&fileAdd"
      :on-success="handleSuccessUp" :show-file-list="false"
        accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers" :on-change="beforeUpload"
        :on-error="onError" ref='upload'>
@@ -475,6 +475,7 @@
    },
    data() {
      return {
        fileAdd:false,
        sampleVisible: false,
        taskVisible: false,
        submitLoading: false,
@@ -520,6 +521,11 @@
          init:false,
          do: [
          {
                  id: 'handleDown',
                  font: '下载',
                  type: 'text',
                  method: 'handleDown'
               },{
                  id: 'delete',
                  font: '删除',
                  type: 'text',
@@ -527,12 +533,7 @@
            disabFun: (row, index) => {
                        return this.state!=1
                     }
               }, {
                  id: 'handleDown',
                  font: '下载',
                  type: 'text',
                  method: 'handleDown'
               },
               }
          ],
          isPage: false,
          linkEvent: {},
@@ -618,6 +619,7 @@
      this.getComparisonList()
      this.getAuthorizedPerson()
      this.scrollInit()
      this.getPower()
    },
    watch: {
      id(val) {
@@ -681,6 +683,23 @@
      }
    },
    methods: {
      getPower(){
        let power = JSON.parse(sessionStorage.getItem('power'))
        let fileDel = false
        let fileAdd = false
        for (var i = 0; i < power.length; i++) {
               if (power[i].menuMethod == 'uploadFile') {
                  fileAdd = true
               }
               if (power[i].menuMethod == 'delfile') {
                  fileDel = true
               }
            }
        if (!fileDel) {
               this.componentData0.do.splice(1, 1)
            }
        this.fileAdd = fileAdd
      },
      async getCurrentProduct(id,type){
        this.tableLoading = true;
        let res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory)