|
@@ -9,7 +9,7 @@
|
|
|
@changeValue="changeValue"
|
|
|
/>
|
|
|
</div>
|
|
|
- <statistic :col="4" class="statistic" :cols="12">
|
|
|
+ <statistic :col="6" class="statistic" :cols="12">
|
|
|
<statistic-item>
|
|
|
<span>
|
|
|
现金总收入: (元)
|
|
@@ -62,6 +62,32 @@
|
|
|
/>
|
|
|
</span>
|
|
|
</statistic-item>
|
|
|
+ <statistic-item>
|
|
|
+ <span>
|
|
|
+ 课堂乐器现金收入: (元)
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ <count-to
|
|
|
+ :endVal="ktyqTotal"
|
|
|
+ :duration="300"
|
|
|
+ :decimals="2"
|
|
|
+ :class="'des'"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </statistic-item>
|
|
|
+ <statistic-item>
|
|
|
+ <span>
|
|
|
+ 酷乐秀机构版现金收入: (元)
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ <count-to
|
|
|
+ :endVal="colexiuTenantTotal"
|
|
|
+ :duration="300"
|
|
|
+ :decimals="2"
|
|
|
+ :class="'des'"
|
|
|
+ />
|
|
|
+ </span>
|
|
|
+ </statistic-item>
|
|
|
</statistic>
|
|
|
<div></div>
|
|
|
|
|
@@ -84,7 +110,7 @@
|
|
|
v-model="organId"
|
|
|
@change="
|
|
|
() => {
|
|
|
- this.isChangeOrgan = true
|
|
|
+ this.isChangeOrgan = true;
|
|
|
this.getData();
|
|
|
}
|
|
|
"
|
|
@@ -111,11 +137,26 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="colexiu-echarts"></div>
|
|
|
+
|
|
|
+ <!-- <div class="eachartTitle">
|
|
|
+ <div>
|
|
|
+ 课堂乐器现金收入:
|
|
|
+ <count-to
|
|
|
+ :endVal="ktyqTotal"
|
|
|
+ :duration="300"
|
|
|
+ :decimals="2"
|
|
|
+ class="des"
|
|
|
+ />
|
|
|
+ 元
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="ktyq-echarts"></div>
|
|
|
+
|
|
|
<div class="eachartTitle">
|
|
|
<div>
|
|
|
- 管乐团现金收入:
|
|
|
+ 酷乐秀机构版现金收入:
|
|
|
<count-to
|
|
|
- :endVal="gytTotal"
|
|
|
+ :endVal="colexiuTenantTotal"
|
|
|
:duration="300"
|
|
|
:decimals="2"
|
|
|
class="des"
|
|
@@ -123,7 +164,7 @@
|
|
|
元
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="gyt-echarts"></div>
|
|
|
+ <div class="colexiu-tenant-echarts"></div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -144,7 +185,7 @@ export default {
|
|
|
return {
|
|
|
organId: "",
|
|
|
mdate: [],
|
|
|
- endDate: '',
|
|
|
+ endDate: "",
|
|
|
gymECharts: null,
|
|
|
gymData: [],
|
|
|
gymTotal: 0,
|
|
@@ -154,7 +195,13 @@ export default {
|
|
|
colexiuEcharts: null,
|
|
|
colexiuData: [],
|
|
|
colexiuTotal: 0,
|
|
|
- isChangeOrgan: false,
|
|
|
+ ktyqEcharts: null,
|
|
|
+ ktyqData: [],
|
|
|
+ ktyqTotal: 0,
|
|
|
+ colexiuTenantEcharts: null,
|
|
|
+ colexiuTenantData: [],
|
|
|
+ colexiuTenantTotal: 0,
|
|
|
+ isChangeOrgan: false
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -188,10 +235,10 @@ export default {
|
|
|
this.gymData = gym.incomeByDates;
|
|
|
}
|
|
|
// 切换分部只更新管乐迷数据
|
|
|
- if (this.isChangeOrgan){
|
|
|
- this.isChangeOrgan = false
|
|
|
+ if (this.isChangeOrgan) {
|
|
|
+ this.isChangeOrgan = false;
|
|
|
this.createGym();
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
const gyt = res.data.find(item => item.platform == "gyt");
|
|
|
if (gyt) {
|
|
@@ -203,7 +250,19 @@ export default {
|
|
|
this.colexiuTotal = clx.totalAmount;
|
|
|
this.colexiuData = clx.incomeByDates;
|
|
|
}
|
|
|
- this.init();
|
|
|
+ const ktyq = res.data.find(item => item.platform == "kt");
|
|
|
+ if (ktyq) {
|
|
|
+ this.ktyqTotal = ktyq.totalAmount;
|
|
|
+ this.ktyqData = ktyq.incomeByDates;
|
|
|
+ }
|
|
|
+ const clxt = res.data.find(item => item.platform == "clsOrg");
|
|
|
+ if (clxt) {
|
|
|
+ this.colexiuTenantTotal = clxt.totalAmount;
|
|
|
+ this.colexiuTenantData = clxt.incomeByDates;
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.init();
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -216,11 +275,15 @@ export default {
|
|
|
this.gymECharts.resize();
|
|
|
this.gytEcharts.resize();
|
|
|
this.colexiuEcharts.resize();
|
|
|
+ this.ktyqEcharts.resize();
|
|
|
+ this.colexiuTenantEcharts.resize();
|
|
|
},
|
|
|
init() {
|
|
|
this.createGym();
|
|
|
this.createGyt();
|
|
|
- this.createColexiu();
|
|
|
+ // this.createColexiu();
|
|
|
+ // this.createColexiuTenant();
|
|
|
+ // this.createKtyq();
|
|
|
},
|
|
|
createGym() {
|
|
|
if (this.gymECharts) {
|
|
@@ -240,7 +303,9 @@ export default {
|
|
|
trigger: "axis",
|
|
|
formatter: function(data) {
|
|
|
const item = data[0];
|
|
|
- return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(2)}元`;
|
|
|
+ return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(
|
|
|
+ 2
|
|
|
+ )}元`;
|
|
|
}
|
|
|
},
|
|
|
grid: {
|
|
@@ -277,6 +342,7 @@ export default {
|
|
|
if (this.gytEcharts) {
|
|
|
this.gytEcharts.dispose();
|
|
|
}
|
|
|
+ console.log(document.querySelector(".gyt-echarts"), "document");
|
|
|
this.gytEcharts = echarts.init(document.querySelector(".gyt-echarts"));
|
|
|
const option = {
|
|
|
grid: {
|
|
@@ -290,7 +356,9 @@ export default {
|
|
|
trigger: "axis",
|
|
|
formatter: function(data) {
|
|
|
const item = data[0];
|
|
|
- return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(2)}元`;
|
|
|
+ return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(
|
|
|
+ 2
|
|
|
+ )}元`;
|
|
|
}
|
|
|
},
|
|
|
xAxis: {
|
|
@@ -320,6 +388,7 @@ export default {
|
|
|
if (this.colexiuEcharts) {
|
|
|
this.colexiuEcharts.dispose();
|
|
|
}
|
|
|
+ console.log(document.querySelector(".colexiu-echarts"), "document");
|
|
|
this.colexiuEcharts = echarts.init(
|
|
|
document.querySelector(".colexiu-echarts")
|
|
|
);
|
|
@@ -335,7 +404,9 @@ export default {
|
|
|
trigger: "axis",
|
|
|
formatter: function(data) {
|
|
|
const item = data[0];
|
|
|
- return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(2)}元`;
|
|
|
+ return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(
|
|
|
+ 2
|
|
|
+ )}元`;
|
|
|
}
|
|
|
},
|
|
|
xAxis: {
|
|
@@ -360,6 +431,103 @@ export default {
|
|
|
]
|
|
|
};
|
|
|
option && this.colexiuEcharts.setOption(option);
|
|
|
+ },
|
|
|
+ createColexiuTenant() {
|
|
|
+ if (this.colexiuTenantEcharts) {
|
|
|
+ this.colexiuTenantEcharts.dispose();
|
|
|
+ }
|
|
|
+ console.log(
|
|
|
+ document.querySelector(".colexiu-tenant-echarts"),
|
|
|
+ "document"
|
|
|
+ );
|
|
|
+ this.colexiuTenantEcharts = echarts.init(
|
|
|
+ document.querySelector(".colexiu-tenant-echarts")
|
|
|
+ );
|
|
|
+ const option = {
|
|
|
+ grid: {
|
|
|
+ left: 5,
|
|
|
+ top: 30,
|
|
|
+ right: 5,
|
|
|
+ bottom: 5,
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "axis",
|
|
|
+ formatter: function(data) {
|
|
|
+ const item = data[0];
|
|
|
+ return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(
|
|
|
+ 2
|
|
|
+ )}元`;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: "category",
|
|
|
+ data: this.colexiuTenantData.map(item => item.date),
|
|
|
+ axisLabel: {
|
|
|
+ color: "#333",
|
|
|
+ fontSize: 10
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: "value",
|
|
|
+ axisLabel: { formatter: "{value}元" }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ data: this.colexiuTenantData.map(item => item.totalAmount),
|
|
|
+ type: "bar",
|
|
|
+ color: "#00a79d",
|
|
|
+ barMaxWidth: 40
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ option && this.colexiuTenantEcharts.setOption(option);
|
|
|
+ },
|
|
|
+ createKtyq() {
|
|
|
+ if (this.ktyqEcharts) {
|
|
|
+ this.ktyqEcharts.dispose();
|
|
|
+ }
|
|
|
+ console.log(document.querySelector(".ktyq-echarts"), "document");
|
|
|
+ this.ktyqEcharts = echarts.init(document.querySelector(".ktyq-echarts"));
|
|
|
+ const option = {
|
|
|
+ grid: {
|
|
|
+ left: 5,
|
|
|
+ top: 30,
|
|
|
+ right: 5,
|
|
|
+ bottom: 5,
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "axis",
|
|
|
+ formatter: function(data) {
|
|
|
+ const item = data[0];
|
|
|
+ return `${item.axisValue}<br /> ${item.marker} ${item.value.toFixed(
|
|
|
+ 2
|
|
|
+ )}元`;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: "category",
|
|
|
+ data: this.ktyqData.map(item => item.date),
|
|
|
+ axisLabel: {
|
|
|
+ color: "#333",
|
|
|
+ fontSize: 10
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: "value",
|
|
|
+ axisLabel: { formatter: "{value}元" }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ data: this.ktyqData.map(item => item.totalAmount),
|
|
|
+ type: "bar",
|
|
|
+ color: "#00a79d",
|
|
|
+ barMaxWidth: 40
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ option && this.ktyqEcharts.setOption(option);
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -392,7 +560,9 @@ export default {
|
|
|
// display: flex;
|
|
|
.gym-echarts,
|
|
|
.gyt-echarts,
|
|
|
- .colexiu-echarts {
|
|
|
+ .colexiu-echarts,
|
|
|
+ .ktyq-echarts,
|
|
|
+ .colexiu-tenant-echarts {
|
|
|
width: 100%;
|
|
|
height: 350px;
|
|
|
margin-bottom: 24px;
|