From 5104054c6c7a28c3d97a66c1e614897a6db28ba0 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期六, 08 六月 2024 17:39:36 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/components/do/b1-inspect-order-plan/Inspection.vue | 39 +++++++++++++++++++++++++++++++-------- 1 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index f58373c..d97b387 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -356,9 +356,10 @@ :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" + style="width: 80px !important;" :on-error="onError" ref='upload'> <el-button size="small" type="primary">闄勪欢涓婁紶</el-button></el-upload> <ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList" @@ -475,6 +476,7 @@ }, data() { return { + fileAdd:false, sampleVisible: false, taskVisible: false, submitLoading: false, @@ -520,6 +522,11 @@ init:false, do: [ { + id: 'handleDown', + font: '涓嬭浇', + type: 'text', + method: 'handleDown' + },{ id: 'delete', font: '鍒犻櫎', type: 'text', @@ -527,12 +534,7 @@ disabFun: (row, index) => { return this.state!=1 } - }, { - id: 'handleDown', - font: '涓嬭浇', - type: 'text', - method: 'handleDown' - }, + } ], isPage: false, linkEvent: {}, @@ -618,6 +620,7 @@ this.getComparisonList() this.getAuthorizedPerson() this.scrollInit() + this.getPower() }, watch: { id(val) { @@ -634,6 +637,10 @@ this.insOrder.typeName = m.label } }) + this.loading = false + if(!res.data.sampleProduct||res.data.sampleProduct.length==0){ + return this.$message.error('璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�') + } this.sampleProduct = res.data.sampleProduct this.currentSample = this.HaveJson(this.sampleProduct[0]) let list = await this.getCurrentProduct(this.currentSample.id,0) @@ -650,7 +657,6 @@ }) if (this.currentSample.index == undefined) this.currentSample['index'] = 1 let bushing = this.currentSample.bushing - this.loading = false // this.handleTableData() this.getTableLists(); this.componentData.currentId = val; @@ -681,6 +687,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) -- Gitblit v1.9.3