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-weight: 500;
color: #6fdeff;
cursor: pointer;
img {
width: 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 {
background: rgba(#020340, 0.58);
box-shadow: 0 0 20px 3px inset rgba(#22f, 0.1);

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

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

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

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

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

@ -55,9 +55,7 @@
class="img"
src="@/assets/images/shuju/renfang/warning-yellow.png"
alt
/>{{ dataitem.yellow_warn }} {{
dataitem.yellow_threshold
}}
/>{{ dataitem.yellow_warn }}
</div>
<div
@ -70,7 +68,7 @@
class="img"
src="@/assets/images/shuju/renfang/warning-red.png"
alt
/>{{ dataitem.red_warn }} {{ dataitem.red_threshold }}
/>{{ dataitem.red_warn }}
</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.houseType = getQueryPara("type");
const type_name = getQueryPara("type_name");
this.breadList[1].meta.title = type_name + "房屋列表";
this.tableTitle = type_name + "房屋列表";
this.getList();
},

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

@ -245,9 +245,14 @@
src="~@/assets/images/shuju/main/card-title-bg-800.png"
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
src="~@/assets/images/shuju/renfang/index/znyc.png"
/>
@ -256,9 +261,20 @@
src="~@/assets/images/shuju/renfang/index/i-hint.png"
/>
</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 class="list">
<div class="list" v-if="!displayedForecast">
<div
class="item"
@click="toResiClassPage(item.type_id, item.name)"
@ -288,6 +304,37 @@
</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>
@ -413,7 +460,9 @@ export default {
},
],
resiCategoryData: [],
resiCategoryData: [], //
resiCategoryForecastData: [], //
displayedForecast: false, //
searchModule: {
displayedCard: false,
@ -465,6 +514,7 @@ export default {
// await this.getMapData();
// await this.getSubMapData();
this.getResiCategoryData();
this.getResiCategoryForecastData();
this.getPerInfo();
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() {
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.type_id = getQueryPara("type_id");
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") {
this.getSubclass();
}

276
src/views/dataBoardMain/main.vue

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

Loading…
Cancel
Save