From 239be21a25f04e6418b3487b4b618c37c6df611c Mon Sep 17 00:00:00 2001
From: cqf
Date: 星期五, 20 五月 2022 18:00:17 +0800
Subject: [PATCH] 隐患排查会议-列表

---
 src/views/troubleshooting/index.vue |  392 ++++++++++++++-------------------------
 src/views/careabout/index.vue       |   66 ++++--
 src/api/sgyhpczl/careabout.js       |   58 +++++
 src/views/oneFromanotherN/index.vue |    6 
 src/api/sgyhpczl/troubleshooting.js |   59 +++++
 5 files changed, 300 insertions(+), 281 deletions(-)

diff --git a/src/api/sgyhpczl/careabout.js b/src/api/sgyhpczl/careabout.js
index 2e8d3ef..88113d5 100644
--- a/src/api/sgyhpczl/careabout.js
+++ b/src/api/sgyhpczl/careabout.js
@@ -4,13 +4,29 @@
 
 export function getPageList(data) {
     var arr=[]
-    /*下发单位*/
-    if(data.form.push_branch!=null && data.form.push_branch!=''){
-        arr.push({field:"push_branch",value:data.form.push_branch,type:'OPT'})
+    /*编号*/
+    if(data.form.number!=null && data.form.number!=''){
+        arr.push({field:"number",value:data.form.number,type:'TXT'})
+    }
+    /*检查单位*/
+    if(data.form.check_main_branch!=null && data.form.check_main_branch!=''){
+        arr.push({field:"check_main_branch",value:data.form.check_main_branch,type:'OPT'})
+    }
+    /*检查部门*/
+    if(data.form.check_branch!=null && data.form.check_branch!=''){
+        arr.push({field:"check_branch",value:data.form.check_branch,type:'OPT'})
+    }
+    /*检查人*/
+    if(data.form.check_man!=null && data.form.check_man!=''){
+        arr.push({field:"check_man",value:data.form.check_man,type:'TXT'})
     }
     /*隐患单位*/
     if(data.form.ht_community!=null && data.form.ht_community!=''){
-        arr.push({field:"ht_community",value:data.form.ht_community,type:'TXT'})
+        arr.push({field:"ht_community",value:data.form.ht_community,type:'OPT'})
+    }
+    /*隐患部门*/
+    if(data.form.ht_branch!=null && data.form.ht_branch!=''){
+        arr.push({field:"ht_branch",value:data.form.ht_branch,type:'OPT'})
     }
     /*隐患类别*/
     if(data.form.ht_typesub!=null && data.form.ht_typesub!=''){
@@ -20,21 +36,33 @@
     if(data.form.ht_level!=null && data.form.ht_level!=''){
         arr.push({field:"ht_level",value:data.form.ht_level,type:'OPT'})
     }
-    /*隐患地点*/
-    if(data.form.address!=null && data.form.address!=''){
-        arr.push({field:"address",value:data.form.address,type:'TXT'})
-    }
     /*检查类别*/
     if(data.form.checktype!=null && data.form.checktype!=''){
         arr.push({field:"checktype",value:data.form.checktype,type:'OPT'})
+    }
+    /*隐患地点*/
+    if(data.form.address!=null && data.form.address!=''){
+        arr.push({field:"address",value:data.form.address,type:'TXT'})
     }
     /*隐患内容*/
     if(data.form.ht_content!=null && data.form.ht_content!=''){
         arr.push({field:"ht_content",value:data.form.ht_content,type:'TXT'})
     }
+    /*班次*/
+    if(data.form.check_class!=null && data.form.check_class!=''){
+        arr.push({field:"check_class",value:data.form.check_class,type:'OPT'})
+    }
+    /*深入现场情况*/
+    if(data.form.class_situation!=null && data.form.class_situation!=''){
+        arr.push({field:"class_situation",value:data.form.class_situation,type:'OPT'})
+    }
     /*检查时间*/
     if(data.form.check_dateStart!=null && data.form.check_dateStart!='' && data.form.check_dateEnd!=null && data.form.check_dateEnd!=''){
         arr.push({field:"check_date",value:data.form.check_dateStart+"至"+data.form.check_dateEnd,type:'DAT'})
+    }
+    /*限改时间*/
+    if(data.form.alter_timeStart!=null && data.form.alter_timeStart!='' && data.form.alter_timeEnd!=null && data.form.alter_timeEnd!=''){
+        arr.push({field:"alter_time",value:data.form.alter_timeStart+"至"+data.form.alter_timeEnd,type:'DAT'})
     }
     data.query_condition=arr
     return request({
@@ -62,4 +90,18 @@
     });
 }
 
+//添加/取消关注
+export function focus_do(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/danger/focus_do',
+        method: 'POST',
+        contentType: "application/json",
+        data
+    });
+}
+
 
