diff --git a/.env.development b/.env.development index dcf5228ce..65bdf2296 100644 --- a/.env.development +++ b/.env.development @@ -9,7 +9,7 @@ VUE_APP_API_SERVER = http://192.168.1.144/api # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn:41080/api # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api -VUE_APP_BIPASS_API_SERVER = http://bipaas.elinkservice.cn/linkdata/linkdata-gateway/route +VUE_APP_BIPASS_API_SERVER = /linkdata/linkdata-gateway/route # VUE_APP_NODE_ENV=dev_sdtdt VUE_APP_NODE_ENV=dev diff --git a/src/assets/images/main/联建单位列表.xls b/src/assets/images/main/联建单位列表.xls new file mode 100644 index 000000000..5ebfc6972 Binary files /dev/null and b/src/assets/images/main/联建单位列表.xls differ diff --git a/src/assets/images/main/联建活动列表.xls b/src/assets/images/main/联建活动列表.xls new file mode 100644 index 000000000..952c6c2e2 Binary files /dev/null and b/src/assets/images/main/联建活动列表.xls differ diff --git a/src/assets/scss/dataBoard/renfang/index.scss b/src/assets/scss/dataBoard/renfang/index.scss index cbd376a5e..57885d21e 100644 --- a/src/assets/scss/dataBoard/renfang/index.scss +++ b/src/assets/scss/dataBoard/renfang/index.scss @@ -257,6 +257,25 @@ } } } + + .empty { + > img { + display: block; + width: 120px; + margin: 0 auto; + margin-top: 80px; + } + > span { + margin-top: 8px; + display: block; + font-size: 14px; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: rgba(255, 255, 255, 0.65); + line-height: 20px; + text-align: center; + } + } } .m-subbox { diff --git a/src/js/dai/request-bipass.js b/src/js/dai/request-bipass.js index 6c30b8965..260796b87 100644 --- a/src/js/dai/request-bipass.js +++ b/src/js/dai/request-bipass.js @@ -74,7 +74,7 @@ const request = curry((method, uri, data = {}, params = {}) => { dispatcherSystem: "dataservice", param: { ds_code: uri, - app_code: "empet", + app_code: "empt", orderby: "[]", ...data, }, diff --git a/src/views/dataBoard/cpts/bread.vue b/src/views/dataBoard/cpts/bread.vue index c2ba6f0ba..d3e4901bc 100644 --- a/src/views/dataBoard/cpts/bread.vue +++ b/src/views/dataBoard/cpts/bread.vue @@ -52,7 +52,7 @@ export default { }, data() { return { - pageSize: 10, + pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, }; }, diff --git a/src/views/dataBoard/cpts/house-details.vue b/src/views/dataBoard/cpts/house-details.vue index 5d53c42f5..aaedebeef 100644 --- a/src/views/dataBoard/cpts/house-details.vue +++ b/src/views/dataBoard/cpts/house-details.vue @@ -118,7 +118,7 @@ export default { }, }, { - mockId: 60235478, + // mockId: 60235478, } ); diff --git a/src/views/dataBoard/cpts/resi-details.vue b/src/views/dataBoard/cpts/resi-details.vue index 1c0671469..238a039b2 100644 --- a/src/views/dataBoard/cpts/resi-details.vue +++ b/src/views/dataBoard/cpts/resi-details.vue @@ -11,21 +11,21 @@
所属网格:
- {{ info.community + " - " + info.grid }} + {{ + info.community + }} + - {{ info.grid }}
所属房屋:
- {{ - info.village + - " - " + - info.building + - " - " + - info.unit + - " - " + - info.room - }} + {{ info.village }} + + - {{ info.building }} + - {{ info.unit }} + - {{ info.room }}
@@ -899,7 +899,7 @@ export default { }, }, { - mockId: 61172054, + // mockId: 61172054, } ); diff --git a/src/views/dataBoard/cpts/tb.vue b/src/views/dataBoard/cpts/tb.vue index aec02a806..81d308a02 100644 --- a/src/views/dataBoard/cpts/tb.vue +++ b/src/views/dataBoard/cpts/tb.vue @@ -117,7 +117,7 @@
@@ -201,7 +201,8 @@ export default { }, data() { return { - pageSize: 10, + pageSize: + parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, }; }, @@ -347,6 +348,7 @@ export default { right: 0; bottom: 0; margin: auto; + width: 120px; } } } diff --git a/src/views/dataBoard/renfang/cpts/bread.vue b/src/views/dataBoard/renfang/cpts/bread.vue index da8c680f6..93fe0e611 100644 --- a/src/views/dataBoard/renfang/cpts/bread.vue +++ b/src/views/dataBoard/renfang/cpts/bread.vue @@ -50,7 +50,7 @@ export default { }, data() { return { - pageSize: 10, + pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, }; }, diff --git a/src/views/dataBoard/renfang/cpts/fwgl.vue b/src/views/dataBoard/renfang/cpts/fwgl.vue index 723667e01..7f40bc05e 100644 --- a/src/views/dataBoard/renfang/cpts/fwgl.vue +++ b/src/views/dataBoard/renfang/cpts/fwgl.vue @@ -161,10 +161,10 @@ export default { pieData: [], info: { - house_count: "--", - self_dwelling_count: "--", - lease_count: "--", - unused_count: "--", + house_count: 0, + self_dwelling_count: 0, + lease_count: 0, + unused_count: 0, }, }; }, @@ -230,13 +230,22 @@ export default { }, }, { - mockId: 60007107, + // mockId: 60007107, } ); - if (code === 0 && data && Array.isArray(data) && data.length > 0) { - let info = data[0]; - this.info = { ...this.info, ...info }; + if (code === 0) { + if (data && Array.isArray(data) && data.length > 0) { + let info = data[0]; + this.info = { ...this.info, ...info }; + } else { + this.info = { + house_count: 0, + self_dwelling_count: 0, + lease_count: 0, + unused_count: 0, + }; + } } else { this.$message.error(msg); } @@ -252,8 +261,11 @@ export default { const { info } = this; // 设置三个配置值 this.pieOption.title.text = - parseInt((100 * info.self_dwelling_count) / info.house_count) + - "%"; + (info.house_count != 0 + ? parseInt( + (100 * info.self_dwelling_count) / info.house_count + ) + : "--") + "%"; this.pieData = [ { value: info.self_dwelling_count, name: "自住房屋" }, { value: info.lease_count, name: "出租房屋" }, @@ -270,15 +282,17 @@ export default { fromActionPayload: { dataIndexInside }, } = params; this.pieOption.title.text = - parseInt( - (100 * - [ - info.self_dwelling_count, - info.lease_count, - info.unused_count, - ][dataIndexInside]) / - info.house_count - ) + "%"; + (info.house_count != 0 + ? parseInt( + (100 * + [ + info.self_dwelling_count, + info.lease_count, + info.unused_count, + ][dataIndexInside]) / + info.house_count + ) + : "--") + "%"; this.$refs.pieChart.myChart.setOption(this.pieOption); }); }, @@ -296,23 +310,25 @@ export default { }, }, { - mockId: 60388110, + // mockId: 60388110, } ); - if (code === 0 && data && Array.isArray(data) && data.length > 0) { + if (code === 0) { let xaxis = []; let series = [{ data: [] }, { data: [] }, { data: [] }]; - for (const { - month, - self_dwelling_count, - lease_count, - unused_count, - } of data) { - xaxis.push(month); - series[0].data.push(self_dwelling_count); - series[1].data.push(lease_count); - series[2].data.push(unused_count); + if (data && Array.isArray(data) && data.length > 0) { + for (const { + month, + self_dwelling_count, + lease_count, + unused_count, + } of data) { + xaxis.push(month); + series[0].data.push(self_dwelling_count); + series[1].data.push(lease_count); + series[2].data.push(unused_count); + } } this.iniBarChart(xaxis, series); this.$refs.barChart.hideLoading(); diff --git a/src/views/dataBoard/renfang/cpts/jmgl.vue b/src/views/dataBoard/renfang/cpts/jmgl.vue index 0fef5153b..39bb790e1 100644 --- a/src/views/dataBoard/renfang/cpts/jmgl.vue +++ b/src/views/dataBoard/renfang/cpts/jmgl.vue @@ -38,7 +38,7 @@
0) { - let info = data[0]; - this.info = { ...this.info, ...info }; + if (code === 0) { + if (data && Array.isArray(data) && data.length > 0) { + let info = data[0]; + this.info = { ...this.info, ...info }; + } else { + this.info = { + resident_count: 0, + inhabitant_count: 0, + floating_count: 0, + }; + } } else { this.$message.error(msg); } @@ -232,8 +240,11 @@ export default { const { info } = this; // 设置三个配置值 this.pieOption.title.text = - parseInt((100 * info.inhabitant_count) / info.resident_count) + - "%"; + (info.resident_count != 0 + ? parseInt( + (100 * info.inhabitant_count) / info.resident_count + ) + : "--") + "%"; this.pieData = [ { value: info.inhabitant_count, name: "常住人口" }, { value: info.floating_count, name: "流动人口" }, @@ -249,13 +260,16 @@ export default { fromActionPayload: { dataIndexInside }, } = params; this.pieOption.title.text = - parseInt( - (100 * - [info.inhabitant_count, info.floating_count][ - dataIndexInside - ]) / - info.resident_count - ) + "%"; + (info.resident_count != 0 + ? parseInt( + (100 * + [ + info.inhabitant_count, + info.floating_count, + ][dataIndexInside]) / + info.resident_count + ) + : "--") + "%"; this.$refs.pieChart.myChart.setOption(this.pieOption); }); }, @@ -273,24 +287,26 @@ export default { }, }, { - mockId: 60389779, + // mockId: 60389779, } ); - if (code === 0 && data && Array.isArray(data) && data.length > 0) { - let xaxis = []; - let series = [{ data: [] }, { data: [] }]; - for (const { - month, - inhabitant_count, - floating_count, - } of data) { - xaxis.push(month); - series[0].data.push(inhabitant_count); - series[1].data.push(floating_count); + if (code === 0) { + if (data && Array.isArray(data) && data.length > 0) { + let xaxis = []; + let series = [{ data: [] }, { data: [] }]; + for (const { + month, + inhabitant_count, + floating_count, + } of data) { + xaxis.push(month); + series[0].data.push(inhabitant_count); + series[1].data.push(floating_count); + } + this.iniBarChart(xaxis, series); + this.$refs.barChart.hideLoading(); } - this.iniBarChart(xaxis, series); - this.$refs.barChart.hideLoading(); } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/renfang/cpts/rkfx.vue b/src/views/dataBoard/renfang/cpts/rkfx.vue index b6110fc79..6715005ab 100644 --- a/src/views/dataBoard/renfang/cpts/rkfx.vue +++ b/src/views/dataBoard/renfang/cpts/rkfx.vue @@ -149,14 +149,16 @@ export default { }, }, { - mockId: 60041615, + // mockId: 60041615, } ); this.$refs.pieChart.hideLoading(); - if (code === 0 && data && Array.isArray(data) && data.length > 0) { - let info = data[0]; - this.info = { ...this.info, ...info }; + if (code === 0) { + if (data && Array.isArray(data) && data.length > 0) { + let info = data[0]; + this.info = { ...this.info, ...info }; + } } else { this.$message.error(msg); } @@ -191,12 +193,12 @@ export default { if (currentTab == "性别") { this.pieData = [ { - value: info.male_count, + value: info.male_count || 0, type: "male_count", name: "男性", }, { - value: info.female_count, + value: info.female_count || 0, type: "female_count", name: "女性", }, @@ -204,12 +206,12 @@ export default { } else if (currentTab == "户籍") { this.pieData = [ { - value: info.local_count, + value: info.local_count || 0, type: "local_count", name: "本地户籍", }, { - value: info.field_count, + value: info.field_count || 0, type: "field_count", name: "外地户籍", }, @@ -217,17 +219,17 @@ export default { } else if (currentTab == "人户状况") { this.pieData = [ { - value: info.resi_y_house_y_count, + value: info.resi_y_house_y_count || 0, type: "resi_y_house_y_count", name: "人户一致", }, { - value: info.resi_y_house_n_count, + value: info.resi_y_house_n_count || 0, type: "resi_y_house_n_count", name: "人在户不在", }, { - value: info.resi_n_house_y_count, + value: info.resi_n_house_y_count || 0, type: "resi_n_house_y_count", name: "户在人不在", }, @@ -235,27 +237,27 @@ export default { } else if (currentTab == "年龄") { this.pieData = [ { - value: info.age50_count, + value: info.age50_count || 0, type: "age50_count", name: "50岁以下", }, { - value: info.age5059_count, + value: info.age5059_count || 0, type: "age5059_count", name: "50-59岁", }, { - value: info.age6069_count, + value: info.age6069_count || 0, type: "age6069_count", name: "60-69岁", }, { - value: info.age7079_count, + value: info.age7079_count || 0, type: "age7079_count", name: "70-79岁", }, { - value: info.age80_count, + value: info.age80_count || 0, type: "age80_count", name: "80岁以上", }, @@ -263,47 +265,47 @@ export default { } else if (currentTab == "志愿者类别") { this.pieData = [ { - value: info.culture_count, + value: info.culture_count || 0, type: "culture_count", name: "文化队伍", }, { - value: info.committee_count, + value: info.committee_count || 0, type: "committee_count", name: "楼委会", }, { - value: info.capable_count, + value: info.capable_count || 0, type: "capable_count", name: "能人达人", }, { - value: info.friend_count, + value: info.friend_count || 0, type: "friend_count", name: "老友俱乐部", }, { - value: info.agent_count, + value: info.agent_count || 0, type: "agent_count", name: "代办员", }, { - value: info.mediator_count, + value: info.mediator_count || 0, type: "mediator_count", name: "调解员", }, { - value: info.collector_count, + value: info.collector_count || 0, type: "collector_count", name: "采集员", }, { - value: info.security_count, + value: info.security_count || 0, type: "security_count", name: "治安巡逻员", }, { - value: info.party_mem_count, + value: info.party_mem_count || 0, type: "party_mem_count", name: "党员中心户", }, @@ -311,42 +313,42 @@ export default { } else if (currentTab == "党员文化程度") { this.pieData = [ { - value: info.primary_count, + value: info.primary_count || 0, type: "primary_count", name: "小学及文盲", }, { - value: info.junior_high_count, + value: info.junior_high_count || 0, type: "junior_high_count", name: "初中", }, { - value: info.second_speci_count, + value: info.second_speci_count || 0, type: "second_speci_count", name: "中专", }, { - value: info.high_school_count, + value: info.high_school_count || 0, type: "high_school_count", name: "高中", }, { - value: info.junior_college_count, + value: info.junior_college_count || 0, type: "junior_college_count", name: "大专", }, { - value: info.undergrad_count, + value: info.undergrad_count || 0, type: "undergrad_count", name: "本科", }, { - value: info.master_count, + value: info.master_count || 0, type: "master_count", name: "硕士", }, { - value: info.doctor_count, + value: info.doctor_count || 0, type: "doctor_count", name: "博士", }, diff --git a/src/views/dataBoard/renfang/cpts/rkyj.vue b/src/views/dataBoard/renfang/cpts/rkyj.vue index 7999c1bff..9de02d590 100644 --- a/src/views/dataBoard/renfang/cpts/rkyj.vue +++ b/src/views/dataBoard/renfang/cpts/rkyj.vue @@ -102,6 +102,12 @@ export default { mounted() { this.getList(); }, + + watch: { + orgId() { + this.getList(); + }, + }, methods: { toListPage(level, type_id = "", type_name) { this.$router.push({ @@ -126,12 +132,14 @@ export default { }, }, { - mockId: 60040087, + // mockId: 60040087, } ); - if (code === 0 && data && Array.isArray(data) && data.length > 0) { - this.list = data; + if (code === 0) { + if (data && Array.isArray(data) && data.length > 0) { + this.list = data; + } } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/renfang/cpts/szsq.vue b/src/views/dataBoard/renfang/cpts/szsq.vue index b2a767e4a..7b42cf36c 100644 --- a/src/views/dataBoard/renfang/cpts/szsq.vue +++ b/src/views/dataBoard/renfang/cpts/szsq.vue @@ -97,17 +97,19 @@ export default { }, }, { - mockId: 61305622, + // mockId: 61305622, } ); - if (code === 0 && data && Array.isArray(data) && data.length > 0) { - let info = data[0]; - this.info.community_count = info.community_count; - this.info.account_count = info.account_count; - this.info.per = parseInt( - (100 * info.account_count) / info.community_count - ); + if (code === 0) { + if (data && Array.isArray(data) && data.length > 0) { + let info = data[0]; + this.info.community_count = info.community_count; + this.info.account_count = info.account_count; + this.info.per = parseInt( + (100 * info.account_count) / info.community_count + ); + } } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/renfang/house/list.vue b/src/views/dataBoard/renfang/house/list.vue index 9be4bfbf9..4c943ec90 100644 --- a/src/views/dataBoard/renfang/house/list.vue +++ b/src/views/dataBoard/renfang/house/list.vue @@ -76,7 +76,7 @@ export default { houseType: "", // 流动 常驻 全部 loading: true, - pageSize: 10, + pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, total: 0, srcTableData: [], @@ -158,6 +158,7 @@ export default { const type_name = getQueryPara("type_name"); this.breadList[1].meta.title = type_name + "房屋列表"; this.tableTitle = type_name + "房屋列表"; + this.pageNo = 1; this.getList(); this.getCount(); }, @@ -182,6 +183,7 @@ export default { }, handleSizeChange(pageSize) { + localStorage.setItem('dataBoard_PageSize', pageSize); this.pageSize = pageSize; this.getList(); }, @@ -203,7 +205,7 @@ export default { }, }, { - mockId: 60068051, + // mockId: 60068051, } ); @@ -235,7 +237,7 @@ export default { } }, - async getList() { + async getCount() { const { org_id, houseType, pageNo, pageSize } = this; const url = "house_list_total"; @@ -251,12 +253,12 @@ export default { }, }, { - mockId: 63070189, + // mockId: 63070189, } ); if (code === 0) { - this.total = data[0].count; + this.total = parseInt(data[0].count); } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/renfang/index.vue b/src/views/dataBoard/renfang/index.vue index 8a7d90acb..97f89d650 100644 --- a/src/views/dataBoard/renfang/index.vue +++ b/src/views/dataBoard/renfang/index.vue @@ -13,7 +13,7 @@
- +
@@ -27,7 +27,7 @@
- +
@@ -245,8 +245,12 @@ src="~@/assets/images/shuju/main/card-title-bg-800.png" class="box-title-bg" /> -
居民分类分析
-
居民分类分析-智能预测
+
+ 居民分类分析 +
+
+ 居民分类分析-智能预测 +
-
-
-
{{ ("0" + (index + 1)).substr(-2) }}.
-
{{ item.name }}
-
- {{ item.count }} 人 -
-
- -
-
- 较上月 - - - {{ item.growthAbs }} - +
+
+
+
{{ ("0" + (index + 1)).substr(-2) }}.
+
{{ item.name }}
+
+ {{ item.count }} 人 +
+
+ +
+
+ 较上月 + + + {{ item.growthAbs }} + +
-
-
+
+ +
+
+
-
{{ ("0" + (index + 1)).substr(-2) }}.
-
{{ item.name }}
-
- {{ item.count }} 人 -
-
- -
+
+
{{ ("0" + (index + 1)).substr(-2) }}.
+
{{ item.name }}
+
+ {{ item.count }} 人 +
+
+ +
-
- 较上一年 - - - {{ item.growthAbs }} - +
+ 较上一年 + + + {{ item.growthAbs }} + +
+ +
+ +
@@ -356,7 +380,7 @@
- +
@@ -378,7 +402,7 @@ orgLevel == 'city', }" > - +
@@ -391,7 +415,7 @@
- +
@@ -448,7 +472,9 @@ export default { return { loading: false, - orgData: {}, //当前组织对象 + orgData: { + children: [], + }, //当前组织对象 orgId: "", orgLevel: "", @@ -510,9 +536,9 @@ export default { //加载组织数据 this.loading = false; - await this.loadOrgData(); - // await this.getMapData(); - // await this.getSubMapData(); + // await this.loadOrgData(); + await this.getMapData(); + await this.getSubMapData(); this.getResiCategoryData(); this.getResiCategoryForecastData(); this.getPerInfo(); @@ -597,13 +623,13 @@ export default { url, { queryParam: { - org_id: this.orgData.id, + org_id: this.orgId, name: this.searchModule.keyword, }, }, { // mockId: 60044224, - mockId: 60048067, + // mockId: 60048067, } ); @@ -611,7 +637,9 @@ export default { this.searchModule.result = data.map((item) => { let type = item.type || searchModule.resultTab; let title = ""; - if (type == "1") { + if (searchModule.resultTab == 0) { + title = item.name; + } else if (type == "1") { title = item.user_name; } else if (type == "2") { title = item.village_name; @@ -635,22 +663,25 @@ export default { //地图上居民分类百分比数据 ps:感觉有点重复显示 async getPerInfo() { console.log("=========================getPerInfo"); - const url = "house_view"; + const url = "resident_ratio"; const { data, code, msg } = await requestPostBi( url, { queryParam: { - org_id: this.orgData.id, + org_id: this.orgId, }, }, { - mockId: 61167746, + // mockId: 61167746, } ); if (code === 0) { - this.perInfo = data[0]; + this.perInfo = { + ...this.perInfo, + ...data[0], + }; } else { this.$message.error(msg); } @@ -665,18 +696,18 @@ export default { url, { queryParam: { - org_id: this.orgData.id, + org_id: this.orgId, }, }, { - mockId: 60031937, + // mockId: 60031937, } ); if (code === 0) { this.resiCategoryData = data.map((item) => { return { - code: item.label, + code: item.label_id, name: item.label, count: item.count, ratio: item.ratio, @@ -698,11 +729,11 @@ export default { url, { queryParam: { - org_id: this.orgData.id, + org_id: this.orgId, }, }, { - mockId: 60064667, + // mockId: 60064667, } ); @@ -735,14 +766,22 @@ export default { }, }, { - mockId: 60810589, + // mockId: 60810589, } ); if (code === 0) { let info = data[0]; - this.orgData = info; - this.orgId = this.orgData.id; + this.orgData = { + ...info, + id: info.org_id, + name: info.org_name, + latitude: parseFloat(info.latitude), + longitude: parseFloat(info.longitude), + coordinates: info.coordinates || "", + children: [], + }; + this.orgId = this.orgData.org_id; this.orgLevel = this.orgData.level; } else { this.$message.error(msg); @@ -751,7 +790,7 @@ export default { //获取地图上显示的组织数据 async getSubMapData() { - console.log("=========================getMapData"); + console.log("=========================getSubMapData"); const url = "sub_org_map"; const { data, code, msg } = await requestPostBi( @@ -762,12 +801,27 @@ export default { }, }, { - mockId: 61831860, + // mockId: 61831860, } ); if (code === 0) { - this.orgData.children = data; + const { orgData } = this; + orgData.children = data.map((item) => { + return { + ...item, + id: item.org_id, + name: item.org_name, + latitude: parseFloat(item.latitude), + longitude: parseFloat(item.longitude), + coordinates: item.coordinates || "", + }; + }); + this.orgData = { ...orgData }; + console.log( + "==========================getSubMapData:result", + this.orgData + ); } else { this.$message.error(msg); } @@ -785,7 +839,7 @@ export default { if (code === 0) { this.orgData = data; - this.orgId = this.orgData.id; + this.orgId = this.orgId; this.orgLevel = this.orgData.level; } else { this.$message.error(msg); diff --git a/src/views/dataBoard/renfang/resi/analyze.vue b/src/views/dataBoard/renfang/resi/analyze.vue index a528129cf..97207f0d8 100644 --- a/src/views/dataBoard/renfang/resi/analyze.vue +++ b/src/views/dataBoard/renfang/resi/analyze.vue @@ -78,7 +78,7 @@ export default { resiType: "", // 流动 常驻 全部 loading: true, - pageSize: 10, + pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, total: 0, srcTableData: [], @@ -146,6 +146,7 @@ export default { this.breadList[1].meta.title = type_name + "居民列表"; this.tableTitle = type_name + "居民列表"; + this.pageNo = 1; this.getList(); this.getCount(); }, @@ -170,6 +171,7 @@ export default { }, handleSizeChange(pageSize) { + localStorage.setItem('dataBoard_PageSize', pageSize); this.pageSize = pageSize; this.getList(); }, @@ -191,7 +193,7 @@ export default { }, }, { - mockId: 60069169, + // mockId: 60069169, } ); @@ -236,12 +238,12 @@ export default { }, }, { - mockId: 63070408, + // mockId: 63070408, } ); if (code === 0) { - this.total = data[0].count; + this.total = parseInt(data[0].count); } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/renfang/resi/class.vue b/src/views/dataBoard/renfang/resi/class.vue index 1b920a505..94f507f4e 100644 --- a/src/views/dataBoard/renfang/resi/class.vue +++ b/src/views/dataBoard/renfang/resi/class.vue @@ -95,7 +95,8 @@ export default { type_id: "", // 居民类别 loading: true, - pageSize: 10, + pageSize: + parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, total: 0, srcTableData: [], @@ -166,6 +167,7 @@ export default { this.breadList[1].meta.title = type_name + "居民列表"; this.tableTitle = type_name + "居民列表"; + this.pageNo = 1; this.getList(); this.getCount(); if (this.type_id == "6") { @@ -175,6 +177,7 @@ export default { watch: { subclassId() { + this.pageNo = 1; this.getList(); this.getCount(); }, @@ -200,6 +203,7 @@ export default { }, handleSizeChange(pageSize) { + localStorage.setItem("dataBoard_PageSize", pageSize); this.pageSize = pageSize; this.getList(); }, @@ -220,7 +224,7 @@ export default { }, }, { - mockId: 62648939, + // mockId: 62648939, } ); @@ -256,7 +260,7 @@ export default { }, }, { - mockId: 60069169, + // mockId: 60069169, } ); @@ -302,12 +306,12 @@ export default { }, }, { - mockId: 63070913, + // mockId: 63070913, } ); if (code === 0) { - this.total = data[0].count; + this.total = parseInt(data[0].count); } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/renfang/resi/list.vue b/src/views/dataBoard/renfang/resi/list.vue index 9a65ce06f..92fbf1976 100644 --- a/src/views/dataBoard/renfang/resi/list.vue +++ b/src/views/dataBoard/renfang/resi/list.vue @@ -78,7 +78,7 @@ export default { resiType: "", // 流动 常驻 全部 loading: true, - pageSize: 10, + pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, total: 0, srcTableData: [], @@ -146,6 +146,7 @@ export default { this.breadList[1].meta.title = type_name + "居民列表"; this.tableTitle = type_name + "居民列表"; + this.pageNo = 1; this.getList(); this.getCount(); }, @@ -170,6 +171,7 @@ export default { }, handleSizeChange(pageSize) { + localStorage.setItem('dataBoard_PageSize', pageSize); this.pageSize = pageSize; this.getList(); }, @@ -191,7 +193,7 @@ export default { }, }, { - mockId: 60069169, + // mockId: 60069169, } ); @@ -236,12 +238,12 @@ export default { }, }, { - mockId: 63070408, + // mockId: 63070408, } ); if (code === 0) { - this.total = data[0].count; + this.total = parseInt(data[0].count); } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/renfang/warn/building.vue b/src/views/dataBoard/renfang/warn/building.vue index fab8ab7e9..3cdf7390f 100644 --- a/src/views/dataBoard/renfang/warn/building.vue +++ b/src/views/dataBoard/renfang/warn/building.vue @@ -77,7 +77,8 @@ export default { level: "", loading: true, - pageSize: 10, + pageSize: + parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, total: 0, srcTableData: [], @@ -131,6 +132,7 @@ export default { this.tableTitle = type_name + (this.level == "red" ? "红色" : "黄色") + "预警楼栋"; this.breadList[1].meta.title = this.tableTitle; + this.pageNo = 1; this.getList(); this.getCount(); }, @@ -166,6 +168,7 @@ export default { }, handleSizeChange(pageSize) { + localStorage.setItem("dataBoard_PageSize", pageSize); this.pageSize = pageSize; this.getList(); }, @@ -188,7 +191,7 @@ export default { }, }, { - mockId: 60071540, + // mockId: 60071540, } ); @@ -231,12 +234,12 @@ export default { }, }, { - mockId: 63071730, + // mockId: 63071730, } ); if (code === 0) { - this.total = data[0].count; + this.total = parseInt(data[0].count); } else { this.$message.error(msg); } diff --git a/src/views/dataBoard/renfang/warn/resi.vue b/src/views/dataBoard/renfang/warn/resi.vue index 28429f6a6..4c1a9ad4d 100644 --- a/src/views/dataBoard/renfang/warn/resi.vue +++ b/src/views/dataBoard/renfang/warn/resi.vue @@ -62,7 +62,7 @@ export default { type_id: "", // 预警人员列表 loading: true, - pageSize: 10, + pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20, pageNo: 1, total: 0, srcTableData: [], @@ -140,6 +140,7 @@ export default { }, handleSizeChange(pageSize) { + localStorage.setItem("dataBoard_PageSize", pageSize); this.pageSize = pageSize; this.getList(); }, @@ -161,7 +162,7 @@ export default { }, }, { - mockId: 60069169, + // mockId: 60069169, } ); @@ -206,12 +207,14 @@ export default { }, }, { - mockId: 63071800, + // mockId: 63071800, } ); - if (code === 0 && Array.isArray(data) && data.length > 0) { - this.total = data[0].count; + if (code === 0) { + if (Array.isArray(data) && data.length > 0) { + this.total = parseInt(data[0].count); + } } else { this.$message.error(msg); } diff --git a/src/views/main-sidebar-sub-menu.vue b/src/views/main-sidebar-sub-menu.vue index 77882123a..7177401af 100644 --- a/src/views/main-sidebar-sub-menu.vue +++ b/src/views/main-sidebar-sub-menu.vue @@ -9,7 +9,6 @@ > + + + + diff --git a/vue.config.js b/vue.config.js index 43c126071..32ae7f1f3 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,54 +1,61 @@ /** * 配置参考: https://cli.vuejs.org/zh/config/ */ -const IS_PROD = ['production', 'test'].includes(process.env.NODE_ENV) +const IS_PROD = ["production", "test"].includes(process.env.NODE_ENV); module.exports = { - baseUrl: process.env.NODE_ENV === 'production' ? '' : '/epmet-work-pc', - css: { - // 是否使用css分离插件 ExtractTextPlugin - extract: IS_PROD, - // 开启 CSS source maps? - sourceMap: false, - // css预设器配置项 - loaderOptions: {}, - // 启用 CSS modules for all css / pre-processor files. - modules: false - }, - chainWebpack: (config) => { - const svgRule = config.module.rule('svg') - svgRule.uses.clear() - svgRule - .test(/\.svg$/) - .use('svg-sprite-loader') - .loader('svg-sprite-loader') - }, - productionSourceMap: false, - outputDir: 'epmet-work-pc', - assetsDir: 'static', - devServer: { - open: true, - port: 9001, - overlay: { - errors: true, - warnings: true - } - }, - // webpack简单配置 - configureWebpack: { - // debuge调试配置 - devtool: 'source-map', - externals: { - AMap: 'AMap' - }, - resolve: { - //配置路径别名 - // /node_modules/@vue/cli-service/lib/config/base.js中已经配好的@路径,所以这里可以直接使用@ - alias: { - '@js': '@/js', - '@c': '@/views/components', - '@v': '@/views', - '@m': '@/img' - } - } - } -} + baseUrl: process.env.NODE_ENV === "production" ? "" : "/epmet-work-pc", + css: { + // 是否使用css分离插件 ExtractTextPlugin + extract: IS_PROD, + // 开启 CSS source maps? + sourceMap: false, + // css预设器配置项 + loaderOptions: {}, + // 启用 CSS modules for all css / pre-processor files. + modules: false, + }, + chainWebpack: (config) => { + const svgRule = config.module.rule("svg"); + svgRule.uses.clear(); + svgRule + .test(/\.svg$/) + .use("svg-sprite-loader") + .loader("svg-sprite-loader"); + }, + productionSourceMap: false, + outputDir: "epmet-work-pc", + assetsDir: "static", + devServer: { + proxy: { + // 如果请求地址以/api打头,就出触发代理机制 + // http://localhost:9588/api/login -> http://localhost:3000/api/login + "/linkdata/linkdata-gateway/route": { + target: "http://bipaas.elinkservice.cn", // 我们要代理的真实接口地址 + }, + }, + open: true, + port: 9001, + overlay: { + errors: true, + warnings: true, + }, + }, + // webpack简单配置 + configureWebpack: { + // debuge调试配置 + devtool: "source-map", + externals: { + AMap: "AMap", + }, + resolve: { + //配置路径别名 + // /node_modules/@vue/cli-service/lib/config/base.js中已经配好的@路径,所以这里可以直接使用@ + alias: { + "@js": "@/js", + "@c": "@/views/components", + "@v": "@/views", + "@m": "@/img", + }, + }, + }, +};