From 952a20f1c005d80e9bf881287c40e6f4e4266a0b Mon Sep 17 00:00:00 2001
From: lxp <1928192722@qq.com>
Date: 星期三, 12 三月 2025 15:34:52 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev

---
 src/components/materialOrder/filesLookVisible.vue |   54 ++++++++++++++++++++++++------------------------------
 1 files changed, 24 insertions(+), 30 deletions(-)

diff --git a/src/components/materialOrder/filesLookVisible.vue b/src/components/materialOrder/filesLookVisible.vue
index 2ab086f..1a44265 100644
--- a/src/components/materialOrder/filesLookVisible.vue
+++ b/src/components/materialOrder/filesLookVisible.vue
@@ -3,26 +3,20 @@
     <el-dialog title="闄勪欢鏌ョ湅" :visible.sync="isShow" width="80%" @closed="$emit('closeFilesLook')">
       <div style="display: flex;justify-content: space-between;">
         <ul class="tab">
-          <li v-for="(m,i) in dataVisibleTitle" :key="i" :class="{active:i===dataVisibleIndex}" @click="handleDataVisibleTab(m,i)">{{m.label}}</li>
+          <li v-for="(m, i) in dataVisibleTitle" :key="i" :class="{ active: i === dataVisibleIndex }"
+            @click="handleDataVisibleTab(m, i)">{{ m.label }}</li>
         </ul>
-        <el-upload :action="action"
-                   :auto-upload="true"
-                   :data="{orderId: dataVisibleIndex === 0 ? filesLookInfo.enterOrderId : filesLookInfo.quarterOrderId}"
-                   :on-success="handleSuccessUp" :show-file-list="false"
-                   accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers"
-                   :before-upload="beforeUpload"
-                   style="width: 80px !important;"
-                   :on-error="onError" ref='upload'>
+        <el-upload :action="action" :auto-upload="true"
+          :data="{ orderId: dataVisibleIndex === 0 ? filesLookInfo.enterOrderId : filesLookInfo.quarterOrderId }"
+          :on-success="handleSuccessUp" :show-file-list="false"
+          accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="uploadHeader"
+          :before-upload="beforeUpload" style="width: 80px !important;" :on-error="onError" ref='upload'>
           <el-button size="small" type="primary" style="height: 38px">闄勪欢涓婁紶</el-button>
         </el-upload>
       </div>
       <div style="height: 70vh;overflow-y: auto;" v-if="filesDialogVisible">
-        <ValueTable ref="fileList"
-                    :url="$api.insOrderPlan.getFileList"
-                    :delUrl="$api.insOrderPlan.delfile"
-                    class="value-table"
-                    :key="upIndex"
-                    :componentData="componentData"/>
+        <ValueTable ref="fileList" :url="$api.insOrderPlan.getFileList" :delUrl="$api.insOrderPlan.delfile"
+          class="value-table" :key="upIndex" :componentData="componentData" />
       </div>
     </el-dialog>
   </div>
@@ -35,7 +29,7 @@
 export default {
   name: "filesLookVisible",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
-  components: {ValueTable},
+  components: { ValueTable },
   props: {
     filesDialogVisible: {
       type: Boolean,
@@ -43,7 +37,7 @@
     },
     filesLookInfo: {
       type: Object,
-      default: () => {}
+      default: () => { }
     },
   },
   data() {
@@ -64,20 +58,20 @@
       dataVisibleIndex: 0, // tab鏍忛�夋嫨鍊�
       componentData: {
         entity: {
-          insOrderId:''
+          insOrderId: ''
         },
         isIndex: true,
         showSelect: false,
         select: false,
         sort: false,
-        init:false,
+        init: false,
         do: [
           {
             id: 'parent',
             font: '涓嬭浇',
             type: 'text',
             method: 'handleDown'
-          },{
+          }, {
             id: 'delete',
             font: '鍒犻櫎',
             type: 'text',
@@ -87,8 +81,8 @@
         isPage: false,
         linkEvent: {},
         tagField: {
-          type:{
-            select:[
+          type: {
+            select: [
               {
                 value: 1,
                 label: '鍥剧墖'
@@ -114,7 +108,7 @@
   // 鏂规硶闆嗗悎
   methods: {
     // 鍒囨崲鏁版嵁鏌ョ湅tab鏍�
-    handleDataVisibleTab (m, i) {
+    handleDataVisibleTab(m, i) {
       this.dataVisibleIndex = i
       this.refreshTable()
     },
@@ -129,17 +123,17 @@
         this.$refs['fileList'].selectList(e)
       })
     },
-    handleDown(row){
+    handleDown(row) {
       this.$axios.post(this.$api.insOrderPlan.downFile, {
         id: row.id,
       }).then(res => {
         if (res.code === 200) {
           let url = '';
-          if(res.data.type==1){
-            url = this.javaApi+'/img/'+res.data.fileUrl
-            file.downloadIamge(url,row.fileName)
-          }else{
-            url = this.javaApi+'/word/'+res.data.fileUrl
+          if (res.data.type == 1) {
+            url = this.javaApi + '/img/' + res.data.fileUrl
+            file.downloadIamge(url, row.fileName)
+          } else {
+            url = this.javaApi + '/word/' + res.data.fileUrl
             const link = document.createElement('a');
             link.href = url;
             link.download = row.fileName;
@@ -150,7 +144,7 @@
 
       })
     },
-    handleSuccessUp(response, ) {
+    handleSuccessUp(response,) {
       this.upLoading = false;
       if (response.code == 200) {
         this.$message.success('涓婁紶鎴愬姛');

--
Gitblit v1.9.3