|
|
|
@ -7,20 +7,15 @@ |
|
|
|
ref="ref_searchform" |
|
|
|
:label-width="'90px'"> |
|
|
|
<div> |
|
|
|
<el-form-item label="所属网格" |
|
|
|
<el-form-item label="所属组织" |
|
|
|
prop="orgId"> |
|
|
|
<el-select v-model.trim="formData.orgId" |
|
|
|
placeholder="请选择" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
class="item_width_2" |
|
|
|
@change="handleChangeGrid"> |
|
|
|
<el-option v-for="item in optionsG" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-cascader class="customer_cascader" |
|
|
|
ref="myCascader" |
|
|
|
v-model="agencyIdArray" |
|
|
|
:options="orgOptions" |
|
|
|
:props="orgOptionProps" |
|
|
|
:show-all-levels="false" |
|
|
|
@change="handleChangeAgency"></el-cascader> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
@ -127,7 +122,7 @@ |
|
|
|
class="diy-button--reset" |
|
|
|
@click="resetSearch">重置</el-button> |
|
|
|
<el-button style="margin-left:10px" |
|
|
|
class="diy-button--reset" |
|
|
|
class="diy-button--add" |
|
|
|
size="small" |
|
|
|
@click="handleExport">导出</el-button> |
|
|
|
</div> |
|
|
|
@ -226,13 +221,16 @@ export default { |
|
|
|
], |
|
|
|
|
|
|
|
formData: { |
|
|
|
gridId: '', |
|
|
|
agencyId: '', |
|
|
|
orgId: '', |
|
|
|
orgType: '', |
|
|
|
ruleId: '', |
|
|
|
ruleList: {}, |
|
|
|
name: '', |
|
|
|
mobile: '', |
|
|
|
idCard: '', |
|
|
|
remark: '', |
|
|
|
reason: '', |
|
|
|
|
|
|
|
neighborHoodId: '', |
|
|
|
buildingId: '', |
|
|
|
unitId: '', |
|
|
|
@ -243,9 +241,18 @@ export default { |
|
|
|
optionsH: [], |
|
|
|
optionsD: [], |
|
|
|
optionsG: [], |
|
|
|
|
|
|
|
orgOptions: [], |
|
|
|
agencyIdArray: [], |
|
|
|
tableData: [], |
|
|
|
|
|
|
|
orgOptionProps: { |
|
|
|
multiple: false, |
|
|
|
value: 'agencyId', |
|
|
|
label: 'agencyName', |
|
|
|
children: 'subAgencyList', |
|
|
|
checkStrictly: true |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -259,7 +266,7 @@ export default { |
|
|
|
}, |
|
|
|
async mounted () { |
|
|
|
|
|
|
|
this.getGridList() |
|
|
|
this.getOrgTreeList() |
|
|
|
|
|
|
|
await this.loadTable() |
|
|
|
|
|
|
|
@ -274,7 +281,7 @@ export default { |
|
|
|
async loadTable () { |
|
|
|
this.tableLoading = true |
|
|
|
|
|
|
|
const url = "/heart/policy/resiuserlist" |
|
|
|
const url = "/data/aggregator/icuser/listByPolicyRules" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icEpidemicSpecialAttention/list" |
|
|
|
let params = { |
|
|
|
pageSize: this.pageSize, |
|
|
|
@ -296,14 +303,38 @@ export default { |
|
|
|
this.tableLoading = false |
|
|
|
}, |
|
|
|
|
|
|
|
handleChangeGrid (val) { |
|
|
|
console.log('val', val) |
|
|
|
|
|
|
|
handleChangeAgency (val) { |
|
|
|
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|
|
|
if (obj) { |
|
|
|
if (obj.level === 'grid') { |
|
|
|
this.formData.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|
|
|
this.formData.orgType = 'grid' |
|
|
|
this.formData.gridId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|
|
|
this.formData.agencyId = '' |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
this.formData.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|
|
|
this.formData.orgType = 'agency' |
|
|
|
this.formData.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; |
|
|
|
this.formData.gridId = '' |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.formData.orgId = '' |
|
|
|
this.formData.orgType = '' |
|
|
|
this.formData.agencyId = '' |
|
|
|
this.formData.gridId = '' |
|
|
|
} |
|
|
|
|
|
|
|
this.formData.neighborHoodId = '' |
|
|
|
this.formData.buildingId = '' |
|
|
|
this.formData.unitId = '' |
|
|
|
this.formData.houseId = '' |
|
|
|
this.getValiheList() |
|
|
|
}, |
|
|
|
|
|
|
|
handleChangeV (val) { |
|
|
|
console.log('val', val) |
|
|
|
this.formData.buildingId = '' |
|
|
|
@ -324,16 +355,17 @@ export default { |
|
|
|
this.formData.houseId = '' |
|
|
|
this.getHouseList() |
|
|
|
}, |
|
|
|
getGridList () { |
|
|
|
getOrgTreeList () { |
|
|
|
const { user } = this.$store.state |
|
|
|
this.$http |
|
|
|
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) |
|
|
|
.post('/gov/org/customeragency/agencygridtree', {}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} else { |
|
|
|
console.log('获取查询详情成功', res.data) |
|
|
|
this.optionsG = res.data |
|
|
|
console.log('获取组织树成功', res.data) |
|
|
|
this.orgOptions = [] |
|
|
|
this.orgOptions.push(res.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
@ -343,7 +375,7 @@ export default { |
|
|
|
getValiheList () { |
|
|
|
const { user } = this.$store.state |
|
|
|
this.$http |
|
|
|
.post('/gov/org/icneighborhood/neighborhoodoption', { orgId: this.formData.GRID_ID, agencyId: user.agencyId }) |
|
|
|
.post('/gov/org/icneighborhood/neighborhoodoption', { gridId: this.formData.gridId, agencyId: this.formData.agencyId }) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
@ -405,15 +437,16 @@ export default { |
|
|
|
|
|
|
|
//重置搜索条件 |
|
|
|
resetSearch () { |
|
|
|
this.agencyIdArray = [] |
|
|
|
this.formData = { |
|
|
|
|
|
|
|
orgId: '', |
|
|
|
orgType: '', |
|
|
|
ruleId: '', |
|
|
|
ruleList: [], |
|
|
|
ruleList: {}, |
|
|
|
name: '', |
|
|
|
mobile: '', |
|
|
|
idCard: '', |
|
|
|
remark: '', |
|
|
|
reason: '', |
|
|
|
|
|
|
|
neighborHoodId: '', |
|
|
|
buildingId: '', |
|
|
|
unitId: '', |
|
|
|
@ -437,21 +470,41 @@ export default { |
|
|
|
|
|
|
|
//导出表格 |
|
|
|
async handleExport () { |
|
|
|
let title = '核酸检测关注名单' |
|
|
|
|
|
|
|
const url = "/epmetuser/icEpidemicSpecialAttention/vaccination-export" |
|
|
|
this.exportBtn = true |
|
|
|
this.exportBtnTitle = '正在导出...' |
|
|
|
let params = { |
|
|
|
...this.formData |
|
|
|
} |
|
|
|
|
|
|
|
app.ajax.exportFilePost( |
|
|
|
url, |
|
|
|
this.formData, |
|
|
|
(data, rspMsg) => { |
|
|
|
|
|
|
|
this.download(data, title + '.xlsx') |
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg); |
|
|
|
} |
|
|
|
); |
|
|
|
await this.$http({ |
|
|
|
method: 'POST', |
|
|
|
url: '/heart/policy/export-resiuser', |
|
|
|
responseType: 'blob', |
|
|
|
data: params |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
|
|
|
|
console.log('resllll', res) |
|
|
|
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) |
|
|
|
console.log('filename', fileName) |
|
|
|
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) => { |
|
|
|
console.log('获取导出情失败', err) |
|
|
|
this.$message.error('获取导出失败') |
|
|
|
}) |
|
|
|
this.exportBtnTitle = '导出' |
|
|
|
this.exportBtn = false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
@ -520,9 +573,9 @@ export default { |
|
|
|
required: '' |
|
|
|
}, |
|
|
|
ruleList: { |
|
|
|
type: Array, |
|
|
|
type: Object, |
|
|
|
default () { |
|
|
|
return [] |
|
|
|
return {} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|