|
@@ -1,3 +1,4 @@
|
|
|
|
+<!--安全隐患统计列表-->
|
|
<template>
|
|
<template>
|
|
<div class="safetyHazardStatistics">
|
|
<div class="safetyHazardStatistics">
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true">
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true">
|
|
@@ -88,7 +89,11 @@
|
|
{{scope.row.hazardLevel==1?'重大隐患':(scope.row.hazardLevel==2?'一般隐患':(scope.row.hazardLevel==3?'管理问题':''))}}
|
|
{{scope.row.hazardLevel==1?'重大隐患':(scope.row.hazardLevel==2?'一般隐患':(scope.row.hazardLevel==3?'管理问题':''))}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="不符合项" align="center" prop="hazardCheckPoint" show-overflow-tooltip width="260"/>
|
|
|
|
|
|
+ <el-table-column label="不符合项" align="center" prop="hazardCheckPoint" show-overflow-tooltip width="260">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{scope.row.hazardCheckCode}} {{scope.row.hazardCheckPoint}}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="历史出现次数" align="center" prop="sumTotal" show-overflow-tooltip width="120"/>
|
|
<el-table-column label="历史出现次数" align="center" prop="sumTotal" show-overflow-tooltip width="120"/>
|
|
<el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="180"/>
|
|
<el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="180"/>
|
|
<el-table-column label="检查者" align="center" prop="checkUser" show-overflow-tooltip width="100"/>
|
|
<el-table-column label="检查者" align="center" prop="checkUser" show-overflow-tooltip width="100"/>
|
|
@@ -132,7 +137,6 @@
|
|
numData:{},
|
|
numData:{},
|
|
tableList:[],
|
|
tableList:[],
|
|
total:0,
|
|
total:0,
|
|
- currentDate:'',
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -188,47 +192,34 @@
|
|
});
|
|
});
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
- /** 当前时间 */
|
|
|
|
- getCurrentTime () {
|
|
|
|
- const yy = new Date().getFullYear()
|
|
|
|
- const mm = new Date().getMonth() + 1
|
|
|
|
- const dd = new Date().getDate()
|
|
|
|
- const hh = new Date().getHours()
|
|
|
|
- const mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
|
|
|
|
- const ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
|
|
|
|
- return yy + '-' + mm + '-' + dd
|
|
|
|
- },
|
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
exportButton(item) {
|
|
exportButton(item) {
|
|
let self = this;
|
|
let self = this;
|
|
- this.currentDate=this.getCurrentTime()
|
|
|
|
-
|
|
|
|
if(item.command == 1){
|
|
if(item.command == 1){
|
|
self.$confirm(`确认导出全部数据?`, "提示", {
|
|
self.$confirm(`确认导出全部数据?`, "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(async () => {
|
|
}).then(async () => {
|
|
- self.download('/system/user/teacher/export/', {...self.queryParams}, '教职工信息-'+this.currentDate+'.xlsx')
|
|
|
|
|
|
+ self.download('/zd-security/DataStatistics/hazardExport/', {}, '安全隐患统计.xlsx')
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
}else if(item.command == 2){
|
|
}else if(item.command == 2){
|
|
- if(self.ids.length>0) {
|
|
|
|
|
|
+ let list = self.$refs.multipleTable.selection;
|
|
|
|
+ let ids = [];
|
|
|
|
+ for(let i=0;i<list.length;i++){
|
|
|
|
+ ids.push(list[i].id)
|
|
|
|
+ }
|
|
|
|
+ if(ids.length>0) {
|
|
self.$confirm(`确认导出选中数据?`, "提示", {
|
|
self.$confirm(`确认导出选中数据?`, "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(async () => {
|
|
}).then(async () => {
|
|
- let ids = self.ids.join(',');
|
|
|
|
- let obj = {
|
|
|
|
- ids :ids
|
|
|
|
- }
|
|
|
|
- self.download(`/system/user/teacher/export/`,obj, '教职工信息-'+this.currentDate+'.xlsx')
|
|
|
|
|
|
+ self.download(`/zd-security/DataStatistics/hazardExport/?ids=`+ids,{}, '安全隐患统计.xlsx')
|
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
}else {
|
|
}else {
|
|
- Message({
|
|
|
|
- message: "请选择要导出的数据",
|
|
|
|
- type: 'error'
|
|
|
|
- });
|
|
|
|
|
|
+ this.msgError('请选择要导出的数据')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|