2 changed files with 279 additions and 1 deletions
@ -0,0 +1,278 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<base-page |
||||
|
ref="basePage" |
||||
|
:searchParams="searchParams" |
||||
|
:tableParams="tableParams" |
||||
|
:tableUrl="tableUrl" |
||||
|
:addUrl="addUrl" |
||||
|
:editUrl="editUrl" |
||||
|
:delUrl="delUrl" |
||||
|
:editAuth="editAuth" |
||||
|
:delAuth="delAuth" |
||||
|
:infoUrl="infoUrl" |
||||
|
:exportUrl="exportUrl" |
||||
|
:importUrl="importUrl" |
||||
|
:mubanUrl="mubanUrl" |
||||
|
:editParams="editParams" |
||||
|
:editFixedParams="editFixedParams" |
||||
|
:editElseRules="editElseRules" |
||||
|
:editConfig="editConfig" |
||||
|
:editParamsDiv="5" |
||||
|
:editBtnName="(item) => '修改'" |
||||
|
:formBtnFixed="true" |
||||
|
idName="partyCenterHouseId" |
||||
|
> |
||||
|
<template v-slot:listBtnSup="{ item }"> |
||||
|
<el-button |
||||
|
v-if="item.partyCenterHouseFlag == '1'" |
||||
|
@click="showSet(item)" |
||||
|
type="text" |
||||
|
size="small" |
||||
|
>配置联户群众</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</base-page> |
||||
|
|
||||
|
<el-dialog |
||||
|
:visible.sync="displayedSet" |
||||
|
:close-on-click-modal="false" |
||||
|
:close-on-press-escape="false" |
||||
|
title="配置联户群众" |
||||
|
width="650px" |
||||
|
top="5vh" |
||||
|
class="dialog-h" |
||||
|
@closed="displayedSet = false" |
||||
|
> |
||||
|
<div class="dialog-h-content scroll-h"> |
||||
|
<!-- <span>请先上 传封面图片</span> --> |
||||
|
<el-form |
||||
|
ref="ref_form" |
||||
|
:inline="true" |
||||
|
:model="fmData" |
||||
|
class="div_form" |
||||
|
> |
||||
|
<div> |
||||
|
<el-form-item |
||||
|
label="选择联户群众" |
||||
|
prop="lianHuHouseList" |
||||
|
label-width="150px" |
||||
|
> |
||||
|
<el-cascader |
||||
|
style="width: 350px" |
||||
|
ref="myCascader" |
||||
|
v-model="fmData.lianHuHouseList" |
||||
|
:options="setOptions" |
||||
|
:props="setOptionProps" |
||||
|
:show-all-levels="true" |
||||
|
@change="handleChangeSet" |
||||
|
></el-cascader> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<div class="div_btn"> |
||||
|
<el-button size="small" @click="displayedSet = false" |
||||
|
>取 消</el-button |
||||
|
> |
||||
|
<el-button size="small" type="primary" @click="saveSet" |
||||
|
>确 定</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import basePage from "@/views/modules/cpts/base/index"; |
||||
|
import { getItemByIdInCascader, collapse } from "@/utils/cascader"; |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
import nextTick from "dai-js/tools/nextTick"; |
||||
|
|
||||
|
export default { |
||||
|
props: {}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
searchParams: [ |
||||
|
{ |
||||
|
field: "小区名称", |
||||
|
keyName: "neighborHoodName", |
||||
|
type: "input", |
||||
|
}, |
||||
|
{ field: "楼栋名称", keyName: "buildingName", type: "input" }, |
||||
|
{ |
||||
|
field: "是否党员中心户", |
||||
|
keyName: "partyCenterHouseFlag", |
||||
|
type: "select", |
||||
|
value: "1", |
||||
|
optionUrl: "", |
||||
|
optionList: [ |
||||
|
{ |
||||
|
label: "是", |
||||
|
value: "1", |
||||
|
}, |
||||
|
{ |
||||
|
label: "否", |
||||
|
value: "0", |
||||
|
}, |
||||
|
], |
||||
|
optionType: "group", |
||||
|
}, |
||||
|
], |
||||
|
|
||||
|
tableParams: [ |
||||
|
{ field: "序号", keyName: "", type: "no" }, |
||||
|
{ field: "房屋名称", keyName: "houseName", type: "text" }, |
||||
|
{ |
||||
|
field: "所属小区", |
||||
|
keyName: "neighborHoodName", |
||||
|
type: "text", |
||||
|
}, |
||||
|
{ field: "所属楼栋", keyName: "buildingName", type: "text" }, |
||||
|
{ field: "单元号", keyName: "unitName", type: "text" }, |
||||
|
{ field: "门牌号", keyName: "doorName", type: "text" }, |
||||
|
{ |
||||
|
field: "类型", |
||||
|
keyName: "houseTypeName", |
||||
|
type: "text", |
||||
|
}, |
||||
|
{ field: "用途", keyName: "purposeName", type: "text" }, |
||||
|
{ field: "房屋状态", keyName: "houseStatusName", type: "text" }, |
||||
|
{ field: "房主姓名", keyName: "ownerName", type: "text" }, |
||||
|
{ field: "联系方式", keyName: "showOwnerPhone", type: "text" }, |
||||
|
{ field: "身份证", keyName: "showOwnerIdCard", type: "text" }, |
||||
|
{ field: "备注", keyName: "remark", type: "text" }, |
||||
|
], |
||||
|
|
||||
|
tableUrl: "/gov/org/ichouse/party-center-house-list", |
||||
|
mubanUrl: "", |
||||
|
importUrl: "", |
||||
|
exportUrl: "", |
||||
|
|
||||
|
addUrl: "", |
||||
|
editUrl: "", |
||||
|
infoUrl: "", |
||||
|
delUrl: "", |
||||
|
editAuth(item) { |
||||
|
return false; |
||||
|
}, |
||||
|
delAuth(item) { |
||||
|
return false; |
||||
|
}, |
||||
|
|
||||
|
editParams: [], |
||||
|
editFixedParams: { |
||||
|
type: "article", |
||||
|
}, |
||||
|
editElseRules: {}, |
||||
|
editConfig: {}, |
||||
|
|
||||
|
displayedSet: false, |
||||
|
fmData: { |
||||
|
partyCenterHouseId: "", |
||||
|
lianHuHouseList: [], |
||||
|
}, |
||||
|
|
||||
|
agencyIdArray: [], |
||||
|
setOptions: [], |
||||
|
setOptionProps: { |
||||
|
multiple: true, |
||||
|
value: "id", |
||||
|
label: "name", |
||||
|
children: "children", |
||||
|
checkStrictly: false, |
||||
|
emitPath: false, |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
components: { basePage }, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
|
||||
|
async mounted() {}, |
||||
|
|
||||
|
methods: { |
||||
|
async showSet(item) { |
||||
|
const { partyCenterHouseId, gridId } = item; |
||||
|
this.fmData.partyCenterHouseId = partyCenterHouseId; |
||||
|
this.fmData.gridId = gridId; |
||||
|
|
||||
|
await this.getSetTree(); |
||||
|
await this.getSet(); |
||||
|
|
||||
|
this.displayedSet = true; |
||||
|
}, |
||||
|
|
||||
|
handleChangeSet(e) { |
||||
|
console.log(e); |
||||
|
}, |
||||
|
|
||||
|
async getSetTree() { |
||||
|
const { |
||||
|
fmData: { gridId }, |
||||
|
} = this; |
||||
|
const url = `/gov/org/ichouse/housetree`; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, { gridId }); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.setOptions = data; |
||||
|
} else { |
||||
|
return this.$message.error("网络错误"); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async getSet() { |
||||
|
const { |
||||
|
fmData: { partyCenterHouseId }, |
||||
|
} = this; |
||||
|
const url = `/gov/org/ichouse/queryLianHuHouse/${partyCenterHouseId}`; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, {}); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.fmData.lianHuHouseList = data.map((item) => item.houseId); |
||||
|
} else { |
||||
|
return this.$message.error("网络错误"); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async saveSet() { |
||||
|
const { fmData } = this; |
||||
|
const url = `/gov/org/ichouse/bingLianHu`; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
...fmData, |
||||
|
lianHuHouseList: fmData.lianHuHouseList.map((id) => ({ |
||||
|
id, |
||||
|
type: "house", |
||||
|
})), |
||||
|
}); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.$message.success("保存成功"); |
||||
|
this.displayedSet = false; |
||||
|
} else { |
||||
|
return this.$message.error("网络错误"); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/assets/scss/modules/management/form-main.scss"; |
||||
|
|
||||
|
.avatar-uploader { |
||||
|
margin: 0 0 0 20px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.hide { |
||||
|
.el-upload--picture-card { |
||||
|
display: none !important; |
||||
|
} |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue