Browse Source

对人房总览接口

feature
dai 3 years ago
parent
commit
f9fdfe6a82
  1. 2
      .env.development
  2. BIN
      src/assets/images/main/联建单位列表.xls
  3. BIN
      src/assets/images/main/联建活动列表.xls
  4. 19
      src/assets/scss/dataBoard/renfang/index.scss
  5. 2
      src/js/dai/request-bipass.js
  6. 2
      src/views/dataBoard/cpts/bread.vue
  7. 2
      src/views/dataBoard/cpts/house-details.vue
  8. 22
      src/views/dataBoard/cpts/resi-details.vue
  9. 6
      src/views/dataBoard/cpts/tb.vue
  10. 2
      src/views/dataBoard/renfang/cpts/bread.vue
  11. 78
      src/views/dataBoard/renfang/cpts/fwgl.vue
  12. 80
      src/views/dataBoard/renfang/cpts/jmgl.vue
  13. 68
      src/views/dataBoard/renfang/cpts/rkfx.vue
  14. 14
      src/views/dataBoard/renfang/cpts/rkyj.vue
  15. 18
      src/views/dataBoard/renfang/cpts/szsq.vue
  16. 12
      src/views/dataBoard/renfang/house/list.vue
  17. 218
      src/views/dataBoard/renfang/index.vue
  18. 10
      src/views/dataBoard/renfang/resi/analyze.vue
  19. 14
      src/views/dataBoard/renfang/resi/class.vue
  20. 10
      src/views/dataBoard/renfang/resi/list.vue
  21. 11
      src/views/dataBoard/renfang/warn/building.vue
  22. 13
      src/views/dataBoard/renfang/warn/resi.vue
  23. 1
      src/views/main-sidebar-sub-menu.vue
  24. 303
      src/views/modules/zhinengtianbao/index.vue
  25. 107
      vue.config.js

2
.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

BIN
src/assets/images/main/联建单位列表.xls

Binary file not shown.

BIN
src/assets/images/main/联建活动列表.xls

Binary file not shown.

19
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 {

2
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,
},

2
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,
};
},

2
src/views/dataBoard/cpts/house-details.vue

@ -118,7 +118,7 @@ export default {
},
},
{
mockId: 60235478,
// mockId: 60235478,
}
);

22
src/views/dataBoard/cpts/resi-details.vue

@ -11,21 +11,21 @@
<div class="item">
<div class="field">所属网格</div>
<div class="value">
{{ info.community + " - " + info.grid }}
<span v-if="info.community">{{
info.community
}}</span>
<span v-if="info.grid"> - {{ info.grid }}</span>
</div>
</div>
<div class="item">
<div class="field">所属房屋</div>
<div class="value">
{{
info.village +
" - " +
info.building +
" - " +
info.unit +
" - " +
info.room
}}
<span v-if="info.village">{{ info.village }}</span>
<span v-if="info.building">
- {{ info.building }}</span
>
<span v-if="info.unit"> - {{ info.unit }}</span>
<span v-if="info.room"> - {{ info.room }}</span>
</div>
</div>
<div class="item">
@ -899,7 +899,7 @@ export default {
},
},
{
mockId: 61172054,
// mockId: 61172054,
}
);

6
src/views/dataBoard/cpts/tb.vue

@ -117,7 +117,7 @@
<div class="table-status" v-if="list.length == 0 && !loading">
<div class="no-data">
<img
src="@/assets/img/modules/visual/noData.png"
src="~@/assets/images/shuju/renfang/index/empty.png"
class="no-data-img"
/>
</div>
@ -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;
}
}
}

2
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,
};
},

78
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();

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

@ -38,7 +38,7 @@
<div
class="row-item marginleft10"
@click="toListPage('inhabitant', '常住人口')"
@click="toListPage('permanent', '常住人口')"
>
<div class="item-one">
<img
@ -59,7 +59,7 @@
<div class="right-row margintop18">
<div
class="row-item"
@click="toListPage('floating', '流动人口')"
@click="toListPage('float', '流动人口')"
>
<div class="item-one">
<img
@ -141,9 +141,9 @@ export default {
pieData: [],
info: {
resident_count: "--",
inhabitant_count: "--",
floating_count: "--",
resident_count: 0,
inhabitant_count: 0,
floating_count: 0,
},
};
},
@ -209,13 +209,21 @@ export default {
},
},
{
mockId: 60029804,
// mockId: 60029804,
}
);
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 = {
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);
}