diff --git a/src/api/sgyhpczl/troubleshooting.js b/src/api/sgyhpczl/troubleshooting.js
new file mode 100644
index 0000000..63bbf4a
--- /dev/null
+++ b/src/api/sgyhpczl/troubleshooting.js
@@ -0,0 +1,59 @@
+import request from '@/utils/request';
+import {getTokenAndVerify} from "@/api/sgyhpczl/auth";
+
+
+export function getPageList(data) {
+    var arr=[]
+    /*地点*/
+    if(data.form.ADDRESS!=null && data.form.ADDRESS!=''){
+        arr.push({field:"ADDRESS",value:data.form.ADDRESS,type:'TXT'})
+    }
+    /*主持人*/
+    if(data.form.HOST!=null && data.form.HOST!=''){
+        arr.push({field:"HOST",value:data.form.HOST,type:'TXT'})
+    }
+    /*召开时间*/
+    if(data.form.Conference_TimeStart!=null && data.form.Conference_TimeStart!='' && data.form.Conference_TimeEnd!=null && data.form.Conference_TimeEnd!=''){
+        arr.push({field:"Conference_Time",value:data.form.Conference_TimeStart+"至"+data.form.Conference_TimeEnd,type:'DAT'})
+    }
+    data.query_condition=arr
+    return request({
+        headers:{
+            'token': getTokenAndVerify().token,
+            'verify':getTokenAndVerify().verify
+        },
+        url: "/taboi/conference/conference_list",
+        contentType: "application/json",
+        method: 'POST',
+        data
+    });
+}
+//导出
+export function analogy_export_do(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/excel/analogy_export_do',
+        method: 'POST',
+        responseType: 'arraybuffer',
+        data
+    });
+}
+
+//添加/取消关注
+export function focus_do(data) {
+    return request({
+        headers: {
+            'token': getTokenAndVerify().token,
+            'verify': getTokenAndVerify().verify
+        },
+        url: '/taboi/danger/focus_do',
+        method: 'POST',
+        contentType: "application/json",
+        data
+    });
+}
+
+
diff --git a/src/views/careabout/index.vue b/src/views/careabout/index.vue
index 6d72984..36f9185 100644
--- a/src/views/careabout/index.vue
+++ b/src/views/careabout/index.vue
@@ -1,6 +1,6 @@
 <template>
     <div class="app-container">
-       <el-form ref="form" :inline="true" class="inquire" :model="form" label-width="100px">
+       <el-form ref="form" :inline="true" class="inquire" :model="listQuery.form" label-width="100px">
             <el-form-item label="编号">
                 <el-input v-model="listQuery.form.number" style="width:202px" placeholder="请输入内容"></el-input>
             </el-form-item>
@@ -136,7 +136,7 @@
             <el-form-item style="text-align:center;padding:0 50px">
                 <el-button type="primary" class="btns" size="small" icon="el-icon-search" @click="getPageList()">查询</el-button>
                 <el-button type="primary" class="btns" size="small" icon="el-icon-refresh-right" @click="reset()">重置</el-button>
