xiaohuan 4 years ago
parent
commit
d214210c3f

+ 0 - 160
package-lock.json

@@ -1,160 +0,0 @@
-{
-  "name": "sagacloud-cwc-pages",
-  "version": "1.0.0",
-  "lockfileVersion": 1,
-  "requires": true,
-  "dependencies": {
-    "ajv": {
-      "version": "5.5.2",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/ajv/-/ajv-5.5.2.tgz",
-      "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
-      "dev": true,
-      "requires": {
-        "co": "4.6.0",
-        "fast-deep-equal": "1.1.0",
-        "fast-json-stable-stringify": "2.1.0",
-        "json-schema-traverse": "0.3.1"
-      }
-    },
-    "async": {
-      "version": "2.6.3",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/async/-/async-2.6.3.tgz",
-      "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
-      "dev": true,
-      "requires": {
-        "lodash": "4.17.15"
-      }
-    },
-    "big.js": {
-      "version": "5.2.2",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/big.js/-/big.js-5.2.2.tgz",
-      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
-      "dev": true
-    },
-    "co": {
-      "version": "4.6.0",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/co/-/co-4.6.0.tgz",
-      "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
-      "dev": true
-    },
-    "emojis-list": {
-      "version": "3.0.0",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/emojis-list/-/emojis-list-3.0.0.tgz",
-      "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
-      "dev": true
-    },
-    "extract-text-webpack-plugin": {
-      "version": "3.0.2",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz",
-      "integrity": "sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==",
-      "dev": true,
-      "requires": {
-        "async": "2.6.3",
-        "loader-utils": "1.4.0",
-        "schema-utils": "0.3.0",
-        "webpack-sources": "1.4.3"
-      }
-    },
-    "fast-deep-equal": {
-      "version": "1.1.0",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
-      "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
-      "dev": true
-    },
-    "fast-json-stable-stringify": {
-      "version": "2.1.0",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
-      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
-      "dev": true
-    },
-    "json-schema-traverse": {
-      "version": "0.3.1",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
-      "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
-      "dev": true
-    },
-    "json5": {
-      "version": "1.0.1",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/json5/-/json5-1.0.1.tgz",
-      "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
-      "dev": true,
-      "requires": {
-        "minimist": "1.2.5"
-      }
-    },
-    "loader-utils": {
-      "version": "1.4.0",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/loader-utils/-/loader-utils-1.4.0.tgz",
-      "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
-      "dev": true,
-      "requires": {
-        "big.js": "5.2.2",
-        "emojis-list": "3.0.0",
-        "json5": "1.0.1"
-      }
-    },
-    "lodash": {
-      "version": "4.17.15",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/lodash/-/lodash-4.17.15.tgz",
-      "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
-      "dev": true
-    },
-    "minimist": {
-      "version": "1.2.5",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/minimist/-/minimist-1.2.5.tgz",
-      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
-      "dev": true
-    },
-    "mkdirp": {
-      "version": "1.0.3",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/mkdirp/-/mkdirp-1.0.3.tgz",
-      "integrity": "sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g=="
-    },
-    "node-releases": {
-      "version": "1.1.52",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/node-releases/-/node-releases-1.1.52.tgz",
-      "integrity": "sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ==",
-      "requires": {
-        "semver": "6.3.0"
-      },
-      "dependencies": {
-        "semver": {
-          "version": "6.3.0",
-          "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/semver/-/semver-6.3.0.tgz",
-          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
-        }
-      }
-    },
-    "schema-utils": {
-      "version": "0.3.0",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/schema-utils/-/schema-utils-0.3.0.tgz",
-      "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
-      "dev": true,
-      "requires": {
-        "ajv": "5.5.2"
-      }
-    },
-    "source-list-map": {
-      "version": "2.0.1",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/source-list-map/-/source-list-map-2.0.1.tgz",
-      "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==",
-      "dev": true
-    },
-    "source-map": {
-      "version": "0.6.1",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/source-map/-/source-map-0.6.1.tgz",
-      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-      "dev": true
-    },
-    "webpack-sources": {
-      "version": "1.4.3",
-      "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/webpack-sources/-/webpack-sources-1.4.3.tgz",
-      "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==",
-      "dev": true,
-      "requires": {
-        "source-list-map": "2.0.1",
-        "source-map": "0.6.1"
-      }
-    }
-  }
-}

+ 22 - 5
src/App.vue

@@ -1,15 +1,32 @@
 <template>
-  <div id="app">
-    <router-view/>
-  </div>
+    <div id='app'>
+        <router-view v-if='isRouterAlive'></router-view>
+    </div>
 </template>
 
 <script>
 export default {
-  name: 'App'
+    name: 'App',
+    provide() {
+        return {
+            reload: this.reload
+        }
+    },
+    data() {
+        return {
+            isRouterAlive: true
+        }
+    },
+    methods: {
+        reload() {
+            this.isRouterAlive = false
+            this.$nextTick(function() {
+                this.isRouterAlive = true
+            })
+        }
+    }
 }
 </script>
 
 <style>
-
 </style>

+ 41 - 14
src/assets/css/global.css

@@ -1,29 +1,56 @@
-#app, body, html {
-    height: 100%;
-    margin: 0;
-    padding: 0;
-    border: 0;
-    font-style: normal
+#app,
+body,
+html {
+  height: 100%;
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-style: normal
 }
 
 a {
-    color: #000;
-    text-decoration: none
+  color: #000;
+  text-decoration: none
 }
 