68
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: "博士",
},

14
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);
}

18
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);
}

12
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);
}

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

@ -13,7 +13,7 @@
</div>
<div class="m-subbox">
<fwgl :orgId="orgData.id"></fwgl>
<fwgl :orgId="orgData.org_id"></fwgl>
</div>
</div>
@ -27,7 +27,7 @@
</div>
<div class="m-subbox">
<jmgl :orgId="orgData.id"></jmgl>
<jmgl :orgId="orgData.org_id"></jmgl>
</div>
</div>
</div>
@ -245,8 +245,12 @@
src="~@/assets/images/shuju/main/card-title-bg-800.png"
class="box-title-bg"
/>
<div class="box-title-txt" v-if="!displayedForecast">居民分类分析</div>
<div class="box-title-txt" v-else>居民分类分析-智能预测</div>
<div class="box-title-txt" v-if="!displayedForecast">
居民分类分析
</div>
<div class="box-title-txt" v-else>
居民分类分析-智能预测
</div>
<div
class="box-title-btn"
@ -274,66 +278,86 @@
</div>
</div>
<div class="list" v-if="!displayedForecast">
<div
class="item"
@click="toResiClassPage(item.type_id, item.name)"
:key="item.code + index"
v-for="(item, index) in resiCategoryData"
>
<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 v-if="!displayedForecast">
<div class="list" v-if="resiCategoryData.length > 0">
<div
class="item"
@click="toResiClassPage(item.code, item.name)"
:key="item.code + index"
v-for="(item, index) in resiCategoryData"
>
<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 class="list" v-else>
<div class="empty" v-else>
<img
src="~@/assets/images/shuju/renfang/index/empty.png"
/>
</div>
</div>
<div v-else>
<div
class="item"
:key="item.code + index"
v-for="(item, index) in resiCategoryForecastData"
class="list"
v-if="resiCategoryForecastData.length > 0"
>
<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"
: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 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 class="empty" v-else>
<img
src="~@/assets/images/shuju/renfang/index/empty.png"
/>
</div>
</div>
</div>
</div>
@ -356,7 +380,7 @@
</div>
<div class="m-subbox m-szsq">
<szsq :orgId="orgData.id"></szsq>
<szsq :orgId="orgData.org_id"></szsq>
</div>
</div>
@ -378,7 +402,7 @@
orgLevel == 'city',
}"
>
<rkyj :orgId="orgData.id"></rkyj>
<rkyj :orgId="orgData.org_id"></rkyj>
</div>
</div>
<div class="m-box">
@ -391,7 +415,7 @@
</div>
<div class="m-subbox">
<rkfx :orgId="orgData.id"></rkfx>
<rkfx :orgId="orgData.org_id"></rkfx>
</div>
</div>
</div>
@ -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);

10
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);
}

14
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);
}

10
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);
}

11
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);
}

13
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);
}

1
src/views/main-sidebar-sub-menu.vue

@ -9,7 +9,6 @@
>
<template slot="title">
<svg
v-if="!root"
class="icon-svg aui-sidebar__menu-icon"
aria-hidden="true"
>

303
src/views/modules/zhinengtianbao/index.vue

