From 9636314d58c70b90fc1adceda4522f0d43a1dc17 Mon Sep 17 00:00:00 2001
From: cqf <1219224667@qq.com>
Date: 星期五, 20 五月 2022 22:25:41 +0800
Subject: [PATCH] 05202225

---
 src/views/troubleshooting/index.vue |   78 +++++++++++++++++++++++++++------------
 1 files changed, 54 insertions(+), 24 deletions(-)

diff --git a/src/views/troubleshooting/index.vue b/src/views/troubleshooting/index.vue
index 1176b79..8bd210f 100644
--- a/src/views/troubleshooting/index.vue
+++ b/src/views/troubleshooting/index.vue
@@ -42,17 +42,19 @@
                 <span style="line-height: 36px; font-size: 14px; color: #606266;margin-right:10px;font-weight: bold;">请选择上报方式</span>
             </el-col>
             <el-col :span="10">
-              <el-select v-model="listQuery.form.check_main_branch" placeholder="请选择" @change="changeUpType">
-                <el-option v-for="item in upTypeList" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
-              </el-select>
-                <el-col :span="11">
+                <el-select v-model="listQuery.form.check_main_branch" placeholder="请选择" @change="changeUpType">
+                    <el-option v-for="item in upTypeList" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                </el-select>
+            </el-col>
+                <el-col :span="6">
                     <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.Conference_TimeStart" style="width: 100%" value-format="yyyy-MM-dd"></el-date-picker>
                 </el-col>
                 <el-col style="text-align: center" :span="2">至</el-col>
-                <el-col :span="11">
+                <el-col :span="6">
                     <el-date-picker type="date" placeholder="选择日期" v-model="listQuery.form.Conference_TimeEnd" style="width: 100%" value-format="yyyy-MM-dd"></el-date-picker>
                 </el-col>
+                <el-col :span="10">
                 <el-button type="primary" class="btns" size="small">上报</el-button>
             </el-col>
           </el-row>
@@ -75,26 +77,26 @@
     </el-row>
     <el-row class="title-center">
       <el-col :span="10">
-        <el-radio-group v-model="radio1">
+        <el-radio-group v-model="listQuery.form.CONFERENCE_PROFESSIONAL" @change="changeType2">
           <el-radio-button label="0">全部</el-radio-button>
-          <el-radio-button label="1">综合</el-radio-button>
-          <el-radio-button label="2">生产</el-radio-button>
-          <el-radio-button label="3">设备</el-radio-button>
-          <el-radio-button label="4">电器</el-radio-button>
-          <el-radio-button label="5">仪表</el-radio-button>
-          <el-radio-button label="6">消防</el-radio-button>
-          <el-radio-button label="7">安全管理</el-radio-button>
-          <el-radio-button label="8">其他</el-radio-button>
+          <el-radio-button label="综合">综合</el-radio-button>
+          <el-radio-button label="生产">生产</el-radio-button>
+          <el-radio-button label="设备">设备</el-radio-button>
+          <el-radio-button label="电器">电器</el-radio-button>
+          <el-radio-button label="仪表">仪表</el-radio-button>
+          <el-radio-button label="消防">消防</el-radio-button>
+          <el-radio-button label="安全管理">安全管理</el-radio-button>
+          <el-radio-button label="其他">其他</el-radio-button>
         </el-radio-group>
       </el-col>
     </el-row>
-    <el-table :data="tableData" style="width: 100%" @selection-change="changeBox">
+    <el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center"></el-table-column>
         <el-table-column v-if="listQuery.type==2" prop="communityname" label="会议单位" align="center" width="120"></el-table-column>
         <el-table-column prop="CONFERENCE_TIME" label="召开时间" :formatter="formatColumnDate" align="center" width="120"></el-table-column>
         <el-table-column prop="ADDRESS" label="地点" align="center" width="120"></el-table-column>
         <el-table-column prop="HOST" label="主持人" align="center" width="120"></el-table-column>
-        <el-table-column prop="CONFERENCE_PROFESSIONAL" label="会议专业" align="center"></el-table-column>
+        <el-table-column prop="CONFERENCE_PROFESSIONAL" label="会议专业" align="center" width="120"></el-table-column>
         <el-table-column prop="meeting_content" label="会议摘要" align="center"></el-table-column>
         <el-table-column prop="realFileName" label="会议纪要" align="center">
             <template slot-scope="scope" >
@@ -112,8 +114,8 @@
                 </el-upload>
                 <div v-else
                 v-for="item in scope.row.realFileName">
-                    <el-link  type="primary">
-                        {{item}}
+                    <el-link  type="primary" @click="downloadFile(subFile(item))">
+                        {{subFile(item)}}
                     </el-link>
                 </div>
             </template>
@@ -142,7 +144,8 @@
   </div>
 </template>
 <script>
-import {getPageList, } from "@/api/sgyhpczl/troubleshooting";
+import {getPageList, dowloand_do} from "@/api/sgyhpczl/troubleshooting";
+import {uploadFile} from "@/api/sgyhpczl/hiddenDangerRectification";
 
 import {
   initYHLX,
@@ -155,9 +158,10 @@
             page: 1,
             limit: 10,
             type: 0,//type=0 待上报 type=1 已上报 type=2 上级公司会议
-            form: {},
+            form: {
+                CONFERENCE_PROFESSIONAL: '0'
             },
-            radio1: 0,
+            },
             table1: true,
             table2: false,
 
@@ -215,7 +219,7 @@
           if (val == 1){
               this.upTimeShow = true
           }
-      } ,
+      },
     checkTime() {
       if (
         this.listQuery.form.check_dateStart != null &&
@@ -301,6 +305,10 @@
       this.listQuery.type = val;
       this.getPageList();
     },
+      changeType2(val){
+          this.listQuery.form.CONFERENCE_PROFESSIONAL = val;
+          this.getPageList();
+      },
     handleSelectionChange(val) {
       this.selectedList = [];
       val.forEach((item) => {
@@ -329,8 +337,30 @@
               });
           })
       },
+      downloadFile(path){
+          let params = {
+              type: 1,
+              fileName: path,
+          };
+          dowloand_do(params).then((res) => {
+              if (res.data.ok == 1) {
+                  this.$notify({
+                      title: "成功",
+                      message: res.data,
+                      type: "success",
+                      duration: 2000,
+                  });
+              } else {
+                  this.$message({
+                      type: "error",
+                      message: res.data.msg,
+                      duration: 3000,
+                  });
+              }
+          });
+      },
       subFile(fileName){
-        fileName.substring(fileName.indexOf("fileName="))
+        return  fileName.substring(fileName.indexOf("fileName=")+9)
       },
       handleRemove(file, fileList) {
           console.log(file, fileList)

--
Gitblit v1.9.2