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

去除硬编码

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