|
|
|
@ -40,7 +40,7 @@ |
|
|
|
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel" |
|
|
|
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel" |
|
|
|
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" |
|
|
|
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" |
|
|
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
|
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
|
|
@refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" :page.sync="page"> |
|
|
|
@refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" :page.sync="page" @sort-change="sortChange"> |
|
|
|
<template slot-scope="scope" slot="areaSearch"> |
|
|
|
<template slot-scope="scope" slot="areaSearch"> |
|
|
|
<el-select v-model="area"> |
|
|
|
<el-select v-model="area"> |
|
|
|
<el-option label="业务区" value="1"></el-option> |
|
|
|
<el-option label="业务区" value="1"></el-option> |
|
|
|
@ -304,10 +304,17 @@ |
|
|
|
this.routeName = this.$route.name |
|
|
|
this.routeName = this.$route.name |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
sortChange(val){ |
|
|
|
|
|
|
|
if(val.order == 'ascending'){ |
|
|
|
|
|
|
|
this.onLoad('ascs') |
|
|
|
|
|
|
|
}else if(val.order == 'descending'){ |
|
|
|
|
|
|
|
this.onLoad('descs') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
nodeClick(data){ |
|
|
|
nodeClick(data){ |
|
|
|
this.classCode = data.key; |
|
|
|
this.classCode = data.key; |
|
|
|
this.page.currentPage = 1; |
|
|
|
this.page.currentPage = 1; |
|
|
|
this.onLoad(this.page) |
|
|
|
this.onLoad() |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
initData() { |
|
|
|
initData() { |
|
|
|
@ -392,7 +399,7 @@ |
|
|
|
this.$refs.crud.refreshTable(); |
|
|
|
this.$refs.crud.refreshTable(); |
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
// 表格数据重载 |
|
|
|
// 表格数据重载 |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(); |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!" |
|
|
|
message: "操作成功!" |
|
|
|
@ -404,7 +411,7 @@ |
|
|
|
this.query.area = '1'; |
|
|
|
this.query.area = '1'; |
|
|
|
this.startDate = ''; |
|
|
|
this.startDate = ''; |
|
|
|
this.page.currentPage = 1 |
|
|
|
this.page.currentPage = 1 |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
searchChange(params, done) { |
|
|
|
searchChange(params, done) { |
|
|
|
this.query.warnType = params.warnType; |
|
|
|
this.query.warnType = params.warnType; |
|
|
|
@ -446,17 +453,38 @@ |
|
|
|
this.page.pageSize = pageSize; |
|
|
|
this.page.pageSize = pageSize; |
|
|
|
}, |
|
|
|
}, |
|
|
|
refreshChange() { |
|
|
|
refreshChange() { |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
this.onLoad(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad(type) { |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
getAlarmList(this.query.warnType,this.startDate,this.endDate,this.page.currentPage,this.page.pageSize,this.area,this.classCode).then(res => { |
|
|
|
let query = { |
|
|
|
|
|
|
|
warnType:this.query.warnType, |
|
|
|
|
|
|
|
startDate:this.startDate, |
|
|
|
|
|
|
|
endDate:this.endDate, |
|
|
|
|
|
|
|
current:this.page.currentPage, |
|
|
|
|
|
|
|
size:this.page.pageSize, |
|
|
|
|
|
|
|
area:this.area, |
|
|
|
|
|
|
|
classCode:this.classCode, |
|
|
|
|
|
|
|
descs:'warn_date' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(type == 'descs'){ |
|
|
|
|
|
|
|
query = { |
|
|
|
|
|
|
|
...query, |
|
|
|
|
|
|
|
descs:'warn_date' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else if(type == 'ascs'){ |
|
|
|
|
|
|
|
query = { |
|
|
|
|
|
|
|
...query, |
|
|
|
|
|
|
|
ascs:'warn_date' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
console.log('query======================>',query) |
|
|
|
|
|
|
|
getAlarmList(query).then(res => { |
|
|
|
this.data = res.data.data.records; |
|
|
|
this.data = res.data.data.records; |
|
|
|
// this.page.total = res.data.data.total |
|
|
|
// this.page.total = res.data.data.total |
|
|
|
this.page.total = res.data.data.total; |
|
|
|
this.page.total = res.data.data.total; |
|
|
|
console.log(this.page) |
|
|
|
console.log(this.page) |
|
|
|
this.loading = false; |
|
|
|
this.loading = false; |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// this.selectionClear(); |
|
|
|
// this.selectionClear(); |
|
|
|
|