Files
dvcp_v2_wxcp_app/src/sass/AppSpecialPeople/add.vue

455 lines
14 KiB
Vue
Raw Normal View History

2022-01-25 16:31:39 +08:00
<template>
<div class="add">
2022-01-27 15:23:21 +08:00
<div class="pad-l32">
<div class="item">
<span class="label"><span class="tips">*</span>类型</span>
<div class="value" @click="selectClick('houselivingStatus', 'livingStatus')">
<span :class="form.livingStatus === '' ? 'color-999' : ''">{{ $dict.getLabel('houselivingStatus', form.livingStatus) || '请选择'}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="item">
<span class="label"><span class="tips">*</span>姓名</span>
<div class="value">
<u-input type="text" placeholder="请输入" v-model="form.houseArea" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" />
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="item">
<span class="label"><span class="tips">*</span>身份证号</span>
<div class="value">
<u-input type="idcard" placeholder="请输入" v-model="form.houseArea" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" />
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="item">
<span class="label"><span class="tips">*</span>性别</span>
<div class="value" @click="selectClick('houselivingStatus', 'livingStatus')">
<span :class="form.livingStatus === '' ? 'color-999' : ''">{{ $dict.getLabel('houselivingStatus', form.livingStatus) || '请选择'}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="item">
<span class="label"><span class="tips">*</span>出生日期</span>
<div class="value" @click="selectTime('startDate')">
<span :class="form.startDate === '' ? 'color-999' : ''">{{ $dateFormat(form.startDate,'YYYY-MM-DD') || '请选择' }}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="item">
<span class="label"><span class="tips">*</span>联系电话</span>
<div class="value">
<u-input type="number" placeholder="请输入" v-model="form.houseArea" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="11" :clearable="false" />
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="item">
<span class="label"><span class="tips">*</span>所属区域</span>
<div class="value">
<u-input type="text" placeholder="请输入" v-model="form.houseArea" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15"/>
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="item">
<span class="label"><span class="tips">*</span>详细地址</span>
<div class="value">
<u-input type="text" placeholder="请输入" v-model="form.houseArea" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15"/>
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="item">
<span class="label"><span class="tips">*</span>所属网格</span>
<div class="value">
<u-input type="text" placeholder="请输入" v-model="form.houseArea" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15"/>
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 10:37:45 +08:00
2022-01-27 15:23:21 +08:00
<div v-for="(item, index) in tableData[tableIndex].list" :key="index">
<div class="item" v-if="item.type == 'input'">
<span class="label"><span class="tips"></span>{{item.label}}</span>
<div class="value">
<u-input type="text" placeholder="请输入" v-model="form[item.formDbName]" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" />
</div>
2022-01-26 17:39:53 +08:00
</div>
2022-01-27 15:23:21 +08:00
<div class="item" v-if="item.type == 'select'">
<span class="label"><span class="tips"></span>{{item.label}}</span>
<div class="value" @click="selectClick(item.dict, item.formDbName)">
<span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{ $dict.getLabel(item.dict, form[item.formDbName]) || '请选择'}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
2022-01-26 17:39:53 +08:00
</div>
2022-01-27 15:23:21 +08:00
<div class="item" v-if="item.type == 'time'">
<span class="label"><span class="tips"></span>{{item.label}}</span>
<div class="value" @click="selectTime(item.formDbName)">
<span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{ $dateFormat(form[item.formDbName],'YYYY-MM-DD') || '请选择' }}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
2022-01-26 17:39:53 +08:00
</div>
2022-01-27 15:23:21 +08:00
2022-01-26 17:39:53 +08:00
</div>
</div>
2022-01-27 15:23:21 +08:00
<div class="footer" @click="submit">
<div class="btn">保存</div>
2022-01-26 17:39:53 +08:00
</div>
2022-01-27 10:37:45 +08:00
2022-01-27 15:23:21 +08:00
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择</u-picker>
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue" @confirm="confirmRelation"/>
2022-01-25 16:31:39 +08:00
</div>
</template>
<script>
2022-01-27 15:23:21 +08:00
import {mapActions, mapState} from 'vuex'
2022-01-26 16:47:49 +08:00
2022-01-25 16:31:39 +08:00
export default {
data() {
return {
2022-01-26 17:39:53 +08:00
form: {
2022-01-27 10:52:07 +08:00
},
2022-01-27 15:23:21 +08:00
dateShow: false,
deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false},
showSelect: false,
selectDict: '',
selectName: '',
tableIndex: 4,
tableData: [
{
list: [ // 精神病人
{
label: '是否累犯',
type: 'select',
dict: 'shouseholdRelation',
formDbName: 'shouseholdRelation'
},
{
label: '原罪名',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '服刑场所',
type: 'input',
formDbName: 'value'
},
{
label: '危险性评估',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
},
{
label: '安置情况',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
},
{
label: '安置时间',
type: 'time',
formDbName: 'houselivingStatus',
},
{
label: '衔接情况',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
},
{
label: '衔接时间',
type: 'time',
formDbName: 'houselivingStatus',
},
{
label: '是否重新犯罪',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
},
]
},
{
list: [ // 残疾人
{
label: '家庭年收入(万)',
type: 'input',
formDbName: 'income'
},
{
label: '婚姻情况',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '身体状况',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '残疾类型',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '残疾级别',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
]
},
{
list: [ // 社区矫正人群
{
label: '具体罪名',
type: 'input',
formDbName: 'charge'
},
{
label: '矫正类别',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '矫正开始日期',
type: 'time',
formDbName: 'houselivingStatus',
},
{
label: '矫正结束日期',
type: 'time',
formDbName: 'houselivingStatus',
},
{
label: '是否建立矫正小组',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
},
{
label: '是否托管',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
}
]
},
{
list: [ // 戒毒人员
{
label: '初次发现日期',
type: 'time',
formDbName: 'houselivingStatus',
},
{
label: '吸毒状态',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
},
{
label: '戒毒情况',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
},
{
label: '管控情况',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus',
},
{
label: '管控人姓名',
type: 'input',
formDbName: 'name'
},
{
label: '管控人联系方式',
type: 'input',
formDbName: 'phone'
},
{
label: '有无犯罪史',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
]
},
{
list: [ // 刑满释放
{
label: '是否累犯',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '原罪名',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '服刑场所',
type: 'input',
formDbName: 'houselivingStatus'
},
{
label: '危险性评估',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '安置情况',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '安置时间',
type: 'time',
formDbName: 'houselivingStatus'
},
{
label: '衔接情况',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
{
label: '衔接时间',
type: 'time',
formDbName: 'houselivingStatus'
},
{
label: '是否重新犯罪',
type: 'select',
dict: 'houselivingStatus',
formDbName: 'houselivingStatus'
},
]
}
],
selectList: []
2022-01-25 16:31:39 +08:00
}
},
2022-01-27 15:23:21 +08:00
computed: {...mapState(['user'])},
created() {
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
// this.getDetail()
})
2022-01-27 10:37:45 +08:00
},
2022-01-25 16:31:39 +08:00
onShow() {
document.title = '新增人员'
},
2022-01-27 15:23:21 +08:00
methods: {
submit() {
this.$http.post(`app/appcommunityform/update`, this.form).then(res => {
if (res?.code == 0) {
this.$u.toast('提交成功')
setTimeout(() => {
uni.navigateBack({})
}, 600)
}
})
},
selectClick(dictName, formName) {
console.log(dictName)
this.selectList = this.$dict.getDict(dictName)
this.dictName = dictName
this.selectName = formName
this.showSelect = true
},
confirmSelect(e) {
this.form[this.selectName] = e[0].value
},
selectTime(formName) {
this.selectName = formName
this.dateShow = true
},
dateConfirm(e) {
this.form[this.selectName] = `${e.year}-${e.month}-${e.day} 00:00:00`
}
}
2022-01-25 16:31:39 +08:00
}
</script>
<style lang="scss" scoped>
.add {
2022-01-27 15:23:21 +08:00
padding-bottom: 112px;
2022-01-26 17:39:53 +08:00
2022-01-27 15:23:21 +08:00
.item {
width: 100%;
padding: 34px 32px 34px 0;
background: #FFFFFF;
border-bottom: 1px solid #D8DDE6;
display: flex;
justify-content: space-between;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 44px;
box-sizing: border-box;
2022-01-26 17:39:53 +08:00
2022-01-27 15:23:21 +08:00
.color-999 {
color: #999;
}
2022-01-26 17:39:53 +08:00
2022-01-27 15:23:21 +08:00
.value {
.u-icon {
margin-left: 16px;
2022-01-26 17:39:53 +08:00
}
2022-01-27 15:23:21 +08:00
}
2022-01-26 17:39:53 +08:00
2022-01-27 15:23:21 +08:00
.tips{
display: inline-block;
width: 16px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #F46;
line-height: 44px;
2022-01-26 17:39:53 +08:00
}
2022-01-27 15:23:21 +08:00
}
2022-01-26 17:39:53 +08:00
2022-01-27 15:23:21 +08:00
.footer {
width: 100%;
2022-01-25 16:31:39 +08:00
position: fixed;
bottom: 0;
2022-01-27 15:23:21 +08:00
left: 0;
}
.btn {
2022-01-25 16:31:39 +08:00
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
2022-01-27 15:23:21 +08:00
background: #1365DD;
2022-01-25 16:31:39 +08:00
font-size: 32px;
2022-01-27 15:23:21 +08:00
font-family: PingFangSC-Medium, PingFang SC;
2022-01-25 16:31:39 +08:00
font-weight: 500;
2022-01-27 15:23:21 +08:00
color: #FFF;
}
.line-bg {
width: 100%;
height: 16px;
background: #F5F5F5;
}
.pad-l32 {
padding-left: 32px;
background-color: #fff;
2022-01-25 16:31:39 +08:00
}
}
2022-01-26 16:47:49 +08:00
</style>