更新
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:54
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-09-05 14:52:33
|
||||
* @LastEditTime: 2023-09-27 10:50:43
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -14,11 +14,13 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23">
|
||||
<pieChart
|
||||
title="饼状图分析"
|
||||
title="饼状图分析"
|
||||
ref="pieChart"
|
||||
height="500px"
|
||||
:total-number="tableData.totalNumber"
|
||||
v-if="tableData.totalNumber"
|
||||
:total-number="tableData.totalNumber"
|
||||
:pie-data="tableData.list" />
|
||||
<el-empty v-else></el-empty>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -37,7 +39,7 @@ export default {
|
||||
getDataListURL: getPieChart,
|
||||
},
|
||||
listQuery: {
|
||||
warehouseId: '',
|
||||
warehouseId: '1696803324030865409',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
},
|
||||
@@ -65,17 +67,18 @@ export default {
|
||||
components: {
|
||||
pieChart,
|
||||
},
|
||||
created() {
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
if (this.listQuery.startTime) {
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.tableData = response.data;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.pieChart.initChart();
|
||||
});
|
||||
if (response.data) {
|
||||
this.tableData = response.data;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.pieChart.initChart();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -83,6 +86,7 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
if (val.searchTime) {
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.getDataList();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:54
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-09-06 14:44:21
|
||||
* @LastEditTime: 2023-09-27 10:50:39
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -14,11 +14,13 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="23">
|
||||
<pieChart
|
||||
title="饼状图分析"
|
||||
title="饼状图分析"
|
||||
ref="pieChart"
|
||||
height="500px"
|
||||
:total-number="tableData.totalNumber"
|
||||
v-if="tableData.totalNumber"
|
||||
:total-number="tableData.totalNumber"
|
||||
:pie-data="tableData.list" />
|
||||
<el-empty v-else></el-empty>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -37,7 +39,7 @@ export default {
|
||||
getDataListURL: getPieChart,
|
||||
},
|
||||
listQuery: {
|
||||
warehouseId: '',
|
||||
warehouseId: '1698950657556340737',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
},
|
||||
@@ -73,10 +75,12 @@ export default {
|
||||
getDataList() {
|
||||
if (this.listQuery.startTime) {
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.tableData = response.data;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.pieChart.initChart();
|
||||
});
|
||||
if (response.data) {
|
||||
this.tableData = response.data;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.pieChart.initChart();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -84,6 +88,7 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
if (val.searchTime) {
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.getDataList();
|
||||
|
||||
Reference in New Issue
Block a user