Browse Source

新增居民详情,通用样式

dev2
马魁 3 years ago
parent
commit
bbca4456d6
  1. 150
      src/assets/scss/modules/management/list-main.css
  2. 2
      src/assets/scss/modules/management/list-main.min.css
  3. 144
      src/assets/scss/modules/management/list-main.scss
  4. 2
      src/views/components/resiSearch.vue
  5. 9
      src/views/modules/base/resi.vue
  6. 713
      src/views/modules/shequ/cpts/peopleDetail.vue

150
src/assets/scss/modules/management/list-main.css

@ -85,7 +85,7 @@
}
.div_main .setFormBoxHeight {
max-height: 99px;
max-height: 153px;
overflow: hidden;
}
@ -93,6 +93,154 @@
height: auto;
}
.div_main .flex {
display: flex;
flex-wrap: nowrap;
}
.div_main .hflex {
display: flex;
flex-flow: column;
overflow: hidden;
height: 100%;
}
.div_main .flex1 {
flex: 1;
}
.div_main .mean {
justify-content: space-around;
}
.div_main .endpoint {
justify-content: space-between;
}
.div_main .align_item {
align-items: center;
}
.div_main .font12 {
font-size: 12px;
}
.div_main .font14 {
font-size: 14px !important;
}
.div_main .font16 {
font-size: 16px !important;
}
.div_main .font18 {
font-size: 18px !important;
}
.div_main .p0 {
padding: 0 !important;
}
.div_main .p10 {
padding: 10px;
}
.div_main .p50 {
padding: 50px;
}
.div_main .p30 {
padding: 30px;
}
.div_main .right5 {
margin-right: 5px;
}
.div_main .right24 {
margin-right: 24px;
}
.div_main .bottom8 {
margin-bottom: 8px;
}
.div_main .bottom16 {
margin-bottom: 16px;
}
.div_main .top2 {
margin-top: 2px;
}
.div_main .top12 {
margin-top: 12px;
}
.div_main .top24 {
margin-top: 24px !important;
}
.div_main .top32 {
margin-top: 32px !important;
}
.div_main .top40 {
margin-top: 40px !important;
}
.div_main .top48 {
margin-top: 48px !important;
}
.div_main .top8 {
margin-top: 8px !important;
}
.div_main .bot8 {
margin-bottom: 8px;
}
.div_main .bot24 {
margin-bottom: 24px !important;
}
.div_main .top16 {
margin-top: 16px !important;
}
.div_main .bot16 {
margin-bottom: 16px !important;
}
.div_main .right8 {
margin-right: 8px !important;
}
.div_main .margin30 {
margin: 30px;
}
.div_main .m0 {
margin: 0 !important;
}
.div_main .title-small {
border-left: solid 4px #0056d6;
height: 12px;
line-height: 20px;
margin-left: -36px;
padding-left: 30px;
font-size: 16px;
font-weight: bold;
}
@media only screen and (min-width: 2013px) {
.div_main .showUnfold {
display: none;
}
}
.div_main .item_width_2 {
width: 138px;
}

2
src/assets/scss/modules/management/list-main.min.css

