事件上报
This commit is contained in:
@@ -9,12 +9,30 @@
|
|||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-select
|
<ai-select
|
||||||
v-model="search.eventStatus"
|
v-model="search.eventStatus"
|
||||||
clearable
|
clearable
|
||||||
placeholder="处理状态"
|
placeholder="处理状态"
|
||||||
:selectList="dict.getDict('clapEventStatus')"
|
:selectList="dict.getDict('clapEventStatus')"
|
||||||
@change="search.current = 1, getList()">
|
@change="search.current = 1, getList()">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.eventSource"
|
||||||
|
clearable
|
||||||
|
placeholder="事件来源"
|
||||||
|
:selectList="dict.getDict('residentEventSource')"
|
||||||
|
@change="search.current = 1, getList()">
|
||||||
|
</ai-select>
|
||||||
|
<ai-select
|
||||||
|
v-model="search.groupId"
|
||||||
|
clearable
|
||||||
|
placeholder="事件类型"
|
||||||
|
:selectList="typeList"
|
||||||
|
@change="search.current = 1, getList()">
|
||||||
|
</ai-select>
|
||||||
|
<el-cascader ref="cascader1" v-model="girdArr" :options="girdOptions" placeholder="所属网格" size="small"
|
||||||
|
:props="defaultProps" :show-all-levels="false" @change="gridChange" clearable></el-cascader>
|
||||||
|
<el-date-picker size="small" v-model="searchDotime" type="daterange" range-separator="至" @change="timeChange"
|
||||||
|
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input
|
<el-input
|
||||||
@@ -62,12 +80,25 @@ export default {
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
eventStatus: '',
|
eventStatus: '',
|
||||||
content: ''
|
content: '',
|
||||||
|
eventSource: '',
|
||||||
|
groupId: ''
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
content: '',
|
content: '',
|
||||||
id: ''
|
id: '',
|
||||||
|
girdId: '',
|
||||||
|
girdArr: [],
|
||||||
|
girdOptions: [],
|
||||||
|
defaultProps: {
|
||||||
|
label: 'girdName',
|
||||||
|
value: 'id',
|
||||||
|
children: 'children',
|
||||||
|
checkStrictly: true,
|
||||||
|
},
|
||||||
|
searchDotime: [],
|
||||||
|
typeList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -81,7 +112,7 @@ export default {
|
|||||||
{prop: 'groupName', label: '事件类型', align: 'center'},
|
{prop: 'groupName', label: '事件类型', align: 'center'},
|
||||||
{prop: 'girdName', label: '所属网格', align: 'center'},
|
{prop: 'girdName', label: '所属网格', align: 'center'},
|
||||||
{prop: 'createTime', label: '上报时间', align: 'center'},
|
{prop: 'createTime', label: '上报时间', align: 'center'},
|
||||||
{prop: 'name', label: '上报居民', align: 'center'},
|
{prop: 'name', label: '上报人员', align: 'center'},
|
||||||
{prop: 'phone', label: '联系方式', align: 'center'},
|
{prop: 'phone', label: '联系方式', align: 'center'},
|
||||||
{prop: 'eventStatus', label: '处理状态', align: 'center', format: v => this.dict.getLabel('clapEventStatus', v)},
|
{prop: 'eventStatus', label: '处理状态', align: 'center', format: v => this.dict.getLabel('clapEventStatus', v)},
|
||||||
{prop: 'processTime', label: '处理时长', align: 'center'},
|
{prop: 'processTime', label: '处理时长', align: 'center'},
|
||||||
@@ -97,10 +128,58 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.dict.load('clapEventStatus', 'residentEventSource').then(() => {
|
this.dict.load('clapEventStatus', 'residentEventSource').then(() => {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getGridList()
|
||||||
|
this.getTypeList()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
timeChange() {
|
||||||
|
if (this.searchDotime) {
|
||||||
|
this.search.doTimeStart = this.searchDotime[0]
|
||||||
|
this.search.doTimeEnd = this.searchDotime[1]
|
||||||
|
} else {
|
||||||
|
this.search.doTimeStart = null
|
||||||
|
this.search.doTimeEnd = null
|
||||||
|
}
|
||||||
|
this.search.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 所有网格
|
||||||
|
getGridList() {
|
||||||
|
this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => {
|
||||||
|
if (res?.code == 0) {
|
||||||
|
this.girdOptions = this.toTree(res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 转树形结构
|
||||||
|
toTree(data) {
|
||||||
|
let result = [];
|
||||||
|
if (!Array.isArray(data)) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
let map = {};
|
||||||
|
data.forEach(item => {
|
||||||
|
map[item.id] = item;
|
||||||
|
});
|
||||||
|
data.forEach(item => {
|
||||||
|
let parent = map[item.parentGirdId];
|
||||||
|
if (parent) {
|
||||||
|
(parent.children || (parent.children = [])).push(item);
|
||||||
|
} else {
|
||||||
|
result.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
gridChange(val) {
|
||||||
|
this.girdArr = val
|
||||||
|
this.girdId = val?.[val.length - 1]
|
||||||
|
this.$refs.cascader1.dropDownVisible = false;
|
||||||
|
this.search.current = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appresidentreportinfo/list`, null, {
|
this.instance.post(`/app/appresidentreportinfo/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
@@ -142,8 +221,20 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(() => 0)
|
}).catch(() => 0)
|
||||||
|
},
|
||||||
|
getTypeList() {
|
||||||
|
this.instance.post(`/app/appresidentreportgroup/list?size=10000`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
res.data.records.map((item) => {
|
||||||
|
item.dictName = item.groupName
|
||||||
|
item.dictValue = item.id
|
||||||
|
})
|
||||||
|
this.typeList = res.data.records
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user