-li, ol, ul {
-    list-style: none
+li,
+ol,
+ul {
+  list-style: none
 }
 
 .Micbold {
-    font-family: MicrosoftYaHeiSemibold
+  font-family: MicrosoftYaHeiSemibold
 }
+
 .MicrYaHei {
-    font-family: MicrosoftYaHei
+  font-family: MicrosoftYaHei
 }
+
 .ArialMT {
-    font-family: ArialMT
+  font-family: ArialMT
 }
+
 .PingFangSC {
-    font-family: PingFangSC-Regular
+  font-family: PingFangSC-Regular
+}
+
+.red {
+  color: #f54e45;
+}
+
+.green {
+  color: #34c724;
+}
+
+.red-bg {
+  background: #f54e45;
+}
+
+.green-bg {
+  background: #34c724;
+}
+
+.blue-bg {
+  background: #0091ff;
 }

+ 336 - 0
src/components/strategyLine.vue

@@ -0,0 +1,336 @@
+<template>
+    <div class='line-container'>
+        <div class='leftL'>
+            <div class='leftLengend'>
+                <i class='outIcon'></i> 室外温度
+                <i class='innerIcon'></i> 室内平均温度
+                <i class='innerMax'></i> 室内最高温度
+            </div>
+
+            <div style='width:100%;height:350px;margin-right:24px;'>
+                <div id='leftLine' style='width:100%;height:100%;'></div>
+            </div>
+        </div>
+        <div class='rightL'>
+            <div class='rightLengend'>
+                <i class='blue-bg'></i> 实际供冷量
+                <i class='preCool'></i>
+                预测冷量
+            </div>
+
+            <div style='width:100%;height:350px;margin-right:24px;'>
+                <div id='RightLine' style='width:100%;height:100%;'></div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import echarts from 'echarts'
+
+export default {
+    data() {
+        return {
+            dataX: [],
+            loadX: [],
+            dataY1: [],
+            dataY2: [],
+            dataY3: [],
+            loadY1: [],
+            loadY2: [],
+            loadY3: [],
+            dataY1Min: '',
+            dataY1Max: ''
+        }
+    },
+    props: ['chillerList'],
+    methods: {
+        getMax(arr) {
+            var max = arr[0]
+            for (var i = 0; i < arr.length; i++) {
+                if (max < arr[i]) {
+                    max = arr[i]
+                }
+            }
+            return max
+        },
+        getMin(arr) {
+            var min = arr[0]
+            for (var i = 0; i < arr.length; i++) {
+                if (arr[i] == '') {
+                    arr.splice(arr[i], 1)
+                }
+                if (min > arr[i]) {
+                    min = arr[i]
+                }
+            }
+
+            return min
+        },
+        drawData() {
+            this.dataY1 = []
+            this.dataX = []
+            this.loadX = []
+            this.dataY2 = []
+            this.dataY3 = []
+            this.loadY1 = []
+            this.loadY2 = []
+            this.loadY3 = []
+            this.chillerList.forEach(el => {
+                el.value = el.time.slice(0, 2) + ':' + el.time.slice(2, 4)
+                this.dataX.push(el.value)
+                this.loadX.push(el.value)
+                this.dataY1.push(el.tout == '-9999' ? undefined : el.tout)
+                this.dataY2.push(el.meanTindoor == '-9999' ? undefined : el.meanTindoor)
+                this.dataY3.push(el.maxTindoor == '-9999' ? undefined : el.maxTindoor)
+                this.loadY1.push(el.nowPlantLoad == '-9999' && el.nowPlantLoad == '-9998' ? undefined : el.nowPlantLoad)
+                this.loadY2.push(el.predictedLoadUpLimit != '-9999' && el.predictedLoadUpLimit != '-9998' ? el.predictedLoadUpLimit : undefined)
+                this.loadY3.push(el.redictedLoadDownLimit != '-9999' && el.redictedLoadDownLimit != '-9998' ? el.redictedLoadDownLimit : undefined)
+            })
+            let arr = []
+            arr = arr
+                .concat(this.dataY1)
+                .concat(this.dataY2)
+                .concat(this.dataY3)
+            this.dataY1Min = this.getMin(arr)
+            this.dataY1Max = this.getMax(arr)
+            let minG = parseInt(this.dataY1Min % 10),
+                minS = parseInt((this.dataY1Min % 100) / 10),
+                maxG = parseInt(this.dataY1Max % 10),
+                maxS = parseInt((this.dataY1Max % 100) / 10)
+            if (minG > 5) {
+                this.dataY1Min = String(minS) + '5'
+            } else if (minG <= 5) {
+                this.dataY1Min = String(minS) + '0'
+            }
+            if (maxG > 5) {
+                this.dataY1Max = String(maxS + 1) + '0'
+            } else if (maxG <= 5) {
+                this.dataY1Max = String(maxS) + '5'
+            }
+            this.drawLeft()
+            this.drawRight()
+        },
+        drawLeft() {
+            var leftLine = echarts.init(document.getElementById('leftLine'))
+            let option = {
+                tooltip: {
+                    trigger: 'axis',
+                    formatter: function(data) {
+                        let val1 = '',
+                            val2 = '',
+                            val3 = ''
+                        data.forEach(i => {
+                            if (i.seriesName == '室外温度') {
+                                val1 = `<br/>室外温度:${i.value ? i.value.toFixed(1) : ''}`
+                            }
+                            if (i.seriesName == ' 室内平均温度') {
+                                val2 = `<br/>室内平均温度:${i.value ? i.value.toFixed(1) : ''}`
+                            }
+                            if (i.seriesName == '室内最高温度') {
+                                val3 = `<br/>室内最高温度:${i.value ? i.value.toFixed(1) : ''}`
+                            }
+                        })
+                        return `${data[0].name}${val1}${val2}${val3}`
+                    }
+                },
+                title: {
+                    text: '室内外温度',
+                    fontSize: '16px',
+                    color: '#1F2429'
+                },
+
+                grid: {
+                    left: '3%',
+                    right: '4%',
+                    bottom: '3%',
+                    containLabel: true
+                },
+
+                xAxis: {
+                    type: 'category',
+                    boundaryGap: false,
+                    data: this.dataX
+                },
+                yAxis: {
+                    type: 'value',
+                    min: Number(this.dataY1Min),
+                    max: Number(this.dataY1Max),
+                    interval: 2,
+                    axisLabel: { formatter: '{value}  ℃' }
+                },
+                series: [
+                    {
+                        name: '室外温度',
+                        type: 'line',
+
+                        data: this.dataY1,
+                        color: '#0091FF'
+                    },
+                    {
+                        name: '室内平均温度',
+                        type: 'line',
+
+                        data: this.dataY2,
+                        color: '#00D6B9'
+                    },
+                    {
+                        name: '室内最高温度',
+                        type: 'line',
+
+                        data: this.dataY3,
+                        color: '#FFBA6B'
+                    }
+                ]
+            }
+            leftLine.setOption(option)
+        },
+        drawRight() {
+            var RightLine = echarts.init(document.getElementById('RightLine'))
+            RightLine.setOption({
+                tooltip: {
+                    trigger: 'axis',
+                    axisPointer: {
+                        type: 'cross',
+                        animation: false,
+                        label: {
+                            backgroundColor: '#ccc',
+                            borderColor: '#aaa',
+                            borderWidth: 1,
+                            shadowBlur: 0,
+                            shadowOffsetX: 0,
+                            shadowOffsetY: 0,
+                            color: '#222'
+                        }
+                    }
+                },
+                grid: {
+                    left: '3%',
+                    right: '4%',
+                    bottom: '3%',
+                    containLabel: true
+                },
+                title: {
+                    text: '预测冷量',
+                    fontSize: '16px',
+                    color: '#1F2429'
+                },
+                xAxis: {
+                    type: 'category',
+                    data: this.loadX
+                },
+                yAxis: {
+                    splitLine: {
+                        lineStyle: {
+                            type: 'dotted'
+                        }
+                    },
+                    axisLabel: { formatter: '{value}  kW' }
+                },
+                series: [
+                    {
+                        name: 'L',
+                        type: 'line',
+                        data: this.loadY2,
+                        lineStyle: {
+                            opacity: 0
+                        },
+                        stack: 'confidence-band',
+                        symbol: 'none'
+                    },
+                    {
+                        name: 'U',
+                        type: 'line',
+                        data: this.loadY3,
+                        lineStyle: {
+                            opacity: 0
+                        },
+                        areaStyle: {
+                            color: '#ccc'
+                        },
+                        stack: 'confidence-band',
+                        symbol: 'none'
+                    },
+                    {
+                        type: 'line',
+                        data: this.loadY1,
+                        hoverAnimation: false,
+                        symbolSize: 6,
+                        itemStyle: {
+                            color: '#0091FF'
+                        },
+                        showSymbol: false
+                    }
+                ]
+            })
+        }
+    },
+    mounted() {
+        this.$nextTick(function() {
+            this.drawData()
+        })
+    },
+    watch: {
+        chillerList: {
+            immediate: true,
+            handler(val, old) {
+                if (old) {
+                    this.drawData()
+                }
+            }
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.line-container {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    .leftL {
+        width: 50%;
+        flex: 1;
+        .leftLengend {
+            text-align: center;
+            margin-bottom: 10px;
+            i {
+                display: inline-block;
+                width: 16px;
+                height: 6px;
+                border-radius: 3px;
+                vertical-align: middle;
+            }
+            .innerIcon {
+                background: rgba(0, 214, 185, 1);
+                margin: 0 20px;
+            }
+            .outIcon {
+                background: rgba(0, 145, 255, 1);
+            }
+            .innerMax {
+                background: rgba(255, 186, 107, 1);
+            }
+        }
+    }
+    .rightL {
+        flex: 1;
+        width: 50%;
+        .rightLengend {
+            text-align: center;
+            margin-bottom: 10px;
+            i {
+                display: inline-block;
+                width: 16px;
+                height: 6px;
+                border-radius: 3px;
+                vertical-align: middle;
+            }
+            .preCool {
+                background: #0091ff;
+                opacity: 0.29;
+                margin-left: 20px;
+            }
+        }
+    }
+}
+</style>

+ 0 - 17
src/components/todayStrategy.vue

@@ -64,7 +64,6 @@
                 </template>
             </el-table-column>
         </el-table>
-
         <el-dialog title='备注' :visible.sync='dialogVisible' width='30%'>
             <el-input type='textarea' :autosize='{ minRows: 2, maxRows: 4}' placeholder='请填写备注内容' v-model='remarks'></el-input>
             <span slot='footer' class='dialog-footer'>
@@ -134,16 +133,6 @@ export default {
             }
             queryWorkflow(params).then(res => {
                 this.newData = res.content ? res.content : []
-                // console.log(res)
-                // let arr = [];
-                // arr = res.content ? res.content : [];
-                // if (arr.length > 0) {
-                //   arr.forEach(item => {
-                //     arr.push(item.commandId);
-                //     this.newArr.push(item);
-                //   });
-                //   this.queryExecute(arr);
-                // }
             })
         },
         handleClick(row) {
@@ -168,12 +157,6 @@ export default {
                 path: '/appeal/appealDetails',
                 query: { item: JSON.stringify(row) }
             })
-            // this.queryDetail(row)
-            // return
-            // this.$router.push({
-            //     path: '/appeal/appealDetails',
-            //     query: { item: JSON.stringify(row) }
-            // })
         },
         queryDetail(item) {
             let params = {

+ 79 - 64
src/router/index.js

@@ -9,80 +9,95 @@ const Audit = () => import('@/views/audit/index')
 const DoBusiness = () => import('@/views/doBusiness/index')
 const Evaluate = () => import('@/views/evaluate/index')
 const EvTwoLevelMenu = () => import('@/views/evaluate/evTwoLevelMenu')
+const Auth = () => import('@/views/auth/index')
 
 import store from '../store'
-import { query } from '../utils/query'
+import {
+  query
+} from '../utils/query'
 
 Vue.use(Router)
 
 const router = new Router({
-    mode: 'history',
-    routes: [
-        {
-            path: '/',
-            name: 'main',
-            component: Main
-        },
-        {
-            path: '/strategy',
-            name: 'strategy',
-            component: Strategy
-        },
-        {
-            path: '/appeal',
-            name: 'appeal',
-            component: Appeal
-        },
-        {
-            path: '/appeal/appealDetail',
-            name: 'appealDetail',
-            component: AppealDetail
-        },
-        {
-            path: '/appeal/appealDetails',
-            name: 'appealDetails',
-            component: AppealDetails
-        },
-        {
-            path: '/audit',
-            name: 'audit',
-            component: Audit
-        },
-        {
-            path: '/doBusiness',
-            name: 'doBusiness',
-            component: DoBusiness
-        },
-        {
-            path: '/evaluate',
-            name: 'evaluate',
-            component: Evaluate
-        },
-        {
-            path: '/evaluate/evTwoLevelMenu',
-            name: 'evTwoLevelMenu',
-            component: EvTwoLevelMenu
+  mode: 'history',
+  routes: [{
+      path: '/',
+      name: 'main',
+      component: Main
+    },
+    {
+      path: '/auth',
+      name: 'auth',
+      component: Auth
+    },
+    {
+      path: '/strategy',
+      name: 'strategy',
+      component: Strategy
+    },
+    {
+      path: '/appeal',
+      name: 'appeal',
+      component: Appeal
+    },
+    {
+      path: '/appeal/appealDetail',
+      name: 'appealDetail',
+      component: AppealDetail
+    },
+    {
+      path: '/appeal/appealDetails',
+      name: 'appealDetails',
+      component: AppealDetails
+    },
+    {
+      path: '/audit',
+      name: 'audit',
+      component: Audit
+    },
+    {
+      path: '/doBusiness',
+      name: 'doBusiness',
+      component: DoBusiness
+    },
+    {
+      path: '/evaluate',
+      name: 'evaluate',
+      component: Evaluate
+    },
+    {
+      path: '/evaluate/evTwoLevelMenu',
+      name: 'evTwoLevelMenu',
+      component: EvTwoLevelMenu
 
-        }
-    ]
+    }
+  ]
 })
 router.beforeEach(async (to, from, next) => {
-    const token = query().token || sessionStorage.getItem('token')
-    if (store.state.token && Object.keys(store.state.userInfo).length > 0) {
-        next()
-    } else if (token) {
-        store.commit('setSsoToken', token)
-        await store.dispatch('loadUserInfo', { token })
-        // 去除浏览器地址栏token
-        if (query().token) {
-            router.replace(location.pathname + location.search.replace(/(&?token=\w+&?)/, ''))
-        }
-        next()
-    } else {
-        let ssoServer = 'http://10.199.143.85:7003'
-        let redirectUrl = window.location.protocol + '//' + window.location.host + '/strategy'
-        window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
+  const token = query().token || sessionStorage.getItem('token')
+  if (store.state.token && Object.keys(store.state.userInfo).length > 0) {
+    next()
+  } else if (token) {
+    store.commit('setSsoToken', token)
+    await store.dispatch('loadUserInfo', {
+      token
+    })
+    // 去除浏览器地址栏token
+    if (query().token) {
+      router.replace(location.pathname + location.search.replace(/(&?token=\w+&?)/, ''))
+    }
+    next()
+  } else {
+    let lastRoute = {
+      path: to.path,
+      params: to.params,
+      query: to.query
     }
+    store.commit('setLastRoute', lastRoute)
+    let ssoServer = 'http://sso.sagacloud.cn'
+    let redirectUrl = window.location.protocol + '//' + window.location.host + '/auth'
+    window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
+  }
 })
 
 export default router

+ 66 - 55
src/store/index.js

@@ -7,67 +7,78 @@ Vue.use(Vuex)
 const KEY_LAST_ROUTE = 'last_route'
 
 const store = new Vuex.Store({
-    modules: {},
-    state: {
-        name: '这里是全局的',
-        projects: [
-        ],
-        projectId: 'Pj4419000005',
-        comeUrl: '',
-        flag: 'wanke',
-        token: null,
-        lastRoute: null,
-        userInfo: {
+  modules: {},
+  state: {
+    name: '这里是全局的',
+    projects: [],
+    projectId: 'Pj4419000005',
+    comeUrl: '',
+    flag: 'wanke',
+    token: null,
+    lastRoute: null,
+    userInfo: {
 
+    }
+  },
+  getters: {
+    flag: state => state.flag,
+    token: state => state.token,
+    lastRoute: state => {
+      if (!state.lastRoute) {
+        let lastRoute = storage.get(KEY_LAST_ROUTE)
+        if (lastRoute) {
+          state.lastRoute = lastRoute
         }
+      }
+      return state.lastRoute
+    }
+  },
+  mutations: {
+    setProjects(state, projects) {
+      state.projects = projects
     },
-    getters: {
-        flag: state => state.flag,
-        token: state => state.token,
-        lastRoute: state => {
-            if (!state.lastRoute) {
-                let lastRoute = storage.get(KEY_LAST_ROUTE)
-                if (lastRoute) {
-                    state.lastRoute = lastRoute
-                }
-            }
-            return state.lastRoute
-        }
+    setProId(state, projectId) {
+      state.projectId = projectId
     },
-    mutations: {
-        setProjects(state, projects) {
-            state.projects = projects
-        },
-        setProId(state, projectId) {
-            state.projectId = projectId
-        },
-        setComeUrl(state, comeUrl) {
-            state.comeUrl = comeUrl
-        },
-        setSsoToken: (state, val) => (state.token = val),
-        setLastRoute: (state, val) => {
-            state.lastRoute = val
-            storage.set(KEY_LAST_ROUTE, val)
-        },
-        setUserInfo(state, { userInfo }) {
-            state.userInfo = userInfo
-        }
+    setComeUrl(state, comeUrl) {
+      state.comeUrl = comeUrl
     },
-    actions: {
-        async loadUserInfo(context, { token }) {
-            let res = await axios.get('/server/userInfo', { params: { token: token } })
-            if (res.data.result == 'success') {
-                // commit 到vuex, 供全局使用
-                context.commit('setUserInfo', { userInfo: res.data })
-                context.commit('setProjects', { projects: res.data.projects })
-                localStorage.setItem('token', token)
-            } else {
-                let ssoServer = 'http://10.199.143.85:7003'
-                let redirectUrl = window.location.protocol + '//' + window.location.host + '/strategy'
-                window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
-            }
-        }
+    setSsoToken: (state, val) => (state.token = val),
+    setLastRoute: (state, val) => {
+      state.lastRoute = val
+      storage.set(KEY_LAST_ROUTE, val)
     },
+    setUserInfo(state, {
+      userInfo
+    }) {
+      state.userInfo = userInfo
+    }
+  },
+  actions: {
+    async loadUserInfo(context, {
+      token
+    }) {
+      let res = await axios.get('/server/userInfo', {
+        params: {
+          token: token
+        }
+      })
+      if (res.data.result == 'success') {
+        // commit 到vuex, 供全局使用
+        context.commit('setUserInfo', {
+          userInfo: res.data
+        })
+        context.commit('setProjects', {
+          projects: res.data.projects
+        })
+        localStorage.setItem('token', token)
+      } else {
+        let ssoServer = 'http://sso.sagacloud.cn'
+        let redirectUrl = window.location.protocol + '//' + window.location.host + '/auth'
+        window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
+      }
+    }
+  },
 })
 
 export default store

+ 58 - 125
src/views/audit/auditTable.vue

@@ -1,128 +1,49 @@
 <template>
-    <div class='detailTable' style='width: 767px'>
-        <!-- <el-table :data='tableList' border>
-            <el-table-column prop='title' label width='95'></el-table-column>
-            <el-table-column prop label='冷机开启台数' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.chillerNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(row.chillerNumSetLOrg,true,0)}}</font>
-                    大
-                    <font :class='row.chillerNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(row.chillerNumSetSOrg,true,0)}}</font>
-                    小
-                </template>
-            </el-table-column>
-            <el-table-column prop label='冷机出水温度' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.chillWaterOutTempSetOrg=="-9999"?"reds":""'>{{formatterRes(parseInt(row.chillWaterOutTempSetOrg),false,1)}}</font>
-                    ℃
-                </template>
-            </el-table-column>
-            <el-table-column prop label='冷冻泵台数' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.coolPumpNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(row.coolPumpNumSetLOrg,true,1)}}</font>
-                    大
-                    <font :class='row.coolPumpNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(row.coolPumpNumSetSOrg,true,0)}}</font>
-                    小
-                </template>
-            </el-table-column>
-            <el-table-column prop label='冷冻泵频率' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.coolPumpFreqSetOrg=="-9999"?"reds":""'>{{formatterRes(row.coolPumpFreqSetOrg,false,0)}}</font>
-                    HZ
-                </template>
-            </el-table-column>
-            <el-table-column prop label='冷却泵台数' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.chillPumpNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(row.chillPumpNumSetLOrg,true,0)}}</font>
-                    大
-                    <font :class='row.chillPumpNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(row.chillPumpNumSetSOrg,true,0)}}</font>
-                    小
-                </template>
-            </el-table-column>
-            <el-table-column prop label='冷却泵频率' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.chillPumpFreqSetOrg=="-9999"?"reds":""'>{{formatterRes(row.chillPumpFreqSetOrg,false,0)}}</font>
-                    HZ
-                </template>
-            </el-table-column>
-            <el-table-column prop label='冷却塔台数' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.coolTowerNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(row.coolTowerNumSetSOrg,true,0)}}</font>
-                    大
-                    <font :class='row.coolTowerNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(row.coolTowerNumSetLOrg,true,0)}}</font>
-                    小
-                </template>
-            </el-table-column>
-            <el-table-column prop='zip' label='冷却塔频率' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.coolTowerFreqSetOrg=="-9999"?"reds":""'>{{formatterRes(row.coolTowerFreqSetOrg,false,0)}}</font>
-                    HZ
-                </template>
-            </el-table-column>
-            <el-table-column prop label='室内平均温度' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.meanTindoor=="-9999"?"reds":""'>{{formatterRes(row.meanTindoor,false,1)}}</font>
-                    ℃
-                </template>
-            </el-table-column>
-            <el-table-column prop label='室内最高温度' align='center' width>
-                <template slot-scope='{row}'>
-                    <font :class='row.maxTindoor=="-9999"?"reds":""'>{{formatterRes(row.maxTindoor,false,1)}}</font>
-                    ℃
-                </template>
-            </el-table-column>
-            <el-table-column prop label='冷机负载率' align='center' width>
-                <template slot-scope='{row}'>
-                    <font
-                        :class='parseInt(row.plrAllOrg)=="-9999"?"reds":""'
-                    >{{(row.plrAllOrg==undefined)?'--':(parseInt(row.plrAllOrg)=='-9999'?'x':(parseInt(row.plrAllOrg)=='-9998'?'--':parseInt(row.plrAllOrg)))}}</font>
-                    HZ
-                </template>
-            </el-table-column>
-        </el-table>-->
+    <div class='detailTable' style='width:767px'>
         <div class='detail-box'>
             <div class='detail-box-top'>
                 <div style='width:100px;diplay:inline-block;'></div>
-                <span style='width:75px;text-align:center'>
+                <span class='span1'>
                     冷机
                     <br />开启台数
                 </span>
-                <span style='width:75px;text-align:center'>
+                <span class='span1'>
                     冷机
                     <br />出水温度
                 </span>
-                <span style='width:70px;text-align:center'>
+                <span class='span2'>
                     冷冻泵
                     <br />台数
                 </span>
-                <span style='width:60px;text-align:center'>
+                <span class='span3'>
                     冷冻泵
                     <br />频率
                 </span>
-                <span style='width:70px;text-align:center'>
+                <span class='span2'>
                     冷却泵
                     <br />台数
                 </span>
-                <span style='width:60px;text-align:center'>
+                <span class='span3'>
                     冷却泵
                     <br />频率
                 </span>
-                <span style='width:70px;text-align:center'>
+                <span class='span2'>
                     冷却塔
                     <br />台数
                 </span>
-                <span style='width:60px;text-align:center'>
+                <span class='span3'>
                     冷却塔
                     <br />频率
                 </span>
-                <span style='width:75px;text-align:center'>
+                <span class='span1'>
                     室内
                     <br />平均温度
                 </span>
-                <span style='width:75px;text-align:center'>
+                <span class='span1'>
                     室内
                     <br />最高温度
                 </span>
-                <span style='width:60px;text-align:center'>
+                <span class='span3'>
                     冷机
                     <br />负载率
                 </span>
@@ -132,45 +53,43 @@
                     <span
                         style='width:100px;font-size:12px;background:rgba(248,249,250,1);color:rgba(100,106,115,1);diplay:inline-block;text-align: center;'
                     >{{item.title}}</span>
-                    <span style='width:75px;text-align:center'>
-                        <font :class='item.chillerNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(item.chillerNumSetLOrg,true,0)}}</font>大
-                        <font :class='item.chillerNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(item.chillerNumSetSOrg,true,0)}}</font>小
+                    <span class='span1'>
+                        <font :class='item.chillerNumSetLOrg=="-9999"?"red":""'>{{formatterRes(item.chillerNumSetLOrg,true,0)}}</font>大
+                        <font :class='item.chillerNumSetSOrg=="-9999"?"red":""'>{{formatterRes(item.chillerNumSetSOrg,true,0)}}</font>小
                     </span>
-                    <span style='width:75px;text-align:center'>
-                        <font
-                            :class='item.chillWaterOutTempSetOrg=="-9999"?"reds":""'
-                        >{{formatterRes(parseInt(item.chillWaterOutTempSetOrg),false,1)}}</font>℃
+                    <span class='span1'>
+                        <font :class='item.chillWaterOutTempSetOrg=="-9999"?"red":""'>{{formatterRes(parseInt(item.chillWaterOutTempSetOrg),false,1)}}</font>℃
                     </span>
-                    <span style='width:70px;text-align:center'>
-                        <font :class='item.coolPumpNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(item.coolPumpNumSetLOrg,true,1)}}</font>大
-                        <font :class='item.coolPumpNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(item.coolPumpNumSetSOrg,true,0)}}</font>小
+                    <span class='span2'>
+                        <font :class='item.coolPumpNumSetLOrg=="-9999"?"red":""'>{{formatterRes(item.coolPumpNumSetLOrg,true,1)}}</font>大
+                        <font :class='item.coolPumpNumSetSOrg=="-9999"?"red":""'>{{formatterRes(item.coolPumpNumSetSOrg,true,0)}}</font>小
                     </span>
-                    <span style='width:60px;text-align:center'>
-                        <font :class='item.coolPumpFreqSetOrg=="-9999"?"reds":""'>{{formatterRes(item.coolPumpFreqSetOrg,false,0)}}</font>Hz
+                    <span class='span3'>
+                        <font :class='item.coolPumpFreqSetOrg=="-9999"?"red":""'>{{formatterRes(item.coolPumpFreqSetOrg,false,0)}}</font>Hz
                     </span>
-                    <span style='width:70px;text-align:center'>
-                        <font :class='item.chillPumpNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(item.chillPumpNumSetLOrg,true,0)}}</font>大
-                        <font :class='item.chillPumpNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(item.chillPumpNumSetSOrg,true,0)}}</font>小
+                    <span class='span2'>
+                        <font :class='item.chillPumpNumSetLOrg=="-9999"?"red":""'>{{formatterRes(item.chillPumpNumSetLOrg,true,0)}}</font>大
+                        <font :class='item.chillPumpNumSetSOrg=="-9999"?"red":""'>{{formatterRes(item.chillPumpNumSetSOrg,true,0)}}</font>小
                     </span>
-                    <span style='width:60px;text-align:center'>
-                        <font :class='item.chillPumpFreqSetOrg=="-9999"?"reds":""'>{{formatterRes(item.chillPumpFreqSetOrg,false,0)}}</font>Hz
+                    <span class='span3'>
+                        <font :class='item.chillPumpFreqSetOrg=="-9999"?"red":""'>{{formatterRes(item.chillPumpFreqSetOrg,false,0)}}</font>Hz
                     </span>
-                    <span style='width:70px;text-align:center'>
-                        <font :class='item.coolTowerNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(item.coolTowerNumSetSOrg,true,0)}}</font>大
-                        <font :class='item.coolTowerNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(item.coolTowerNumSetLOrg,true,0)}}</font>小
+                    <span class='span2'>
+                        <font :class='item.coolTowerNumSetSOrg=="-9999"?"red":""'>{{formatterRes(item.coolTowerNumSetSOrg,true,0)}}</font>大
+                        <font :class='item.coolTowerNumSetLOrg=="-9999"?"red":""'>{{formatterRes(item.coolTowerNumSetLOrg,true,0)}}</font>小
                     </span>
-                    <span style='width:60px;text-align:center'>
-                        <font :class='item.coolTowerFreqSetOrg=="-9999"?"reds":""'>{{formatterRes(item.coolTowerFreqSetOrg,false,0)}}</font>Hz
+                    <span class='span3'>
+                        <font :class='item.coolTowerFreqSetOrg=="-9999"?"red":""'>{{formatterRes(item.coolTowerFreqSetOrg,false,0)}}</font>Hz
                     </span>
-                    <span style='width:75px;text-align:center'>
-                        <font :class='item.meanTindoor=="-9999"?"reds":""'>{{formatterRes(item.meanTindoor,false,1)}}</font>℃
+                    <span class='span1'>
+                        <font :class='item.meanTindoor=="-9999"?"red":""'>{{formatterRes(item.meanTindoor,false,1)}}</font>℃
                     </span>
-                    <span style='width:75px;text-align:center'>
-                        <font :class='item.maxTindoor=="-9999"?"reds":""'>{{formatterRes(item.maxTindoor,false,1)}}</font>℃
+                    <span class='span1'>
+                        <font :class='item.maxTindoor=="-9999"?"red":""'>{{formatterRes(item.maxTindoor,false,1)}}</font>℃
                     </span>
-                    <span style='width:60px;text-align:center'>
+                    <span class='span3'>
                         <font
-                            :class='parseInt(item.plrAllOrg)=="-9999"?"reds":""'
+                            :class='parseInt(item.plrAllOrg)=="-9999"?"red":""'
                         >{{(item.plrAllOrg==undefined)?'--':(parseInt(item.plrAllOrg)=='-9999'?'x':(parseInt(item.plrAllOrg)=='-9998'?'--':parseInt(item.plrAllOrg)))}}</font>Hz
                     </span>
                 </div>
@@ -214,9 +133,6 @@ export default {
 
  <style lang="scss" scoped>
 .detailTable {
-    .reds {
-        color: #f54e45;
-    }
     margin: 0 auto;
     .el-table {
         font-size: 12px;
@@ -233,9 +149,7 @@ export default {
         padding-left: 2px;
     }
     .detail-box {
-        // width: 100%;
         .detail-box-top {
-            // width: 762px;
             height: 48px;
             background: rgba(248, 249, 250, 1);
             display: flex;
@@ -247,10 +161,19 @@ export default {
                 color: rgba(100, 106, 115, 1);
                 line-height: 16px;
                 padding: 8px 5px;
+                text-align: center;
+            }
+            .span1 {
+                width: 75px;
+            }
+            .span2 {
+                width: 70px;
+            }
+            .span3 {
+                width: 60px;
             }
         }
         .detail-box-bottom {
-            // width:92px;
             height: 123px;
             background: rgba(255, 255, 255, 1);
             font-size: 12px;
@@ -262,6 +185,16 @@ export default {
                 span {
                     padding: 12px 5px;
                     display: inline-block;
+                    text-align: center;
+                }
+                .span1 {
+                    width: 75px;
+                }
+                .span2 {
+                    width: 70px;
+                }
+                .span3 {
+                    width: 60px;
                 }
             }
         }

+ 26 - 0
src/views/auth/index.vue

@@ -0,0 +1,26 @@
+<template>
+  <h4>请稍等</h4>
+</template>
+
+<script>
+export default {
+    data(){
+        return{
+
+        }
+    },
+    created(){
+        let lastRoute = this.$store.getters['lastRoute'].path.split('/')[1]
+        console.log(lastRoute)
+        if (lastRoute != 'auth') {
+            this.$router.replace(lastRoute)
+        } else {
+            this.$router.replace('/strategy')
+        } 
+    },
+}
+</script>
+
+<style>
+
+</style>

+ 13 - 13
src/views/doBusiness/index.vue

@@ -21,11 +21,11 @@
                             format='HH:mm'
                             value-format='timestamp'
                             @change='setHours'
-                            @focus="onFocus(item)"
+                            @focus='onFocus(item)'
                             placeholder='选择时间范围'
-                            :picker-options="{
-                            selectableRange: '07:00-19:00',                       
-                            }"
+                            :picker-options='{
+                            selectableRange:"07:00-19:00",                       
+                            }'
                         ></el-time-picker>
                     </div>
                 </template>
@@ -84,17 +84,20 @@ export default {
         },
         onFocus(item) {
             const isToday = item.date == Number(timestamp2String(+new Date()).substr(0, 8))
-            if(!isToday) return
+            if (!isToday) return
             const nowHours = new Date().getHours()
-            if(nowHours >= 7) this.disablePick('start')
-            if(nowHours >= 19) this.disablePick('end')
+            if (nowHours >= 7) this.disablePick('start')
+            if (nowHours >= 19) this.disablePick('end')
         },
         disablePick(p) {
-            const s = p === 'start' ? '.el-time-range-picker .el-time-range-picker__cell:nth-child(1) .el-time-range-picker__body' : '.el-time-range-picker .el-time-range-picker__cell:nth-child(2) .el-time-range-picker__body'
+            const s =
+                p === 'start'
+                    ? '.el-time-range-picker .el-time-range-picker__cell:nth-child(1) .el-time-range-picker__body'
+                    : '.el-time-range-picker .el-time-range-picker__cell:nth-child(2) .el-time-range-picker__body'
             this.$nextTick(() => {
                 const el = document.querySelector(s)
-                console.log(el);
-                
+                console.log(el)
+
                 el.style['pointer-events'] = 'none'
                 el.style['background-color'] = '#f5f6f7'
             })
@@ -199,9 +202,6 @@ export default {
         line-height: 20px;
         padding-right: 15px;
     }
-    // .el-calendar__header {
-    //   display: none;
-    // }
     .el-range-editor--mini .el-range-input {
         background: #f5f6f7;
     }

+ 0 - 14
src/views/doBusiness/monthTemp.vue

@@ -29,23 +29,9 @@ export default {
             this.$emit('pickerVal', this.pickerVal1)
         },
         changeVal(val) {
-            console.log(val)
             this.$emit('pickerVal', val)
         },
         pickerChangeRight() {
-            if (this.pickerVal1) {
-                console.log(this.pickerVal1)
-                // let dateTime = new Date(this.pickerVal1);
-                // let newData = this.formatter(
-                //   new Date(dateTime.setMonth(dateTime.getMonth() + 1))
-                // );
-                // this.pickerVal1 =
-                //   newData.slice(0, 4) +
-                //   "." +
-                //   newData.slice(4, 6) +
-                //   "." +
-                //   newData.slice(6, 8);
-            }
             this.$emit('pickerVal', this.pickerVal1)
         }
     },

+ 84 - 74
src/views/evaluate/evCard.vue

@@ -1,82 +1,85 @@
 <template>
-    <div class='count-card-box'>
-        <div class='count-card' v-for='(item,index) in cardList' :key='index'>
-            <div class='card-div1' v-if='item.recommend.onTime'>执行时间:{{item.recommend?formatterStr2(item.recommend.onTime):'--'}}</div>
-            <div class='card-div1' v-else-if='item.recommend.offTime'>执行时间:{{item.recommend?formatterStr2(item.recommend.offTime):'--'}}</div>
-            <div class='card-div1' v-else>执行时间:{{item.recommend?formatterStr2(item.recommend.time):'--'}}</div>
-            <div class='card-div2 MicrYaHei'>
-                <span>策略建议</span>
-                <span>冷机台数</span>
-                <span>
-                    <b style='width:50px;display: inline-block;text-align: center;'>{{formatterRes(item.recommend.chillerNumSetL,true,0)}}</b>
-                    大
-                    <b
-                        style='width:50px;display: inline-block;text-align: center;'
-                    >{{formatterRes(item.recommend.chillerNumSetS,true,0)}}</b>小
-                </span>
-                <span>冷机出水温度</span>
-                <span>
-                    <b style='width:50px;display: inline-block;text-align: center;'>{{formatterRes(item.recommend.chillWaterOutTempSet,false,1)}}</b> °C
-                </span>
-            </div>
-            <div class='card-div3 MicrYaHei'>
-                <span>实际执行</span>
-                <span>冷机台数</span>
-                <span>
-                    <b
-                        v-if='item.real'
-                        style='width:50px;display: inline-block;text-align: center;'
-                        :class='item.recommend.chillerNumSetL==item.real.chillerNumSetLOrg?"":"red"'
-                    >{{formatterRes(item.real.chillerNumSetLOrg,true,0)}}</b>大
-                    <b
-                        v-if='item.real'
-                        style='width:50px;display: inline-block;text-align: center;'
-                        :class='item.recommend.chillerNumSetS==item.real.chillerNumSetSOrg?"":"red"'
-                    >{{formatterRes(item.real.chillerNumSetSOrg,true,0)}}</b> 小
-                </span>
-                <span>冷机出水温度</span>
-                <span>
-                    <b
-                        v-if='item.real'
-                        style='width:50px;display: inline-block;text-align: center;'
-                        :class='item.recommend.chillWaterOutTempSet==item.real.chillWaterOutTempSetOrg?"":"red"'
-                    >{{formatterRes(item.real.chillWaterOutTempSetOrg,false,1)}}</b>°C
-                </span>
-            </div>
+    <div>
+        <div class='count-card-box' v-if='cardList.length>0'>
+            <div class='count-card' v-for='(item,index) in cardList' :key='index'>
+                <div class='card-div1' v-if='item.recommend.onTime'>执行时间:{{item.recommend?formatterStr2(item.recommend.onTime):'--'}}</div>
+                <div class='card-div1' v-else-if='item.recommend.offTime'>执行时间:{{item.recommend?formatterStr2(item.recommend.offTime):'--'}}</div>
+                <div class='card-div1' v-else>执行时间:{{item.recommend?formatterStr2(item.recommend.time):'--'}}</div>
+                <div class='card-div2 MicrYaHei'>
+                    <span>策略建议</span>
+                    <span>冷机台数</span>
+                    <span>
+                        <b style='width:50px;display: inline-block;text-align: center;'>{{formatterRes(item.recommend.chillerNumSetL,true,0)}}</b>
+                        大
+                        <b
+                            style='width:50px;display: inline-block;text-align: center;'
+                        >{{formatterRes(item.recommend.chillerNumSetS,true,0)}}</b>小
+                    </span>
+                    <span>冷机出水温度</span>
+                    <span>
+                        <b style='width:50px;display: inline-block;text-align: center;'>{{formatterRes(item.recommend.chillWaterOutTempSet,false,1)}}</b> °C
+                    </span>
+                </div>
+                <div class='card-div3 MicrYaHei'>
+                    <span>实际执行</span>
+                    <span>冷机台数</span>
+                    <span>
+                        <b
+                            v-if='item.real'
+                            style='width:50px;display: inline-block;text-align: center;'
+                            :class='item.recommend.chillerNumSetL==item.real.chillerNumSetLOrg?"":"red"'
+                        >{{formatterRes(item.real.chillerNumSetLOrg,true,0)}}</b>大
+                        <b
+                            v-if='item.real'
+                            style='width:50px;display: inline-block;text-align: center;'
+                            :class='item.recommend.chillerNumSetS==item.real.chillerNumSetSOrg?"":"red"'
+                        >{{formatterRes(item.real.chillerNumSetSOrg,true,0)}}</b> 小
+                    </span>
+                    <span>冷机出水温度</span>
+                    <span>
+                        <b
+                            v-if='item.real'
+                            style='width:50px;display: inline-block;text-align: center;'
+                            :class='item.recommend.chillWaterOutTempSet==item.real.chillWaterOutTempSetOrg?"":"red"'
+                        >{{formatterRes(item.real.chillWaterOutTempSetOrg,false,1)}}</b>°C
+                    </span>
+                </div>
 
-            <div class='card-div4'>备注:{{item.h||'--'}}</div>
-            <div class='card-div5'>
-                <span class='card-div7' v-if='item.recommend.isExecuted'>
-                    <img src='../../assets/completed.png' alt />
-                    已按策略执行
-                </span>
-                <template v-else-if='item.recommend.appealId' v-for='(item1,index) in titles'>
-                    <template v-if='item1.id==item.recommend.appealId'>
-                        <span class='card-div8' v-if='item1.status==302' :key='"l"+index'>
-                            <img src='../../assets/processing.png' alt />
-                            申诉中
-                        </span>
-                        <span class='card-div6' v-else :key='"l"+index'>
+                <div class='card-div4'>备注:{{item.h||'--'}}</div>
+                <div class='card-div5'>
+                    <span class='card-div7' v-if='item.recommend.isExecuted'>
+                        <img src='../../assets/completed.png' alt />
+                        已按策略执行
+                    </span>
+                    <template v-else-if='item.recommend.appealId' v-for='(item1,index) in titles'>
+                        <template v-if='item1.id==item.recommend.appealId'>
+                            <span class='card-div8' v-if='item1.status==302' :key='"l"+index'>
+                                <img src='../../assets/processing.png' alt />
+                                申诉中
+                            </span>
+                            <span class='card-div6' v-else :key='"l"+index'>
+                                <img src='../../assets/error.png' alt />
+                                未按策略执行
+                            </span>
+                        </template>
+                    </template>
+                    <template v-else>
+                        <span class='card-div6' :key='"l"+index'>
                             <img src='../../assets/error.png' alt />
                             未按策略执行
                         </span>
                     </template>
-                </template>
-                <template v-else>
-                    <span class='card-div6' :key='"l"+index'>
-                        <img src='../../assets/error.png' alt />
-                        未按策略执行
-                    </span>
-                </template>
-                <span></span>
-                <span class='MicrYaHei' @click='lookQuickData(item)' style>查看快照</span>
+                    <span></span>
+                    <span class='MicrYaHei' @click='lookQuickData(item)' style>查看快照</span>
+                </div>
+            </div>
+            <div class='view-dialog'>
+                <el-dialog title='策略推出时状况' :visible.sync='viewSnapshots' :close-on-click-modal='false' width='1260px'>
+                    <ev-snapshots-dialog v-if='date && time' :appDate='date' :time='time'></ev-snapshots-dialog>
+                </el-dialog>
             </div>
         </div>
-        <div class='view-dialog'>
-            <el-dialog title='策略推出时状况' :visible.sync='viewSnapshots' :close-on-click-modal='false' width='1260px'>
-                <ev-snapshots-dialog v-if='date && time' :appDate='date' :time='time'></ev-snapshots-dialog>
-            </el-dialog>
-        </div>
+        <div class='no-data' v-else>暂无数据</div>
     </div>
 </template>
 <script>
@@ -145,6 +148,7 @@ export default {
     },
     mounted() {
         this.getAppealId()
+        console.log(this.cardList.length)
     },
     watch: {
         cardList(n, o) {
@@ -285,11 +289,17 @@ export default {
             color: rgba(0, 145, 255, 1);
             background: rgba(225, 242, 255, 1);
         }
-        .red {
-            color: rgba(245, 78, 69, 1);
-        }
     }
 }
+.no-data {
+    font-size: 14px;
+    font-family: MicrosoftYaHei;
+    color: rgba(100, 108, 115, 1);
+    height: 100%;
+    justify-content: center;
+    align-items: center;
+    display: flex;
+}
 </style>
 <style lang="scss">
 .view-dialog {

+ 0 - 6
src/views/evaluate/evHistory.vue

@@ -101,9 +101,6 @@ export default {
                     this.current.energy = '--'
                 }
             }
-            console.log('11111', this.current.tempOutdoor, this.current.tempIndoor, this.current.energy)
-            console.log('22222', this.similarDay.tempOutdoor, this.similarDay.tempIndoor, this.similarDay.energy)
-            console.log('33333', this.maxArr)
         }
     },
     watch: {
@@ -115,9 +112,6 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-.red {
-    color: #f54e45;
-}
 p {
     margin: 0;
     margin-top: 20px;

+ 4 - 4
src/views/evaluate/evIndoorTemperature.vue

@@ -83,16 +83,16 @@ export default {
                             energySavingText = ''
                         params.forEach(i => {
                             if (i.value == 2 && i.seriesName != '室内温度满足率' && i.seriesName != '节能率') {
-                                strategyText = i.seriesName
+                                strategyText = `<br/>${i.seriesName}`
                             }
                             if (i.seriesName == '室内温度满足率') {
-                                tindoorText = `室内温度满足率:${i.value ? Number(i.value).toFixed(1) : 'x'}%`
+                                tindoorText = `<br/>室内温度满足率:${i.value ? Number(i.value).toFixed(1) : 'x'}%`
                             }
                             if (i.seriesName == '节能率') {
-                                energySavingText = `节能率:${i.value ? Number(i.value).toFixed(1) : 'x'}%`
+                                energySavingText = `<br/>节能率:${i.value ? Number(i.value).toFixed(1) : 'x'}%`
                             }
                         })
-                        return `${time}<br/>${strategyText}<br/>${tindoorText}<br/>${energySavingText}`
+                        return `${time}${strategyText}${tindoorText}${energySavingText}`
                     }
                 },
                 grid: {

+ 0 - 3
src/views/evaluate/evRateTitle.vue

@@ -88,8 +88,5 @@ export default {
             height: 20px;
         }
     }
-    .red {
-        color: #f54e45;
-    }
 }
 </style>

+ 19 - 460
src/views/evaluate/evSnapshotsDialog.vue

@@ -23,14 +23,14 @@
                     <div class='snapshotss-cont-bottom'>
                         <div class='snapshotss-cont-bot-1'>
                             <span>
-                                <font :class='chillerOrg.chillerNumSetLOrg=="-9999"?"reds":""'>{{formatterRes(chillerOrg.chillerNumSetLOrg,true,0)}}</font>
+                                <font :class='chillerOrg.chillerNumSetLOrg=="-9999"?"red":""'>{{formatterRes(chillerOrg.chillerNumSetLOrg,true,0)}}</font>
                             </span>
                             <span>
-                                <font :class='chillerOrg.chillerNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(chillerOrg.chillerNumSetSOrg,true,0)}}</font>
+                                <font :class='chillerOrg.chillerNumSetSOrg=="-9999"?"red":""'>{{formatterRes(chillerOrg.chillerNumSetSOrg,true,0)}}</font>
                             </span>
                             <span>
                                 <font
-                                    :class='chillerOrg.chillWaterOutTempSetOrg=="-9999"?"reds":""'
+                                    :class='chillerOrg.chillWaterOutTempSetOrg=="-9999"?"red":""'
                                 >{{formatterRes(chillerOrg.chillWaterOutTempSetOrg,false,1)}}</font>
                                 <font style='font-size:12px;'>°C</font>
                             </span>
@@ -47,17 +47,13 @@
                     <div class='snapshotss-cont-bottom'>
                         <div class='snapshotss-cont-bot-1'>
                             <span>
-                                <font
-                                    :class='chillerOrg.coolPumpNumSetLOrg=="-9999"?"reds":""'
-                                >{{formatterRes(chillerOrg.coolPumpNumSetLOrg ,true,0)}}</font>
+                                <font :class='chillerOrg.coolPumpNumSetLOrg=="-9999"?"red":""'>{{formatterRes(chillerOrg.coolPumpNumSetLOrg ,true,0)}}</font>
                             </span>
                             <span>
-                                <font :class='chillerOrg.coolPumpNumSetSOrg=="-9999"?"reds":""'>{{formatterRes(chillerOrg.coolPumpNumSetSOrg,true,0)}}</font>
+                                <font :class='chillerOrg.coolPumpNumSetSOrg=="-9999"?"red":""'>{{formatterRes(chillerOrg.coolPumpNumSetSOrg,true,0)}}</font>
                             </span>
                             <span>
-                                <font
-                                    :class='chillerOrg.coolPumpFreqSetOrg=="-9999"?"reds":""'
-                                >{{formatterRes(chillerOrg.coolPumpFreqSetOrg,false,0)}}</font>
+                                <font :class='chillerOrg.coolPumpFreqSetOrg=="-9999"?"red":""'>{{formatterRes(chillerOrg.coolPumpFreqSetOrg,false,0)}}</font>
                                 <font style='font-size:12px;'>Hz</font>
                             </span>
                         </div>
@@ -74,17 +70,17 @@
                         <div class='snapshotss-cont-bot-1'>
                             <span>
                                 <font
-                                    :class='chillerOrg.chillPumpNumSetLOrg=="-9999"?"reds":""'
+                                    :class='chillerOrg.chillPumpNumSetLOrg=="-9999"?"red":""'
                                 >{{formatterRes(chillerOrg.chillPumpNumSetLOrg,true,0)}}</font>
                             </span>
                             <span>
                                 <font
-                                    :class='chillerOrg.chillPumpNumSetSOrg=="-9999"?"reds":""'
+                                    :class='chillerOrg.chillPumpNumSetSOrg=="-9999"?"red":""'
                                 >{{formatterRes(chillerOrg.chillPumpNumSetSOrg,true,0)}}</font>
                             </span>
                             <span>
                                 <font
-                                    :class='chillerOrg.chillPumpFreqSetOrg=="-9999"?"reds":""'
+                                    :class='chillerOrg.chillPumpFreqSetOrg=="-9999"?"red":""'
                                 >{{formatterRes(chillerOrg.chillPumpFreqSetOrg,false,0)}}</font>
                                 <font style='font-size:12px;'>Hz</font>
                             </span>
@@ -102,17 +98,17 @@
                         <div class='snapshotss-cont-bot-1'>
                             <span>
                                 <font
-                                    :class='chillerOrg.coolTowerNumSetLOrg=="-9999"?"reds":""'
+                                    :class='chillerOrg.coolTowerNumSetLOrg=="-9999"?"red":""'
                                 >{{formatterRes(chillerOrg.coolTowerNumSetLOrg,true,0)}}</font>
                             </span>
                             <span>
                                 <font
-                                    :class='chillerOrg.coolTowerNumSetSOrg=="-9999"?"reds":""'
+                                    :class='chillerOrg.coolTowerNumSetSOrg=="-9999"?"red":""'
                                 >{{formatterRes(chillerOrg.coolTowerNumSetSOrg,true,0)}}</font>
                             </span>
                             <span>
                                 <font
-                                    :class='chillerOrg.coolTowerFreqSetOrg=="-9999"?"reds":""'
+                                    :class='chillerOrg.coolTowerFreqSetOrg=="-9999"?"red":""'
                                 >{{formatterRes(chillerOrg.coolTowerFreqSetOrg,false,0)}}</font>
                                 <font style='font-size:12px;'>Hz</font>
                             </span>
@@ -149,41 +145,29 @@
                 <span>实际冷量</span>
                 <span>
                     <font
-                        :class='parseInt(chillerCommand.nowPlantLoad)=="-9999"?"reds":""'
+                        :class='parseInt(chillerCommand.nowPlantLoad)=="-9999"?"red":""'
                     >{{(chillerCommand.nowPlantLoad==undefined)?'--':(parseInt(chillerCommand.nowPlantLoad)=='-9999'?'x':(parseInt(chillerCommand.nowPlantLoad)=='-9998'?'--':parseInt(chillerCommand.nowPlantLoad)))}}</font>
                     <font style='font-size:12px;'>kW</font>
                 </span>
                 <span>未来1小时预测冷量</span>
                 <span>
                     <font
-                        :class='parseInt(chillerCommand.predictedLoad1h)=="-9999"?"reds":""'
+                        :class='parseInt(chillerCommand.predictedLoad1h)=="-9999"?"red":""'
                     >{{(chillerCommand.predictedLoad1h==undefined)?'--':(parseInt(chillerCommand.predictedLoad1h)=='-9999'?'x':(parseInt(chillerCommand.predictedLoad1h)=='-9998'?'--':parseInt(chillerCommand.predictedLoad1h)))}}</font>
                     <font style='font-size:12px;'>kW</font>
                 </span>
             </div>
         </div>
         <div class='snapshotss-foot'>
-            <div class='leftL'>
-                <div class='leftLengend'>
-                    <i class='outIcon'></i> 室外温度
-                    <i class='innerIcon'></i> 室内平均温度
-                    <i class='innerMax'></i> 室内最高温度
-                </div>
-                <div id='snapshotssLeft' style='width:100%;height:250px;margin-right:;24px;'></div>
-            </div>
-            <div class='rightL'>
-                <div class='rightLengend'>
-                    <i class='reactCool'></i> 实际供冷量
-                    <i class='preCool'></i> 预测冷量
-                </div>
-                <div id='snapshotssRight' style='width:100%;height:250px;'></div>
-            </div>
+            <strategy-line :chillerList='chillerHourList' v-if='chillerHourList.length>=0'></strategy-line>
         </div>
     </div>
 </template>
 <script>
 import echarts from 'echarts'
 import { queryQuickData } from '@/api/strategy/strategy.js'
+import strategyLine from '@/components/strategyLine'
+
 export default {
     props: ['appDate', 'time'],
     data() {
@@ -208,17 +192,7 @@ export default {
             ],
             chillerOrg: {},
             chillerCommand: {},
-            chillerHourList: [],
-            dataX: [],
-            loadX: [],
-            dataY1: [],
-            dataY2: [],
-            dataY3: [],
-            loadY1: [],
-            loadY2: [],
-            loadY3: [],
-            dataY1Min: '',
-            dataY1Max: ''
+            chillerHourList: []
         }
     },
     mounted() {
@@ -229,6 +203,7 @@ export default {
             this.getQuickData()
         }
     },
+    components: { strategyLine },
     methods: {
         formatterRes(res, type, num) {
             if (res == '-9999') {
@@ -248,28 +223,6 @@ export default {
                 return res
             }
         },
-        getMax(arr) {
-            var max = arr[0]
-            for (var i = 0; i < arr.length; i++) {
-                if (max < arr[i]) {
-                    max = arr[i]
-                }
-            }
-            return max
-        },
-        getMin(arr) {
-            var min = arr[0]
-            for (var i = 0; i < arr.length; i++) {
-                if (arr[i] == '') {
-                    arr.splice(arr[i], 1)
-                }
-                if (min > arr[i]) {
-                    min = arr[i]
-                }
-            }
-
-            return min
-        },
         getQuickData() {
             let params = {
                 getParams: {
@@ -283,350 +236,6 @@ export default {
                 this.chillerOrg = res.chillerOrg || {}
                 this.chillerCommand = res.chillerOrg || {}
                 this.chillerHourList = res.chillerHourList || []
-                this.drawData()
-            })
-        },
-        drawData() {
-            this.dataY1 = []
-            this.dataX = []
-            this.loadX = []
-            this.dataY2 = []
-            this.dataY3 = []
-            this.loadY1 = []
-            this.loadY2 = []
-            this.loadY3 = []
-            this.chillerHourList.forEach(el => {
-                el.value = el.time.slice(0, 2) + ':' + el.time.slice(2, 4)
-                this.dataX.push(el.value)
-                this.loadX.push(el.value)
-                this.dataY1.push(el.tout == '-9999' ? undefined : el.tout)
-                this.dataY2.push(el.meanTindoor == '-9999' ? undefined : el.meanTindoor)
-                this.dataY3.push(el.maxTindoor == '-9999' ? undefined : el.maxTindoor)
-                this.loadY1.push(el.nowPlantLoad == '-9999' && el.nowPlantLoad == '-9998' ? undefined : el.nowPlantLoad)
-                this.loadY2.push(el.predictedLoadUpLimit != '-9999' && el.predictedLoadUpLimit != '-9998' ? el.predictedLoadUpLimit : undefined)
-                this.loadY3.push(el.redictedLoadDownLimit != '-9999' && el.redictedLoadDownLimit != '-9998' ? el.redictedLoadDownLimit : undefined)
-            })
-            let arr = []
-            arr = arr
-                .concat(this.dataY1)
-                .concat(this.dataY2)
-                .concat(this.dataY3)
-            this.dataY1Min = this.getMin(arr)
-            this.dataY1Max = this.getMax(arr)
-            let minG = parseInt(this.dataY1Min % 10),
-                minS = parseInt((this.dataY1Min % 100) / 10),
-                maxG = parseInt(this.dataY1Max % 10),
-                maxS = parseInt((this.dataY1Max % 100) / 10)
-            if (minG > 5) {
-                this.dataY1Min = String(minS) + '5'
-            } else if (minG <= 5) {
-                this.dataY1Min = String(minS) + '0'
-            }
-            if (maxG > 5) {
-                this.dataY1Max = String(maxS + 1) + '0'
-            } else if (maxG <= 5) {
-                this.dataY1Max = String(maxS) + '5'
-            }
-            this.drawSnapshotssLeft()
-            this.drawSnapshotssRight()
-        },
-        drawSnapshotssLeft() {
-            var snapshotssLeft = echarts.init(document.getElementById('snapshotssLeft'))
-            let option = {
-                tooltip: {
-                    trigger: 'axis',
-                    formatter: function(data) {
-                        return `${data[0].name}<br/>${data[0].seriesName}  :${data[0].value ? data[0].value.toFixed(1) : ''}<br/>${
-                            data[1].seriesName
-                        }  :${data[1].value ? data[1].value.toFixed(1) : ''} <br/> ${data[2].seriesName}  :${
-                            data[2].value ? data[2].value.toFixed(1) : ''
-                        }`
-                    }
-                },
-                title: {
-                    text: '室内外温度',
-                    fontSize: '16px',
-                    color: '#1F2429'
-                },
-
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-
-                xAxis: {
-                    type: 'category',
-                    boundaryGap: false,
-                    data: this.dataX
-                },
-                yAxis: {
-                    type: 'value',
-                    min: Number(this.dataY1Min),
-                    max: Number(this.dataY1Max),
-                    interval: 2,
-                    axisLabel: { formatter: '{value}  ℃' }
-                },
-                series: [
-                    {
-                        name: '室外温度',
-                        type: 'line',
-
-                        data: this.dataY1,
-                        color: '#0091FF'
-                    },
-                    {
-                        name: '室内平均温度',
-                        type: 'line',
-
-                        data: this.dataY2,
-                        color: '#00D6B9'
-                    },
-                    {
-                        name: '室内最高温度',
-                        type: 'line',
-
-                        data: this.dataY3,
-                        color: '#FFBA6B'
-                    }
-                ]
-            }
-            snapshotssLeft.setOption(option)
-        },
-        drawSnapshotssRight() {
-            var snapshotssRight = echarts.init(document.getElementById('snapshotssRight'))
-            snapshotssRight.setOption({
-                tooltip: {
-                    trigger: 'axis',
-                    axisPointer: {
-                        type: 'cross',
-                        animation: false,
-                        label: {
-                            backgroundColor: '#ccc',
-                            borderColor: '#aaa',
-                            borderWidth: 1,
-                            shadowBlur: 0,
-                            shadowOffsetX: 0,
-                            shadowOffsetY: 0,
-                            color: '#222'
-                        }
-                    }
-                    //  formatter: function (params) {
-                    // //     return params[2].name + '<br />' + params[2].value;
-                    // }
-                },
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-                title: {
-                    text: '预测冷量',
-                    fontSize: '16px',
-                    color: '#1F2429'
-                },
-                xAxis: {
-                    type: 'category',
-                    data: this.loadX
-                },
-                yAxis: {
-                    // splitNumber: 3,
-                    splitLine: {
-                        // show: false,
-                        lineStyle: {
-                            type: 'dotted'
-                        }
-                    },
-                    axisLabel: { formatter: '{value}  kW' }
-                },
-                series: [
-                    {
-                        name: 'L',
-                        type: 'line',
-                        data: this.loadY2,
-                        lineStyle: {
-                            opacity: 0
-                        },
-                        stack: 'confidence-band',
-                        symbol: 'none'
-                    },
-                    {
-                        name: 'U',
-                        type: 'line',
-                        data: this.loadY3,
-                        lineStyle: {
-                            opacity: 0
-                        },
-                        areaStyle: {
-                            color: '#ccc'
-                        },
-                        stack: 'confidence-band',
-                        symbol: 'none'
-                    },
-                    {
-                        type: 'line',
-                        data: this.loadY1,
-                        hoverAnimation: false,
-                        symbolSize: 6,
-                        itemStyle: {
-                            color: '#0091FF'
-                        },
-                        showSymbol: false
-                    }
-                ]
-            })
-        },
-        getData() {
-            this.chillerHourList.forEach(el => {
-                el.value = el.time.slice(0, 2) + ':' + el.time.slice(2, 4)
-                this.dataX.push(el.value)
-                this.loadX.push(el.value)
-                this.dataY1.push(el.tout)
-                this.dataY2.push(el.meanTindoor)
-                this.dataY3.push(el.maxTindoor)
-                this.loadY1.push(el.nowPlantLoad == '-9999' && el.nowPlantLoad == '-9998' ? undefined : el.nowPlantLoad)
-                this.loadY2.push(el.predictedLoadUpLimit != '-9999' && el.predictedLoadUpLimit != '-9998' ? el.predictedLoadUpLimit : undefined)
-                this.loadY3.push(el.redictedLoadDownLimit != '-9999' && el.redictedLoadDownLimit != '-9998' ? el.redictedLoadDownLimit : undefined)
-            })
-        },
-        drawLeft() {
-            var leftLine = echarts.init(document.getElementById('leftLine'))
-            let option = {
-                tooltip: {
-                    trigger: 'axis'
-                },
-                title: {
-                    text: '室内外温度',
-                    fontSize: '16px',
-                    color: '#1F2429'
-                },
-
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-
-                xAxis: {
-                    type: 'category',
-                    boundaryGap: false,
-                    data: this.dataX
-                },
-                yAxis: {
-                    type: 'value',
-                    axisLabel: { formatter: '{value}  ℃' }
-                },
-                series: [
-                    {
-                        name: '室外温度',
-                        type: 'line',
-                        stack: '总量',
-                        data: this.dataY1,
-                        color: '#0091FF'
-                    },
-                    {
-                        name: '室内平均温度',
-                        type: 'line',
-                        stack: '总量',
-                        data: this.dataY2,
-                        color: '#00D6B9'
-                    },
-                    {
-                        name: '室内最高温度',
-                        type: 'line',
-                        stack: '总量',
-                        data: this.dataY3,
-                        color: '#FFBA6B'
-                    }
-                ]
-            }
-            leftLine.setOption(option)
-        },
-        drawRight() {
-            var rightLine = echarts.init(document.getElementById('rightLine'))
-            rightLine.setOption({
-                tooltip: {
-                    trigger: 'axis',
-                    axisPointer: {
-                        type: 'cross',
-                        animation: false,
-                        label: {
-                            backgroundColor: '#ccc',
-                            borderColor: '#aaa',
-                            borderWidth: 1,
-                            shadowBlur: 0,
-                            shadowOffsetX: 0,
-                            shadowOffsetY: 0,
-                            color: '#222'
-                        }
-                    }
-                    //  formatter: function (params) {
-                    // //     return params[2].name + '<br />' + params[2].value;
-                    // }
-                },
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-                title: {
-                    text: '预测冷量',
-                    fontSize: '16px',
-                    color: '#1F2429'
-                },
-                xAxis: {
-                    type: 'category',
-                    data: this.loadX
-                },
-                yAxis: {
-                    splitNumber: 3,
-                    splitLine: {
-                        // show: false,
-                        lineStyle: {
-                            type: 'dotted'
-                        }
-                    },
-                    axisLabel: { formatter: '{value}  kW' }
-                },
-                series: [
-                    {
-                        name: 'L',
-                        type: 'line',
-                        data: this.loadY2,
-                        lineStyle: {
-                            opacity: 0
-                        },
-                        stack: 'confidence-band',
-                        symbol: 'none'
-                    },
-                    {
-                        name: 'U',
-                        type: 'line',
-                        data: this.loadY3,
-                        lineStyle: {
-                            opacity: 0
-                        },
-                        areaStyle: {
-                            color: '#ccc'
-                        },
-                        stack: 'confidence-band',
-                        symbol: 'none'
-                    },
-                    {
-                        type: 'line',
-                        data: this.loadY1,
-                        hoverAnimation: false,
-                        symbolSize: 6,
-                        itemStyle: {
-                            color: '#0091FF'
-                        },
-                        showSymbol: false
-                    }
-                ]
             })
         }
     }
@@ -634,9 +243,6 @@ export default {
 </script>
 <style lang="scss" scoped>
 .snapshotss-box {
-    .reds {
-        color: #f54e45;
-    }
     .snapshotss-top {
         padding: 0 20px;
         display: flex;
@@ -813,53 +419,6 @@ export default {
     .snapshotss-foot {
         display: flex;
         justify-content: space-between;
-        height: 300px;
-        .leftL {
-            flex: 1;
-            .leftLengend {
-                text-align: center;
-                margin-bottom: 10px;
-                i {
-                    display: inline-block;
-                    width: 16px;
-                    height: 6px;
-                    border-radius: 3px;
-                    vertical-align: middle;
-                }
-                .innerIcon {
-                    background: rgba(0, 214, 185, 1);
-                    margin: 0 20px;
-                }
-                .outIcon {
-                    background: rgba(0, 145, 255, 1);
-                }
-                .innerMax {
-                    background: rgba(255, 186, 107, 1);
-                }
-            }
-        }
-        .rightL {
-            flex: 1;
-            .rightLengend {
-                text-align: center;
-                margin-bottom: 10px;
-                i {
-                    display: inline-block;
-                    width: 16px;
-                    height: 6px;
-                    border-radius: 3px;
-                    vertical-align: middle;
-                }
-                .reactCool {
-                    background: #0091ff;
-                }
-                .preCool {
-                    background: #0091ff;
-                    opacity: 0.29;
-                    margin-left: 20px;
-                }
-            }
-        }
     }
 }
 </style>

+ 27 - 16
src/views/evaluate/evTwoLevelMenu.vue

@@ -27,10 +27,10 @@
                             <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' :value2='value2'></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>
+                            <ev-stacked-line v-if='stackArr.length>=0' :stackArr='stackArr'></ev-stacked-line>
                         </div>
                     </div>
                     <div v-show='num == 2'>
@@ -55,7 +55,7 @@
                     </div>
                     <div v-show='num == 3'>
                         <ev-rate-title :chillerExecuteRateReal='chillerExecuteRateReal' :tab='3'></ev-rate-title>
-                        <ev-card v-if='cardList.length>0' :cardList='cardList' :date='date'></ev-card>
+                        <ev-card v-if='cardList.length>=0' :cardList='cardList' :date='date'></ev-card>
                     </div>
                 </div>
             </div>
@@ -138,20 +138,33 @@ export default {
             }
             this.tindoorFillRate = ''
             queryTdbDay(date, { getParams }).then(res => {
-                this.tindoorFillRate = res.tindoorFillRate != undefined ? res.tindoorFillRate.toFixed(1) : '--'
+                if (res.tindoorFillRate != undefined) {
+                    if (res.tindoorFillRate == -9999) {
+                        this.tindoorFillRate = 'x'
+                    } else if (res.tindoorFillRate == -9998) {
+                        this.tindoorFillRate = '--'
+                    } else {
+                        this.tindoorFillRate = Number(this.tindoorFillRate).toFixed(1)
+                    }
+                } else {
+                    this.tindoorFillRate = '--'
+                }
                 let content = res.content
                 this.stackArr = content
-                content.forEach(({ spaceDayRpt }) => {
-                    if (obj.hasOwnProperty(spaceDayRpt.floorId)) {
-                        obj[spaceDayRpt.floorId].children.push(spaceDayRpt)
-                    } else {
-                        obj[spaceDayRpt.floorId] = {
-                            id: spaceDayRpt.floorId,
-                            name: spaceDayRpt.floorLocalName,
-                            children: [spaceDayRpt]
+                if (content && content.length > 0) {
+                    content.forEach(({ spaceDayRpt }) => {
+                        if (obj.hasOwnProperty(spaceDayRpt.floorId)) {
+                            obj[spaceDayRpt.floorId].children.push(spaceDayRpt)
+                        } else {
+                            obj[spaceDayRpt.floorId] = {
+                                id: spaceDayRpt.floorId,
+                                name: spaceDayRpt.floorLocalName,
+                                children: [spaceDayRpt]
+                            }
                         }
-                    }
-                })
+                    })
+                }
+
                 this.dataList = Object.values(obj).map(i => {
                     // 增加 isExpand 属性
                     i.isExpand = i.children.some(c => c.isSatisfy == false)
@@ -205,7 +218,6 @@ export default {
             this.energySavingRate = ''
             this.chillerExecuteRateReal = ''
             querychiller(params).then(res => {
-                console.log('res', res)
                 // // 节能率
                 // if (res.content[0].energySavingRate != undefined) {
                 //     if (res.content[0].energySavingRate == -9999) {
@@ -272,7 +284,6 @@ export default {
             this.similarDay = {}
             this.samples = []
             energyDayQuery(date, {}).then(res => {
-                console.log('sssssssssss', res)
                 if (res.result == 'success') {
                     // 本日概况
                     this.current = res.current ? res.current : {}

+ 0 - 7
src/views/evaluate/evTwoTable.vue

@@ -155,11 +155,4 @@ export default {
         padding: 0;
     }
 }
-</style>
-<style lang="scss">
-.expandTable {
-    .el-table-column--selection .cell {
-        // margin-left: 100px;
-    }
-}
 </style>

+ 20 - 16
src/views/main/index.vue

@@ -83,6 +83,7 @@ import store from '../../store'
 import moment from 'moment'
 import { queryWeather } from '@/api/main/main.js'
 export default {
+    inject: ['reload'],
     data() {
         return {
             menuShow: false,
@@ -117,12 +118,12 @@ export default {
         }
     },
     props: ['headText'],
-    computed: {},
     methods: {
         changeProjectId(val) {
             console.log(val)
-             localStorage.setItem('projectId', val)
-            location.reload()
+            localStorage.setItem('projectId', val)
+            this.$store.state.projectId = val
+            this.reload()
         },
         navNone() {
             this.menuShow = false
@@ -141,22 +142,25 @@ export default {
                     this.temperatureOut = res.temperatureOut || '--'
                 }
             })
+        },
+        init() {
+            let projects = this.$store.state.projects.projects
+            projects.forEach(el => {
+                this.options.push({
+                    label: el.localName,
+                    value: el.id
+                })
+            })
+            setInterval(() => {
+                this.dateNow = moment()
+                    .locale('zh-cn')
+                    .format('YYYY.MM.DD HH:mm')
+            }, 1000)
+            this.query()
         }
     },
     mounted() {
-        let projects = this.$store.state.projects.projects
-        projects.forEach(el => {
-            this.options.push({
-                label: el.localName,
-                value: el.id
-            })
-        })
-        setInterval(() => {
-            this.dateNow = moment()
-                .locale('zh-cn')
-                .format('YYYY.MM.DD HH:mm')
-        }, 1000)
-        this.query()
+        this.init()
     }
 }
 </script>

+ 11 - 304
src/views/strategy/animationBox.vue

@@ -23,46 +23,33 @@
                 <span>实际冷量</span>
                 <span>
                     <font
-                        :class='parseInt(data.nowPlantLoad)=="-9999"?"reds":""'
+                        :class='parseInt(data.nowPlantLoad)=="-9999"?"red":""'
                     >{{(data.nowPlantLoad==undefined)?'--':(parseInt(data.nowPlantLoad)=='-9999'?'x':(parseInt(data.nowPlantLoad)=='-9998'?'--':parseInt(data.nowPlantLoad)))}}</font>
                     <font style='font-size:12px;'>kW</font>
                 </span>
                 <span>未来1小时预测冷量</span>
                 <span>
                     <font
-                        :class='parseInt(data.predictedLoad1h)=="-9999"?"reds":""'
+                        :class='parseInt(data.predictedLoad1h)=="-9999"?"red":""'
                     >{{(data.predictedLoad1h==undefined)?'--':(parseInt(data.predictedLoad1h)=='-9999'?'x':(parseInt(data.predictedLoad1h)=='-9998'?'--':parseInt(data.predictedLoad1h)))}}</font>
                     <font style='font-size:12px;'>kW</font>
                 </span>
             </div>
         </div>
         <div class='an-bottom'>
-            <div class='leftL'>
-                <div class='leftLengend'>
-                    <i class='outIcon'></i> 室外温度
-                    <i class='innerIcon'></i> 室内平均温度
-                    <i class='innerMax'></i> 室内最高温度
-                </div>
-                <div id='leftLine' style='width:100%;height:350px;margin-right:;24px;'></div>
-            </div>
-            <div class='rightL'>
-                <div class='rightLengend'>
-                    <i class='reactCool'></i> 实际供冷量
-                    <i class='preCool'></i>
-                    预测冷量
-                </div>
-                <div id='rightLine' style='width:100%;height:350px;'></div>
-            </div>
+            <strategy-line :chillerList='chillerHourList' v-if='chillerHourList.length>=0'></strategy-line>
         </div>
 
-        <div class='side-r' :class='chillerCommandQ.hasOwnProperty("isExecuted")?(chillerCommandQ.isExecuted?"green":"red"):"gray"'>
+        <div class='side-r' :class='chillerCommandQ.hasOwnProperty("isExecuted")?(chillerCommandQ.isExecuted?"green-bg":"red-bg"):"blue-bg"'>
             <div v-if='!showDraw' class='float-r' @click='showDraw = true'>
-                <div class='float-line' :class='chillerCommandQ.hasOwnProperty("isExecuted")?(chillerCommandQ.isExecuted?"green":"red"):"gray"'></div>
+                <div
+                    class='float-line'
+                    :class='chillerCommandQ.hasOwnProperty("isExecuted")?(chillerCommandQ.isExecuted?"green-bg":"red-bg"):"blue-bg"'
+                ></div>
                 <img src='../../assets/open.png' alt />
                 <p>当前策略</p>
             </div>
         </div>
-
         <bom-box v-if='Object.keys(chillerCommandQ).length>0' :class='["draw", {"open": showDraw}]' :data='chillerCommandQ' @close='showDraw = false'></bom-box>
     </div>
 </template>
@@ -70,6 +57,7 @@
 <script>
 import echarts from 'echarts'
 import bomBox from './bomBox'
+import strategyLine from '@/components/strategyLine'
 
 export default {
     data() {
@@ -87,239 +75,13 @@ export default {
             dataY1Max: ''
         }
     },
-    components: { bomBox },
-    props: ['data', 'chillerHourList', 'chillerCommandQ'],
-    watch: {
-        chillerHourList(newVal, oldVal) {
-            if (newVal) {
-                this.getData()
-                this.drawLeft()
-                this.drawRight()
-            }
-        }
-    },
-    methods: {
-        getMax(arr) {
-            var max = arr[0]
-            for (var i = 0; i < arr.length; i++) {
-                if (max < arr[i]) {
-                    max = arr[i]
-                }
-            }
-            return max
-        },
-        getMin(arr) {
-            var min = arr[0]
-            for (var i = 0; i < arr.length; i++) {
-                if (arr[i] == '') {
-                    arr.splice(arr[i], 1)
-                }
-                if (min > arr[i]) {
-                    min = arr[i]
-                }
-            }
-
-            return min
-        },
-        getData() {
-            this.chillerHourList.forEach(el => {
-                el.value = el.time.slice(0, 2) + ':' + el.time.slice(2, 4)
-                this.dataX.push(el.value)
-                this.loadX.push(el.value)
-                this.dataY1.push(el.tout == '-9999' ? undefined : el.tout)
-                this.dataY2.push(el.meanTindoor == '-9999' ? undefined : el.meanTindoor)
-                this.dataY3.push(el.maxTindoor == '-9999' ? undefined : el.maxTindoor)
-                this.loadY1.push(el.nowPlantLoad == '-9999' || el.nowPlantLoad == '-9998' ? undefined : el.nowPlantLoad)
-                this.loadY2.push(el.predictedLoadUpLimit != '-9999' && el.predictedLoadUpLimit != '-9998' ? el.predictedLoadUpLimit : undefined)
-                this.loadY3.push(el.redictedLoadDownLimit != '-9999' && el.redictedLoadDownLimit != '-9998' ? el.redictedLoadDownLimit : undefined)
-                let arr = []
-                arr = arr
-                    .concat(this.dataY1)
-                    .concat(this.dataY2)
-                    .concat(this.dataY3)
-                this.dataY1Min = this.getMin(arr)
-                this.dataY1Max = this.getMax(arr)
-                let minG = parseInt(this.dataY1Min % 10),
-                    minS = parseInt((this.dataY1Min % 100) / 10),
-                    maxG = parseInt(this.dataY1Max % 10),
-                    maxS = parseInt((this.dataY1Max % 100) / 10)
-                if (minG > 5) {
-                    this.dataY1Min = String(minS) + '5'
-                } else if (minG <= 5) {
-                    this.dataY1Min = String(minS) + '0'
-                }
-                if (maxG >= 5) {
-                    this.dataY1Max = String(maxS + 1) + '0'
-                } else if (maxG < 5) {
-                    this.dataY1Max = String(maxS) + '5'
-                }
-                // console.log(arr)
-            })
-        },
-        drawLeft() {
-            var leftLine = echarts.init(document.getElementById('leftLine'))
-            let option = {
-                tooltip: {
-                    trigger: 'axis',
-                    formatter: function(data) {
-                        return `${data[0].name}<br/>${data[0].seriesName}  :${data[0].value ? data[0].value.toFixed(1) : ''}<br/>${
-                            data[1].seriesName
-                        }  :${data[1].value ? data[1].value.toFixed(1) : ''} <br/> ${data[2].seriesName}  :${
-                            data[2].value ? data[2].value.toFixed(1) : ''
-                        }`
-                    }
-                },
-                title: {
-                    text: '室内外温度',
-                    fontSize: '16px',
-                    color: '#1F2429'
-                },
-
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-
-                xAxis: {
-                    type: 'category',
-                    boundaryGap: false,
-                    data: this.dataX
-                },
-                yAxis: {
-                    type: 'value',
-                    min: Number(this.dataY1Min),
-                    max: Number(this.dataY1Max),
-                    interval: 2,
-                    axisLabel: { formatter: '{value}  ℃' }
-                },
-                series: [
-                    {
-                        name: '室外温度',
-                        type: 'line',
-
-                        data: this.dataY1,
-                        color: '#0091FF'
-                    },
-                    {
-                        name: '室内平均温度',
-                        type: 'line',
-
-                        data: this.dataY2,
-                        color: '#00D6B9'
-                    },
-                    {
-                        name: '室内最高温度',
-                        type: 'line',
-
-                        data: this.dataY3,
-                        color: '#FFBA6B'
-                    }
-                ]
-            }
-            leftLine.setOption(option)
-        },
-        drawRight() {
-            var rightLine = echarts.init(document.getElementById('rightLine'))
-            rightLine.setOption({
-                tooltip: {
-                    trigger: 'axis',
-                    axisPointer: {
-                        type: 'cross',
-                        animation: false,
-                        label: {
-                            backgroundColor: '#ccc',
-                            borderColor: '#aaa',
-                            borderWidth: 1,
-                            shadowBlur: 0,
-                            shadowOffsetX: 0,
-                            shadowOffsetY: 0,
-                            color: '#222'
-                        }
-                    }
-                    //  formatter: function (params) {
-                    // //     return params[2].name + '<br />' + params[2].value;
-                    // }
-                },
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-                title: {
-                    text: '预测冷量',
-                    fontSize: '16px',
-                    color: '#1F2429'
-                },
-                xAxis: {
-                    type: 'category',
-                    data: this.loadX
-                },
-                yAxis: {
-                    splitNumber: 3,
-                    splitLine: {
-                        // show: sfalse,
-                        lineStyle: {
-                            type: 'dotted'
-                        }
-                    },
-                    axisLabel: { formatter: '{value}  kW' }
-                },
-                series: [
-                    {
-                        name: 'L',
-                        type: 'line',
-                        data: this.loadY2,
-                        lineStyle: {
-                            opacity: 0
-                        },
-                        stack: 'confidence-band',
-                        symbol: 'none'
-                    },
-                    {
-                        name: 'U',
-                        type: 'line',
-                        data: this.loadY3,
-                        lineStyle: {
-                            opacity: 0
-                        },
-                        areaStyle: {
-                            color: '#ccc'
-                        },
-                        stack: 'confidence-band',
-                        symbol: 'none'
-                    },
-                    {
-                        type: 'line',
-                        data: this.loadY1,
-                        hoverAnimation: false,
-                        symbolSize: 6,
-                        itemStyle: {
-                            color: '#0091FF'
-                        },
-                        showSymbol: false
-                    }
-                ]
-            })
-        }
-    },
-    created() {
-        this.getData()
-    },
-    mounted() {
-        this.drawLeft()
-        this.drawRight()
-    }
+    components: { bomBox, strategyLine },
+    props: ['data', 'chillerHourList', 'chillerCommandQ']
 }
 </script>
 
 <style lang='scss' scoped>
 .an-content {
-    .reds {
-        color: #f54e45;
-    }
     .snapshotss-center2 {
         padding: 20px 0;
         margin-bottom: 20px;
@@ -423,15 +185,6 @@ export default {
             }
         }
     }
-    .red {
-        background: #f54e45ff;
-    }
-    .green {
-        background: #34c724ff;
-    }
-    .gray {
-        background: #0091ff;
-    }
     .side-r:hover {
         width: 68px;
         background: #fff;
@@ -454,52 +207,6 @@ export default {
     .an-bottom {
         margin-top: 45px;
         display: flex;
-        .leftL {
-            flex: 1;
-            .leftLengend {
-                text-align: center;
-                margin-bottom: 10px;
-                i {
-                    display: inline-block;
-                    width: 16px;
-                    height: 6px;
-                    border-radius: 3px;
-                    vertical-align: middle;
-                }
-                .innerIcon {
-                    background: rgba(0, 214, 185, 1);
-                    margin: 0 20px;
-                }
-                .outIcon {
-                    background: rgba(0, 145, 255, 1);
-                }
-                .innerMax {
-                    background: rgba(255, 186, 107, 1);
-                }
-            }
-        }
-        .rightL {
-            flex: 1;
-            .rightLengend {
-                text-align: center;
-                margin-bottom: 10px;
-                i {
-                    display: inline-block;
-                    width: 16px;
-                    height: 6px;
-                    border-radius: 3px;
-                    vertical-align: middle;
-                }
-                .reactCool {
-                    background: #0091ff;
-                }
-                .preCool {
-                    background: #0091ff;
-                    opacity: 0.29;
-                    margin-left: 20px;
-                }
-            }
-        }
     }
 }
 </style>

+ 5 - 25
src/views/strategy/bomBox.vue

@@ -1,6 +1,6 @@
 <template>
     <div class='bomb'>
-        <div class='bomb-line' :class='data.hasOwnProperty("isExecuted")?(data.isExecuted?"green":"red"):"gray"'></div>
+        <div class='bomb-line' :class='data.hasOwnProperty("isExecuted")?(data.isExecuted?"green-bg":"red-bg"):"blue-bg"'></div>
         <div class='close' @click='$emit("close")'>
             <img src='../../assets/close.png' alt />
         </div>
@@ -40,14 +40,14 @@
                     <span>实际冷量</span>
                     <span>
                         <font
-                            :class='parseInt(data.nowPlantLoad)=="-9999"?"reds":""'
+                            :class='parseInt(data.nowPlantLoad)=="-9999"?"red":""'
                         >{{(data.nowPlantLoad==undefined)?'--':(parseInt(data.nowPlantLoad)=='-9999'?'x':(parseInt(data.nowPlantLoad)=='-9998'?'--':parseInt(data.nowPlantLoad)))}}</font>
                         <font style='font-size:12px;'>kW</font>
                     </span>
                     <span>未来1小时预测冷量</span>
                     <span>
                         <font
-                            :class='parseInt(data.predictedLoad1h)=="-9999"?"reds":""'
+                            :class='parseInt(data.predictedLoad1h)=="-9999"?"red":""'
                         >{{(data.predictedLoad1h==undefined)?'--':(parseInt(data.predictedLoad1h)=='-9999'?'x':(parseInt(data.predictedLoad1h)=='-9998'?'--':parseInt(data.predictedLoad1h)))}}</font>
                         <font style='font-size:12px;'>kW</font>
                     </span>
@@ -102,8 +102,9 @@ export default {
                     {
                         name: '',
                         type: 'pie',
-                        radius: ['50%', '70%'],
+                        radius: ['50%', '60%'],
                         avoidLabelOverlap: false,
+                        hoverAnimation: false,
                         label: {
                             normal: {
                                 show: true,
@@ -111,13 +112,6 @@ export default {
                                 formatter: function(formatter) {
                                     return formatter.percent + '%'
                                 }
-                            },
-                            emphasis: {
-                                show: true,
-                                textStyle: {
-                                    fontSize: '30',
-                                    fontWeight: 'bold'
-                                }
                             }
                         },
                         labelLine: {
@@ -143,9 +137,6 @@ export default {
 
 <style lang='scss' scoped>
 .bomb {
-    .reds {
-        color: #f54e45;
-    }
     background: #cccccc;
     width: 98%;
     display: flex;
@@ -162,15 +153,6 @@ export default {
         height: 100%;
         border-radius: 8px 0 0 8px;
     }
-    .red {
-        background: #f54e45ff;
-    }
-    .green {
-        background: #34c724ff;
-    }
-    .gray {
-        background: #0091ff;
-    }
     .close {
         cursor: pointer;
         margin-left: 10px;
@@ -268,8 +250,6 @@ export default {
                 }
             }
         }
-        .bomb-right-bottom {
-        }
     }
 }
 </style>

+ 5 - 2
src/views/strategy/index.vue

@@ -29,7 +29,7 @@
                 <p class='strate-right-title'>当前状态</p>
                 <water-unit :data='chillerOrg ' :type='1'></water-unit>
                 <animation-box
-                    v-if='Object.keys(chillerCommand).length>0||chillerHourList.length>0'
+                    v-if='Object.keys(chillerCommand).length>=0||chillerHourList.length>=0'
                     :data='chillerOrg'
                     :chillerHourList='chillerHourList'
                     :chillerCommandQ='chillerCommand'
@@ -94,13 +94,16 @@ export default {
             let params = {
                 getParams: {}
             }
+            this.chillerHourList = []
+            this.chillerCommand = {}
+            this.chillerOrg = {}
             queryCommand(params).then(res => {
                 console.log(res)
                 this.chillerCount = res.chillerCount || 0
                 this.chillerIsNotExecutedCount = res.chillerIsNotExecutedCount ? res.chillerIsNotExecutedCount : 0
                 this.chillerOrg = res.chillerOrg || {}
                 this.chillerCommand = res.chillerCommand || {}
-                this.chillerHourList = res.chillerHourList
+                this.chillerHourList = res.chillerHourList || []
             })
         },
         getData() {

+ 0 - 222
src/views/strategy/test.vue

@@ -1,222 +0,0 @@
-<template>
- <div class='demo'>
-    <div class='box'></div>
-    <div id='testEcharts' style='width;400px;height:400px'></div>
-    <div id='pieEcharts' style='width:400px;height:400px;'></div>
- </div>
-</template>
-<script>
-import echarts from 'echarts'
-    export default{
-        data(){
-            return{
-
-            }
-        },
-        methods:{
-            draw(){
-                var pieEcharts = echarts.init(document.getElementById('pieEcharts'))
-                pieEcharts.setOption({
-                tooltip: {
-                    trigger: 'axis',
-                    axisPointer: {
-                        type: 'cross',
-                        animation: false,
-                        label: {
-                            backgroundColor: '#ccc',
-                            borderColor: '#aaa',
-                            borderWidth: 1,
-                            shadowBlur: 0,
-                            shadowOffsetX: 0,
-                            shadowOffsetY: 0,
-                            color: '#222'
-                        }
-                    },
-                    formatter: function (params) {
-                        return params[2].name + '<br />' + params[2].value;
-                    }
-                },
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-                xAxis: {
-                    type: 'category',
-                    data: ['00:00','03:00','06:00','09:00','12:00','15:00','18:00','21:00','24:00'],
-                    
-                },
-                yAxis: {
-                    
-                   
-                    splitNumber: 3,
-                    splitLine: {
-                        show: false
-                    }
-                },
-                series: [{
-                    name: 'L',
-                    type: 'line',
-                    data: [20,30,40,50,60,50,40,30,20],
-                    lineStyle: {
-                        opacity: 0
-                    },
-                    stack: 'confidence-band',
-                    symbol: 'none'
-                }, {
-                    name: 'U',
-                    type: 'line',
-                    data: [20,30,50,60,50,40,30,20,40],
-                    lineStyle: {
-                        opacity: 0
-                    },
-                    areaStyle: {
-                        color: '#ccc'
-                    },
-                    stack: 'confidence-band',
-                    symbol: 'none'
-                }, {
-                    type: 'line',
-                    data: [20,30,40,50,60,40,30,20,50],
-                    hoverAnimation: false,
-                    symbolSize: 6,
-                    itemStyle: {
-                        color: '#c23531'
-                    },
-                    showSymbol: false
-                }]
-            });
-            },
-            drawIt(){        
-                var testEcharts = echarts.init(document.getElementById('testEcharts'))
-                var colors = ['#5793f3', '#d14a61', '#675bba'];
-                let option = {
-                    color: colors,
-                    tooltip: {
-                        trigger: 'axis',
-                        axisPointer: {
-                            type: 'cross'
-                        }
-                    },
-                    grid: {
-                        right: '20%'
-                    },
-                    toolbox: {
-                        feature: {
-                            dataView: {show: true, readOnly: false},
-                            restore: {show: true},
-                            saveAsImage: {show: true}
-                        }
-                    },
-                    
-                    xAxis: [
-                        {
-                            type: 'category',
-                            axisTick: {
-                                alignWithLabel: true
-                            },
-                            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
-                        }
-                    ],
-                    yAxis: [
-                        {
-                            type: 'value',
-                            name: '蒸发量',
-                            min: 0,
-                            max: 25,
-                            position: 'right',
-                            axisLabel: {
-                                formatter: '{value} ml'
-                            }
-                        },
-                        {
-                            type: 'value',
-                            name: '',
-                            min: 0,
-                            max: 25,
-                            position: 'right',
-                            offset: 80,
-                            axisLine:{
-                                show:false,
-                            },
-                            axisTick:{
-                                show:false,
-                            },
-                               axisLabel : {
-                                    formatter: function(){
-                                        return "";
-                                    }
-
-                                }
-                            
-                        },
-                        {
-                            type: 'value',
-                            name: '温度',
-                            min: 0,
-                            max: 25,
-                            position: 'left',
-                            axisLine: {
-                                lineStyle: {
-                                    color: colors[2]
-                                }
-                            },
-                            axisLabel: {
-                                formatter: '{value} °C'
-                            }
-                        },    
-                    ],
-                    series: [
-                        {
-                            name: '蒸发量',
-                            type: 'bar',                        
-                            data: [2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6]
-                        },
-                        {
-                            name: '降水量',
-                            type: 'bar',                            
-                            data: [2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6]
-                        },
-                        {
-                            name: '降雨量',
-                            type: 'bar',
-                            data: [2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6]
-                        },
-                        {
-                            name: '平均温度',
-                            type: 'line',
-                            yAxisIndex: 2,
-                            data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
-                        },
-                        {
-                            name: '平均co2',
-                            type: 'line',
-                            yAxisIndex: 2,
-                            data: [2.2, 3.0, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2, 14.0]
-                        }
-                    ]
-                };
-                testEcharts.setOption(option)
-            }
-        },
-        mounted(){
-            this.drawIt();
-            this.draw();
-        }
-    }
-</script>
-<style lang="scss" scoped>
-.demo{
-    position:relative;
-    .box{
-        position:absolute;
-        left:20px;
-        width:700px;
-        height:400px;
-        background:#0091FF;
-        border-radius:6px 6px 0 0;
-
-    }
-}
-</style>