Commit 7f05541f by heshihao

feat: 假数据修改后端返回

parent aa769808
......@@ -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