|
@@ -34,7 +34,7 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <div class="one bck">
|
|
|
+ <div class="one bck" v-loading="loading">
|
|
|
<TitleInfo :content="titleList[0]"></TitleInfo>
|
|
|
<div class="statistics">
|
|
|
<div class="item">
|
|
@@ -97,7 +97,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="two bck">
|
|
|
+ <div class="two bck" v-loading="loadingOne">
|
|
|
<TitleInfo :content="titleList[1]"></TitleInfo>
|
|
|
<div class="statistics">
|
|
|
<div class="item">
|
|
@@ -157,7 +157,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="three bck">
|
|
|
+ <div class="three bck" v-loading="loadingTwo">
|
|
|
<TitleInfo :content="titleList[2]"></TitleInfo>
|
|
|
<div ref="echartDom" style="min-height: 400px"></div>
|
|
|
</div>
|
|
@@ -171,6 +171,8 @@ import TitleInfo from "@/components/TitleInfo/index.vue";
|
|
|
const titleList = ["客户来源统计", "类型统计", "趋势分析"];
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const loading = ref(false);
|
|
|
+const loadingOne = ref(false);
|
|
|
+const loadingTwo = ref(false);
|
|
|
const queryForm = reactive({
|
|
|
countryId: "",
|
|
|
beginTime: "",
|
|
@@ -310,11 +312,20 @@ const option = reactive({
|
|
|
},
|
|
|
});
|
|
|
const getData = () => {
|
|
|
+ loading.value = true;
|
|
|
+ loadingOne.value = true;
|
|
|
+ loadingTwo.value = true;
|
|
|
proxy.post("/saleQuotation/sourceStatistics", queryForm).then((res) => {
|
|
|
allData.sourceData = res;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
});
|
|
|
proxy.post("/saleQuotation/typeStatistics", queryForm).then((res) => {
|
|
|
allData.typeData = res;
|
|
|
+ setTimeout(() => {
|
|
|
+ loadingOne.value = false;
|
|
|
+ }, 200);
|
|
|
});
|
|
|
proxy.post("/saleQuotation/trendAnalysis", queryForm).then((res) => {
|
|
|
let listOne = res.contractStatisticsList.map((x) => x.count);
|
|
@@ -328,6 +339,9 @@ const getData = () => {
|
|
|
option.data.series[2].data = listOne;
|
|
|
option.data.series[3].data = listThree;
|
|
|
myChart.setOption(option.data);
|
|
|
+ setTimeout(() => {
|
|
|
+ loadingTwo.value = false;
|
|
|
+ }, 200);
|
|
|
});
|
|
|
};
|
|
|
const onQuery = () => {
|