Browse Source

Merge remote-tracking branch 'origin' into dev_wanke

zhulizhen1111 5 years ago
parent
commit
36c9924e4e

+ 160 - 0
package-lock.json

@@ -0,0 +1,160 @@
+{
+  "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"
+      }
+    }
+  }
+}

+ 3 - 1
package.json

@@ -13,7 +13,9 @@
     "axios": "^0.19.0",
     "echarts": "^4.2.1",
     "element-ui": "^2.9.1",
+    "mkdirp": "^1.0.3",
     "moment": "^2.24.0",
+    "node-releases": "^1.1.52",
     "vue": "^2.5.2",
     "vue-router": "^3.0.1"
   },
@@ -30,7 +32,7 @@
     "chalk": "^2.0.1",
     "copy-webpack-plugin": "^4.0.1",
     "css-loader": "^0.28.0",
-    "extract-text-webpack-plugin": "^3.0.0",
+    "extract-text-webpack-plugin": "^3.0.2",
     "file-loader": "^1.1.4",
     "friendly-errors-webpack-plugin": "^1.6.1",
     "html-webpack-plugin": "^2.30.1",

+ 2 - 21
src/utils/query.js

@@ -11,27 +11,8 @@ function query(search) {
     return obj
 }
 
-function shutDown(num, type, len) {
-    if (num == '-9998') {
-        if (type) {
-            num = 0
-        } else {
-            num = '--'
-        }
-        return num
-    } else if (num == '-9999') {
-        num = 'x'
-        return num
-    } else {
-        if ((num || num === 0) && !type && len) {
-            num = num.toFixed(len)
-        } else {
-            num = '--'
-        }
-        return num
-    }
-}
+
 
 export {
-    query, shutDown
+    query
 }

+ 5 - 3
src/views/appeal/index.vue

@@ -134,7 +134,7 @@
         </div>
         <div class='view-dialog'>
             <el-dialog title='策略推出时状况' :visible.sync='viewSnapshots' :close-on-click-modal='false' width='1260px'>
-                <ev-snapshots-dialog :appealsDate='appealsDate' :time='time'></ev-snapshots-dialog>
+                <ev-snapshots-dialog :appDate='appDate' :time='time'></ev-snapshots-dialog>
             </el-dialog>
         </div>
     </div>
