Commit 7f05541f by heshihao

feat: 假数据修改后端返回

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