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:41080/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/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_sdtdt
VUE_APP_NODE_ENV=dev 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 { .m-subbox {

2
src/js/dai/request-bipass.js

@ -74,7 +74,7 @@ const request = curry((method, uri, data = {}, params = {}) => {
dispatcherSystem: "dataservice", dispatcherSystem: "dataservice",
param: { param: {
ds_code: uri, ds_code: uri,
app_code: "empet", app_code: "empt",
orderby: "[]", orderby: "[]",
...data, ...data,
}, },

2
src/views/dataBoard/cpts/bread.vue

@ -52,7 +52,7 @@ export default {
}, },
data() { data() {
return { return {
pageSize: 10, pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, 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="item">
<div class="field">所属网格</div> <div class="field">所属网格</div>
<div class="value"> <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> </div>
<div class="item"> <div class="item">
<div class="field">所属房屋</div> <div class="field">所属房屋</div>
<div class="value"> <div class="value">
{{ <span v-if="info.village">{{ info.village }}</span>
info.village + <span v-if="info.building">
" - " + - {{ info.building }}</span
info.building + >
" - " + <span v-if="info.unit"> - {{ info.unit }}</span>
info.unit + <span v-if="info.room"> - {{ info.room }}</span>
" - " +
info.room
}}
</div> </div>
</div> </div>
<div class="item"> <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="table-status" v-if="list.length == 0 && !loading">
<div class="no-data"> <div class="no-data">
<img <img
src="@/assets/img/modules/visual/noData.png" src="~@/assets/images/shuju/renfang/index/empty.png"
class="no-data-img" class="no-data-img"
/> />
</div> </div>
@ -201,7 +201,8 @@ export default {
}, },
data() { data() {
return { return {
pageSize: 10, pageSize:
parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, pageNo: 1,
}; };
}, },
@ -347,6 +348,7 @@ export default {
right: 0; right: 0;
bottom: 0; bottom: 0;
margin: auto; margin: auto;
width: 120px;
} }
} }
} }

2
src/views/dataBoard/renfang/cpts/bread.vue

@ -50,7 +50,7 @@ export default {
}, },
data() { data() {
return { return {
pageSize: 10, pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, pageNo: 1,
}; };
}, },

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

