|
@@ -43,8 +43,8 @@
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label-width="0">
|
|
<el-form-item label-width="0">
|
|
- <el-button type="primary" @click.native.prevent="onSearch" native-type="submit">查询</el-button>
|
|
|
|
- <el-button @click="resetForm('searchForm')">重置</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click.native.prevent="handleQuery" native-type="submit">查询</el-button>
|
|
|
|
+ <el-button @click="resetQuery">重置</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<!--列表-->
|
|
<!--列表-->
|
|
@@ -77,7 +77,7 @@ import {
|
|
import Header from '@/components/header.vue'
|
|
import Header from '@/components/header.vue'
|
|
import {
|
|
import {
|
|
examBigViewDetailColumnar,
|
|
examBigViewDetailColumnar,
|
|
- examBigViewDetailSubList,
|
|
|
|
|
|
+ examBigViewDetailSubList, examViolationSiteGetListByType,
|
|
laboratoryBigViewSubHazardBarChartCount,
|
|
laboratoryBigViewSubHazardBarChartCount,
|
|
securityBigViewCheckOptionChartDetails
|
|
securityBigViewCheckOptionChartDetails
|
|
} from "@/api";
|
|
} from "@/api";
|
|
@@ -113,6 +113,8 @@ export default {
|
|
page:1,
|
|
page:1,
|
|
pageSize:10,
|
|
pageSize:10,
|
|
searchValue:'',
|
|
searchValue:'',
|
|
|
|
+ beginTimeStr:'',
|
|
|
|
+ endTimeStr:'',
|
|
},
|
|
},
|
|
dataList:[],
|
|
dataList:[],
|
|
total:0,
|
|
total:0,
|
|
@@ -121,8 +123,7 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
this.getList();
|
|
this.getList();
|
|
this.examBigViewDetailColumnar();
|
|
this.examBigViewDetailColumnar();
|
|
- //this.getAjaxData()
|
|
|
|
- //this.getAjaxList()
|
|
|
|
|
|
+ this.examViolationSiteGetListByType();
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -143,6 +144,7 @@ export default {
|
|
this.$set(this,'total',response.data.total);
|
|
this.$set(this,'total',response.data.total);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //柱状图
|
|
examBigViewDetailColumnar(){
|
|
examBigViewDetailColumnar(){
|
|
let self=this;
|
|
let self=this;
|
|
examBigViewDetailColumnar({}).then(response => {
|
|
examBigViewDetailColumnar({}).then(response => {
|
|
@@ -155,6 +157,26 @@ export default {
|
|
self.illegalDetailFun(illegalDetailData,dataNum)
|
|
self.illegalDetailFun(illegalDetailData,dataNum)
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ //违规原因
|
|
|
|
+ examViolationSiteGetListByType(){
|
|
|
|
+ examViolationSiteGetListByType().then(response => {
|
|
|
|
+ this.causeList=response.data
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //查询按钮
|
|
|
|
+ handleQuery(){
|
|
|
|
+ this.$set(this.queryParams,'page',1);
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ //重置按钮
|
|
|
|
+ resetQuery(){
|
|
|
|
+ this.$set(this,'queryParams',{
|
|
|
|
+ page:1,
|
|
|
|
+ pageSize:10,
|
|
|
|
+ searchValue:'',
|
|
|
|
+ });
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
|
|
back(){
|
|
back(){
|
|
this.$router.push('/')
|
|
this.$router.push('/')
|
|
@@ -167,118 +189,6 @@ export default {
|
|
return 'warning-row';
|
|
return 'warning-row';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- getAjaxData: function () {
|
|
|
|
- let _this=this;
|
|
|
|
- //人员违规统计图表
|
|
|
|
-
|
|
|
|
- let obj={
|
|
|
|
- 'deptLevel':localStorage.getItem('deptLevel'),
|
|
|
|
- 'subjectId':this.editForm.subId,
|
|
|
|
- 'violationType':this.editForm.violationType,
|
|
|
|
- 'beginTimeStr':this.editForm.beginTimeStr,
|
|
|
|
- 'endTimeStr':this.editForm.endTimeStr,
|
|
|
|
- }
|
|
|
|
- detailColumnar(obj).then((res) =>{
|
|
|
|
- if(res.code==200){
|
|
|
|
- var illegalDetailData=[];
|
|
|
|
- let data=res.data;
|
|
|
|
- let dataLength=0;
|
|
|
|
- let dataNum=[];
|
|
|
|
-
|
|
|
|
- if(data.length<=1){
|
|
|
|
- illegalDetailData=[
|
|
|
|
- ['product', '离开未打卡', '未佩戴护目镜', '未佩戴实验手套', '非法闯入', '未穿着实验服','实验室清洁'],
|
|
|
|
- ['第一季度', 0, 0, 0,0,0,0],
|
|
|
|
- ['第二季度', 0, 0, 0,0,0,0],
|
|
|
|
- ['第三季度', 0, 0, 0,0,0,0],
|
|
|
|
- ['第四季度', 0, 0, 0,0,0,0],
|
|
|
|
-
|
|
|
|
- ]
|
|
|
|
- dataNum= [
|
|
|
|
- { type: 'bar', itemStyle: { normal: { barBorderRadius: 8}} ,"label": {"normal": {"show": true,"position": "top",fontSize: 14,color: '#fff',}},},
|
|
|
|
- { type: 'bar' , itemStyle: { normal: { barBorderRadius: 8}}},
|
|
|
|
- { type: 'bar', itemStyle: { normal: { barBorderRadius: 8}} },
|
|
|
|
- { type: 'bar' , itemStyle: { normal: { barBorderRadius: 8}}},
|
|
|
|
- { type: 'bar', itemStyle: { normal: { barBorderRadius: 8}} },
|
|
|
|
- { type: 'bar' , itemStyle: { normal: { barBorderRadius: 8}}}
|
|
|
|
- ]
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- illegalDetailData=data
|
|
|
|
- illegalDetailData[0].unshift('product')
|
|
|
|
- dataLength=illegalDetailData[0].length-1
|
|
|
|
- for(var i=0;i<dataLength;i++){
|
|
|
|
- dataNum.push({ type: 'bar',barMaxWidth: "20", itemStyle: { normal: { barBorderRadius: 8}},"label": {"normal": {"show": true,"position": "top",fontSize: 14,color: '#fff',}}, },)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- _this.illegalDetailFun(illegalDetailData,dataNum)
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- //查询院系
|
|
|
|
- departmentsList().then((res) =>{
|
|
|
|
- if(res.code==200){
|
|
|
|
- let data=res.data;
|
|
|
|
- _this.subjectOptions=data
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- //查询实验室
|
|
|
|
- getSubjectDict().then((res) =>{
|
|
|
|
- if(res.code==200){
|
|
|
|
- let data=res.data;
|
|
|
|
- _this.labList=data
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- //查询违规原因
|
|
|
|
- getDictViolation().then((res) =>{
|
|
|
|
- if(res.code==200){
|
|
|
|
- let data=res.data;
|
|
|
|
- _this.causeList=data
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- /*查询*/
|
|
|
|
- onSearch() {
|
|
|
|
-
|
|
|
|
- if(this.dateRange.length>0){
|
|
|
|
- this.editForm.beginTimeStr = this.dateRange[0];
|
|
|
|
- this.editForm.endTimeStr = this.dateRange[1];
|
|
|
|
- }
|
|
|
|
- this.getAjaxList();
|
|
|
|
- this.getAjaxData();
|
|
|
|
- },
|
|
|
|
- /*重置*/
|
|
|
|
- resetForm() {
|
|
|
|
-
|
|
|
|
- this.editForm.subId = "";
|
|
|
|
- this.editForm.violationType = "";
|
|
|
|
- this.editForm.beginTimeStr=this.getdate()+'-1'
|
|
|
|
- this.editForm.endTimeStr=this.getdate()+'-'+this.endDay
|
|
|
|
- this.dateRange = [];
|
|
|
|
- this.onSearch();
|
|
|
|
- },
|
|
|
|
- handleCurrentChange(val) {
|
|
|
|
- this.param.pageNum = val;
|
|
|
|
- // this.getAjaxList();
|
|
|
|
- },
|
|
|
|
- getdate() {
|
|
|
|
- var date = new Date();
|
|
|
|
- var year = date.getFullYear();
|
|
|
|
- var month = date.getMonth() + 1;
|
|
|
|
- var strDate = date.getDate();
|
|
|
|
-
|
|
|
|
- if (month >= 1 && month <= 9) {
|
|
|
|
- month = "0" + month;
|
|
|
|
- }
|
|
|
|
- if (strDate >= 0 && strDate <= 9) {
|
|
|
|
- strDate = "0" + strDate;
|
|
|
|
- }
|
|
|
|
- var currentdate = year + "-" + month;
|
|
|
|
- return currentdate;
|
|
|
|
- },
|
|
|
|
/*安全隐患详情图表*/
|
|
/*安全隐患详情图表*/
|
|
illegalDetailFun:function(illegalDetailData,dataNum) {
|
|
illegalDetailFun:function(illegalDetailData,dataNum) {
|
|
let illegalOption = {
|
|
let illegalOption = {
|
|
@@ -383,11 +293,7 @@ export default {
|
|
illegal_chart.setOption(illegalOption);
|
|
illegal_chart.setOption(illegalOption);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- beforeMount(){
|
|
|
|
- let _this=this
|
|
|
|
- _this.editForm.beginTimeStr=_this.getdate()+'-1'
|
|
|
|
- _this.editForm.endTimeStr=_this.getdate()+'-'+_this.endDay
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|