|
@@ -14,7 +14,7 @@
|
|
|
style="height: 68px"
|
|
|
v-if="JSON.stringify(items) == '{}'"
|
|
|
></div>
|
|
|
- <statistic :col="10" class="statistic" :cols="0">
|
|
|
+ <statistic :col="5" class="statistic" :cols="12">
|
|
|
<statistic-item
|
|
|
v-for="(item, key) in items"
|
|
|
:key="key"
|
|
@@ -38,6 +38,32 @@
|
|
|
<!-- 12345678901.23 -->
|
|
|
<span> <count-to :endVal="item.percent" :decimals="2" /></span>
|
|
|
</statistic-item>
|
|
|
+ <statistic-item></statistic-item>
|
|
|
+ </statistic>
|
|
|
+ <statistic :col="5" class="statistic" :cols="0">
|
|
|
+ <statistic-item
|
|
|
+ v-for="(item, key) in items2"
|
|
|
+ :key="key"
|
|
|
+ :class="{ active: active === key }"
|
|
|
+ @click="active = key"
|
|
|
+ >
|
|
|
+ <span>
|
|
|
+ {{ item.title + "(元)" }}
|
|
|
+ <el-tooltip
|
|
|
+ v-if="item.desc"
|
|
|
+ :content="item.desc"
|
|
|
+ :open-delay="0.3"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ style="margin-left: 5px; cursor: pointer"
|
|
|
+ class="el-icon-warning-outline"
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ <!-- 12345678901.23 -->
|
|
|
+ <span> <count-to :endVal="item.percent" :decimals="2" /></span>
|
|
|
+ </statistic-item>
|
|
|
</statistic>
|
|
|
<!-- 按月/按天 -->
|
|
|
|
|
@@ -49,12 +75,11 @@
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
<!-- v-if="timer == 'day'" :settings="chartSettings" DD-->
|
|
|
- <ve-histogram
|
|
|
+ <ve-line
|
|
|
:data="timer == 'day' ? chartData : chartDataForMoth"
|
|
|
height="350px"
|
|
|
:data-empty="dataEmpty"
|
|
|
:extend="chartExtend"
|
|
|
-
|
|
|
:legend="legend"
|
|
|
/>
|
|
|
<!-- <ve-line
|
|
@@ -104,6 +129,17 @@ export default {
|
|
|
"FINANCE_AMOUNT",
|
|
|
"FINANCE_BALANCE_AMOUNT",
|
|
|
"FINANCE_PAY",
|
|
|
+ ];
|
|
|
+ arr.forEach((str) => {
|
|
|
+ if (this.data[str]) {
|
|
|
+ obj[str] = this.data[str];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return obj;
|
|
|
+ },
|
|
|
+ items2() {
|
|
|
+ let obj = {};
|
|
|
+ let arr = [
|
|
|
"APPLY_AMOUNT",
|
|
|
"PRACTICE_AMOUNT",
|
|
|
"OTHER_AMOUNT",
|
|
@@ -115,16 +151,7 @@ export default {
|
|
|
obj[str] = this.data[str];
|
|
|
}
|
|
|
});
|
|
|
- /**
|
|
|
- * {
|
|
|
- TOTAL_AMOUNT: this.data["TOTAL_AMOUNT"] || {},
|
|
|
- FINANCE_AMOUNT: this.data["FINANCE_AMOUNT"] || {},
|
|
|
- FINANCE_BALANCE_AMOUNT: this.data["FINANCE_BALANCE_AMOUNT"] || {},
|
|
|
- FINANCE_PAY: this.data["FINANCE_PAY"] || {},
|
|
|
- };
|
|
|
- */
|
|
|
return obj;
|
|
|
- //
|
|
|
},
|
|
|
chartExtend() {
|
|
|
return {
|
|
@@ -142,17 +169,7 @@ export default {
|
|
|
formatter: "{value}元",
|
|
|
},
|
|
|
},
|
|
|
- /** return [
|
|
|
- item[0].axisValueLabel,
|
|
|
- `<br/><span style="margin-right:5px;border-radius:10px;width:10px;height:10px;display:inline-block;"></span>总收入:${this.$helpers
|
|
|
- .numeral(item[0].value + item[1].value)
|
|
|
- .format("0,0.00")}元`,
|
|
|
- ...item.map((d) => {
|
|
|
- return `<br/>${d.marker}${d.seriesName}: ${this.$helpers
|
|
|
- .numeral(d.value)
|
|
|
- .format("0,0.00")}元`;
|
|
|
- }),
|
|
|
- ].join(""); */
|
|
|
+
|
|
|
tooltip: {
|
|
|
axisPointer: {
|
|
|
type: "shadow",
|
|
@@ -160,6 +177,16 @@ export default {
|
|
|
color: "rgba(150,150,150,0.2)",
|
|
|
},
|
|
|
},
|
|
|
+
|
|
|
+ formatter: (item) => {
|
|
|
+ return [
|
|
|
+ item[0].axisValueLabel,
|
|
|
+ ...item.map(
|
|
|
+ (d) =>
|
|
|
+ `<br/>${d.marker}${d.seriesName}: ${d.value[1]} 元`
|
|
|
+ ),
|
|
|
+ ].join("");
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -174,7 +201,7 @@ export default {
|
|
|
];
|
|
|
},
|
|
|
chartData() {
|
|
|
- const values = Object.values(this.items);
|
|
|
+ const values = Object.values({...this.items,...this.items2});
|
|
|
const months = {};
|
|
|
for (const item of values) {
|
|
|
for (const row of item.indexMonthData || []) {
|
|
@@ -206,7 +233,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
chartDataForMoth() {
|
|
|
- const values = Object.values(this.items);
|
|
|
+ const values = Object.values({...this.items,...this.items2});
|
|
|
const months = {};
|
|
|
for (const item of values) {
|
|
|
for (const row of item.indexMonthData || []) {
|
|
@@ -227,7 +254,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
- columns: ["月份", "总收入",
|
|
|
+ columns: [
|
|
|
+ "月份",
|
|
|
+ "总收入",
|
|
|
"现金收入",
|
|
|
"余额收入",
|
|
|
"财务支出",
|
|
@@ -235,7 +264,8 @@ export default {
|
|
|
"网管课收入",
|
|
|
"其他收入",
|
|
|
"乐团续费收入",
|
|
|
- "VIP课收入",],
|
|
|
+ "VIP课收入",
|
|
|
+ ],
|
|
|
rows: Object.values(months),
|
|
|
loading: true,
|
|
|
};
|