@ -161,10 +161,10 @@ export default {
pieData: [], pieData: [],
info: { info: {
house_count: "--", house_count: 0,
self_dwelling_count: "--", self_dwelling_count: 0,
lease_count: "--", lease_count: 0,
unused_count: "--", unused_count: 0,
}, },
}; };
}, },
@ -230,13 +230,22 @@ export default {
}, },
}, },
{ {
mockId: 60007107, // mockId: 60007107,
} }
); );
if (code === 0 && data && Array.isArray(data) && data.length > 0) { if (code === 0) {
let info = data[0]; if (data && Array.isArray(data) && data.length > 0) {
this.info = { ...this.info, ...info }; 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 { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -252,8 +261,11 @@ export default {
const { info } = this; const { info } = this;
// //
this.pieOption.title.text = 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 = [ this.pieData = [
{ value: info.self_dwelling_count, name: "自住房屋" }, { value: info.self_dwelling_count, name: "自住房屋" },
{ value: info.lease_count, name: "出租房屋" }, { value: info.lease_count, name: "出租房屋" },
@ -270,15 +282,17 @@ export default {
fromActionPayload: { dataIndexInside }, fromActionPayload: { dataIndexInside },
} = params; } = params;
this.pieOption.title.text = this.pieOption.title.text =
parseInt( (info.house_count != 0
(100 * ? parseInt(
[ (100 *
info.self_dwelling_count, [
info.lease_count, info.self_dwelling_count,
info.unused_count, info.lease_count,
][dataIndexInside]) / info.unused_count,
info.house_count ][dataIndexInside]) /
) + "%"; info.house_count
)
: "--") + "%";
this.$refs.pieChart.myChart.setOption(this.pieOption); 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 xaxis = [];
let series = [{ data: [] }, { data: [] }, { data: [] }]; let series = [{ data: [] }, { data: [] }, { data: [] }];
for (const { if (data && Array.isArray(data) && data.length > 0) {
month, for (const {
self_dwelling_count, month,
lease_count, self_dwelling_count,
unused_count, lease_count,
} of data) { unused_count,
xaxis.push(month); } of data) {
series[0].data.push(self_dwelling_count); xaxis.push(month);
series[1].data.push(lease_count); series[0].data.push(self_dwelling_count);
series[2].data.push(unused_count); series[1].data.push(lease_count);
series[2].data.push(unused_count);
}
} }
this.iniBarChart(xaxis, series); this.iniBarChart(xaxis, series);
this.$refs.barChart.hideLoading(); this.$refs.barChart.hideLoading();

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

@ -38,7 +38,7 @@
<div <div
class="row-item marginleft10" class="row-item marginleft10"
@click="toListPage('inhabitant', '常住人口')" @click="toListPage('permanent', '常住人口')"
> >
<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="toListPage('floating', '流动人口')" @click="toListPage('float', '流动人口')"
> >
<div class="item-one"> <div class="item-one">
<img <img
@ -141,9 +141,9 @@ export default {
pieData: [], pieData: [],
info: { info: {
resident_count: "--", resident_count: 0,
inhabitant_count: "--", inhabitant_count: 0,
floating_count: "--", floating_count: 0,
}, },
}; };
}, },
@ -209,13 +209,21 @@ export default {
}, },
}, },
{ {
mockId: 60029804, // mockId: 60029804,
} }
); );
if (code === 0 && data && Array.isArray(data) && data.length > 0) { if (code === 0) {
let info = data[0]; if (data && Array.isArray(data) && data.length > 0) {
this.info = { ...this.info, ...info }; let info = data[0];
this.info = { ...this.info, ...info };
} else {
this.info = {
resident_count: 0,
inhabitant_count: 0,
floating_count: 0,
};
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -232,8 +240,11 @@ export default {
const { info } = this; const { info } = this;
// //
this.pieOption.title.text = 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 = [ this.pieData = [
{ value: info.inhabitant_count, name: "常住人口" }, { value: info.inhabitant_count, name: "常住人口" },
{ value: info.floating_count, name: "流动人口" }, { value: info.floating_count, name: "流动人口" },
@ -249,13 +260,16 @@ export default {
fromActionPayload: { dataIndexInside }, fromActionPayload: { dataIndexInside },
} = params; } = params;
this.pieOption.title.text = this.pieOption.title.text =
parseInt( (info.resident_count != 0
(100 * ? parseInt(
[info.inhabitant_count, info.floating_count][ (100 *
dataIndexInside [
]) / info.inhabitant_count,
info.resident_count info.floating_count,
) + "%"; ][dataIndexInside]) /
info.resident_count
)
: "--") + "%";
this.$refs.pieChart.myChart.setOption(this.pieOption); 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) { if (code === 0) {
let xaxis = []; if (data && Array.isArray(data) && data.length > 0) {
let series = [{ data: [] }, { data: [] }]; let xaxis = [];
for (const { let series = [{ data: [] }, { data: [] }];
month, for (const {
inhabitant_count, month,
floating_count, inhabitant_count,
} of data) { floating_count,
xaxis.push(month); } of data) {
series[0].data.push(inhabitant_count); xaxis.push(month);
series[1].data.push(floating_count); 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 { } else {
this.$message.error(msg); 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(); this.$refs.pieChart.hideLoading();
if (code === 0 && data && Array.isArray(data) && data.length > 0) { if (code === 0) {
let info = data[0]; if (data && Array.isArray(data) && data.length > 0) {
this.info = { ...this.info, ...info }; let info = data[0];
this.info = { ...this.info, ...info };
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -191,12 +193,12 @@ export default {
if (currentTab == "性别") { if (currentTab == "性别") {
this.pieData = [ this.pieData = [
{ {
value: info.male_count, value: info.male_count || 0,
type: "male_count", type: "male_count",
name: "男性", name: "男性",
}, },
{ {
value: info.female_count, value: info.female_count || 0,
type: "female_count", type: "female_count",
name: "女性", name: "女性",
}, },
@ -204,12 +206,12 @@ export default {
} else if (currentTab == "户籍") { } else if (currentTab == "户籍") {
this.pieData = [ this.pieData = [
{ {
value: info.local_count, value: info.local_count || 0,
type: "local_count", type: "local_count",
name: "本地户籍", name: "本地户籍",
}, },
{ {
value: info.field_count, value: info.field_count || 0,
type: "field_count", type: "field_count",
name: "外地户籍", name: "外地户籍",
}, },
@ -217,17 +219,17 @@ export default {
} else if (currentTab == "人户状况") { } else if (currentTab == "人户状况") {
this.pieData = [ this.pieData = [
{ {
value: info.resi_y_house_y_count, value: info.resi_y_house_y_count || 0,
type: "resi_y_house_y_count", type: "resi_y_house_y_count",
name: "人户一致", name: "人户一致",
}, },
{ {
value: info.resi_y_house_n_count, value: info.resi_y_house_n_count || 0,
type: "resi_y_house_n_count", type: "resi_y_house_n_count",
name: "人在户不在", name: "人在户不在",
}, },
{ {
value: info.resi_n_house_y_count, value: info.resi_n_house_y_count || 0,
type: "resi_n_house_y_count", type: "resi_n_house_y_count",
name: "户在人不在", name: "户在人不在",
}, },
@ -235,27 +237,27 @@ export default {
} else if (currentTab == "年龄") { } else if (currentTab == "年龄") {
this.pieData = [ this.pieData = [
{ {
value: info.age50_count, value: info.age50_count || 0,
type: "age50_count", type: "age50_count",
name: "50岁以下", name: "50岁以下",
}, },
{ {
value: info.age5059_count, value: info.age5059_count || 0,
type: "age5059_count", type: "age5059_count",
name: "50-59岁", name: "50-59岁",
}, },
{ {
value: info.age6069_count, value: info.age6069_count || 0,
type: "age6069_count", type: "age6069_count",
name: "60-69岁", name: "60-69岁",
}, },
{ {
value: info.age7079_count, value: info.age7079_count || 0,
type: "age7079_count", type: "age7079_count",
name: "70-79岁", name: "70-79岁",
}, },
{ {
value: info.age80_count, value: info.age80_count || 0,
type: "age80_count", type: "age80_count",
name: "80岁以上", name: "80岁以上",
}, },
@ -263,47 +265,47 @@ export default {
} else if (currentTab == "志愿者类别") { } else if (currentTab == "志愿者类别") {
this.pieData = [ this.pieData = [
{ {
value: info.culture_count, value: info.culture_count || 0,
type: "culture_count", type: "culture_count",
name: "文化队伍", name: "文化队伍",
}, },
{ {
value: info.committee_count, value: info.committee_count || 0,
type: "committee_count", type: "committee_count",
name: "楼委会", name: "楼委会",
}, },
{ {
value: info.capable_count, value: info.capable_count || 0,
type: "capable_count", type: "capable_count",
name: "能人达人", name: "能人达人",
}, },
{ {
value: info.friend_count, value: info.friend_count || 0,
type: "friend_count", type: "friend_count",
name: "老友俱乐部", name: "老友俱乐部",
}, },
{ {
value: info.agent_count, value: info.agent_count || 0,
type: "agent_count", type: "agent_count",
name: "代办员", name: "代办员",
}, },
{ {
value: info.mediator_count, value: info.mediator_count || 0,
type: "mediator_count", type: "mediator_count",
name: "调解员", name: "调解员",
}, },
{ {
value: info.collector_count, value: info.collector_count || 0,
type: "collector_count", type: "collector_count",
name: "采集员", name: "采集员",
}, },
{ {
value: info.security_count, value: info.security_count || 0,
type: "security_count", type: "security_count",
name: "治安巡逻员", name: "治安巡逻员",
}, },
{ {
value: info.party_mem_count, value: info.party_mem_count || 0,
type: "party_mem_count", type: "party_mem_count",
name: "党员中心户", name: "党员中心户",
}, },
@ -311,42 +313,42 @@ export default {
} else if (currentTab == "党员文化程度") { } else if (currentTab == "党员文化程度") {
this.pieData = [ this.pieData = [
{ {
value: info.primary_count, value: info.primary_count || 0,
type: "primary_count", type: "primary_count",
name: "小学及文盲", name: "小学及文盲",
}, },
{ {
value: info.junior_high_count, value: info.junior_high_count || 0,
type: "junior_high_count", type: "junior_high_count",
name: "初中", name: "初中",
}, },
{ {
value: info.second_speci_count, value: info.second_speci_count || 0,
type: "second_speci_count", type: "second_speci_count",
name: "中专", name: "中专",
}, },
{ {
value: info.high_school_count, value: info.high_school_count || 0,
type: "high_school_count", type: "high_school_count",
name: "高中", name: "高中",
}, },
{ {
value: info.junior_college_count, value: info.junior_college_count || 0,
type: "junior_college_count", type: "junior_college_count",
name: "大专", name: "大专",
}, },
{ {
value: info.undergrad_count, value: info.undergrad_count || 0,
type: "undergrad_count", type: "undergrad_count",
name: "本科", name: "本科",
}, },
{ {
value: info.master_count, value: info.master_count || 0,
type: "master_count", type: "master_count",
name: "硕士", name: "硕士",
}, },
{ {
value: info.doctor_count, value: info.doctor_count || 0,
type: "doctor_count", type: "doctor_count",
name: "博士", name: "博士",
}, },

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

@ -102,6 +102,12 @@ export default {
mounted() { mounted() {
this.getList(); this.getList();
}, },
watch: {
orgId() {
this.getList();
},
},
methods: { methods: {
toListPage(level, type_id = "", type_name) { toListPage(level, type_id = "", type_name) {
this.$router.push({ this.$router.push({
@ -126,12 +132,14 @@ export default {
}, },
}, },
{ {
mockId: 60040087, // mockId: 60040087,
} }
); );
if (code === 0 && data && Array.isArray(data) && data.length > 0) { if (code === 0) {
this.list = data; if (data && Array.isArray(data) && data.length > 0) {
this.list = data;
}
} else { } else {
this.$message.error(msg); 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) { if (code === 0) {
let info = data[0]; if (data && Array.isArray(data) && data.length > 0) {
this.info.community_count = info.community_count; let info = data[0];
this.info.account_count = info.account_count; this.info.community_count = info.community_count;
this.info.per = parseInt( this.info.account_count = info.account_count;
(100 * info.account_count) / info.community_count this.info.per = parseInt(
); (100 * info.account_count) / info.community_count
);
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

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

@ -76,7 +76,7 @@ export default {
houseType: "", // houseType: "", //
loading: true, loading: true,
pageSize: 10, pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
srcTableData: [], srcTableData: [],
@ -158,6 +158,7 @@ export default {
const type_name = getQueryPara("type_name"); const type_name = getQueryPara("type_name");
this.breadList[1].meta.title = type_name + "房屋列表"; this.breadList[1].meta.title = type_name + "房屋列表";
this.tableTitle = type_name + "房屋列表"; this.tableTitle = type_name + "房屋列表";
this.pageNo = 1;
this.getList(); this.getList();
this.getCount(); this.getCount();
}, },
@ -182,6 +183,7 @@ export default {
}, },
handleSizeChange(pageSize) { handleSizeChange(pageSize) {
localStorage.setItem('dataBoard_PageSize', pageSize);
this.pageSize = pageSize; this.pageSize = pageSize;
this.getList(); 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 { org_id, houseType, pageNo, pageSize } = this;
const url = "house_list_total"; const url = "house_list_total";
@ -251,12 +253,12 @@ export default {
}, },
}, },
{ {
mockId: 63070189, // mockId: 63070189,
} }
); );
if (code === 0) { if (code === 0) {
this.total = data[0].count; this.total = parseInt(data[0].count);
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

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

@ -13,7 +13,7 @@
</div> </div>
<div class="m-subbox"> <div class="m-subbox">
<fwgl :orgId="orgData.id"></fwgl> <fwgl :orgId="orgData.org_id"></fwgl>
</div> </div>
</div> </div>
@ -27,7 +27,7 @@
</div> </div>
<div class="m-subbox"> <div class="m-subbox">
<jmgl :orgId="orgData.id"></jmgl> <jmgl :orgId="orgData.org_id"></jmgl>
</div> </div>
</div> </div>
</div> </div>
@ -245,8 +245,12 @@
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" v-if="!displayedForecast">居民分类分析</div> <div class="box-title-txt" v-if="!displayedForecast">
<div class="box-title-txt" v-else>居民分类分析-智能预测</div> 居民分类分析
</div>
<div class="box-title-txt" v-else>
居民分类分析-智能预测
</div>
<div <div
class="box-title-btn" class="box-title-btn"
@ -274,66 +278,86 @@
</div> </div>
</div> </div>
<div class="list" v-if="!displayedForecast"> <div v-if="!displayedForecast">
<div <div class="list" v-if="resiCategoryData.length > 0">
class="item" <div
@click="toResiClassPage(item.type_id, item.name)" class="item"
:key="item.code + index" @click="toResiClassPage(item.code, item.name)"
v-for="(item, index) in resiCategoryData" :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>{{ ("0" + (index + 1)).substr(-2) }}.</div>
<div class="item-count"> <div class="item-name">{{ item.name }}</div>
<b>{{ item.count }}</b> <div class="item-count">
</div> <b>{{ item.count }}</b>
<div class="item-progress"> </div>
<b :style="{ width: item.ratio + '%' }"></b> <div class="item-progress">
</div> <b :style="{ width: item.ratio + '%' }"></b>
<div class="item-per"> </div>
<span>较上月</span> <div class="item-per">
<img <span>较上月</span>
v-if="item.growth >= 0" <img
src="~@/assets/images/shuju/renfang/index/up.png" v-if="item.growth >= 0"
/> src="~@/assets/images/shuju/renfang/index/up.png"
<img />
v-else <img
src="~@/assets/images/shuju/renfang/index/down.png" v-else
/> src="~@/assets/images/shuju/renfang/index/down.png"
<b>{{ item.growthAbs }}</b> />
<span></span> <b>{{ item.growthAbs }}</b>
<span></span>
</div>
</div> </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 <div
class="item" class="list"
:key="item.code + index" v-if="resiCategoryForecastData.length > 0"
v-for="(item, index) in resiCategoryForecastData"
> >
<div>{{ ("0" + (index + 1)).substr(-2) }}.</div> <div
<div class="item-name">{{ item.name }}</div> class="item"
<div class="item-count"> :key="item.code + index"
<b>{{ item.count }}</b> v-for="(
</div> item, index
<div class="item-progress"> ) in resiCategoryForecastData"
<b :style="{ width: item.ratio + '%' }"></b> >
</div> <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"> <div class="item-per">
<span>较上一年</span> <span>较上一年</span>
<img <img
v-if="item.growth >= 0" v-if="item.growth >= 0"
src="~@/assets/images/shuju/renfang/index/up.png" src="~@/assets/images/shuju/renfang/index/up.png"
/> />
<img <img
v-else v-else
src="~@/assets/images/shuju/renfang/index/down.png" src="~@/assets/images/shuju/renfang/index/down.png"
/> />
<b>{{ item.growthAbs }}</b> <b>{{ item.growthAbs }}</b>
<span></span> <span></span>
</div>
</div> </div>
</div> </div>
<div class="empty" v-else>
<img
src="~@/assets/images/shuju/renfang/index/empty.png"
/>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -356,7 +380,7 @@
</div> </div>
<div class="m-subbox m-szsq"> <div class="m-subbox m-szsq">
<szsq :orgId="orgData.id"></szsq> <szsq :orgId="orgData.org_id"></szsq>
</div> </div>
</div> </div>
@ -378,7 +402,7 @@
orgLevel == 'city', orgLevel == 'city',
}" }"
> >
<rkyj :orgId="orgData.id"></rkyj> <rkyj :orgId="orgData.org_id"></rkyj>
</div> </div>
</div> </div>
<div class="m-box"> <div class="m-box">
@ -391,7 +415,7 @@
</div> </div>
<div class="m-subbox"> <div class="m-subbox">
<rkfx :orgId="orgData.id"></rkfx> <rkfx :orgId="orgData.org_id"></rkfx>
</div> </div>
</div> </div>
</div> </div>
@ -448,7 +472,9 @@ export default {
return { return {
loading: false, loading: false,
orgData: {}, // orgData: {
children: [],
}, //
orgId: "", orgId: "",
orgLevel: "", orgLevel: "",
@ -510,9 +536,9 @@ export default {
// //
this.loading = false; this.loading = false;
await this.loadOrgData(); // await this.loadOrgData();
// await this.getMapData(); await this.getMapData();
// await this.getSubMapData(); await this.getSubMapData();
this.getResiCategoryData(); this.getResiCategoryData();
this.getResiCategoryForecastData(); this.getResiCategoryForecastData();
this.getPerInfo(); this.getPerInfo();
@ -597,13 +623,13 @@ export default {
url, url,
{ {
queryParam: { queryParam: {
org_id: this.orgData.id, org_id: this.orgId,
name: this.searchModule.keyword, name: this.searchModule.keyword,
}, },
}, },
{ {
// mockId: 60044224, // mockId: 60044224,
mockId: 60048067, // mockId: 60048067,
} }
); );
@ -611,7 +637,9 @@ export default {
this.searchModule.result = data.map((item) => { this.searchModule.result = data.map((item) => {
let type = item.type || searchModule.resultTab; let type = item.type || searchModule.resultTab;
let title = ""; let title = "";
if (type == "1") { if (searchModule.resultTab == 0) {
title = item.name;
} else if (type == "1") {
title = item.user_name; title = item.user_name;
} else if (type == "2") { } else if (type == "2") {
title = item.village_name; title = item.village_name;
@ -635,22 +663,25 @@ export default {
// ps: // ps:
async getPerInfo() { async getPerInfo() {
console.log("=========================getPerInfo"); console.log("=========================getPerInfo");
const url = "house_view"; const url = "resident_ratio";
const { data, code, msg } = await requestPostBi( const { data, code, msg } = await requestPostBi(
url, url,
{ {
queryParam: { queryParam: {
org_id: this.orgData.id, org_id: this.orgId,
}, },
}, },
{ {
mockId: 61167746, // mockId: 61167746,
} }
); );
if (code === 0) { if (code === 0) {
this.perInfo = data[0]; this.perInfo = {
...this.perInfo,
...data[0],
};
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -665,18 +696,18 @@ export default {
url, url,
{ {
queryParam: { queryParam: {
org_id: this.orgData.id, org_id: this.orgId,
}, },
}, },
{ {
mockId: 60031937, // mockId: 60031937,
} }
); );
if (code === 0) { if (code === 0) {
this.resiCategoryData = data.map((item) => { this.resiCategoryData = data.map((item) => {
return { return {
code: item.label, code: item.label_id,
name: item.label, name: item.label,
count: item.count, count: item.count,
ratio: item.ratio, ratio: item.ratio,
@ -698,11 +729,11 @@ export default {
url, url,
{ {
queryParam: { 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) { if (code === 0) {
let info = data[0]; let info = data[0];
this.orgData = info; this.orgData = {
this.orgId = this.orgData.id; ...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; this.orgLevel = this.orgData.level;
} else { } else {
this.$message.error(msg); this.$message.error(msg);
@ -751,7 +790,7 @@ export default {
// //
async getSubMapData() { async getSubMapData() {
console.log("=========================getMapData"); console.log("=========================getSubMapData");
const url = "sub_org_map"; const url = "sub_org_map";
const { data, code, msg } = await requestPostBi( const { data, code, msg } = await requestPostBi(
@ -762,12 +801,27 @@ export default {
}, },
}, },
{ {
mockId: 61831860, // mockId: 61831860,
} }
); );
if (code === 0) { 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 { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -785,7 +839,7 @@ export default {
if (code === 0) { if (code === 0) {
this.orgData = data; this.orgData = data;
this.orgId = this.orgData.id; this.orgId = this.orgId;
this.orgLevel = this.orgData.level; this.orgLevel = this.orgData.level;
} else { } else {
this.$message.error(msg); this.$message.error(msg);

10
src/views/dataBoard/renfang/resi/analyze.vue

@ -78,7 +78,7 @@ export default {
resiType: "", // resiType: "", //
loading: true, loading: true,
pageSize: 10, pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
srcTableData: [], srcTableData: [],
@ -146,6 +146,7 @@ export default {
this.breadList[1].meta.title = type_name + "居民列表"; this.breadList[1].meta.title = type_name + "居民列表";
this.tableTitle = type_name + "居民列表"; this.tableTitle = type_name + "居民列表";
this.pageNo = 1;
this.getList(); this.getList();
this.getCount(); this.getCount();
}, },
@ -170,6 +171,7 @@ export default {
}, },
handleSizeChange(pageSize) { handleSizeChange(pageSize) {
localStorage.setItem('dataBoard_PageSize', pageSize);
this.pageSize = pageSize; this.pageSize = pageSize;
this.getList(); 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) { if (code === 0) {
this.total = data[0].count; this.total = parseInt(data[0].count);
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

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

@ -95,7 +95,8 @@ export default {
type_id: "", // type_id: "", //
loading: true, loading: true,
pageSize: 10, pageSize:
parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
srcTableData: [], srcTableData: [],
@ -166,6 +167,7 @@ export default {
this.breadList[1].meta.title = type_name + "居民列表"; this.breadList[1].meta.title = type_name + "居民列表";
this.tableTitle = type_name + "居民列表"; this.tableTitle = type_name + "居民列表";
this.pageNo = 1;
this.getList(); this.getList();
this.getCount(); this.getCount();
if (this.type_id == "6") { if (this.type_id == "6") {
@ -175,6 +177,7 @@ export default {
watch: { watch: {
subclassId() { subclassId() {
this.pageNo = 1;
this.getList(); this.getList();
this.getCount(); this.getCount();
}, },
@ -200,6 +203,7 @@ export default {
}, },
handleSizeChange(pageSize) { handleSizeChange(pageSize) {
localStorage.setItem("dataBoard_PageSize", pageSize);
this.pageSize = pageSize; this.pageSize = pageSize;
this.getList(); 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) { if (code === 0) {
this.total = data[0].count; this.total = parseInt(data[0].count);
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

10
src/views/dataBoard/renfang/resi/list.vue

@ -78,7 +78,7 @@ export default {
resiType: "", // resiType: "", //
loading: true, loading: true,
pageSize: 10, pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
srcTableData: [], srcTableData: [],
@ -146,6 +146,7 @@ export default {
this.breadList[1].meta.title = type_name + "居民列表"; this.breadList[1].meta.title = type_name + "居民列表";
this.tableTitle = type_name + "居民列表"; this.tableTitle = type_name + "居民列表";
this.pageNo = 1;
this.getList(); this.getList();
this.getCount(); this.getCount();
}, },
@ -170,6 +171,7 @@ export default {
}, },
handleSizeChange(pageSize) { handleSizeChange(pageSize) {
localStorage.setItem('dataBoard_PageSize', pageSize);
this.pageSize = pageSize; this.pageSize = pageSize;
this.getList(); 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) { if (code === 0) {
this.total = data[0].count; this.total = parseInt(data[0].count);
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

11
src/views/dataBoard/renfang/warn/building.vue

@ -77,7 +77,8 @@ export default {
level: "", level: "",
loading: true, loading: true,
pageSize: 10, pageSize:
parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
srcTableData: [], srcTableData: [],
@ -131,6 +132,7 @@ export default {
this.tableTitle = this.tableTitle =
type_name + (this.level == "red" ? "红色" : "黄色") + "预警楼栋"; type_name + (this.level == "red" ? "红色" : "黄色") + "预警楼栋";
this.breadList[1].meta.title = this.tableTitle; this.breadList[1].meta.title = this.tableTitle;
this.pageNo = 1;
this.getList(); this.getList();
this.getCount(); this.getCount();
}, },
@ -166,6 +168,7 @@ export default {
}, },
handleSizeChange(pageSize) { handleSizeChange(pageSize) {
localStorage.setItem("dataBoard_PageSize", pageSize);
this.pageSize = pageSize; this.pageSize = pageSize;
this.getList(); 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) { if (code === 0) {
this.total = data[0].count; this.total = parseInt(data[0].count);
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

13
src/views/dataBoard/renfang/warn/resi.vue

@ -62,7 +62,7 @@ export default {
type_id: "", // type_id: "", //
loading: true, loading: true,
pageSize: 10, pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1, pageNo: 1,
total: 0, total: 0,
srcTableData: [], srcTableData: [],
@ -140,6 +140,7 @@ export default {
}, },
handleSizeChange(pageSize) { handleSizeChange(pageSize) {
localStorage.setItem("dataBoard_PageSize", pageSize);
this.pageSize = pageSize; this.pageSize = pageSize;
this.getList(); 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) { if (code === 0) {
this.total = data[0].count; if (Array.isArray(data) && data.length > 0) {
this.total = parseInt(data[0].count);
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

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

@ -9,7 +9,6 @@
> >
<template slot="title"> <template slot="title">
<svg <svg
v-if="!root"
class="icon-svg aui-sidebar__menu-icon" class="icon-svg aui-sidebar__menu-icon"
aria-hidden="true" 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/ * 配置参考: 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 = { module.exports = {
baseUrl: process.env.NODE_ENV === 'production' ? '' : '/epmet-work-pc', baseUrl: process.env.NODE_ENV === "production" ? "" : "/epmet-work-pc",
css: { css: {
// 是否使用css分离插件 ExtractTextPlugin // 是否使用css分离插件 ExtractTextPlugin
extract: IS_PROD, extract: IS_PROD,
// 开启 CSS source maps? // 开启 CSS source maps?
sourceMap: false, sourceMap: false,
// css预设器配置项 // css预设器配置项
loaderOptions: {}, loaderOptions: {},
// 启用 CSS modules for all css / pre-processor files. // 启用 CSS modules for all css / pre-processor files.
modules: false modules: false,
}, },
chainWebpack: (config) => { chainWebpack: (config) => {
const svgRule = config.module.rule('svg') const svgRule = config.module.rule("svg");
svgRule.uses.clear() svgRule.uses.clear();
svgRule svgRule
.test(/\.svg$/) .test(/\.svg$/)
.use('svg-sprite-loader') .use("svg-sprite-loader")
.loader('svg-sprite-loader') .loader("svg-sprite-loader");
}, },
productionSourceMap: false, productionSourceMap: false,
outputDir: 'epmet-work-pc', outputDir: "epmet-work-pc",
assetsDir: 'static', assetsDir: "static",
devServer: { devServer: {
open: true, proxy: {
port: 9001, // 如果请求地址以/api打头,就出触发代理机制
overlay: { // http://localhost:9588/api/login -> http://localhost:3000/api/login
errors: true, "/linkdata/linkdata-gateway/route": {
warnings: true target: "http://bipaas.elinkservice.cn", // 我们要代理的真实接口地址
} },
}, },
// webpack简单配置 open: true,
configureWebpack: { port: 9001,
// debuge调试配置 overlay: {
devtool: 'source-map', errors: true,
externals: { warnings: true,
AMap: 'AMap' },
}, },
resolve: { // webpack简单配置
//配置路径别名 configureWebpack: {
// /node_modules/@vue/cli-service/lib/config/base.js中已经配好的@路径,所以这里可以直接使用@ // debuge调试配置
alias: { devtool: "source-map",
'@js': '@/js', externals: {
'@c': '@/views/components', AMap: "AMap",
'@v': '@/views', },
'@m': '@/img' resolve: {
} //配置路径别名
} // /node_modules/@vue/cli-service/lib/config/base.js中已经配好的@路径,所以这里可以直接使用@
} alias: {
} "@js": "@/js",
"@c": "@/views/components",
"@v": "@/views",
"@m": "@/img",
},
},
},
};

Loading…
Cancel
Save