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>
</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" <el-table class="table"
:data="natList" :data="natList"
border border
@ -170,7 +170,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</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;">
<el-table class="table" <el-table class="table"
:data="tripList" :data="tripList"
border border

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

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