dedsudiyu 2 年之前
父節點
當前提交
89a964e563

+ 17 - 0
src/api/safetyCheck/index.js

@@ -246,6 +246,7 @@ export function checkStaffUserList(query) {
 /***************************检查计划***************************/
 
 //检查计划-列表
+//自查任务-列表
 export function checkPlanList(data) {
   return request({
     url: '/zd-security/checkPlan/list',
@@ -255,6 +256,7 @@ export function checkPlanList(data) {
 }
 
 //检查计划-根据计划ID查询管理列表
+//自查任务-根据计划ID查询管理列表
 export function findByCheckPlanId(data) {
   return request({
     url: '/zd-security/checkManage/findByCheckPlanId',
@@ -264,6 +266,7 @@ export function findByCheckPlanId(data) {
 }
 
 //检查计划-根据计划ID删除
+//自查任务-根据计划ID删除
 export function checkPlanDelete(query) {
   return request({
     url: '/zd-security/checkPlan/delete',
@@ -273,6 +276,7 @@ export function checkPlanDelete(query) {
 }
 
 //检查计划-查询历史计划标题列表
+//自查任务-查询历史计划标题列表
 export function getHistoryPlanTitles(query) {
   return request({
     url: '/zd-security/checkPlan/getHistoryPlanTitles',
@@ -281,6 +285,15 @@ export function getHistoryPlanTitles(query) {
   })
 }
 
+//检查计划-根据ID隐藏历史标题
+export function hideHistoryPlanTitle(query) {
+  return request({
+    url: '/zd-security/checkPlan/hideHistoryPlanTitle',
+    method: 'get',
+    params: query
+  })
+}
+
 //检查计划-查询当前学校下实验室数量
 export function getAllSubNum(query) {
   return request({
@@ -318,6 +331,7 @@ export function conditionSubjectInfo(data) {
 }
 
 //检查计划-新增计划
+//自查任务-新增计划
 export function checkPlanAdd(data) {
   return request({
     url: '/zd-security/checkPlan/add',
@@ -327,6 +341,7 @@ export function checkPlanAdd(data) {
 }
 
 //检查计划-计划详情
+//自查任务-计划详情
 export function findCheckPlan(query) {
   return request({
     url: '/zd-security/checkPlan/findCheckPlan',
@@ -336,6 +351,7 @@ export function findCheckPlan(query) {
 }
 
 //检查计划-修改计划
+//自查任务-修改计划
 export function checkPlanUpdate(data) {
   return request({
     url: '/zd-security/checkPlan/update',
@@ -344,6 +360,7 @@ export function checkPlanUpdate(data) {
   })
 }
 
+
 /***************************校院巡察组***************************/
 
 //校院巡察组-分页获取校院巡查组列表

文件差異過大導致無法顯示
+ 577 - 243
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/addDialog.vue


+ 96 - 46
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/index.vue

@@ -6,21 +6,21 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+              <div :class="queryParams.checkStatus==0?'checkDiv':''" @click="topLeftClickType(0)">
                 <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==0"></p>
               </div>
-              <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
+              <div :class="queryParams.checkStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
                 <p class="text-p">待检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==1"></p>
               </div>
-              <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
+              <div :class="queryParams.checkStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
                 <p class="text-p">检查中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==2"></p>
               </div>
-              <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
+              <div :class="queryParams.checkStatus==3?'checkDiv':''" @click="topLeftClickType(3)">
                 <p class="text-p">已检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.checkStatus==3"></p>
               </div>
             </div>
           </div>
@@ -63,22 +63,34 @@
       <div class="content-box">
         <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" />
-          <el-table-column label="计划标题" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="检查范围" align="center" prop="deptName" show-overflow-tooltip width="120"/>
-          <el-table-column label="检查周期" align="center" prop="deptName" show-overflow-tooltip width="280"/>
-          <el-table-column label="检查状态" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-          <el-table-column label="检查进度" align="center" prop="deptName" show-overflow-tooltip width="220"/>
-          <el-table-column label="创建人" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-          <el-table-column label="创建时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
+          <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
+          <el-table-column label="检查范围" align="center" prop="checkRange" show-overflow-tooltip width="120">
+            <template slot-scope="scope">
+              <p>{{scope.row.checkRange==1?'全校':(scope.row.checkRange==2?'学院':(scope.row.checkRange==3?'实验室':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="任务周期" align="center" prop="cycleStartTime" show-overflow-tooltip width="280">
+            <template slot-scope="scope">
+              <p>{{scope.row.cycleStartTime}}至{{scope.row.cycleEndTime}}<span style="color:#EE0606;margin-left:15px;" v-if="scope.row.isOverdue==1">已逾期</span></p>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" align="center" prop="checkStatus" show-overflow-tooltip width="130">
+            <template slot-scope="scope">
+              <p :class="scope.row.checkStatus==1?'checkStatus-color-1':(scope.row.checkStatus==2?'checkStatus-color-2':(scope.row.checkStatus==3?'checkStatus-color-3':''))">{{scope.row.checkStatus==1?'未开始':(scope.row.checkStatus==2?'进行中':(scope.row.checkStatus==3?'已结束':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查进度" align="center" prop="checkSchedule" show-overflow-tooltip width="220"/>
+          <el-table-column label="创建人" align="center" prop="createName" show-overflow-tooltip width="130"/>
+          <el-table-column label="创建时间" sortable="custom" align="center" prop="createTime" show-overflow-tooltip width="157"/>
           <el-table-column label="操作" align="center" prop="deptName" width="200">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
-                <p class="table-button-p" @click="addDialogOpen(2,scope.row)">编辑</p>
-                <p class="table-button-p">删除</p>
-                <p class="table-button-p" @click="addDialogOpen(3,scope.row)">详情</p>
-                <p class="table-button-p" @click="goPage(2,scope.row)">自查管理</p>
-                <p class="table-button-p" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-p" v-if="scope.row.checkStatus==1" @click="addDialogOpen(2,scope.row)">编辑</p>
+                <p class="table-button-p" v-if="scope.row.checkStatus==1" @click="deleteObj(scope.row)">删除</p>
+                <p class="table-button-p" v-if="scope.row.checkStatus!=1" @click="addDialogOpen(3,scope.row)">详情</p>
+                <p class="table-button-p" v-if="scope.row.checkStatus!=1" @click="goPage(2,scope.row)">自查管理</p>
+                <p class="table-button-p" v-if="scope.row.isAttachment == 1" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -93,7 +105,7 @@
         />
       </div>
     </div>
-    <list-page v-if="pageType == 2"></list-page>
+    <list-page v-if="pageType == 2" :propsListPageData="propsListPageData"></list-page>
     <add-dialog v-if="addDialogType" :addDialogData="addDialogData"></add-dialog>
     <lookDocumentListDialog v-if="lookDocumentListType" :propsLookDocumentListData="propsLookDocumentListData"></lookDocumentListDialog>
   </div>
@@ -103,6 +115,7 @@
   import addDialog from './addDialog.vue'
   import listPage from './listPage.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
+  import { checkPlanList,checkPlanDelete } from '@/api/safetyCheck/index'
   export default {
     name: 'index',
     components: {
@@ -115,19 +128,20 @@
         //子组件数据
         lookDocumentListType:false,
         propsLookDocumentListData:{},
+        propsListPageData:{},
         addDialogType:false,
         addDialogData:{},
         pageType:1,
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
+          checkStatus:0,
+          createTimeSort:0,
           searchValue:"",
-          data1:""
+          checkType:2,
         },
         dateRange:[],
-        tableList:[{}],
+        tableList:[],
         total:0,
       }
     },
@@ -135,12 +149,18 @@
 
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
-      goPage(type){
+      //切换页面
+      goPage(type,data){
         if(this.pageType != type){
-          this.$set(this,'pageType',type);
+          if(type == 2){
+            this.$set(this,'propsListPageData',data);
+            this.$set(this,'pageType',type);
+          }else{
+            this.$set(this,'pageType',type);
+          }
         }
       },
       //弹窗开启
@@ -149,48 +169,63 @@
           this.$set(this,'addDialogData',{
             title:"创建自查任务",
             lookInfoType:false,
-            addType:false,
+            addType:true,
           })
           this.$set(this,'addDialogType',true);
         }else if(type==2){
           this.$set(this,'addDialogData',{
             title:"编辑自查任务",
+            id:data.id,
             lookInfoType:false,
-            addType:true,
+            addType:false,
           })
           this.$set(this,'addDialogType',true);
         }else if(type==3){
           this.$set(this,'addDialogData',{
-            title:"巡查自查任务",
+            title:"自查任务详情",
+            id:data.id,
             lookInfoType:true,
-            addType:true,
+            addType:false,
           })
           this.$set(this,'addDialogType',true);
         }else if(type==4){
           this.$set(this,'addDialogType',false);
+        }else if(type == 5){
+          this.$set(this,'addDialogType',false);
+          this.getList();
         }
       },
       //范围选择
       topLeftClickType(type){
-        if(this.queryParams.buttonType != type){
-          this.$set(this.queryParams,'buttonType',type);
+        if(this.queryParams.checkStatus != type){
+          this.$set(this.queryParams,'checkStatus',type);
           this.getList();
         }
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'createTime'){
+          this.$set(this.queryParams,'createTimeSort',val.order=='ascending'?'1':(val.order=='descending'?'2':'0'));
+          this.getList();
+        }
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.cycleStartTime = this.dateRange[0];
+        }else{
+          obj.cycleStartTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.cycleEndTime = this.dateRange[1];
+        }else{
+          obj.cycleEndTime = "";
+        }
+        checkPlanList(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -203,13 +238,28 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
+          checkStatus:0,
+          createTimeSort:0,
           searchValue:"",
-          data1:""
+          checkType:2,
         });
         this.handleQuery();
       },
+      //删除
+      deleteObj(obj){
+        let self = this;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          checkPlanDelete({id:obj.id}).then(response => {
+            self.msgSuccess(response.msg)
+            self.getList();
+          })
+        }).then(() => {
+        }).catch(() => {});
+      },
       //查看多个文档
       lookDocumentListButton(type,row){
         if(type==1){

+ 69 - 44
src/views/safetyCheck/laboratorySelfTest/selfInspectionTask/listPage.vue

@@ -6,21 +6,21 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+              <div :class="queryParams.manageStatus=='-1'?'checkDiv':''" @click="topLeftClickType('-1')">
                 <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus=='-1'"></p>
               </div>
-              <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
+              <div :class="queryParams.manageStatus==0?'checkDiv':''" @click="topLeftClickType(0)">
                 <p class="text-p">待检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==0"></p>
               </div>
-              <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
+              <div :class="queryParams.manageStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
                 <p class="text-p">检查中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==1"></p>
               </div>
-              <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
+              <div :class="queryParams.manageStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
                 <p class="text-p">已检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.manageStatus==2"></p>
               </div>
             </div>
           </div>
@@ -33,8 +33,8 @@
               style="width: 250px"
             />
           </el-form-item>
-          <el-form-item label="学院" prop="data1" label-width="50px">
-            <el-select v-model="queryParams.data1" clearable placeholder="请选择学院" style="width: 150px">
+          <el-form-item label="学院" prop="deptId" label-width="50px">
+            <el-select v-model="queryParams.deptId" clearable placeholder="请选择学院" style="width: 150px">
               <el-option
                 v-for="item in optionsOne"
                 :key="item.key"
@@ -68,25 +68,37 @@
       <div class="content-box">
         <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" />
-          <el-table-column label="计划标题" align="center" prop="hardwareNum" show-overflow-tooltip width="250"/>
-          <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="220"/>
-          <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="150"/>
-          <el-table-column label="检查状态" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-          <el-table-column label="检查者" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-          <el-table-column label="检查结果" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-          <el-table-column label="隐患数" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-          <el-table-column label="整改进度" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-          <el-table-column label="任务周期" align="center" prop="deptName" show-overflow-tooltip width="270"/>
-          <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="157"/>
+          <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip width="250"/>
+          <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip width="220"/>
+          <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="150"/>
+          <el-table-column label="检查状态" align="center" prop="manageStatus" show-overflow-tooltip width="90">
+            <template slot-scope="scope">
+              <p :class="scope.row.manageStatus==0?'manageStatus-color-1':(scope.row.manageStatus==1?'manageStatus-color-2':(scope.row.manageStatus==2?'manageStatus-color-3':''))">{{scope.row.manageStatus==0?'待检查':(scope.row.manageStatus==1?'检查中':(scope.row.manageStatus==2?'已检查':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查者" align="center" prop="checkUser" show-overflow-tooltip width="100"/>
+          <el-table-column label="检查结果" align="center" prop="checkResult" show-overflow-tooltip width="80">
+            <template slot-scope="scope">
+              <p>{{scope.row.checkResult==0?'不符合':(scope.row.checkResult==1?'符合':'')}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="隐患数" align="center" prop="dangerNum" show-overflow-tooltip width="80"/>
+          <el-table-column label="整改进度" align="center" prop="rectifySchedule" show-overflow-tooltip width="200"/>
+          <el-table-column label="任务周期" align="center" prop="startTime" show-overflow-tooltip width="270">
+            <template slot-scope="scope">
+              <p>{{scope.row.cycleStartTime}}至{{scope.row.cycleEndTime}}<span style="color:#EE0606;margin-left:15px;" v-if="scope.row.isOverdue==1">已逾期</span></p>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查时间" sortable="custom" align="center" prop="checkTime" show-overflow-tooltip width="157"/>
           <el-table-column label="操作" align="center" prop="deptName" width="230">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
-                <p class="table-button-p" @click="goAddPage(3)">详情</p>
-                <p class="table-button-p" @click="goAddPage(2)">开始检查</p>
-                <p class="table-button-p">编辑</p>
-                <p class="table-button-p" @click="lookDocumentButton(1,scope.row)">整改报告</p>
-                <p class="table-button-p" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
+                <p class="table-button-p" v-if="scope.row.manageStatus!=0" @click="goAddPage(3)">详情</p>
+                <p class="table-button-p" v-if="scope.row.manageStatus==0">编辑</p>
+                <p class="table-button-p" v-if="scope.row.manageStatus==0" @click="goAddPage(2)">开始检查</p>
+                <p class="table-button-p" v-if="scope.row.manageStatus==2" @click="lookDocumentButton(1,scope.row)">整改报告</p>
+                <p class="table-button-p" v-if="scope.row.isAttachment == 1" @click="lookDocumentListButton(1,scope.row)">查看附件</p>
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -109,12 +121,16 @@
 </template>
 
 <script>
+  import { findByCheckPlanId } from '@/api/safetyCheck/index'
   import addPage from './addPage.vue'
   import infoPage from '@/views/safetyCheck/components/infoPage/infoPage.vue'
   import lookDocumentDialog from '@/components/lookDocumentDialog/lookDocumentDialog.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
   export default {
     name: 'index',
+    props:{
+      propsListPageData:{},
+    },
     components: {
       addPage,
       infoPage,
@@ -132,14 +148,13 @@
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          myType:0,
-          timeType:0,
+          manageStatus:'-1',
+          checkTimeSort:0,
           searchValue:"",
-          data1:""
+          deptId:""
         },
         dateRange:[],
-        tableList:[{}],
+        tableList:[],
         total:0,
         optionsOne:[{key:1,label:"校级"},{key:2,label:"院级"}],
         optionsTwo:[{key:1,label:"启用"},{key:0,label:"停用"}],
@@ -149,7 +164,7 @@
 
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
       //返回按钮
@@ -162,9 +177,10 @@
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'checkTime'){
+          this.$set(this.queryParams,'checkTimeSort',val.order=='ascending'?'1':(val.order=='descending'?'2':"0"));
+          this.getList();
+        }
       },
       //范围选择
       topLeftClickType(type){
@@ -175,12 +191,22 @@
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        obj.checkPlanId = this.propsListPageData.id;
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0];
+        }else{
+          obj.startTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1];
+        }else{
+          obj.endTime = "";
+        }
+        findByCheckPlanId(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -193,11 +219,10 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
-          myType:0,
+          manageStatus:'-1',
+          checkTimeSort:0,
           searchValue:"",
-          data1:""
+          deptId:""
         });
         this.handleQuery();
       },

+ 64 - 18
src/views/safetyCheck/schoolInspection/inspectionPlan/addDialog.vue

@@ -10,7 +10,10 @@
           <p>计划标题快选</p>
         </div>
         <div class="left-max-list-box scrollbar-box">
-          <p v-for="(item,index) in quickSelectionList" :key="index" @click="checkTitle(item)">{{item}}</p>
+          <div v-for="(item,index) in quickSelectionList" :key="index" @click="checkTitle(item)">
+            <p class="left-max-list-for-p">{{item.title}}</p>
+            <p v-if="item.type" class="el-icon-error left-max-list-for-icon" @click="delTitleObj(item)"></p>
+          </div>
         </div>
       </div>
       <div class="right-max-box scrollbar-box">
@@ -516,7 +519,8 @@
   import { listClasstypeAll } from "@/api/laboratory/classtype";
   import { getHistoryPlanTitles,findGroupList,checkGroupFind,findUserList,
            getAllSubNum,isSCollege,conditionCollegeInfo,findSubInfoByDeptIds,
-           checkPlanAdd,conditionSubjectInfo,findCheckPlan,checkPlanUpdate } from '@/api/safetyCheck/index'
+           checkPlanAdd,conditionSubjectInfo,findCheckPlan,checkPlanUpdate,
+           hideHistoryPlanTitle } from '@/api/safetyCheck/index'
   export default {
     name: 'addDialog',
     props:{
@@ -693,13 +697,7 @@
       //初始化接口
       initializationInterface(){
         //获取历史标题
-        getHistoryPlanTitles().then(response => {
-          let list = ['校级开学检查', '院级开学检查', '月度安全检查', '季度安全检查', '年度安全检查', '专项检查', '紧急检查'];
-          for(let i=0;i<response.data.length;i++){
-            list.push(response.data[i].title);
-          }
-          this.$set(this,'quickSelectionList',list);
-        });
+        this.getHistoryPlanTitles();
         //获取学院列表
         listDepartments().then(response => {
           this.deptSelectList = response.data;
@@ -1050,8 +1048,8 @@
         }
       },
       //快捷选中标题
-      checkTitle(val){
-        this.$set(this.dialogForm,'title',val);
+      checkTitle(item){
+        this.$set(this.dialogForm,'title',item.title);
       },
       /*===================================学院选择相关===================================*/
       //重置
@@ -1425,6 +1423,39 @@
         m=Math.pow(10,Math.max(r1,r2))
         return ((arg1*m+arg2*m)/m).toFixed(0);
       },
+      //获取历史标题
+      getHistoryPlanTitles(){
+        getHistoryPlanTitles().then(response => {
+          let list = [
+            {title:"校院春季开学检查",type:false,},
+            {title:"校院秋季开学检查",type:false,},
+            {title:"日常安全检查",type:false,},
+            {title:"年度安全检查",type:false,},
+            {title:"季度安全检查",type:false,},
+            {title:"月度安全检查",type:false,},
+            {title:"专项检查",type:false,},
+          ];
+          for(let i=0;i<response.data.length;i++){
+            list.push({title:response.data[i].title,type:true,id:response.data[i].id});
+          }
+          this.$set(this,'quickSelectionList',list);
+        });
+      },
+      //删除历史标题
+      delTitleObj(item){
+        let self = this;
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          hideHistoryPlanTitle({checkPlanId:item.id}).then(response => {
+            self.msgSuccess(response.msg)
+            self.getHistoryPlanTitles();
+          });
+        }).then(() => {
+        }).catch(() => {});
+      },
     }
   }
 </script>
@@ -1493,23 +1524,38 @@
           flex:1;
           width:230px;
           overflow-x: hidden;
-          p{
+          div{
             width:230px;
             height:40px;
             line-height:40px;
-            padding-left:32px;
+            padding:0 10px;
             margin-top: 10px;
             cursor: pointer;
             font-size:16px;
             color:#333333;
+            overflow:hidden;
+            display: flex;
+            .left-max-list-for-p{
+              flex:1;
+              display:block;
+              overflow:hidden;
+              text-overflow:ellipsis;
+              white-space:nowrap;
+            }
+            .left-max-list-for-icon{
+              color:#999;
+              width:32px;
+              line-height: 40px;
+              text-align: center;
+              font-size:16px;
+            }
           }
-          p:hover{
+          div:hover{
             background: rgba(1,131,250,0.2);
             color:#0183FA;
-            display:block;
-            overflow:hidden;
-            text-overflow:ellipsis;
-            white-space:nowrap;
+            .left-max-list-for-icon{
+              color:#0183FA!important;
+            }
           }
         }
       }

+ 4 - 35
src/views/safetyCheck/schoolInspection/inspectionPlan/index.vue

@@ -69,12 +69,12 @@
               <p>{{scope.row.checkRange==1?'全校':(scope.row.checkRange==2?'学院':(scope.row.checkRange==3?'实验室':''))}}</p>
             </template>
           </el-table-column>
-          <el-table-column label="检查周期" align="center" prop="cycleStartTime" show-overflow-tooltip width="280">
+          <el-table-column label="计划周期" align="center" prop="cycleStartTime" show-overflow-tooltip width="280">
             <template slot-scope="scope">
               <p>{{scope.row.cycleStartTime}}至{{scope.row.cycleEndTime}}<span style="color:#EE0606;margin-left:15px;" v-if="scope.row.isOverdue==1">已逾期</span></p>
             </template>
           </el-table-column>
-          <el-table-column label="检查状态" align="center" prop="checkStatus" show-overflow-tooltip width="130">
+          <el-table-column label="状态" align="center" prop="checkStatus" show-overflow-tooltip width="130">
             <template slot-scope="scope">
               <p :class="scope.row.checkStatus==1?'checkStatus-color-1':(scope.row.checkStatus==2?'checkStatus-color-2':(scope.row.checkStatus==3?'checkStatus-color-3':''))">{{scope.row.checkStatus==1?'未开始':(scope.row.checkStatus==2?'进行中':(scope.row.checkStatus==3?'已结束':''))}}</p>
             </template>
@@ -138,6 +138,7 @@
           checkStatus:0,
           createTimeSort:0,
           searchValue:"",
+          checkType:1,
         },
         dateRange:[],
         tableList:[],
@@ -240,6 +241,7 @@
           checkStatus:0,
           createTimeSort:0,
           searchValue:"",
+          checkType:1,
         });
         this.handleQuery();
       },
@@ -258,39 +260,6 @@
         }).then(() => {
         }).catch(() => {});
       },
-      /*==========上传相关==========*/
-
-      handleAvatarSuccess(res) {
-        if(this.dialogUpList.length>9){
-          this.msgError('已到达上传数量上限')
-          return
-        }
-        let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
-        //判断文件名中是否有逗号和分号
-        if(suffixName.indexOf(',')==-1 && suffixName.indexOf(';')==-1){
-        }else{
-          this.$message.info('文件名里包含逗号或分号,请修改后重新上传!')
-          return
-        }
-        let obj ={
-          name:this.upDataName,
-          url:res.data.url,
-        };
-        this.dialogUpList.push(obj);
-        this.$forceUpdate()
-      },
-      beforeAvatarUpload(file) {
-        console.log('file',file)
-        let type = false;
-        if (file.type == 'application/pdf' || file.type == 'application/msword' || file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'|| file.type == 'application/vnd.ms-excel' || file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
-          this.upDataName = file.name;
-          type = true;
-        }else{
-          this.$message.error('只能上传png/jpeg/gif/doc/docx格式');
-          type = false;
-        }
-        return type;
-      },
       //查看多个文档
       lookDocumentListButton(type,row){
         if(type==1){

+ 2 - 2
src/views/safetyCheck/schoolInspection/inspectionPlan/listPage.vue

@@ -84,7 +84,7 @@
           </el-table-column>
           <el-table-column label="隐患数" align="center" prop="dangerNum" show-overflow-tooltip width="80"/>
           <el-table-column label="整改进度" align="center" prop="rectifySchedule" show-overflow-tooltip width="200"/>
-          <el-table-column label="任务周期" align="center" prop="startTime" show-overflow-tooltip width="270">
+          <el-table-column label="计划周期" align="center" prop="startTime" show-overflow-tooltip width="270">
             <template slot-scope="scope">
               <p>{{scope.row.cycleStartTime}}至{{scope.row.cycleEndTime}}<span style="color:#EE0606;margin-left:15px;" v-if="scope.row.isOverdue==1">已逾期</span></p>
             </template>
@@ -154,7 +154,7 @@
           deptId:""
         },
         dateRange:[],
-        tableList:[{}],
+        tableList:[],
         total:0,
         optionsOne:[{key:1,label:"校级"},{key:2,label:"院级"}],
         optionsTwo:[{key:1,label:"启用"},{key:0,label:"停用"}],