Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
"bin-code-editor": "^0.9.0",
|
||||
"dayjs": "^1.8.35",
|
||||
"dvcp-dv": "^1.0.0",
|
||||
"dvcp-dv-ui": "file:project/dvui",
|
||||
"dvcp-dv-ui": "^2.0.1",
|
||||
"dvcp-ui": "^1.42.2",
|
||||
"echarts": "^5.1.2",
|
||||
"mp4box": "^0.4.1",
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.dict.load("sex", "fpNation", "fpPrtpStatus", "fpHealth", "fpStudentsInSchool", 'fpYesOrNo', "fpRelationship",
|
||||
"yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook",
|
||||
"yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook","fpType", "fpRiskType",
|
||||
"fpPublicWelfarePostAssistance","fpHealthAssistance","fpFnancialAssistance","fpEmploymentAssistance","fpEducationalAssistance","fpIndustrialAssistance","fpSocialAssistance")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<section class="hrLog">
|
||||
<ai-card title="走访日志">
|
||||
<template #right>
|
||||
<!-- <ai-select placeholder="档案状态" v-model="search.status" :selectList="dict.getDict('fpPrtpStatus')" @change="page.current=1,getTableData()"/> -->
|
||||
<el-button type="text" icon="el-icon-plus" @click="dialog=true">添加</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
@@ -10,6 +11,7 @@
|
||||
<b v-text="row.createUserName"/>
|
||||
<span v-text="row.createTime"/>
|
||||
</el-row>
|
||||
<p>操作类型:</p>
|
||||
<div class="content" v-text="row.detail"/>
|
||||
<ai-uploader v-model="row.files" disabled/>
|
||||
<div class="btns">
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<b v-text="row.createUserName"/>
|
||||
<span v-text="row.createTime"/>
|
||||
</el-row>
|
||||
<p>帮扶类型:</p>
|
||||
<div class="content" v-text="row.detail"/>
|
||||
<ai-uploader v-model="row.files" disabled/>
|
||||
<div class="btns">
|
||||
@@ -22,6 +23,13 @@
|
||||
</ai-card>
|
||||
<ai-dialog :visible.sync="dialog" :title="addTitle" @closed="form={}" @onConfirm="submit" width="600px">
|
||||
<el-form :model="form" :rules="rules" ref="DialogForm" size="small" label-width="80px">
|
||||
<el-form-item label="帮扶类型" prop="sex">
|
||||
<ai-select
|
||||
v-model="form.sex"
|
||||
:selectList="dict.getDict('sex')"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="帮扶措施" prop="detail">
|
||||
<el-input type="textarea" v-model="form.detail" placeholder="请输入" maxlength="500" show-word-limit rows="5"/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -8,12 +8,18 @@
|
||||
<template #content>
|
||||
<div flex class="half wrap">
|
||||
<div flex class="column">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" maxlength="20" show-word-limit
|
||||
:disabled="isEdit"/>
|
||||
<el-form-item label="户主姓名" prop="name">
|
||||
<!-- <el-input v-model="form.name" placeholder="请输入姓名" maxlength="20" show-word-limit
|
||||
:disabled="isEdit"/> -->
|
||||
<el-input size="small" class="user-selecter" v-model="form.name" placeholder="请输入姓名" clearable :disabled="isEdit || isSelectUser">
|
||||
<template slot="append">
|
||||
<ai-person-select :instance="instance" @selectPerson="checkName">
|
||||
</ai-person-select>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idNumber">
|
||||
<el-input v-model="form.idNumber" placeholder="请输入身份证号" :maxlength="18" :disabled="isEdit"
|
||||
<el-input v-model="form.idNumber" placeholder="请输入身份证号" :maxlength="18" :disabled="isEdit || isSelectUser"
|
||||
@change="handleIdNumberAutocomplete"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
@@ -39,13 +45,9 @@
|
||||
<el-form-item label="政治面貌" prop="politicsStatus">
|
||||
<ai-select v-model="form.politicsStatus" :selectList="dict.getDict('fpPoliticalOutlook')"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="在校生状况" prop="schoolStatus">
|
||||
<ai-select v-model="form.schoolStatus" :selectList="dict.getDict('fpStudentsInSchool')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状况" prop="healthyStatus">
|
||||
<ai-select v-model="form.healthyStatus" :selectList="dict.getDict('fpHealth')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="务工时间(月)" prop="workeMonths">
|
||||
<el-input v-model="form.workeMonths" placeholder="请输入" clearable/>
|
||||
</el-form-item>
|
||||
@@ -71,6 +73,11 @@
|
||||
<ai-select v-model="form.specialPovertySupport" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="健康状况" prop="healthyStatusList">
|
||||
<el-checkbox-group v-model="form.healthyStatusList">
|
||||
<el-checkbox :label="item.dictValue" v-for="(item, index) in dict.getDict('fpHealth')" :key="index">{{item.dictName}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="联络信息">
|
||||
@@ -89,11 +96,11 @@
|
||||
<ai-card title="户籍信息">
|
||||
<template slot="content">
|
||||
<div flex class="half wrap">
|
||||
<el-form-item label="是否户主" prop="isHousehold">
|
||||
<!-- <el-form-item label="是否户主" prop="isHousehold">
|
||||
<ai-select v-model="form.isHousehold" :selectList="dict.getDict('yesOrNo')"
|
||||
@change="form.householdRelation=null"/>
|
||||
</el-form-item>
|
||||
<template v-if="form.isHousehold==1">
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="监测对象类型" prop="objectType">
|
||||
<ai-select v-model="form.objectType" :selectList="dict.getDict('fpType')"/>
|
||||
</el-form-item>
|
||||
@@ -106,18 +113,41 @@
|
||||
<el-form-item label="是否搬迁" prop="move">
|
||||
<ai-select v-model="form.move" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="form.isHousehold==0">
|
||||
<!-- <template v-if="form.isHousehold==0">
|
||||
<el-form-item label="与户主关系" prop="householdRelation">
|
||||
<ai-select v-model="form.householdRelation" :selectList="dict.getDict('fpRelationship')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="户主身份证号" prop="householdIdNumber">
|
||||
<el-input v-model="form.householdIdNumber" placeholder="请输入户主身份证号" :maxlength="18" clearable/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</template> -->
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
|
||||
<ai-card title="情况描述">
|
||||
<template slot="content">
|
||||
<el-form-item label="风险因素" prop="riskType">
|
||||
<ai-select v-model="form.riskType" :selectList="dict.getDict('fpRiskType')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注说明">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.detail" placeholder="备注说明" maxlength="500" show-word-limit clearable type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片(最多9张)" >
|
||||
<ai-uploader
|
||||
:isShowTip="true"
|
||||
:instance="instance"
|
||||
v-model="form.files"
|
||||
fileType="img"
|
||||
acceptType=".png,.jpg,.jpeg"
|
||||
:limit="9">
|
||||
<template slot="tips">最多上传9张图片,单张图片最大10MB<br/>支持.png,.jpg,.jpeg格式</template>
|
||||
</ai-uploader>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
<template v-if="/[123]/.test(form.status)">
|
||||
<ai-card title="收入情况(单位:元)">
|
||||
<template slot="content">
|
||||
@@ -227,6 +257,7 @@ export default {
|
||||
isHousehold: [{required: true, message: "请选择是否户主"}],
|
||||
householdRelation: [{required: true, message: "请选择与户主关系"}],
|
||||
householdIdNumber: [{required: true, message: "请选择户主身份证号"}],
|
||||
riskType: [{required: true, message: "请选择风险因素"}],
|
||||
}
|
||||
},
|
||||
rootArea() {
|
||||
@@ -236,11 +267,34 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
householdRelation: ""
|
||||
}
|
||||
householdRelation: "",
|
||||
healthyStatus: '',
|
||||
healthyStatusList: [],
|
||||
file: [],
|
||||
},
|
||||
isSelectUser: false, //是否选择人员
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkName(e) {
|
||||
if(!e) {
|
||||
this.isSelectUser = false
|
||||
this.form.name = ''
|
||||
this.form.idNumber = ''
|
||||
this.form.phone =''
|
||||
this.form.areaId = ''
|
||||
this.form.birthDate = ''
|
||||
this.form.sex = ''
|
||||
this.form.age = ''
|
||||
return
|
||||
}
|
||||
this.form.name = e.name
|
||||
this.form.idNumber = e.idNumber
|
||||
this.form.phone = e.phone
|
||||
this.form.areaId = e.householdAreaId
|
||||
this.handleIdNumberAutocomplete(e.idNumber)
|
||||
this.isSelectUser = true
|
||||
},
|
||||
back() {
|
||||
this.$router.push({})
|
||||
},
|
||||
@@ -250,7 +304,12 @@ export default {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.form = res.data
|
||||
res.data.healthyStatusList = []
|
||||
if(res.data.healthyStatus) {
|
||||
res.data.healthyStatusList = res.data.healthyStatus.split(',')
|
||||
}
|
||||
this.form = {...res.data}
|
||||
console.log(res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -261,8 +320,10 @@ export default {
|
||||
submit() {
|
||||
this.$refs.ruleForm.validate(v => {
|
||||
if (v) {
|
||||
if (this.form.isHousehold == 1) {
|
||||
this.form.isHousehold = 1
|
||||
this.form.householdIdNumber = this.form.idNumber
|
||||
if (this.form.healthyStatusList.length) {
|
||||
this.form.healthyStatus = this.form.healthyStatusList.join(',')
|
||||
}
|
||||
this.instance.post(`/app/apppreventionreturntopoverty/addOrUpdate`, this.form).then(res => {
|
||||
if (res.code == 0) {
|
||||
|
||||
@@ -1,135 +1,269 @@
|
||||
<template>
|
||||
<section class="hrDetail">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" title="监测对象详情" isShowBottomBorder isShowBack @onBackClick="back">
|
||||
<ai-title
|
||||
slot="title"
|
||||
title="监测对象详情"
|
||||
isShowBottomBorder
|
||||
isShowBack
|
||||
@onBackClick="back"
|
||||
>
|
||||
<template #rightBtn>
|
||||
<template v-if="/0/.test(detail.status) && isGridAdmin">
|
||||
<el-button type="primary" @click="handleAccept(1)">纳入监测</el-button>
|
||||
<el-button type="primary" @click="handleAccept(0)">驳回申请</el-button>
|
||||
<el-button type="primary" @click="handleAccept(1)"
|
||||
>纳入监测</el-button
|
||||
>
|
||||
<el-button type="primary" @click="handleAccept(0)"
|
||||
>驳回申请</el-button
|
||||
>
|
||||
</template>
|
||||
<template v-if="/1/.test(detail.status)">
|
||||
<el-button type="primary" @click="handleRelieve(1)" v-if="isGridAdmin">解除风险</el-button>
|
||||
<el-button type="primary" @click="handleRelieve()" v-else>申请解除风险</el-button>
|
||||
<el-button type="primary" icon="iconfont iconEdit" @click="gotoEdit">编辑</el-button>
|
||||
<el-button v-if="isGridAdmin" icon="iconfont iconDelete" @click="handleDelete(detail.id)">删除</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleRelieve(1)"
|
||||
v-if="isGridAdmin"
|
||||
>解除风险</el-button
|
||||
>
|
||||
<el-button type="primary" @click="handleRelieve()" v-else
|
||||
>申请解除风险</el-button
|
||||
>
|
||||
<el-button type="primary" icon="iconfont iconEdit" @click="gotoEdit"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="isGridAdmin"
|
||||
icon="iconfont iconDelete"
|
||||
@click="handleDelete(detail.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
<template v-if="/2/.test(detail.status) && isGridAdmin">
|
||||
<el-button type="primary" @click="handleRelieve(1)">解除风险</el-button>
|
||||
<el-button type="primary" @click="handleRelieve(0)">继续监测</el-button>
|
||||
<el-button type="primary" @click="handleRelieve(1)"
|
||||
>解除风险</el-button
|
||||
>
|
||||
<el-button type="primary" @click="handleRelieve(0)"
|
||||
>继续监测</el-button
|
||||
>
|
||||
</template>
|
||||
<template v-if="/3/.test(detail.status) && isGridAdmin">
|
||||
<el-button type="primary" @click="handleAccept(1)">纳入监测</el-button>
|
||||
<el-button v-if="isGridAdmin" icon="iconfont iconDelete" @click="handleDelete(detail.id)">删除</el-button>
|
||||
<el-button type="primary" @click="handleAccept(1)"
|
||||
>纳入监测</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="isGridAdmin"
|
||||
icon="iconfont iconDelete"
|
||||
@click="handleDelete(detail.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
<template v-if="/5/.test(detail.status)">
|
||||
<el-button v-if="isGridAdmin" type="primary" @click="handleAccept(1)">纳入监测</el-button>
|
||||
<el-button v-else type="primary" @click="handleAccept()">申请纳入监测</el-button>
|
||||
<el-button v-if="isGridAdmin" icon="iconfont iconDelete" @click="handleDelete(detail.id)">删除</el-button>
|
||||
<el-button
|
||||
v-if="isGridAdmin"
|
||||
type="primary"
|
||||
@click="handleAccept(1)"
|
||||
>纳入监测</el-button
|
||||
>
|
||||
<el-button v-else type="primary" @click="handleAccept()"
|
||||
>申请纳入监测</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="isGridAdmin"
|
||||
icon="iconfont iconDelete"
|
||||
@click="handleDelete(detail.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
<el-button v-if="/4/g.test(detail.status)" icon="iconfont iconDelete" @click="handleDelete(detail.id)">
|
||||
<el-button
|
||||
v-if="/4/g.test(detail.status)"
|
||||
icon="iconfont iconDelete"
|
||||
@click="handleDelete(detail.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<el-form :model="detail" label-width="130px" label-position="right" size="small">
|
||||
<el-form
|
||||
:model="detail"
|
||||
label-width="130px"
|
||||
label-position="right"
|
||||
size="small"
|
||||
>
|
||||
<el-tabs tabPosition="left" v-model="currentTab">
|
||||
<el-tab-pane label="基本信息" lazy>
|
||||
<ai-card :title="detail.name || '无名氏'">
|
||||
<template #content>
|
||||
<div flex class="flex-start">
|
||||
<div flex class="half wrap fill">
|
||||
<el-form-item label="身份证号" prop="name">{{ detail.idNumber }}</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">{{ dict.getLabel('sex', detail.sex) }}</el-form-item>
|
||||
<el-form-item label="出生日期">{{ detail.birthDate }}</el-form-item>
|
||||
<el-form-item label="年龄" prop="age">{{ detail.age }}</el-form-item>
|
||||
<el-form-item label="文化程度">{{ dict.getLabel('fpEducation', detail.education) }}</el-form-item>
|
||||
<el-form-item label="民族">{{ dict.getLabel('fpNation', detail.nation) }}</el-form-item>
|
||||
<el-form-item label="政治面貌">{{
|
||||
dict.getLabel('fpPoliticalOutlook', detail.politicsStatus)
|
||||
<el-form-item label="身份证号" prop="name">{{
|
||||
detail.idNumber
|
||||
}}</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">{{
|
||||
dict.getLabel("sex", detail.sex)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="出生日期">{{
|
||||
detail.birthDate
|
||||
}}</el-form-item>
|
||||
<el-form-item label="年龄" prop="age">{{
|
||||
detail.age
|
||||
}}</el-form-item>
|
||||
<el-form-item label="文化程度">{{
|
||||
dict.getLabel("fpEducation", detail.education)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="民族">{{
|
||||
dict.getLabel("fpNation", detail.nation)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="政治面貌"
|
||||
>{{
|
||||
dict.getLabel(
|
||||
"fpPoliticalOutlook",
|
||||
detail.politicsStatus
|
||||
)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="在校生状况">{{
|
||||
dict.getLabel('fpStudentsInSchool', detail.schoolStatus)
|
||||
<el-form-item label="在校生状况"
|
||||
>{{
|
||||
dict.getLabel(
|
||||
"fpStudentsInSchool",
|
||||
detail.schoolStatus
|
||||
)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状况">{{ dict.getLabel('fpHealth', detail.healthyStatus) }}</el-form-item>
|
||||
<el-form-item label="务工时间(月)" prop="idNumber">{{ detail.workeMonths }}</el-form-item>
|
||||
<el-form-item label="劳动技能">{{
|
||||
dict.getLabel('fpLaborSkills', detail.labourStatus)
|
||||
<!-- <el-form-item label="健康状况">{{ dict.getLabel('fpHealth', detail.healthyStatus) }}</el-form-item> -->
|
||||
<el-form-item label="务工时间(月)" prop="idNumber">{{
|
||||
detail.workeMonths
|
||||
}}</el-form-item>
|
||||
<el-form-item label="劳动技能"
|
||||
>{{
|
||||
dict.getLabel("fpLaborSkills", detail.labourStatus)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="务工区域" prop="idNumber">{{ detail.workArea }}</el-form-item>
|
||||
<el-form-item label="是否参加大病保险">{{
|
||||
dict.getLabel('fpYesOrNo', detail.seriousIllnessInsurance)
|
||||
<el-form-item label="务工区域" prop="idNumber">{{
|
||||
detail.workArea
|
||||
}}</el-form-item>
|
||||
<el-form-item label="是否参加大病保险"
|
||||
>{{
|
||||
dict.getLabel(
|
||||
"fpYesOrNo",
|
||||
detail.seriousIllnessInsurance
|
||||
)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="是否参加基本医保">{{
|
||||
dict.getLabel('fpYesOrNo', detail.basicMedicalTreatment)
|
||||
<el-form-item label="是否参加基本医保"
|
||||
>{{
|
||||
dict.getLabel(
|
||||
"fpYesOrNo",
|
||||
detail.basicMedicalTreatment
|
||||
)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="享受最低生活保障">{{
|
||||
dict.getLabel('fpYesOrNo', detail.subsistenceAllowance)
|
||||
<el-form-item label="享受最低生活保障"
|
||||
>{{
|
||||
dict.getLabel(
|
||||
"fpYesOrNo",
|
||||
detail.subsistenceAllowance
|
||||
)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="是否参加养老保险">{{
|
||||
dict.getLabel('fpYesOrNo', detail.endowmentInsurance)
|
||||
<el-form-item label="是否参加养老保险"
|
||||
>{{
|
||||
dict.getLabel("fpYesOrNo", detail.endowmentInsurance)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="是否特困供养">{{
|
||||
dict.getLabel('fpYesOrNo', detail.specialPovertySupport)
|
||||
<el-form-item label="是否特困供养"
|
||||
>{{
|
||||
dict.getLabel(
|
||||
"fpYesOrNo",
|
||||
detail.specialPovertySupport
|
||||
)
|
||||
}}
|
||||
</el-form-item>
|
||||
</div>
|
||||
<ai-avatar :instance="instance" v-model="detail.photo" :editable="false"/>
|
||||
<ai-avatar
|
||||
:instance="instance"
|
||||
v-model="detail.photo"
|
||||
:editable="false"
|
||||
/>
|
||||
</div>
|
||||
<el-form-item label="健康状况">
|
||||
<span v-for="(item, index) in detail.healthyStatusList" :key="index"><span v-if="index > 0">,</span>{{dict.getLabel("fpHealth", item)}}</span>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="联络信息">
|
||||
<template slot="content">
|
||||
<el-form-item label="联系方式" prop="phone">{{ detail.phone }}</el-form-item>
|
||||
<el-form-item label="现住址">{{ currentFullAddress }}</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">{{
|
||||
detail.phone
|
||||
}}</el-form-item>
|
||||
<el-form-item label="现住址">{{
|
||||
currentFullAddress
|
||||
}}</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="家庭情况">
|
||||
<template slot="content">
|
||||
<div flex class="half wrap">
|
||||
<el-form-item label="是否户主">{{ dict.getLabel('yesOrNo', detail.isHousehold) }}</el-form-item>
|
||||
<template v-if="detail.isHousehold==1">
|
||||
<el-form-item label="监测对象类型">{{ dict.getLabel('fpType', detail.objectType) }}</el-form-item>
|
||||
<el-form-item label="档案状态">{{
|
||||
dict.getLabel("fpType", detail.objectType)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="监测对象类型">{{
|
||||
dict.getLabel("fpType", detail.objectType)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="是否危房">
|
||||
{{ dict.getLabel('fpYesOrNo', detail.dilapidatedHousehold) }}
|
||||
{{
|
||||
dict.getLabel("fpYesOrNo", detail.dilapidatedHousehold)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="是否饮用水安全">
|
||||
{{ dict.getLabel('fpYesOrNo', detail.drinkingWaterSafety) }}
|
||||
{{
|
||||
dict.getLabel("fpYesOrNo", detail.drinkingWaterSafety)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="是否搬迁">{{ dict.getLabel('fpYesOrNo', detail.move) }}</el-form-item>
|
||||
</template>
|
||||
<template v-if="detail.isHousehold==0">
|
||||
<el-form-item label="与户主关系">
|
||||
{{ dict.getLabel('fpRelationship', detail.householdRelation) }}
|
||||
</el-form-item>
|
||||
<el-form-item label="户主身份证号">{{ detail.householdIdNumber }}</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="是否搬迁">{{
|
||||
dict.getLabel("fpYesOrNo", detail.move)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="风险因素">{{
|
||||
dict.getLabel("fpYesOrNo", detail.move)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="风险消除方式">{{
|
||||
dict.getLabel("fpYesOrNo", detail.move)
|
||||
}}</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
<template v-if="/[123]/.test(detail.status)">
|
||||
<template>
|
||||
<!-- v-if="/[123]/.test(detail.status)" -->
|
||||
<ai-card title="收入情况(单位:元)">
|
||||
<template slot="content">
|
||||
<div flex class="half wrap">
|
||||
<el-form-item label="工资收入">{{ detail.income1 }}</el-form-item>
|
||||
<el-form-item label="生产经营收入">{{ detail.income2 }}</el-form-item>
|
||||
<el-form-item label="财产性收入">{{ detail.income3 }}</el-form-item>
|
||||
<el-form-item label="转移性收入">{{ detail.income4 }}</el-form-item>
|
||||
<el-form-item label="理赔收入">{{ detail.income5 }}</el-form-item>
|
||||
<el-form-item label="生产经营支出">{{ detail.income6 }}</el-form-item>
|
||||
<el-form-item label="合规自然支出">{{ detail.income7 }}</el-form-item>
|
||||
<el-form-item label="家庭人均纯收入">{{ detail.income8 }}</el-form-item>
|
||||
<el-form-item label="工资收入">{{
|
||||
detail.income1
|
||||
}}</el-form-item>
|
||||
<el-form-item label="生产经营收入">{{
|
||||
detail.income2
|
||||
}}</el-form-item>
|
||||
<el-form-item label="财产性收入">{{
|
||||
detail.income3
|
||||
}}</el-form-item>
|
||||
<el-form-item label="转移性收入">{{
|
||||
detail.income4
|
||||
}}</el-form-item>
|
||||
<el-form-item label="理赔收入">{{
|
||||
detail.income5
|
||||
}}</el-form-item>
|
||||
<el-form-item label="生产经营支出">{{
|
||||
detail.income6
|
||||
}}</el-form-item>
|
||||
<el-form-item label="合规自然支出">{{
|
||||
detail.income7
|
||||
}}</el-form-item>
|
||||
<el-form-item label="家庭人均纯收入">{{
|
||||
detail.income8
|
||||
}}</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="帮扶情况">
|
||||
<!-- <ai-card title="帮扶情况">
|
||||
<template slot="content">
|
||||
<div flex class="half wrap">
|
||||
<el-form-item label="产业帮扶">{{
|
||||
@@ -165,14 +299,43 @@
|
||||
<el-form-item label="风险消除日期">{{ detail.riskEliminatedTime }}</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
</ai-card> -->
|
||||
<ai-card title="家庭成员">
|
||||
<template #right>
|
||||
<span
|
||||
style="
|
||||
color: #2266ff;
|
||||
margin-left: 16px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
"
|
||||
@click="addFamily({})"
|
||||
>添加</span
|
||||
>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-table :tableData="detail.family" :colConfigs="colConfigs" :dict="dict"
|
||||
:isShowPagination="false">
|
||||
<el-table-column slot="options" label="操作" align="center">
|
||||
<ai-table
|
||||
:tableData="detail.family"
|
||||
:colConfigs="colConfigs"
|
||||
:dict="dict"
|
||||
:isShowPagination="false"
|
||||
>
|
||||
<el-table-column
|
||||
slot="options"
|
||||
label="操作"
|
||||
align="center"
|
||||
width="200px"
|
||||
>
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" @click="$router.push({query:{id:row.id}})">详情</el-button>
|
||||
<el-button type="text" @click="viewFamily(row)"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button type="text" @click="addFamily(row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button type="text" @click="delFamily(row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
@@ -181,13 +344,309 @@
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="走访日志" lazy name="HrLog">
|
||||
<hr-log v-if="currentTab=='HrLog'" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
<hr-log
|
||||
v-if="currentTab == 'HrLog'"
|
||||
:instance="instance"
|
||||
:dict="dict"
|
||||
:permissions="permissions"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="帮扶措施" lazy name="HrMeasure">
|
||||
<hr-measure v-if="currentTab=='HrMeasure'" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
<hr-measure
|
||||
v-if="currentTab == 'HrMeasure'"
|
||||
:instance="instance"
|
||||
:dict="dict"
|
||||
:permissions="permissions"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowAdd"
|
||||
width="1000px"
|
||||
height="500px"
|
||||
title="添加家庭成员"
|
||||
@close="onClose"
|
||||
@onConfirm="onConfirm"
|
||||
>
|
||||
<el-form
|
||||
:model="form"
|
||||
ref="ruleForm"
|
||||
:rules="rules"
|
||||
label-width="130px"
|
||||
label-position="right"
|
||||
size="small"
|
||||
>
|
||||
<div flex class="half wrap">
|
||||
<div flex class="column">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
size="small"
|
||||
class="user-selecter"
|
||||
v-model="form.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:disabled="isEdit || isSelectUser"
|
||||
>
|
||||
<template slot="append">
|
||||
<ai-person-select
|
||||
:instance="instance"
|
||||
@selectPerson="checkName"
|
||||
>
|
||||
</ai-person-select>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idNumber">
|
||||
<el-input
|
||||
v-model="form.idNumber"
|
||||
placeholder="请输入身份证号"
|
||||
:maxlength="18"
|
||||
:disabled="isEdit || isSelectUser"
|
||||
@change="handleIdNumberAutocomplete"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<ai-select
|
||||
v-model="form.sex"
|
||||
:selectList="dict.getDict('sex')"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="个人照片" prop="photo">
|
||||
<ai-avatar :instance="instance" v-model="form.photo" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出生日期" prop="birthDate">
|
||||
<el-date-picker
|
||||
disabled
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="form.birthDate"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="form.age"
|
||||
placeholder="请输入年龄"
|
||||
type="number"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input
|
||||
v-model="form.phone"
|
||||
placeholder="请输入联系方式"
|
||||
:maxlength="11"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="与户主关系" prop="householdRelation">
|
||||
<ai-select
|
||||
v-model="form.householdRelation"
|
||||
:selectList="dict.getDict('fpRelationship')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="文化程度" prop="education">
|
||||
<ai-select
|
||||
v-model="form.education"
|
||||
:selectList="dict.getDict('fpEducation')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="民族" prop="nation">
|
||||
<ai-select
|
||||
v-model="form.nation"
|
||||
:selectList="dict.getDict('fpNation')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="政治面貌" prop="politicsStatus">
|
||||
<ai-select
|
||||
v-model="form.politicsStatus"
|
||||
:selectList="dict.getDict('fpPoliticalOutlook')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="在校生状况" prop="schoolStatus">
|
||||
<ai-select
|
||||
v-model="form.schoolStatus"
|
||||
:selectList="dict.getDict('fpStudentsInSchool')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="务工时间(月)" prop="workeMonths">
|
||||
<el-input
|
||||
v-model="form.workeMonths"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="劳动技能" prop="labourStatus">
|
||||
<ai-select
|
||||
v-model="form.labourStatus"
|
||||
:selectList="dict.getDict('fpLaborSkills')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="务工区域" prop="workArea">
|
||||
<el-input
|
||||
v-model="form.workArea"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
maxlength="30"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="是否参加大病保险"
|
||||
prop="seriousIllnessInsurance"
|
||||
>
|
||||
<ai-select
|
||||
v-model="form.seriousIllnessInsurance"
|
||||
:selectList="dict.getDict('fpYesOrNo')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="是否参加基本医保"
|
||||
prop="basicMedicalTreatment"
|
||||
>
|
||||
<ai-select
|
||||
v-model="form.basicMedicalTreatment"
|
||||
:selectList="dict.getDict('fpYesOrNo')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="享受最低生活保障"
|
||||
prop="subsistenceAllowance"
|
||||
>
|
||||
<ai-select
|
||||
v-model="form.subsistenceAllowance"
|
||||
:selectList="dict.getDict('fpYesOrNo')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否参加养老保险" prop="endowmentInsurance">
|
||||
<ai-select
|
||||
v-model="form.endowmentInsurance"
|
||||
:selectList="dict.getDict('fpYesOrNo')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否特困供养" prop="specialPovertySupport">
|
||||
<ai-select
|
||||
v-model="form.specialPovertySupport"
|
||||
:selectList="dict.getDict('fpYesOrNo')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="现住址" prop="currentAreaId">
|
||||
<ai-area-get
|
||||
:instance="instance"
|
||||
v-model="form.currentAreaId"
|
||||
:root="rootArea"
|
||||
valueLevel="5"
|
||||
/>
|
||||
<el-form-item prop="currentAddress">
|
||||
<el-input
|
||||
v-model="form.currentAddress"
|
||||
placeholder="详细地址"
|
||||
maxlength="30"
|
||||
show-word-limit
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状况" prop="healthyStatusList">
|
||||
<el-checkbox-group v-model="form.healthyStatusList">
|
||||
<el-checkbox :label="item.dictValue" v-for="(item, index) in dict.getDict('fpHealth')" :key="index">{{item.dictName}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowDetail"
|
||||
width="1000px"
|
||||
height="500px"
|
||||
title="家庭成员详情"
|
||||
>
|
||||
<el-form
|
||||
:model="detail"
|
||||
label-width="130px"
|
||||
label-position="right"
|
||||
size="small"
|
||||
>
|
||||
<div flex class="flex-start">
|
||||
<div flex class="half wrap fill">
|
||||
<el-form-item label="身份证号" prop="name">{{
|
||||
familyInfo.name
|
||||
}}</el-form-item>
|
||||
<el-form-item label="身份证号" prop="name">{{
|
||||
familyInfo.idNumber
|
||||
}}</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">{{
|
||||
dict.getLabel("sex", familyInfo.sex)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="出生日期">{{
|
||||
familyInfo.birthDate
|
||||
}}</el-form-item>
|
||||
<el-form-item label="年龄" prop="age">{{
|
||||
familyInfo.age
|
||||
}}</el-form-item>
|
||||
<el-form-item label="联系方式">{{familyInfo.phone}}</el-form-item>
|
||||
<el-form-item label="与户主关系">{{
|
||||
dict.getLabel("fpRelationship", familyInfo.householdRelation)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="文化程度">{{
|
||||
dict.getLabel("fpEducation", familyInfo.education)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="民族">{{
|
||||
dict.getLabel("fpNation", familyInfo.nation)
|
||||
}}</el-form-item>
|
||||
<el-form-item label="政治面貌"
|
||||
>{{
|
||||
dict.getLabel("fpPoliticalOutlook", familyInfo.politicsStatus)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="在校生状况"
|
||||
>{{ dict.getLabel("fpStudentsInSchool", familyInfo.schoolStatus) }}
|
||||
</el-form-item>
|
||||
<el-form-item label="务工时间(月)" prop="idNumber">{{
|
||||
familyInfo.workeMonths
|
||||
}}</el-form-item>
|
||||
<el-form-item label="劳动技能"
|
||||
>{{ dict.getLabel("fpLaborSkills", familyInfo.labourStatus) }}
|
||||
</el-form-item>
|
||||
<el-form-item label="务工区域" prop="idNumber">{{
|
||||
familyInfo.workArea
|
||||
}}</el-form-item>
|
||||
<el-form-item label="是否参加大病保险"
|
||||
>{{
|
||||
dict.getLabel("fpYesOrNo", familyInfo.seriousIllnessInsurance)
|
||||
}}
|
||||
</el-form-item>
|
||||
<el-form-item label="是否参加基本医保"
|
||||
>{{ dict.getLabel("fpYesOrNo", familyInfo.basicMedicalTreatment) }}
|
||||
</el-form-item>
|
||||
<el-form-item label="享受最低生活保障"
|
||||
>{{ dict.getLabel("fpYesOrNo", familyInfo.subsistenceAllowance) }}
|
||||
</el-form-item>
|
||||
<el-form-item label="是否参加养老保险"
|
||||
>{{ dict.getLabel("fpYesOrNo", familyInfo.endowmentInsurance) }}
|
||||
</el-form-item>
|
||||
<el-form-item label="是否特困供养"
|
||||
>{{ dict.getLabel("fpYesOrNo", familyInfo.specialPovertySupport) }}
|
||||
</el-form-item>
|
||||
</div>
|
||||
<ai-avatar
|
||||
:instance="instance"
|
||||
v-model="familyInfo.photo"
|
||||
:editable="false"
|
||||
/>
|
||||
</div>
|
||||
<el-form-item label="现住址">{{
|
||||
currentFullAddressFamily
|
||||
}}</el-form-item>
|
||||
<el-form-item label="健康状况">
|
||||
<span v-for="(item, index) in familyInfo.healthyStatusList" :key="index"><span v-if="index > 0">,</span>{{dict.getLabel("fpHealth", item)}}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
@@ -204,98 +663,237 @@ export default {
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
permissions: Function,
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
...mapState(["user"]),
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "与户主关系", prop: "householdRelation", dict: "fpRelationship"},
|
||||
{
|
||||
label: "与户主关系",
|
||||
prop: "householdRelation",
|
||||
dict: "fpRelationship",
|
||||
},
|
||||
{ label: "姓名", prop: "name" },
|
||||
{ label: "性别", prop: "sex", dict: "sex" },
|
||||
{ label: "年龄", prop: "age" },
|
||||
{label: "身份证号", render: (h, {row}) => h('p', null, this.idCardNoUtil.hideId(row.idNumber))},
|
||||
{slot: "options"}
|
||||
]
|
||||
{
|
||||
label: "身份证号",
|
||||
render: (h, { row }) =>
|
||||
h("p", null, this.idCardNoUtil.hideId(row.idNumber)),
|
||||
},
|
||||
{ slot: "options" },
|
||||
];
|
||||
},
|
||||
isGridAdmin() {
|
||||
return this.user.info.girdCheckType == 2
|
||||
return this.user.info.girdCheckType == 2;
|
||||
},
|
||||
currentFullAddress() {
|
||||
let {countyName, townName, villageName, currentAddress} = this.detail
|
||||
return [countyName, townName, villageName, currentAddress].join("")
|
||||
let { countyName, townName, villageName, currentAddress } = this.detail;
|
||||
return [countyName, townName, villageName, currentAddress].join("");
|
||||
},
|
||||
currentFullAddressFamily() {
|
||||
let { countyName, townName, villageName, currentAddress } = this.familyInfo;
|
||||
return [countyName, townName, villageName, currentAddress].join("");
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
idNumber: [{ required: true, message: "请输入身份证号" }],
|
||||
name: [{ required: true, message: "请输入姓名" }],
|
||||
sex: [{ required: true, message: "请选择性别" }],
|
||||
phone: [{ required: true, message: "请输入联系方式" }],
|
||||
currentAreaId: [
|
||||
{ required: true, message: "请选择现住址" },
|
||||
{ pattern: /[^0]0{0,2}$/, message: "请选择到村/社区" },
|
||||
],
|
||||
isHousehold: [{ required: true, message: "请选择是否户主" }],
|
||||
householdRelation: [{ required: true, message: "请选择与户主关系" }],
|
||||
householdIdNumber: [{ required: true, message: "请选择户主身份证号" }],
|
||||
};
|
||||
},
|
||||
rootArea() {
|
||||
return this.user.info?.areaId?.replace(/(\d{6})\d+/g, '$1' + Array(7).join("0")) || ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detail: {},
|
||||
currentTab: ""
|
||||
}
|
||||
currentTab: "",
|
||||
isShowAdd: false,
|
||||
form: {healthyStatusList: []},
|
||||
isEdit: false,
|
||||
isShowDetail: false,
|
||||
familyInfo: {},
|
||||
isSelectUser: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
checkName(e) {
|
||||
if(!e) {
|
||||
this.isSelectUser = false
|
||||
this.form.name = ''
|
||||
this.form.idNumber = ''
|
||||
this.form.phone =''
|
||||
this.form.areaId = ''
|
||||
this.form.birthDate = ''
|
||||
this.form.sex = ''
|
||||
this.form.age = ''
|
||||
return
|
||||
}
|
||||
this.form.name = e.name
|
||||
this.form.idNumber = e.idNumber
|
||||
this.form.phone = e.phone
|
||||
this.form.areaId = e.householdAreaId
|
||||
this.handleIdNumberAutocomplete(e.idNumber)
|
||||
this.isSelectUser = true
|
||||
},
|
||||
addFamily(row) {
|
||||
if(row && row.id) {
|
||||
this.isEdit = true
|
||||
}
|
||||
row.healthyStatusList = []
|
||||
if(row && row.healthyStatus) {
|
||||
row.healthyStatusList = row.healthyStatus.split(',')
|
||||
}
|
||||
this.form = { ...row }
|
||||
this.isShowAdd = true
|
||||
},
|
||||
viewFamily(row) {
|
||||
row.healthyStatusList = []
|
||||
if(row.healthyStatus) {
|
||||
row.healthyStatusList = row.healthyStatus.split(',')
|
||||
}
|
||||
this.familyInfo = {...row}
|
||||
this.isShowDetail = true
|
||||
},
|
||||
delFamily(row) {
|
||||
if(row.isHousehold == 1) {
|
||||
return this.$message.error('户主信息不允许删除');
|
||||
}
|
||||
this.$confirm("是否删除该家庭成员").then(() => {
|
||||
this.instance.post(`/app/apppreventionreturntopoverty/delete?ids=${row.id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getDetail()
|
||||
this.$message.success('删除成功!');
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleIdNumberAutocomplete(v) {
|
||||
let { birthday: birthDate, sex } = this.idCardNoUtil.getIdCardInfo(v);
|
||||
this.form = { ...this.form, birthDate, sex, age: this.$calcAge(v) };
|
||||
},
|
||||
onConfirm() {
|
||||
this.$refs.ruleForm.validate((v) => {
|
||||
if (v) {
|
||||
this.form.isHousehold = 0
|
||||
this.form.householdIdNumber = this.detail.idNumber
|
||||
if (this.form.healthyStatusList.length) {
|
||||
this.form.healthyStatus = this.form.healthyStatusList.join(',')
|
||||
}
|
||||
this.instance.post(`/app/apppreventionreturntopoverty/addOrUpdate`, this.form).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getDetail()
|
||||
this.$message.success('提交成功!');
|
||||
this.isShowAdd = false
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
onClose() {
|
||||
this.isShowAdd = false;
|
||||
},
|
||||
back() {
|
||||
this.$router.push({})
|
||||
this.$router.push({});
|
||||
},
|
||||
getDetail() {
|
||||
let {id} = this.$route.query
|
||||
id && this.instance.post("/app/apppreventionreturntopoverty/queryDetailById", null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
let { id } = this.$route.query;
|
||||
id &&
|
||||
this.instance
|
||||
.post("/app/apppreventionreturntopoverty/queryDetailById", null, {
|
||||
params: { id },
|
||||
})
|
||||
.then((res) => {
|
||||
if (res?.data) {
|
||||
this.detail = res.data
|
||||
this.detail.family?.map(e => {
|
||||
e.householdRelation = e.householdRelation || "户主"
|
||||
})
|
||||
this.detail = res.data;
|
||||
this.detail.family?.map((e) => {
|
||||
e.householdRelation = e.householdRelation || "户主";
|
||||
});
|
||||
|
||||
if(this.detail.healthyStatus) {
|
||||
this.detail.healthyStatusList = this.detail.healthyStatus.split(',')
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
gotoEdit() {
|
||||
let {query} = this.$route
|
||||
this.$router.push({query, hash: "#add"})
|
||||
let { query } = this.$route;
|
||||
this.$router.push({ query, hash: "#add" });
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否要删除监测对象").then(() => {
|
||||
this.instance.post("/app/apppreventionreturntopoverty/delete", null, {
|
||||
params: {ids: ids?.toString()}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("删除成功!")
|
||||
this.back()
|
||||
}
|
||||
this.$confirm("是否要删除监测对象")
|
||||
.then(() => {
|
||||
this.instance
|
||||
.post("/app/apppreventionreturntopoverty/delete", null, {
|
||||
params: { ids: ids?.toString() },
|
||||
})
|
||||
}).catch(() => 0)
|
||||
.then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("删除成功!");
|
||||
this.back();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => 0);
|
||||
},
|
||||
handleAccept(pass) {
|
||||
let msg = pass == 0 ? "是否驳回纳入监测对象申请?" : `是否${isNaN(pass) ? '(申请)' : ''}纳入监测对象?`, {id} = this.detail
|
||||
this.$confirm(msg).then(() => {
|
||||
this.instance.post("/app/apppreventionreturntopoverty/examine", null, {
|
||||
params: {pass, id}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("审批提交成功!")
|
||||
this.back()
|
||||
}
|
||||
let msg =
|
||||
pass == 0
|
||||
? "是否驳回纳入监测对象申请?"
|
||||
: `是否${isNaN(pass) ? "(申请)" : ""}纳入监测对象?`,
|
||||
{ id } = this.detail;
|
||||
this.$confirm(msg)
|
||||
.then(() => {
|
||||
this.instance
|
||||
.post("/app/apppreventionreturntopoverty/examine", null, {
|
||||
params: { pass, id },
|
||||
})
|
||||
}).catch(() => 0)
|
||||
.then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("审批提交成功!");
|
||||
this.back();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => 0);
|
||||
},
|
||||
handleRelieve(pass) {
|
||||
let {id} = this.detail, msg = pass == 0 ? `是否继续监测对象` : `是否${isNaN(pass) ? '(申请)' : ''}解除监测对象`
|
||||
this.$confirm(msg).then(() => {
|
||||
this.instance.post("/app/apppreventionreturntopoverty/relieve", null, {
|
||||
params: {pass, id}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("审批提交成功!")
|
||||
this.back()
|
||||
}
|
||||
let { id } = this.detail,
|
||||
msg =
|
||||
pass == 0
|
||||
? `是否继续监测对象`
|
||||
: `是否${isNaN(pass) ? "(申请)" : ""}解除监测对象`;
|
||||
this.$confirm(msg)
|
||||
.then(() => {
|
||||
this.instance
|
||||
.post("/app/apppreventionreturntopoverty/relieve", null, {
|
||||
params: { pass, id },
|
||||
})
|
||||
}).catch(() => 0)
|
||||
.then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("审批提交成功!");
|
||||
this.back();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => 0);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
this.getDetail();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -313,7 +911,8 @@ export default {
|
||||
.half {
|
||||
align-items: flex-start;
|
||||
|
||||
& > .el-form-item, & > div {
|
||||
& > .el-form-item,
|
||||
& > div {
|
||||
width: 50%;
|
||||
|
||||
.el-form-item {
|
||||
|
||||
@@ -10,42 +10,17 @@
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select placeholder="档案状态" v-model="search.status"
|
||||
:selectList="dict.getDict('fpPrtpStatus')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="性别" v-model="search.sex"
|
||||
:selectList="dict.getDict('sex')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="文化程度" v-model="search.education"
|
||||
:selectList="dict.getDict('fpEducation')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="民族" v-model="search.nation"
|
||||
:selectList="dict.getDict('fpNation')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="search.birthStart"
|
||||
type="date"
|
||||
size="small"
|
||||
unlink-panels
|
||||
placeholder="选择出生开始日期"
|
||||
@change="page.current=1,getTableData()"
|
||||
/>
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="search.birthEnd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="选择出生结束日期"
|
||||
unlink-panels
|
||||
@change="page.current=1,getTableData()"
|
||||
/>
|
||||
<ai-select placeholder="政治面貌" v-model="search.politicsStatus"
|
||||
:selectList="dict.getDict('fpPoliticalOutlook')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="是否户主" v-model="search.isHousehold"
|
||||
:selectList="dict.getDict('yesOrNo')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="档案状态" v-model="search.status" :selectList="dict.getDict('fpPrtpStatus')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="监测对象类型" v-model="search.objectType" :selectList="dict.getDict('fpType')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="风险因素" v-model="search.riskType" :selectList="dict.getDict('fpRiskType')" @change="page.current=1,getTableData()"/>
|
||||
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="search.birthStart" type="date" size="small"
|
||||
unlink-panels placeholder="选择出生开始日期" @change="page.current=1,getTableData()" />
|
||||
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="search.birthEnd" type="date" size="small" placeholder="选择出生结束日期"
|
||||
unlink-panels @change="page.current=1,getTableData()" />
|
||||
<ai-select placeholder="性别" v-model="search.sex" :selectList="dict.getDict('sex')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="文化程度" v-model="search.education" :selectList="dict.getDict('fpEducation')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="民族" v-model="search.nation" :selectList="dict.getDict('fpNation')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="政治面貌" v-model="search.politicsStatus" :selectList="dict.getDict('fpPoliticalOutlook')" @change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="姓名/身份证/联系方式" v-model="search.con" clearable
|
||||
@@ -112,7 +87,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {name: ""},
|
||||
search: {name: '', objectType: '', riskType: '',isHousehold: 1},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
|
||||
233
packages/jianping/AppPublicizeInformation/Add.vue
Normal file
233
packages/jianping/AppPublicizeInformation/Add.vue
Normal file
@@ -0,0 +1,233 @@
|
||||
<template>
|
||||
<section class="Add">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" :title="addTitle" isShowBottomBorder isShowBack @onBackClick="back"/>
|
||||
<template #content>
|
||||
<el-form :model="form" ref="ruleForm" :rules="rules" label-width="130px" label-position="right" size="small">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入标题" :maxlength="50" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布地区" prop="areaId">
|
||||
<ai-area-get :instance="instance" v-model="form.areaId" :root="rootArea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文章类型" prop="moduleId" style="width:50%;" v-if="miniTypeList.length">
|
||||
<ai-select v-model="form.moduleId" :selectList="miniTypeList" @change="getNewTypeList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类" prop="categoryId" style="width:50%;">
|
||||
<ai-select v-model="form.categoryId" :selectList="newTypeList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="正文" prop="content" style="width: 100%;">
|
||||
<ai-editor v-model="form.content" :instance="instance"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="封面图片" >
|
||||
<ai-uploader
|
||||
:isShowTip="true"
|
||||
:instance="instance"
|
||||
v-model="form.pictureUrlList"
|
||||
fileType="img"
|
||||
acceptType=".png,.jpg,.jpeg"
|
||||
:limit="1">
|
||||
<template slot="tips">最多上传1张图片,单张图片最大10MB<br/>支持.png,.jpg,.jpeg格式</template>
|
||||
</ai-uploader>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件附件" prop="files">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
multiple
|
||||
accept=".zip,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.txt,.jpg,.png"
|
||||
:http-request="uploadFile"
|
||||
:on-exceed="()=>$message.error('最多只能上传9个附件!')"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChange"
|
||||
:limit="9"
|
||||
:file-list="form.files">
|
||||
<el-button size="mini"> 添加附件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
<p style="line-height: 0;">最多上传9个附件,单个文件最大10MB </p>
|
||||
<p style="line-height: 40px;">
|
||||
支持.zip、.rar、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.pdf、.txt、.jpg、.png格式</p>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="back">取消</el-button>
|
||||
<el-button type="primary" @click="submit">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "Add",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
isEdit() {
|
||||
return !!this.$route.query.id
|
||||
},
|
||||
addTitle() {
|
||||
return this.isEdit ? "编辑新闻发布" : "添加新闻发布"
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
title: [{required: true, message: "请输入标题"}],
|
||||
areaId: [
|
||||
{message: "请选择发布地区", required: true, trigger: "blur"},
|
||||
{validator: (r, v, cb) => v && /0{3}$/g.test(v) ? cb('发布地区必须选到村级') : cb(), trigger: "blur"}
|
||||
],
|
||||
moduleId: [{required: true, message: "请选择文章类型"}],
|
||||
categoryId: [{required: true, message: "选择分类"}],
|
||||
}
|
||||
},
|
||||
rootArea() {
|
||||
return this.user.info?.areaId?.replace(/(\d{6})\d+/g, '$1' + Array(7).join("0")) || ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
pictureUrlList: [],
|
||||
pictureUrl: '',
|
||||
files: []
|
||||
},
|
||||
miniTypeList: [],
|
||||
newTypeList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 上传附件
|
||||
uploadFile: function (file) {
|
||||
const isLt10M = file.file.size / 1024 / 1024 < 10;
|
||||
if (!isLt10M) {
|
||||
this.$message.error("附件大小不超过10mb!");
|
||||
for (let i = 0; i < this.form.files.length; i++) {
|
||||
if (this.form.files[i].uid == file.file.uid) {
|
||||
this.form.files.splice(i, 1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
let formData = new FormData();
|
||||
formData.append("file", file.file);
|
||||
this.instance.post(`/admin/file/add`, formData, {withCredentials: false}).then(res => {
|
||||
if (res && res.code == 0) {
|
||||
let img = res.data[0].split(';');
|
||||
this.form.files.forEach((item, index) => {
|
||||
if (item.uid == file.file.uid) {
|
||||
this.form.files[index].id = img[1];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.form.files = fileList;
|
||||
},
|
||||
handleChange(file, fileList) {
|
||||
this.form.files = fileList;
|
||||
},
|
||||
back() {
|
||||
this.$router.push({})
|
||||
},
|
||||
submit() {
|
||||
this.$refs.ruleForm.validate(v => {
|
||||
if (v) {
|
||||
if(this.form.pictureUrlList.length) {
|
||||
this.form.pictureUrl = this.form.pictureUrlList[0].url
|
||||
}
|
||||
this.instance.post(`/app/apppublicityinfo/addOrUpdate`, this.form).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功!');
|
||||
this.back()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
let {id} = this.$route.query
|
||||
id && this.instance.post("/app/apppublicityinfo/queryDetailById", null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
if(res.data.pictureUrl) {
|
||||
res.data.pictureUrlList = [{url: res.data.pictureUrl}]
|
||||
}
|
||||
this.form = {...res.data}
|
||||
this.getNewTypeList()
|
||||
}
|
||||
})
|
||||
},
|
||||
getTypeList() {
|
||||
let {parentId} = this.$route.query
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=1&size=100&parentId=${parentId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.miniTypeList = res.data.records.map((item) => {
|
||||
return {
|
||||
dictName: item.categoryName,
|
||||
dictValue: item.id
|
||||
}
|
||||
})
|
||||
console.log(this.miniTypeList)
|
||||
if(this.$route.query.id) {
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getNewTypeList() {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=2&size=100&parentId=${this.form.moduleId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
res.data.records
|
||||
this.newTypeList = res.data.records.map((item) => {
|
||||
return {
|
||||
dictName: item.categoryName,
|
||||
dictValue: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getTypeList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Add {
|
||||
height: 100%;
|
||||
|
||||
.half {
|
||||
align-items: flex-start;
|
||||
|
||||
& > .el-form-item, & > div {
|
||||
width: 50%;
|
||||
|
||||
.el-form-item {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<section class="AppPublicizeInformation">
|
||||
<component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Add from "./Add";
|
||||
import List from "./List";
|
||||
|
||||
export default {
|
||||
name: "AppPublicizeInformation",
|
||||
components: {List, Add},
|
||||
label: "宣传资讯",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
currentComponent() {
|
||||
return this.$route.hash == "#add" ? Add : List
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load("sex", "fpNation", "fpPrtpStatus", "fpHealth", "fpStudentsInSchool", 'fpYesOrNo', "fpRelationship",
|
||||
"yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook",
|
||||
"fpPublicWelfarePostAssistance","fpHealthAssistance","fpFnancialAssistance","fpEmploymentAssistance","fpEducationalAssistance","fpIndustrialAssistance","fpSocialAssistance")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppPublicizeInformation {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
324
packages/jianping/AppPublicizeInformation/List.vue
Normal file
324
packages/jianping/AppPublicizeInformation/List.vue
Normal file
@@ -0,0 +1,324 @@
|
||||
<template>
|
||||
<section class="List">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="宣传资讯" isShowBottomBorder isShowArea v-model="search.areaId" :instance="instance"
|
||||
@change="page.current=1,getTableData()">
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<div class="flex">
|
||||
<div class="type">
|
||||
<div class="title">宣传板块<span><el-button type="text" @click="addType(0, typeList.length+1, '')">添加</el-button></span></div>
|
||||
<div class="list">
|
||||
<div class="item" v-for="(item, index) in typeList" :key="index" :class="typeIndex == index ? 'active' : ''" @click="typeClick(index)">
|
||||
{{item.categoryName}}
|
||||
</div>
|
||||
<div class="item" v-if="!typeList.length">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="type mini-type">
|
||||
<div class="title">模块名称<span><el-button type="text" @click="addType(1, miniTypeList.length+1, typeList[typeIndex].id)">添加</el-button></span></div>
|
||||
<div class="list">
|
||||
<div class="item" v-for="(item, index) in miniTypeList" :key="index" :class="miniTypeIndex == index ? 'active' : ''" @click="miniTypeClick(index)">
|
||||
<span class="text">{{item.categoryName}}</span>
|
||||
<span class="icon">
|
||||
<i class="el-icon-circle-plus-outline" @click="addNewType(index)"></i>
|
||||
<i class="el-icon-edit" @click="editMini(index)"></i>
|
||||
<i class="el-icon-delete" @click="delMini(miniTypeList[index].id)"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="item" v-if="!miniTypeList.length">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<ai-search-bar>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="请输入标题" v-model="search.title" clearable @change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="showEdit('')" v-if="typeList.length && miniTypeList.length">添加</el-button>
|
||||
<!-- <el-button icon="iconfont iconDelete" :disabled="!ids.length" @click="handleDelete(ids)">删除</el-button> -->
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"
|
||||
@selection-change="v=>ids=v.map(e=>e.id)">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center" width='150px'>
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="showEdit(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="form={}" @onConfirm="submitDialog" width="600px">
|
||||
<el-form :model="form" :rules="rules" ref="DialogForm" size="small" label-width="100px">
|
||||
<el-form-item :label="addLabelText" prop="categoryName">
|
||||
<el-input v-model.number="form.categoryName" placeholder="请输入" maxlength="10" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="showIndex" v-if="type != 2">
|
||||
<el-input-number v-model="form.showIndex" @change="handleChange" :min="1" :max="100"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<ai-table :tableData="newTypeList" :total="newPage.total" :current.sync="newPage.current" :size.sync="newPage.size"
|
||||
@getList="getTableData" :col-configs="colConfigsNew" v-if="type == 2">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="editNew(row)">编辑</el-button>
|
||||
<el-button type="text" @click="delMini(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "List",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {title: ""},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
newPage: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
{label: "标题", prop: "title", align: "center"},
|
||||
{label: "地区", prop: "areaName", align: "center", width: '150px'},
|
||||
{label: "浏览次数", prop: "viewCount", align: "center", width: '100px'},
|
||||
{label: "发布人", prop: "createUserName", align: "center", width: '100px'},
|
||||
{label: "发布时间", prop: "createTime", align: "center", width: '100px'},
|
||||
{slot: "options"}
|
||||
],
|
||||
colConfigsNew: [
|
||||
{label: "分类名称", prop: "categoryName", align: "center"},
|
||||
{slot: "options"}
|
||||
],
|
||||
ids: [],
|
||||
dialog: false,
|
||||
form: {},
|
||||
rules: {
|
||||
categoryName: '',
|
||||
showIndex: [{required: true, message: "请输入排序", trigger: "change"}],
|
||||
},
|
||||
typeList: [], //大分类模块
|
||||
miniTypeList: [], //模块子
|
||||
newTypeList: [], //文章分类
|
||||
type: 0, //0、宣传板块;1、宣传模块;2、文章分类
|
||||
dialogTitle: '',
|
||||
addLabelText: '',
|
||||
parentId: '',
|
||||
typeIndex: 0,
|
||||
miniTypeIndex: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/app/apppublicityinfo/list", null, {
|
||||
params: {...this.page, ...this.search, moduleId: this.miniTypeList[this.miniTypeIndex].id || ''}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
showEdit(id) {
|
||||
this.$router.push({query: {id: id, parentId: this.typeList[this.typeIndex].id, moduleId: this.miniTypeList[this.miniTypeIndex].id}, hash: "#add"})
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否删除该条宣传资讯信息").then(() => {
|
||||
this.instance.post("/app/apppublicityinfo/delete", null, {
|
||||
params: {ids: ids?.toString()}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("删除成功!")
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
handleChange(value) {
|
||||
this.form.showIndex = value
|
||||
},
|
||||
submitDialog() {
|
||||
this.$refs.DialogForm.validate(v => {
|
||||
if (v) {
|
||||
this.form.categoryType = this.type
|
||||
this.form.parentId = this.parentId
|
||||
this.instance.post(`/app/apppublicitycategory/addPublicityCategory`, this.form).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('添加成功');
|
||||
if(this.type == 0) {
|
||||
this.getTypeList()
|
||||
}
|
||||
if(this.type == 1) {
|
||||
this.getMiniTypeList(this.typeList[this.typeIndex].id)
|
||||
}
|
||||
this.dialog = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
addType(e, index, parentId) {
|
||||
this.type = e
|
||||
this.parentId = parentId
|
||||
this.form.showIndex = index
|
||||
this.dialogTitle = ['宣传板本', '宣传模块', '文章分类'][e]
|
||||
this.addLabelText = ['板本名称', '模块名称', '分类名称'][e]
|
||||
this.rules.categoryName = [{required: true, message: "请输入"+this.addLabelText, trigger: "change"}]
|
||||
this.dialog = true
|
||||
},
|
||||
getTypeList() {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=0&size=100`).then(res => {
|
||||
if (res.code == 0 && res.data.records && res.data.records.length) {
|
||||
this.typeList = res.data.records
|
||||
this.getMiniTypeList(res.data.records[0].id)
|
||||
}
|
||||
})
|
||||
},
|
||||
getMiniTypeList(parentId) {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=1&size=100&parentId=${parentId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.miniTypeList = res.data.records
|
||||
if(res.data.records && res.data.records.length) {
|
||||
this.miniTypeClick(0)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getNewTypeList(parentId) {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=2&size=10&parentId=${parentId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.newTypeList = res.data.records
|
||||
this.newPage.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
typeClick(e) {
|
||||
this.typeIndex = e
|
||||
this.getMiniTypeList(this.typeList[e].id)
|
||||
},
|
||||
miniTypeClick(e) {
|
||||
this.miniTypeIndex = e
|
||||
this.current = 1
|
||||
this.tableData = []
|
||||
this.getTableData()
|
||||
},
|
||||
editMini(index) {
|
||||
this.form = {...this.miniTypeList[index]}
|
||||
this.addType(this.miniTypeList[index].categoryType, this.miniTypeList[index].showIndex, this.typeList[this.typeIndex].id)
|
||||
},
|
||||
delMini(id) {
|
||||
this.$confirm("确认删除", {
|
||||
type: 'error'
|
||||
}).then(() => {
|
||||
this.instance.post(`/app/apppublicitycategory/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功');
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.$message.error(err);
|
||||
})
|
||||
})
|
||||
},
|
||||
addNewType(index) {
|
||||
this.getNewTypeList(this.miniTypeList[index].id)
|
||||
this.addType(2, '', this.miniTypeList[index].id)
|
||||
},
|
||||
editNew(row) {
|
||||
this.form = {...row}
|
||||
this.addType(2, '', row.parentId)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.getTypeList()
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.List {
|
||||
height: 100%;
|
||||
.flex{
|
||||
display: flex;
|
||||
.type{
|
||||
width: 250px;
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
.title{
|
||||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 0 16px;
|
||||
font-weight: 600;
|
||||
span{
|
||||
color: #26f;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
.item{
|
||||
padding: 0 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
.text{
|
||||
width: calc(100% - 70px);
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon{
|
||||
width: 70px;
|
||||
text-align: right;
|
||||
i{
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.el-icon-delete{
|
||||
color: #f46;
|
||||
}
|
||||
.el-icon-circle-plus-outline{
|
||||
color: #26f;
|
||||
}
|
||||
}
|
||||
}
|
||||
.active{
|
||||
// color: #26f;
|
||||
background-color: #f3f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mini-type{
|
||||
margin-right: 16px;
|
||||
}
|
||||
.content{
|
||||
width: calc(100% - 516px);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
142
project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue
Normal file
142
project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<section class="AppPolicyBid">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="政策申办数据统计" isShowBottomBorder></ai-title>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select placeholder="所属部门" v-model="search.department" @change="page.current=1,getTableData()" :selectList="departmentList"/>
|
||||
<ai-select placeholder="所属分类" v-model="search.classificationName" :selectList="classList" @change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="申请人/申请主体/事项名称" v-model="search.name" clearable @change="page.current=1,getTableData()"/>
|
||||
<ai-import
|
||||
ref="import"
|
||||
title="导入"
|
||||
name="政策申办数据统计"
|
||||
url="/appzwspstatistics/downloadTemplate"
|
||||
importUrl="/appzwspstatistics/import"
|
||||
suffixName="xlsx"
|
||||
:customCliker="true"
|
||||
:instance="instance"
|
||||
>
|
||||
<template slot="tips">
|
||||
<p>
|
||||
如果表格中已经存在数据,则会被本次导入的数据覆盖;不存在数据,系统将生成新的标准记录;
|
||||
</p>
|
||||
</template>
|
||||
<el-button size="small" icon="iconfont iconImport"
|
||||
>导入</el-button
|
||||
>
|
||||
</ai-import>
|
||||
<ai-download :instance="instance" url="/appzwspstatistics/export" :params="search" fileName="政策申办数据统计" :disabled="tableData.length == 0">
|
||||
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
|
||||
</ai-download>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="showDetail(row)" v-if="row.zwspId">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="dialog=false" @onConfirm="dialog=false" width="800px">
|
||||
<img class="pdf-img" :src="dialogImgUrl" alt="">
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppPolicyBid",
|
||||
label: "政策申办数据统计",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {name: '', classificationName: '', department: ''},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
{label: "申请人/申请主体", prop: "name", align: "center", width: '200px'},
|
||||
{label: "事项名称", prop: "processName", align: "center"},
|
||||
{label: "所属分类", prop: "classificationName", align: "center"},
|
||||
{label: "所属部门/机构", prop: "department", align: "center", width: '120px'},
|
||||
{label: "意向金额(万)", prop: "intendedAmount", align: "center", width: '120px'},
|
||||
{label: "放款金额(万)", prop: "loanAmount", align: "center", width: '120px'},
|
||||
{label: "申请日期", prop: "applyDate", align: "center", width: '120px'},
|
||||
{label: "放款日期", prop: "loanDate", align: "center", width: '120px'},
|
||||
{slot: "options"}
|
||||
],
|
||||
dialog: false,
|
||||
dialogTitle: '',
|
||||
classList: [],
|
||||
departmentList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/appzwspstatistics/list", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
showDetail(row) {
|
||||
this.dialogTitle = row.processName
|
||||
this.dialogImgUrl = row.zwspPictureUrl
|
||||
this.dialog = true
|
||||
},
|
||||
getClassTypeList() {
|
||||
this.instance.post("/zwspapprovalclassification/list?size=100").then(res => {
|
||||
if (res?.data) {
|
||||
res.data.records.map((item) => {
|
||||
item.dictName = item.name
|
||||
item.dictValue = item.name
|
||||
})
|
||||
this.classList = res.data.records
|
||||
}
|
||||
})
|
||||
this.instance.post("/appfinancialorganization/list?size=100").then(res => {
|
||||
if (res?.data) {
|
||||
res.data.records.map((item) => {
|
||||
item.dictName = item.organizationName
|
||||
item.dictValue = item.organizationName
|
||||
})
|
||||
this.departmentList = res.data.records
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getClassTypeList()
|
||||
this.dict.load("sex").then(() => {
|
||||
this.getTableData()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppPolicyBid {
|
||||
height: 100%;
|
||||
.pdf-img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user