guoxiaohuan 5 years ago
parent
commit
f9fb629739

+ 12 - 4
src/views/evaluate/evStackedLine.vue

@@ -51,11 +51,8 @@ export default {
                     arr1.push(i.data)
                 })
                 let arr2 = [].concat(...arr1)
-                console.log(arr2)
                 this.dataY1Min = this.getMin(arr)
                 this.dataY1Max = this.getMax(arr)
-                console.log(this.dataY1Max)
-                console.log(this.dataY1Min)
                 let minG = parseInt(this.dataY1Min % 10),
                     minS = parseInt((this.dataY1Min % 100) / 10),
                     maxG = parseInt(this.dataY1Max % 10),
@@ -146,11 +143,22 @@ export default {
                     },
                     min: this.dataY1Min,
                     max: this.dataY1Max,
-                    interval: 0.5,
+
+                    // interval: 0.5,
                     splitLine: {
                         lineStyle: {
                             type: 'dotted'
                         }
+                    },
+                    minorTick: {
+                        show: true
+                    },
+
+                    minorSplitLine: {
+                        show: true,
+                        lineStyle: {
+                            color: '#ddd'
+                        }
                     }
                 },
                 series: this.series

+ 1 - 1
src/views/evaluate/evTwoLevelMenu.vue

@@ -27,7 +27,7 @@
                             <el-switch v-model='value2' @change='changeNum("1")'></el-switch>
                         </div>
                         <div class='count-bottom-content'>
-                            <ev-two-table v-if='dataList.length>0' :switch='value2' :dataList='dataList'></ev-two-table>
+                            <ev-two-table v-if='dataList.length>0' :switch='value2' :dataList='dataList' :value2='value2'></ev-two-table>
                         </div>
                         <div class='count-bottom-foot'>
                             <ev-stacked-line v-if='stackArr.length>0' :stackArr='stackArr'></ev-stacked-line>

+ 11 - 2
src/views/evaluate/evTwoTable.vue

@@ -62,7 +62,7 @@ export default {
             expands: []
         }
     },
-    props: ['dataList'],
+    props: ['dataList', 'value2'],
     computed: {},
     watch: {
         dataList(newVal, oldVal) {
@@ -74,6 +74,7 @@ export default {
     mounted() {
         this.initExpand()
         this.$nextTick(() => this.doSelect())
+        console.log(this.value2)
     },
     methods: {
         expandChange(row, expandedRows) {
@@ -84,8 +85,16 @@ export default {
         },
         initExpand() {
             this.dataList.forEach(i => {
-                if (i.children.some(c => c.isSatisfy == false)) this.expands.push(i.id)
+                if (this.value2) {
+                    if (i.children.some(c => c.isSatisfy == false)) {
+                        this.expands.push(i.id)
+                    }
+                } else {
+                    this.expands.push(i.id)
+                }
+                // if (i.children.some(c => c.isSatisfy == false)) this.expands.push(i.id)
             })
+            console.log('this.dataList', this.dataList)
         },
         doSelect() {
             this.dataList.forEach(i => {