Merge branch 'build' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_webapp into build
This commit is contained in:
@@ -126,13 +126,13 @@
|
||||
title="选择网格员"
|
||||
@onConfirm="onConfirm">
|
||||
<div class="grid-wrapper">
|
||||
<!-- <el-input
|
||||
<el-input
|
||||
style="margin-bottom: 10px;"
|
||||
size="small"
|
||||
placeholder="请输入网格名称/网格员姓名/网格员电话"
|
||||
v-model="name" @change="$refs.tree.filter(name)"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input> -->
|
||||
</el-input>
|
||||
<el-tree
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
|
||||
@@ -9,12 +9,30 @@
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.eventStatus"
|
||||
clearable
|
||||
placeholder="处理状态"
|
||||
:selectList="dict.getDict('clapEventStatus')"
|
||||
@change="search.current = 1, getList()">
|
||||
v-model="search.eventStatus"
|
||||
clearable
|
||||
placeholder="处理状态"
|
||||
:selectList="dict.getDict('clapEventStatus')"
|
||||
@change="search.current = 1, getList()">
|
||||
</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 #right>
|
||||
<el-input
|
||||
@@ -62,12 +80,25 @@ export default {
|
||||
current: 1,
|
||||
size: 10,
|
||||
eventStatus: '',
|
||||
content: ''
|
||||
content: '',
|
||||
eventSource: '',
|
||||
groupId: ''
|
||||
},
|
||||
total: 0,
|
||||
tableData: [],
|
||||
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: 'girdName', label: '所属网格', align: 'center'},
|
||||
{prop: 'createTime', label: '上报时间', align: 'center'},
|
||||
{prop: 'name', label: '上报居民', align: 'center'},
|
||||
{prop: 'name', label: '上报人员', align: 'center'},
|
||||
{prop: 'phone', label: '联系方式', align: 'center'},
|
||||
{prop: 'eventStatus', label: '处理状态', align: 'center', format: v => this.dict.getLabel('clapEventStatus', v)},
|
||||
{prop: 'processTime', label: '处理时长', align: 'center'},
|
||||
@@ -97,10 +128,58 @@ export default {
|
||||
created() {
|
||||
this.dict.load('clapEventStatus', 'residentEventSource').then(() => {
|
||||
this.getList()
|
||||
this.getGridList()
|
||||
this.getTypeList()
|
||||
})
|
||||
},
|
||||
|
||||
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() {
|
||||
this.instance.post(`/app/appresidentreportinfo/list`, null, {
|
||||
params: {
|
||||
@@ -142,8 +221,20 @@ export default {
|
||||
}
|
||||
})
|
||||
}).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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user