@@ -153,7 +153,7 @@ export default {
             appealsArr: [], //可申诉的未执行策,
             appealsArr1: [],
             InAuditArr: [], //审核中
-            auditCompletedArr: [], //审核完成,超时未申诉
+            auditCompletedArr: [], //审核完成
             appealsDate: '',
             viewSnapshots: false,
             newArr: [],
@@ -165,7 +165,8 @@ export default {
             day: '',
             day1: '',
             yesterday: '',
-            today: ''
+            today: '',
+            appDate:''
         }
     },
     components: {
@@ -199,6 +200,7 @@ export default {
         lookQuickData(item) {
             this.viewSnapshots = true
             this.time = item.recommend.time
+            this.appDate = item.recommend.date
         },
         backoutClick(item, type) {
             let params = {

+ 7 - 4
src/views/evaluate/evCard.vue

@@ -82,7 +82,6 @@
 <script>
 import EvSnapshotsDialog from './evSnapshotsDialog'
 import { queryWorkflow } from '@/api/appeal/appeal.js'
-import { shutDown } from '@/utils/query.js'
 
 export default {
     data() {
@@ -90,8 +89,7 @@ export default {
             viewSnapshots: false,
             ids: [],
             titles: [],
-            time: '',
-            shutDown: shutDown
+            time: ''
         }
     },
     props: ['cardList', 'date'],
@@ -110,7 +108,7 @@ export default {
         },
         queryFlow(ids) {
             let postParams = {
-                crireria: {
+                criteria: {
                     id: ids
                 }
             }
@@ -147,6 +145,11 @@ export default {
     },
     mounted() {
         this.getAppealId()
+    },
+    watch: {
+        cardList(n, o) {
+            this.getAppealId()
+        }
     }
 }
 </script>

+ 0 - 79
src/views/evaluate/evEnergySavingRate.vue

@@ -1,79 +0,0 @@
-<template>
-    <div id='box3' style='width:100%;height:100%;'></div>
-</template>
-<script>
-import echarts from 'echarts'
-
-export default {
-    data() {
-        return {}
-    },
-    mounted() {
-        this.$nextTick(function() {
-            this.pie(this.energySavingRate, '#box3', ['#00D6B9', '#D5F6F2'])
-        })
-    },
-    props: ['energySavingRate'],
-    watch: {
-        energySavingRate(val, old) {
-            if (val) {
-                this.pie(val, '#box3', ['#00D6B9', '#D5F6F2'])
-            }
-        }
-    },
-    methods: {
-        pie(pieData, box, colors) {
-            const that = this
-            const myChart = echarts.init(document.querySelector(box))
-            const data = pieData
-            const option = {
-                grid: {
-                    top: 5,
-                    bottom: 5
-                },
-                color: colors,
-                series: [
-                    {
-                        name: 'valueOfMarket',
-                        type: 'pie',
-                        center: ['50%', '50%'],
-                        radius: ['60%', '70%'],
-                        avoidLabelOverlap: false,
-                        hoverAnimation: false,
-                        label: {
-                            normal: {
-                                show: true,
-                                position: 'center',
-                                color: '#000000',
-                                fontSize: 20,
-                                lineHeight: 0,
-                                formatter: '{b}\n{c}%'
-                            }
-                        },
-                        data: [
-                            {
-                                value: data,
-                                label: {
-                                    normal: {
-                                        show: true
-                                    }
-                                }
-                            },
-                            {
-                                value: 100 - data,
-                                name: '',
-                                label: {
-                                    normal: {
-                                        show: false
-                                    }
-                                }
-                            }
-                        ]
-                    }
-                ]
-            }
-            myChart.setOption(option)
-        }
-    }
-}
-</script>

+ 0 - 79
src/views/evaluate/evImplementationRate.vue

@@ -1,79 +0,0 @@
-<template>
-    <div id='box2' style='width:100%;height:100%;'></div>
-</template>
-<script>
-import echarts from 'echarts'
-
-export default {
-    data() {
-        return {}
-    },
-    props: ['chillerExecuteRate'],
-    mounted() {
-        this.$nextTick(function() {
-            this.pie(this.chillerExecuteRate, '#box2', ['#FFBA6B', '#FEE9D2'])
-        })
-    },
-    watch: {
-        chillerExecuteRate(val, old) {
-            if (val) {
-                this.pie(val, '#box2', ['#FFBA6B', '#FEE9D2'])
-            }
-        }
-    },
-    methods: {
-        pie(pieData, box, colors) {
-            const that = this
-            const myChart = echarts.init(document.querySelector(box))
-            const data = pieData
-            const option = {
-                grid: {
-                    top: 5,
-                    bottom: 5
-                },
-                color: colors,
-                series: [
-                    {
-                        name: 'valueOfMarket',
-                        type: 'pie',
-                        center: ['50%', '50%'],
-                        radius: ['60%', '70%'],
-                        avoidLabelOverlap: false,
-                        hoverAnimation: false,
-                        label: {
-                            normal: {
-                                show: true,
-                                position: 'center',
-                                color: '#000000',
-                                fontSize: 20,
-                                lineHeight: 0,
-                                formatter: '{b}\n{c}%'
-                            }
-                        },
-                        data: [
-                            {
-                                value: data,
-                                label: {
-                                    normal: {
-                                        show: true
-                                    }
-                                }
-                            },
-                            {
-                                value: 100 - data,
-                                name: '',
-                                label: {
-                                    normal: {
-                                        show: false
-                                    }
-                                }
-                            }
-                        ]
-                    }
-                ]
-            }
-            myChart.setOption(option)
-        }
-    }
-}
-</script>

+ 73 - 35
src/views/evaluate/evIndoorTemperature.vue

@@ -69,20 +69,27 @@ export default {
         },
         drawIt() {
             let myCharts = echarts.init(document.getElementById('pCharts2'))
-            var colors = ['#34C724', '#8D9399', '#F54E45', '#0091FF', '#00D6B9']
             var option = {
-                color: colors,
+                // color: colors,
                 tooltip: {
                     trigger: 'axis',
                     axisPointer: {
                         type: 'shadow'
                     },
                     formatter: function(params) {
-                        return `${params[0].name}<br/>${params[0].value == 2 ? params[0].seriesName : params[1].seriesName}<br/>${
-                            params[params.length - 2].seriesName
-                        }:${params[params.length - 2].value ? Number(params[params.length - 2].value).toFixed(1) : 'x'}%<br/>${
-                            params[params.length - 1].seriesName
-                        }:${params[params.length - 1].value ? Number(params[params.length - 1].value).toFixed(1) : 'x'}%`
+                        if (params.length == 2) {
+                            return `${params[0].name}<br/>${params[0].seriesName}<br/>${params[1].seriesName}:${
+                                params[1].value ? Number(params[1].value).toFixed(1) : 'x'
+                            }%`
+                        } else {
+                            return `${params[0].name}<br/>${
+                                params[0].value == 2 ? params[0].seriesName : params[1].value == 2 ? params[1].seriesName : params[2].seriesName
+                            }<br/>${params[params.length - 2].seriesName}:${
+                                params[params.length - 2].value ? Number(params[params.length - 2].value).toFixed(1) : 'x'
+                            }%<br/>${params[params.length - 1].seriesName}:${
+                                params[params.length - 1].value ? Number(params[params.length - 1].value).toFixed(1) : 'x'
+                            }%`
+                        }
                     }
                 },
                 grid: {
@@ -100,25 +107,40 @@ export default {
                                 color: '#8D9399'
                             }
                         },
-                        // axisLabel: {
-                        //     interval: 0 //代表显示所有x轴标签显示
-                        // },
                         data: this.dataX
                     }
                 ],
                 yAxis: [
                     {
                         type: 'value',
+                        name: '室内温度满足率',
+                        axisLine: {
+                            lineStyle: {
+                                // color: '#8D9399'
+                            }
+                        },
+                        min: 0,
+                        max: 100,
+                        splitLine: {
+                            show: false
+                        },
+                        position: 'left',
+                        axisLabel: {
+                            formatter: '{value} %'
+                        }
+                    },
+                    {
+                        type: 'value',
                         name: '节能率',
                         axisLine: {
                             lineStyle: {
-                                color: '#8D9399'
+                                // color: '#8D9399'
                             }
                         },
                         splitLine: {
                             show: false
                         },
-                        min: 0,
+                        // min: ,
                         max: 100,
                         position: 'right',
                         axisLabel: {
@@ -141,57 +163,73 @@ export default {
                                 return ''
                             }
                         }
-                    },
-                    {
-                        type: 'value',
-                        name: '室内温度满足率',
-                        axisLine: {
-                            lineStyle: {
-                                color: '#8D9399'
-                            }
-                        },
-                        splitLine: {
-                            show: false
-                        },
-                        position: 'left',
-                        axisLabel: {
-                            formatter: '{value} %'
-                        }
                     }
                 ],
+                // var colors = ['#34C724', '#8D9399', '#F54E45', '#0091FF', '#00D6B9']
                 series: [
                     {
                         name: '按照策略执行',
                         type: 'bar',
                         barWidth: '80%',
                         stack: '堆叠',
-                        data: this.strategy1
+                        data: this.strategy1,
+                        itemStyle: {
+                            normal: {
+                                color: '#34C724'
+                            }
+                        }
                     },
                     {
                         name: '未按照策略执行',
                         type: 'bar',
                         barWidth: '80%',
                         stack: '堆叠',
-                        data: this.strategy2
+                        data: this.strategy3,
+                        itemStyle: {
+                            normal: {
+                                color: '#F54E45'
+                            }
+                        }
                     },
                     {
                         name: '未按照策略执行,申诉通过',
                         type: 'bar',
                         barWidth: '80%',
                         stack: '堆叠',
-                        data: this.strategy3
+                        itemStyle: {
+                            normal: {
+                                color: '#8D9399'
+                            }
+                        },
+                        data: this.strategy2
                     },
                     {
                         name: '室内温度满足率',
                         type: 'line',
-                        yAxisIndex: 2,
-                        data: this.indoorY
+                        yAxisIndex: 0,
+                        data: this.indoorY,
+                        itemStyle: {
+                            normal: {
+                                color: '#0091FF',
+                                lineStyle: {
+                                    color: '#0091FF'
+                                }
+                            }
+                        }
                     },
                     {
                         name: '节能率',
                         type: 'line',
-                        yAxisIndex: 2,
-                        data: this.energyY
+                        yAxisIndex: 1,
+                        data: this.energyY,
+                        itemStyle: {
+                            normal: {
+                                color: '#00D6B9',
+                                lineStyle: {
+                                    color: '#00D6B9'
+                                }
+                            }
+                        }
                     }
                 ]
             }

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

@@ -3,14 +3,20 @@
         <span v-if='tab==1' class='count-bottom-text'>
             <span class='span1'></span>
             <span class='span2 Micbold'>室内温度满足率</span>
-            <span class='span3'>{{rate||'--'}}%</span>
+            <span class='span3'>
+                <font :class='rate=="x"?"red":""'>{{rate||'--'}}</font>%
+            </span>
         </span>
         <span v-if='tab==2' class='count-bottom-text'>
             <span class='span1'></span>
             <span class='span2 Micbold'>节能率</span>
-            <span class='span4'>{{rate}}%</span>
+            <span class='span4'>
+                <font :class='rate=="x"?"red":""'>{{rate}}</font>%
+            </span>
             <span class='span5'>准确率</span>
-            <span class='span6'>{{accuracy}}%</span>
+            <span class='span6'>
+                <font :class='accuracy=="x"?"red":""'>{{accuracy}}</font>%
+            </span>
         </span>
         <span v-if='tab==3' class='count-bottom-text'>
             <span class='span1'></span>
@@ -82,5 +88,8 @@ export default {
             height: 20px;
         }
     }
+    .red {
+        color: #f54e45;
+    }
 }
 </style>

+ 0 - 81
src/views/evaluate/evSatisfactionRate.vue

@@ -1,81 +0,0 @@
-<template>
-    <div id='box1' style='width:100%;height:100%;'></div>
-</template>
-<script>
-import echarts from 'echarts'
-
-export default {
-    data() {
-        return {}
-    },
-    props: ['tindoorFillRate'],
-    mounted() {
-        this.$nextTick(function() {
-            this.pie(this.tindoorFillRate, '#box1', ['#0091FF', '#E1F2FF'])
-        })
-    },
-    methods: {
-        pie(pieData, box, colors) {
-            const that = this
-            const myChart = echarts.init(document.querySelector(box))
-            const data = pieData
-            const option = {
-                grid: {
-                    top: 5,
-                    bottom: 5
-                },
-                color: colors,
-                series: [
-                    {
-                        name: 'valueOfMarket',
-                        type: 'pie',
-                        center: ['50%', '50%'],
-                        radius: ['60%', '70%'],
-                        avoidLabelOverlap: false,
-                        hoverAnimation: false,
-                        label: {
-                            normal: {
-                                show: true,
-                                position: 'center',
-                                color: '#000000',
-                                fontSize: 20,
-                                lineHeight: 0,
-                                formatter: '{b}\n{c}%'
-                            }
-                        },
-                        data: [
-                            {
-                                value: data,
-                                label: {
-                                    normal: {
-                                        show: true
-                                    }
-                                }
-                            },
-                            {
-                                value: 100 - data,
-                                name: '',
-                                label: {
-                                    normal: {
-                                        show: false
-                                    }
-                                }
-                            }
-                        ]
-                    }
-                ]
-            }
-            myChart.setOption(option)
-        }
-    },
-    watch: {
-        tindoorFillRate(val, old) {
-            console.log(val)
-            console.log(old)
-            if (val) {
-                this.pie(val, '#box1', ['#0091FF', '#E1F2FF'])
-            }
-        }
-    }
-}
-</script>

+ 2 - 2
src/views/evaluate/evSnapshotsDialog.vue

@@ -185,7 +185,7 @@
 import echarts from 'echarts'
 import { queryQuickData } from '@/api/strategy/strategy.js'
 export default {
-    props: ['appealsDate', 'time'],
+    props: ['appDate', 'time'],
     data() {
         return {
             imgFinish: true,
@@ -273,7 +273,7 @@ export default {
         getQuickData() {
             let params = {
                 getParams: {
-                    date: this.appealsDate, //日期 yyyyMMdd
+                    date: this.appDate, //日期 yyyyMMdd
                     time: this.time
                 }
             }

+ 64 - 18
src/views/evaluate/evTwoLevelMenu.vue

@@ -110,14 +110,6 @@ export default {
         this.init()
     },
     methods: {
-        // changeSwitch(){
-        //   let getParams = {
-        //     isSatisfy:this.value2
-        //   }
-        //   queryTdbDay({getParams}).then(res=>{
-
-        //   })
-        // },
         init() {
             this.type = this.$route.query.type
             this.date = this.$route.query.name
@@ -127,9 +119,6 @@ export default {
             if (this.date) {
                 this.date = this.formatterStr3(new Date().getFullYear() + this.formatterStr2(this.date))
             }
-            // if (this.num && this.date) {
-            //     this.changeNumMethod(this.date)
-            // }
         },
         // @
         formatterStr2(str) {
@@ -163,7 +152,6 @@ export default {
                         }
                     }
                 })
-                console.log(obj)
                 this.dataList = Object.values(obj).map(i => {
                     // 增加 isExpand 属性
                     i.isExpand = i.children.some(c => c.isSatisfy == false)
@@ -215,14 +203,43 @@ export default {
             }
             this.accuracy = ''
             this.energySavingRate = ''
+            this.chillerExecuteRateReal = ''
             querychiller(params).then(res => {
-                // 节能率
-                this.energySavingRate = res.content[0].energySavingRate != undefined ? res.content[0].energySavingRate.toFixed(1) : '--'
-                // 准确率
-                this.accuracy = res.content[0].accuracy != undefined ? res.content[0].accuracy.toFixed(1) : '--'
+                console.log('res', res)
+                // // 节能率
+                // if (res.content[0].energySavingRate != undefined) {
+                //     if (res.content[0].energySavingRate == -9999) {
+                //         this.energySavingRate = 'x'
+                //     } else {
+                //         this.energySavingRate = res.content[0].energySavingRate.toFixed(1)
+                //     }
+                // } else {
+                //     this.energySavingRate = '--'
+                // }
+                // console.log('节能率', this.energySavingRate)
+                // // 准确率
+                // if (res.content[0].accuracy != undefined) {
+                //     if (res.content[0].accuracy == -9999) {
+                //         this.accuracy = 'x'
+                //     } else {
+                //         this.accuracy = res.content[0].accuracy.toFixed(1)
+                //     }
+                // } else {
+                //     this.accuracy = '--'
+                // }
+                // console.log('准确率', this.accuracy)
+
                 //执行率
-                this.chillerExecuteRateReal =
-                    res.content[0].chillerExecuteRateReal != undefined ? res.content[0].chillerExecuteRateReal.toFixed(1) : ''
+                if (res.content[0].chillerExecuteRateReal != undefined) {
+                    if (res.content[0].chillerExecuteRateReal == -9999) {
+                        this.chillerExecuteRateReal = 'x'
+                    } else {
+                        this.chillerExecuteRateReal = res.content[0].chillerExecuteRateReal.toFixed(1)
+                    }
+                } else {
+                    this.chillerExecuteRateReal = '--'
+                }
+                console.log('执行率', this.chillerExecuteRateReal)
             })
         },
         // 点击tab @
@@ -255,9 +272,38 @@ export default {
             this.similarDay = {}
             this.samples = []
             energyDayQuery(date, {}).then(res => {
+                console.log('sssssssssss', res)
                 if (res.result == 'success') {
                     // 本日概况
                     this.current = res.current ? res.current : {}
+                    if (Object.keys(res.current).length > 0) {
+                        this.energySavingRate = res.current.energySavingRate
+                        this.accuracy = res.current.accuracy
+
+                        // 节能率
+                        if (this.energySavingRate != undefined) {
+                            if (this.energySavingRate == -9999) {
+                                this.energySavingRate = 'x'
+                            } else {
+                                this.energySavingRate = this.energySavingRate.toFixed(1)
+                            }
+                        } else {
+                            this.energySavingRate = '--'
+                        }
+                        console.log('节能率', this.energySavingRate)
+                        // 准确率
+                        if (this.accuracy != undefined) {
+                            if (this.accuracy == -9999) {
+                                this.accuracy = 'x'
+                            } else {
+                                this.accuracy = this.accuracy.toFixed(1)
+                            }
+                        } else {
+                            this.accuracy = '--'
+                        }
+                        console.log('准确率', this.accuracy)
+                    }
+                    console.log('相似度', this.current.similarity)
                     // 相似日概况
                     this.similarDay = res.similarDay ? res.similarDay : {}
                     // 相似日列表

+ 94 - 40
src/views/evaluate/index.vue

@@ -31,14 +31,10 @@
                     <p class='ev-top Micbold'>室内温度满足率</p>
                     <div class='ev-bottom'>
                         <div class='ev-bottom-left'>
-                            <ev-satisfaction-rate :tindoorFillRate='tindoorFillRate'></ev-satisfaction-rate>
+                            <div id='rate1' style='width:100%;height:100%;'></div>
                         </div>
                         <div class='ev-bottom-right MicrYaHei'>
-                            <p>
-                                <!-- <span>超限时长</span>
-                <span>{{'--'}}</span>
-                                <span>h/日</span>-->
-                            </p>
+                            <p></p>
                             <p>
                                 <span>超限程度</span>
                                 <span>{{tindoorOverrunDegree}}</span>
@@ -51,7 +47,7 @@
                     <p class='ev-top'>节能率</p>
                     <div class='ev-bottom'>
                         <div class='ev-bottom-left'>
-                            <ev-energy-saving-rate :energySavingRate='energySavingRate'></ev-energy-saving-rate>
+                            <div id='rate2' style='width:100%;height:100%;'></div>
                         </div>
                         <div class='ev-bottom-right'>
                             <p>
@@ -66,7 +62,7 @@
                     <p class='ev-top'>策略执行率</p>
                     <div class='ev-bottom'>
                         <div class='ev-bottom-left'>
-                            <ev-implementation-rate :chillerExecuteRate='chillerExecuteRate'></ev-implementation-rate>
+                            <div id='rate3' style='width:100%;height:100%;'></div>
                         </div>
                         <div class='ev-bottom-right'>
                             <p>
@@ -90,10 +86,8 @@
     </div>
 </template>
 <script>
+import echarts from 'echarts'
 import Head from '../main/index'
-import EvEnergySavingRate from './evEnergySavingRate'
-import EvImplementationRate from './evImplementationRate'
-import EvSatisfactionRate from './evSatisfactionRate'
 import EvIndoorTemperature from './evIndoorTemperature'
 import { runDataQury } from '@/api/evaluate/evaluate.js'
 import moment from 'moment'
@@ -129,9 +123,6 @@ export default {
     },
     components: {
         Head,
-        EvEnergySavingRate,
-        EvImplementationRate,
-        EvSatisfactionRate,
         EvIndoorTemperature
     },
     mounted() {
@@ -141,6 +132,58 @@ export default {
         ...mapGetters(['projects', 'projectId'])
     },
     methods: {
+        rate(pieData, box, colors) {
+            const myChart = echarts.init(document.querySelector(box))
+            const data = pieData
+            const option = {
+                grid: {
+                    top: 5,
+                    bottom: 5
+                },
+                color: colors,
+                series: [
+                    {
+                        name: 'valueOfMarket',
+                        type: 'pie',
+                        center: ['50%', '50%'],
+                        radius: ['60%', '70%'],
+                        avoidLabelOverlap: false,
+                        hoverAnimation: false,
+                        label: {
+                            normal: {
+                                show: true,
+                                position: 'center',
+                                color: '#000000',
+                                fontSize: 20,
+                                lineHeight: 0,
+                                formatter: '{b}\n{c}%'
+                            }
+                        },
+                        data: [
+                            {
+                                value: data,
+                                label: {
+                                    normal: {
+                                        show: true,
+                                        color: data == 'x' ? 'red' : ''
+                                    }
+                                }
+                            },
+                            {
+                                value: data == 'x' || data == '--' ? 100 : 100 - data,
+                                name: '',
+                                label: {
+                                    normal: {
+                                        show: false
+                                    }
+                                }
+                            }
+                        ]
+                    }
+                ]
+            }
+            myChart.setOption(option)
+        },
         formatter(date) {
             return moment.unix(date / 1000).format('YYYYMMDD')
         },
@@ -161,54 +204,65 @@ export default {
             }
             runDataQury(null, { getParams }).then(res => {
                 if (res.result == 'success') {
-                    this.tindoorFillRate = res.tindoorFillRate != undefined ? res.tindoorFillRate.toFixed(1) : 0 //室内温度满足率
+                    // this.tindoorFillRate = res.tindoorFillRate != undefined && res.tindoorFillRate != -9999 ? res.tindoorFillRate.toFixed(1) : 0 //室内温度满足率
+                    this.tindoorFillRate = this.formatterRate(res.tindoorFillRate)
                     console.log('室内温度满足率', this.tindoorFillRate)
-                    this.energySavingRate = res.energySavingRate != undefined ? res.energySavingRate.toFixed(1) : 0 //节能率
+                    // this.energySavingRate = res.energySavingRate != undefined && res.energySavingRate != -9999 ? res.energySavingRate.toFixed(1) : 0 //节能率
+                    this.energySavingRate = this.formatterRate(res.energySavingRate)
                     console.log('节能率', this.energySavingRate)
-                    this.chillerExecuteRate = res.chillerExecuteRate != undefined ? res.chillerExecuteRate.toFixed(1) : 0 //略执行率
+                    // this.chillerExecuteRate =
+                    //     res.chillerExecuteRate != undefined && res.chillerExecuteRate != -9999 ? res.chillerExecuteRate.toFixed(1) : 0 //略执行率
+                    this.chillerExecuteRate = this.formatterRate(res.chillerExecuteRate)
+
                     console.log('略执行率', this.chillerExecuteRate)
-                    this.energySaving = res.energySaving != undefined ? res.energySaving.toFixed(0) : 0 //节能量
+                    this.energySaving = res.energySaving != undefined && res.energySaving != -9999 ? res.energySaving.toFixed(0) : 0 //节能量
                     console.log('节能量', this.energySaving)
                     this.isExecutedNum = res.isExecutedNum //已执行数量
                     console.log('已执行数量', this.isExecutedNum)
                     this.allReceivedNum = res.allReceivedNum //共收到数量
                     console.log('共收到数量', this.allReceivedNum)
-                    this.tindoorOverrunDegree = res.tindoorOverrunDegree != undefined ? res.tindoorOverrunDegree.toFixed(1) : 0 //超限程度
+                    this.tindoorOverrunDegree =
+                        res.tindoorOverrunDegree != undefined && res.tindoorOverrunDegree != -9999 ? res.tindoorOverrunDegree.toFixed(1) : 0 //超限程度
                     console.log('超限程度', this.tindoorOverrunDegree)
-                    this.energyDataList = res.dataList
+                    this.energyDataList = res.dataList ? res.dataList : []
+                    this.queryRate()
                 }
             })
         },
+        formatterRate(num) {
+            if (num != undefined) {
+                if (num == '-9999') {
+                    return 'x'
+                } else if (num == '-9998') {
+                    return '--'
+                } else {
+                    return num.toFixed(1)
+                }
+            } else {
+                return 0
+            }
+        },
+        queryRate() {
+            if (this.tindoorFillRate) {
+                this.rate(this.tindoorFillRate, '#rate1', ['#0091FF', '#E1F2FF'])
+            }
+            if (this.energySavingRate) {
+                this.rate(this.energySavingRate, '#rate2', ['#00D6B9', '#D5F6F2'])
+            }
+            if (this.chillerExecuteRate) {
+                this.rate(this.chillerExecuteRate, '#rate3', ['#FFBA6B', '#FEE9D2'])
+            }
+        },
         daterangeLeft() {
             if (this.pickerVal2.length > 0) {
-                // let dateTime = new Date(this.pickerVal2[0]);
-                // let newData = this.formatter(
-                //   new Date(dateTime.setDate(dateTime.getDate() - 1))
-                // );
                 this.pickerVal2[0] = this.pickerVal2[0] - 24 * 60 * 60 * 1000
                 this.pickerVal2[1] = this.pickerVal2[1] - 24 * 60 * 60 * 1000
-                // this.pickerVal2[0] =
-                //   newData.slice(0, 4) +
-                //   "." +
-                //   newData.slice(4, 6) +
-                //   "." +
-                //   newData.slice(6, 8);
                 this.pickerVal2 = [this.pickerVal2[0], this.pickerVal2[1]]
                 this.query(0)
             }
         },
         daterangeRight() {
             if (this.pickerVal2.length > 0) {
-                // let dateTime = new Date(this.pickerVal2[1]);
-                // let newData = this.formatter(
-                //   new Date(dateTime.setDate(dateTime.getDate() + 1))
-                // );
-                // this.pickerVal2[1] =
-                //   newData.slice(0, 4) +
-                //   "." +
-                //   newData.slice(4, 6) +
-                //   "." +
-                //   newData.slice(6, 8);
                 let end = this.formatter(new Date().getTime() - 24 * 60 * 60 * 1000)
                 if (this.formatter(this.pickerVal2[1]) == end) {
                     this.pickerVal2[1] = new Date().getTime() - 24 * 60 * 60 * 1000

+ 1 - 1
src/views/strategy/animationBox.vue

@@ -129,7 +129,7 @@ export default {
                 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.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 = []

+ 6 - 11
src/views/strategy/bomBox.vue

@@ -6,17 +6,12 @@
         </div>
         <div class='bomb-left'>
             <div class='bomb-left1'>当前策略</div>
-            <div
-                class='bomb-left2'
-                v-if='data.openTime'
-            >开机时间 {{data.openTime?(data.openTime.slice(0,2)+":"+ data.openTime.slice(2,4)):'--'}} - {{data.openTime?(data.openTime.slice(0,2)+":"+ data.openTime.slice(2,4)):'--'}}</div>
-            <div
-                class='bomb-left2'
-                v-else-if='data.offTime'
-            >关机时间 {{data.offTime?(data.offTime.slice(0,2)+":"+ data.offTime.slice(2,4)):'--'}} - {{data.offTime?(data.offTime.slice(0,2)+":"+ data.offTime.slice(2,4)):'--'}}</div>
-            <div
-                class='bomb-left2'
-            >应执行时间 {{data.executeTime?(data.executeTime.slice(8,10)+":"+ data.executeTime.slice(10,12)):'--'}} - {{data.executeTime?(data.executeTime.slice(8,10)+":"+ data.executeTime.slice(10,12)):'--'}}</div>
+            <div class='bomb-left2'>
+                应执行时间
+                <span v-if='data.onTime'>{{data.onTime?data.onTime.slice(0,2)+":"+data.onTime.slice(2,4):"--"}}</span>
+                <span v-else-if='data.offTime'>{{data.offTime?data.offTime.slice(0,2)+":"+data.offTime.slice(2,4):"--"}}</span>
+                <span v-else>{{data.executeTime?data.executeTime.slice(8,10)+":"+data.executeTime.slice(10,12):"--"}}</span>
+            </div>
             <div class='bomb-left3'>策略可靠度</div>
             <div id='circleEcharts' style='width:170px;height:204px'></div>
         </div>

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

@@ -13,16 +13,16 @@
                 <div class='strate-left-1'>今天营业时间</div>
                 <div
                     class='strate-left-2'
-                >{{chillerCommand.openTime?( chillerCommand.openTime.slice(0,2)+':'+chillerCommand.openTime.slice(2,4)):"--"}} - {{chillerCommand.endTime?(chillerCommand.endTime.slice(0,2)+':'+chillerCommand.endTime.slice(2,4)):"--"}}</div>
+                >{{chillerOrg.openTime?( chillerOrg.openTime.slice(0,2)+':'+chillerOrg.openTime.slice(2,4)):"--"}} - {{chillerOrg.endTime?(chillerOrg.endTime.slice(0,2)+':'+chillerOrg.endTime.slice(2,4)):"--"}}</div>
                 <div class='strate-left-1'>当前运行模式</div>
-                <div class='strate-left-2'>{{chillerCommand.model || '--'}}</div>
+                <div class='strate-left-2'>{{chillerOrg.model || '--'}}</div>
                 <div class='strate-left-box'>
                     <div class='strate-left-info-1'>通风策略</div>
                     <div
                         class='strate-left-info'
-                    >开启时间:{{chillerCommand.freshAirEqOpenTime?(chillerCommand.freshAirEqOpenTime.slice(0,2)+":"+chillerCommand.freshAirEqOpenTime.slice(2,4)):"--"}} - {{chillerCommand.freshAirEqCloseTime?(chillerCommand.freshAirEqCloseTime.slice(0,2)+":"+chillerCommand.freshAirEqCloseTime.slice(2,4)):"--"}}</div>
-                    <div class='strate-left-info'>新风机组:{{chillerCommand.freshAirHandlingUnit}}</div>
-                    <div class='strate-left-info'>组合式空调机组:{{chillerCommand.airHandlingUnit}}</div>
+                    >开启时间:{{chillerOrg.freshAirEqOpenTime?(chillerOrg.freshAirEqOpenTime.slice(0,2)+":"+chillerOrg.freshAirEqOpenTime.slice(2,4)):"--"}} - {{chillerOrg.freshAirEqCloseTime?(chillerOrg.freshAirEqCloseTime.slice(0,2)+":"+chillerOrg.freshAirEqCloseTime.slice(2,4)):"--"}}</div>
+                    <div class='strate-left-info'>新风机组:{{chillerOrg.freshAirHandlingUnit}}</div>
+                    <div class='strate-left-info'>组合式空调机组:{{chillerOrg.airHandlingUnit}}</div>
                 </div>
             </div>
             <div class='starte-right'>

+ 2 - 2
src/views/strategy/waterUnit.vue

@@ -15,8 +15,8 @@
                     <font
                         v-if='type==1'
                         :class='data.chillWaterOutTempSetOrg=="-9999"?"reds":""'
-                    >{{formatterRes(data.chillWaterOutTempSetOrg,true,1)}}</font>
-                    <font v-if='type==2' :class='data.chillWaterOutTempSet=="-9999"?"reds":""'>{{formatterRes(data.chillWaterOutTempSet,true,1)}}</font>
+                    >{{formatterRes(data.chillWaterOutTempSetOrg,false,1)}}</font>
+                    <font v-if='type==2' :class='data.chillWaterOutTempSet=="-9999"?"reds":""'>{{formatterRes(data.chillWaterOutTempSet,false,1)}}</font>
                     <font style='font-size:12px;'>℃</font>
                 </p>
             </div>