3 changed files with 448 additions and 222 deletions
@ -0,0 +1,108 @@ |
|||
<template> |
|||
<div v-if="iniLoaded"> |
|||
<base-page |
|||
:searchParams="searchParams" |
|||
:tableParams="tableParams" |
|||
:tableUrl="tableUrl" |
|||
:operateCol="false" |
|||
idName="icDangerousChemicalsId" |
|||
></base-page> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import basePage from "@/views/modules/cpts/base/index"; |
|||
import { getItemByIdInCascader, collapse } from "@/utils/cascader"; |
|||
|
|||
export default { |
|||
props: { |
|||
orgId: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
orgIds: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
iniLoaded: false, |
|||
|
|||
searchParams: [ |
|||
{ |
|||
field: "选择范围", |
|||
keyName: "org", |
|||
type: "cascader", |
|||
value: "", |
|||
// optionUrl: "/gov/org/customeragency/agencygridtree", |
|||
optionUrl: "/gov/org/customeragency/my-subagency-list", |
|||
optionUrlParams: { |
|||
agencyId: this.$store.state.user.agencyId, |
|||
}, |
|||
optionList: [], |
|||
optionProps: { |
|||
multiple: false, |
|||
value: "agencyId", |
|||
label: "agencyName", |
|||
children: "subAgencyList", |
|||
checkStrictly: true, |
|||
}, |
|||
optionCook(obj) { |
|||
return [obj]; |
|||
}, |
|||
supKeys: ["orgId", "orgType"], |
|||
supValues: ["", ""], |
|||
handleChangeFn(vals, item) { |
|||
const { optionList } = item; |
|||
if (vals.length > 0) { |
|||
item["supValues"][0] = vals[vals.length - 1]; |
|||
item["supValues"][1] = getItemByIdInCascader( |
|||
optionList, |
|||
vals, |
|||
"agencyId", |
|||
"subAgencyList" |
|||
)[vals.length - 1]["level"]; |
|||
item["supValues"][1] = |
|||
item["supValues"][1] == "grid" ? "grid" : "agency"; |
|||
} else { |
|||
item["supValues"][0] = ""; |
|||
item["supValues"][1] = ""; |
|||
} |
|||
}, |
|||
}, |
|||
], |
|||
|
|||
tableParams: [ |
|||
{ field: "序号", keyName: "", type: "no" }, |
|||
{ field: "所属组织", keyName: "orgName", type: "text", width: "220" }, |
|||
{ field: "人口总数", keyName: "userTotal", type: "text" }, |
|||
{ field: "常住人口数", keyName: "czUserTotal", type: "text" }, |
|||
{ field: "流动人口数", keyName: "ldUserTotal", type: "text" }, |
|||
{ field: "房屋总数", keyName: "houseTotal", type: "text" }, |
|||
{ field: "自住房屋数", keyName: "zzHouseTotal", type: "text" }, |
|||
{ field: "出租房屋数", keyName: "czHouseTotal", type: "text" }, |
|||
{ field: "闲置房屋数", keyName: "xzHouseTotal", type: "text" }, |
|||
], |
|||
tableUrl: "/gov/org/house/usingCommunityUserHouseStats", |
|||
}; |
|||
}, |
|||
components: { basePage }, |
|||
computed: {}, |
|||
watch: {}, |
|||
|
|||
async mounted() { |
|||
this.searchParams[0].value = this.orgIds; |
|||
this.searchParams[0].supValues[0] = this.orgId; |
|||
if (this.orgId) { |
|||
this.searchParams[0].supValues[1] = "agency"; |
|||
} |
|||
this.iniLoaded = true; |
|||
}, |
|||
|
|||
methods: {}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped></style> |
Loading…
Reference in new issue