-                <el-button type="primary" class="btns" size="small" icon="el-icon-upload2">导出excel</el-button>
+                <el-button type="primary" class="btns" size="small" icon="el-icon-upload2" @click="exportData()">导出excel</el-button>
             </el-form-item>
         </el-form>
      <el-row class="title-center">
@@ -149,12 +149,12 @@
             </el-col>
             <div v-if="table1">
             <el-col :span="14" style="text-align:right;">
-                <el-button class="btns" type="primary" size="small" >特别关注</el-button>
+                <el-button class="btns" type="primary" size="small" @click="specialFocus()">{{focusDesc}}</el-button>
                 <el-button class="btns" type="primary" size="small" @click="sendBath()">管理关注</el-button>
             </el-col>
             </div>
         </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 prop="number" label="编号" align="center" width="120"></el-table-column>
             <el-table-column prop="check_branch" label="检查部门" align="center" width="120"></el-table-column>
@@ -226,7 +226,7 @@
     </div>
 </template>
 <script>
-import { getPageList, analogy_export_do} from "@/api/sgyhpczl/careabout"
+import { getPageList, analogy_export_do, focus_do} from "@/api/sgyhpczl/careabout"
 import {initJCBM ,initYHLX, initBC ,initJCLB ,initYHBM ,initYHJB,initLlr} from "@/api/sgyhpczl/initSelect";
 
     export default{
@@ -236,14 +236,15 @@
                     page:1,
                     limit:10,
                     type: 0,
-                    form:{},
+                    form:{
+                        ht_community:'众泰煤焦化'
+                    },
                 },
                 radio1:'待发送',
                 table1:true,
                 table2:false,
 
-
-
+                focusDesc: '特别关注',
                 currentPage: 1,
                 pageSize: 10,
                 recordTotal: 0,
@@ -251,6 +252,7 @@
                 JCBMList:[],
                 YHLXList:[],
                 BCList:[],
+                reList:[{label:"值班",value:"值班"},{label:"带班",value:"带班"}],
                 JCLBList:[],
                 YHBMList:[],
                 YHJBList:[],
@@ -283,7 +285,7 @@
         methods:{
             sendBath(){
                 this.$router.push({
-                    path:'/existN'
+                    path:'/managementConcerns'
                 })
             },
             handleClick(data,val){
@@ -305,10 +307,10 @@
                     this.table2=false
                 }
             },
