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 |   54 ++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index c7450e9..d97b387 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -308,10 +308,10 @@
                     <span :style="`font-family:${n.v.ff} !important;`">{{n.v.v}}</span>
                   </template>
                   <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='鏍峰搧缂栧彿'">
-                    <div style="display: flex;flex-wrap: nowrap;align-items: center;">
-                      <i class="el-icon-caret-left table_caret" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i>
-                      <div :style="`font-family:${n.v.ff} !important;`">{{currentSample.sampleCode}}</div>
-                      <i class="el-icon-caret-right table_caret"
+                    <div style="display: flex;flex-wrap: nowrap;align-items: center;width: 100%" :title="currentSample.sampleCode">
+                      <i class="el-icon-caret-left table_caret" style="width: 16px;" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i>
+                      <div :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`">{{currentSample.sampleCode}}</div>
+                      <i class="el-icon-caret-right table_caret" style="width: 16px;"
                       v-if="!currentFiberOpticTape&&!currentFiberOptic"@click="caretSample(1)"></i>
                     </div>
                   </template>
@@ -356,11 +356,12 @@
       :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" :loading="upLoading">闄勪欢涓婁紶</el-button></el-upload>
+        <el-button size="small" type="primary">闄勪欢涓婁紶</el-button></el-upload>
       <ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList"
         :componentData="componentData0"
         :delUrl="$api.insOrderPlan.delfile"
@@ -475,6 +476,7 @@
     },
     data() {
       return {
+        fileAdd:false,
         sampleVisible: false,
         taskVisible: false,
         submitLoading: false,
@@ -516,11 +518,15 @@
           isIndex: true,
           showSelect: false,
           select: false,
-          selectMethod: '',
           sort: false,
           init:false,
           do: [
           {
+						id: 'handleDown',
+						font: '涓嬭浇',
+						type: 'text',
+						method: 'handleDown'
+					},{
 						id: 'delete',
 						font: '鍒犻櫎',
 						type: 'text',
@@ -528,12 +534,7 @@
             disabFun: (row, index) => {
 								return this.state!=1
 							}
-					}, {
-						id: 'handleDown',
-						font: '涓嬭浇',
-						type: 'text',
-						method: 'handleDown'
-					},
+					}
           ],
           isPage: false,
           linkEvent: {},
@@ -619,6 +620,7 @@
       this.getComparisonList()
       this.getAuthorizedPerson()
       this.scrollInit()
+      this.getPower()
     },
     watch: {
       id(val) {
@@ -635,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)
@@ -651,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;
@@ -682,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)
@@ -1780,10 +1802,10 @@
           if (res.code === 200) {
             let url = '';
             if(res.data.type==1){
-              url = this.javaApi+'/img/'+res.data.url
+              url = this.javaApi+'/img/'+res.data.fileUrl
               file.downloadIamge(url,row.fileName)
             }else{
-              url = this.javaApi+'/word/'+res.data.url
+              url = this.javaApi+'/word/'+res.data.fileUrl
               const link = document.createElement('a');
               link.href = url;
               link.download = row.fileName;

--
Gitblit v1.9.3