13 changed files with 4777 additions and 4389 deletions
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,49 @@ |
|||
<template> |
|||
<div class="g-main"> |
|||
<div class="title-small title_postion">基础信息</div> |
|||
<el-row type="flex" class="f-m-top29"> |
|||
<el-col :span="12" class="f-flex"> |
|||
<div class="f-label">所属网格:</div> |
|||
<div class="f-left8 f-font-color">{{ gridName }}</div> |
|||
</el-col> |
|||
<el-col :span="12" class="f-flex"> |
|||
<div class="f-label">所属房屋:</div> |
|||
<div class="f-left8 f-font-color">{{ homeName }}</div> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
export default { |
|||
name: "eventInspces", |
|||
props: { |
|||
resiId: { |
|||
type: String, |
|||
}, |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
async created() { |
|||
this.loadEvent(); |
|||
}, |
|||
mounted() { }, |
|||
methods: { |
|||
//加载事件列表 |
|||
async loadEvent() { |
|||
const url = "/governance/eventInspect/getEventByResiId"; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
resiId: row.resiId |
|||
}); |
|||
if (code === 0) { |
|||
// this.getTableData(); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
</style> |
@ -0,0 +1,530 @@ |
|||
<template> |
|||
<div class="g-main"> |
|||
<div> |
|||
<div class="m-search"> |
|||
<div> |
|||
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'100px'"> |
|||
<el-form-item prop="gridId" label="所属组织"> |
|||
<div class="resi-cell-value"> |
|||
<el-cascader class="customer_cascader" ref="myCascader" clearable v-model="agencyIdArray" |
|||
:options="orgOptions" :props="orgOptionProps" :show-all-levels="false" |
|||
@change="handleChangeAgency"></el-cascader> |
|||
</div> |
|||
</el-form-item> |
|||
<el-form-item prop="villageId" label="所属房屋"> |
|||
<el-select v-model.trim="formData.villageId" placeholder="请选择小区" size="small" clearable |
|||
class="resi-cell-select" @change="handleChangeV"> |
|||
<el-option v-for="item in optionsV" :key="item.value" :label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="buildId"> |
|||
<el-select v-model.trim="formData.buildId" placeholder="楼号" size="small" clearable |
|||
:disabled="changeVDisabled" class="resi-cell-select resi-cell-select-middle" |
|||
@change="handleChangeB"> |
|||
<el-option v-for="item in optionsB" :key="item.value" :label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="unitId"> |
|||
<el-select v-model.trim="formData.unitId" placeholder="单元" size="small" clearable |
|||
:disabled="changeBDisabled" class="resi-cell-select resi-cell-select-middle" |
|||
@change="handleChangeD"> |
|||
<el-option v-for="item in optionsD" :key="item.value" :label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="homeId"> |
|||
<el-select v-model.trim="formData.homeId" placeholder="房号" size="small" clearable |
|||
:disabled="changeDDisabled" class="resi-cell-select resi-cell-select-middle"> |
|||
<el-option v-for="item in optionsH" :key="item.value" :label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<br> |
|||
<el-form-item label="姓名" prop="name"> |
|||
<el-input v-model="formData.name" class="u-item-width-normal" size="small" clearable |
|||
placeholder="请输入联系人姓名" style="width: 200px;"> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="联系电话" prop="mobile"> |
|||
<el-input v-model="formData.mobile" class="u-item-width-normal" size="small" clearable |
|||
placeholder="请输入联系电话" style="width: 200px;"> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="证件号" prop="idCard"> |
|||
<el-input v-model="formData.idCard" class="u-item-width-normal" size="small" clearable |
|||
placeholder="请输入证件号" style="width: 200px;"> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-row> |
|||
<el-col :span="24" align="right"> |
|||
<el-button style="margin-left: 30px" size="small" type="primary" |
|||
@click="handleSearch">查询</el-button> |
|||
<el-button style="margin-left: 10px" size="small" class="diy-button--white" |
|||
@click="resetSearch">重置</el-button> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<div class="m-table"> |
|||
<div class="div_btn"> |
|||
<el-button @click="handleExport" class="diy-button--white" size="small">导出</el-button> |
|||
<el-button @click="handleCancalDiffcult" class="diy-button--red" size="small">批量取消风险</el-button> |
|||
</div> |
|||
<el-table :data="tableData" class="m-table-item" style="width: 100%" |
|||
@selection-change="handleSelectionChange" :height="maxTableHeight"> |
|||
<el-table-column label="" fixed="left" type="selection" align="center" width="50" /> |
|||
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
|||
<el-table-column prop="name" align="center" label="姓名" /> |
|||
<el-table-column prop="mobile" align="center" label="联系电话" /> |
|||
<el-table-column prop="orgName" align="center" label="所属组织" :show-overflow-tooltip="true" /> |
|||
<el-table-column prop="eventInspect" align="center" label="12345投诉" /> |
|||
<el-table-column prop="provinceInspect" label="省满意度调查" align="center" /> |
|||
<el-table-column prop="communitySelfAss" align="center" label="社区自评" /> |
|||
<el-table-column prop="unresolvedDemand" label="未解决需求" align="center" /> |
|||
<el-table-column prop="unresolvedEvent" align="center" label="未解决事件" /> |
|||
<el-table-column prop="notEnjoyedService" align="center" label="应享未享服务" /> |
|||
<el-table-column fixed="right" label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button @click="handleWatch(scope.row)" type="text" size="small">查看</el-button> |
|||
<template v-if="scope.row.riskyFlag === 1"> |
|||
<el-button @click="handleDispose(scope.row)" type="text" size="small" |
|||
class="">取消风险</el-button> |
|||
</template> |
|||
<template v-else> |
|||
<el-button @click="handleDispose(scope.row)" type="text" size="small" |
|||
class="">标记风险</el-button> |
|||
</template> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" :page-sizes="[20, 50, 100, 200]" :page-size="parseInt(pageSize)" |
|||
layout="sizes, prev, pager, next, total" :total="total"> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<el-dialog title="不满意人群详情" :visible.sync="showView" width="986px" top="5vh" append-to-body class="dialog-h" |
|||
:close-on-click-modal="false" :before-close="() => {this.showView = false}"> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<event-info v-if="showView" ref="eventInfo" :fixed="true" :resi-id="resiId" /> |
|||
</div> |
|||
<div class="resi-btns"> |
|||
<el-button size="small" class="diy-button--white" plain @click="showView = false">关闭</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import { mapGetters } from "vuex"; |
|||
import axios from "axios"; |
|||
import eventInfo from "./eventInfo.vue"; |
|||
|
|||
export default { |
|||
components: { |
|||
eventInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
user: {}, |
|||
gridId: "", |
|||
tableData: [], |
|||
formData: { |
|||
agencyId: "", |
|||
orgIdPath: "", |
|||
gridId: "", |
|||
name: "", |
|||
mobile: "", |
|||
idCard: "", |
|||
homeId: "", |
|||
unitId: "", |
|||
buildId: "", |
|||
villageId: "" |
|||
}, |
|||
orgOptions: [], |
|||
orgOptionProps: { |
|||
multiple: false, |
|||
value: 'agencyId', |
|||
label: 'agencyName', |
|||
children: 'subAgencyList', |
|||
checkStrictly: true |
|||
}, |
|||
agencyIdArray: [], |
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
eventId: "", |
|||
resiId: "", |
|||
searchH: 180, |
|||
eventDetailData: {}, |
|||
showVoice: false, |
|||
selVoiceUrl: "", |
|||
multipleSelection: [], |
|||
optionsV: [], |
|||
optionsB: [], |
|||
optionsH: [], |
|||
optionsD: [], |
|||
showView: false, |
|||
}; |
|||
}, |
|||
props: { |
|||
resiId: { |
|||
type: String, |
|||
}, |
|||
}, |
|||
computed: { |
|||
maxTableHeight() { |
|||
const h = this.clientHeight - this.searchH - 275 + this.iframeHeight; |
|||
const _h = this.clientHeight - 275 - this.searchH; |
|||
return this.$store.state.inIframe ? h : _h; |
|||
}, |
|||
...mapGetters(["clientHeight", "iframeHeight"]), |
|||
|
|||
changeVDisabled() { |
|||
return !this.formData.villageId; |
|||
}, |
|||
changeBDisabled() { |
|||
return !this.formData.buildId; |
|||
}, |
|||
changeDDisabled() { |
|||
return !this.formData.unitId; |
|||
}, |
|||
eventInfo, |
|||
}, |
|||
watch: {}, |
|||
mounted() { |
|||
this.user = this.$store.state.user; |
|||
this.agencyId = this.user.agencyId; |
|||
this.loadAgency(); |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
handleEventType(val) { |
|||
const nodes = this.$refs.cascaderEvent.getCheckedNodes(); |
|||
this.formData.firstIdList = []; |
|||
this.formData.secondIdList = []; |
|||
let level1 = nodes.filter((item) => item.level === 1); |
|||
let level2 = nodes.filter((item) => item.level === 2); |
|||
level1.forEach((item) => { |
|||
if (item.hasChildren) { |
|||
for (let i = level2.length - 1; i >= 0; i--) { |
|||
if (level2[i].parent.value === item.value) level2.splice(i, 1); |
|||
} |
|||
} |
|||
}); |
|||
this.formData.firstIdList = level1.map((item) => item.value); |
|||
this.formData.secondIdList = level2.map((item) => item.value); |
|||
}, |
|||
handleSelectionChange(val) { |
|||
this.multipleSelection = []; |
|||
val.forEach((element) => { |
|||
this.multipleSelection.push(element); |
|||
}); |
|||
}, |
|||
async handleCancalDiffcult() { |
|||
const url = "/governance/eventInspect/updateBatchByIds"; |
|||
if (this.multipleSelection.length == 0) { |
|||
this.$message.warning('请选择取消的风险') |
|||
return |
|||
} |
|||
let ids = [] |
|||
if (this.multipleSelection.length > 0) { |
|||
this.multipleSelection.forEach(item => { |
|||
if (item.riskyFlag == 1) { |
|||
ids.push(item.id) |
|||
} |
|||
}) |
|||
} |
|||
const { data, code, msg } = await requestPost(url, ids); |
|||
if (code === 0) { |
|||
this.$message.success("取消风险成功!"); |
|||
this.getTableData(); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
handleSearch(val) { |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
handleChangeAgency(val) { |
|||
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|||
if (obj) { |
|||
if (obj.level === 'grid') { |
|||
this.formData.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|||
this.formData.agencyId = '' |
|||
} else { |
|||
this.formData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|||
this.formData.gridId = '' |
|||
} |
|||
this.formData.orgIdPath = this.agencyIdArray.toString(); |
|||
} else { |
|||
this.formData.agencyId = '' |
|||
this.formData.gridId = '' |
|||
} |
|||
this.formData.villageId = '' |
|||
this.formData.buildId = '' |
|||
this.formData.unitId = '' |
|||
this.formData.homeId = '' |
|||
this.getValiheList() |
|||
}, |
|||
|
|||
//获取组织树 |
|||
async loadAgency() { |
|||
const { user } = this.$store.state |
|||
this.$http.post('/gov/org/customeragency/agencygridtree', {}).then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
this.orgOptions = [] |
|||
this.orgOptions.push(res.data) |
|||
} |
|||
}).catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
|
|||
async handleExport() { |
|||
const url = "/governance/icEvent/export"; |
|||
const { pageSize, pageNo, formData } = this; |
|||
axios({ |
|||
url: window.SITE_CONFIG["apiURL"] + url, |
|||
method: "post", |
|||
data: { |
|||
pageSize, |
|||
pageNo, |
|||
...formData, |
|||
}, |
|||
responseType: "blob", |
|||
}).then((res) => { |
|||
let fileName = window.decodeURI( |
|||
res.headers["content-disposition"].split(";")[1].split("=")[1] |
|||
); |
|||
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" }); |
|||
var url = window.URL.createObjectURL(blob); |
|||
var aLink = document.createElement("a"); |
|||
aLink.style.display = "none"; |
|||
aLink.href = url; |
|||
aLink.setAttribute("download", fileName); |
|||
document.body.appendChild(aLink); |
|||
aLink.click(); |
|||
document.body.removeChild(aLink); //下载完成移除元素 |
|||
window.URL.revokeObjectURL(url); //释放掉blob对象 |
|||
}).catch((err) => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
|
|||
//查看 |
|||
async handleWatch(row) { |
|||
this.showView = true; |
|||
}, |
|||
|
|||
//标记风险 |
|||
async handleDispose(row) { |
|||
const url = "/governance/eventInspect/saveOrUpdate"; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
id: row.id, |
|||
resiId: row.resiId, |
|||
riskyFlag: row.riskyFlag === 0 ? 1 : 0 |
|||
}); |
|||
if (code === 0) { |
|||
this.getTableData(); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
//关闭 |
|||
handleClose() { |
|||
this.getTableData(); |
|||
}, |
|||
//确定 |
|||
handleOk() { |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
}, |
|||
//加载数据列表 |
|||
async getTableData() { |
|||
const url = "/governance/eventInspect/list"; |
|||
const { pageSize, pageNo, formData } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
...formData, |
|||
}); |
|||
if (code === 0) { |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list ? data.list.map((item) => { return item; }) : []; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
//加载小区 |
|||
async getValiheList() { |
|||
const { user } = this.$store.state; |
|||
this.$http |
|||
.post("/actual/base/communityQuarters/listQuartersOptions", { |
|||
gridId: this.formData.gridId, |
|||
agencyId: this.formData.agencyId, |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
this.optionsV = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
//加载楼栋 |
|||
async getBuildList() { |
|||
this.$http |
|||
.post("/actual/base/communityBuilding/buildingoption", { |
|||
quartersId: this.formData.villageId, |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
this.optionsB = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
//加载楼栋的单元 |
|||
async getUniList() { |
|||
this.$http |
|||
.post("/actual/base/communityBuildingUnit/unitoption", { |
|||
buildingId: this.formData.buildId, |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
this.optionsD = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
//获取房屋 |
|||
async getHouseList() { |
|||
this.$http.post("/actual/base/communityHouse/houseoption", { unitId: this.formData.unitId }) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
this.optionsH = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
handleClearVillage() { |
|||
this.formData.buildId = ""; |
|||
this.formData.homeId = ""; |
|||
}, |
|||
handleClearBuild() { |
|||
this.formData.buildId = ""; |
|||
this.formData.unitId = ""; |
|||
this.formData.homeId = ""; |
|||
}, |
|||
handleClearDan() { |
|||
this.formData.unitId = ""; |
|||
this.formData.homeId = ""; |
|||
}, |
|||
handleChangeGrid(val) { |
|||
this.formData.villageId = ""; |
|||
this.formData.buildId = ""; |
|||
this.formData.unitId = ""; |
|||
this.formData.homeId = ""; |
|||
this.getValiheList(); |
|||
}, |
|||
handleChangeV(val) { |
|||
this.formData.buildId = ""; |
|||
this.formData.unitId = ""; |
|||
this.formData.homeId = ""; |
|||
this.getBuildList(); |
|||
}, |
|||
handleChangeB(val) { |
|||
this.formData.unitId = ""; |
|||
this.formData.homeId = ""; |
|||
this.getUniList(); |
|||
}, |
|||
handleChangeD(val) { |
|||
this.formData.homeId = ""; |
|||
this.getHouseList(); |
|||
}, |
|||
handleSizeChange(val) { |
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange(val) { |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
//重置 |
|||
resetSearch() { |
|||
this.formData = { |
|||
gridId: "", |
|||
sourceType: "", |
|||
eventContent: "", |
|||
name: "", |
|||
mobile: "", |
|||
idCard: "", |
|||
firstIdList: [], |
|||
secondIdList: [], |
|||
}; |
|||
this.agencyIdArray = []; |
|||
this.optionsV = []; |
|||
this.optionsB = []; |
|||
this.optionsH = []; |
|||
this.optionsD = []; |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
|
|||
.m-search { |
|||
.u-item-width-normal { |
|||
width: 200px; |
|||
} |
|||
} |
|||
|
|||
::v-deep .el-dropdown__caret-button { |
|||
height: 30px; |
|||
} |
|||
|
|||
::v-deep .el-image-viewer__close { |
|||
top: 129px; |
|||
right: 129px; |
|||
width: 40px; |
|||
height: 40px; |
|||
font-size: 40px; |
|||
color: #fff; |
|||
} |
|||
</style> |
Loading…
Reference in new issue