4 changed files with 2183 additions and 0 deletions
@ -0,0 +1,101 @@ |
|||
|
|||
|
|||
|
|||
.div_main { |
|||
width: 100%; |
|||
|
|||
.div_search { |
|||
background: #ffffff; |
|||
border-radius: 4px; |
|||
padding: 20px 20px 5px 5px; |
|||
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1); |
|||
} |
|||
|
|||
.list_item_width_1 { |
|||
width: 165px; |
|||
} |
|||
.list_item_width_2 { |
|||
width: 135px; |
|||
} |
|||
} |
|||
|
|||
.div_table { |
|||
background: #ffffff; |
|||
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1); |
|||
border-radius: 4px; |
|||
margin-top: 15px; |
|||
padding: 10px; |
|||
position: relative; |
|||
|
|||
.div_btn { |
|||
margin-top: 10px; |
|||
margin-left: 10px; |
|||
display: flex; |
|||
|
|||
.btn_upload { |
|||
margin-left: 10px; |
|||
display: flex; |
|||
} |
|||
} |
|||
.table { |
|||
margin-top: 20px; |
|||
} |
|||
|
|||
.div_notice { |
|||
position: absolute; |
|||
left: 15px; |
|||
bottom: 0; |
|||
} |
|||
} |
|||
|
|||
.div-mult-form { |
|||
margin-top: 20px; |
|||
|
|||
.div_person { |
|||
display: flex; |
|||
font-size: 14px; |
|||
padding-bottom: 20px; |
|||
|
|||
.person_title { |
|||
text-align: right; |
|||
flex: 0 0 100px; |
|||
|
|||
line-height: 36px; |
|||
padding: 0 12px 0 0; |
|||
} |
|||
|
|||
.tag_item { |
|||
margin-right: 10px; |
|||
margin-top: 10px; |
|||
} |
|||
.tag_tip { |
|||
margin-top: 10px; |
|||
color: #9c9c9c; |
|||
} |
|||
} |
|||
} |
|||
.div-mult-table { |
|||
position: relative; |
|||
padding: 0 20px; |
|||
|
|||
.div_selcount{ |
|||
position: absolute; |
|||
bottom:10px; |
|||
left:30px; |
|||
} |
|||
} |
|||
|
|||
.div_dialog_table { |
|||
padding: 10px; |
|||
|
|||
.table { |
|||
margin-top: 20px; |
|||
} |
|||
} |
|||
|
|||
.twoline { |
|||
display: -webkit-box; |
|||
-webkit-box-orient: vertical; |
|||
-webkit-line-clamp: 2; |
|||
overflow: hidden; |
|||
} |
@ -0,0 +1,882 @@ |
|||
<template> |
|||
<div> |
|||
<div class="dialog-h-content scroll-h"> |
|||
<el-form |
|||
ref="ref_form" |
|||
:inline="true" |
|||
:model="fmData" |
|||
:rules="dataRule" |
|||
:disabled="formType === 'detail'" |
|||
class="form" |
|||
> |
|||
<el-form-item |
|||
label="所属网格 " |
|||
prop="gridId" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-select |
|||
v-model.trim="fmData.gridId" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select" |
|||
@change="handleChangeGrid" |
|||
:disabled="formType === 'edit'" |
|||
style="width: 250px" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsG" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="所属房屋 " |
|||
prop="homeId" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-select |
|||
v-model.trim="fmData.villageId" |
|||
placeholder="请选择小区" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select" |
|||
@clear="handleClearVillage" |
|||
@change="handleChangeV" |
|||
:disabled="formType === 'edit'" |
|||
style="margin-right: 8px; width: 120px" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsV" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
<el-select |
|||
v-model.trim="fmData.buildId" |
|||
placeholder="楼号" |
|||
size="small" |
|||
clearable |
|||
style="margin-right: 8px; width: 120px" |
|||
class="resi-cell-select" |
|||
:disabled="changeVDisabled || formType === 'edit'" |
|||
@clear="handleClearBuild" |
|||
@change="handleChangeB" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsB" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
<el-select |
|||
v-model.trim="fmData.unitId" |
|||
:disabled="changeBDisabled || formType === 'edit'" |
|||
placeholder="单元" |
|||
size="small" |
|||
clearable |
|||
style="margin-right: 8px; width: 120px" |
|||
class="resi-cell-select" |
|||
@click="handleClearDan" |
|||
@change="handleChangeD" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsD" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
<el-select |
|||
v-model.trim="fmData.homeId" |
|||
:disabled="changeDDisabled || formType === 'edit'" |
|||
placeholder="房号" |
|||
size="small" |
|||
clearable |
|||
@change="handleChangeH" |
|||
style="width: 120px" |
|||
class="resi-cell-select" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsH" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="姓名" |
|||
prop="name" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
show-word-limit |
|||
style="width: 200px; margin-right: 20px" |
|||
placeholder="请输入姓名 " |
|||
:disabled="formType === 'edit'" |
|||
v-model="fmData.name" |
|||
> |
|||
</el-input> |
|||
|
|||
<el-checkbox |
|||
v-model="fmData.isWelfare" |
|||
:disabled="formType === 'edit'" |
|||
true-label="1" |
|||
false-label="0" |
|||
>享受福利</el-checkbox |
|||
> |
|||
<el-checkbox |
|||
v-model="fmData.isCheck" |
|||
true-label="1" |
|||
false-label="0" |
|||
:disabled="formType === 'edit'" |
|||
@change="checkResiAvailable" |
|||
>补充居民信息</el-checkbox |
|||
> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="手机号" |
|||
prop="mobile" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
show-word-limit |
|||
placeholder="请输入手机号 " |
|||
v-model="fmData.mobile" |
|||
:disabled="formType === 'edit'" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="身份证号" |
|||
prop="idCard" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
placeholder="请输入身份证号" |
|||
v-model="fmData.idCard" |
|||
@blur="handleBlurId" |
|||
:disabled="formType === 'edit'" |
|||
></el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="性别" |
|||
prop="principalName" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-select |
|||
v-model.trim="fmData.gender" |
|||
placeholder="性别" |
|||
size="small" |
|||
clearable |
|||
style="width: 120px" |
|||
class="resi-cell-select" |
|||
:disabled="formType === 'edit'" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsGender" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="出生日期" |
|||
prop="birthday" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-date-picker |
|||
v-model="fmData.birthday" |
|||
type="date" |
|||
placeholder="出生日期" |
|||
value-format="yyyy-MM-dd" |
|||
:disabled="formType === 'edit'" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="出生地" |
|||
prop="birthplace" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="50" |
|||
show-word-limit |
|||
placeholder="请输入出生地" |
|||
v-model="fmData.birthplace" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="出生人父亲姓名" |
|||
prop="father" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
show-word-limit |
|||
placeholder="请输入出生人父亲姓名" |
|||
v-model="fmData.father" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="出生人母亲姓名" |
|||
prop="mother" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="30" |
|||
show-word-limit |
|||
placeholder="请输入出生人母亲姓名" |
|||
v-model="fmData.mother" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="胎次" |
|||
prop="count" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input-number |
|||
v-model="fmData.count" |
|||
:min="1" |
|||
:max="50" |
|||
label="请输入胎次" |
|||
></el-input-number> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="申报户口日期" |
|||
prop="reportDate" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-date-picker |
|||
v-model="fmData.reportDate" |
|||
placeholder="申报户口日期" |
|||
value-format="yyyy-MM-dd" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="户主姓名" |
|||
prop="householderName" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
maxlength="50" |
|||
show-word-limit |
|||
placeholder="请输入户主姓名" |
|||
:disabled="fmData.alreadyHaveMaster" |
|||
v-model="fmData.householderName" |
|||
> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
label="与户主关系" |
|||
prop="householderRelation" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-select |
|||
v-model.trim="fmData.householderRelation" |
|||
placeholder="与户主关系" |
|||
size="small" |
|||
clearable |
|||
style="width: 120px" |
|||
class="resi-cell-select" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsRelation" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
|
|||
<el-form-item |
|||
v-if="false" |
|||
label="备注" |
|||
prop="remark" |
|||
label-width="150px" |
|||
style="display: block" |
|||
> |
|||
<el-input |
|||
class="item_width_1" |
|||
type="textarea" |
|||
maxlength="500" |
|||
show-word-limit |
|||
:rows="3" |
|||
placeholder="请输入备注,不超过500字" |
|||
v-model="fmData.remark" |
|||
></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<div class="div_btn resi-btns"> |
|||
<el-button size="small" @click="handleCancle">取 消</el-button> |
|||
<el-button |
|||
v-if="formType != 'detail'" |
|||
type="primary" |
|||
size="small" |
|||
:disabled="btnDisable" |
|||
@click="handleComfirm" |
|||
>确 定</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { Loading } from "element-ui"; // 引入Loading服务 |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import formVltHelper from "dai-js/tools/formVltHelper"; |
|||
import { computedCard } from "@/utils/index"; |
|||
import { isCard } from "@/utils/validate"; |
|||
|
|||
let loading; // 加载动画 |
|||
|
|||
function iniFmData() { |
|||
return { |
|||
id: "", |
|||
gridId: "", |
|||
villageId: "", |
|||
buildId: "", |
|||
unitId: "", |
|||
homeId: "", |
|||
name: "", |
|||
mobile: "", |
|||
idCard: "", |
|||
isWelfare: "0", //福利0否,1是 |
|||
isCheck: "0", |
|||
isReplace: "0", |
|||
gender: "", |
|||
birthplace: "", |
|||
father: "", |
|||
mother: "", |
|||
count: "", |
|||
reportDate: "", |
|||
householderName: "", |
|||
householderRelation: "", |
|||
alreadyHaveMaster: false, |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
formType: "add", //表单操作类型 add新增,edit编辑,detail详情 |
|||
|
|||
btnDisable: false, |
|||
|
|||
optionsV: [], |
|||
optionsB: [], |
|||
optionsH: [], |
|||
optionsD: [], |
|||
optionsG: [], |
|||
optionsRelation: [], |
|||
optionsGender: [ |
|||
{ |
|||
value: "1", |
|||
label: "男", |
|||
}, |
|||
{ |
|||
value: "2", |
|||
label: "女", |
|||
}, |
|||
], |
|||
|
|||
fmData: iniFmData(), |
|||
checkResult: {}, |
|||
}; |
|||
}, |
|||
components: {}, |
|||
computed: { |
|||
dataRule() { |
|||
let checkIdCard = (rule, value, callback) => { |
|||
if (value === "") { |
|||
callback(new Error("请输入身份证")); |
|||
} else { |
|||
if (!isCard(value)) { |
|||
callback(new Error("身份证号格式不正确")); |
|||
} |
|||
callback(); |
|||
} |
|||
}; |
|||
|
|||
return { |
|||
gridId: [ |
|||
{ required: true, message: "所属网格不能为空", trigger: "blur" }, |
|||
], |
|||
homeId: [ |
|||
{ required: true, message: "所属房屋不能为空", trigger: "blur" }, |
|||
], |
|||
name: [{ required: true, message: "姓名不能为空", trigger: "blur" }], |
|||
idCard: [ |
|||
{ required: true, message: "身份证号不能为空", trigger: "blur" }, |
|||
{ required: true, validator: checkIdCard, trigger: "blur" }, |
|||
], |
|||
birthplace: [ |
|||
{ required: true, message: "出生地不能为空", trigger: "blur" }, |
|||
], |
|||
}; |
|||
}, |
|||
|
|||
changeVDisabled() { |
|||
return !this.fmData.villageId; |
|||
}, |
|||
changeBDisabled() { |
|||
return !this.fmData.buildId; |
|||
}, |
|||
changeDDisabled() { |
|||
return !this.fmData.unitId; |
|||
}, |
|||
}, |
|||
props: {}, |
|||
watch: {}, |
|||
|
|||
async mounted() { |
|||
this.getGridList(); |
|||
this.getValiheList(); |
|||
this.getRelationList(); |
|||
}, |
|||
|
|||
methods: { |
|||
async checkResiAvailable() { |
|||
const { |
|||
fmData: { idCard, isCheck }, |
|||
} = this; |
|||
if (isCheck == "1" && isCard(idCard)) { |
|||
const { data, code, msg } = await requestPost( |
|||
"/epmetuser/icresiuser/checkuser", |
|||
{ |
|||
idCard, |
|||
agencyId: this.$store.state.user.agencyId, |
|||
} |
|||
); |
|||
if (code === 0) { |
|||
this.checkResult = data; |
|||
if (!data.moveInstatus) { |
|||
this.$message({ |
|||
type: "error", |
|||
message: `请联系${data.resiAgencyName}迁出该居民后操作`, |
|||
}); |
|||
} |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
} |
|||
}, |
|||
|
|||
handleBlurId() { |
|||
const { sex, birth, age } = computedCard(this.fmData.idCard); |
|||
if (birth) { |
|||
this.fmData.birthday = birth; |
|||
this.fmData.gender = sex == 1 ? "1" : "2"; |
|||
this.checkResiAvailable(); |
|||
} |
|||
}, |
|||
|
|||
handleClearVillage() { |
|||
this.fmData.buildId = ""; |
|||
this.fmData.homeId = ""; |
|||
}, |
|||
handleClearBuild() { |
|||
this.fmData.buildId = ""; |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
}, |
|||
handleClearDan() { |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
}, |
|||
handleChangeGrid(val) { |
|||
console.log("val", val); |
|||
this.fmData.villageId = ""; |
|||
this.fmData.buildId = ""; |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
this.getValiheList(); |
|||
}, |
|||
handleChangeV(val) { |
|||
console.log("val", val); |
|||
this.fmData.buildId = ""; |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
this.getBuildList(); |
|||
}, |
|||
handleChangeB(val) { |
|||
console.log("val", val); |
|||
this.fmData.unitId = ""; |
|||
this.fmData.homeId = ""; |
|||
this.getUniList(); |
|||
}, |
|||
handleChangeD(val) { |
|||
console.log("val", val); |
|||
this.fmData.homeId = ""; |
|||
this.getHouseList(); |
|||
}, |
|||
handleChangeH(val) { |
|||
console.log("val", val); |
|||
this.getHouseMaster(); |
|||
}, |
|||
|
|||
getRelationList() { |
|||
const { user } = this.$store.state; |
|||
this.$http |
|||
.post("/sys/dict/data/relationship", { |
|||
formCode: "resi_base_info", |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
if (res.data) { |
|||
this.optionsRelation = res.data; |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
getGridList() { |
|||
const { user } = this.$store.state; |
|||
this.$http |
|||
.post("/gov/org/customergrid/gridoption", { |
|||
agencyId: user.agencyId, |
|||
purpose: "query", |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsG = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
getValiheList() { |
|||
const { user } = this.$store.state; |
|||
this.$http |
|||
.post("/gov/org/icneighborhood/neighborhoodoption", { |
|||
gridId: this.fmData.gridId, |
|||
agencyId: "", |
|||
// agencyId: user.agencyId |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsV = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
getBuildList() { |
|||
this.$http |
|||
.post("/gov/org/icbuilding/buildingoption", { |
|||
neighborHoodId: this.fmData.villageId, |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsB = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
getUniList() { |
|||
this.$http |
|||
.post("/gov/org/icbuildingunit/unitoption", { |
|||
buildingId: this.fmData.buildId, |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsD = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
getHouseList() { |
|||
this.$http |
|||
.post("/gov/org/ichouse/houseoption", { unitId: this.fmData.unitId }) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取查询详情成功", res.data); |
|||
this.optionsH = res.data; |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
|
|||
getHouseMaster() { |
|||
const { homeId } = this.fmData; |
|||
if (!homeId) return (this.alreadyHaveMaster = false); |
|||
|
|||
this.$http |
|||
.post("/epmetuser/icresiuser/queryhousehold/" + homeId, {}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} else { |
|||
console.log("获取户主信息成功", res.data); |
|||
const { name } = res.data; |
|||
if (name) { |
|||
this.fmData.householderName = name; |
|||
this.alreadyHaveMaster = true; |
|||
} else { |
|||
this.alreadyHaveMaster = false; |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
async initForm(type, row) { |
|||
this.$refs.ref_form.resetFields(); |
|||
|
|||
this.formType = type; |
|||
console.log(row); |
|||
if (row) { |
|||
// this.fmData = { ...this.fmData, ...row }; |
|||
await this.getInfo(row.id); |
|||
this.getValiheList(); |
|||
this.getBuildList(); |
|||
this.getUniList(); |
|||
this.getHouseList(); |
|||
} |
|||
}, |
|||
|
|||
async getInfo(id) { |
|||
const { data, code, msg } = await requestPost( |
|||
"/epmetuser/icBirthRecord/" + id, |
|||
{ |
|||
// id, |
|||
} |
|||
); |
|||
if (code === 0) { |
|||
this.fmData = { ...this.fmData, ...data }; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
async handleComfirm() { |
|||
this.btnDisable = true; |
|||
setTimeout(() => { |
|||
this.btnDisable = false; |
|||
}, 10000); |
|||
this.$refs["ref_form"].validate((valid, messageObj) => { |
|||
if (!valid) { |
|||
app.util.validateRule(messageObj); |
|||
this.btnDisable = false; |
|||
} else { |
|||
if (!formVltHelper.userOrMobile(this.fmData.mobile)) { |
|||
return this.$message({ |
|||
type: "error", |
|||
message: "手机号格式有误", |
|||
}); |
|||
} |
|||
this.submit(); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
async submit() { |
|||
let url = ""; |
|||
if (this.formType === "add") { |
|||
url = "/epmetuser/icBirthRecord/save"; |
|||
} else if (this.formType === "edit") { |
|||
url = "/epmetuser/icBirthRecord/update"; |
|||
} else { |
|||
return; |
|||
} |
|||
|
|||
const { fmData, checkResult } = this; |
|||
if ( |
|||
fmData.isCheck == "1" && |
|||
checkResult.resiHomeId != fmData.homeId && |
|||
checkResult.status == "0" |
|||
) { |
|||
await this.$confirm( |
|||
"居民信息中房屋信息与当前选择房屋不一致,是否更新?", |
|||
"提示", |
|||
{ |
|||
confirmButtonText: "更新", |
|||
cancelButtonText: "不更新", |
|||
type: "warning", |
|||
center: true, |
|||
} |
|||
) |
|||
.then(() => { |
|||
this.fmData.isReplace = "1"; |
|||
}) |
|||
.catch(() => { |
|||
this.fmData.isReplace = "0"; |
|||
}); |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, fmData); |
|||
|
|||
if (code === 0) { |
|||
this.$message({ |
|||
type: "success", |
|||
message: "操作成功", |
|||
}); |
|||
this.resetData(); |
|||
this.$emit("dialogOk"); |
|||
this.btnDisable = false; |
|||
} else { |
|||
this.btnDisable = false; |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
handleCancle() { |
|||
this.resetData(); |
|||
this.$emit("dialogCancle"); |
|||
}, |
|||
resetData() { |
|||
this.checkResult = {}; |
|||
this.optionsB = []; |
|||
this.optionsH = []; |
|||
this.optionsD = []; |
|||
this.fmData = iniFmData(); |
|||
}, |
|||
// 开启加载动画 |
|||
startLoading() { |
|||
loading = Loading.service({ |
|||
lock: true, // 是否锁定 |
|||
text: "正在加载……", // 加载中需要显示的文字 |
|||
background: "rgba(0,0,0,.7)", // 背景颜色 |
|||
}); |
|||
}, |
|||
// 结束加载动画 |
|||
endLoading() { |
|||
// clearTimeout(timer); |
|||
if (loading) { |
|||
loading.close(); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.item_width_1 { |
|||
width: 500px; |
|||
} |
|||
.item_width_2 { |
|||
width: 400px; |
|||
} |
|||
.item_width_3 { |
|||
margin-left: 10px; |
|||
width: 200px; |
|||
} |
|||
.item_width_4 { |
|||
width: 200px; |
|||
} |
|||
|
|||
.div_map { |
|||
margin-top: 10px; |
|||
} |
|||
|
|||
.div_btn { |
|||
// display: flex; |
|||
// justify-content: flex-end; |
|||
} |
|||
.el-tabs { |
|||
margin: 0 20px; |
|||
} |
|||
.el-upload__tip { |
|||
color: rgb(155, 155, 155); |
|||
margin: 0; |
|||
} |
|||
.form { |
|||
margin-top: 30px; |
|||
} |
|||
|
|||
.m-staffs { |
|||
width: 468px; |
|||
.item { |
|||
display: flex; |
|||
justify-content: space-around; |
|||
margin-bottom: 7px; |
|||
} |
|||
.item-add { |
|||
} |
|||
} |
|||
</style> |
|||
|
|||
<style> |
|||
.el-dialog__body { |
|||
padding: 0 10px 20px !important; |
|||
} |
|||
</style> |
@ -0,0 +1,703 @@ |
|||
<template> |
|||
<div class="m-pop"> |
|||
<div class="wrap"> |
|||
<cpt-card> |
|||
<div class="title"> |
|||
<img src="@/assets/img/shuju/title-tip.png" /> |
|||
<span>项目详情</span> |
|||
</div> |
|||
|
|||
<div class="btn-close" @click="handleClose"> |
|||
<img src="@/assets/img/shuju/people/close.png" /> |
|||
</div> |
|||
<div class="m-top"> |
|||
<div class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>项目标题:</span> |
|||
<span>{{ projectInfo.projectTitle }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目背景:</span> |
|||
<span>{{ projectInfo.backGround }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>项目方案:</span> |
|||
<span>{{ projectInfo.publicReply }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>内部备注:</span> |
|||
<span>{{ projectInfo.internalRemark || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>当前处理部门:</span> |
|||
<span>{{ projectInfo.departmentNameList.join("、") }}</span> |
|||
</div> |
|||
<div class="info-prop" v-if="projectCate.length > 0"> |
|||
<span>分类:</span> |
|||
<fold-text :row="3"> |
|||
<div :key="item.name" v-for="item in projectCate"> |
|||
{{ item.name }} |
|||
</div> |
|||
</fold-text> |
|||
</div> |
|||
<div class="info-prop" v-if="projectTag.length > 0"> |
|||
<span>标签:</span> |
|||
<fold-text :row="3"> |
|||
<div :key="item.name" v-for="item in projectTag"> |
|||
{{ item.name }} |
|||
</div> |
|||
</fold-text> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-process" v-if="projectProcess.length > 0"> |
|||
<div class="process-title">处理进展</div> |
|||
<div class="list"> |
|||
<div |
|||
class="item" |
|||
:class="index === 0 ? 'z-on' : ''" |
|||
:key="item.processId" |
|||
v-for="(item, index) in projectProcess" |
|||
> |
|||
<div class="item-row"> |
|||
<div class="name">{{ item.processName }}</div> |
|||
<div class="date"> |
|||
{{ item.processTime }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="detail"> |
|||
<div class="detail-field">处理部门:</div> |
|||
<div class="detail-value">{{ item.departmentName }}</div> |
|||
</div> |
|||
|
|||
<div |
|||
class="detail" |
|||
v-if="item.processName != '转项目' && item.publicReply" |
|||
> |
|||
<div class="detail-field">说 明:</div> |
|||
<div class="detail-value"> |
|||
<fold-text :row="3">{{ item.publicReply }}</fold-text> |
|||
</div> |
|||
</div> |
|||
|
|||
<div |
|||
class="detail" |
|||
v-if="item.processName != '转项目' && item.internalRemark" |
|||
> |
|||
<div class="detail-field">内部备注:</div> |
|||
<div class="detail-value"> |
|||
<fold-text :row="3">{{ item.internalRemark }}</fold-text> |
|||
</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="attachement-list"> |
|||
<a |
|||
:href="att.url" |
|||
target="_blank" |
|||
:key="att.url" |
|||
v-for="att in item.internalFile" |
|||
> |
|||
<i class="el-icon-folder-opened"></i> |
|||
{{ att.name }} |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div v-if="projectInfo.origin !== 'agency'" class="tabs"> |
|||
<div |
|||
class="tab-btn" |
|||
@click="subStartGroupIndex" |
|||
v-if="groupList.length > 9" |
|||
> |
|||
<img src="@/assets/img/shuju/people/arrow-double-left.png" /> |
|||
</div> |
|||
<div |
|||
v-show="index >= startGroupIndex && index < startGroupIndex + 9" |
|||
class="tab" |
|||
:class="groupIndex % groupList.length == index ? 'z-on' : ''" |
|||
:key="'tab' + index" |
|||
@click="groupIndex = index" |
|||
v-for="(item, index) in groupList" |
|||
> |
|||
{{ item.label }} |
|||
</div> |
|||
<div |
|||
class="tab-btn" |
|||
@click="addStartGroupIndex" |
|||
v-if="groupList.length > 9" |
|||
> |
|||
<img src="@/assets/img/shuju/people/arrow-double-right.png" /> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="m-case" v-if="projectInfo.origin !== 'agency'"> |
|||
<div class="m-yanpan" v-if="groupIndex == 0"> |
|||
<div v-if="projectId || true"> |
|||
<screen-loading v-if="!yanPan.loading">加载中</screen-loading> |
|||
<analyse |
|||
v-else-if="yanPan.singleTitle" |
|||
:singleTitle="yanPan.singleTitle" |
|||
:moreTitle="yanPan.moreTitle" |
|||
:userList="yanPan.homeUserList" |
|||
:userName="yanPan.icUserName" |
|||
:singleList="yanPan.singleList" |
|||
:hasEvent="yanPan.hasEvent" |
|||
:moreList="yanPan.moreList" |
|||
@user="toUserInfo" |
|||
@project="toProjectInfo" |
|||
/> |
|||
<div v-else class="m-hint"> |
|||
<img |
|||
src="@/assets/img/modules/visual/noData.png" |
|||
class="no-data-img" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div v-if="groupIndex == 1"> |
|||
<div |
|||
class="m-row" |
|||
v-if="projectInfo.originId && projectInfo.origin !== 'work_event'" |
|||
> |
|||
<div v-if="projectInfo.origin === 'issue'" class="m-info"> |
|||
<div class="info-prop"> |
|||
<span>议题标题:</span> |
|||
<span>{{ issueInfo.issueTitle }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>议题建议:</span> |
|||
<span>{{ issueInfo.issueSuggestion }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>所属网格:</span> |
|||
<span>{{ issueInfo.belongsGridName || "--" }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>议题发起人:</span> |
|||
<span>{{ issueInfo.issueInitiator }}</span> |
|||
</div> |
|||
<div |
|||
v-if="issueInfo.topicInfo && issueInfo.topicInfo.groupName" |
|||
class="info-prop" |
|||
> |
|||
<span>议题来源:</span> |
|||
<span>{{ issueInfo.topicInfo.groupName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span>转议题时间:</span> |
|||
<span>{{ issueInfo.shiftIssueTime }}</span> |
|||
</div> |
|||
</div> |
|||
<div v-if="projectInfo.origin === 'resi_event'" class="m-info"> |
|||
<div class="info-title">事件内容</div> |
|||
<div class="info-content">{{ info.eventContent }}</div> |
|||
<div class="info-pics"> |
|||
<img |
|||
:src="src" |
|||
:key="src" |
|||
v-for="src in info.eventImgs" |
|||
@click="watchImg(src)" |
|||
/> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提交时间:</span> |
|||
<span>{{ info.eventTime }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">报事人:</span> |
|||
<span>{{ info.eventPeopleName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">所属网格:</span> |
|||
<span>{{ info.gridName }}</span> |
|||
</div> |
|||
<div class="info-prop"> |
|||
<span class="info-title-2">提报给:</span> |
|||
<div> |
|||
<div>{{ info.eventPersonShow }}</div> |
|||
<div>{{ info.eventOrgShow }}</div> |
|||
</div> |
|||
|
|||
<!-- <span>{{ info.eventPerson.join("、") || "--" }}</span> --> |
|||
</div> |
|||
</div> |
|||
|
|||
<div v-if="projectInfo.origin === 'issue'" class="m-line"> |
|||
<div class="stat"> |
|||
<div class="stat-item"> |
|||
<div> |
|||
{{ issueTrend.realityVoteCount }}/{{ |
|||
issueTrend.shouldVoteCount |
|||
}} |
|||
</div> |
|||
<div class="z-weak">已表决/应表决</div> |
|||
</div> |
|||
<div class="stat-item"> |
|||
<div>{{ issueTrend.supportAmount }}</div> |
|||
<div class="z-weak">支持</div> |
|||
</div> |
|||
<div class="stat-item"> |
|||
<div>{{ issueTrend.oppositionAmount }}</div> |
|||
<div class="z-weak">反对</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<line-chart |
|||
v-if="issueChartData.length > 0" |
|||
:list="issueChartData" |
|||
/> |
|||
</div> |
|||
</div> |
|||
<div v-else class="m-hint"> |
|||
<img |
|||
src="@/assets/img/modules/visual/noData.png" |
|||
class="no-data-img" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</cpt-card> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import cptCard from "@/views/modules/visual/cpts/card"; |
|||
import screenLoading from "@/views/modules/visual/cpts/loading"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import cptTb from "@/views/modules/visual/cpts/tb"; |
|||
import lineChart from "@/views/modules/visual/cpts/line-chart"; |
|||
import analyse from "@/views/modules/visual/cpts/analyse"; |
|||
import foldText from "@/views/components/foldText"; |
|||
import dateFormat from "dai-js/tools/dateFormat"; |
|||
|
|||
function iniData() { |
|||
return { |
|||
projectIdCopy: this.projectId, |
|||
groupList: [{ label: "研判分析" }, { label: "项目来源" }], |
|||
groupIndex: 0, |
|||
startGroupIndex: 0, |
|||
|
|||
projectProcess: [], |
|||
|
|||
projectInfo: { |
|||
backGround: "", |
|||
departmentList: [ |
|||
// { departmentName: "南宁社区-南宁第二网格", staffList: ["周相成"] }, |
|||
], |
|||
departmentNameList: [], |
|||
internalRemark: "", |
|||
isSend: false, |
|||
locateAddress: "", |
|||
locateDimension: "", |
|||
locateLongitude: "", |
|||
origin: "", |
|||
originId: "", |
|||
platformIds: [], |
|||
processable: false, |
|||
projectId: "", |
|||
projectStatus: "pending", |
|||
projectTitle: "", |
|||
publicReply: "", |
|||
returnable: false, |
|||
}, |
|||
|
|||
issueInfo: { |
|||
attitude: "", |
|||
belongsGridName: "", |
|||
issueIdea: "", |
|||
issueInitiator: "", |
|||
issueStatus: "", |
|||
issueSuggestion: "", |
|||
issueTitle: "", |
|||
joinVote: true, |
|||
projectId: "", |
|||
projectStatus: false, |
|||
publishIdeaFlag: false, |
|||
}, |
|||
|
|||
issueTrend: {}, |
|||
issueChartData: [], |
|||
|
|||
eventInfo: { |
|||
eventTime: "", |
|||
eventContent: "", |
|||
eventAddress: "", |
|||
gridName: "", |
|||
isClosed: true, |
|||
isResolve: true, |
|||
isRollback: true, |
|||
eventImgs: [], |
|||
eventPerson: [], |
|||
eventOrg: [], |
|||
eventPeopleName: "", |
|||
projectInfo: { |
|||
projectId: "", |
|||
operationName: "", |
|||
operationTime: "", |
|||
projectDeclare: "", |
|||
}, |
|||
}, |
|||
|
|||
projectCate: [], |
|||
projectTag: [], |
|||
|
|||
yanPan: { |
|||
loading: false, |
|||
|
|||
icResiUserId: "", |
|||
houseId: "", |
|||
icUserName: "", |
|||
|
|||
homeUserList: [ |
|||
// { |
|||
// homeId: '', |
|||
// icUserId: '', |
|||
// icUserName: '', |
|||
// } |
|||
], |
|||
projectData: [ |
|||
// { |
|||
// firstCategoryCode: '', |
|||
// firstCategoryName: '', |
|||
// projectList: [], |
|||
// } |
|||
], |
|||
hasEvent: false, |
|||
singleTitle: "", |
|||
moreTitle: "", |
|||
singleList: [], //楼院小组 |
|||
moreList: [], // |
|||
}, |
|||
}; |
|||
} |
|||
|
|||
export default { |
|||
name: "demandInfo", |
|||
props: { |
|||
projectId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
userId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
categoryCodes: { |
|||
type: Array, |
|||
default: [], |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
cptCard, |
|||
cptTb, |
|||
analyse, |
|||
screenLoading, |
|||
lineChart, |
|||
foldText, |
|||
}, |
|||
|
|||
data: iniData, |
|||
|
|||
computed: {}, |
|||
|
|||
watch: { |
|||
projectId() { |
|||
let data = iniData(); |
|||
Object.keys(data).forEach((k) => { |
|||
this[k] = data[k]; |
|||
}); |
|||
this.getApiData(); |
|||
}, |
|||
// projectIdCopy () { |
|||
|
|||
// }, |
|||
}, |
|||
|
|||
mounted() { |
|||
console.log(this.projectIdCopy); |
|||
this.getApiData(); |
|||
}, |
|||
|
|||
methods: { |
|||
watchImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
addStartGroupIndex() { |
|||
const { startGroupIndex, groupList } = this; |
|||
if (startGroupIndex < groupList.length - 9) { |
|||
this.startGroupIndex = startGroupIndex + 1; |
|||
} else { |
|||
this.startGroupIndex = groupList.length - 9; |
|||
} |
|||
}, |
|||
subStartGroupIndex() { |
|||
const { startGroupIndex, groupList } = this; |
|||
if (startGroupIndex > 0) { |
|||
this.startGroupIndex = startGroupIndex - 1; |
|||
} else { |
|||
this.startGroupIndex = 0; |
|||
} |
|||
}, |
|||
handleClose() { |
|||
this.$emit("close"); |
|||
}, |
|||
|
|||
async getApiData() { |
|||
await this.getProjectInfo(); |
|||
this.getProjectCate(); |
|||
this.getProjectProcess(); |
|||
if (this.projectInfo.origin === "issue") { |
|||
this.getIssueInfo(); |
|||
this.getIssueTrend(); |
|||
} else if (this.projectInfo.origin === "resi_event") { |
|||
this.getEventInfo(); |
|||
} |
|||
if (this.projectInfo.origin !== "agency") { |
|||
await this.getYanPan(); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getProjectInfo() { |
|||
const url = "/gov/project/trace/projectdetail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectInfo = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getIssueInfo() { |
|||
const url = "/resi/hall/issue/detail"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.issueInfo = data; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getIssueTrend() { |
|||
const url = "/resi/hall/issue/votingtrend"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
issueId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.issueTrend = data; |
|||
let chartData = []; |
|||
data.polyLine.forEach((item) => { |
|||
let date = dateFormat(new Date(item.voteDate * 1000), "yyyy-MM-dd"); |
|||
// console.log("date:" + date); |
|||
chartData.push( |
|||
{ |
|||
date, |
|||
value: item.supportIncrement, |
|||
type: "支持", |
|||
}, |
|||
{ |
|||
date, |
|||
value: item.oppositionIncrement, |
|||
type: "反对", |
|||
} |
|||
); |
|||
}); |
|||
this.issueChartData = chartData; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getEventInfo() { |
|||
const url = "/gov/project/resievent/eventdetail-icdata"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
resiEventId: this.projectInfo.originId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
if (data.eventOrg && data.eventOrg.length > 0) { |
|||
data.eventOrgShow = data.eventOrg.join("、"); |
|||
} |
|||
if (data.eventPerson && data.eventPerson.length > 0) { |
|||
data.eventPersonShow = data.eventPerson.join("、"); |
|||
} |
|||
this.info = { ...data }; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getProjectProcess() { |
|||
const url = "/gov/project/trace/processlist-v2"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectProcess = data.map((item) => { |
|||
item.processTime = dateFormat( |
|||
new Date(item.processTime * 1000), |
|||
"yyyy-MM-dd hh:mm" |
|||
); |
|||
return item; |
|||
}); |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
async getProjectCate() { |
|||
const url = "/gov/project/projectcategory/categorytaglist"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.projectCate = data.categoryList; |
|||
this.projectTag = data.tagList; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
async getYanPan() { |
|||
const url = "/data/aggregator/project/projectanalysis"; |
|||
|
|||
if (!this.userId) return (this.yanPan.loading = true); |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
categoryCodeList: this.categoryCodes, |
|||
userId: this.userId, |
|||
projectId: this.projectIdCopy, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
data.icResiUserId = data.icUserId; |
|||
data.homeUserList.forEach((item) => { |
|||
item.icResiUserId = item.icUserId; |
|||
}); |
|||
|
|||
let array1 = []; |
|||
let array2 = []; |
|||
|
|||
//楼院小组、居民上报都存在是,研判分析显示两个分支 |
|||
if ( |
|||
data.groupProjectList && |
|||
data.groupProjectList.length > 0 && |
|||
data.eventProjectList && |
|||
data.eventProjectList.length > 0 |
|||
) { |
|||
this.yanPan.hasEvent = true; |
|||
this.yanPan.singleTitle = "楼院小组"; |
|||
this.yanPan.moreTitle = "事件上报"; |
|||
array1 = [...data.groupProjectList]; |
|||
array2 = [...data.eventProjectList]; |
|||
} else { |
|||
this.yanPan.hasEvent = false; |
|||
if (data.groupProjectList && data.groupProjectList.length > 0) { |
|||
array1 = [...data.groupProjectList]; |
|||
this.yanPan.singleTitle = "楼院小组"; |
|||
} else if ( |
|||
data.eventProjectList && |
|||
data.eventProjectList.length > 0 |
|||
) { |
|||
array1 = [...data.eventProjectList]; |
|||
this.yanPan.singleTitle = "事件上报"; |
|||
} else { |
|||
array1 = []; |
|||
} |
|||
} |
|||
|
|||
if (array1.length > 0) { |
|||
data.singleList = array1.map((item) => { |
|||
return { |
|||
categoryCode: item.categoryCode, |
|||
categoryName: item.categoryName, |
|||
showItem: true, |
|||
projectList: item.projectList.map((subItem) => { |
|||
return { |
|||
title: subItem.title, |
|||
status: subItem.status, |
|||
statusName: subItem.status == "pending" ? "待处理" : "结案", |
|||
projectId: subItem.projectId, |
|||
}; |
|||
}), |
|||
}; |
|||
}); |
|||
} |
|||
if (array2.length > 0) { |
|||
data.moreList = array2.map((item) => { |
|||
return { |
|||
categoryCode: item.categoryCode, |
|||
categoryName: item.categoryName, |
|||
showItem: true, |
|||
projectList: item.projectList.map((subItem) => { |
|||
return { |
|||
title: subItem.title, |
|||
status: subItem.status, |
|||
statusName: subItem.status == "pending" ? "待处理" : "结案", |
|||
projectId: subItem.projectId, |
|||
}; |
|||
}), |
|||
}; |
|||
}); |
|||
} |
|||
|
|||
this.yanPan = { ...this.yanPan, ...data }; |
|||
console.log(this.yanPan); |
|||
this.yanPan.loading = true; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
|
|||
toUserInfo(item) { |
|||
this.$router.push({ |
|||
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`, |
|||
}); |
|||
}, |
|||
|
|||
toProjectInfo(item) { |
|||
console.log(item); |
|||
this.projectIdCopy = item.projectId; |
|||
// let data = iniData(); |
|||
// Object.keys(data).forEach((k) => { |
|||
// this[k] = data[k]; |
|||
// }); |
|||
this.getApiData(); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/visual/incident-info.scss" |
|||
scoped |
|||
></style> |
@ -0,0 +1,497 @@ |
|||
<template> |
|||
<div class="div_main"> |
|||
<div class="div_search"> |
|||
<el-form :inline="true" |
|||
:model="formData" |
|||
ref="ref_searchform" |
|||
:label-width="'80px'"> |
|||
<div> |
|||
|
|||
<el-form-item label="所属网格" |
|||
prop="gridId"> |
|||
<el-select class="item_width_1" |
|||
v-model="gridId" |
|||
placeholder="全部" |
|||
size="small" |
|||
clearable> |
|||
<el-option v-for="item in gridList" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
|
|||
</el-form-item> |
|||
<el-form-item label="上报渠道" |
|||
prop="qudao"> |
|||
<el-select v-model.trim="qudao" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable |
|||
class="item_width_1"> |
|||
<el-option v-for="item in qudaoArray" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="事件内容" |
|||
prop="titleTemp"> |
|||
<el-input v-model="content" |
|||
class="resi-cell-input" |
|||
size="small" |
|||
clearable |
|||
placeholder="请输入"> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
</div> |
|||
|
|||
<div> |
|||
<el-form-item label="变更时间" |
|||
prop="startDate"> |
|||
<el-date-picker v-model="timeRange" |
|||
size="small" |
|||
type="daterange" |
|||
value-format="yyyy-MM-dd" |
|||
@change="handleTimeChange" |
|||
range-separator="至" |
|||
start-placeholder="开始时间" |
|||
end-placeholder="结束时间"> |
|||
</el-date-picker> |
|||
|
|||
</el-form-item> |
|||
<el-button style="margin-left:30px" |
|||
size="small" |
|||
class="diy-button--search" |
|||
@click="handleSearch">查询</el-button> |
|||
<el-button style="margin-left:10px" |
|||
size="small" |
|||
class="diy-button--reset" |
|||
@click="resetSearch">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
|
|||
<div class="div_table"> |
|||
|
|||
<div class="resi-row-btn"> |
|||
<el-button v-if="false" |
|||
class="diy-button--add" |
|||
size="small" |
|||
@click="handleAdd">新增</el-button> |
|||
|
|||
<el-button @click="handleExport" |
|||
class="diy-button--reset" |
|||
size="small">导出</el-button> |
|||
</div> |
|||
|
|||
<el-table :data="tableData" |
|||
border |
|||
class="table" |
|||
style="width: 100%" |
|||
:height="maxTableHeight"> |
|||
<el-table-column label="序号" |
|||
fixed="left" |
|||
type="index" |
|||
align="center" |
|||
width="50" /> |
|||
|
|||
<el-table-column prop="name" |
|||
fixed="left" |
|||
label="姓名" |
|||
align="center"> |
|||
<template slot-scope="scope"> |
|||
<a class="name-a" |
|||
@click="handleWatch(scope.$index)"> |
|||
{{ scope.row.name }} |
|||
</a> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="gridName" |
|||
align="center" |
|||
label="所属网格" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="home" |
|||
label="所属房屋" |
|||
align="center" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="mobile" |
|||
width="100" |
|||
align="center" |
|||
label="手机号" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="idCard" |
|||
align="center" |
|||
label="身份证号" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="gender" |
|||
align="center" |
|||
label="性别"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="birthday" |
|||
align="center" |
|||
label="出生日期" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="birthplace" |
|||
align="center" |
|||
label="出生地" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="parentName" |
|||
align="center" |
|||
label="出生人父/母姓名" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="count" |
|||
align="center" |
|||
label="胎次"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="reportDate" |
|||
align="center" |
|||
label="申报户口日期" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="householderName" |
|||
align="center" |
|||
label="户主姓名" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column prop="householderRelation" |
|||
align="center" |
|||
label="与户主关系" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
|
|||
<el-table-column fixed="right" |
|||
label="操作" |
|||
align="center" |
|||
width="160"> |
|||
<template slot-scope="scope"> |
|||
<el-button @click="handleWatch(scope.$index)" |
|||
type="text" |
|||
size="small">查看</el-button> |
|||
|
|||
<el-button @click="handleEdit(scope.$index)" |
|||
type="text" |
|||
size="small" |
|||
class="div-table-button--edit">处理</el-button> |
|||
|
|||
<el-popconfirm v-if="false" |
|||
title="删除之后无法回复,确认删除?" |
|||
@onConfirm="handleDel(scope.row, scope.$index)" |
|||
@confirm="handleDel(scope.row, scope.$index)"> |
|||
<el-button slot="reference" |
|||
type="text" |
|||
size="small" |
|||
class="div-table-button--delete" |
|||
style="margin-left: 10px">删除</el-button> |
|||
</el-popconfirm> |
|||
</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 class="g-page" |
|||
v-if="pageType == 'edit' || pageType == 'info'"> |
|||
<project-info ref="eleEditForm" |
|||
:type="pageType" |
|||
:projectId="currentProject.projectId" |
|||
@dialogCancle="handleClose" |
|||
@dialogOk="handleEditSuccess" /> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
import { mapGetters } from "vuex"; |
|||
import projectInfo from "./cpts/project-info"; |
|||
import axios from "axios"; |
|||
|
|||
export default { |
|||
components: { projectInfo }, |
|||
|
|||
data () { |
|||
return { |
|||
pageType: "list", // 列表list 处理dispose 详情info 议题详情issue-info |
|||
|
|||
pageNo: 1, |
|||
pageSize: window.localStorage.getItem("pageSize") || 20, |
|||
total: 1, |
|||
|
|||
agencyId: '', |
|||
gridList: [],//所属网格list--场所区域 |
|||
|
|||
tableData: [], |
|||
|
|||
statusArray: [ |
|||
{ |
|||
value: "1", |
|||
label: "处理中", |
|||
}, |
|||
{ |
|||
value: "0", |
|||
label: "已完成", |
|||
}, |
|||
], |
|||
qudaoArray: [ |
|||
{ |
|||
value: "0", |
|||
label: "随手拍/随时讲", |
|||
}, |
|||
{ |
|||
value: "1", |
|||
label: "多媒体反应", |
|||
}, |
|||
{ |
|||
value: "2", |
|||
label: "社区电话", |
|||
}, |
|||
{ |
|||
value: "3", |
|||
label: "12345", |
|||
}, |
|||
{ |
|||
value: "4", |
|||
label: "网络员手持终端", |
|||
}, |
|||
], |
|||
|
|||
gridId: '', |
|||
qudao: '', |
|||
content: '', |
|||
fmData: { |
|||
title: "", |
|||
status: "", |
|||
birthdayStart: "", |
|||
birthdayEnd: "", |
|||
birthdayTime: ["", ""], |
|||
}, |
|||
|
|||
currentProject: { |
|||
projectId: "", |
|||
userId: "", |
|||
categoryCodes: [], |
|||
}, |
|||
}; |
|||
}, |
|||
computed: { |
|||
maxTableHeight () { |
|||
return this.$store.state.inIframe |
|||
? this.clientHeight - 360 + this.iframeHeigh |
|||
: this.clientHeight - 360; |
|||
}, |
|||
...mapGetters(["clientHeight", "iframeHeight"]), |
|||
}, |
|||
watch: { |
|||
"fmData.birthdayTime": function (val) { |
|||
if (Array.isArray(val) && val.length == 2) { |
|||
this.fmData.birthdayStart = val[0]; |
|||
this.fmData.birthdayEnd = val[1]; |
|||
} else { |
|||
this.fmData.birthdayStart = ""; |
|||
this.fmData.birthdayEnd = ""; |
|||
} |
|||
}, |
|||
}, |
|||
mounted () { |
|||
const { user } = this.$store.state |
|||
this.agencyId = user.agencyId |
|||
this.loadGrid(); |
|||
this.getTableData(); |
|||
}, |
|||
methods: { |
|||
|
|||
handleSearch (val) { |
|||
console.log(this.fmData); |
|||
this.pageNo = 1; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
async loadGrid () { |
|||
const url = "/gov/org/customergrid/gridoption" |
|||
|
|||
let params = { |
|||
agencyId: this.agencyId |
|||
} |
|||
|
|||
const { data, code, msg } = await requestPost(url, params) |
|||
|
|||
if (code === 0) { |
|||
this.gridList = data |
|||
|
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
|
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
handleSizeChange (val) { |
|||
console.log(`每页 ${val} 条`); |
|||
this.pageSize = val; |
|||
window.localStorage.setItem("pageSize", val); |
|||
this.getTableData(); |
|||
}, |
|||
handleCurrentChange (val) { |
|||
console.log(`当前页: ${val}`); |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
|
|||
resetForm (formName) { |
|||
this.$refs[formName].resetFields(); |
|||
this.handleSearch(); |
|||
}, |
|||
|
|||
async handleExport () { |
|||
const url = "/epmetuser/icBirthRecord/export"; |
|||
const { pageSize, pageNo, fmData } = this; |
|||
axios({ |
|||
url: window.SITE_CONFIG["apiURL"] + url, |
|||
method: "post", |
|||
data: { |
|||
pageSize, |
|||
pageNo, |
|||
...fmData, |
|||
}, |
|||
responseType: "blob", |
|||
}) |
|||
.then((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); |
|||
return this.$message.error("网络错误"); |
|||
}); |
|||
}, |
|||
|
|||
async handleAdd () { }, |
|||
async handleWatch (rowIndex) { |
|||
let item = this.tableData[rowIndex]; |
|||
this.currentProject = { |
|||
projectId: item.projectId, |
|||
}; |
|||
this.pageType = "info"; |
|||
}, |
|||
|
|||
async handleEdit (rowIndex) { |
|||
let item = this.tableData[rowIndex]; |
|||
this.currentProject = { |
|||
projectId: item.projectId, |
|||
}; |
|||
this.pageType = "edit"; |
|||
}, |
|||
|
|||
handleClose () { |
|||
this.pageType = "list"; |
|||
this.currentProject = { |
|||
projectId: "", |
|||
}; |
|||
}, |
|||
|
|||
handleEditSuccess () { |
|||
this.handleClose(); |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
async handleDel (rowData, rowIndex) { |
|||
console.log(rowData, rowIndex); |
|||
const url = |
|||
"/heart/iccommunityselforganization/delcommunityselforganization"; |
|||
const { tableData } = this; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
orgId: tableData[rowIndex].orgId, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.$message.success("删除成功!"); |
|||
this.getTableData(); |
|||
} else { |
|||
this.$message.success("操作失败!"); |
|||
} |
|||
}, |
|||
|
|||
async getTableData () { |
|||
const url = "/epmetuser/icBirthRecord/page"; |
|||
const { pageSize, pageNo, fmData } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
...fmData, |
|||
}); |
|||
if (code === 0) { |
|||
console.log("列表请求成功!!!!!!!!!!!!!!"); |
|||
this.total = data.total || 0; |
|||
this.tableData = data.list |
|||
? data.list.map((item) => { |
|||
return item; |
|||
}) |
|||
: []; |
|||
} else { |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/buttonstyle.scss"; |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
|
|||
.item_width_1 { |
|||
width: 260px; |
|||
} |
|||
</style> |
Loading…
Reference in new issue