-            initYHLB(){
+            initYHLX(){
                 initYHLX().then(res=>{
                     if (res.data.ok==1){
-                        this.YHLBList=res.data.data
+                        this.YHLXList=res.data.data
                     } else{
                         this.$message({type:'error', message:res.data.msg, duration:3000})
                     }
@@ -318,15 +320,6 @@
                 initYHJB().then(res=>{
                     if (res.data.ok==1){
                         this.YHJBList=res.data.data
-                    } else{
-                        this.$message({type:'error', message:res.data.msg, duration:3000})
-                    }
-                })
-            },
-            initJCLB(){
-                initJCLB().then(res=>{
-                    if (res.data.ok==1){
-                        this.JCLBList=res.data.data
                     } else{
                         this.$message({type:'error', message:res.data.msg, duration:3000})
                     }
@@ -409,7 +402,7 @@
             },
             //重置
             reset(){
-                this.listQuery.form={};
+                this.listQuery.form = {ht_community: "众泰煤焦化"}
                 this.getPageList()
             },
             handleSizeChange(val){
@@ -433,6 +426,11 @@
             },
             typeChange(val){
                 this.listQuery.type = val;
+                if (val == 1){
+                    this.focusDesc = '取消关注'
+                }else {
+                    this.focusDesc = '特别关注'
+                }
                 this.getPageList()
             },
             handleSelectionChange(val){
@@ -451,7 +449,7 @@
                     var downloadElement = document.createElement('a')
                     var href = window.URL.createObjectURL(blob) //创建下载的链接
                     downloadElement.href = href
-                    downloadElement.download = '内部举一反三.xlsx' //下载后文件名
+                    downloadElement.download = '关注的隐患.xlsx' //下载后文件名
                     document.body.appendChild(downloadElement)
                     downloadElement.click() //点击下载
                     document.body.removeChild(downloadElement) //下载完成移除元素
@@ -460,6 +458,30 @@
                     console.log(err)
                 })
             },
+            //特别关注/取消关注
+            specialFocus(){
+                if (this.selectedList == null || this.selectedList.length == 0) {
+                    this.$message({type: 'warning', message: '至少选中一条数据', duration: 3000})
+                    return
+                }
+                var ids = this.selectedList.map((obj) => {
+                    return obj.id
+                }).join(",")
+                var type = this.listQuery.type == '1' ? 'del' : 'add'
+                let data = {
+                    type: type,
+                    ids: ids,
+                }
+                focus_do(data).then(() => {
+                    this.getPageList()
+                    this.$notify({
+                        title: "成功",
+                        message: "操作成功",
+                        type: "success",
+                        duration: 2000,
+                    });
+                });
+            },
             //日期格式转换
             formatColumnDate(row, column) {
                 // 获取单元格数据
diff --git a/src/views/oneFromanotherN/index.vue b/src/views/oneFromanotherN/index.vue
index ed13ff7..6e81886 100644
--- a/src/views/oneFromanotherN/index.vue
+++ b/src/views/oneFromanotherN/index.vue
@@ -281,7 +281,11 @@
             width="40%">
             <el-form>
                 <el-row>
-                    <el-checkbox style="width: 80px;height: 30px" v-for="item in YHBMList" v-model="checked" :label="item.branch_id">
+                    <el-checkbox style="width: 80px;height: 30px"
+                                 v-for="item in YHBMList"
+                                 v-model="checked"
+                                 :label="item.branch_id"
+                                 :key="item.branch_id">
                         {{item.branch_name}}
                     </el-checkbox>
                 </el-row>
diff --git a/src/views/troubleshooting/index.vue b/src/views/troubleshooting/index.vue
index 8879d09..1176b79 100644
--- a/src/views/troubleshooting/index.vue
+++ b/src/views/troubleshooting/index.vue
@@ -4,61 +4,27 @@
       ref="form"
       :inline="true"
       class="inquire"
-      :model="form"
+      :model="listQuery.form"
       label-width="100px"
     >
       <el-form-item label="地点">
-        <el-input
-          v-model="listQuery.form.address"
-          style="width: 202px"
-          placeholder="请输入内容"
-        ></el-input>
+        <el-input v-model="listQuery.form.ADDRESS" style="width: 202px" placeholder="请输入内容"></el-input>
       </el-form-item>
       <el-form-item label="主持人">
-        <el-input
-          v-model="listQuery.form.ht_content"
-          style="width: 202px"
-          placeholder="请输入内容"
-        ></el-input>
+        <el-input v-model="listQuery.form.HOST" style="width: 202px" placeholder="请输入内容"></el-input>
       </el-form-item>
       <el-form-item label="召开时间">
         <el-col :span="11">
-          <el-date-picker
-            type="date"
-            placeholder="选择日期"
-            v-model="listQuery.form.check_dateStart"
-            style="width: 100%"
-            value-format="yyyy-MM-dd"
-          ></el-date-picker>
+          <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-date-picker
-            type="date"
-            placeholder="选择日期"
-            v-model="listQuery.form.check_dateEnd"
-            style="width: 100%"
-            value-format="yyyy-MM-dd"
-          ></el-date-picker>
+          <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-form-item>
       <el-form-item style="text-align: center; padding: 0 50px">
-        <el-button
-          type="primary"
-          class="btns"
-          size="small"
-          icon="el-icon-search"
-          @click="getPageList()"
-          >查询</el-button
-        >
-        <el-button
-          type="primary"
-          class="btns"
-          size="small"
-          icon="el-icon-refresh-right"
-          @click="reset()"
-          >重置</el-button
-        >
+        <el-button type="primary" class="btns" size="small" icon="el-icon-search" @click="getPageList()">查询</el-button>
+        <el-button type="primary" class="btns" size="small" icon="el-icon-refresh-right" @click="reset()">重置</el-button>
       </el-form-item>
     </el-form>
     <el-row class="title-center">
@@ -72,47 +38,28 @@
       <div v-if="listQuery.type==0">
         <el-col :span="10">
           <el-row>
-            <el-col :span="7" :offset="7" style="text-align: right;"
-              ><span style="line-height: 36px; font-size: 14px; color: #606266;margin-right:10px;font-weight: bold;"
-                >请选择上报方式</span
-              ></el-col
-            >
+            <el-col :span="7" :offset="7" style="text-align: right;">
+                <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="changeJCDW"
-              >
-                <el-option
-                  v-for="item in JCDWList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
+              <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-button type="primary" class="btns" size="small"
-                >上报</el-button
-              >
+                <el-col :span="11">
+                    <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-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-button type="primary" class="btns" size="small">上报</el-button>
             </el-col>
           </el-row>
         </el-col>
         <el-col :span="4" style="text-align: right">
-          <el-button
-            class="btns"
-            type="primary"
-            size="small"
-            icon="el-icon-plus"
-            >添加</el-button
-          >
-          <el-button
-            class="btns"
-            type="primary"
-            size="small"
-            icon="el-icon-close"
-            @click="sendBath()"
-            >批量删除</el-button
-          >
+          <el-button class="btns" type="primary" size="small" icon="el-icon-plus">添加</el-button>
+          <el-button class="btns" type="primary" size="small" icon="el-icon-close" @click="sendBath()">批量删除</el-button>
         </el-col>
       </div>
        <div v-if="listQuery.type==1">
@@ -141,60 +88,43 @@
         </el-radio-group>
       </el-col>
     </el-row>
-    <el-table
-      :data="tableData"
-      style="width: 100%"
-      @selection-change="changeBox"
-    >
-      <el-table-column
-        type="selection"
-        width="55"
-        align="center"
-      ></el-table-column>
-        <el-table-column
-        v-if="listQuery.type==2"
-        prop="number"
-        label="会议单位"
-        align="center"
-        width="120"
-      ></el-table-column>
-      <el-table-column
-        prop="number"
-        label="召开时间"
-        align="center"
-        width="120"
-      ></el-table-column>
-      <el-table-column
-        prop="check_branch"
-        label="地点"
-        align="center"
-        width="120"
-      ></el-table-column>
-      <el-table-column
-        prop="check_man"
-        label="主持人"
-        align="center"
-        width="120"
-      ></el-table-column>
-      <el-table-column
-        prop="checktype"
-        label="会议专业"
-        align="center"
-      ></el-table-column>
-      <el-table-column
-        prop="checktype"
-        label="会议摘要"
-        align="center"
-      ></el-table-column>
-      <el-table-column prop="DTRisk_level" label="会议纪要" align="center">
-      </el-table-column>
-            <el-table-column prop="date" v-if="listQuery.type==0" label="基本操作" align="center">
-                <template slot-scope="scope">
-                    <el-button @click="updateClick(scope.row)" type="text" size="small">编辑</el-button>
-                    <el-button @click="updateClick(scope.row)" type="text" size="small">保存</el-button>
-                    <el-button @click="deleteClick(scope.row)" type="text" size="small">删除</el-button>
-                </template>
-            </el-table-column>
+    <el-table :data="tableData" style="width: 100%" @selection-change="changeBox">
+        <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="meeting_content" label="会议摘要" align="center"></el-table-column>
+        <el-table-column prop="realFileName" label="会议纪要" align="center">
+            <template slot-scope="scope" >
+                <el-upload
+                    class="upload-demo"
+                    ref="upload"
+                    v-if="listQuery.type==0"
+                    :http-request="uploadSectionFile"
+                    :on-preview="handlePreview"
+                    :on-remove="handleRemove"
+                    :file-list="fileList"
+                    :before-upload="beforeUpload"
+                    :auto-upload="true">
+                    <el-button slot="trigger" size="small" type="primary" class="btns">上传附件</el-button>
+                </el-upload>
+                <div v-else
+                v-for="item in scope.row.realFileName">
+                    <el-link  type="primary">
+                        {{item}}
+                    </el-link>
+                </div>
+            </template>
+        </el-table-column>
+        <el-table-column prop="date" v-if="listQuery.type==0" label="基本操作" align="center">
+            <template slot-scope="scope">
+                <el-button @click="updateClick(scope.row)" type="text" size="small">编辑</el-button>
+                <el-button @click="updateClick(scope.row)" type="text" size="small">保存</el-button>
+                <el-button @click="deleteClick(scope.row)" type="text" size="small">删除</el-button>
+            </template>
+        </el-table-column>
     </el-table>
     <div style="text-align: right">
       <el-pagination
@@ -212,61 +142,41 @@
   </div>
 </template>
 <script>
-import { getPageList, analogy_export_do } from "@/api/sgyhpczl/oneFromanotherN";
+import {getPageList, } from "@/api/sgyhpczl/troubleshooting";
+
 import {
-  initJCBM,
   initYHLX,
-  initJCLB,
-  initYHJB,
 } from "@/api/sgyhpczl/initSelect";
 
 export default {
-  data() {
-    return {
-      listQuery: {
-        page: 1,
-        limit: 10,
-        type: 0,
-        form: {},
-      },
-      radio1: 0,
-      table1: true,
-      table2: false,
+    data() {
+        return {
+            listQuery: {
+            page: 1,
+            limit: 10,
+            type: 0,//type=0 待上报 type=1 已上报 type=2 上级公司会议
+            form: {},
+            },
+            radio1: 0,
+            table1: true,
+            table2: false,
 
-      currentPage: 1,
-      pageSize: 10,
-      recordTotal: 0,
-      XFDWList: [],
-      YHLBList: [],
-      YHJBList: [],
-      JCLBList: [],
-      tableData: [],
-      selectedList: [],
-      listLoading: false,
-      selfInspectVisible: false,
-      selfInspectForm: {
-        id: "",
-        markUserName: "",
-        markDate: "",
-        remark: "",
-      },
-      selfInspectFormRules: {
-        markUserName: [
-          { required: true, message: "自查人不能为空", trigger: "blur" },
-        ],
-        markDate: [
-          { required: true, message: "自查时间不能为空", trigger: "blur" },
-        ],
-      },
-    };
+            currentPage: 1,
+            pageSize: 10,
+            recordTotal: 0,
+            YHLXList:[],
+            tableData: [],
+            selectedList: [],
+            listLoading: false,
+            fileList:[],
+            upTypeList:[{label:"按勾选上报",value:0},{label:"按时间上报",value:1}],
+            upTimeShow: false,
+        };
   },
-  mounted() {
-    this.getPageList();
-    this.initJCLB();
-    this.initXFDW();
-    this.initYHJB();
-    this.initYHLB();
-  },
+    mounted() {
+        this.getPageList();
+        this.initYHLX();
+    },
   methods: {
     sendBath() {
       this.$router.push({
@@ -292,58 +202,20 @@
         this.table2 = false;
       }
     },
-    initXFDW() {
-      initJCBM(1).then((res) => {
-        if (res.data.ok == 1) {
-          this.XFDWList = res.data.data;
-        } else {
-          this.$message({
-            type: "error",
-            message: res.data.msg,
-            duration: 3000,
-          });
-        }
-      });
-    },
-    initYHLB() {
-      initYHLX().then((res) => {
-        if (res.data.ok == 1) {
-          this.YHLBList = res.data.data;
-        } else {
-          this.$message({
-            type: "error",
-            message: res.data.msg,
-            duration: 3000,
-          });
-        }
-      });
-    },
-    initYHJB() {
-      initYHJB().then((res) => {
-        if (res.data.ok == 1) {
-          this.YHJBList = res.data.data;
-        } else {
-          this.$message({
-            type: "error",
-            message: res.data.msg,
-            duration: 3000,
-          });
-        }
-      });
-    },
-    initJCLB() {
-      initJCLB().then((res) => {
-        if (res.data.ok == 1) {
-          this.JCLBList = res.data.data;
-        } else {
-          this.$message({
-            type: "error",
-            message: res.data.msg,
-            duration: 3000,
-          });
-        }
-      });
-    },
+      initYHLX(){
+          initYHLX().then(res=>{
+              if (res.data.ok==1){
+                  this.YHLXList=res.data.data
+              } else{
+                  this.$message({type:'error', message:res.data.msg, duration:3000})
+              }
+          })
+      },
+      changeUpType(val){
+          if (val == 1){
+              this.upTimeShow = true
+          }
+      } ,
     checkTime() {
       if (
         this.listQuery.form.check_dateStart != null &&
@@ -435,27 +307,47 @@
         this.selectedList.push(item);
       });
     },
-    exportData() {
-      var requestData = this.listQuery;
-      //删除分页参数
-      this.$delete(requestData, "page");
-      this.$delete(requestData, "limit");
-      analogy_export_do(requestData)
-        .then((res) => {
-          var blob = new Blob([res.data]);
-          var downloadElement = document.createElement("a");
-          var href = window.URL.createObjectURL(blob); //创建下载的链接
-          downloadElement.href = href;
-          downloadElement.download = "内部举一反三.xlsx"; //下载后文件名
-          document.body.appendChild(downloadElement);
-          downloadElement.click(); //点击下载
-          document.body.removeChild(downloadElement); //下载完成移除元素
-          window.URL.revokeObjectURL(href); //释放掉blob对象
-        })
-        .catch((err) => {
-          console.log(err);
-        });
-    },
+      uploadSectionFile(param) {
+          let form = new FormData();
+          var that = this;
+          form.append('file', param.file);
+          //隐患延期申请附件
+          form.append('type', "0");
+          uploadFile(form).then(res => {
+              var data = res.data;
+              if (data.ok) {
+                  var fileName = data.data.fileName[0];
+                  if (!fileName.endsWith("a62b")) {
+                      fileName = fileName + param.file.realFileName;
+                  }
+                  that.ruleForm.realFileName = that.ruleForm.realFileName + "," + fileName;
+              }
+          }).error(res => {
+              this.$message({
+                  type: 'error',
+                  message: '附件上传失败,请重试!'
+              });
+          })
+      },
+      subFile(fileName){
+        fileName.substring(fileName.indexOf("fileName="))
+      },
+      handleRemove(file, fileList) {
+          console.log(file, fileList)
+      },
+      handlePreview(file) {
+          console.log(file)
+      },
+      beforeUpload(file) {
+          var FileExt = file.name.replace(/.+\./, "");
+          if (['jpg', 'png', 'bmp', 'gif', 'jpeg'].indexOf(FileExt.toLowerCase()) === -1) {
+              this.$message({
+                  type: 'warning',
+                  message: '请上传后缀名为jpg、png、bmp、gif、jpeg的图片!'
+              });
+              return false;
+          }
+      },
     //日期格式转换
     formatColumnDate(row, column) {
       // 获取单元格数据

--
Gitblit v1.9.2