|
@@ -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){
|