@ -1 +1 @@
.div_main{width:100%}.div_main .marginl-20{margin-left:16px}.div_main .div_search{padding:10px;background:#FFFFFF;box-shadow:0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);margin:7px 7px}.div_main .div_search /deep/ .el-form-item{margin-bottom:14px}.div_main .div_search .div_search_btn{margin-right:10px;margin-top:5px;float:right}.div_main .div_search .div_search_label{line-height:36px;margin-left:24px;margin-right:6px;font-size:14px;color:#606266;vertical-align:middle}.div_main .data-tag{margin-left:10px}.div_main .item_width_normal{width:168px}.div_main .item_width_daterange{width:206px}.div_main .item_width_daterange2{width:445px}.div_main .item_width_communitycascader{width:141px}.div_main .item_width_buildcascader{width:96px}.div_main .div_table{margin:16px 7px 7px;background:#FFFFFF;box-shadow:0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);position:relative;padding:24px 16px 10px}.div_main .div_table .div_btn{display:flex;justify-content:space-between}.div_main .div_table .div_btn .div_btn_left{display:flex}.div_main .div_table .div_btn .div_btn_left .btn_upload{margin-left:10px;display:flex;text-align:center}.div_main .div_table .div_table_item{margin-top:16px;position:relative}.div_main .setFormBoxHeight{max-height:99px;overflow:hidden}.div_main .setFormBoxHeightAuto{height:auto}.div_main .item_width_2{width:138px}.div_main .item_width_1{width:260px}.div_main .item_width_3{width:200px}.div_main .list_item_width_1{width:165px}.div_main .list_item_width_2{width:135px}.div-mult-form{margin-top:20px}.div-mult-form .div_person{display:flex;font-size:14px;padding-bottom:20px}.div-mult-form .div_person .person_title{text-align:right;flex:0 0 100px;line-height:36px;padding:0 12px 0 0}.div-mult-form .div_person .tag_item{margin-right:10px;margin-top:10px}.div-mult-form .div_person .tag_tip{margin-top:10px;color:#9c9c9c}.div-mult-table{position:relative;padding:0 20px}.div-mult-table .div_selcount{position:absolute;bottom:10px;left:30px}.div_dialog_table{padding:10px}.div_dialog_table .table{margin-top:20px}.twoline{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.div_main{width:100%}.div_main .marginl-20{margin-left:16px}.div_main .div_search{padding:10px;background:#FFFFFF;box-shadow:0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);margin:7px 7px}.div_main .div_search /deep/ .el-form-item{margin-bottom:14px}.div_main .div_search .div_search_btn{margin-right:10px;margin-top:5px;float:right}.div_main .div_search .div_search_label{line-height:36px;margin-left:24px;margin-right:6px;font-size:14px;color:#606266;vertical-align:middle}.div_main .data-tag{margin-left:10px}.div_main .item_width_normal{width:168px}.div_main .item_width_daterange{width:206px}.div_main .item_width_daterange2{width:445px}.div_main .item_width_communitycascader{width:141px}.div_main .item_width_buildcascader{width:96px}.div_main .div_table{margin:16px 7px 7px;background:#FFFFFF;box-shadow:0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);position:relative;padding:24px 16px 10px}.div_main .div_table .div_btn{display:flex;justify-content:space-between}.div_main .div_table .div_btn .div_btn_left{display:flex}.div_main .div_table .div_btn .div_btn_left .btn_upload{margin-left:10px;display:flex;text-align:center}.div_main .div_table .div_table_item{margin-top:16px;position:relative}.div_main .setFormBoxHeight{max-height:153px;overflow:hidden}.div_main .setFormBoxHeightAuto{height:auto}.div_main .flex{display:flex;flex-wrap:nowrap}.div_main .hflex{display:flex;flex-flow:column;overflow:hidden;height:100%}.div_main .flex1{flex:1}.div_main .mean{justify-content:space-around}.div_main .endpoint{justify-content:space-between}.div_main .align_item{align-items:center}.div_main .font12{font-size:12px}.div_main .font14{font-size:14px !important}.div_main .font16{font-size:16px !important}.div_main .font18{font-size:18px !important}.div_main .p0{padding:0 !important}.div_main .p10{padding:10px}.div_main .p50{padding:50px}.div_main .p30{padding:30px}.div_main .right5{margin-right:5px}.div_main .right24{margin-right:24px}.div_main .bottom8{margin-bottom:8px}.div_main .bottom16{margin-bottom:16px}.div_main .top2{margin-top:2px}.div_main .top12{margin-top:12px}.div_main .top24{margin-top:24px !important}.div_main .top32{margin-top:32px !important}.div_main .top40{margin-top:40px !important}.div_main .top48{margin-top:48px !important}.div_main .top8{margin-top:8px !important}.div_main .bot8{margin-bottom:8px}.div_main .bot24{margin-bottom:24px !important}.div_main .top16{margin-top:16px !important}.div_main .bot16{margin-bottom:16px !important}.div_main .right8{margin-right:8px !important}.div_main .margin30{margin:30px}.div_main .m0{margin:0 !important}.div_main .title-small{border-left:solid 4px #0056d6;height:12px;line-height:20px;margin-left:-36px;padding-left:30px;font-size:16px;font-weight:bold}@media only screen and (min-width: 2013px){.div_main .showUnfold{display:none}}.div_main .item_width_2{width:138px}.div_main .item_width_1{width:260px}.div_main .item_width_3{width:200px}.div_main .list_item_width_1{width:165px}.div_main .list_item_width_2{width:135px}.div-mult-form{margin-top:20px}.div-mult-form .div_person{display:flex;font-size:14px;padding-bottom:20px}.div-mult-form .div_person .person_title{text-align:right;flex:0 0 100px;line-height:36px;padding:0 12px 0 0}.div-mult-form .div_person .tag_item{margin-right:10px;margin-top:10px}.div-mult-form .div_person .tag_tip{margin-top:10px;color:#9c9c9c}.div-mult-table{position:relative;padding:0 20px}.div-mult-table .div_selcount{position:absolute;bottom:10px;left:30px}.div_dialog_table{padding:10px}.div_dialog_table .table{margin-top:20px}.twoline{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}

144
src/assets/scss/modules/management/list-main.scss

@ -98,13 +98,155 @@
// 搜索栏高度控制显示隐藏
.setFormBoxHeight{
max-height: 99px;
max-height: 153px;
overflow: hidden;
}
.setFormBoxHeightAuto{
height: auto;
}
// 弹性盒子
.flex {
display: flex;
flex-wrap: nowrap;
}
.hflex {
display: flex;
flex-flow: column;
overflow: hidden;
height: 100%;
}
.flex1 {
flex: 1;
}
.mean {
justify-content: space-around;
}
.endpoint {
justify-content: space-between;
}
.align_item {
align-items: center;
}
// 字体大小
.font12 {
font-size: 12px;
}
.font14 {
font-size: 14px !important;
}
.font16 {
font-size: 16px !important;
}
.font18 {
font-size: 18px !important;
}
//内边距
.p0 {
padding: 0 !important;
}
.p10 {
padding: 10px;
}
.p50 {
padding: 50px;
}
.p30 {
padding: 30px;
}
// 外边距
.right5 {
margin-right: 5px;
}
.right24 {
margin-right: 24px;
}
.bottom8 {
margin-bottom: 8px;
}
.bottom16 {
margin-bottom: 16px;
}
.top2 {
margin-top: 2px;
}
.top12 {
margin-top: 12px;
}
.top24 {
margin-top: 24px !important;
}
.top32 {
margin-top: 32px !important;
}
.top40 {
margin-top: 40px !important;
}
.top48 {
margin-top: 48px !important;
}
.top8 {
margin-top: 8px !important;
}
.bot8 {
margin-bottom: 8px;
}
.bot24 {
margin-bottom: 24px !important;
}
.top16 {
margin-top: 16px !important;
}
.bot16 {
margin-bottom: 16px !important;
}
.right8 {
margin-right: 8px !important;
}
.margin30 {
margin: 30px;
}
.m0 {
margin: 0 !important;
}
// 详情分类title
.title-small {
border-left: solid 4px rgba(0, 86, 214, 1);
height: 12px;
line-height: 20px;
margin-left: -36px;
padding-left: 30px;
font-size: 16px;
font-weight: bold;
}
@media only screen and (min-width: 2013px) {
.showUnfold {
display: none;
}
}
//---------旧版
.item_width_2{

2
src/views/components/resiSearch.vue

@ -109,7 +109,7 @@
<el-button style="margin-left:10px" size="small" class="diy-button--white" type="primary" plain
@click="resetForm">重置</el-button>
<el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch" plain>查询 </el-button>
<el-button style="margin-left:15px" size="small" class="div-table-button--blue" type="text"
<el-button style="margin-left:15px" size="small" class="div-table-button--blue showUnfold" type="text"
@click="boxHeight = !boxHeight">{{ boxHeight ? '收起' : '展开' }}<i
:class="boxHeight ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i></el-button>
</el-col>

9
src/views/modules/base/resi.vue

@ -336,7 +336,7 @@
}"
@close="handleDiyClose"></diy-info>
</el-dialog>
<people-more v-if="showedPeopleMoreInfo && lookInfo.userId"
<people-detail v-if="showedPeopleMoreInfo && lookInfo.userId"
:view_real_data="btnAuths.ic_resi_view_real_data"
:userId="lookInfo.userId"
:gridName="lookInfo.gridName"
@ -381,7 +381,7 @@ import resiTransfer from "../../components/resiTransfer.vue";
import resiChangeRecord from "../../components/resiChangeRecord.vue";
import peopleMore from "@/views/modules/shequ/cpts/people-more";
import peopleDetail from "@/views/modules/shequ/cpts/peopleDetail";
import baobiao from "@/views/modules/cpts/baobiao";
import diyInfo from "./diyInfo.vue";
import { requestPost } from "@/js/dai/request";
@ -397,7 +397,7 @@ export default {
editResi,
resiTransfer,
resiChangeRecord,
peopleMore,
peopleDetail,
diyInfo,
resiChangeTransfer,
@ -1521,6 +1521,9 @@ export default {
.collapse-title {
font-weight: bold;
}
::v-deep .el-button--text{
color: #000;
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;

713
src/views/modules/shequ/cpts/peopleDetail.vue

@ -0,0 +1,713 @@
<template>
<div class="m-pop">
<div class="wrap">
<div class="wrap2 p0">
<div class="flex endpoint">
<span class="font16">居民详情</span>
<el-button size="small" type="text" @click="handleClose">
<i class="el-icon-close font16"></i>
</el-button>
</div>
<hr/>
<div v-if="view_real_data"
class="div_tuomin">
<el-button size="mini"
class="diy-button--search"
@click="handleTuomin">显示脱敏信息</el-button>
</div>
<div :key="'fieldSubList' + index"
v-for="(fieldSubList, index) in fieldList">
<div class="list">
<div class="item"
v-if="index == 0">
<span class="item-field">所属网格</span>
<span>{{ gridName }}</span>
</div>
<div class="item"
v-if="index == 0">
<span class="item-field">所属小区</span>
<span>{{ xiaoquName }}</span>
</div>
<div class="item"
v-if="index == 0">
<span class="item-field">所属楼栋</span>
<span>{{ louName }}-{{ danyuanName }}</span>
</div>
<div class="item"
v-if="index == 0">
<span class="item-field">所属家庭</span>
<span>{{ homeName }}</span>
</div>
<div class="item"
:key="field.itemId"
v-for="field in fieldSubList">
<span class="item-field">{{ field.label }}</span>
<span v-if="field.columnName==='MOBILE'||field.columnName==='ID_CARD'">{{ info[field.columnName]||'--'}}</span>
<span v-else-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
">{{
info[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
info[field.columnName],
field.itemType
)
}}</span>
<span v-else>{{
info[field.columnName] == null ? "--" : info[field.columnName]
}}</span>
</div>
</div>
<div class="line"></div>
</div>
<div class="tabs">
<div class="tab-btn"
@click="subStartGroupIndex"
v-if="groupList.length > 9">
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div v-show="index >= startGroupIndex && index < startGroupIndex + 9"
class="tab"
:class="groupIndex % groupList.length == index ? 'z-on' : ''"
:key="'tab' + index"
@click="groupIndex = index"
v-for="(item, index) in groupList">
{{ item.label }}
</div>
<div class="tab-btn"
@click="addStartGroupIndex"
v-if="groupList.length > 9">
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</div>
</div>
<div :key="'group' + index"
v-show="groupIndex % groupList.length == index"
v-for="(group, index) in groupList">
<div v-if="
group.tableName == 'ic_resi_demand' &&
Array.isArray(allInfo.ic_resi_demand) &&
allInfo.ic_resi_demand.length > 0
">
<div class="list"
:key="'ic_resi_demand' + infoIndex"
v-for="(infoItem, infoIndex) in allInfo.ic_resi_demand">
<div class="item"
:key="field.itemId"
v-for="field in group.itemList">
<span class="item-field">{{ field.label }}</span>
<span v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
">{{
infoItem[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
infoItem[field.columnName],
field.itemType
)
}}</span>
<span v-else>{{
infoItem[field.columnName] == null
? "--"
: infoItem[field.columnName]
}}</span>
</div>
</div>
</div>
<div v-else-if="group.tableName == 'ic_hs'"
style="margin-top: 10px; padding: 0 20px">
<el-table class="table"
:data="natList"
border
height="400"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="testTime"
header-align="center"
align="center"
label="检测时间"
width="150">
</el-table-column>
<el-table-column prop="address"
header-align="center"
align="center"
label="检测机构"
show-overflow-tooltip
min-width="180">
</el-table-column>
<el-table-column prop="result"
header-align="center"
align="center"
label="检测结果"
width="240">
</el-table-column>
</el-table>
</div>
<div v-else-if="group.tableName == 'ic_xc'"
style="margin-top: 10px; padding: 0 20px">
<el-table class="table"
:data="tripList"
border
height="400"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="fromRegion"
header-align="center"
align="center"
label="来自地区"
show-overflow-tooltip
min-width="100">
</el-table-column>
<el-table-column prop="arrivalTime"
header-align="center"
align="center"
label="来到本地时间"
width="140">
</el-table-column>
<el-table-column prop="leaveTime"
header-align="center"
align="center"
label="离开本地时间"
width="140">
</el-table-column>
<el-table-column prop="noticeTime"
header-align="center"
align="center"
label="最近一次通知时间"
width="140">
</el-table-column>
<el-table-column prop="remark"
header-align="center"
align="center"
label="备注"
show-overflow-tooltip
width="120">
</el-table-column>
</el-table>
</div>
<div v-else-if="group.tableName == 'ic_ym'"
style="margin-top: 10px; padding: 0 20px">
<el-table v-if="vaccineList"
class="table"
:data="vaccineList"
border
height="400"
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="vaccinateTime"
header-align="center"
align="center"
label="接种时间"
show-overflow-tooltip
min-width="100">
</el-table-column>
<el-table-column prop="address"
header-align="center"
align="center"
label="接种地点">
</el-table-column>
<el-table-column prop="manufactor"
header-align="center"
align="center"
label="疫苗厂家">
</el-table-column>
</el-table>
</div>
<div class="list"
v-else>
<div class="item"
:class="{ 'z-long': group.itemList.length == 1 }"
:key="field.itemId"
v-for="field in group.itemList">
<span class="item-field">{{ field.label }}</span>
<span v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
">{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: getOptionLabel(
field.options,
allInfo[group.tableName][0][field.columnName],
field.itemType
)
}}</span>
<span v-else>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: allInfo[group.tableName][0][field.columnName]
}}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import { requestPost } from "@/js/dai/request";
export default {
name: "peopleMore",
props: {
userId: {
type: String,
default: "",
},
gridName: {
type: String,
default: "",
},
view_real_data: {//
type: Boolean,
default: false,
}
},
components: {
cptCard,
},
data () {
return {
fieldList: [],
groupList: [],
groupIndex: 0,
startGroupIndex: 0,
info: {},
allInfo: {},
xiaoquList: [],
louList: [],
danyuanList: [],
homeList: [],
natList: [], //
tripList: [], //
vaccineList: [],
};
},
computed: {
isShundeju () {
return this.$store.state.user.customerId == "1550309684576591874";
},
xiaoquName () {
const {
xiaoquList,
info: { VILLAGE_ID },
} = this;
if (Array.isArray(xiaoquList) && xiaoquList.length > 0 && VILLAGE_ID) {
let item = xiaoquList.find((item) => item.value == VILLAGE_ID);
if (item) {
return item.label;
}
}
return "";
},
louName () {
const {
louList,
info: { BUILD_ID },
} = this;
if (Array.isArray(louList) && louList.length > 0 && BUILD_ID) {
let item = louList.find((item) => item.value == BUILD_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName () {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName () {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
homeName () {
const {
homeList,
info: { HOME_ID },
} = this;
if (Array.isArray(homeList) && homeList.length > 0 && HOME_ID) {
let item = homeList.find((item) => item.value == HOME_ID);
if (item) {
return item.label;
}
}
return "";
},
},
watch: {
userId () {
this.getApiData();
},
},
mounted () {
this.getApiData();
},
methods: {
async handleTuomin () {
const url = "/data/aggregator/epmetuser/detailByType";
const { data, code, msg } = await requestPost(url, {
id: this.userId,
type: "checkIcResiUser",
});
if (code === 0) {
this.$set(this.info, 'MOBILE', data.mobile)
this.$set(this.info, 'ID_CARD', data.idCard)
} else {
this.$message.error(msg);
}
},
addStartGroupIndex () {
const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) {
this.startGroupIndex = startGroupIndex + 1;
} else {
this.startGroupIndex = groupList.length - 9;
}
},
subStartGroupIndex () {
const { startGroupIndex, groupList } = this;
if (startGroupIndex > 0) {
this.startGroupIndex = startGroupIndex - 1;
} else {
this.startGroupIndex = 0;
}
},
handleClose () {
this.$emit("close");
},
async getApiData () {
await this.getField();
await this.getInfo();
this.getDetailList();
this.getXiaoquList();
this.getLouList();
this.getDanyuanList();
this.getHomeList();
},
getOptionLabel (options, value, type = "") {
if (Array.isArray(options)) {
let valueArr = value.split(",");
if (type == "cascader") {
let finalValue = [];
this.getNodePath(options, value, finalValue);
return finalValue.join("-");
} else {
return valueArr
.map((val) => {
let item = options.find((item) => item.value == val);
if (item && item.label) {
return item.label;
}
return "--";
})
.join("、");
}
}
return "--";
},
getNodePath (node, val, path) {
// node:val:id, path:id
for (let i = 0; i < node.length; i++) {
const ele = node[i];
if (ele.value === val) {
path.push(ele.label);
return path;
} else if (ele.children && ele.children.length > 0) {
if (ele.children.some((row) => row.value === val)) {
path.unshift(ele.label);
this.getNodePath(ele.children, val, path);
} else {
this.getNodePath(ele.children, val, path);
}
}
}
return path;
},
//
async getField () {
const url = "/oper/customize/icform/getcustomerform";
const { data, code, msg } = await requestPost(url, {
dynamic: true,
formCode: "resi_base_info",
});
if (code === 0) {
this.groupList = data.groupList;
this.fieldList = (function (arr) {
let col = [];
let ele = [];
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
if (item.itemType == "divider" || i == arr.length - 1) {
col.push([...ele]);
ele = [];
} else {
ele.push(item);
}
}
return col;
})(data.itemList);
this.fieldList.forEach((subList, index) => {
subList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.fieldList[index][subIndex].options = await this.getOptions(
item.optionSourceValue
);
}
});
});
} else {
this.$message.error(msg);
}
},
//
async getInfo () {
const url = "/epmetuser/icresiuser/detail";
const { data, code, msg } = await requestPost(url, {
icResiUserId: this.userId,
formCode: "resi_base_info",
});
if (code === 0) {
this.info = data.ic_resi_user[0];
this.allInfo = data;
this.fieldList.forEach((subList, index) => {
subList.forEach((item, subIndex) => {
if (
item.itemType == "radio" &&
item.childGroup &&
this.allInfo[item.tableName] &&
this.allInfo[item.tableName][0][item.columnName] == "1"
) {
this.groupList = [...this.groupList, item.childGroup];
}
});
});
await Promise.all(
this.groupList.map((subList, index) => {
return Promise.all(
subList.itemList.map(async (item, subIndex) => {
if (
item.optionSourceType == "remote" &&
item.optionSourceValue
) {
this.groupList[index].itemList[subIndex].options =
await this.getOptions(item.optionSourceValue);
}
})
);
})
);
console.log("44444444", this.groupList);
let arr = [
{
groupId: "hs123",
itemList: [],
label: "核酸检测信息",
sort: 998,
supportAdd: false,
tableName: "ic_hs",
},
];
if (!this.isShundeju) {
arr = [
...arr,
{
groupId: "hs124",
itemList: [],
label: "行程信息",
sort: 999,
supportAdd: false,
tableName: "ic_xc",
},
{
groupId: "hs125",
itemList: [],
label: "疫苗信息",
sort: 999,
supportAdd: false,
tableName: "ic_ym",
},
];
this.groupList = [...this.groupList, ...arr];
} else {
this.groupList = [...arr, ...this.groupList];
}
} else {
this.$message.error(msg);
}
},
//
async getOptions (url) {
if (!url) return [];
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
return data;
} else {
return [];
}
},
async getXiaoquList () {
const url = "/gov/org/icneighborhood/neighborhoodoption";
const { data, code, msg } = await requestPost(url, {
agencyId: this.info.AGENCY_ID,
gridId: this.info.GRID_ID,
});
if (code === 0) {
this.xiaoquList = data;
} else {
this.$message.error(msg);
}
},
async getLouList () {
const url = "/gov/org/icbuilding/buildingoption";
const { data, code, msg } = await requestPost(url, {
neighborHoodId: this.info.VILLAGE_ID,
});
if (code === 0) {
this.louList = data;
} else {
this.$message.error(msg);
}
},
async getDanyuanList () {
const url = "/gov/org/icbuildingunit/unitoption";
const { data, code, msg } = await requestPost(url, {
buildingId: this.info.BUILD_ID,
});
if (code === 0) {
this.danyuanList = data;
} else {
this.$message.error(msg);
}
},
async getHomeList () {
const url = "/gov/org/ichouse/houseoption";
const { data, code, msg } = await requestPost(url, {
unitId: this.info.UNIT_ID,
});
if (code === 0) {
this.homeList = data;
} else {
this.$message.error(msg);
}
},
async getDetailList () {
const url = "/epmetuser/epidemicPrevention/info";
let params = {
id: this.userId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
const { vaccineList, natList, tripList } = data;
this.vaccineList = vaccineList;
this.natList = natList;
this.tripList = tripList;
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
@import '@/assets/scss/people-info.scss'
</style>
Loading…
Cancel
Save