@ -0,0 +1,303 @@
<template>
<div>
<div class="m-tx">
<div class="wrap">
<div class="header">
<div class="title">全部提醒</div>
<div class="btn-clear" @click="read">
<img src="~@/assets/images/main/clear.png" />
全部标记已读
</div>
</div>
<div class="cnt" v-if="noticeData.length > 0">
<div
@click="handleClickNotice(item, index)"
:class="{ 'z-readed': item.readFlag == 1 }"
class="item"
:key="'notice' + item.targetId + index"
v-for="(item, index) in noticeData"
>
<i class="i-tag" v-if="item.readFlag == 1">已读</i>
<i class="i-tag" v-else>未读</i>
<div class="item-title">
{{ item.content }}
</div>
<div
v-if="item.readFlag != 1"
@click.stop="read(item)"
class="item-btn-clear"
>
<img src="~@/assets/images/main/clear.png" />
标记已读
</div>
<div class="item-date">{{ item.createdTime }}</div>
</div>
</div>
<div class="cnt" v-else>
<div class="empty">
<img
src="~@/assets/images/shuju/renfang/index/empty.png"
/>
<span>暂无提醒</span>
</div>
</div>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
<fastcall ref="fastcall" />
</div>
</template>
<script>
import { requestGet, requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import fastcall from "@/views/modules/cpts/fastcall";
export default {
components: { fastcall },
data() {
return {
type: "all",
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
noticeData: [],
};
},
computed: {},
watch: {},
activated() {
this.getList();
},
methods: {
handleClickNotice(item, index) {
const { msgType, targetId } = item;
if (msgType == "community_house") {
this.$refs.fastcall.showHouseInfo(targetId);
} else if (msgType == "resident_base_info") {
this.$refs.fastcall.showResiInfo(targetId);
}
this.read(item, index);
},
async read(item, index) {
if (item && item.readFlag == 1) return;
const url = "/message/intelligentMessage/msg/clear";
let params = {};
if (item.id) {
params.id = item.id;
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
console.log("消息已读");
this.getList();
} else {
this.$message.error(msg);
}
},
handleClickTab(type) {
console.log(type);
this.getList();
},
handleSizeChange(val) {
this.pageSize = val;
localStorage.setItem("pageSize", val);
this.getList();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getList();
},
//
async getList() {
const url = "/message/intelligentMessage/page";
let params = {
page: this.pageNo,
limit: this.pageSize,
};
const { type } = this;
if (type == "readed") {
params.readFlag = 1;
} else if (type == "unreaded") {
params.readFlag = 0;
}
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.total = data.total;
this.noticeData = data.list;
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped>
@import "~@/assets/scss/c/function.scss";
.m-tx {
position: relative;
margin: 10px 6px;
padding: 12px 20px;
background: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
border-radius: 2px;
.cnt {
box-sizing: border-box;
border-radius: 2px;
overflow: hidden;
padding: 0 12px;
.empty {
margin: 100px 0;
text-align: center;
color: #999;
img {
display: block;
width: 120px;
margin: 20px auto;
}
}
.z-readed {
opacity: 0.5;
}
.item {
position: relative;
display: flex;
align-items: center;
padding: 16px 0 12px;
border-bottom: 1px dashed #f0f5fa;
&:last-child {
border-bottom: none;
}
&:hover {
.item-title {
color: #0056d6;
}
.item-btn-clear {
display: block;
}
}
.i-tag {
display: block;
margin-right: 15px;
width: 40px;
height: 22px;
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.15);
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.88);
line-height: 20px;
font-style: normal;
text-align: center;
}
.item-title {
// @include toe;
width: 60%;
margin-right: 100px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
}
.item-btn-clear {
position: absolute;
display: none;
top: 50%;
left: 65%;
width: 80px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0042a3;
line-height: 16px;
cursor: pointer;
transform: translateY(-50%);
img {
width: 16px;
margin-right: 3px;
}
}
.item-date {
margin-left: 100px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 17px;
}
}
}
.header {
display: flex;
justify-content: space-between;
padding: 12px 0;
margin-bottom: 10px;
border-bottom: 1px solid #f0f5fa;
.title {
height: 22px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
}
.btn-clear {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0042a3;
line-height: 16px;
cursor: pointer;
img {
width: 16px;
margin-right: 3px;
}
}
}
}
/deep/ .el-tabs__nav-wrap::after {
height: 1px;
background-color: #f0f5fa;
}
/deep/ .el-pagination__total {
// float: left;
}
</style>

107
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",
},
},
},
};

Loading…
Cancel
Save