Browse Source

完善又

feature
dai 3 years ago
parent
commit
b4f0f1030d
  1. 1
      src/assets/scss/dataBoard/renfang/index.scss
  2. 3
      src/views/dataBoard/cpts/map/index.vue
  3. 9
      src/views/dataBoard/renfang/cpts/fwgl.vue
  4. 10
      src/views/dataBoard/renfang/cpts/jmgl.vue
  5. 6
      src/views/dataBoard/renfang/cpts/rkyj.vue
  6. 5
      src/views/dataBoard/renfang/house/list.vue
  7. 91
      src/views/dataBoard/renfang/index.vue
  8. 7
      src/views/dataBoard/renfang/resi/class.vue
  9. 276
      src/views/dataBoardMain/main.vue

1
src/assets/scss/dataBoard/renfang/index.scss

@ -249,6 +249,7 @@
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #6fdeff; color: #6fdeff;
cursor: pointer;
img { img {
width: 16px; width: 16px;
height: 16px; height: 16px;

3
src/views/dataBoard/cpts/map/index.vue

@ -910,6 +910,9 @@ export default {
} }
} }
/deep/ .l7-popup {
z-index: 100;
}
/deep/ .l7-popup-content { /deep/ .l7-popup-content {
background: rgba(#020340, 0.58); background: rgba(#020340, 0.58);
box-shadow: 0 0 20px 3px inset rgba(#22f, 0.1); box-shadow: 0 0 20px 3px inset rgba(#22f, 0.1);

9
src/views/dataBoard/renfang/cpts/fwgl.vue

@ -42,7 +42,7 @@
<div <div
class="row-item marginleft10" class="row-item marginleft10"
@click="toListPage('self_dwelling')" @click="toListPage('self_dwelling', '自住房屋')"
> >
<div class="item-one"> <div class="item-one">
<img <img
@ -62,7 +62,7 @@
</div> </div>
<div <div
class="right-row margintop18" class="right-row margintop18"
@click="toListPage('lease')" @click="toListPage('lease', '出租房屋')"
> >
<div class="row-item"> <div class="row-item">
<div class="item-one"> <div class="item-one">
@ -81,7 +81,7 @@
<div <div
class="row-item marginleft10" class="row-item marginleft10"
@click="toListPage('unused')" @click="toListPage('unused', '闲置房屋')"
> >
<div class="item-one"> <div class="item-one">
<img <img
@ -177,12 +177,13 @@ export default {
}, },
}, },
methods: { methods: {
toListPage(type = "") { toListPage(type = "", type_name = "") {
this.$router.push({ this.$router.push({
path: "/dataBoard/renfang/house-list", path: "/dataBoard/renfang/house-list",
query: { query: {
org_id: this.orgId, org_id: this.orgId,
type, type,
type_name,
}, },
}); });
}, },

10
src/views/dataBoard/renfang/cpts/jmgl.vue

@ -21,7 +21,7 @@
</div> </div>
<div class="pie-right"> <div class="pie-right">
<div class="right-row"> <div class="right-row">
<div class="row-item" @click="toResiListPage"> <div class="row-item" @click="toListPage">
<div class="item-one"> <div class="item-one">
<img <img
class="img" class="img"
@ -38,7 +38,7 @@
<div <div
class="row-item marginleft10" class="row-item marginleft10"
@click="toResiListPage('inhabitant')" @click="toListPage('inhabitant', '常住人口')"
> >
<div class="item-one"> <div class="item-one">
<img <img
@ -59,7 +59,7 @@
<div class="right-row margintop18"> <div class="right-row margintop18">
<div <div
class="row-item" class="row-item"
@click="toResiListPage('floating')" @click="toListPage('floating', '流动人口')"
> >
<div class="item-one"> <div class="item-one">
<img <img
@ -156,15 +156,17 @@ export default {
this.getData(); this.getData();
}, },
methods: { methods: {
toResiListPage(type = "") { toListPage(type = "", type_name = "") {
this.$router.push({ this.$router.push({
path: "/dataBoard/renfang/resi-list", path: "/dataBoard/renfang/resi-list",
query: { query: {
org_id: this.orgId, org_id: this.orgId,
type, type,
type_name,
}, },
}); });
}, },
pieInitOk() { pieInitOk() {
this.pieInitState = true; this.pieInitState = true;
}, },

6
src/views/dataBoard/renfang/cpts/rkyj.vue

@ -55,9 +55,7 @@
class="img" class="img"
src="@/assets/images/shuju/renfang/warning-yellow.png" src="@/assets/images/shuju/renfang/warning-yellow.png"
alt alt
/>{{ dataitem.yellow_warn }} {{ />{{ dataitem.yellow_warn }}
dataitem.yellow_threshold
}}
</div> </div>
<div <div
@ -70,7 +68,7 @@
class="img" class="img"
src="@/assets/images/shuju/renfang/warning-red.png" src="@/assets/images/shuju/renfang/warning-red.png"
alt alt
/>{{ dataitem.red_warn }} {{ dataitem.red_threshold }} />{{ dataitem.red_warn }}
</div> </div>
</div> </div>
</div> </div>

5
src/views/dataBoard/renfang/house/list.vue

@ -152,9 +152,12 @@ export default {
}; };
}, },
mounted() { activated() {
this.org_id = getQueryPara("org_id"); this.org_id = getQueryPara("org_id");
this.houseType = getQueryPara("type"); this.houseType = getQueryPara("type");
const type_name = getQueryPara("type_name");
this.breadList[1].meta.title = type_name + "房屋列表";
this.tableTitle = type_name + "房屋列表";
this.getList(); this.getList();
}, },

91
src/views/dataBoard/renfang/index.vue

@ -245,9 +245,14 @@
src="~@/assets/images/shuju/main/card-title-bg-800.png" src="~@/assets/images/shuju/main/card-title-bg-800.png"
class="box-title-bg" class="box-title-bg"
/> />
<div class="box-title-txt">居民分类分析</div> <div class="box-title-txt" v-if="!displayedForecast">居民分类分析</div>
<div class="box-title-txt" v-else>居民分类分析-智能预测</div>
<div class="box-title-btn"> <div
class="box-title-btn"
v-if="!displayedForecast"
@click="displayedForecast = true"
>
<img <img
src="~@/assets/images/shuju/renfang/index/znyc.png" src="~@/assets/images/shuju/renfang/index/znyc.png"
/> />
@ -256,9 +261,20 @@
src="~@/assets/images/shuju/renfang/index/i-hint.png" src="~@/assets/images/shuju/renfang/index/i-hint.png"
/> />
</div> </div>
<div
class="box-title-btn"
v-else
@click="displayedForecast = false"
>
<img
src="~@/assets/images/shuju/main/back-on.png"
/>
<span style="color: #fff">返回</span>
</div>
</div> </div>
<div class="list"> <div class="list" v-if="!displayedForecast">
<div <div
class="item" class="item"
@click="toResiClassPage(item.type_id, item.name)" @click="toResiClassPage(item.type_id, item.name)"
@ -288,6 +304,37 @@
</div> </div>
</div> </div>
</div> </div>
<div class="list" v-else>
<div
class="item"
:key="item.code + index"
v-for="(item, index) in resiCategoryForecastData"
>
<div>{{ ("0" + (index + 1)).substr(-2) }}.</div>
<div class="item-name">{{ item.name }}</div>
<div class="item-count">
<b>{{ item.count }}</b>
</div>
<div class="item-progress">
<b :style="{ width: item.ratio + '%' }"></b>
</div>
<div class="item-per">
<span>较上一年</span>
<img
v-if="item.growth >= 0"
src="~@/assets/images/shuju/renfang/index/up.png"
/>
<img
v-else
src="~@/assets/images/shuju/renfang/index/down.png"
/>
<b>{{ item.growthAbs }}</b>
<span></span>
</div>
</div>
</div>
</div> </div>
</div> </div>
@ -413,7 +460,9 @@ export default {
}, },
], ],
resiCategoryData: [], resiCategoryData: [], //
resiCategoryForecastData: [], //
displayedForecast: false, //
searchModule: { searchModule: {
displayedCard: false, displayedCard: false,
@ -465,6 +514,7 @@ export default {
// await this.getMapData(); // await this.getMapData();
// await this.getSubMapData(); // await this.getSubMapData();
this.getResiCategoryData(); this.getResiCategoryData();
this.getResiCategoryForecastData();
this.getPerInfo(); this.getPerInfo();
this.loading = true; this.loading = true;
@ -639,6 +689,39 @@ export default {
} }
}, },
//
async getResiCategoryForecastData() {
console.log("=========================getResiCategoryForecastData");
const url = "resident_class_predict";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id: this.orgData.id,
},
},
{
mockId: 60064667,
}
);
if (code === 0) {
this.resiCategoryForecastData = data.map((item) => {
return {
code: item.resident_type,
name: item.resident_type_name,
count: item.resident_count,
ratio: item.resident_ratio,
growth: item.change_count,
growthAbs: Math.abs(item.change_count),
};
});
} else {
this.$message.error(msg);
}
},
// //
async getMapData() { async getMapData() {
console.log("=========================getMapData"); console.log("=========================getMapData");

7
src/views/dataBoard/renfang/resi/class.vue

@ -159,13 +159,14 @@ export default {
}; };
}, },
mounted() { activated() {
this.org_id = getQueryPara("org_id"); this.org_id = getQueryPara("org_id");
this.type_id = getQueryPara("type_id"); this.type_id = getQueryPara("type_id");
const type_name = getQueryPara("type_name"); const type_name = getQueryPara("type_name");
this.getList(); this.breadList[1].meta.title = type_name + "居民列表";
this.breadList[1].meta.title = type_name; this.tableTitle = type_name + "居民列表";
this.getList();
if (this.type_id == "6") { if (this.type_id == "6") {
this.getSubclass(); this.getSubclass();
} }

276
src/views/dataBoardMain/main.vue

@ -1,46 +1,51 @@
<template> <template>
<fixed1920 class="g-fx"> <fixed1920 class="g-fx">
<div <div
v-loading.fullscreen.lock="loading" v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')" :element-loading-text="$t('loading')"
:class="[ :class="[
'g-pg', 'g-pg',
{ 'z-sidebar--fold': $store.state.sidebarFold }, { 'z-sidebar--fold': $store.state.sidebarFold },
{ {
'z-sidebar--noside': true, 'z-sidebar--noside': true,
}, },
{ 'z-iframe': $store.state.inIframe }, { 'z-iframe': $store.state.inIframe },
]" ]"
> >
<template v-if="!loading"> <template v-if="!loading">
<img <img
class="i-corner z-left-top" class="i-corner z-left-top"
src="~@/assets/images/shuju/main/corner-left-top.png" src="~@/assets/images/shuju/main/corner-left-top.png"
/> />
<img <img
class="i-corner z-right-top" class="i-corner z-right-top"
src="~@/assets/images/shuju/main/corner-right-top.png" src="~@/assets/images/shuju/main/corner-right-top.png"
/> />
<img <img
class="i-corner z-right-bottom" class="i-corner z-right-bottom"
src="~@/assets/images/shuju/main/corner-right-bottom.png" src="~@/assets/images/shuju/main/corner-right-bottom.png"
/> />
<img <img
class="i-corner z-left-bottom" class="i-corner z-left-bottom"
src="~@/assets/images/shuju/main/corner-left-bottom.png" src="~@/assets/images/shuju/main/corner-left-bottom.png"
/> />
<main-navbar ref="ref_navbar" v-if="!$store.state.inIframe" /> <main-navbar ref="ref_navbar" v-if="!$store.state.inIframe" />
<div class="g-cnt"> <div
<main-content class="g-cnt"
v-if="!$store.state.contentIsNeedRefresh" :style="{
@changeCustomerName="changeCustomerName" minHeight: $store.state.fixed1920.height - 100 + 'px',
/> }"
</div> >
</template> <main-content
</div> v-if="!$store.state.contentIsNeedRefresh"
</fixed1920> @changeCustomerName="changeCustomerName"
/>
</div>
</template>
</div>
</fixed1920>
</template> </template>
<script> <script>
@ -53,103 +58,106 @@ import { requestPost } from "@/js/dai/request";
import fixed1920 from "@/views/components/fixed1920.vue"; import fixed1920 from "@/views/components/fixed1920.vue";
export default { export default {
provide() { provide() {
return { return {
// //
refresh() { refresh() {
this.$store.state.contentIsNeedRefresh = true; this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false; this.$store.state.contentIsNeedRefresh = false;
}); });
}, },
}; };
}, },
data() { data() {
return { return {
loading: true, loading: true,
userType: localStorage.getItem("userType"), userType: localStorage.getItem("userType"),
}; };
}, },
components: { components: {
MainNavbar, MainNavbar,
MainContent, MainContent,
fixed1920, fixed1920,
}, },
watch: { watch: {
$route: "routeHandle", $route: "routeHandle",
}, },
async created() { async created() {
this.windowResizeHandle(); this.windowResizeHandle();
this.routeHandle(this.$route); this.routeHandle(this.$route);
Promise.all([this.getWorkUserInfo()]).then(() => { Promise.all([this.getWorkUserInfo()]).then(() => {
this.loading = false; this.loading = false;
}); });
}, },
computed: {}, computed: {},
methods: { methods: {
changeCustomerName(customerName) { changeCustomerName(customerName) {
this.$refs["ref_navbar"].changeCustomerName(customerName); this.$refs["ref_navbar"].changeCustomerName(customerName);
}, },
// //
windowResizeHandle() { windowResizeHandle() {
this.$store.state.sidebarFold = this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false; document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener( window.addEventListener(
"resize", "resize",
debounce(() => { debounce(() => {
this.$store.state.sidebarFold = this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false; document.documentElement["clientWidth"] <= 992 || false;
}, 150) }, 150)
); );
}, },
// , // ,
routeHandle(route) { routeHandle(route) {
if (!route.meta.isTab) { if (!route.meta.isTab) {
this.$store.state.mainShuju.activeName = ""; this.$store.state.mainShuju.activeName = "";
this.$store.state.mainShuju.contentTabsActiveName = ""; this.$store.state.mainShuju.contentTabsActiveName = "";
return false; return false;
} }
var tab = this.$store.state.contentTabs.filter( var tab = this.$store.state.contentTabs.filter(
(item) => item.name === route.name (item) => item.name === route.name
)[0]; )[0];
if (!tab) { if (!tab) {
tab = { tab = {
...window.SITE_CONFIG["contentTabDefault"], ...window.SITE_CONFIG["contentTabDefault"],
...route.meta, ...route.meta,
name: route.name, name: route.name,
params: { ...route.params }, params: { ...route.params },
query: { ...route.query }, query: { ...route.query },
}; };
this.$store.state.contentTabs = this.$store.state.contentTabs =
this.$store.state.contentTabs.concat(tab); this.$store.state.contentTabs.concat(tab);
} }
this.$store.state.mainShuju.activeName = tab.menuId; this.$store.state.mainShuju.activeName = tab.menuId;
this.$store.state.mainShuju.contentTabsActiveName = tab.name; this.$store.state.mainShuju.contentTabsActiveName = tab.name;
}, },
// //
async getWorkUserInfo() { async getWorkUserInfo() {
const url = "/epmetuser/customerstaff/staffbasicinfo"; const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {}; let params = {};
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.$store.state.user = { ...data }; this.$store.state.user = { ...data };
console.log("user---hahha", this.$store.state.user); console.log("user---hahha", this.$store.state.user);
localStorage.setItem("roleList", data.roleList); localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId); localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id); localStorage.setItem("staffId", data.id);
localStorage.setItem("agencyId", data.agencyId); localStorage.setItem("agencyId", data.agencyId);
localStorage.setItem("level", data.level); localStorage.setItem("level", data.level);
if (!localStorage.getItem("customerName")) { if (!localStorage.getItem("customerName")) {
localStorage.setItem("customerName", data.customerName || ""); localStorage.setItem(
} "customerName",
} else { data.customerName || ""
this.$message.error(msg); );
} }
}, } else {
}, this.$message.error(msg);
}
},
},
}; };
</script> </script>

Loading…
Cancel
Save