Commit e02e6d8f authored by 潘自豪's avatar 潘自豪

去除硬编码

parent 27427318
......@@ -26,7 +26,7 @@ export default {
components: {WinnersList, DisplayBoard},
data() {
return {
today: '2022-06-26',
today: moment().format("yyyy-MM-DD"),
lostCustomerTitle: "流失客户(较去年)",
lostCustomer: [],
addCustomerTitle: "新增客户(较去年)",
......
......@@ -55,13 +55,14 @@ import LineBarChart from "../components/chart/line-bar-chart.vue";
import {getHeadData} from "./js/orderProportionHeadData";
import {conver_amont} from "../../utils/numUtil";
import {getDetailData} from "./js/orderProportionDetailData";
import moment from "moment";
export default {
name:"OrderProportion",
components: {LineBarChart, WinnersList, DisplayBoard, ContrastCard, TableColumn, TitleContentMark},
data() {
return {
today: "2022-06-26",
today: moment().format("yyyy-MM-DD"),
currentHeadData:[],
currentDetailData:[],
chart: null,
......
......@@ -36,13 +36,13 @@ import ContrastCard from "../components/card/contrast-card.vue";
import * as echarts from "echarts";
import {getTrunOver} from "./turnoverDetail"
import {conver_amont} from "../../utils/numUtil";
import moment from 'moment'
export default {
name: "TurnoverDetail",
components: {ContrastCard, TableColumn, TitleContentMark},
data() {
return {
today: '2022-06-26',
today: moment().format("yyyy-MM-DD"),
curPageCode: this.$route.query.code ? this.$route.query.code : "yye",
currentData: {},
mockDataDay: {
......
......@@ -47,7 +47,7 @@
</div>
<div class="middle">
<display-board class="trade_left" title="已开票未收款">
<winners-list style="height: 96%" @click.native="goArBar" id="ar_company_list" :rows="arCompanyList"/>
<winners-list style="height: 96%;overflow: auto;" @click.native="goArBar" id="ar_company_list" :rows="arCompanyList"/>
</display-board>
<div class="trade_middle" style="border: none;box-shadow: none;">
<div style="display: flex; justify-content: space-between; height: 50%;">
......@@ -165,7 +165,7 @@ import {
} from "../api/apiList"
import {calc_hb_str, calc_tb_str, conver_amont, conver_num_retain} from "../utils/numUtil";
import {getTransportTypeOrderFinishPie, getCustomerOrderFinishPie} from "./databoard/js/indexPieData";
import moment from 'moment'
export default {
components: {
RingPieChart,
......@@ -180,8 +180,7 @@ export default {
},
data() {
return {
today: '2022-06-26',
// today: moment().format("yyyy-MM-DD"),
today: moment().format("yyyy-MM-DD"),
yyqk: {
yye: {
title: "营业额",
......@@ -500,8 +499,6 @@ export default {
}
},
methods: {
log() {
},
cellStyleFunction(data) {
let res = {color: '#33ff66'};
if (data.indexOf('-') !== -1) {
......@@ -577,6 +574,11 @@ export default {
refreshData() {
getTransportTypeOrderFinishPie(res => this.transportTypeOrderFinishPie = res, this.today);
getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res, this.today);
this.showBusinessConditionDatas();
this.getArSummaryBar();
this.getArCompanyList();
this.getLoseAndAdd();
this.getOrderBusinessCondition();
},
pieDataValueFormatter(param) {
return conver_amont(param) + "万元";
......@@ -606,14 +608,6 @@ export default {
}
},
mounted() {
this.showBusinessConditionDatas();
setTimeout(() => {
window.addEventListener('resize', this.resizeChart);
}, 500)
this.getArSummaryBar();
this.getArCompanyList();
this.getLoseAndAdd();
this.getOrderBusinessCondition();
this.refreshData();
},
beforeDestroy() {
......@@ -621,6 +615,7 @@ export default {
},
watch:{
countDown(n,o){
console.log(n)
if (n === 1){
this.refreshData();
}
......
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