@ -1,7 +1,7 @@ |
|||
NODE_ENV=production |
|||
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api |
|||
# VUE_APP_API_SERVER = http://192.168.1.140/api |
|||
VUE_APP_API_SERVER = http://219.146.91.110:30801/api |
|||
# VUE_APP_API_SERVER = http://192.168.1.60:8080/api |
|||
VUE_APP_BIPASS_API_SERVER = http://dcommunity-dev.elinkservice.cn:30801/linkdata/linkdata-gateway/route |
|||
VUE_APP_NODE_ENV=prod:sit |
|||
VUE_APP_PUBLIC_PATH=epmet-oper |
|||
|
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 2.9 KiB |
@ -0,0 +1,73 @@ |
|||
.div_form { |
|||
height: 100%; |
|||
padding:16px; |
|||
.item_width_1{ |
|||
width: 498px; |
|||
} |
|||
.form{ |
|||
background-color: #fff; |
|||
padding:16px; |
|||
.flex_box{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
.flex_item_width1{ |
|||
width: 332px; |
|||
} |
|||
.flex_item_width2{ |
|||
width: 700px; |
|||
} |
|||
.flex_item_width3{ |
|||
width: 120px; |
|||
} |
|||
.flex_item_width4{ |
|||
width: 300px; |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
|||
h5 { |
|||
position: relative; |
|||
font-size: 16px; |
|||
margin: 22px 0; |
|||
&::after { |
|||
content: ""; |
|||
position: absolute; |
|||
display: inline-block; |
|||
left: -15px; |
|||
top: -0px; |
|||
width: 5px; |
|||
height: 16px; |
|||
background-color: #0056d6; |
|||
} |
|||
} |
|||
.basicInfo, .house, .expand { |
|||
::v-deep .el-form-item{ |
|||
margin-bottom: 24px; |
|||
} |
|||
} |
|||
.font-color-orange{ |
|||
::v-deep .el-form-item__label{ |
|||
color:#ff5107 ; |
|||
} |
|||
} |
|||
.font-color-blue{ |
|||
::v-deep .el-form-item__label{ |
|||
color:#3876f2; |
|||
position: relative; |
|||
&::before{ |
|||
content: '*'; |
|||
position: absolute; |
|||
top: 0px; |
|||
left: 16px; |
|||
} |
|||
} |
|||
} |
|||
.font-color-blue2{ |
|||
::v-deep .el-form-item__label{ |
|||
&::before{ |
|||
left: 2px; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,151 @@ |
|||
.g-main{ |
|||
display: flex; |
|||
box-sizing: border-box; |
|||
height:auto; |
|||
padding: 24px 16px 0; |
|||
.left{ |
|||
min-width: 184px; |
|||
margin-right: 16px; |
|||
background: #ffffff; |
|||
.user{ |
|||
display: flex; |
|||
flex-direction: column; |
|||
height: 120px; |
|||
justify-content: center; |
|||
align-items: center; |
|||
position: relative; |
|||
font-weight: bold; |
|||
color: #000000; |
|||
&::after{ |
|||
content: ''; |
|||
position: absolute; |
|||
bottom: 0; |
|||
left: 16px; |
|||
width: 152px; |
|||
height: 1px; |
|||
background: #EBEDF0; |
|||
} |
|||
img{ |
|||
width: 50px; |
|||
height: 56px; |
|||
margin-bottom: 10px; |
|||
} |
|||
|
|||
} |
|||
.menu{ |
|||
.progress{ |
|||
padding: 0 16px; |
|||
box-sizing: border-box; |
|||
.text{ |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
margin:9px 0px 11px 0px; |
|||
font-size: 12px; |
|||
>:nth-child(2){ |
|||
color: #0056D6; |
|||
font-size: 14px; |
|||
font-weight: bold; |
|||
} |
|||
} |
|||
} |
|||
.list{ |
|||
margin-top:14px ; |
|||
.item{ |
|||
margin-bottom: 8px; |
|||
height: 38px; |
|||
color: #333333; |
|||
padding-left: 16px; |
|||
cursor: pointer; |
|||
line-height: 38px; |
|||
.full{ |
|||
color: #0056d6; |
|||
} |
|||
.incomplete{ |
|||
color: #ff5107; |
|||
} |
|||
} |
|||
|
|||
.active{ |
|||
background: #F7FAFF; |
|||
color: #0056D6 !important; |
|||
position: relative; |
|||
&::after{ |
|||
content: ''; |
|||
position: absolute; |
|||
right: 0; |
|||
width: 4px; |
|||
height: 37px; |
|||
background: #0056D6; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.right{ |
|||
flex: 1; |
|||
width: 100%; |
|||
height: 100%; |
|||
background: #ffffff; |
|||
position: relative; |
|||
padding-bottom: 16px; |
|||
.editBtn{ |
|||
z-index: 10; |
|||
position: absolute; |
|||
right: 16px; |
|||
top: 16px; |
|||
} |
|||
.title-small{ |
|||
font-size: 16px; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
position: relative; |
|||
padding-left: 11px; |
|||
margin-left: 0px; |
|||
margin-top: 22px; |
|||
} |
|||
.flex_box{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
|
|||
.f-flex{ |
|||
margin-top: 23px; |
|||
width: 332px; |
|||
align-items: center; |
|||
.f-label { |
|||
width: 100px; |
|||
text-align: right; |
|||
color: rgba(51, 51, 51, .85) ; |
|||
>b{ |
|||
font-weight: 400; |
|||
position: relative; |
|||
color: rgba(51, 51, 51, .85) ; |
|||
|
|||
&::after{ |
|||
content: '*'; |
|||
position: absolute; |
|||
top: 0px; |
|||
color: #ff5107; |
|||
left: -7px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
.f-labels{ |
|||
width: 155px; |
|||
text-align: right; |
|||
} |
|||
.f-m-top23{ |
|||
margin-top: 23px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
::v-deep .el-button--text{ |
|||
padding: 0; |
|||
} |
|||
|
@ -0,0 +1,110 @@ |
|||
.m-detail-main { |
|||
padding: 20px 20px 0; |
|||
.title-small{ |
|||
position: relative; |
|||
&::after{ |
|||
content: ''; |
|||
width: 4px; |
|||
height: 16px; |
|||
background-color: #0056d6; |
|||
position: absolute; |
|||
left: -20px; |
|||
top: 0px; |
|||
} |
|||
} |
|||
} |
|||
.font_color_red{ |
|||
color: red; |
|||
} |
|||
.content_box{ |
|||
display: flex; |
|||
.left{ |
|||
width: 50%; |
|||
.rotate{ |
|||
animation: rotate 5s infinite linear; |
|||
} |
|||
.u-item-width-normal{ |
|||
width: 240px; |
|||
} |
|||
.text-center{ |
|||
width: calc( 100% - 20px); |
|||
height: 175px; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
.el-upload__text{ |
|||
color: #c5c9d1; |
|||
width: 100%; |
|||
} |
|||
/deep/ .el-upload { |
|||
width: 100%; |
|||
.el-upload-dragger{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.right{ |
|||
padding: 15px; |
|||
width: 50%; |
|||
background: #f5f7fa; |
|||
border-radius: 3px; |
|||
h4{ |
|||
margin-top: 0; |
|||
line-height: 19px; |
|||
} |
|||
.textBtn{ |
|||
padding: 0px; |
|||
margin: 0 5px; |
|||
} |
|||
} |
|||
|
|||
} |
|||
.steps { |
|||
width: 80%; |
|||
/deep/ .el-step__main { |
|||
position: absolute; |
|||
left: 24px; |
|||
top: -5px; |
|||
z-index: 10; |
|||
background: #fff; |
|||
width: 100px; |
|||
padding-left: 10px; |
|||
} |
|||
/deep/ .is-finish { |
|||
.el-step__icon { |
|||
background: #0056d6; |
|||
color: #fff; |
|||
} |
|||
} |
|||
/deep/ .is-process { |
|||
color: #000; |
|||
font-weight: 400; |
|||
.el-step__icon { |
|||
background: #cbcbcb; |
|||
color: #fff; |
|||
border-color: #cbcbcb; |
|||
} |
|||
} |
|||
/deep/ .is-wait { |
|||
color: #000; |
|||
.el-step__icon { |
|||
background: #cbcbcb; |
|||
color: #fff; |
|||
border-color: #cbcbcb; |
|||
} |
|||
} |
|||
/deep/ .el-step__description{ |
|||
width: 300px; |
|||
color: #666666; |
|||
} |
|||
|
|||
} |
|||
@keyframes rotate { |
|||
from { |
|||
transform: rotate(0deg); |
|||
} |
|||
to { |
|||
transform: rotate(-360deg); |
|||
} |
|||
} |
@ -0,0 +1,950 @@ |
|||
<template> |
|||
<div :id="formId" |
|||
class="resi-container"> |
|||
<el-form :ref="formId" |
|||
class="resi-form" |
|||
:model="form" |
|||
:rules="rulesForm" |
|||
:label-width="labelWidth"> |
|||
<template v-if="supportAdd"> |
|||
<el-row style="margin-bottom: 10px;"> |
|||
<el-col :span="24"> |
|||
<el-button icon="el-icon-plus" |
|||
size="small" |
|||
@click="handleAddRow"></el-button> |
|||
</el-col> |
|||
</el-row> |
|||
<edit-form v-for="(item, index) in addList" |
|||
:key="index" |
|||
:ref="'baseForms' + index" |
|||
:columns="3" |
|||
:form-list="item.itemList || formList" |
|||
:form-id="'baseForms' + item.row" /> |
|||
</template> |
|||
<template v-else> |
|||
<el-row v-if="fixed" |
|||
class="resi-row"> |
|||
<!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> --> |
|||
<el-col :span="6"> |
|||
<el-form-item prop="GRID_ID" |
|||
label="所属网格"> |
|||
<!-- <div class="resi-cell"> --> |
|||
<!-- <div class="resi-cell-label">{{n.label}}</div> --> |
|||
<div class="resi-cell-value"> |
|||
<el-select v-model.trim="form.GRID_ID" |
|||
:disabled="disabled" |
|||
placeholder="请选择网格" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select" |
|||
@change="handleChangeGrid"> |
|||
<el-option v-for="item in optionsG" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</div> |
|||
<!-- </div> --> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="18"> |
|||
<el-form-item label="所属房屋" |
|||
required> |
|||
<div class="resi-cell-value"> |
|||
<div class="resi-cell-col"> |
|||
<el-form-item prop="VILLAGE_ID"> |
|||
<el-select v-model.trim="form.VILLAGE_ID" |
|||
placeholder="请选择小区" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select" |
|||
:disabled="disabled" |
|||
@change="handleChangeV"> |
|||
<el-option v-for="item in optionsV" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="BUILD_ID"> |
|||
<el-select v-model.trim="form.BUILD_ID" |
|||
placeholder="请选择楼号" |
|||
size="small" |
|||
clearable |
|||
:disabled="disabled" |
|||
class="resi-cell-select resi-cell-select-middle" |
|||
@change="handleChangeB"> |
|||
<el-option v-for="item in optionsB" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="UNIT_ID"> |
|||
<el-select v-model.trim="form.UNIT_ID" |
|||
placeholder="请选择单元" |
|||
size="small" |
|||
clearable |
|||
:disabled="disabled" |
|||
class="resi-cell-select resi-cell-select-middle" |
|||
@change="handleChangeD"> |
|||
<el-option v-for="item in optionsD" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="HOME_ID"> |
|||
<el-select v-model.trim="form.HOME_ID" |
|||
placeholder="请选择房号" |
|||
size="small" |
|||
clearable |
|||
:disabled="disabled" |
|||
class="resi-cell-select resi-cell-select-middle" |
|||
@change="handleChangeH"> |
|||
<el-option v-for="item in optionsH" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</div> |
|||
<!-- <el-col :span="6"> |
|||
|
|||
</el-col> |
|||
<el-col :span="6"> |
|||
|
|||
</el-col> |
|||
<el-col :span="6"> |
|||
|
|||
</el-col> |
|||
<el-col :span="6"> |
|||
|
|||
</el-col> --> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="6"> |
|||
<el-form-item :prop="form.BUILD_ID" label="所属楼宇"> |
|||
<div class="resi-cell-value"> |
|||
<el-select v-model.trim="form.BUILD_ID" :disabled="disabled" placeholder="请选择楼号" size="small" |
|||
clearable class="resi-cell-select" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsB" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item :prop="form.HOME_ID" label="所属家庭"> |
|||
<div class="resi-cell-value"> |
|||
<el-select v-model.trim="form.HOME_ID" :disabled="disabled" placeholder="请选择" size="small" |
|||
clearable class="resi-cell-select" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsH" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
</el-row> |
|||
<el-row v-for="(item, index) in sliceList(formList, columns)" |
|||
:key="index" |
|||
class="resi-row" :class="{'width-40':index==3||index==2||index==4||index==5}"> |
|||
<!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> --> |
|||
<el-col v-for="n in item" |
|||
:key="n.itemId" |
|||
:span="item.length === 1 ? 24 : (24/columns) " |
|||
:style="n.itemType === 'divider' && 'display: none;'"> |
|||
<el-form-item :prop="n.columnName" |
|||
:label="n.itemType != 'radio'?n.label:''"> |
|||
<!-- <div class="resi-cell"> --> |
|||
<!-- <div class="resi-cell-label">{{n.label}}</div> --> |
|||
<div class="resi-cell-value"> |
|||
|
|||
<template v-if="n.itemType === 'input' || n.itemType === 'textarea'"> |
|||
<!-- <span v-if="n.columnName==='MOBILE'||n.columnName==='ID_CARD'">{{ form[n.columnName]||'--'}}</span> --> |
|||
<el-input v-if="n.columnName==='MOBILE'||n.columnName==='ID_CARD'" |
|||
v-model.trim="form[n.columnName]" |
|||
:disabled="disabled" |
|||
class="resi-cell-input" |
|||
size="small" |
|||
clearable |
|||
placeholder="请输入内容"> |
|||
</el-input> |
|||
|
|||
<el-input v-else-if="n.validType" |
|||
v-model.trim="form[n.columnName]" |
|||
:disabled="disabled" |
|||
class="resi-cell-input" |
|||
size="small" |
|||
clearable |
|||
placeholder="请输入内容"> |
|||
</el-input> |
|||
<el-input v-else |
|||
v-model.trim="form[n.columnName]" |
|||
:disabled="disabled" |
|||
class="resi-cell-input" |
|||
size="small" |
|||
clearable |
|||
placeholder="请输入内容"> |
|||
</el-input> |
|||
</template> |
|||
<!-- <template v-if="n.itemType === 'textarea'"> |
|||
<el-input |
|||
v-model.trim="form[n.columnName]" |
|||
class="resi-cell-textarea" |
|||
size="small" |
|||
type="textarea" |
|||
clearable |
|||
placeholder="请输入内容" |
|||
> |
|||
</el-input> |
|||
</template> --> |
|||
<el-date-picker v-else-if="n.itemType === 'datepicker'" |
|||
v-model.trim="form[n.columnName]" |
|||
:disabled="disabled" |
|||
class="resi-cell-input" |
|||
type="date" |
|||
size="small" |
|||
clearable |
|||
placeholder="选择日期" |
|||
format="yyyy 年 MM 月 dd 日" |
|||
value-format="yyyy-MM-dd"> |
|||
</el-date-picker> |
|||
<el-date-picker v-else-if="n.itemType === 'daterange'" |
|||
v-model.trim="form[n.columnName]" |
|||
:disabled="disabled" |
|||
type="daterange" |
|||
align="right" |
|||
unlink-panels |
|||
value-format="yyyy-MM-dd" |
|||
range-separator="至" |
|||
start-placeholder="开始日期" |
|||
end-placeholder="结束日期"> |
|||
</el-date-picker> |
|||
<el-time-picker v-else-if="n.itemType === 'timepicker'" |
|||
v-model.trim="form[n.columnName]" |
|||
:disabled="disabled" |
|||
placeholder="任意时间点"> |
|||
</el-time-picker> |
|||
<el-time-picker v-else-if="n.itemType === 'timerange'" |
|||
v-model.trim="form[n.columnName]" |
|||
:disabled="disabled" |
|||
is-range |
|||
range-separator="至" |
|||
start-placeholder="开始时间" |
|||
end-placeholder="结束时间" |
|||
placeholder="选择时间范围"> |
|||
</el-time-picker> |
|||
<el-select v-else-if="n.itemType === 'select'" |
|||
v-model.trim="form[n.columnName]" |
|||
:multiple="n.multiSelect" |
|||
:disabled="disabled" |
|||
placeholder="请选择" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select"> |
|||
<el-option v-for="item in n.options || options" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value"> |
|||
</el-option> |
|||
</el-select> |
|||
<!-- <el-cascader |
|||
:options="options" |
|||
:props="{ checkStrictly: true }" |
|||
clearable></el-cascader> --> |
|||
<el-cascader v-else-if="n.itemType === 'cascader'" |
|||
v-model.trim="form[n.columnName]" |
|||
:options="n.options" |
|||
:disabled="disabled" |
|||
:props="{ emitPath: false }" |
|||
clearable |
|||
size="small" |
|||
class="resi-cell-select"> |
|||
</el-cascader> |
|||
<template v-else-if="n.itemType === 'radio'"> |
|||
<!-- <el-radio v-for="ns in n.options" |
|||
:key="ns.value" |
|||
v-model.trim="form[n.columnName]" |
|||
:disabled="disabled" |
|||
:label="ns.value"> |
|||
{{ ns.label }} |
|||
</el-radio> --> |
|||
<el-checkbox-group v-model.trim="form[n.columnName]"> |
|||
<el-checkbox |
|||
:key="n.value" |
|||
:label="n.value" |
|||
:disabled="disabled">{{n.label}}</el-checkbox> |
|||
<!-- <el-checkbox label="n.la"></el-checkbox> --> |
|||
</el-checkbox-group> |
|||
<!-- <el-radio v-model.trim="form[n.columnName]" label="1">备选项</el-radio> --> |
|||
</template> |
|||
<template v-else-if="n.itemType === 'checkbox'"> |
|||
<el-checkbox-group v-model.trim="form[n.columnName]"> |
|||
<el-checkbox v-for="ns in n.options" |
|||
:key="ns.value" |
|||
:label="ns.value" |
|||
:disabled="disabled">{{ns.label}}</el-checkbox> |
|||
<!-- <el-checkbox label="n.la"></el-checkbox> --> |
|||
</el-checkbox-group> |
|||
</template> |
|||
</div> |
|||
<!-- </div> --> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</template> |
|||
</el-form> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { isCard, isMobile, isPhone } from '@/utils/validate' |
|||
import { requestPost } from "@/js/dai/request"; |
|||
|
|||
|
|||
export default { |
|||
name: 'editForm', |
|||
props: { |
|||
editUserId: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
fixed: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
labelWidth: { |
|||
type: String, |
|||
default: '100px' |
|||
}, |
|||
formId: { |
|||
type: String, |
|||
default: 'resiForm' |
|||
}, |
|||
agencyId: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
formList: { |
|||
type: Array, |
|||
default: function () { |
|||
return [] |
|||
} |
|||
}, |
|||
formInfo: { |
|||
type: Object, |
|||
default: function () { |
|||
return {} |
|||
} |
|||
}, |
|||
mutiList: { |
|||
type: Array, |
|||
default: function () { |
|||
return [] |
|||
} |
|||
}, |
|||
// 渲染一行几列 |
|||
columns: { |
|||
type: Number, |
|||
default: 3 |
|||
}, |
|||
supportAdd: { // 单表多条数据 |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
disabled: { // 单表多条数据 |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data () { |
|||
// let form = {} |
|||
// let rules = {} |
|||
let checkMObile = (rule, value, callback) => { |
|||
if (value === '') { |
|||
callback(new Error('请输入联系电话')) |
|||
} else { |
|||
if (!isMobile(value) && !isPhone(value)) { |
|||
callback(new Error('联系电话格式不正确')) |
|||
} |
|||
callback() |
|||
} |
|||
} |
|||
let checkIdCard = (rule, value, callback) => { |
|||
if (value === '') { |
|||
callback(new Error('请输入证件号')) |
|||
} else { |
|||
if (!isCard(value)) { |
|||
callback(new Error('请输入正确的证件号或护照号')) |
|||
} |
|||
callback() |
|||
} |
|||
} |
|||
let initForm = (obj, arr) => { |
|||
let _form = {} |
|||
// console.log('formInfo', obj) |
|||
if (Object.keys(obj).length > 0) { |
|||
_form = { ...obj } |
|||
// return _form |
|||
} |
|||
const itemTypes = ['daterange', 'timerange'] |
|||
arr.forEach(item => { |
|||
if (item.multiSelect || itemTypes.includes(item.itemType)) { |
|||
if (item.columnValue && item.columnValue.indexOf(',') > -1) _form[item.columnName] = item.columnValue.split(',') |
|||
else _form[item.columnName] = (item.columnValue && [item.columnValue]) || [] |
|||
} else _form[item.columnName] = item.columnValue || '' |
|||
}) |
|||
// console.log('_from0000---', arr) |
|||
return _form |
|||
} |
|||
let initRules = (arr) => { |
|||
let rules = {} |
|||
arr.forEach(item => { |
|||
if (item.required) { |
|||
if (item.validType === 'mobile') { |
|||
rules[item.columnName] = [ |
|||
{ required: true, validator: checkMObile, trigger: 'blur' } |
|||
] |
|||
} else if (item.validType === 'id_card') { |
|||
rules[item.columnName] = [ |
|||
{ required: true, validator: checkIdCard, trigger: 'blur' } |
|||
] |
|||
} else { |
|||
rules[item.columnName] = [ |
|||
{ required: true, message: `请输入${item.label}`, trigger: 'blur' } |
|||
] |
|||
} |
|||
} |
|||
}) |
|||
return rules |
|||
} |
|||
let form = initForm(this.formInfo, this.formList) |
|||
let rules = initRules(this.formList) |
|||
let tempFormList = [...this.formList] |
|||
let constForm = { |
|||
...form |
|||
} |
|||
console.log('-----------------哈哈哈哈哈哈rules', rules) |
|||
return { |
|||
openSearch: false, |
|||
fixedForm: { |
|||
GRID_ID: '', |
|||
VILLAGE_ID: '', |
|||
BUILD_ID: '', |
|||
UNIT_ID: '', |
|||
HOME_ID: '' |
|||
}, |
|||
fixedList: {}, |
|||
form: { |
|||
...form |
|||
}, |
|||
constForm, |
|||
tempFormList, |
|||
addCount: 0, |
|||
addList: [], |
|||
rulesForm: { |
|||
...rules, |
|||
VILLAGE_ID: [{ required: true, message: `请选择小区`, trigger: 'blur' }], |
|||
GRID_ID: [{ required: true, message: `请选择网格`, trigger: 'blur' }], |
|||
BUILD_ID: [{ required: true, message: `请选择楼号`, trigger: 'blur' }], |
|||
UNIT_ID: [{ required: true, message: `请选择单元`, trigger: 'blur' }], |
|||
HOME_ID: [{ required: true, message: `请选择房号`, trigger: 'blur' }] |
|||
}, |
|||
// rules, |
|||
value: '', |
|||
optionsV: [], |
|||
optionsB: [], |
|||
optionsH: [], |
|||
optionsG: [], |
|||
optionsD: [], |
|||
pickerOptions: { |
|||
shortcuts: [{ |
|||
text: '最近一周', |
|||
onClick (picker) { |
|||
const end = new Date() |
|||
const start = new Date() |
|||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) |
|||
picker.$emit('pick', [start, end]) |
|||
} |
|||
}, { |
|||
text: '最近一个月', |
|||
onClick (picker) { |
|||
const end = new Date() |
|||
const start = new Date() |
|||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) |
|||
picker.$emit('pick', [start, end]) |
|||
} |
|||
}, { |
|||
text: '最近三个月', |
|||
onClick (picker) { |
|||
const end = new Date() |
|||
const start = new Date() |
|||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) |
|||
picker.$emit('pick', [start, end]) |
|||
} |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
sliceList () { |
|||
return function (data, count) { |
|||
if (data !== undefined) { |
|||
let index = 0 |
|||
let arrTemp = [] |
|||
let arrTemp1 = [] |
|||
let arr1 = [] |
|||
let arr2 = [] |
|||
let _i = 0 |
|||
let _index = 0 |
|||
for (let i = 0; i < data.length; i++) { |
|||
if (data[i].itemType === 'divider' || data[i].itemType === 'checkbox') { |
|||
_i = i + 1 |
|||
} |
|||
} |
|||
arr1 = data.slice(0, _i) |
|||
arr2 = data.slice(_i, data.length) |
|||
for (let i = 0; i < arr1.length; i++) { |
|||
index = parseInt(i / count) |
|||
if (arrTemp.length <= index) { |
|||
arrTemp.push([]) |
|||
} |
|||
arrTemp[index].push(arr1[i]) |
|||
} |
|||
for (let i = 0; i < arr2.length; i++) { |
|||
_index = parseInt(i / count) |
|||
if (arrTemp1.length <= _index) { |
|||
arrTemp1.push([]) |
|||
} |
|||
arrTemp1[_index].push(arr2[i]) |
|||
} |
|||
arrTemp = arrTemp.concat(arrTemp1) |
|||
return arrTemp |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
watch: { |
|||
form: { |
|||
handler (val, val2) { |
|||
console.log('valpppp----', val, val2) |
|||
for (let n in val) { |
|||
if (this.constForm[n] !== val[n]) { |
|||
this.handleChangeForm(n) |
|||
console.log('nnnnnn', n) |
|||
this.handleChangeGroup(n, val[n]) |
|||
} |
|||
} |
|||
this.constForm = { ...val } |
|||
}, |
|||
deep: true |
|||
} |
|||
}, |
|||
created () { |
|||
this.initForm() |
|||
console.log('formInfo---gggreg', this.rulesForm) |
|||
console.log('formList', this.formList) |
|||
if (this.supportAdd) { |
|||
this.addList = [...this.mutiList] |
|||
// console.log('addList----111', this.addList) |
|||
} |
|||
if (this.fixed) { |
|||
this.getGridList() |
|||
this.getValiheList() |
|||
this.getBuildList() |
|||
this.getUniList() |
|||
this.getHouseList() |
|||
} |
|||
|
|||
}, |
|||
mounted () { |
|||
console.log('this.editUserId', this.editUserId) |
|||
if (this.editUserId) { |
|||
this.handleTuomin() |
|||
} |
|||
|
|||
}, |
|||
methods: { |
|||
async handleTuomin () { |
|||
|
|||
const url = "/data/aggregator/epmetuser/detailByType"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
id: this.editUserId, |
|||
type: "checkIcResiUser", |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
this.$set(this.form, 'MOBILE', data.mobile) |
|||
this.$set(this.form, 'ID_CARD', data.idCard) |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
|
|||
|
|||
}, |
|||
initForm () { |
|||
this.formList.forEach(async item => { |
|||
if (item.optionSourceType === 'remote') { |
|||
await this.getOptionsLists(item.optionSourceValue).then(res => { |
|||
item.options = this.getTreeData(res) |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
getTreeData (data) { |
|||
if (!Array.isArray(data)) return [] |
|||
let arr = data.map(item => { |
|||
let _item = {} |
|||
if (item.children) { |
|||
if (item.children.length === 0) _item = { ...item, children: undefined } |
|||
else _item = { ...item, children: this.getTreeData(item.children) } |
|||
} else { |
|||
_item = { ...item } |
|||
} |
|||
return _item |
|||
}) |
|||
return arr |
|||
}, |
|||
handleOpenSearch () { |
|||
this.openSearch = !this.openSearch |
|||
}, |
|||
handleAddRow () { |
|||
this.addList.push({ |
|||
row: this.addList.length, |
|||
itemList: this.formList |
|||
}) |
|||
}, |
|||
// 监听固定四列 |
|||
handleFiexedForm (val) { |
|||
let item = { |
|||
[val]: this.fixedForm[val] |
|||
} |
|||
this.fixedList.push(item) |
|||
this.$set(this.fixedList, val, this.fixedForm[val]) |
|||
}, |
|||
// 监听分组 |
|||
handleChangeGroup (columnName, value) { |
|||
this.tempFormList.forEach(item => { |
|||
if (item.columnName === columnName && item.itemType === 'radio' && item.childGroup) { |
|||
console.log('columnName', item.columnName, columnName) |
|||
this.$emit('changegroup', { value, childGroup: item.childGroup }) |
|||
} |
|||
}) |
|||
}, |
|||
// 监听基础form |
|||
handleChangeForm (val) { |
|||
if (this.fixed) { |
|||
for (let n in this.fixedForm) { |
|||
if (n === val) { |
|||
this.$set(this.fixedList, val, this.form[val]) |
|||
} |
|||
} |
|||
} |
|||
this.tempFormList.forEach(item => { |
|||
if (item.columnName === val) item.isChange = true |
|||
}) |
|||
}, |
|||
handleChange () { |
|||
// this.handleForm() |
|||
}, |
|||
handleChangeGrid (val) { |
|||
console.log('val', val) |
|||
this.form.VILLAGE_ID = '' |
|||
this.form.BUILD_ID = '' |
|||
this.form.UNIT_ID = '' |
|||
this.form.HOME_ID = '' |
|||
this.getValiheList() |
|||
this.getBuildList() |
|||
this.getUniList() |
|||
this.getHouseList() |
|||
}, |
|||
handleChangeV (val) { |
|||
console.log('val', val) |
|||
this.form.BUILD_ID = '' |
|||
this.form.UNIT_ID = '' |
|||
this.form.HOME_ID = '' |
|||
this.getBuildList() |
|||
this.getUniList() |
|||
this.getHouseList() |
|||
}, |
|||
handleChangeB (val) { |
|||
console.log('val', val) |
|||
this.form.UNIT_ID = '' |
|||
this.form.HOME_ID = '' |
|||
this.getUniList() |
|||
this.getHouseList() |
|||
}, |
|||
handleChangeD () { |
|||
this.form.HOME_ID = '' |
|||
this.getHouseList() |
|||
}, |
|||
// 为了实现根据房屋类型改版是否租户的需求 |
|||
handleChangeH (val) { |
|||
let item = this.optionsH.find(item => item.value === val); |
|||
if (item && item.type == '1') { |
|||
this.form.IS_TENANT = '1' |
|||
console.log('item-----', item) |
|||
} else this.form.IS_TENANT = '0' |
|||
}, |
|||
handlerMuscForm () { |
|||
let arr = [] |
|||
this.addList.forEach(item => { |
|||
// console.log('handlerMuscForm----000', this.$refs['baseForms' + item.row || item][0].handleForm()) |
|||
arr.push([...this.$refs['baseForms' + item.row][0].handleForm()]) |
|||
}) |
|||
if (arr.length === 0) return arr |
|||
let arr2 = arr.reduce(function (a, b) { return a.concat(b) }) |
|||
let hash = {} |
|||
let i = 0 |
|||
let res = [] |
|||
// let finalArr = [] |
|||
arr2.forEach((item) => { |
|||
let name = item.tableName |
|||
if (hash[name]) { |
|||
res[hash[name] - 1].list.push(...item.list) |
|||
} else { |
|||
hash[name] = ++i |
|||
res.push({ |
|||
list: [...item.list], |
|||
supportAdd: this.supportAdd, |
|||
tableName: name |
|||
}) |
|||
} |
|||
}) |
|||
return res |
|||
}, |
|||
resetForm () { |
|||
this.$refs[this.formId].resetFields() |
|||
}, |
|||
handleForm () { |
|||
let newForm = [] |
|||
this.$refs[this.formId].validate((valid) => { |
|||
if (valid) { |
|||
var hash = {} |
|||
var i = 0 |
|||
var res = [] |
|||
let ID = this.tempFormList[0].ID |
|||
this.tempFormList.forEach(function (item) { |
|||
var name = item.tableName |
|||
hash[name] ? res[hash[name] - 1].list.push(item) : hash[name] = ++i && res.push({ |
|||
list: [item], |
|||
ID: item.ID, |
|||
tableName: name |
|||
}) |
|||
}) |
|||
// console.log('resssssss', res) |
|||
const itemTypes = ['cascader', 'daterange', 'timerange'] |
|||
res.forEach(item => { |
|||
let _form = {} |
|||
item.list.filter(n => n.isChange).forEach(r => { |
|||
_form[r.columnName] = r.multiSelect || itemTypes.includes(r.itemType) ? this.form[r.columnName].toString() : this.form[r.columnName] |
|||
if (r.ID) { |
|||
_form.ID = r.ID |
|||
} |
|||
// return _form |
|||
}) |
|||
if (this.fixed) { |
|||
for (let n in this.fixedList) { |
|||
_form[n] = this.fixedList[n] |
|||
} |
|||
if (Object.keys(_form).length > 0) { |
|||
if (!_form.AGENCY_ID) _form.AGENCY_ID = this.agencyId |
|||
} |
|||
if (!_form.ID) _form.ID = ID |
|||
} |
|||
console.log('objeckeyssss', Object.keys(_form), _form) |
|||
newForm.push({ |
|||
tableName: item.tableName, |
|||
supportAdd: this.supportAdd, |
|||
ID: item.ID, |
|||
list: Object.keys(_form).length > 0 ? [{ ..._form }] : [] |
|||
}) |
|||
}) |
|||
console.log('newFormhhhhh', newForm) |
|||
return newForm |
|||
} else { |
|||
console.log('error submit!!') |
|||
return false |
|||
} |
|||
}) |
|||
if (this.supportAdd) newForm = this.handlerMuscForm() |
|||
return newForm |
|||
}, |
|||
async getOptionsLists (url) { |
|||
let options = [] |
|||
// console.log('getOptionsList----', url) |
|||
await this.$http |
|||
.post(url, { formCode: 'resi_base_info' }) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
options = res.data |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
return options |
|||
}, |
|||
getGridList () { |
|||
const { user } = this.$store.state |
|||
let purpose = 'query' |
|||
if (this.disabled) purpose = 'query' |
|||
else purpose = 'addorupdate' |
|||
this.$http |
|||
.post('/gov/org/customergrid/gridoption', { agencyId: this.agencyId, purpose }) |
|||
.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('/actual/base/communityQuarters/listQuartersOptions', { gridId: this.form.GRID_ID, agencyId: this.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('/actual/base/communityBuilding/buildingoption', { quartersId: this.form.VILLAGE_ID }) |
|||
.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('/actual/base/communityBuildingUnit/unitoption', { buildingId: this.form.BUILD_ID }) |
|||
.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('/actual/base/communityHouse/houseoption', { unitId: this.form.UNIT_ID }) |
|||
.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('网络错误') |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.resi-form { |
|||
:deep .el-date-editor.el-input, |
|||
.el-date-editor.el-input__inner { |
|||
width: 100% !important; |
|||
} |
|||
} |
|||
.resi-cell-value .resi-cell-input { |
|||
width: 168px; |
|||
} |
|||
</style> |
|||
<style lang="scss" scoped> |
|||
.resi-form .resi-row { |
|||
margin-bottom: 0; |
|||
} |
|||
|
|||
// .resi-form .resi-cell { |
|||
// display: flex; |
|||
// align-items: center; |
|||
// .resi-cell-label { |
|||
// width: 70px; |
|||
// box-sizing: border-box; |
|||
// margin-right: 15px; |
|||
// text-align: right; |
|||
// } |
|||
// .resi-cell-value-radio { |
|||
// display: flex; |
|||
// align-items: center; |
|||
// min-height: 36px; |
|||
// } |
|||
// .resi-cell-value .resi-cell-input { |
|||
// width: 180px; |
|||
// } |
|||
|
|||
.resi-cell-value .resi-cell-textarea { |
|||
width: 300px; |
|||
} |
|||
.resi-cell-col { |
|||
display: flex; |
|||
.el-form-item { |
|||
margin-right: 10px; |
|||
} |
|||
} |
|||
.resi-cell-select { |
|||
width: 190px; |
|||
box-sizing: border-box; |
|||
margin-right: 10px; |
|||
&-middle { |
|||
width: 130px; |
|||
} |
|||
&-small { |
|||
width: 88px; |
|||
} |
|||
} |
|||
.resi-cell-select:last-child { |
|||
margin-right: 0; |
|||
} |
|||
// } |
|||
</style> |
@ -0,0 +1,403 @@ |
|||
<template> |
|||
<div class='g-main'> |
|||
<el-form :model="form"> |
|||
<div v-for="itemH in formList"> |
|||
<h5>{{ itemH.title }}</h5> |
|||
<template v-for="itemj in itemH.form"> |
|||
<section class="f-flex" style="flex-wrap: wrap;"> |
|||
<el-form-item v-for="(itemk, index) in itemj.children" :key="index" label-width="160px" |
|||
:label="itemk.label" :class="[itemk.itemType == 'textarea' ? 'textareaDidth' : '' ,itemk.check?itemk.check:'']"> |
|||
<template v-if="itemk.itemType == 'radio1'"> |
|||
<section class="list_item_width_1"> |
|||
<el-radio v-for="ns in itemk.opction" :key="ns.value" size="small" |
|||
v-model.trim="form[itemj.id][itemk.formName]" :label="ns.value" |
|||
@click.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)"> |
|||
{{ ns.label }} |
|||
</el-radio> |
|||
</section> |
|||
</template> |
|||
|
|||
<template v-else-if="itemk.itemType == 'select1' && itemk.showFlag !== '0'"> |
|||
<el-select v-model.trim="form[itemj.id][itemk.formName]" :placeholder="`请选择${itemk.label}`" |
|||
size="small" :multiple="itemk.multiple" :collapse-tags="itemk.collapseTags" |
|||
clearable |
|||
:style="{ 'width': itemk.formName == 'specialCategoryCode' ? '183px' : '' }" |
|||
class="list_item_width_1"> |
|||
<el-option v-for="items in itemk.opction" :key="items.value" :label="items.label" |
|||
:value="items.value" @click.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)"> |
|||
</el-option> |
|||
</el-select> |
|||
</template> |
|||
|
|||
<template v-else-if="itemk.itemType == 'textarea1'"> |
|||
<el-input type="textarea" :placeholder="`请输入${itemk.label}`" class="item-width-textarea" |
|||
maxlength="120" size="small" show-word-limit resize="none" rows="3" |
|||
v-model.trim="form[itemj.id][itemk.formName]" @change.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)"> |
|||
</el-input> |
|||
</template> |
|||
|
|||
<template v-else-if="itemk.itemType == 'input1'"> |
|||
<el-input :placeholder="`请输入${itemk.label}`" class="list_item_width_1" size="small" |
|||
:style="{ 'margin-right': itemk.label == '备注' ? '50px' : '' }" |
|||
v-model.trim="form[itemj.id][itemk.formName]" clearable @change.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)"> |
|||
</el-input> |
|||
</template> |
|||
|
|||
<template v-else-if="itemk.itemType == 'inputNum'"> |
|||
<el-input :placeholder="`请输入${itemk.label}`" size="small" class="list_item_width_1-text" |
|||
:style="{ 'margin-right': itemk.label == '备注' ? '50px' : '' }" |
|||
v-model.trim="form[itemj.id][itemk.formName]" clearable |
|||
@blur="checkNumberInput(itemj.id, itemk.formName)" @change.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)"> |
|||
</el-input><span class="u-data-tag">元</span> |
|||
</template> |
|||
|
|||
<template v-else-if="itemk.itemType == 'checkbox'"> |
|||
<el-checkbox-group size="small" v-model.trim="form[itemj.id][itemk.formName]"> |
|||
<el-checkbox v-for="items in itemk.opction" :label="items.value" |
|||
:style="{ 'margin-right': items.label != itemk.label ? '' : '19px' }" |
|||
:key="items.value" :value="items.value" @click.native="handleFormChange(itemj.id,itemk.formName,itemk.itemType)">{{ items.label }}</el-checkbox> |
|||
</el-checkbox-group> |
|||
</template> |
|||
|
|||
<template v-else-if="itemk.itemType == 'datepicker1' && itemk.showFlag !== '0'"> |
|||
<el-date-picker v-model.trim="form[itemj.id][itemk.formName]" class="list_item_width_1" |
|||
type="date" size="small" clearable placeholder="选择日期" format="yyyy 年 MM 月 dd 日" |
|||
value-format="yyyy-MM-dd" @change="handleFormChange(itemj.id,itemk.formName,itemk.itemType)"> |
|||
</el-date-picker> |
|||
</template> |
|||
|
|||
<template v-else-if="itemk.itemType == 'cascader1'"> |
|||
<el-cascader v-model.trim="form[itemj.id].partyOrgId" :props="casProps" |
|||
:options="itemk.opction" class="list_item_width_1" clearable size="small" |
|||
@change="handlePartyOrgCascadarChange" ></el-cascader> |
|||
<!-- {{form[itemj.id].partyOrgId}} --> |
|||
</template> |
|||
|
|||
<template v-else-if="itemk.itemType == 'number'"> |
|||
<el-input-number class="list_item_width_1" size="small" :min="1" :max="10" |
|||
v-model.trim="form[itemj.id][itemk.formName]"></el-input-number> |
|||
</template> |
|||
|
|||
</el-form-item> |
|||
</section> |
|||
</template> |
|||
</div> |
|||
|
|||
</el-form> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost, requestGet } from "@/js/dai/request"; |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
formType: null, |
|||
formList: [], |
|||
treeCheckKeyList:[], |
|||
form: { |
|||
// 党员信息 |
|||
parymemberInfoDto: { |
|||
joinTime: null, |
|||
positiveTime: null, |
|||
partyOrgId: null, |
|||
flowFlag: null, |
|||
flowActNum: null, |
|||
partyJob: null, |
|||
duty: null, |
|||
retiredFlag: null, |
|||
centerFlag: null, |
|||
studyNotNeed: null, |
|||
joinBranchName: null, |
|||
joinCommunityTime: null |
|||
}, |
|||
// 残疾信息 |
|||
healthDto: { |
|||
disabilityCategoryCode: null, |
|||
disabilityLevel: null, |
|||
disabilityNum: null, |
|||
disabilityDesc: null, |
|||
guardianFlag: null, |
|||
guardianName: null, |
|||
guardianMobile:null, |
|||
specialSkillFlag: null, |
|||
workCapacityFlag: null |
|||
}, |
|||
// 大病信息 |
|||
seriousIllnessDto: { |
|||
illnessCodes: [] |
|||
}, |
|||
// 慢病信息 |
|||
chronicDiseaseDto: { |
|||
chronicDiseaseCodes: [] |
|||
}, |
|||
// 死亡信息 |
|||
deathDto: { |
|||
deathTime: null |
|||
}, |
|||
// 老年人 |
|||
oldPeopleDto: { |
|||
oldPeopleCategories: [], |
|||
resideSituation: null, |
|||
oldSubsidy: null |
|||
}, |
|||
// 低保人员 |
|||
subsistenceAllowanceDto: { |
|||
reasons: [], |
|||
category:null , |
|||
}, |
|||
// 退役军人 |
|||
veteranDto: { |
|||
joinArmyTime: null, |
|||
leaveArmyTime: null, |
|||
serviceUnit: null, |
|||
receiveUnit: null, |
|||
settlementAmount: null, |
|||
trainDesc: null, |
|||
employmentSituation: null, |
|||
pubWelfareJobFlag: null |
|||
}, |
|||
|
|||
// 保障房人员 |
|||
ensureHouseDto: { |
|||
liveCommunity: null, |
|||
housingNature: null |
|||
}, |
|||
// 统战人员 |
|||
unitedFrontDto: { |
|||
unitedFrontType: null |
|||
}, |
|||
//特扶人员 |
|||
specialSupportDto: { |
|||
specialSupportType: null,//特扶类别 |
|||
childName: null,//子女姓名 |
|||
childGender: null,//子女性别 |
|||
childDeathDate: null,//子女死亡日期 |
|||
childDisabilityCategoryCode: null,//伤残类别 |
|||
childDisabilityLevel: null,//伤残等级 |
|||
}, |
|||
// 志愿者 |
|||
volunteerDto: { |
|||
volunteerCategory: [] |
|||
}, |
|||
}, |
|||
casProps: { |
|||
value: 'id', |
|||
label: 'partyOrgName', |
|||
lazy: true, |
|||
lazyLoad: (node, resolve) => { |
|||
this.handleNextOrgTreeClick(node, resolve) |
|||
}, |
|||
checkStrictly: true, |
|||
multiple: false, |
|||
}, |
|||
changId:null, |
|||
changPid:null, |
|||
changType:null, |
|||
}; |
|||
}, |
|||
props: { |
|||
}, |
|||
created() { }, |
|||
activated() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
handleFormChange(pid,id,type){ |
|||
this.changPid = pid; |
|||
this.changId = id; |
|||
this.changType = type; |
|||
nextTick(1000) |
|||
this.$emit('submitExpand', this.form,{changId:this.changId,changPid:this.changPid,changType:this.changType}) |
|||
}, |
|||
checkNumberInput(itemj, itemk) { |
|||
if (this.form[itemj][itemk]) { |
|||
if (isNaN(this.form[itemj][itemk])) { |
|||
this.$message.error("请输入数字"); |
|||
this.form[itemj][itemk] = ""; |
|||
} else { |
|||
this.form[itemj][itemk] = parseFloat( |
|||
this.form[itemj][itemk] |
|||
); |
|||
} |
|||
} |
|||
}, |
|||
showForm() { |
|||
this.$nextTick(() => { |
|||
// console.log(this.form,'拓展组件form'); |
|||
const promises = this.formList.forEach((item) => { |
|||
item.form.map(async (group) => { |
|||
return group.children.reduce(async (accPromise, item) => { |
|||
const acc = await accPromise; |
|||
acc[item.formName] = null; |
|||
this.form[item.pformName].id = item.id |
|||
if (item.itemType == 'checkbox') { |
|||
this.form[item.pformName][item.formName] = item.value || [] |
|||
} else if (item.itemType == 'cascader1' && item.orgPath) { |
|||
await this.getOrgTree() |
|||
this.form[item.pformName][item.formName] = item.orgPath.split(':') || null |
|||
} else{ |
|||
this.form[item.pformName][item.formName] = item.value != null?item.value:null; |
|||
} |
|||
if (item.opctionUrl) { |
|||
try { |
|||
item.opction = await this.getDictDataForm(item.opctionUrl, item.opctionParams); |
|||
} catch (error) { |
|||
console.error('Error fetching options:', error); |
|||
} |
|||
} |
|||
return acc; |
|||
}, Promise.resolve({})); |
|||
}) |
|||
}) |
|||
Promise.all(promises).then((results) => { |
|||
|
|||
}).catch((error) => { |
|||
console.error('Error fetching options:', error); |
|||
}); |
|||
}) |
|||
}, |
|||
async getDictDataForm(url, params) { |
|||
try { |
|||
const { data } = await this.$http.post(url, params); |
|||
return data.data; |
|||
} catch (error) { |
|||
console.log(error, `获取 ${opctionParams.dictType} 字典`); |
|||
} |
|||
}, |
|||
|
|||
handlePartyOrgCascadarChange(selectedNode) { |
|||
this.form.parymemberInfoDto.partyOrgId = selectedNode[selectedNode.length - 1]; |
|||
this.handleFormChange('parymemberInfoDto','partyOrgId','cascader1') |
|||
}, |
|||
async handleNextOrgTreeClick(node, resolve) { |
|||
if(node.children.length>0){ |
|||
resolve(null) |
|||
return |
|||
} |
|||
await this.getTreeChildenList(node, resolve) |
|||
}, |
|||
async getTreeChildenList(node, resolve) { |
|||
if (node.data.partyOrgLevel == 7) { |
|||
resolve(null); |
|||
return; |
|||
} |
|||
const url = "/actual/base/party/org/listNextLevelPartyOrgTreeNodesByPid" |
|||
let params = { |
|||
partyOrgPid: node.data.id |
|||
} |
|||
const { data, code, msg } = await requestGet(url, params) |
|||
if (code === 0) { |
|||
data.forEach(item => { |
|||
item.children = null; |
|||
item.leaf = item.partyOrgLevel === 7 || item.childrenQty === 0 |
|||
}); |
|||
resolve(data) |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
async getOrgTree() { |
|||
try { |
|||
const { data } = await requestGet('/actual/base/party/org/listPartyOrgTreeRoot4Select',{depth: 8}) |
|||
this.formList.forEach(c => { |
|||
if (c.formId == "parymemberInfoDto") { |
|||
for (let i of c.form[0].children) { |
|||
if (i.formName == 'partyOrgId') { |
|||
i.opction = [data]; |
|||
} |
|||
} |
|||
} |
|||
|
|||
}) |
|||
} catch (error) { |
|||
console.log(error); |
|||
} |
|||
}, |
|||
}, |
|||
components: {}, |
|||
computed: {}, |
|||
watch: { |
|||
'form': { |
|||
handler(newVal, oldVal) { |
|||
this.$emit('submitExpand', this.form,{changId:this.changId,changPid:this.changPid,changType:this.changType}) |
|||
}, |
|||
deep: true, |
|||
immediate: true |
|||
} |
|||
}, |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
|
|||
h5 { |
|||
position: relative; |
|||
font-size: 16px; |
|||
margin: 22px 0; |
|||
|
|||
&::after { |
|||
content: ""; |
|||
position: absolute; |
|||
display: inline-block; |
|||
left: -15px; |
|||
top: -0px; |
|||
width: 5px; |
|||
height: 16px; |
|||
background-color: #0056d6; |
|||
} |
|||
} |
|||
.fourFont{ |
|||
position: relative; |
|||
&::after{ |
|||
content: '*'; |
|||
width: 10px; |
|||
height: 10px; |
|||
color: #ff5107; |
|||
position: absolute; |
|||
left: 73px; |
|||
top: 7px; |
|||
} |
|||
} |
|||
.fiveFont{ |
|||
position: relative; |
|||
&::after{ |
|||
content: '*'; |
|||
width: 10px; |
|||
height: 10px; |
|||
color: #ff5107; |
|||
position: absolute; |
|||
left: 62px; |
|||
top: 7px; |
|||
} |
|||
} |
|||
.sixFont{ |
|||
position: relative; |
|||
&::after{ |
|||
content: '*'; |
|||
width: 10px; |
|||
height: 10px; |
|||
color: #ff5107; |
|||
position: absolute; |
|||
left: 49px; |
|||
top: 7px; |
|||
} |
|||
} |
|||
.nineFont{ |
|||
position: relative; |
|||
&::after{ |
|||
content: '*'; |
|||
width: 10px; |
|||
height: 10px; |
|||
color: #ff5107; |
|||
position: absolute; |
|||
left: 6px; |
|||
top: 7px; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,359 @@ |
|||
<template> |
|||
<div class='g-main'> |
|||
<el-form :model="form"> |
|||
<template v-for="itemj in formList"> |
|||
<section class="f-flex" style="flex-wrap: wrap;"> |
|||
<el-form-item v-for="(itemk, index) in itemj.children" :key="index" label-width="160px" |
|||
:label="itemk.label" :class="[itemk.itemType == 'textarea' ? 'textareaDidth' : '' ,itemk.check?itemk.check:'']"> |
|||
<template v-if="itemk.itemType == 'radio1'"> |
|||
<section class="list_item_width_1"> |
|||
<el-radio v-for="ns in itemk.opction" :key="ns.value" size="small" |
|||
v-model.trim="form[itemj.id][itemk.formName]" :label="ns.value"> |
|||
{{ ns.label }} |
|||
</el-radio> |
|||
</section> |
|||
</template> |
|||
<template v-else-if="itemk.itemType == 'select1' && itemk.showFlag !== '0'"> |
|||
<el-select v-model.trim="form[itemj.id][itemk.formName]" :placeholder="`请选择${itemk.label}`" |
|||
size="small" :multiple="itemk.multiple" :collapse-tags="itemk.collapseTags" clearable |
|||
:style="{ 'width': itemk.formName == 'specialCategoryCode' ? '183px' : '' }" |
|||
class="list_item_width_1"> |
|||
<el-option v-for="items in itemk.opction" :key="items.value" :label="items.label" |
|||
:value="items.value"> |
|||
</el-option> |
|||
</el-select> |
|||
</template> |
|||
<template v-else-if="itemk.itemType == 'textarea1'"> |
|||
<el-input type="textarea" :placeholder="`请输入${itemk.label}`" class="item-width-textarea" |
|||
maxlength="120" size="small" show-word-limit resize="none" rows="3" |
|||
v-model.trim="form[itemj.id][itemk.formName]"> |
|||
</el-input> |
|||
</template> |
|||
<template v-else-if="itemk.itemType == 'input1'"> |
|||
<el-input :placeholder="`请输入${itemk.label}`" class="list_item_width_1" size="small" |
|||
:style="{ 'margin-right': itemk.label == '备注' ? '50px' : '' }" |
|||
v-model.trim="form[itemj.id][itemk.formName]" clearable> |
|||
</el-input> |
|||
</template> |
|||
<template v-else-if="itemk.itemType == 'inputNum'"> |
|||
<el-input :placeholder="`请输入${itemk.label}`" size="small" class="list_item_width_1-text" |
|||
:style="{ 'margin-right': itemk.label == '备注' ? '50px' : '' }" |
|||
v-model.trim="form[itemj.id][itemk.formName]" clearable |
|||
@blur="checkNumberInput(itemj.id, itemk.formName)"> |
|||
</el-input><span class="u-data-tag">元</span> |
|||
</template> |
|||
<template v-else-if="itemk.itemType == 'checkbox'"> |
|||
<el-checkbox-group size="small" v-model.trim="form[itemj.id][itemk.formName]"> |
|||
<el-checkbox v-for="items in itemk.opction" :label="items.value" |
|||
:style="{ 'margin-right': items.label != itemk.label ? '' : '19px' }" :key="items.value" |
|||
:value="items.value">{{ items.label }}</el-checkbox> |
|||
</el-checkbox-group> |
|||
</template> |
|||
<template v-else-if="itemk.itemType == 'datepicker1' && itemk.showFlag !== '0'"> |
|||
<el-date-picker v-model.trim="form[itemj.id][itemk.formName]" class="list_item_width_1" |
|||
type="date" size="small" clearable placeholder="选择日期" format="yyyy 年 MM 月 dd 日" |
|||
value-format="yyyy-MM-dd"> |
|||
</el-date-picker> |
|||
</template> |
|||
<template v-else-if="itemk.itemType == 'cascader1'"> |
|||
<el-cascader v-model.trim="form[itemj.id].partyOrgId" :props="casProps" :options="itemk.opction" |
|||
class="list_item_width_1" clearable size="small" |
|||
@change="handlePartyOrgCascadarChange"></el-cascader> |
|||
</template> |
|||
<template v-else-if="itemk.itemType == 'number'"> |
|||
<el-input-number class="list_item_width_1" size="small" :min="1" :max="10" |
|||
v-model.trim="form[itemj.id][itemk.formName]"></el-input-number> |
|||
</template> |
|||
|
|||
</el-form-item> |
|||
</section> |
|||
</template> |
|||
</el-form> |
|||
<el-row style="margin:24px" v-if="operationType == 'add'"> |
|||
<el-col :span="24" align="center"> |
|||
<el-button size="small" class="diy-button--white" @click="handlerCancle" plain>取消</el-button> |
|||
<el-button type="primary" size="small" @click="handleClickSUbmitExpand">保存</el-button> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost, requestGet } from "@/js/dai/request"; |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
formType: null, |
|||
formList: [], |
|||
form: { |
|||
// 党员信息 |
|||
parymemberInfoDto: { |
|||
joinTime: null, |
|||
positiveTime: null, |
|||
partyOrgId: null, |
|||
flowFlag: null, |
|||
flowActNum: null, |
|||
partyJob: null, |
|||
duty: null, |
|||
retiredFlag: null, |
|||
centerFlag: null, |
|||
studyNotNeed: null, |
|||
joinBranchName: null, |
|||
joinCommunityTime: null |
|||
}, |
|||
// 残疾信息 |
|||
healthDto: { |
|||
disabilityCategoryCode: null, |
|||
disabilityLevel: null, |
|||
disabilityNum: null, |
|||
disabilityDesc: null, |
|||
guardianFlag: null, |
|||
guardianName: null, |
|||
specialSkillFlag: null, |
|||
workCapacityFlag: null |
|||
}, |
|||
// 大病信息 |
|||
seriousIllnessDto: { |
|||
illnessCodes: [] |
|||
}, |
|||
// 慢病信息 |
|||
chronicDiseaseDto: { |
|||
chronicDiseaseCodes: [] |
|||
}, |
|||
// 死亡信息 |
|||
deathDto: { |
|||
deathTime: null |
|||
}, |
|||
// 老年人 |
|||
oldPeopleDto: { |
|||
oldPeopleCategories:[], |
|||
resideSituation: null, |
|||
oldSubsidy:null |
|||
}, |
|||
// 低保人员 |
|||
subsistenceAllowanceDto: { |
|||
reasons: [], |
|||
category: null |
|||
}, |
|||
// 退役军人 |
|||
veteranDto: { |
|||
joinArmyTime: null, |
|||
leaveArmyTime: null, |
|||
serviceUnit: null, |
|||
receiveUnit: null, |
|||
settlementAmount: null, |
|||
trainDesc: null, |
|||
employmentSituation: null, |
|||
pubWelfareJobFlag: null |
|||
}, |
|||
|
|||
// 保障房人员 |
|||
ensureHouseDto: { |
|||
liveCommunity: null, |
|||
housingNature: null |
|||
}, |
|||
// 统战人员 |
|||
unitedFrontDto: { |
|||
unitedFrontType: null |
|||
}, |
|||
//特扶人员 |
|||
specialSupportDto: { |
|||
specialSupportType: null,//特扶类别 |
|||
childName: null,//子女姓名 |
|||
childGender: null,//子女性别 |
|||
childDeathDate: null,//子女死亡日期 |
|||
childDisabilityCategoryCode: null,//伤残类别 |
|||
childDisabilityLevel: null,//伤残等级 |
|||
}, |
|||
// 志愿者 |
|||
volunteerDto: { |
|||
volunteerCategory: [] |
|||
}, |
|||
|
|||
}, |
|||
casProps: { |
|||
value: 'id', |
|||
label: 'partyOrgName', |
|||
lazy: true, |
|||
lazyLoad: (node, resolve) => { |
|||
this.handleNextOrgTreeClick(node, resolve) |
|||
}, |
|||
isLeaf: (data, node) => { |
|||
console.log(data); |
|||
//根据后台返回的数据判断是否还有下级 是否显示箭头图标 |
|||
//el-tree懒加载无子级数据时去掉下拉箭头 |
|||
if (data.partyOrgLevel == 7 || data.childrenQty == 0) { |
|||
return true |
|||
} |
|||
}, |
|||
checkStrictly: true, |
|||
multiple: false, |
|||
}, |
|||
}; |
|||
}, |
|||
props: { |
|||
operationType:{ |
|||
type:String, |
|||
default:'' |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
activated() { |
|||
this.getOrgTree() |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
checkNumberInput(itemj, itemk) { |
|||
if (this.form[itemj][itemk]) { |
|||
if (isNaN(this.form[itemj][itemk])) { |
|||
this.$message.error("请输入数字"); |
|||
this.form[itemj][itemk] = ""; |
|||
} else { |
|||
this.form[itemj][itemk] = parseFloat( |
|||
this.form[itemj][itemk] |
|||
); |
|||
} |
|||
} |
|||
}, |
|||
showForm() { |
|||
this.$nextTick(() => { |
|||
const promises = this.formList.map(async (group) => { |
|||
return group.children.reduce(async (accPromise, item) => { |
|||
const acc = await accPromise; |
|||
acc[item.formName] = null; |
|||
if (item.opctionUrl) { |
|||
try { |
|||
item.opction = await this.getDictDataForm(item.opctionUrl, item.opctionParams); |
|||
} catch (error) { |
|||
console.error('Error fetching options:', error); |
|||
} |
|||
} |
|||
return acc; |
|||
}, Promise.resolve({})); |
|||
}); |
|||
|
|||
Promise.all(promises).then((results) => { |
|||
}).catch((error) => { |
|||
console.error('Error fetching options:', error); |
|||
}); |
|||
this.getOrgTree() |
|||
console.log(this.form, '子组件form'); |
|||
console.log(this.formList, '子组件formList'); |
|||
}) |
|||
}, |
|||
async getDictDataForm(url, params) { |
|||
try { |
|||
const { data } = await this.$http.post(url, params); |
|||
return data.data; |
|||
} catch (error) { |
|||
console.log(error, `获取 ${opctionParams.dictType} 字典`); |
|||
} |
|||
}, |
|||
handlerCancle() { |
|||
this.$emit('hideExpand', this.formType) |
|||
}, |
|||
handleClickSUbmitExpand() { |
|||
this.$emit('submitExpand', this.form, this.formType) |
|||
}, |
|||
handlePartyOrgCascadarChange(selectedNode) { |
|||
this.form.parymemberInfoDto.partyOrgId = selectedNode[selectedNode.length - 1]; |
|||
}, |
|||
async handleNextOrgTreeClick(node, resolve) { |
|||
await this.getTreeChildenList(node, resolve) |
|||
}, |
|||
async getTreeChildenList(node, resolve) { |
|||
if (node.data.partyOrgLevel === 7) { |
|||
resolve(null); |
|||
return; |
|||
} |
|||
const url = "/actual/base/party/org/listNextLevelPartyOrgTreeNodesByPid" |
|||
let params = { |
|||
partyOrgPid: node.data.id |
|||
} |
|||
const { data, code, msg } = await requestGet(url, params) |
|||
if (code === 0) { |
|||
data.forEach(item => { |
|||
item.children = null; |
|||
item.leaf = item.partyOrgLevel === 7 || item.childrenQty === 0 |
|||
}); |
|||
resolve(data) |
|||
} else { |
|||
this.$message.error(msg) |
|||
} |
|||
}, |
|||
async getOrgTree() { |
|||
try { |
|||
const { data } = await requestGet('/actual/base/party/org/listPartyOrgTreeRoot4Select', { depth: 8 }) |
|||
this.formList.forEach(c => { |
|||
for (let i of c.children) { |
|||
if (i.formName == 'partyOrgId') { |
|||
i.opction = [data]; |
|||
} |
|||
} |
|||
}) |
|||
} catch (error) { |
|||
console.log(error); |
|||
} |
|||
}, |
|||
|
|||
}, |
|||
components: {}, |
|||
computed: {}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@import "@/assets/scss/modules/management/list-main.scss"; |
|||
.fourFont{ |
|||
position: relative; |
|||
&::after{ |
|||
content: '*'; |
|||
width: 10px; |
|||
height: 10px; |
|||
color: #ff5107; |
|||
position: absolute; |
|||
left: 73px; |
|||
top: 7px; |
|||
} |
|||
} |
|||
.fiveFont{ |
|||
position: relative; |
|||
&::after{ |
|||
content: '*'; |
|||
width: 10px; |
|||
height: 10px; |
|||
color: #ff5107; |
|||
position: absolute; |
|||
left: 62px; |
|||
top: 7px; |
|||
} |
|||
} |
|||
.sixFont{ |
|||
position: relative; |
|||
&::after{ |
|||
content: '*'; |
|||
width: 10px; |
|||
height: 10px; |
|||
color: #ff5107; |
|||
position: absolute; |
|||
left: 49px; |
|||
top: 7px; |
|||
} |
|||
} |
|||
.nineFont{ |
|||
position: relative; |
|||
&::after{ |
|||
content: '*'; |
|||
width: 10px; |
|||
height: 10px; |
|||
color: #ff5107; |
|||
position: absolute; |
|||
left: 6px; |
|||
top: 7px; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<div class=''>保障房</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components:{}, |
|||
computed:{}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss'> |
|||
|
|||
</style> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<div class=''>老年人</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components:{}, |
|||
computed:{}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss'> |
|||
|
|||
</style> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<div class=''>党员</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components:{}, |
|||
computed:{}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss'> |
|||
|
|||
</style> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<div class=''>公益岗</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components:{}, |
|||
computed:{}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss'> |
|||
|
|||
</style> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<div class=''>特扶人员</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components:{}, |
|||
computed:{}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss'> |
|||
|
|||
</style> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<div class=''>统战人员</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components:{}, |
|||
computed:{}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss'> |
|||
|
|||
</style> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<div class=''>退役军人</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components:{}, |
|||
computed:{}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss'> |
|||
|
|||
</style> |
@ -0,0 +1,20 @@ |
|||
<template> |
|||
<div class=''>志愿者</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
created() {}, |
|||
methods: {}, |
|||
components:{}, |
|||
computed:{}, |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss'> |
|||
|
|||
</style> |
@ -0,0 +1,373 @@ |
|||
<template> |
|||
<el-dialog |
|||
width="1118px" |
|||
:modal="true" |
|||
:modal-append-to-body="false" |
|||
:destroy-on-close="true" |
|||
:visible="showDialog" |
|||
@close="handleClose" |
|||
|
|||
> |
|||
<div class="eventWrap" |
|||
v-loading="loading" |
|||
element-loading-text="加载中" |
|||
element-loading-spinner="el-icon-loading" |
|||
element-loading-background="rgba(0, 0, 0, 0.5)" |
|||
> |
|||
<el-row :gutter="32"> |
|||
<el-col :span="24" style="padding-left: 40px"> |
|||
<title-box text="事件详情"/> |
|||
</el-col> |
|||
<el-col |
|||
:span="13" |
|||
style="padding-left: 40px" |
|||
|
|||
> |
|||
<div class="leftEvent"> |
|||
<div class="eventDetails"> |
|||
<img |
|||
:width="18" |
|||
:height="18" |
|||
src="@/assets/images/manyidu/tc-title-icon.png" |
|||
/>事项详情 |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>所属组织:</span> |
|||
<span>{{ item.gridName }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>上报渠道:</span> |
|||
<span>{{ item.sourceTypeName }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>事件类型:</span> |
|||
<span>{{ item.categoryName }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>接受时间:</span> |
|||
<span>{{ item.happenTime }}</span> |
|||
</div> |
|||
<!-- <div class="eventItem"> |
|||
<span>工单号:</span> |
|||
<span>{{ item.workOrderNum }}</span> |
|||
</div>--> |
|||
<div class="eventItem"> |
|||
<div>问题描述:</div> |
|||
<div style="margin-top: 20px">{{ item.eventContent }}</div> |
|||
</div> |
|||
<!-- <div class="eventItem"> |
|||
<div>图片:</div> |
|||
<div style="margin-top: 20px; display: flex"> |
|||
<img |
|||
style="width: 100px; height: 100px; margin-right: 5px" |
|||
v-for="src in item.imageList" |
|||
:key="src" |
|||
:src="src" |
|||
alt="/" |
|||
@click="openImg(src)" |
|||
/> |
|||
</div> |
|||
</div>--> |
|||
<div class="eventItem"> |
|||
<span>联系人:</span> |
|||
<span>{{ item.name }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>联系电话:</span> |
|||
<span>{{ item.mobile }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>详细地址:</span> |
|||
<span>{{ item.address }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>办结时限:</span> |
|||
<span>{{ item.latestOperatedTime }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>满意度评价:</span> |
|||
<span>{{ item.satisfactionName }}</span> |
|||
</div> |
|||
</div> |
|||
</el-col> |
|||
<el-col |
|||
:span="11" |
|||
> |
|||
<div class="rightEvent m-info"> |
|||
<div class="eventDetails"> |
|||
<img |
|||
:width="18" |
|||
:height="18" |
|||
src="@/assets/images/manyidu/tc-title-icon.png" |
|||
/>办理进展 |
|||
</div> |
|||
<!-- <el-timeline class="timeline" :reverse="true"> |
|||
<el-timeline-item v-for="(item, index) in activities" :key="index" :class="index == activities.length - 1 ? 'sucess' : ''"> |
|||
<div class="status-box"> |
|||
<div class="status1" v-if="index == activities.length - 1">回复</div> |
|||
<div class="status2" v-else>完成并回复</div> |
|||
<div class="timestamp">{{ item.timeLimit ? $moment(item.timeLimit).format("YYYY-MM-DD hh:mm:ss") : "" }}</div> |
|||
</div> |
|||
<div class="content"> |
|||
<div class="field">回复人:</div> |
|||
<div class="value">{{ item.departmentName }}</div> |
|||
</div> |
|||
<div class="content"> |
|||
<div class="field">回复内容:</div> |
|||
<div class="value">{{ item.publicReply }}</div> |
|||
</div> |
|||
</el-timeline-item> |
|||
</el-timeline> --> |
|||
<div v-if="activities.length > 0"> |
|||
<!-- <el-card :class="{ 'box-card': source === 'visiual' }" style="min-height: calc(88vh - 50px); overflow: auto"> --> |
|||
<div class="m-process"> |
|||
<div class="list"> |
|||
<div |
|||
class="item" |
|||
:class="[index === 0 ? 'z-on' : '']" |
|||
:key="item.processId" |
|||
v-for="(item, index) in activities" |
|||
> |
|||
<div class="item-row"> |
|||
<template v-if="item.agencyId"> |
|||
<div class="name">指派</div> |
|||
</template> |
|||
<template v-if="!item.timeLimit"> |
|||
<div class="name">完成并回复</div> |
|||
</template> |
|||
<template v-if="!item.agencyId && item.timeLimit"> |
|||
<div class="name">{{ item.processName }}</div> |
|||
</template> |
|||
<div class="date"> |
|||
{{ |
|||
item.processTime ? getTrueTime(item.processTime) : "" |
|||
}} |
|||
</div> |
|||
</div> |
|||
<div v-if="item.type === 'event'"> |
|||
<template v-if="item.agencyId"> |
|||
<div class="detail"> |
|||
<div class="detail-field">指派人:</div> |
|||
<div class="detail-value"> |
|||
{{ item.departmentName }} |
|||
</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="detail-field">指派部门:</div> |
|||
<div class="detail-value"> |
|||
{{ item.agencyName }} |
|||
</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="detail-field">转办意见:</div> |
|||
<div class="detail-value"> |
|||
{{ item.publicReply }} |
|||
</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="detail-field">办结时限:</div> |
|||
<div class="detail-value"> |
|||
{{ item.timeLimit }} |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<template v-else> |
|||
<div class="detail"> |
|||
<div class="detail-field">回复人:</div> |
|||
<div class="detail-value"> |
|||
{{ item.departmentName }} |
|||
</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="detail-field">回复内容:</div> |
|||
<div class="detail-value"> |
|||
{{ item.publicReply }} |
|||
</div> |
|||
</div> |
|||
<div class="detail" v-if="item.timeLimit"> |
|||
<div class="detail-field">办结时限:</div> |
|||
<div class="detail-value"> |
|||
{{ getTrueTime(item.timeLimit) }} |
|||
</div> |
|||
</div> |
|||
</template> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- </el-card> --> |
|||
</div> |
|||
</div> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import titleBox from "./Title"; |
|||
|
|||
export default { |
|||
name: "ReportAnEvent", |
|||
components: { |
|||
titleBox, |
|||
}, |
|||
props: { |
|||
id: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
showDialog: { |
|||
type: Boolean, |
|||
default: false, |
|||
}, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
item: {}, |
|||
loading: false, |
|||
loading1: false, |
|||
activities: [], |
|||
}; |
|||
}, |
|||
|
|||
computed: {}, |
|||
watch: { |
|||
showDialog: { |
|||
handler(val) { |
|||
if (val) { |
|||
this.getDetailsData(this.id); |
|||
this.getProcessData(this.id); |
|||
} else { |
|||
this.item = {} |
|||
this.activities = [] |
|||
} |
|||
}, |
|||
immediate: true, |
|||
}, |
|||
}, |
|||
mounted() { |
|||
}, |
|||
|
|||
methods: { |
|||
handleClose() { |
|||
this.$emit("close", false); |
|||
this.item = {}; |
|||
}, |
|||
|
|||
openImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
getTrueTime(time) { |
|||
return this.$moment(time * 1000).format("YYYY-MM-DD hh:mm"); |
|||
}, |
|||
|
|||
getDetailsData(id) { |
|||
this.loading = true; |
|||
this.$http |
|||
.post("/governance/icEventOLd/detail", {icEventId: id}) |
|||
.then((res) => { |
|||
const {code, data, msg} = res.data; |
|||
if (code === 0) { |
|||
this.item = data; |
|||
this.loading = false; |
|||
} else { |
|||
this.loading = false; |
|||
this.$message.error(msg); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
getProcessData(id) { |
|||
this.$http |
|||
.post("/governance/icEventOLd/process", {icEventId: id}) |
|||
.then((res) => { |
|||
const {code, data, msg} = res.data; |
|||
if (code === 0) { |
|||
this.activities = data; |
|||
this.loading1 = false; |
|||
} else { |
|||
this.loading1 = false; |
|||
this.$message.error(msg); |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" src="@/assets/scss/dataBoard/popup-info.scss" scoped></style> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
@import "@/assets/scss/dataBoard/dialog.scss"; |
|||
|
|||
@mixin fontStyle { |
|||
color: #fff !important; |
|||
font-size: 14px !important; |
|||
} |
|||
|
|||
.eventWrap { |
|||
width: 1094px; |
|||
//height: 798px; |
|||
overflow-y: auto; |
|||
overflow-x: hidden; |
|||
padding: 24px; |
|||
|
|||
.eventDetails { |
|||
font-size: 18px; |
|||
margin: 48px 24px 48px 0; |
|||
color: #ffffff; |
|||
|
|||
img { |
|||
margin-top: -4px; |
|||
margin-right: 8px; |
|||
} |
|||
} |
|||
|
|||
.m-info { |
|||
padding: 0px !important; |
|||
|
|||
.m-process { |
|||
margin: 0 !important; |
|||
|
|||
.name { |
|||
@include fontStyle; |
|||
} |
|||
|
|||
.date { |
|||
@include fontStyle; |
|||
} |
|||
|
|||
.detail { |
|||
@include fontStyle; |
|||
|
|||
.detail-field { |
|||
flex: none !important; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.leftEvent { |
|||
color: #fff; |
|||
|
|||
.eventItem { |
|||
font-size: 14px; |
|||
margin-bottom: 24px; |
|||
|
|||
span:first-child { |
|||
} |
|||
|
|||
span:last-child { |
|||
} |
|||
} |
|||
} |
|||
|
|||
.rightEvent { |
|||
color: #fff; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,272 @@ |
|||
<template> |
|||
<Dialog title="事件详情" @close="handleClose"> |
|||
<template> |
|||
<div class="eventWrap"> |
|||
<el-row :gutter="32"> |
|||
<el-col :span="13" style="padding-left: 40px" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 21, 64, 0.3)"> |
|||
<div class="leftEvent"> |
|||
<div class="eventDetails">事件详情</div> |
|||
<div class="eventItem"> |
|||
<span>所属组织:</span> |
|||
<span>{{ item.gridName }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>上报渠道:</span> |
|||
<span>{{ item.sourceTypeName }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>接受时间:</span> |
|||
<span>{{ item.happenTime }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>工单号:</span> |
|||
<span>{{ item.workOrderNum }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<div>问题描述:</div> |
|||
<div style="margin-top: 20px">{{ item.eventContent }}</div> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<div>图片:</div> |
|||
<div style="margin-top: 20px; display: flex"> |
|||
<img style="width: 100px; height: 100px; margin-right: 5px" v-for="src in item.imageList" :key="src" :src="src" alt="/" @click="openImg(src)" /> |
|||
</div> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>联系人:</span> |
|||
<span>{{ item.name }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>联系电话:</span> |
|||
<span>{{ $sensitive(item.mobile, 3, 7) }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>详细地址:</span> |
|||
<span>{{ item.address }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>办结时限:</span> |
|||
<span>{{ item.gridName }}</span> |
|||
</div> |
|||
<div class="eventItem"> |
|||
<span>满意度评价:</span> |
|||
<span>{{ item.satisfactionName }}</span> |
|||
</div> |
|||
</div> |
|||
</el-col> |
|||
<el-col :span="11" v-loading="loading1" element-loading-text="加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 21, 64, 0.3)"> |
|||
<div class="rightEvent m-info"> |
|||
<div class="eventDetails">办理进展</div> |
|||
<!-- <el-timeline class="timeline" :reverse="true"> |
|||
<el-timeline-item v-for="(item, index) in activities" :key="index" :class="index == activities.length - 1 ? 'sucess' : ''"> |
|||
<div class="status-box"> |
|||
<div class="status1" v-if="index == activities.length - 1">回复</div> |
|||
<div class="status2" v-else>完成并回复</div> |
|||
<div class="timestamp">{{ item.timeLimit ? $moment(item.timeLimit).format("YYYY-MM-DD hh:mm:ss") : "" }}</div> |
|||
</div> |
|||
<div class="content"> |
|||
<div class="field">回复人:</div> |
|||
<div class="value">{{ item.departmentName }}</div> |
|||
</div> |
|||
<div class="content"> |
|||
<div class="field">回复内容:</div> |
|||
<div class="value">{{ item.publicReply }}</div> |
|||
</div> |
|||
</el-timeline-item> |
|||
</el-timeline> --> |
|||
<div v-if="activities.length > 0"> |
|||
<!-- <el-card :class="{ 'box-card': source === 'visiual' }" style="min-height: calc(88vh - 50px); overflow: auto"> --> |
|||
<div class="m-process"> |
|||
<div class="list"> |
|||
<div class="item" :class="[index === 0 ? 'z-on' : '']" :key="item.processId" v-for="(item, index) in activities"> |
|||
<div class="item-row"> |
|||
<template v-if="item.agencyId"> |
|||
<div class="name">指派</div> |
|||
</template> |
|||
<template v-if="!item.timeLimit"> |
|||
<div class="name">完成并回复</div> |
|||
</template> |
|||
<template v-if="!item.agencyId && item.timeLimit"> |
|||
<div class="name">{{ item.processName }}</div> |
|||
</template> |
|||
<div class="date"> |
|||
{{ item.processTime ? getTrueTime(item.processTime) : "" }} |
|||
</div> |
|||
</div> |
|||
<div v-if="item.type === 'event'"> |
|||
<template v-if="item.agencyId"> |
|||
<div class="detail"> |
|||
<div class="detail-field">指派人:</div> |
|||
<div class="detail-value">{{ item.departmentName }}</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="detail-field">指派部门:</div> |
|||
<div class="detail-value">{{ item.agencyName }}</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="detail-field">转办意见:</div> |
|||
<div class="detail-value">{{ item.publicReply }}</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="detail-field">办结时限:</div> |
|||
<div class="detail-value">{{ formTimeLimit(item.timeLimit) }}</div> |
|||
</div> |
|||
</template> |
|||
<template v-else> |
|||
<div class="detail"> |
|||
<div class="detail-field">回复人:</div> |
|||
<div class="detail-value">{{ item.departmentName }}</div> |
|||
</div> |
|||
<div class="detail"> |
|||
<div class="detail-field">回复内容:</div> |
|||
<div class="detail-value">{{ item.publicReply }}</div> |
|||
</div> |
|||
<div class="detail" v-if="item.timeLimit"> |
|||
<div class="detail-field">办结时限:</div> |
|||
<div class="detail-value">{{ getTrueTime(item.timeLimit) }}</div> |
|||
</div> |
|||
</template> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- </el-card> --> |
|||
</div> |
|||
</div> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</template> |
|||
</Dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import Dialog from "@/components/Dialog/index.vue"; |
|||
|
|||
export default { |
|||
name: "ReportAnEvent", |
|||
components: { Dialog }, |
|||
props: { |
|||
id: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
item: {}, |
|||
loading: false, |
|||
loading1: false, |
|||
activities: [], |
|||
}; |
|||
}, |
|||
|
|||
computed: {}, |
|||
watch: { |
|||
id: { |
|||
handler(val) { |
|||
if (val) { |
|||
this.getDetailsData(val); |
|||
this.getProcessData(val); |
|||
} |
|||
}, |
|||
immediate: true, |
|||
}, |
|||
}, |
|||
mounted() {}, |
|||
|
|||
methods: { |
|||
handleClose() { |
|||
this.$emit("close", false); |
|||
this.item = {}; |
|||
}, |
|||
|
|||
openImg(src) { |
|||
window.open(src); |
|||
}, |
|||
|
|||
getTrueTime(time) { |
|||
return this.$moment(time * 1000).format("YYYY-MM-DD hh:mm"); |
|||
}, |
|||
|
|||
getDetailsData(id) { |
|||
this.loading = true; |
|||
this.$http.post("/governance/icEventOld/detail", { icEventId: id }).then((res) => { |
|||
const { code, data, msg } = res.data; |
|||
if (code === 0) { |
|||
this.item = data; |
|||
this.loading = false; |
|||
} else { |
|||
this.loading = false; |
|||
this.$message.error(msg); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
getProcessData(id) { |
|||
this.$http.post("/governance/icEventOld/process", { icEventId: id }).then((res) => { |
|||
const { code, data, msg } = res.data; |
|||
if (code === 0) { |
|||
this.activities = data; |
|||
this.loading1 = false; |
|||
} else { |
|||
this.loading1 = false; |
|||
this.$message.error(msg); |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" src="@/assets/scss/dataBoard/popup-info.scss" scoped></style> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|||
@mixin fontStyle { |
|||
color: #fff !important; |
|||
font-size: 14px !important; |
|||
} |
|||
.eventWrap { |
|||
height: 500px; |
|||
overflow-y: auto; |
|||
overflow-x: hidden; |
|||
.eventDetails { |
|||
font-size: 16px; |
|||
margin: 24px 0; |
|||
} |
|||
.m-info { |
|||
padding: 0px !important; |
|||
.m-process { |
|||
margin: 0 !important; |
|||
.name { |
|||
@include fontStyle; |
|||
} |
|||
.date { |
|||
@include fontStyle; |
|||
} |
|||
.detail { |
|||
@include fontStyle; |
|||
.detail-field { |
|||
flex: none !important; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.leftEvent { |
|||
color: #fff; |
|||
.eventItem { |
|||
font-size: 14px; |
|||
margin-bottom: 24px; |
|||
span:first-child { |
|||
} |
|||
span:last-child { |
|||
} |
|||
} |
|||
} |
|||
.rightEvent { |
|||
color: #fff; |
|||
} |
|||
} |
|||
</style> |