|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,503 @@ |
|||
<template> |
|||
<div class="m-pop"> |
|||
<div class="wrap"> |
|||
<cpt-card> |
|||
<div class="title"> |
|||
<img src="@/assets/img/shuju/title-tip.png" /> |
|||
<span>更多信息</span> |
|||
</div> |
|||
|
|||
<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 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.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 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=" |
|||
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> |
|||
</cpt-card> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import cptCard from "@/views/modules/visual/cpts/card"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
|
|||
export default { |
|||
name: "demandInfo", |
|||
props: { |
|||
userId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
gridName: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
cptCard, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
fieldList: [], |
|||
groupList: [], |
|||
groupIndex: 0, |
|||
startGroupIndex: 0, |
|||
info: {}, |
|||
allInfo: {}, |
|||
|
|||
xiaoquList: [], |
|||
louList: [], |
|||
danyuanList: [], |
|||
homeList: [], |
|||
}; |
|||
}, |
|||
|
|||
computed: { |
|||
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: { |
|||
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.getXiaoquList(); |
|||
this.getLouList(); |
|||
this.getDanyuanList(); |
|||
this.getHomeList(); |
|||
}, |
|||
|
|||
getOptionLabel(options, value, type = "") { |
|||
if (Array.isArray(options)) { |
|||
let valueArr = value.split(","); |
|||
if (type == "cascader") { |
|||
if (valueArr.length > 0) { |
|||
let level1 = options.find((item) => item.value == valueArr[0]); |
|||
if (level1) { |
|||
if (valueArr.length > 1 && level1.children) { |
|||
let level2 = level1.children.find( |
|||
(item) => item.value == valueArr[1] |
|||
); |
|||
if (level2) { |
|||
return level1.label + "-" + level2.label; |
|||
} |
|||
} |
|||
return level1.label; |
|||
} |
|||
} |
|||
} else { |
|||
return valueArr |
|||
.map((val) => { |
|||
let item = options.find((item) => item.value == val); |
|||
if (item && item.label) { |
|||
return item.label; |
|||
} |
|||
return "--"; |
|||
}) |
|||
.join("、"); |
|||
} |
|||
} |
|||
return "--"; |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
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]; |
|||
} |
|||
}); |
|||
}); |
|||
console.log("1111111111111111111111111", this.groupList); |
|||
|
|||
this.groupList.forEach((subList, index) => { |
|||
subList.itemList.forEach(async (item, subIndex) => { |
|||
if (item.optionSourceType == "remote" && item.optionSourceValue) { |
|||
this.groupList[index].itemList[subIndex].options = |
|||
await this.getOptions(item.optionSourceValue); |
|||
} |
|||
}); |
|||
}); |
|||
} 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); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style> |
|||
@ -0,0 +1,503 @@ |
|||
<template> |
|||
<div class="m-pop"> |
|||
<div class="wrap"> |
|||
<cpt-card> |
|||
<div class="title"> |
|||
<img src="@/assets/img/shuju/title-tip.png" /> |
|||
<span>更多信息</span> |
|||
</div> |
|||
|
|||
<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 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.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 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=" |
|||
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> |
|||
</cpt-card> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import cptCard from "@/views/modules/visual/cpts/card"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
|
|||
export default { |
|||
name: "demandInfo", |
|||
props: { |
|||
userId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
gridName: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
cptCard, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
fieldList: [], |
|||
groupList: [], |
|||
groupIndex: 0, |
|||
startGroupIndex: 0, |
|||
info: {}, |
|||
allInfo: {}, |
|||
|
|||
xiaoquList: [], |
|||
louList: [], |
|||
danyuanList: [], |
|||
homeList: [], |
|||
}; |
|||
}, |
|||
|
|||
computed: { |
|||
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: { |
|||
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.getXiaoquList(); |
|||
this.getLouList(); |
|||
this.getDanyuanList(); |
|||
this.getHomeList(); |
|||
}, |
|||
|
|||
getOptionLabel(options, value, type = "") { |
|||
if (Array.isArray(options)) { |
|||
let valueArr = value.split(","); |
|||
if (type == "cascader") { |
|||
if (valueArr.length > 0) { |
|||
let level1 = options.find((item) => item.value == valueArr[0]); |
|||
if (level1) { |
|||
if (valueArr.length > 1 && level1.children) { |
|||
let level2 = level1.children.find( |
|||
(item) => item.value == valueArr[1] |
|||
); |
|||
if (level2) { |
|||
return level1.label + "-" + level2.label; |
|||
} |
|||
} |
|||
return level1.label; |
|||
} |
|||
} |
|||
} else { |
|||
return valueArr |
|||
.map((val) => { |
|||
let item = options.find((item) => item.value == val); |
|||
if (item && item.label) { |
|||
return item.label; |
|||
} |
|||
return "--"; |
|||
}) |
|||
.join("、"); |
|||
} |
|||
} |
|||
return "--"; |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
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]; |
|||
} |
|||
}); |
|||
}); |
|||
console.log("1111111111111111111111111", this.groupList); |
|||
|
|||
this.groupList.forEach((subList, index) => { |
|||
subList.itemList.forEach(async (item, subIndex) => { |
|||
if (item.optionSourceType == "remote" && item.optionSourceValue) { |
|||
this.groupList[index].itemList[subIndex].options = |
|||
await this.getOptions(item.optionSourceValue); |
|||
} |
|||
}); |
|||
}); |
|||
} 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); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style> |
|||
@ -0,0 +1,503 @@ |
|||
<template> |
|||
<div class="m-pop"> |
|||
<div class="wrap"> |
|||
<cpt-card> |
|||
<div class="title"> |
|||
<img src="@/assets/img/shuju/title-tip.png" /> |
|||
<span>更多信息</span> |
|||
</div> |
|||
|
|||
<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 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.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 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=" |
|||
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> |
|||
</cpt-card> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import cptCard from "@/views/modules/visual/cpts/card"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
|
|||
export default { |
|||
name: "demandInfo", |
|||
props: { |
|||
userId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
gridName: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
|
|||
components: { |
|||
cptCard, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
fieldList: [], |
|||
groupList: [], |
|||
groupIndex: 0, |
|||
startGroupIndex: 0, |
|||
info: {}, |
|||
allInfo: {}, |
|||
|
|||
xiaoquList: [], |
|||
louList: [], |
|||
danyuanList: [], |
|||
homeList: [], |
|||
}; |
|||
}, |
|||
|
|||
computed: { |
|||
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: { |
|||
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.getXiaoquList(); |
|||
this.getLouList(); |
|||
this.getDanyuanList(); |
|||
this.getHomeList(); |
|||
}, |
|||
|
|||
getOptionLabel(options, value, type = "") { |
|||
if (Array.isArray(options)) { |
|||
let valueArr = value.split(","); |
|||
if (type == "cascader") { |
|||
if (valueArr.length > 0) { |
|||
let level1 = options.find((item) => item.value == valueArr[0]); |
|||
if (level1) { |
|||
if (valueArr.length > 1 && level1.children) { |
|||
let level2 = level1.children.find( |
|||
(item) => item.value == valueArr[1] |
|||
); |
|||
if (level2) { |
|||
return level1.label + "-" + level2.label; |
|||
} |
|||
} |
|||
return level1.label; |
|||
} |
|||
} |
|||
} else { |
|||
return valueArr |
|||
.map((val) => { |
|||
let item = options.find((item) => item.value == val); |
|||
if (item && item.label) { |
|||
return item.label; |
|||
} |
|||
return "--"; |
|||
}) |
|||
.join("、"); |
|||
} |
|||
} |
|||
return "--"; |
|||
}, |
|||
|
|||
//加载组织数据 |
|||
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]; |
|||
} |
|||
}); |
|||
}); |
|||
console.log("1111111111111111111111111", this.groupList); |
|||
|
|||
this.groupList.forEach((subList, index) => { |
|||
subList.itemList.forEach(async (item, subIndex) => { |
|||
if (item.optionSourceType == "remote" && item.optionSourceValue) { |
|||
this.groupList[index].itemList[subIndex].options = |
|||
await this.getOptions(item.optionSourceValue); |
|||
} |
|||
}); |
|||
}); |
|||
} 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); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style> |
|||
@ -0,0 +1,401 @@ |
|||
<template> |
|||
<div class="warning-box"> |
|||
<cpt-card class="card-wr"> |
|||
<div class="card-title"> |
|||
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" /> |
|||
<div class="title-label"> |
|||
区域化党建 |
|||
</div> |
|||
</div> |
|||
<div class="second-title"> |
|||
<div class="second-title-label">党建单位分类统计</div> |
|||
<div class="second-select"> |
|||
<el-select v-model="value2" clearable placeholder="请选择"> |
|||
<el-option |
|||
v-for="item in headerList" |
|||
:key="item.coulmn" |
|||
:label="item.title" |
|||
:value="item.coulmn"> |
|||
</el-option> |
|||
</el-select> |
|||
</div> |
|||
<div class="second-select"> |
|||
<el-date-picker |
|||
v-model="value2" |
|||
type="date" |
|||
prefix-icon="el-icon-caret-bottom" |
|||
placeholder="选择日期" |
|||
value-format="yyyy-MM-dd"> |
|||
</el-date-picker> |
|||
</div> |
|||
</div> |
|||
<div class="box-wr box-wr-400"> |
|||
<div class="box-left"> |
|||
<div class="box-left-item"> |
|||
<div class="box-label">组织单位</div> |
|||
<div class="box-num">1233</div> |
|||
</div> |
|||
<div class="box-left-item"> |
|||
<div class="box-label">组织活动</div> |
|||
<div class="box-num">1233</div> |
|||
</div> |
|||
</div> |
|||
<div class="box-right"> |
|||
<div class="warning-box-bottom"> |
|||
<screen-table |
|||
:headerList="headerList" |
|||
:tableData="tableData" |
|||
:visibleLoading="visibleLoading" |
|||
:operate="false" |
|||
></screen-table> |
|||
<div class="pagination"> |
|||
<el-pagination |
|||
:current-page="pageNo" |
|||
:page-size="pageSize" |
|||
background |
|||
layout="prev, pager, next" |
|||
@size-change="pageSizeChangeHandleNew" |
|||
@current-change="pageCurrentChangeHandleNew" |
|||
:total="total" |
|||
> |
|||
</el-pagination> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="second-title"> |
|||
<div class="second-title-label">党建单位分类统计</div> |
|||
</div> |
|||
|
|||
<div class="box-wr"> |
|||
<div class="box-left box-left-w400"> |
|||
<div v-for="item in partyItem" :key="item.value" class="box-left-item"> |
|||
<div class="box-label">{{ item.name }}</div> |
|||
<div class="box-num" :style="'color:' + item.color">{{ item.value }}</div> |
|||
</div> |
|||
|
|||
</div> |
|||
<div class="box-right"> |
|||
<div class="box-map">这是地图容器</div> |
|||
<div class="map-tips"> |
|||
<div v-for="item in partyItem" :key="item.value" class="map-tips-item"> |
|||
<div class="map-tips-icon"> |
|||
<img :src="item.icon" /> |
|||
</div> |
|||
<div class="map-tips-label">{{ item.name }}</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</cpt-card> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import screenTable from "../components/screen-table/index"; |
|||
import cptCard from "@/views/modules/visual/cpts/card"; |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
|
|||
export default { |
|||
name: "warning-box", |
|||
components: { |
|||
cptCard, |
|||
screenTable, |
|||
}, |
|||
data() { |
|||
return { |
|||
warningList: [], |
|||
headerList: [ |
|||
{ title: "序号", coulmn: 'index' }, |
|||
{ title: "需求类型", coulmn: 'gridName' }, |
|||
{ title: "具体内容", coulmn: 'buildingName' }, |
|||
{ title: "上报情况", coulmn: 'neighborhoodName' }, |
|||
{ title: "上报人", coulmn: 'residentNames' }, |
|||
{ title: "上报时间", coulmn: 'residentNames' }, |
|||
{ title: "是否认领", coulmn: 'residentNames' }, |
|||
{ title: "认领方", coulmn: 'residentNames' }, |
|||
{ title: "认领时间", coulmn: 'residentNames' } |
|||
], |
|||
tableData: [ |
|||
// [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], |
|||
], |
|||
value2: '', |
|||
visibleLoading: true, |
|||
pageNo: 1, |
|||
pageSize: 10, |
|||
total: 0, |
|||
activeIndex: 0, |
|||
activeLevel: "1", |
|||
partyItem: [ |
|||
{ |
|||
name: '楼宇党建', |
|||
value: 1, |
|||
color: 'rgba(250, 32, 10, 1)', |
|||
icon: require('../../../../assets/img/shuju/measure/ly@2x.png') |
|||
}, { |
|||
name: '机关直属部门', |
|||
value: 2, |
|||
color: 'rgba(65, 181, 104, 1)', |
|||
icon: require('../../../../assets/img/shuju/measure/jgzs@2x.png') |
|||
}, { |
|||
name: '两新党建', |
|||
value: 3, |
|||
color: 'rgba(251, 177, 4, 1)', |
|||
icon: require('../../../../assets/img/shuju/measure/lxdj@2x.png') |
|||
}, { |
|||
name: '辖区单位', |
|||
value: 4, |
|||
color: 'rgba(80, 194, 237, 1)', |
|||
icon: require('../../../../assets/img/shuju/measure/xq@2x.png') |
|||
}, { |
|||
name: '其他', |
|||
value: 5, |
|||
color: 'rgba(192, 21, 195, 1)', |
|||
icon: require('../../../../assets/img/shuju/measure/qita.png') |
|||
} |
|||
], |
|||
}; |
|||
}, |
|||
async mounted() { |
|||
await nextTick(100); |
|||
this.getBuildingwarnlist(); |
|||
}, |
|||
methods: { |
|||
|
|||
|
|||
onClickList(index, level) { |
|||
this.activeIndex = index; |
|||
this.activeLevel = level; |
|||
this.pageNo = 1; |
|||
this.getUserwarnlist(); |
|||
}, |
|||
//具体人员列表 |
|||
async getUserwarnlist() { |
|||
const { activeIndex, activeLevel, warningList } = this; |
|||
const reqItem = warningList[activeIndex]; |
|||
let tableData = []; |
|||
const url = "/epmetuser/statsresiwarn/userwarnlist"; |
|||
let params = { |
|||
configId: reqItem.configId, |
|||
buildingIdList: reqItem["buildingIdList" + activeLevel], |
|||
pageNo: this.pageNo, |
|||
pageSize: this.pageSize, |
|||
}; |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
if (code === 0) { |
|||
tableData = data.list.map((item, index) => { |
|||
return { |
|||
...item, |
|||
index: index + 1, |
|||
residentNames: item.residentNames || "暂无" |
|||
} |
|||
}); |
|||
this.tableData = tableData; |
|||
this.total = data.total; |
|||
} else { |
|||
} |
|||
}, |
|||
// 【人员预警】 楼宇预警数量列表 |
|||
async getBuildingwarnlist() { |
|||
const url = "/epmetuser/statsresiwarn/buildingwarnlist"; |
|||
let params = { |
|||
agencyId: this.$store.state.user.agencyId, |
|||
}; |
|||
const { data, code, msg } = await requestPost(url, params); |
|||
if (code === 0) { |
|||
this.warningList = data; |
|||
this.visibleLoading = false; |
|||
this.getUserwarnlist(); |
|||
} else { |
|||
} |
|||
}, |
|||
pageSizeChangeHandleNew(val) { |
|||
this.pageNo = 1; |
|||
this.pageSize = val; |
|||
}, |
|||
pageCurrentChangeHandleNew(val) { |
|||
this.pageNo = val; |
|||
this.getUserwarnlist(); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style |
|||
lang="scss" |
|||
src="@/assets/scss/modules/visual/warning.scss" |
|||
scoped |
|||
></style> |
|||
<style lang="scss" scoped> |
|||
.warning-box { |
|||
display: flex; |
|||
.card-wr { |
|||
flex: 1; |
|||
} |
|||
.card-wr:last-child { |
|||
margin-left: 20px; |
|||
} |
|||
} |
|||
.card-title { |
|||
display: flex; |
|||
align-items: center; |
|||
cursor: pointer; |
|||
.title-icon { |
|||
display: block; |
|||
width: 46px; |
|||
height: 34px; |
|||
box-sizing: border-box; |
|||
margin-right: 6px; |
|||
} |
|||
.title-label { |
|||
font-size: 16px; |
|||
font-weight: 800; |
|||
} |
|||
::v-deep .el-dropdown { |
|||
font-size: 16px; |
|||
color: #fff; |
|||
font-weight: 800; |
|||
} |
|||
|
|||
} |
|||
.second-title { |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 20px; |
|||
.second-title-label { |
|||
position: relative; |
|||
padding-left: 40px; |
|||
font-size: 16px; |
|||
font-weight: 500; |
|||
color: #fff; |
|||
} |
|||
.second-title-label::after { |
|||
content: ''; |
|||
position: absolute; |
|||
top: 50%; |
|||
left: 20px; |
|||
width: 12px; |
|||
height: 12px; |
|||
box-sizing: border-box; |
|||
margin-top: -6px; |
|||
background: #2865FA; |
|||
border-radius: 50%; |
|||
} |
|||
.second-select { |
|||
margin: 0 10px 0 40px; |
|||
::v-deep .el-input { |
|||
width: 120px; |
|||
height: 36px; |
|||
.el-input__inner { |
|||
height: 100%; |
|||
padding: 0 10px; |
|||
color: #fff; |
|||
line-height: 36px; |
|||
background: #06186D; |
|||
border: 1px solid #1A64CC; |
|||
} |
|||
|
|||
.el-icon-arrow-up:before { |
|||
content: "\e78f" |
|||
} |
|||
// .el-select__caret:before { |
|||
// content: '\E790' |
|||
// } |
|||
} |
|||
::v-deep .el-date-editor { |
|||
.el-input__prefix { |
|||
left: unset; |
|||
right: 5px; |
|||
} |
|||
} |
|||
} |
|||
.second-select:last-child { |
|||
margin-left: 0; |
|||
} |
|||
} |
|||
|
|||
.box-wr { |
|||
display: flex; |
|||
box-sizing: border-box; |
|||
.box-left { |
|||
flex-shrink: 0; |
|||
display: flex; |
|||
.box-left-item { |
|||
.box-label { |
|||
font-size: 16px; |
|||
color: rgba(255, 255, 255, .72); |
|||
} |
|||
.box-num { |
|||
font-size: 32px; |
|||
font-weight: bold; |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
.box-right { |
|||
flex: 1; |
|||
.box-map { |
|||
height: 400px; |
|||
border: 1px solid #2865FA; |
|||
} |
|||
} |
|||
.box-left-w400 { |
|||
flex-wrap: wrap; |
|||
width: 400px; |
|||
box-sizing: border-box; |
|||
padding-top: 60px; |
|||
padding-left: 100px; |
|||
.box-left-item { |
|||
width: 50%; |
|||
} |
|||
} |
|||
} |
|||
.box-wr-400 { |
|||
height: 400px; |
|||
.box-left { |
|||
width: 300px; |
|||
flex-direction: column; |
|||
justify-content: center; |
|||
align-items: center; |
|||
.box-left-item:last-child { |
|||
margin-top: 100px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
.map-tips { |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: center; |
|||
flex-wrap: wrap; |
|||
padding-top: 10px; |
|||
padding-bottom: 20px; |
|||
.map-tips-item { |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 20px; |
|||
margin-right: 40px; |
|||
.map-tips-icon { |
|||
width: 32px; |
|||
height: 32px; |
|||
box-sizing: border-box; |
|||
margin-right: 10px; |
|||
// background: #DD2719; |
|||
// border-radius: 2px; |
|||
img { |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
} |
|||
.map-tips-label { |
|||
font-size: 16px; |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
|
|||
</style> |
|||