1
lzhe
2024-06-19 fdb97cca1f302db3fe07cc700130a085d991d682
src/views/mdc/time-analysis.vue
@@ -2,7 +2,7 @@
 * @Author: lzhe lzhe@example.com
 * @Date: 2024-04-26 09:36:18
 * @LastEditors: lzhe lzhe@example.com
 * @LastEditTime: 2024-06-05 14:06:08
 * @LastEditTime: 2024-06-19 22:40:07
 * @FilePath: /smart-web/src/views/mdc/status-record.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -91,7 +91,7 @@
                                    </div>
                                </div>
                                <!-- 按时间周期统计charts -->
                                <div id="analysisA" v-if="setTitle.length != 0">
                                <div id="analysisB" v-if="setTitle.length != 0">
                                    <div class="demo-collapse">
                                        <el-collapse v-model="activeNames1" accordion>
                                            <el-collapse-item v-for="(item,index) in setTitle1" :name="index + 1">
@@ -199,7 +199,6 @@
                        params.forEach(item=> {
                            dom += `<div>${item.marker}${item.seriesName}:${item.data}%</div>`
                        })
                        console.log(params)
                        return dom;
                    }
                },
@@ -218,6 +217,9 @@
                    show: true,
                    axisLabel: {
                        formatter: function (value) {
                            if(value <= 1) {
                                value = value * 100;
                            }
                            return value + "%";
                        }
                    },
@@ -254,7 +256,10 @@
                    show: true,
                    axisLabel: {
                        formatter: function (value) {
                            return value * 100 + "%";
                            if(value <= 1) {
                                value = value * 100;
                            }
                            return value + "%";
                        }
                    },
                    data: [2,20,40,60,80,100]
@@ -290,7 +295,11 @@
                    show: true,
                    axisLabel: {
                        formatter: function (value) {
                            return value * 100 + "%";
                            if(value <= 1) {
                                value = value * 100;
                            }
                            console.log(value)
                            return value + "%";
                        }
                    },
                    data: [2,20,40,60,80,100]
@@ -326,7 +335,10 @@
                    show: true,
                    axisLabel: {
                        formatter: function (value) {
                            return value * 100 + "%";
                            if(value <= 1) {
                                value = value * 100;
                            }
                            return value + "%";
                        }
                    },
                    data: [2,20,40,60,80,100]
@@ -481,7 +493,6 @@
                    this.chartOptionA.series = this.formatChartData(res.data.countStatus);
                    var myChart = echarts.init(recordDom);
                    myChart.setOption(this.chartOptionA);
                    console.log(JSON.stringify(this.chartOptionA))
                }
            })
        },
@@ -550,10 +561,11 @@
        tabChange(val) {
            this.activeName = val;
            if(val == "time") {  //按时间周期统计
                var len = this.btnList.length;
                if(this.setTitle.length != 0) {
                    var obj = {
                        endDate: this.btnList[0].id,
                        startDate: this.btnList[0].id,
                        startDate: this.btnList[len-1].id,
                        statisticalMethod: "WEEK"
                    }
                    this.$HTTP.post(`/api/blade-mdc/efficiency-analysis/interval`,obj).then(res=> {
@@ -587,6 +599,7 @@
                                indexName : firstDayOfJuly + "至" + lastDayOfJuly
                            });
                            this.setTitle1 = arr;
                            this.date = this.btnList[0].id;
                            this.$nextTick(()=> {
                                this.getDataChartsB("DAY");
                                this.getDataChartsB("MONTH");
@@ -655,7 +668,6 @@
            this.date = this.time[1];
        },
        query() {
            console.log(this.activeName)
            this.getTime({endDate: this.time[1],startDate: this.time[0],statisticalMethod: 'SHIFT'});
            this.date = this.time[1];
            this.ids = [];