Commit 7f05541f by heshihao

feat: 假数据修改后端返回

parent aa769808
...@@ -113,69 +113,69 @@ ...@@ -113,69 +113,69 @@
<p>总建筑面积</p> <p>总建筑面积</p>
<p> <p>
<!-- TODO需要放开 --> <!-- TODO需要放开 -->
<!-- <span>{{ areaList.build_total_area }}</span> --> <span>{{ areaList.build_total_area }}</span>
<span>{{ 11 }}</span> <!-- <span>{{ 11 }}</span> -->
</p> </p>
<p> <p>
同比 同比
<!-- TODO需要放开 --> <!-- TODO需要放开 -->
<!-- <span v-if="areaList.total_area_rate == 0" class="zero">{{ areaList.total_area_rate }}%</span> <span v-if="areaList.total_area_rate == 0" class="zero">{{ areaList.total_area_rate }}%</span>
<span v-if="areaList.total_area_rate > 0" class="add">{{ areaList.total_area_rate }}%</span> <span v-if="areaList.total_area_rate > 0" class="add">{{ areaList.total_area_rate }}%</span>
<img v-if="areaList.total_area_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" /> <img v-if="areaList.total_area_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" />
<span v-if="areaList.total_area_rate < 0" class="dec">{{ areaList.total_area_rate }}%</span> <span v-if="areaList.total_area_rate < 0" class="dec">{{ areaList.total_area_rate }}%</span>
<img v-if="areaList.total_area_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> --> <img v-if="areaList.total_area_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" />
<span v-if="areaList.total_area_rate == 0" class="zero">{{ 20 }}%</span> <!-- <span v-if="areaList.total_area_rate == 0" class="zero">{{ 20 }}%</span>
<span v-if="areaList.total_area_rate > 0" class="add">{{ 30 }}%</span> <span v-if="areaList.total_area_rate > 0" class="add">{{ 30 }}%</span>
<img v-if="areaList.total_area_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" /> <img v-if="areaList.total_area_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" />
<span v-if="areaList.total_area_rate < 0" class="dec">{{ 10 }}%</span> <span v-if="areaList.total_area_rate < 0" class="dec">{{ 10 }}%</span>
<img v-if="areaList.total_area_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> <img v-if="areaList.total_area_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> -->
</p> </p>
</div> </div>
<div class="other"> <div class="other">
<p>总闲置面积</p> <p>总闲置面积</p>
<p> <p>
<!-- TODO需要放开 --> <!-- TODO需要放开 -->
<!-- <span>{{ areaList.build_empty_area }}</span> --> <span>{{ areaList.build_empty_area }}</span>
<span>{{ 20 }}</span> <!-- <span>{{ 20 }}</span> -->
</p> </p>
<p> <p>
同比 同比
<!-- TODO需要放开 --> <!-- TODO需要放开 -->
<!-- <span v-if="areaList.build_empty_rate == 0" class="zero">{{ areaList.build_empty_rate }}%</span> <span v-if="areaList.build_empty_rate == 0" class="zero">{{ areaList.build_empty_rate }}%</span>
<span v-if="areaList.build_empty_rate > 0" class="add">{{ areaList.build_empty_rate }}%</span> <span v-if="areaList.build_empty_rate > 0" class="add">{{ areaList.build_empty_rate }}%</span>
<img v-if="areaList.build_empty_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" /> <img v-if="areaList.build_empty_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" />
<span v-if="areaList.build_empty_rate < 0" class="dec">{{ areaList.build_empty_rate }}%</span> <span v-if="areaList.build_empty_rate < 0" class="dec">{{ areaList.build_empty_rate }}%</span>
<img v-if="areaList.build_empty_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> --> <img v-if="areaList.build_empty_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" />
<span v-if="areaList.build_empty_rate == 0" class="zero">{{ 30 }}%</span> <!-- <span v-if="areaList.build_empty_rate == 0" class="zero">{{ 30 }}%</span>
<span v-if="areaList.build_empty_rate > 0" class="add">{{ 80 }}%</span> <span v-if="areaList.build_empty_rate > 0" class="add">{{ 80 }}%</span>
<img v-if="areaList.build_empty_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" /> <img v-if="areaList.build_empty_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" />
<span v-if="areaList.build_empty_rate < 0" class="dec">{{ 70 }}%</span> <span v-if="areaList.build_empty_rate < 0" class="dec">{{ 70 }}%</span>
<img v-if="areaList.build_empty_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> <img v-if="areaList.build_empty_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> -->
</p> </p>
</div> </div>
<div class="other"> <div class="other">
<p>闲置率</p> <p>闲置率</p>
<p> <p>
<!-- TODO需要放开 --> <!-- TODO需要放开 -->
<!-- <span>{{ areaList.current_build_empty_rate }}%</span> --> <span>{{ areaList.current_build_empty_rate }}%</span>
<span>{{ 78 }}%</span> <!-- <span>{{ 78 }}%</span> -->
</p> </p>
<p> <p>
同比 同比
<!-- TODO需要放开 --> <!-- TODO需要放开 -->
<!-- <span v-if="areaList.build_rate == 0" class="zero">{{ areaList.build_rate }}%</span> <span v-if="areaList.build_rate == 0" class="zero">{{ areaList.build_rate }}%</span>
<span v-if="areaList.build_rate > 0" class="add">{{ areaList.build_rate }}%</span> <span v-if="areaList.build_rate > 0" class="add">{{ areaList.build_rate }}%</span>
<img v-if="areaList.build_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" /> <img v-if="areaList.build_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" />
<span v-if="areaList.build_rate < 0" class="dec">{{ areaList.build_rate }}%</span> <span v-if="areaList.build_rate < 0" class="dec">{{ areaList.build_rate }}%</span>
<img v-if="areaList.build_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> --> <img v-if="areaList.build_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" />
<span v-if="areaList.build_rate == 0" class="zero">{{ 30 }}%</span> <!-- <span v-if="areaList.build_rate == 0" class="zero">{{ 30 }}%</span>
<span v-if="areaList.build_rate > 0" class="add">{{ 20 }}%</span> <span v-if="areaList.build_rate > 0" class="add">{{ 20 }}%</span>
<img v-if="areaList.build_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" /> <img v-if="areaList.build_rate > 0" src="@/assets/images/resources/icon-red.png" alt="" />
<span v-if="areaList.build_rate < 0" class="dec">{{ 40 }}%</span> <span v-if="areaList.build_rate < 0" class="dec">{{ 40 }}%</span>
<img v-if="areaList.build_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> <img v-if="areaList.build_rate < 0" src="@/assets/images/resources/icon-green.png" alt="" /> -->
</p> </p>
</div> </div>
</div> </div>
...@@ -783,7 +783,7 @@ export default { ...@@ -783,7 +783,7 @@ export default {
this.initChartMap(); this.initChartMap();
this.initChartsBar(); this.initChartsBar();
this.ShowCarrierRate(); this.ShowCarrierRate();
// this.ShowCarrierEnergy(); this.ShowCarrierEnergy();
// this.GetLoansRate(); // this.GetLoansRate();
this.ShowArea(); this.ShowArea();
}, },
...@@ -798,17 +798,17 @@ export default { ...@@ -798,17 +798,17 @@ export default {
}); });
this.areaList = obj; this.areaList = obj;
}, },
// async ShowCarrierEnergy() { async ShowCarrierEnergy() {
// let res = await api.ShowCarrierEnergy(); let res = await api.ShowCarrierEnergy();
// this.electric_data = res.electric_data; this.electric_data = res.electric_data;
// this.gas_data = res.gas_data; this.gas_data = res.gas_data;
// this.water_data = res.water_data; this.water_data = res.water_data;
// }, },
async GetLoansRate() { async GetLoansRate() {
let res = await api.GetLoansRate(); let res = await api.GetLoansRate();
this.time = res.time.reverse(); this.time = res?.time?.reverse();
this.y1 = res.y1.reverse(); this.y1 = res?.y1?.reverse();
this.y5 = res.y5.reverse(); this.y5 = res?.y5?.reverse();
if (this.chartLine != null) { if (this.chartLine != null) {
this.upDataChartLine(); this.upDataChartLine();
} }
...@@ -827,25 +827,24 @@ export default { ...@@ -827,25 +827,24 @@ export default {
this.barData.build_year = []; //楼宇全年闲置面积 this.barData.build_year = []; //楼宇全年闲置面积
this.barData.land_year = []; //土地全年闲置面积 this.barData.land_year = []; //土地全年闲置面积
if (this.activeDistrict == "满城区") { if (this.activeDistrict == "满城区") {
let sortRes = []; // res.map((item) => {
// if (item.district_name == "城区") {
// sortRes[0] = item;
// } else if (item.district_name == "泽州县") {
// sortRes[1] = item;
// } else if (item.district_name == "高平市") {
// sortRes[2] = item;
// } else if (item.district_name == "阳城县") {
// sortRes[3] = item;
// } else if (item.district_name == "陵川县") {
// sortRes[4] = item;
// } else if (item.district_name == "沁水县") {
// sortRes[5] = item;
// } else if (item.district_name == "晋城经济技术开发区") {
// sortRes[6] = item;
// }
// });
res.map((item) => { res.map((item) => {
if (item.district_name == "城区") {
sortRes[0] = item;
} else if (item.district_name == "泽州县") {
sortRes[1] = item;
} else if (item.district_name == "高平市") {
sortRes[2] = item;
} else if (item.district_name == "阳城县") {
sortRes[3] = item;
} else if (item.district_name == "陵川县") {
sortRes[4] = item;
} else if (item.district_name == "沁水县") {
sortRes[5] = item;
} else if (item.district_name == "晋城经济技术开发区") {
sortRes[6] = item;
}
});
sortRes.map((item) => {
this.barData.xAxisData.push(item.district_name || item.quarter); //区域名称 this.barData.xAxisData.push(item.district_name || item.quarter); //区域名称
this.barData.factory_year.push(item.factory_empty_area); this.barData.factory_year.push(item.factory_empty_area);
this.barData.build_year.push(item.build_empty_area); this.barData.build_year.push(item.build_empty_area);
...@@ -861,7 +860,7 @@ export default { ...@@ -861,7 +860,7 @@ export default {
} }
// TODO 后续需要放开 // TODO 后续需要放开
// this.upDataChartBar(); this.upDataChartBar();
}, },
// 更改地区选项 // 更改地区选项
changeActive(district) { changeActive(district) {
...@@ -1557,19 +1556,7 @@ export default { ...@@ -1557,19 +1556,7 @@ export default {
return str; return str;
}, },
}, },
data: [ data: [],
"满城镇",
"南韩村镇",
"大册营镇",
"神星镇",
"方顺桥镇",
"于家庄乡",
"要庄乡",
"石井乡",
"坨南乡",
"刘家台乡",
"白龙乡",
],
}, },
yAxis: [ yAxis: [
{ {
...@@ -1649,7 +1636,7 @@ export default { ...@@ -1649,7 +1636,7 @@ export default {
}, },
yAxisIndex: 1, yAxisIndex: 1,
color: ["#78a3ff "], color: ["#78a3ff "],
data: [1, 2, 3, 4, 5, 6, 5, 6, 3, 2, 1], data: [],
}, },
{ {
type: "bar", type: "bar",
...@@ -1663,7 +1650,7 @@ export default { ...@@ -1663,7 +1650,7 @@ export default {
}, },
}, },
color: ["#ff7272"], color: ["#ff7272"],
data: [12, 21, 32, 41, 52, 65, 53, 61, 31, 21, 11], data: [],
}, },
{ {
type: "bar", type: "bar",
...@@ -2443,5 +2430,5 @@ span { ...@@ -2443,5 +2430,5 @@ span {
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
z-index: 998; z-index: 998;
transition: 0.3s; transition: 0.3s;
} }</style
</style> >import { log } from "video.js";
...@@ -278,8 +278,8 @@ export default { ...@@ -278,8 +278,8 @@ export default {
}, },
mounted() { mounted() {
this.initChartMap(); this.initChartMap();
// this.getOverview(); this.getOverview();
// this.getData(); this.getData();
}, },
methods: { methods: {
changeDistrict() { changeDistrict() {
...@@ -308,17 +308,15 @@ export default { ...@@ -308,17 +308,15 @@ export default {
}, },
changeActiveType(val) { changeActiveType(val) {
this.activeType = val; this.activeType = val;
// this.getData(); this.getData();
}, },
async getData() { async getData() {
let res = await api.GetData({ data_time: "", flag: this.activeType }); let res = await api.GetData({ data_time: "", flag: this.activeType });
console.log(res);
this.data_time = res.data_time; this.data_time = res.data_time;
this.scoreList = res.target_data_li; this.scoreList = res.target_data_li;
}, },
async getOverview() { async getOverview() {
let res = await api.Overview({ district_name: "" }); let res = await api.Overview({ district_name: "" });
console.log(res);
if (res.success) { if (res.success) {
} else { } else {
this.nums = res; this.nums = res;
......
...@@ -69,22 +69,22 @@ export default { ...@@ -69,22 +69,22 @@ export default {
project_source: "", project_source: "",
industry_name: "", industry_name: "",
list: [ list: [
{ // {
index: 0, // index: 0,
project_name: "生活用纸1", // project_name: "生活用纸1",
industry: "生活用纸", // industry: "生活用纸",
investor_district: "北京", // investor_district: "北京",
investment_volume: "88", // investment_volume: "88",
project_type: "生活用纸", // project_type: "生活用纸",
}, // },
{ // {
index: 1, // index: 1,
project_name: "生活用纸2", // project_name: "生活用纸2",
industry: "生活用纸", // industry: "生活用纸",
investor_district: "南京", // investor_district: "南京",
investment_volume: "18", // investment_volume: "18",
project_type: "生活用纸", // project_type: "生活用纸",
}, // },
], ],
id_list: [], id_list: [],
page: 1, page: 1,
...@@ -138,11 +138,11 @@ export default { ...@@ -138,11 +138,11 @@ export default {
industry_name: "", industry_name: "",
project_source: this.project_source, project_source: this.project_source,
}); });
// this.chartPie.setOption({ this.chartPie.setOption({
// series: { series: {
// data: res, data: res,
// }, },
// }); });
}, },
async getList() { async getList() {
let res = await api.ArealProject({ let res = await api.ArealProject({
...@@ -159,17 +159,17 @@ export default { ...@@ -159,17 +159,17 @@ export default {
console.log(res); console.log(res);
if (res.success == 0) { if (res.success == 0) {
this.id_list = []; this.id_list = [];
// this.data_time = ""; this.data_time = "";
// this.list = []; this.list = [];
this.total = 0; this.total = 0;
} else { } else {
// this.list = res.data.map((item, index) => { this.list = res.data.map((item, index) => {
// item.index = index + 1; item.index = index + 1;
// return item; return item;
// }); });
// this.id_list = res.id_list; this.id_list = res.id_list;
// this.data_time = res.data_time; this.data_time = res.data_time;
// this.total = res.size; this.total = res.size;
} }
}, },
goProjectInfo(item) { goProjectInfo(item) {
......
...@@ -68,22 +68,22 @@ export default { ...@@ -68,22 +68,22 @@ export default {
data_time: "2023-11-10", data_time: "2023-11-10",
chartBar: null, chartBar: null,
list: [ list: [
{ // {
index: 0, // index: 0,
project_name: "生活用纸1", // project_name: "生活用纸1",
industry: "生活用纸", // industry: "生活用纸",
investor_district: "北京", // investor_district: "北京",
investment_volume: "88", // investment_volume: "88",
project_type: "生活用纸", // project_type: "生活用纸",
}, // },
{ // {
index: 1, // index: 1,
project_name: "生活用纸2", // project_name: "生活用纸2",
industry: "生活用纸", // industry: "生活用纸",
investor_district: "南京", // investor_district: "南京",
investment_volume: "18", // investment_volume: "18",
project_type: "生活用纸", // project_type: "生活用纸",
}, // },
], ],
id_list: [], id_list: [],
page: 1, page: 1,
...@@ -146,11 +146,11 @@ export default { ...@@ -146,11 +146,11 @@ export default {
industry_name: "", industry_name: "",
project_source: "", project_source: "",
}); });
// this.chartBar.setOption({ this.chartBar.setOption({
// series: { series: {
// data: res, data: res,
// }, },
// }); });
}, },
async getList() { async getList() {
let res = await api.ArealProject({ let res = await api.ArealProject({
...@@ -166,16 +166,16 @@ export default { ...@@ -166,16 +166,16 @@ export default {
}); });
if (res.success == 0) { if (res.success == 0) {
this.id_list = []; this.id_list = [];
// this.data_time = ""; this.data_time = "";
// this.list = []; this.list = [];
this.total = 0; this.total = 0;
} else { } else {
// this.list = res.data.map((item, index) => { this.list = res.data.map((item, index) => {
// item.index = index + 1; item.index = index + 1;
// return item; return item;
// }); });
this.id_list = res.id_list; this.id_list = res.id_list;
// this.data_time = res.data_time; this.data_time = res.data_time;
this.total = res.size; this.total = res.size;
} }
}, },
......
...@@ -67,22 +67,22 @@ export default { ...@@ -67,22 +67,22 @@ export default {
data_time: "2023-11-10", data_time: "2023-11-10",
chartPie: null, chartPie: null,
list: [ list: [
{ // {
index: 0, // index: 0,
project_name: "生活用纸1", // project_name: "生活用纸1",
industry: "生活用纸", // industry: "生活用纸",
investor_district: "北京", // investor_district: "北京",
investment_volume: "88", // investment_volume: "88",
project_type: "生活用纸", // project_type: "生活用纸",
}, // },
{ // {
index: 1, // index: 1,
project_name: "生活用纸2", // project_name: "生活用纸2",
industry: "生活用纸", // industry: "生活用纸",
investor_district: "南京", // investor_district: "南京",
investment_volume: "18", // investment_volume: "18",
project_type: "生活用纸", // project_type: "生活用纸",
}, // },
], ],
id_list: [], id_list: [],
page: 1, page: 1,
...@@ -143,11 +143,11 @@ export default { ...@@ -143,11 +143,11 @@ export default {
industry_name: "", industry_name: "",
project_source: "", project_source: "",
}); });
// this.chartPie.setOption({ this.chartPie.setOption({
// series: { series: {
// data: res, data: res,
// }, },
// }); });
}, },
async getList() { async getList() {
let res = await api.ArealProject({ let res = await api.ArealProject({
...@@ -161,20 +161,19 @@ export default { ...@@ -161,20 +161,19 @@ export default {
page: this.page, page: this.page,
per_page: this.per_page, per_page: this.per_page,
}); });
console.log(res);
if (res.success == 0) { if (res.success == 0) {
this.id_list = []; this.id_list = [];
// this.data_time = ""; this.data_time = "";
// this.list = []; this.list = [];
this.total = 0; this.total = 0;
} else { } else {
// this.list = res.data.map((item, index) => { this.list = res.data.map((item, index) => {
// item.index = index + 1; item.index = index + 1;
// return item; return item;
// }); });
this.id_list = res.id_list; this.id_list = res.id_list;
// this.data_time = res.data_time; this.data_time = res.data_time;
this.total = res.size; this.total = res.size;
} }
}, },
......
...@@ -69,22 +69,22 @@ export default { ...@@ -69,22 +69,22 @@ export default {
chartPie: null, chartPie: null,
chartBar: null, chartBar: null,
list: [ list: [
{ // {
index: 0, // index: 0,
project_name: "生活用纸1", // project_name: "生活用纸1",
industry: "生活用纸", // industry: "生活用纸",
investor_district: "北京", // investor_district: "北京",
investment_volume: "88", // investment_volume: "88",
project_type: "生活用纸", // project_type: "生活用纸",
}, // },
{ // {
index: 1, // index: 1,
project_name: "生活用纸2", // project_name: "生活用纸2",
industry: "生活用纸", // industry: "生活用纸",
investor_district: "南京", // investor_district: "南京",
investment_volume: "18", // investment_volume: "18",
project_type: "生活用纸", // project_type: "生活用纸",
}, // },
], ],
id_list: [], id_list: [],
flag: 4, flag: 4,
...@@ -99,20 +99,20 @@ export default { ...@@ -99,20 +99,20 @@ export default {
watch: { watch: {
district(newV, oldV) { district(newV, oldV) {
console.log(newV); console.log(newV);
// this.getData(); this.getData();
// this.getList(); this.getList();
}, },
time1(newV, oldV) { time1(newV, oldV) {
console.log(newV); console.log(newV);
if (newV && this.time2 != "") { if (newV && this.time2 != "") {
// this.getData(); this.getData();
// this.getList(); this.getList();
} }
}, },
time2(newV, oldV) { time2(newV, oldV) {
if (newV && this.time1 != "") { if (newV && this.time1 != "") {
// this.getData(); this.getData();
// this.getList(); this.getList();
} }
}, },
}, },
...@@ -120,8 +120,8 @@ export default { ...@@ -120,8 +120,8 @@ export default {
console.log(this.cycle); console.log(this.cycle);
this.$nextTick(() => { this.$nextTick(() => {
this.initChartBar(); this.initChartBar();
// this.getData(); this.getData();
// this.getList(); this.getList();
}); });
}, },
methods: { methods: {
...@@ -145,7 +145,6 @@ export default { ...@@ -145,7 +145,6 @@ export default {
industry_name: this.industry_name, industry_name: this.industry_name,
project_source: "", project_source: "",
}); });
console.log(res);
if (this.flag == 4) { if (this.flag == 4) {
let yAxis = res.map((item) => { let yAxis = res.map((item) => {
return item.name; return item.name;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-tab-pane label="对接库" name="onLine"> </el-tab-pane> <el-tab-pane label="对接库" name="onLine"> </el-tab-pane>
<el-tab-pane label="签约库" name="contract"></el-tab-pane> <el-tab-pane label="签约库" name="contract"></el-tab-pane>
<el-tab-pane label="开工库" name="suspend"></el-tab-pane> <el-tab-pane label="开工库" name="suspend"></el-tab-pane>
<div > <div>
<ul class="option"> <ul class="option">
<li> <li>
<label for="" class="five">项目名称 :</label> <label for="" class="five">项目名称 :</label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment