Browse Source

dfsfs

shibei_master
dai 3 years ago
parent
commit
25c1c03230
  1. 4
      src/views/modules/shequ/cpts/people-more.vue
  2. 288
      src/views/modules/visual/basicinfo/cpts/people-more.vue

4
src/views/modules/shequ/cpts/people-more.vue

@ -136,7 +136,7 @@
</div>
</div>
</div>
<div v-if="group.tableName == 'ic_hs'" style="margin-top:10px; padding: 0 20px;">
<div v-else-if="group.tableName == 'ic_hs'" style="margin-top:10px; padding: 0 20px;">
<el-table class="table"
:data="natList"
border
@ -170,7 +170,7 @@
</el-table-column>
</el-table>
</div>
<div v-if="group.tableName == 'ic_xc'" style="margin-top:10px; padding: 0 20px;">
<div v-else-if="group.tableName == 'ic_xc'" style="margin-top:10px; padding: 0 20px;">
<el-table class="table"
:data="tripList"
border

288
src/views/modules/visual/basicinfo/cpts/people-more.vue

@ -7,45 +7,42 @@
<span>更多信息</span>
</div>
<div class="btn-close"
@click="handleClose">
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div :key="'fieldSubList' + index"
v-for="(fieldSubList, index) in fieldList">
<div
:key="'fieldSubList' + index"
v-for="(fieldSubList, index) in fieldList"
>
<div class="list">
<div class="item"
v-if="index == 0">
<div class="item" v-if="index == 0">
<span class="item-field">所属网格</span>
<span>{{ gridName }}</span>
</div>
<div class="item"
v-if="index == 0">
<div class="item" v-if="index == 0">
<span class="item-field">所属小区</span>
<span>{{ xiaoquName }}</span>
</div>
<div class="item"
v-if="index == 0">
<div class="item" v-if="index == 0">
<span class="item-field">所属楼栋</span>
<span>{{ louName }}-{{ danyuanName }}</span>
</div>
<div class="item"
v-if="index == 0">
<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">
<div class="item" :key="field.itemId" v-for="field in fieldSubList">
<span class="item-field">{{ field.label }}</span>
<span v-if="
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
">{{
"
>{{
info[field.columnName] == null
? "--"
: getOptionLabel(
@ -53,7 +50,8 @@
info[field.columnName],
field.itemType
)
}}</span>
}}</span
>
<span v-else>{{
info[field.columnName] == null ? "--" : info[field.columnName]
@ -65,43 +63,63 @@
</div>
<div class="tabs">
<div class="tab-btn"
@click="subStartGroupIndex"
v-if="groupList.length > 9">
<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">
<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">
<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">
<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="
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
">{{
"
>{{
infoItem[field.columnName] == null
? "--"
: getOptionLabel(
@ -109,7 +127,8 @@
infoItem[field.columnName],
field.itemType
)
}}</span>
}}</span
>
<span v-else>{{
infoItem[field.columnName] == null
@ -119,39 +138,47 @@
</div>
</div>
</div>
<div v-if="group.tableName == 'ic_hs'"
style="margin-top:10px; padding: 0 20px;">
<div
v-else-if="group.tableName == 'ic_hs'"
style="margin-top: 10px; padding: 0 20px"
>
<div class="tb">
<cpt-tb :col-list="natDemand.colList"
:loading="natDemand.loading"
:header="natDemand.header"
:list="natDemand.list"></cpt-tb>
<cpt-tb
:col-list="natDemand.colList"
:loading="natDemand.loading"
:header="natDemand.header"
:list="natDemand.list"
></cpt-tb>
</div>
</div>
<div v-if="group.tableName == 'ic_xc'"
style="margin-top:10px; padding: 0 20px;">
<div
v-else-if="group.tableName == 'ic_xc'"
style="margin-top: 10px; padding: 0 20px"
>
<div class="tb">
<cpt-tb :col-list="tripDemand.colList"
:loading="tripDemand.loading"
:header="tripDemand.header"
:list="tripDemand.list"></cpt-tb>
<cpt-tb
:col-list="tripDemand.colList"
:loading="tripDemand.loading"
:header="tripDemand.header"
:list="tripDemand.list"
></cpt-tb>
</div>
</div>
<div class="list"
v-else>
<div class="item"
:key="field.itemId"
v-for="field in group.itemList">
<div class="list" v-else>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span v-if="
<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
? "--"
@ -160,7 +187,8 @@
allInfo[group.tableName][0][field.columnName],
field.itemType
)
}}</span>
}}</span
>
<span v-else>{{
!allInfo[group.tableName] ||
@ -195,10 +223,11 @@ export default {
},
components: {
cptCard, cptTb
cptCard,
cptTb,
},
data () {
data() {
return {
fieldList: [],
groupList: [],
@ -212,8 +241,8 @@ export default {
danyuanList: [],
homeList: [],
natList: [],//
tripList: [],//
natList: [], //
tripList: [], //
natDemand: {
loading: false,
@ -267,17 +296,22 @@ export default {
width: "15%",
},
],
header: ["序号", "来自地区", "来到本地地区", "离开本地地区", "最近一次通知时间", "备注"],
header: [
"序号",
"来自地区",
"来到本地地区",
"离开本地地区",
"最近一次通知时间",
"备注",
],
list: [],
srcList: [],
},
};
},
computed: {
xiaoquName () {
xiaoquName() {
const {
xiaoquList,
info: { VILLAGE_ID },
@ -290,7 +324,7 @@ export default {
}
return "";
},
louName () {
louName() {
const {
louList,
info: { BUILD_ID },
@ -303,7 +337,7 @@ export default {
}
return "";
},
danyuanName () {
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
@ -316,7 +350,7 @@ export default {
}
return "";
},
danyuanName () {
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
@ -329,7 +363,7 @@ export default {
}
return "";
},
homeName () {
homeName() {
const {
homeList,
info: { HOME_ID },
@ -345,17 +379,17 @@ export default {
},
watch: {
userId () {
userId() {
this.getApiData();
},
},
mounted () {
mounted() {
this.getApiData();
},
methods: {
addStartGroupIndex () {
addStartGroupIndex() {
const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) {
this.startGroupIndex = startGroupIndex + 1;
@ -363,7 +397,7 @@ export default {
this.startGroupIndex = groupList.length - 9;
}
},
subStartGroupIndex () {
subStartGroupIndex() {
const { startGroupIndex, groupList } = this;
if (startGroupIndex > 0) {
this.startGroupIndex = startGroupIndex - 1;
@ -371,21 +405,21 @@ export default {
this.startGroupIndex = 0;
}
},
handleClose () {
handleClose() {
this.$emit("close");
},
async getApiData () {
async getApiData() {
await this.getField();
await this.getInfo();
this.getDetailList()
this.getDetailList();
this.getXiaoquList();
this.getLouList();
this.getDanyuanList();
this.getHomeList();
},
getOptionLabel (options, value, type = "") {
getOptionLabel(options, value, type = "") {
if (Array.isArray(options)) {
let valueArr = value.split(",");
if (type == "cascader") {
@ -419,7 +453,7 @@ export default {
},
//
async getField () {
async getField() {
const url = "/oper/customize/icform/getcustomerform";
const { data, code, msg } = await requestPost(url, {
@ -459,7 +493,7 @@ export default {
},
//
async getInfo () {
async getInfo() {
const url = "/epmetuser/icresiuser/detail";
const { data, code, msg } = await requestPost(url, {
@ -493,49 +527,46 @@ export default {
}
});
});
const arr = [{
groupId: "hs123",
itemList: [],
label: "核酸检测信息",
sort: 998,
supportAdd: false,
tableName: "ic_hs",
}, {
groupId: "hs124",
itemList: [],
label: "行程信息",
sort: 999,
supportAdd: false,
tableName: "ic_xc",
}]
this.groupList = [...this.groupList, ...arr]
const arr = [
{
groupId: "hs123",
itemList: [],
label: "核酸检测信息",
sort: 998,
supportAdd: false,
tableName: "ic_hs",
},
{
groupId: "hs124",
itemList: [],
label: "行程信息",
sort: 999,
supportAdd: false,
tableName: "ic_xc",
},
];
this.groupList = [...this.groupList, ...arr];
} else {
this.$message.error(msg);
}
},
async getDetailList () {
const url = "/epmetuser/epidemicPrevention/info"
async getDetailList() {
const url = "/epmetuser/epidemicPrevention/info";
let params = {
id: this.userId
}
id: this.userId,
};
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
const { natList, tripList } = data
const { natList, tripList } = data;
this.natList = natList
this.tripList = tripList
this.natList = natList;
this.tripList = tripList;
this.natDemand.list = natList.map((item) => {
return [
{ type: "index" },
item.testTime,
item.address,
item.result,
];
return [{ type: "index" }, item.testTime, item.address, item.result];
});
this.natDemand.srcList = natList;
@ -550,14 +581,13 @@ export default {
];
});
this.tripDemand.srcList = tripList;
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
//
async getOptions (url) {
async getOptions(url) {
if (!url) return [];
const { data, code, msg } = await requestPost(url, {});
@ -569,7 +599,7 @@ export default {
}
},
async getXiaoquList () {
async getXiaoquList() {
const url = "/gov/org/icneighborhood/neighborhoodoption";
const { data, code, msg } = await requestPost(url, {
@ -583,7 +613,7 @@ export default {
this.$message.error(msg);
}
},
async getLouList () {
async getLouList() {
const url = "/gov/org/icbuilding/buildingoption";
const { data, code, msg } = await requestPost(url, {
@ -596,7 +626,7 @@ export default {
this.$message.error(msg);
}
},
async getDanyuanList () {
async getDanyuanList() {
const url = "/gov/org/icbuildingunit/unitoption";
const { data, code, msg } = await requestPost(url, {
@ -609,7 +639,7 @@ export default {
this.$message.error(msg);
}
},
async getHomeList () {
async getHomeList() {
const url = "/gov/org/ichouse/houseoption";
const { data, code, msg } = await requestPost(url, {
@ -626,4 +656,8 @@ export default {
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/people.scss"
scoped
></style>

Loading…
Cancel
Save