Kaynağa Gözat

文件业务关联

zishan-an 1 yıl önce
ebeveyn
işleme
e185900fc0
2 değiştirilmiş dosya ile 39 ekleme ve 20 silme
  1. 2 2
      src/api/index.js
  2. 37 18
      src/views/system/businessInfoToDo.vue

+ 2 - 2
src/api/index.js

@@ -275,8 +275,8 @@ export function simpleDebounce(fn, delay = 100) {
         }, delay)
     }
 }
-export function reportFileList() {
-    return request.get('/report/reportFileList');
+export function reportFileList(businessNum) {
+    return request.get('/report/reportFileList?businessNum=' + businessNum);
 }
 export function fileDownload(fileName) {
     return request.post('/report/download?fileName=' +fileName);

+ 37 - 18
src/views/system/businessInfoToDo.vue

@@ -106,23 +106,24 @@
 
           <!--            yuan-->
 
-          <el-tab-pane label="文件" name="third">
-            <el-button size="small" class="el-icon-upload" type="primary" round style="position: absolute; right: 10%;" @click="add_file_show=true">上传</el-button>
-            <el-button size="small" class="el-icon-download" type="primary" round style="position: absolute; right: 1%;" @click="fileDown()">下载</el-button>
+          <el-tab-pane label="文件" name="third"  >
 
-            <el-divider></el-divider>
+<!--            <el-divider></el-divider>-->
 
-            <div class="top_show" >
+            <div class="top_show" style="margin-top: 20px">
               <span> 解析文件:</span>
+              <el-button size="small" class="el-icon-upload" type="primary" round style="position: absolute; right: 10%;" @click="add_file_show=true">上传</el-button>
+              <el-button size="small" class="el-icon-download" type="primary" round style="position: absolute; right: 1%;" @click="fileDown()">下载</el-button>
+
             </div>
 
-            <el-table :data="reportFileData1" style="width: 100%;"
+            <el-table :data="reportFileData1" style="width: 100%; margin-top: 20px"
                       @select-all="selectAll"
 
                       @select="handleSelectionChange" :row-key="rowKey" stripe>
               <el-table-column type="selection" :reserve-selection=true  width="55" />
 
-              <el-table-column align="center" label="文件" width="230">
+              <el-table-column align="center" label="文件id" width="230">
                 <template v-slot="{row}">
                 <span
                 >{{ row.id }}</span>
@@ -130,20 +131,21 @@
                 </template>
               </el-table-column>
 
-              <el-table-column align="center" label="文件名" width="230">
+              <el-table-column align="center" label="文件名" width="230">
                 <template v-slot="{row}">
                 <span
-                >{{ row.fileName }}</span>
+                >{{ row.fileNameXml }}</span>
                   <!-- <span>{{ row.name }}</span> -->
                 </template>
               </el-table-column>
+
               <el-table-column align="center" label="上传时间" width="330">
                 <template v-slot="{row}">
                   <span>{{ row.createTime}}</span>
                 </template>
               </el-table-column>
 
-              <el-table-column label="操作" width="350">
+              <el-table-column label="操作" width="250">
                 <template  v-slot="{row}" >
                   <el-button size="mini" type="primary" @click="fileDelete(row.id)">删除</el-button>
                 </template>
@@ -160,6 +162,13 @@
 
                       @select="handleSelectionChange2" :row-key="rowKey" stripe>
               <el-table-column type="selection" :reserve-selection=true  width="55" />
+              <el-table-column align="center" label="文件id" width="230">
+                <template v-slot="{row}">
+                <span
+                >{{ row.id }}</span>
+                  <!-- <span>{{ row.name }}</span> -->
+                </template>
+              </el-table-column>
               <el-table-column align="center" label="文件名" width="230">
                 <template v-slot="{row}">
                 <span
@@ -270,6 +279,7 @@ export default {
       selectedAll:false,
       selectedAll2:false,
 
+
       reportFileData : [],
       reportFileData1 : [],
       reportFileData2 : [],
@@ -305,22 +315,31 @@ export default {
         res=>
         {
           this.businessInfoData=res.data.business_info;
+          console.log(this.businessInfoData)
         }
     ),
-        findCustomInfoByNum(this.businessNum).then(
-            res=>
-            {
-              this.customInfoData=res.data.custom_info;
-            }
-        )
-    reportFileList().then(
+        // findCustomInfoByNum(this.businessNum).then(
+        //     res=>
+        //     {
+        //       this.customInfoData=res.data.custom_info;
+        //     }
+        // )
+    reportFileList(this.businessNum).then(
         res=>
         {
           this.reportFileData=res.data.report_file_list;
           console.log(this.reportFileData)
           for (let item of this.reportFileData){
-            if(item.fileNameXml=="1"||item.fileNameTxt=="1"){
+            if(item.fileNameXml){
               this.reportFileData1.push(item)
+              if(item.fileNameTxt) {
+                let litem = {
+                  id:item.id,
+                  fileNameXml:item.fileNameTxt,
+                  createTime:item.createTime
+                }
+                this.reportFileData1.push(litem)
+              }
             }else if(item.fileNameModel=="1"){
               this.reportFileData2.push(item)
             }