Guoxiaohuan hace 5 años
padre
commit
934f1ec0f4

+ 1 - 0
src/api/audit/audit.js

@@ -1,4 +1,5 @@
 import httputils from '@/api/httputils'
+//审批意见 创建申诉
 export function updateWorkflow({ postParams }) {
     return httputils.postJson(`/duoduo-service/workflow/work/update`, postParams)
 }

+ 1 - 4
src/components/uploadImg.vue

@@ -48,12 +48,9 @@ export default {
   },
   components: { zoomImage },
   props: ["souseArr"],
-  mounted() {
-    console.log(this.souseArr);
-  },
+  mounted() {},
   methods: {
     distinctFile(a) {
-      console.log(a)
       return Array.from(new Set(a));
     },
     getImage(event) {

+ 0 - 1
src/components/zoomImage.vue

@@ -12,7 +12,6 @@ export default {
   props: ["url"],
   methods: {
     imagePreview(src) {
-        console.log(src)
       let body = document.querySelector("#tbody");
       let mask = document.createElement("div");
       let img = document.createElement("img");

+ 26 - 29
src/store/index.js

@@ -7,7 +7,7 @@ Vue.use(Vuex)
 const KEY_LAST_ROUTE = 'last_route'
 
 const store = new Vuex.Store({
-  modules:{},
+  modules: {},
   state: {
     name: '这里是全局的',
     projects: [
@@ -18,57 +18,54 @@ const store = new Vuex.Store({
     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
-            }
+      if (!state.lastRoute) {
+        let lastRoute = storage.get(KEY_LAST_ROUTE)
+        if (lastRoute) {
+          state.lastRoute = lastRoute
         }
-        return state.lastRoute
+      }
+      return state.lastRoute
     }
   },
   mutations: {
-    setProjects(state,projects){
+    setProjects(state, projects) {
       state.projects = projects
     },
-    setProId (state, projectId) {
-      console.log('yyyyyyyyyyyyyyyyy', projectId)
+    setProId(state, projectId) {
       state.projectId = projectId
     },
-    setComeUrl (state, comeUrl) {
+    setComeUrl(state, comeUrl) {
       state.comeUrl = comeUrl
     },
     setSsoToken: (state, val) => (state.token = val),
     setLastRoute: (state, val) => {
-          state.lastRoute = val
-          storage.set(KEY_LAST_ROUTE, val)
+      state.lastRoute = val
+      storage.set(KEY_LAST_ROUTE, val)
     },
-    setUserInfo(state, {userInfo}) {
+    setUserInfo(state, { userInfo }) {
       state.userInfo = userInfo
     }
   },
   actions: {
-    async loadUserInfo(context,{token}){
-      let res = await axios.get('/server/userInfo', {params: {token: token}})
-      // debugger
-      console.log(res)
-        if(res.data.result == 'success') {
-          // commit 到vuex, 供全局使用
-          context.commit('setUserInfo', {userInfo: res.data})
-          context.commit('setProjects', {projects: res.data.projects})
-          sessionStorage.setItem('token', token)
-        } else {
-          let ssoServer = 'http://sso.sagacloud.cn'
-          let redirectUrl = window.location.protocol + '//' + window.location.host +'/strategy'
-          window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
-        }
+    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 })
+        sessionStorage.setItem('token', token)
+      } else {
+        let ssoServer = 'http://sso.sagacloud.cn'
+        let redirectUrl = window.location.protocol + '//' + window.location.host + '/strategy'
+        window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
+      }
     }
   },
 })

+ 2 - 9
src/utils/httputils.js

@@ -33,9 +33,8 @@ axiosservice.interceptors.request.use(
 )
 
 axiosservice.interceptors.response.use(
-    function(res) {
+    function (res) {
         //在这里对返回的数据进行处理
-        //console.log('axios interceptors res = ', res.status, res)
         let resp = res.data
         if (resp.result === 'unauthc') {
             store.commit('logined', false)
@@ -50,21 +49,15 @@ axiosservice.interceptors.response.use(
                 }
             })
                 .then(resp => {
-                    //console.log('--------------------------- confirm', resp)
-                    //router.push('/login')
                     window.location.reload()
                 })
                 .catch(error => {
-                    //console.log('--------------------------- cancel', error)
-                    console.log('')
                 })
         }
-        //console.log('axios interceptors resp2 = ', resp.success, resp.errorCode, resp.errorMessage, res)
         return res
     },
-    function(err) {
+    function (err) {
         //Do something with response error
-        console.log('axios interceptors err = ', err)
         return Promise.reject(err)
     }
 )

+ 40 - 5
src/views/appeal/appealDetail.vue

@@ -1,6 +1,9 @@
 <template>
   <div>
     <Head :headText="headText"></Head>
+    <div class="nav-right">
+      <el-button type="primary" @click="submission" size="mini">提交</el-button>
+    </div>
     <div class="detailContainer">
       <div class="title Micbold">未执行申诉单</div>
       <div class="nav MicrYaHei">
@@ -29,7 +32,7 @@
           </el-select>
         </span>
         <span>
-          <textarea placeholder="填写申请原因"></textarea>
+          <textarea placeholder="填写申请原因" v-model="reason"></textarea>
         </span>
       </div>
       <div class="foot">
@@ -43,11 +46,13 @@ import Head from "../main/index";
 import AuditTable from "../audit/auditTable";
 import UploadImg from "../../components/uploadImg";
 import { queryWorkflow, queryChillerExecuteInfo } from "@/api/appeal/appeal.js";
+import { updateWorkflow } from "@/api/audit/audit.js";
 
 export default {
   data() {
     return {
       headText: "申诉审核",
+      reason: "",
       options: [
         {
           value: "0",
@@ -64,6 +69,7 @@ export default {
       ],
       value: "",
       souseArr: ["1576036336333_image.jpg", "1576036135588_image.jpg"],
+      appealId: "",
       commandId: ""
     };
   },
@@ -81,20 +87,49 @@ export default {
           }
         }
       };
-      queryChillerExecuteInfo(params).then(res => {
-        console.log("1111111", res);
+      queryChillerExecuteInfo(params).then(res => {});
+    },
+    submission() {
+      let params = {
+        postParams: {
+          id: this.appealId,
+          commit: "apply",
+          updateUser: "594e95e50abc4b6c9bdda985d313c1b9", //申请人
+          applyUser: "594e95e50abc4b6c9bdda985d313c1b9", //申请人
+          judgement: "评价", //策略评价
+          reasonType: "策略原因", //申诉原因类型:策略原因;设备原因;其他
+          reason: this.reason, //具体申诉原因
+          pics: this.souseArr
+        }
+      };
+      updateWorkflow(params).then(res => {
+        if (res.result == "success") {
+          this.$message.success("申诉成功");
+        } else {
+          this.$message.error("申诉失败: " + res.message);
+        }
+        this.$router.push("/appeal");
       });
     }
   },
   mounted() {
-    this.commandId = this.$route.query.id;
+    this.appealId = this.$route.query.id;
     if (this.commandId) {
-      this.queryDetail(this.commandId);
+      this.commandId(this.commandId);
     }
   }
 };
 </script>
 <style lang="scss" scoped>
+.nav-right {
+  height: 48px;
+  position: fixed;
+  right: 24px;
+  top: 53px;
+  z-index: 1;
+  display: flex;
+  align-items: center;
+}
 .detailContainer {
   max-width: 762px;
   width: 60%;

+ 23 - 111
src/views/appeal/index.vue

@@ -46,7 +46,7 @@
               <span>{{item.pushTime?formatter(item.pushTime):'--'}}</span>
               <span>{{item.title||'--'}}</span>
             </span>
-            <span class="backout">
+            <span class="backout" @click="backoutClick(item,'revoke')">
               <img src="../../assets/backout.png" />撤销申请
             </span>
           </div>
@@ -93,6 +93,8 @@
 import Head from "../main/index";
 import { queryWorkflow, queryChillerExecuteInfo } from "@/api/appeal/appeal.js";
 import EvSnapshotsDialog from "../evaluate/evSnapshotsDialog";
+import { updateWorkflow } from "@/api/audit/audit.js";
+
 var moment = require("moment");
 import "moment/locale/zh-cn";
 
@@ -105,108 +107,6 @@ export default {
       auditCompletedArr: [],
       appealsDate: "",
       viewSnapshots: false
-      // data: [
-      //   {
-      //     date: "20202.01.13",
-      //     info: [
-      //       {
-      //         time: "08:30",
-      //         ad1: 1,
-      //         ad2: 1,
-      //         temp1: "8.0",
-      //         re1: 1,
-      //         re2: 0,
-      //         temp2: "10.0",
-      //         remark: "冷水温度过高,没有及时按策略执行"
-      //       },
-      //       {
-      //         time: "08:30",
-      //         ad1: 1,
-      //         ad2: 1,
-      //         temp1: "8.0",
-      //         re1: 1,
-      //         re2: 0,
-      //         temp2: "10.0",
-      //         remark: "冷水温度过高,没有及时按策略执行"
-      //       },
-      //       {
-      //         time: "08:30",
-      //         ad1: 1,
-      //         ad2: 1,
-      //         temp1: "8.0",
-      //         re1: 1,
-      //         re2: 0,
-      //         temp2: "10.0",
-      //         remark: "冷水温度过高,没有及时按策略执行"
-      //       }
-      //     ]
-      //   },
-      //   {
-      //     date: "20202.01.13",
-      //     info: [
-      //       {
-      //         time: "08:30",
-      //         ad1: 1,
-      //         ad2: 1,
-      //         temp1: "8.0",
-      //         re1: 1,
-      //         re2: 0,
-      //         temp2: "10.0",
-      //         remark: "冷水温度过高,没有及时按策略执行"
-      //       },
-      //       {
-      //         time: "08:30",
-      //         ad1: 1,
-      //         ad2: 1,
-      //         temp1: "8.0",
-      //         re1: 1,
-      //         re2: 0,
-      //         temp2: "10.0",
-      //         remark: "冷水温度过高,没有及时按策略执行"
-      //       }
-      //     ]
-      //   }
-      // ]
-      // review: [
-      //   {
-      //     date: "2020.02.12 08:30",
-      //     title: "策略未执行申诉",
-      //     reason: "策略原因",
-      //     advice: "冷水温度过高,没有及时按策略执行"
-      //   },
-      //   {
-      //     date: "2020.02.12 08:30",
-      //     title: "策略未执行申诉",
-      //     reason: "策略原因",
-      //     advice: "冷水温度过高,没有及时按策略执行"
-      //   }
-      // ],
-      // complete: [
-      //   {
-      //     date: "08:30",
-      //     title: "策略未执行申诉",
-      //     time: "2020.01.30",
-      //     sign: 7,
-      //     img: require("../../assets/completed.png"),
-      //     text: "申诉成功"
-      //   },
-      //   {
-      //     date: "08:30",
-      //     title: "策略未执行申诉",
-      //     time: "2020.01.30",
-      //     sign: 5,
-      //     img: require("../../assets/gray.png"),
-      //     text: "未申诉"
-      //   },
-      //   {
-      //     date: "08:30",
-      //     title: "策略未执行申诉",
-      //     time: "2020.01.30",
-      //     sign: 2,
-      //     img: require("../../assets/error.png"),
-      //     text: "申诉失败"
-      //   }
-      // ]
     };
   },
   components: {
@@ -217,6 +117,24 @@ export default {
     this.init();
   },
   methods: {
+    backoutClick(item, type) {
+      let params = {
+        postParams: {
+          id: item.id,
+          commit: type,
+          roles: [1002],
+          updateUser: "594e95e50abc4b6c9bdda985d313c1b9"
+        }
+      };
+      updateWorkflow(params).then(res => {
+        if (res.result == "success") {
+          this.$message.success("撤销成功");
+        } else {
+          this.$message.error("撤销失败: " + res.message);
+        }
+        this.init();
+      });
+    },
     formatter(date) {
       return moment.unix(date / 1000).format("YYYY.MM.DD hh:mm");
     },
@@ -240,10 +158,9 @@ export default {
       }
     },
     menu(item) {
-      console.log(item);
       this.$router.push({
         path: "/appeal/appealDetail",
-        query: { id: item.commandId }
+        query: { id: item.recommend.appealId, commandId: item.recommend.id }
       });
     },
     init() {
@@ -265,7 +182,6 @@ export default {
       };
 
       queryWorkflow(params).then(res => {
-        console.log(res);
         let appealsArr = [],
           arr = [];
         appealsArr = res.content ? res.content : [];
@@ -287,11 +203,9 @@ export default {
         }
       };
       queryChillerExecuteInfo(params).then(res => {
-        console.log("可申诉的未执行策略", res);
         this.appealsArr = res.data ? res.data : [];
         if (this.appealsArr.length > 0) {
           this.appealsDate = this.appealsArr[0].recommend.date || "--";
-          console.log(this.appealsDate);
         }
       });
     },
@@ -311,7 +225,6 @@ export default {
         }
       };
       queryWorkflow(params).then(res => {
-        console.log("审核完成、超时未申诉", res);
         this.auditCompletedArr = res.content ? res.content : [];
       });
     },
@@ -321,7 +234,7 @@ export default {
       let params = {
         postParams: {
           criteria: {
-            projectId: "Pj1101080002",
+            projectId: "Pj4413030001",
             trackerId: 3,
             status: 302
           },
@@ -329,7 +242,6 @@ export default {
         }
       };
       queryWorkflow(params).then(res => {
-        console.log("审核中", res);
         this.InAuditArr = res.content ? res.content : [];
       });
     }

+ 4 - 4
src/views/audit/auditTable.vue

@@ -4,14 +4,14 @@
       <el-table-column prop="title" label width="105"></el-table-column>
       <el-table-column prop="name" label="冷机开启台数" align="center" width="55"></el-table-column>
       <el-table-column prop="province" label="冷机出水温度" align="center" width="55"></el-table-column>
-      <el-table-column prop="city" label="冷冻泵台数" align="center" width=""></el-table-column>
+      <el-table-column prop="city" label="冷冻泵台数" align="center" width></el-table-column>
       <el-table-column prop="address" label="冷冻泵频率" align="center" width="65"></el-table-column>
-      <el-table-column prop="zip" label="冷却泵台数" align="center" width=""></el-table-column>
+      <el-table-column prop="zip" label="冷却泵台数" align="center" width></el-table-column>
       <el-table-column prop="zip" label="冷却泵频率" align="center" width="65"></el-table-column>
-      <el-table-column prop="zip" label="冷却塔台数" align="center" width=""></el-table-column>
+      <el-table-column prop="zip" label="冷却塔台数" align="center" width></el-table-column>
       <el-table-column prop="zip" label="冷却塔频率" align="center" width="65"></el-table-column>
       <el-table-column prop="zip" label="室内平均温度" align="center" width="55"></el-table-column>
-      <el-table-column prop="hign" label="室内最高温度" align="center" width=""></el-table-column>
+      <el-table-column prop="hign" label="室内最高温度" align="center" width></el-table-column>
       <el-table-column prop="load" label="冷机负载率" align="center" width="55"></el-table-column>
     </el-table>
   </div>

+ 41 - 89
src/views/audit/index.vue

@@ -21,7 +21,8 @@
               class="appeal-left-div"
               v-for="(item,index) in auditArr"
               :key="index"
-              @click="appealClick(item)"
+              @click="appealClick(item,index)"
+              :class="{border:index==isactive}"
             >
               <div class="time">
                 <span>{{item.pushTime?formatter(item.pushTime):'--'}} {{item.title||'--'}}</span>
@@ -78,9 +79,9 @@
         <div class="opinion">
           <span class="opinion-title Micbold">审批意见</span>
           <div class="opinion-bottom MicrYaHei">
-            <input type="text" />
-            <span>不同意</span>
-            <span>同意</span>
+            <input type="text" v-model="comment" />
+            <span @click="approvalOpinion(auditObj,'reject')">不同意</span>
+            <span @click="approvalOpinion(auditObj,'approve')">同意</span>
           </div>
         </div>
       </div>
@@ -92,6 +93,8 @@ import Head from "../main/index";
 import AuditTable from "./auditTable";
 import uploadImg from "../../components/uploadImg";
 import { queryWorkflow, queryChillerExecuteInfo } from "@/api/appeal/appeal.js";
+import { updateWorkflow } from "@/api/audit/audit.js";
+
 var moment = require("moment");
 import "moment/locale/zh-cn";
 
@@ -99,11 +102,12 @@ export default {
   data() {
     return {
       headText: "申诉审核",
-      appealOptions:[
-         {
+      isactive: 0, //默认第一个
+      appealOptions: [
+        {
           value: "0",
           label: "按未执行策略的时间"
-        },
+        }
       ],
       resonOptions: [
         {
@@ -129,79 +133,8 @@ export default {
       auditArr: [],
       auditObj: {},
       value: "0",
-      // data: [
-      //   {
-      //     date: "2020.01.12 昨天",
-      //     value: [
-      //       {
-      //         time: "2020.01.12 08:30",
-      //         title: "策略未执行申诉",
-      //         name: "张三",
-      //         appealTime: "2020.01.12 12:45",
-      //         reson: "策略原因",
-      //         files: 5
-      //       },
-      //       {
-      //         time: "2020.01.12 08:30",
-      //         title: "策略未执行申诉",
-      //         name: "张三",
-      //         appealTime: "2020.01.12 12:45",
-      //         reson: "策略原因",
-      //         files: 5
-      //       },
-      //       {
-      //         time: "2020.01.12 08:30",
-      //         title: "策略未执行申诉",
-      //         name: "张三",
-      //         appealTime: "2020.01.12 12:45",
-      //         reson: "策略原因",
-      //         files: 5
-      //       },
-      //       {
-      //         time: "2020.01.12 08:30",
-      //         title: "策略未执行申诉",
-      //         name: "张三",
-      //         appealTime: "2020.01.12 12:45",
-      //         reson: "策略原因",
-      //         files: 5
-      //       }
-      //     ]
-      //   },
-      //   {
-      //     date: "2020.01.12 昨天",
-      //     value: [
-      //       {
-      //         time: "2020.01.12 08:30",
-      //         title: "策略未执行申诉",
-      //         name: "张三",
-      //         appealTime: "2020.01.12 12:45",
-      //         reson: "策略原因",
-      //         files: 5
-      //       },
-      //       {
-      //         time: "2020.01.12 08:30",
-      //         title: "策略未执行申诉",
-      //         name: "张三",
-      //         appealTime: "2020.01.12 12:45",
-      //         reson: "策略原因",
-      //         files: 5
-      //       }
-      //     ]
-      //   },
-      //   {
-      //     date: "2020.01.12 昨天",
-      //     value: [
-      //       {
-      //         time: "2020.01.12 08:30",
-      //         title: "策略未执行申诉",
-      //         name: "张三",
-      //         appealTime: "2020.01.12 12:45",
-      //         reson: "策略原因",
-      //         files: 5
-      //       }
-      //     ]
-      //   }
-      // ],
+      comment: "",
+
       souseArr: []
     };
   },
@@ -214,12 +147,31 @@ export default {
     this.query();
   },
   methods: {
+    approvalOpinion(item, type) {
+      let params = {
+        postParams: {
+          id: item.id,
+          commit: type,
+          comment: this.comment,
+          roles: [1002],
+          updateUser: "594e95e50abc4b6c9bdda985d313c1b9"
+        }
+      };
+      updateWorkflow(params).then(res => {
+        if (res.result == "success") {
+          this.$message.success("操作成功");
+        } else {
+          this.$message.error("操作失败: " + res.message);
+        }
+        this.query();
+      });
+    },
     formatter(date) {
       return moment.unix(date / 1000).format("YYYY.MM.DD hh:mm");
     },
-    appealClick(item) {
+    appealClick(item, index) {
       this.auditObj = item;
-      console.log(item);
+      this.isactive = index;
       let params = {
         postParams: {
           criteria: {
@@ -227,15 +179,13 @@ export default {
           }
         }
       };
-      queryChillerExecuteInfo(params).then(res => {
-        console.log(res);
-      });
+      queryChillerExecuteInfo(params).then(res => {});
     },
     query() {
       let params = {
         postParams: {
           criteria: {
-            projectId: "Pj1101080002",
+            projectId: "Pj4413030001",
             trackerId: 3,
             status: 302
           },
@@ -243,9 +193,7 @@ export default {
         }
       };
       queryWorkflow(params).then(res => {
-        this.auditArr = res.content;
-
-        console.log("审核中", this.auditArr);
+        this.auditArr = res.content ? res.content : [];
       });
     }
   }
@@ -335,6 +283,9 @@ export default {
             }
           }
         }
+        .border {
+          border: 1px solid rgba(0, 145, 255, 1);
+        }
       }
     }
   }
@@ -466,6 +417,7 @@ export default {
           color: rgba(31, 35, 41, 1);
           line-height: 32px;
           text-align: center;
+          cursor: pointer;
         }
         span:nth-of-type(1) {
           margin-right: 12px;

+ 38 - 32
src/views/doBusiness/index.vue

@@ -29,14 +29,14 @@
 <script>
 import Head from "../main/index";
 import MonthTemp from "./monthTemp";
-import {queryHours,updateHours} from '@/api/doBusiness/business.js'
+import { queryHours, updateHours } from "@/api/doBusiness/business.js";
 export default {
   data() {
     return {
       headText: "营业时间调整",
       value1: [new Date(), new Date()],
-      date:"",
-      today:''
+      date: "",
+      today: ""
     };
   },
   components: {
@@ -44,47 +44,53 @@ export default {
     MonthTemp
   },
   methods: {
-    formatTime(){
-      let year = new Date().getFullYear()
-      let month = new Date().getMonth()+1>10?(new Date().getMonth()+1): ('0'+(new Date().getMonth()+1))
-      let date = new Date().getDate()>10?new Date().getDate():('0'+new Date.getDate())
-      console.log(year,month,date)
-      return this.today = year + ''+ month+''+date
+    formatTime() {
+      let year = new Date().getFullYear();
+      let month =
+        new Date().getMonth() + 1 > 10
+          ? new Date().getMonth() + 1
+          : "0" + (new Date().getMonth() + 1);
+      let date =
+        new Date().getDate() > 10
+          ? new Date().getDate()
+          : "0" + new Date.getDate();
+      return (this.today = year + "" + month + "" + date);
     },
     pickerVal(val) {
-      console.log(val);
-      this.date = val
+      this.date = val;
     },
-    getHours(){
+    getHours() {
       let params = {
-        postParams:{
-          criteria:{
-            projectId:'Pj4419000005',
-            date:this.today
+        postParams: {
+          criteria: {
+            projectId: "Pj4419000005",
+            date: this.today
           }
         }
-      }
-      queryHours(params).then(res=>{
-        console.log(res)
-      })
+      };
+      queryHours(params).then(res => {});
     },
-    setHours(){
+    setHours() {
       let params = {
-        postParams:{
-          projectId:'Pj4419000005',
+        postParams: {
+          projectId: "Pj4419000005",
           date: this.today,
-          openTime:this.value1.split('-')[0].slice(0,2)+''+this.value1.split('-')[0].slice(2,4),
-          endTime:this.value1.split('-')[1].slice(0,2)+''+this.value1.split('-')[1].slice(2,4),
+          openTime:
+            this.value1.split("-")[0].slice(0, 2) +
+            "" +
+            this.value1.split("-")[0].slice(2, 4),
+          endTime:
+            this.value1.split("-")[1].slice(0, 2) +
+            "" +
+            this.value1.split("-")[1].slice(2, 4)
         }
-      }
-      updateHours(params).then(res=>{
-        console.log(res)
-      })
+      };
+      updateHours(params).then(res => {});
     }
   },
-  mounted(){
-    this.formatTime()
-    this.getHours()
+  mounted() {
+    this.formatTime();
+    this.getHours();
   }
 };
 </script>

+ 2 - 8
src/views/doBusiness/monthTemp.vue

@@ -2,7 +2,7 @@
   <div class="date-temp">
     <span class="arrow-left" @click="pickerChangeLeft"></span>
     <span class="arrow-line arrow-line1" @click="pickerChangeLeft"></span>
-    <el-date-picker  v-model="pickerVal1" type="month" format="yyyy.MM" value-format="yyyy.MM"></el-date-picker>
+    <el-date-picker v-model="pickerVal1" type="month" format="yyyy.MM" value-format="yyyy.MM"></el-date-picker>
     <span class="arrow-line" @click="pickerChangeRight"></span>
     <span class="arrow-right" @click="pickerChangeRight"></span>
   </div>
@@ -23,7 +23,6 @@ export default {
     pickerChangeLeft() {
       if (this.pickerVal1) {
         let dateTime = new Date(this.pickerVal1);
-        console.log(dateTime)
         let newData = this.formatter(
           new Date(dateTime.setMonth(dateTime.getMonth() - 1))
         );
@@ -37,14 +36,11 @@ export default {
       this.$emit("pickerVal", this.pickerVal1);
     },
     pickerChangeRight() {
-        console.log('111')
       if (this.pickerVal1) {
         let dateTime = new Date(this.pickerVal1);
-        console.log(dateTime)
         let newData = this.formatter(
           new Date(dateTime.setMonth(dateTime.getMonth() + 1))
         );
-        console.log(newData)
         this.pickerVal1 =
           newData.slice(0, 4) +
           "." +
@@ -55,9 +51,7 @@ export default {
       this.$emit("pickerVal", this.pickerVal1);
     }
   },
-  mounted(){
-   
-  }
+  mounted() {}
 };
 </script>
 <style lang="scss">

+ 1 - 3
src/views/evaluate/dateTemp.vue

@@ -51,9 +51,7 @@ export default {
       this.$emit("pickerVal", this.pickerVal);
     }
   },
-  mounted(){
-    console.log(this.types)
-  }
+  mounted() {}
 };
 </script>
 <style lang="scss">

+ 1 - 5
src/views/evaluate/evHistory.vue

@@ -52,11 +52,7 @@ export default {
     return {};
   },
   props: ["current", "similarDay", "maxArr"],
-  mounted() {
-    console.log(this.current);
-    console.log(this.similarDay);
-    console.log(this.maxArr);
-  }
+  mounted() {}
 };
 </script>
 <style lang="scss" scoped>

+ 196 - 103
src/views/evaluate/evIndoorTemperature.vue

@@ -24,7 +24,7 @@ export default {
   methods: {
     drawIt() {
       let myCharts = echarts.init(document.getElementById("pCharts2"));
-      var colors = ["#34C724", "#8D9399", "#F54E45",'#00D6B9','#0091FF'];
+      var colors = ["#34C724", "#8D9399", "#F54E45", "#00D6B9", "#0091FF"];
       var option = {
         color: colors,
         tooltip: {
@@ -35,7 +35,7 @@ export default {
         },
         grid: {
           right: "5%",
-          left:"5%"
+          left: "5%"
         },
         xAxis: [
           {
@@ -43,16 +43,16 @@ export default {
             axisTick: {
               alignWithLabel: true
             },
-            splitLine:{
-            show:false
-          },
-            axisLine:{
-              lineStyle:{
-                  color:'#8D9399',
+            splitLine: {
+              show: false
+            },
+            axisLine: {
+              lineStyle: {
+                color: "#8D9399"
               }
             },
             axisLabel: {
-                interval:0,//代表显示所有x轴标签显示
+              interval: 0 //代表显示所有x轴标签显示
             },
             data: [
               "11.01",
@@ -68,23 +68,23 @@ export default {
               "11.12",
               "11.13",
               "11.14",
-              '11.15',
-              '11.16',
-              '11.17',
-              '11.18',
-              '11.19',
-              '11.20',
-              '11.21',
-              '11.22',
-              '11.23',
-              '11.24',
-              '11.25',
-              '11.26',
-              '11.27',
-              '11.28',
-              '11.29',
-              '11.30',
-              '11.31'
+              "11.15",
+              "11.16",
+              "11.17",
+              "11.18",
+              "11.19",
+              "11.20",
+              "11.21",
+              "11.22",
+              "11.23",
+              "11.24",
+              "11.25",
+              "11.26",
+              "11.27",
+              "11.28",
+              "11.29",
+              "11.30",
+              "11.31"
             ]
           }
         ],
@@ -92,14 +92,14 @@ export default {
           {
             type: "value",
             name: "节能率",
-            axisLine:{
-              lineStyle:{
-                  color:'#8D9399',
+            axisLine: {
+              lineStyle: {
+                color: "#8D9399"
               }
             },
-            splitLine:{
-            show:false
-          },
+            splitLine: {
+              show: false
+            },
             min: 0,
             max: 25,
             position: "right",
@@ -109,7 +109,7 @@ export default {
           },
           {
             type: "value",
-            show:false,
+            show: false,
             name: "",
             min: 0,
             max: 1,
@@ -127,18 +127,18 @@ export default {
           {
             type: "value",
             name: "室内温度满足率",
-            axisLine:{
-              lineStyle:{
-                  color:'#8D9399',
+            axisLine: {
+              lineStyle: {
+                color: "#8D9399"
               }
             },
-            splitLine:{
-            show:false
-          },
+            splitLine: {
+              show: false
+            },
             min: 0,
             max: 25,
             position: "left",
-           
+
             axisLabel: {
               formatter: "{value} °C"
             }
@@ -148,20 +148,116 @@ export default {
           {
             name: "按照策略执行",
             type: "bar",
-            barWidth : 30,
-            data: [1, null, null, 1, null, null, 1, null, null, 1, null, null,1, null, null, 1, null, null, 1, null, null, 1, null, null,1, null, null,1, null, null,null]
+            barWidth: 30,
+            data: [
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              null
+            ]
           },
           {
             name: "未按照策略执行",
             type: "bar",
-            barWidth : 30,
-            data: [null,1, 1, null,1, null, null,1, null, null,1, null,null,1, null,null,1, null,null,1, null,null,1, null,null,1, null,null,1, null,null]
+            barWidth: 30,
+            data: [
+              null,
+              1,
+              1,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null
+            ]
           },
           {
             name: "未按照策略执行,申诉通过",
             type: "bar",
-            barWidth : 30,
-            data: [null, null, null, null, null, 1, null, null, 1, null, null, 1,null, null, 1,null, null, 1,null, null, 1,null, null, 1,null, null, 1,null, null, 1,1]
+            barWidth: 30,
+            data: [
+              null,
+              null,
+              null,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              null,
+              null,
+              1,
+              1
+            ]
           },
           {
             name: "室内温度满足率",
@@ -242,10 +338,7 @@ export default {
         ]
       };
       myCharts.setOption(option);
-      console.log(myCharts);
-
       myCharts.on("click", param => {
-        // console.log(param);
         this.$router.push("/evaluate/evTwoLevelMenu");
         // if (param.seriesName == "室内温度满足率") {
         //   this.$router.push({
@@ -269,64 +362,64 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.p-echarts{
+.p-echarts {
   width: 100%;
   height: 100%;
   #pCharts2 {
-  width: 100%;
-  height: 100%;
-}
-.pLegend{
-  font-size: 12px;
-  color: #000000;
-  text-align:center;
-  margin-top: 20px;
-  .icon1{
-    display: inline-block;
-    width:12px;
-    height:12px;
-    background:rgba(52,199,36,1);
-    vertical-align: middle;
-    margin-right: 3px;
-  }
-  .icon2{
-    display: inline-block;
-    width:12px;
-    height:12px;
-    background:#F54E45;
-    vertical-align: middle;
-    margin-right: 3px;
-    margin-left: 20px;
-  }
-  .icon3{
-    display: inline-block;
-    width:12px;
-    height:12px;
-    background:#8D9399;
-    vertical-align: middle;
-    margin-right: 3px;
-    margin-left: 20px;
+    width: 100%;
+    height: 100%;
   }
-  .icon4{
-    display: inline-block;
-    height:6px;
-    width: 16px;
-    background:rgba(0,145,255,1);
-    border-radius:3px;
-    vertical-align: middle;
-    margin-right: 3px;
-    margin-left: 20px;
-  }
-  .icon5{
-    display: inline-block;
-    height:6px;
-    width: 16px;
-    background:#00D6B9;
-    border-radius:3px;
-    vertical-align: middle;
-    margin-right: 3px;
-    margin-left: 20px;
+  .pLegend {
+    font-size: 12px;
+    color: #000000;
+    text-align: center;
+    margin-top: 20px;
+    .icon1 {
+      display: inline-block;
+      width: 12px;
+      height: 12px;
+      background: rgba(52, 199, 36, 1);
+      vertical-align: middle;
+      margin-right: 3px;
+    }
+    .icon2 {
+      display: inline-block;
+      width: 12px;
+      height: 12px;
+      background: #f54e45;
+      vertical-align: middle;
+      margin-right: 3px;
+      margin-left: 20px;
+    }
+    .icon3 {
+      display: inline-block;
+      width: 12px;
+      height: 12px;
+      background: #8d9399;
+      vertical-align: middle;
+      margin-right: 3px;
+      margin-left: 20px;
+    }
+    .icon4 {
+      display: inline-block;
+      height: 6px;
+      width: 16px;
+      background: rgba(0, 145, 255, 1);
+      border-radius: 3px;
+      vertical-align: middle;
+      margin-right: 3px;
+      margin-left: 20px;
+    }
+    .icon5 {
+      display: inline-block;
+      height: 6px;
+      width: 16px;
+      background: #00d6b9;
+      border-radius: 3px;
+      vertical-align: middle;
+      margin-right: 3px;
+      margin-left: 20px;
+    }
   }
 }
-}
 </style>

+ 57 - 53
src/views/evaluate/evSnapshotsDialog.vue

@@ -85,17 +85,17 @@
     <div class="snapshotss-center2">
       <div class="snapshotss-cont2-box1 MicrYaHei">
         <span>数据传输情况</span>
-        <span :class="chillerCommand.isExecuted==1?'span1':'span2'" >
+        <span :class="chillerCommand.isExecuted==1?'span1':'span2'">
           能耗
           <img v-if="chillerCommand.energyErrorFlag==1" src="../../assets/finish.png" alt />
           <img v-else src="../../assets/wrong.png" alt />
-          </span>
-          <span :class="chillerCommand.isExecuted==1?'span1':'span2'" >
+        </span>
+        <span :class="chillerCommand.isExecuted==1?'span1':'span2'">
           环境
           <img v-if="chillerCommand.environmentErrorFlag==1" src="../../assets/finish.png" alt />
           <img v-else src="../../assets/wrong.png" alt />
-          </span>
-          <span :class="chillerCommand.isExecuted==1?'span1':'span2'">
+        </span>
+        <span :class="chillerCommand.isExecuted==1?'span1':'span2'">
           BA
           <img v-if="chillerCommand.baErrorFalg==1" src="../../assets/finish.png" alt />
           <img v-else src="../../assets/wrong.png" alt />
@@ -117,7 +117,7 @@
 </template>
 <script>
 import echarts from "echarts";
-import {queryCommand,getCommand} from '@/api/strategy/strategy.js'
+import { queryCommand, getCommand } from "@/api/strategy/strategy.js";
 export default {
   data() {
     return {
@@ -139,61 +139,65 @@ export default {
           img2: require("../../assets/wrong.png")
         }
       ],
-      today:"",
-      chillerOrg:{},
-      chillerCommand:{},
-      chillerHourList :[],
-      dataX:[],
-      loadX:[],
-      dataY1:[],
-      dataY2:[],
-      dataY3:[],
-      loadY1:[],
-      loadY2:[],
-      loadY3:[]
-    }
+      today: "",
+      chillerOrg: {},
+      chillerCommand: {},
+      chillerHourList: [],
+      dataX: [],
+      loadX: [],
+      dataY1: [],
+      dataY2: [],
+      dataY3: [],
+      loadY1: [],
+      loadY2: [],
+      loadY3: []
+    };
   },
   mounted() {
     this.formatTime();
-    this.getQuickData()
+    this.getQuickData();
   },
   methods: {
-    formatTime(){
-      let year = new Date().getFullYear()
-      let month = new Date().getMonth()+1>10?(new Date().getMonth()+1): ('0'+(new Date().getMonth()+1))
-      let date = new Date().getDate()>10?new Date().getDate():('0'+new Date.getDate())
-      console.log(year,month,date)
-      return this.today = year + ''+ month+''+date
+    formatTime() {
+      let year = new Date().getFullYear();
+      let month =
+        new Date().getMonth() + 1 > 10
+          ? new Date().getMonth() + 1
+          : "0" + (new Date().getMonth() + 1);
+      let date =
+        new Date().getDate() > 10
+          ? new Date().getDate()
+          : "0" + new Date.getDate();
+      return (this.today = year + "" + month + "" + date);
     },
-    getQuickData(){
+    getQuickData() {
       let params = {
-        getParams:{
-          date: this.today, //日期 yyyyMMdd
+        getParams: {
+          date: this.today //日期 yyyyMMdd
         }
-      }
-      queryCommand(params).then(res=>{
-        console.log(res)
-           this.chillerOrg = res.chillerOrg
-           this.chillerCommand = res.chillerCommand
-           this.chillerHourList = res.chillerHourList
-           this.drawData()
-      })
+      };
+      queryCommand(params).then(res => {
+        this.chillerOrg = res.chillerOrg;
+        this.chillerCommand = res.chillerCommand;
+        this.chillerHourList = res.chillerHourList;
+        this.drawData();
+      });
+    },
+    drawData() {
+      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);
+        this.loadY2.push(el.predictedLoadUpLimit);
+        this.loadY3.push(el.redictedLoadDownLimit);
+      });
+      this.drawSnapshotssLeft();
+      this.drawSnapshotssRight();
     },
-     drawData(){
-            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)
-                this.loadY2.push(el.predictedLoadUpLimit)
-                this.loadY3.push(el.redictedLoadDownLimit)
-            })
-             this.drawSnapshotssLeft();
-             this.drawSnapshotssRight();
-        },
     drawSnapshotssLeft() {
       var snapshotssLeft = echarts.init(
         document.getElementById("snapshotssLeft")
@@ -265,7 +269,7 @@ export default {
               shadowOffsetY: 0,
               color: "#222"
             }
-          },
+          }
           // formatter: function(params) {
           //   return params[2].name + "<br />" + params[2].value;
           // }

+ 2 - 5
src/views/evaluate/evTwoLevelMenu.vue

@@ -15,7 +15,7 @@
             <li :class="{current: num==3}" @click="change(3)">执行率</li>
           </div>
           <div class="count-top-right">
-            <date-temp  @pickerVal="pickerVal"></date-temp>
+            <date-temp @pickerVal="pickerVal"></date-temp>
           </div>
         </ul>
         <div class="count-bottom">
@@ -164,9 +164,7 @@ export default {
         this.queryEnergyDayQuery();
       }
     },
-    pickerVal(val) {
-      console.log(val);
-    },
+    pickerVal(val) {},
     jumpIndex() {
       this.$router.push("/evaluate");
     },
@@ -182,7 +180,6 @@ export default {
           this.tindoorOverrunDegree = res.tindoorOverrunDegree; //超限程度
           this.tindoorFillRate = res.tindoorFillRate; //室内温度满足率
           this.energySavingRate = res.energySavingRate; //节能率
-          console.log(this.energySavingRate);
         }
       });
     },

+ 301 - 303
src/views/strategy/animationBox.vue

@@ -1,329 +1,327 @@
 <template>
-<div class="an-content">
-       <div class="snapshotss-center2">
-        <div class="snapshotss-cont2-box1 MicrYaHei">
-            <span>数据传输情况</span>
-             <span :class="data.isExecuted==1?'span1':'span2'" >
-                能耗
-                <img v-if="data.energyErrorFlag==1" src="../../assets/finish.png" alt />
-                <img v-else src="../../assets/wrong.png" alt />
-                </span>
-                <span :class="data.isExecuted==1?'span1':'span2'" >
-                环境
-                <img v-if="data.environmentErrorFlag==1" src="../../assets/finish.png" alt />
-                <img v-else src="../../assets/wrong.png" alt />
-                </span>
-                <span :class="data.isExecuted==1?'span1':'span2'">
-                BA
-                <img v-if="data.baErrorFalg==1" src="../../assets/finish.png" alt />
-                <img v-else src="../../assets/wrong.png" alt />
-            </span>
-        </div>
-        <div class="snapshotss-cont2-box2 MicrYaHei">
-            <span>实际冷量</span>
-            <span>{{data.nowPlantLoad || 0}} KW</span>
-            <span>未来1小时预测冷量</span>
-            <span>{{data.predictedLoad1h || 0}} KW</span>
-        </div>
-        </div>
-      <div class="an-bottom">
-          <div id="leftLine" style="width:45%;height:350px;margin-right:;24px;">
-          </div>
-          <div id="rightLine" style="width:45%;height:350px;"></div>
+  <div class="an-content">
+    <div class="snapshotss-center2">
+      <div class="snapshotss-cont2-box1 MicrYaHei">
+        <span>数据传输情况</span>
+        <span :class="data.isExecuted==1?'span1':'span2'">
+          能耗
+          <img v-if="data.energyErrorFlag==1" src="../../assets/finish.png" alt />
+          <img v-else src="../../assets/wrong.png" alt />
+        </span>
+        <span :class="data.isExecuted==1?'span1':'span2'">
+          环境
+          <img v-if="data.environmentErrorFlag==1" src="../../assets/finish.png" alt />
+          <img v-else src="../../assets/wrong.png" alt />
+        </span>
+        <span :class="data.isExecuted==1?'span1':'span2'">
+          BA
+          <img v-if="data.baErrorFalg==1" src="../../assets/finish.png" alt />
+          <img v-else src="../../assets/wrong.png" alt />
+        </span>
       </div>
+      <div class="snapshotss-cont2-box2 MicrYaHei">
+        <span>实际冷量</span>
+        <span>{{data.nowPlantLoad || 0}} KW</span>
+        <span>未来1小时预测冷量</span>
+        <span>{{data.predictedLoad1h || 0}} KW</span>
+      </div>
+    </div>
+    <div class="an-bottom">
+      <div id="leftLine" style="width:45%;height:350px;margin-right:;24px;"></div>
+      <div id="rightLine" style="width:45%;height:350px;"></div>
+    </div>
 
-      <div class="side-r" v-if="data.isExecuted!=0">
-          <div v-if="!showDraw" class="float-r" @click="showDraw = true">
-              <img src="../../assets/open.png" alt="">
-              <p>当前策略</p>
-          </div>
+    <div class="side-r" v-if="data.isExecuted!=0">
+      <div v-if="!showDraw" class="float-r" @click="showDraw = true">
+        <img src="../../assets/open.png" alt />
+        <p>当前策略</p>
       </div>
+    </div>
 
-      <bom-box :class="['draw', {'open': showDraw}]" :data='data' @close="showDraw = false"></bom-box>
-</div>
-  
+    <bom-box :class="['draw', {'open': showDraw}]" :data="data" @close="showDraw = false"></bom-box>
+  </div>
 </template>
 
 <script>
-import echarts from 'echarts'
-import bomBox from './bomBox'
+import echarts from "echarts";
+import bomBox from "./bomBox";
 export default {
-    data(){
-        return{
-            showDraw: false,
-            dataX:[],
-            dataY1:[],
-            dataY2:[],
-            dataY3:[],
-            loadX:[],
-            loadY1:[],
-            loadY2:[],
-            loadY3:[]
-        }
+  data() {
+    return {
+      showDraw: false,
+      dataX: [],
+      dataY1: [],
+      dataY2: [],
+      dataY3: [],
+      loadX: [],
+      loadY1: [],
+      loadY2: [],
+      loadY3: []
+    };
+  },
+  components: { bomBox },
+  props: ["data", "chillerHourList"],
+  methods: {
+    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);
+        this.loadY2.push(el.predictedLoadUpLimit);
+        this.loadY3.push(el.redictedLoadDownLimit);
+      });
     },
-    components:{bomBox},
-    props:['data','chillerHourList'],
-    methods:{
-        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)
-                this.loadY2.push(el.predictedLoadUpLimit)
-                this.loadY3.push(el.redictedLoadDownLimit)
-            })
+    drawLeft() {
+      var leftLine = echarts.init(document.getElementById("leftLine"));
+      let option = {
+        tooltip: {
+          trigger: "axis"
         },
-        drawLeft(){
-             var leftLine = echarts.init(document.getElementById('leftLine'))
-             let option = {  
-                tooltip: {
-                    trigger: 'axis'
-                },
-                legend: {
-                    data: ['室外温度', '室内平均温度', '室内最高温度']
-                },
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-               
-                xAxis: {
-                    type: 'category',
-                    boundaryGap: false,
-                    data: this.dataX,
-                },
-                yAxis: {
-                    type: 'value'
-                },
-                series: [
-                    {
-                        name: '室外温度',
-                        type: 'line',
-                        stack: '总量',
-                        data: this.dataY1
-                    },
-                    {
-                        name: '室内平均温度',
-                        type: 'line',
-                        stack: '总量',
-                        data: this.dataY2
-                    },
-                    {
-                        name: '室内最高温度',
-                        type: 'line',
-                        stack: '总量',
-                        data: this.dataY3
-                    },
-                
-                ]
-            };
-            leftLine.setOption(option)
+        legend: {
+          data: ["室外温度", "室内平均温度", "室内最高温度"]
         },
-        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) {
-                    //     console.log(params)
-                    // //     return params[2].name + '<br />' + params[2].value;
-                    // }
-                },
-                grid: {
-                    left: '3%',
-                    right: '4%',
-                    bottom: '3%',
-                    containLabel: true
-                },
-                xAxis: {
-                    type: 'category',
-                    data: this.loadX,
-                    
-                },
-                yAxis: {
-                    splitNumber: 3,
-                    splitLine: {
-                        show: false
-                    }
-                },
-                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: '#c23531'
-                    },
-                    showSymbol: false
-                }]
-            });
-            },
-    },
-    created(){    
-        this.getData()
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true
+        },
+
+        xAxis: {
+          type: "category",
+          boundaryGap: false,
+          data: this.dataX
+        },
+        yAxis: {
+          type: "value"
+        },
+        series: [
+          {
+            name: "室外温度",
+            type: "line",
+            stack: "总量",
+            data: this.dataY1
+          },
+          {
+            name: "室内平均温度",
+            type: "line",
+            stack: "总量",
+            data: this.dataY2
+          },
+          {
+            name: "室内最高温度",
+            type: "line",
+            stack: "总量",
+            data: this.dataY3
+          }
+        ]
+      };
+      leftLine.setOption(option);
     },
-    mounted(){
-        this.drawLeft()
-        this.drawRight()
+    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
+        },
+        xAxis: {
+          type: "category",
+          data: this.loadX
+        },
+        yAxis: {
+          splitNumber: 3,
+          splitLine: {
+            show: false
+          }
+        },
+        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: "#c23531"
+            },
+            showSymbol: false
+          }
+        ]
+      });
     }
-}
+  },
+  created() {
+    this.getData();
+  },
+  mounted() {
+    this.drawLeft();
+    this.drawRight();
+  }
+};
 </script>
 
 <style lang='scss' scoped>
-.an-content{
-   .snapshotss-center2 {
-        padding: 20px 0;
-        margin-bottom: 44px;
+.an-content {
+  .snapshotss-center2 {
+    padding: 20px 0;
+    margin-bottom: 44px;
+    display: flex;
+    align-items: center;
+    overflow: hidden;
+    .snapshotss-cont2-box1,
+    .snapshotss-cont2-box2 {
+      flex: 1;
+      height: 80px;
+      background: url("../../assets/copy.png");
+      background-size: 100% 100%;
+      display: flex;
+      align-items: center;
+      padding-left: 24px;
+    }
+    .snapshotss-cont2-box1 {
+      margin-right: 12px;
+      span:nth-of-type(1) {
+        height: 22px;
+        font-size: 14px;
+        color: rgba(100, 108, 115, 1);
+        line-height: 19px;
+        margin-right: 20px;
+      }
+      span:not(:first-child) {
+        height: 28px;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 16px;
+        font-size: 14px;
+        color: rgba(31, 36, 41, 1);
         display: flex;
+        justify-content: space-between;
         align-items: center;
-        overflow: hidden;
-        .snapshotss-cont2-box1,
-        .snapshotss-cont2-box2 {
-            flex:1;
-            height: 80px;
-            background: url("../../assets/copy.png");
-            background-size: 100% 100%;
-            display: flex;
-            align-items: center;
-            padding-left: 24px;
-        }
-        .snapshotss-cont2-box1 {
-            margin-right: 12px;
-            span:nth-of-type(1) {
-                height: 22px;
-                font-size: 14px;
-                color: rgba(100, 108, 115, 1);
-                line-height: 19px;
-                margin-right: 20px;
-            }
-            span:not(:first-child) {
-                height: 28px;
-                background: rgba(255, 255, 255, 1);
-                border-radius: 16px;
-                font-size: 14px;
-                color: rgba(31, 36, 41, 1);
-                display: flex;
-                justify-content: space-between;
-                align-items: center;
-                padding: 0 6px 0 12px;
-                margin-right: 20px;
-                img {
-                width: 20px;
-                height: 20px;
-                margin-left: 8px;
-                }
-            }
-            .span1 {
-                border: 1px solid rgba(52, 199, 36, 1);
-            }
-            .span2 {
-                border: 1px solid rgba(245, 78, 69, 1);
-            }
-        }
-        .snapshotss-cont2-box2 {
-            span:nth-of-type(1),
-            span:nth-of-type(3) {
-                height: 22px;
-                font-size: 14px;
-                color: rgba(100, 108, 115, 1);
-                line-height: 19px;
-                margin-right: 16px;
-            }
-            span:nth-of-type(2),
-            span:nth-of-type(4) {
-                height: 32px;
-                font-size: 24px;
-                font-family: Persagy;
-                color: rgba(31, 36, 41, 1);
-                line-height: 29px;
-                margin-right: 64px;
-            }
-            span:nth-of-type(3) {
-                margin-right: 16px;
-            }
+        padding: 0 6px 0 12px;
+        margin-right: 20px;
+        img {
+          width: 20px;
+          height: 20px;
+          margin-left: 8px;
         }
+      }
+      .span1 {
+        border: 1px solid rgba(52, 199, 36, 1);
+      }
+      .span2 {
+        border: 1px solid rgba(245, 78, 69, 1);
+      }
     }
-    .side-r {
-        position: fixed;
-        right: 0;
-        top: 50%;
-        transform: translateY(-50%);
-        box-shadow:0px 0px 8px 0px rgba(0,0,0,0.1);
-        background: #ffffff;
-        display: flex;
-        .float-r {
-            display: flex;
-            align-items: center;
-            padding: 60px 40px 60px 10px;
-            cursor: pointer;
-            img {
-                height: 10px;
-                margin-right: 10px;
-            }
-            p {
-                width: 0;
-            }
-            &:hover {
-                background: #efefef;
-            }
-        }
+    .snapshotss-cont2-box2 {
+      span:nth-of-type(1),
+      span:nth-of-type(3) {
+        height: 22px;
+        font-size: 14px;
+        color: rgba(100, 108, 115, 1);
+        line-height: 19px;
+        margin-right: 16px;
+      }
+      span:nth-of-type(2),
+      span:nth-of-type(4) {
+        height: 32px;
+        font-size: 24px;
+        font-family: Persagy;
+        color: rgba(31, 36, 41, 1);
+        line-height: 29px;
+        margin-right: 64px;
+      }
+      span:nth-of-type(3) {
+        margin-right: 16px;
+      }
     }
-    .draw {
-        position: fixed;
-        left: 100%;
-        top: 50%;
-        transform: translateY(-50%);
-        box-shadow:0px 0px 8px 0px rgba(0,0,0,0.1);
-        background: #ffffff;
-        transition: transform 0.3s ease-in-out;
-        &.open {
-            transform: translate(-100%,-50%);
-        }
+  }
+  .side-r {
+    position: fixed;
+    right: 0;
+    top: 50%;
+    transform: translateY(-50%);
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+    background: #ffffff;
+    display: flex;
+    .float-r {
+      display: flex;
+      align-items: center;
+      padding: 60px 40px 60px 10px;
+      cursor: pointer;
+      img {
+        height: 10px;
+        margin-right: 10px;
+      }
+      p {
+        width: 0;
+      }
+      &:hover {
+        background: #efefef;
+      }
     }
-    .an-bottom{
-        margin-top: 45px;
-        display: flex;
-        
+  }
+  .draw {
+    position: fixed;
+    left: 100%;
+    top: 50%;
+    transform: translateY(-50%);
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+    background: #ffffff;
+    transition: transform 0.3s ease-in-out;
+    &.open {
+      transform: translate(-100%, -50%);
     }
+  }
+  .an-bottom {
+    margin-top: 45px;
+    display: flex;
+  }
 }
 </style>

+ 210 - 211
src/views/strategy/bomBox.vue

@@ -1,240 +1,239 @@
 <template>
   <div class="bomb">
-    <div  class="close" @click="$emit('close')">
-        <img src="../../assets/close.png" alt="">
+    <div class="close" @click="$emit('close')">
+      <img src="../../assets/close.png" alt />
     </div>
     <div class="bomb-left">
-        <div class="bomb-left1">当前策略</div>
-        <div class="bomb-left2">应执行时间 {{data.executeTime?(data.executeTime.slice(8,10)+":"+ data.executeTime.slice(10,12)):'--'}} - {{data.pushTime?(data.pushTime.slice(8,10)+":"+data.pushTime.slice(10,12)): '--'}}</div>
-        <div class="bomb-left3">策略可靠度</div>
-        <div id='circleEcharts' style="width:104px;height:104px"></div>
+      <div class="bomb-left1">当前策略</div>
+      <div
+        class="bomb-left2"
+      >应执行时间 {{data.executeTime?(data.executeTime.slice(8,10)+":"+ data.executeTime.slice(10,12)):'--'}} - {{data.pushTime?(data.pushTime.slice(8,10)+":"+data.pushTime.slice(10,12)): '--'}}</div>
+      <div class="bomb-left3">策略可靠度</div>
+      <div id="circleEcharts" style="width:104px;height:104px"></div>
     </div>
     <div class="bomb-right">
-       <water-unit :data='data'></water-unit>
-         <div class="snapshotss-center2">
-            <div class="snapshotss-cont2-box1 MicrYaHei">
-                <span>数据传输情况</span>
-                <span :class="data.isExecuted==1?'span1':'span2'" >
-                能耗
-                <img v-if="data.energyErrorFlag==1" src="../../assets/finish.png" alt />
-                <img v-else src="../../assets/wrong.png" alt />
-                </span>
-                <span :class="data.isExecuted==1?'span1':'span2'" >
-                环境
-                <img v-if="data.environmentErrorFlag==1" src="../../assets/finish.png" alt />
-                <img v-else src="../../assets/wrong.png" alt />
-                </span>
-                <span :class="data.isExecuted==1?'span1':'span2'">
-                BA
-                <img v-if="data.baErrorFalg==1" src="../../assets/finish.png" alt />
-                <img v-else src="../../assets/wrong.png" alt />
-                </span>
-            </div>
-            <div class="snapshotss-cont2-box2 MicrYaHei">
-                <span>实际冷量</span>
-                <span>{{data.nowPlantLoad || 0}} KW</span>
-                <span>未来1小时预测冷量</span>
-                <span>{{data.predictedLoad1h || 0}} KW</span>
-            </div>
-            </div>
-        <div class="bomb-right-bottom">
-            <el-input placeholder="你可以在此处填写备注信息" v-model="remarks" @blur="saveRemarks"> </el-input>
+      <water-unit :data="data"></water-unit>
+      <div class="snapshotss-center2">
+        <div class="snapshotss-cont2-box1 MicrYaHei">
+          <span>数据传输情况</span>
+          <span :class="data.isExecuted==1?'span1':'span2'">
+            能耗
+            <img v-if="data.energyErrorFlag==1" src="../../assets/finish.png" alt />
+            <img v-else src="../../assets/wrong.png" alt />
+          </span>
+          <span :class="data.isExecuted==1?'span1':'span2'">
+            环境
+            <img v-if="data.environmentErrorFlag==1" src="../../assets/finish.png" alt />
+            <img v-else src="../../assets/wrong.png" alt />
+          </span>
+          <span :class="data.isExecuted==1?'span1':'span2'">
+            BA
+            <img v-if="data.baErrorFalg==1" src="../../assets/finish.png" alt />
+            <img v-else src="../../assets/wrong.png" alt />
+          </span>
         </div>
-
+        <div class="snapshotss-cont2-box2 MicrYaHei">
+          <span>实际冷量</span>
+          <span>{{data.nowPlantLoad || 0}} KW</span>
+          <span>未来1小时预测冷量</span>
+          <span>{{data.predictedLoad1h || 0}} KW</span>
+        </div>
+      </div>
+      <div class="bomb-right-bottom">
+        <el-input placeholder="你可以在此处填写备注信息" v-model="remarks" @blur="saveRemarks"></el-input>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
-import echarts from 'echarts'
-import waterUnit from './waterUnit'
-import { updateCommand } from '@/api/strategy/strategy.js'
+import echarts from "echarts";
+import waterUnit from "./waterUnit";
+import { updateCommand } from "@/api/strategy/strategy.js";
 export default {
-    data(){
-        return{
-            circle1:0,
-            circle2:0,
-            remarks:''
+  data() {
+    return {
+      circle1: 0,
+      circle2: 0,
+      remarks: ""
+    };
+  },
+  props: ["data"],
+  components: { waterUnit },
+  methods: {
+    saveRemarks() {
+      let postParams = {
+        criteria: {
+          id: this.data.id,
+          remarks: this.remarks
         }
-    },
-    props:['data'],
-    components:{waterUnit},
-    methods:{
-        saveRemarks(){
-            console.log(this.data)
-            let postParams = {
-                criteria:{
-                    id:this.data.id,
-                    remarks:this.remarks
-                }
-            }
-            updateCommand({postParams}).then(res=>{
-                if(res.result=='success'){
-                    this.$message.success("添加备注成功!")
-                }
-            })
-        },
-        getData(){
-            this.circle1 = this.data.strategyReliability || 0
-            this.circle2 = 100 - this.circle1
-            this.drawCircle()
-        },
-        drawCircle(){
-            var circleEcharts  = echarts.init(document.getElementById("circleEcharts"))
-            let option = {
-                tooltip: {
-                    trigger: 'item',
-                    formatter: '{a} <br/>{b}: {c} ({d}%)'
-                },
-                series: [
-                    {
-                        name: '访问来源',
-                        type: 'pie',
-                        radius: ['50%', '70%'],
-                        avoidLabelOverlap: false,
-                        label: {
-                            normal: {
-                                show: false,
-                                position: 'center'
-                            },
-                            emphasis: {
-                                show: true,
-                                textStyle: {
-                                    fontSize: '30',
-                                    fontWeight: 'bold'
-                                }
-                            }
-                        },
-                        labelLine: {
-                            normal: {
-                                show: false
-                            }
-                        },
-                        data: [
-                            {value: this.circle1, name: '直接访问'},
-                            {value: this.circle2, name: '邮件营销'}
-                        ]
-                    }
-                ]
-            };
-            circleEcharts.setOption(option)
+      };
+      updateCommand({ postParams }).then(res => {
+        if (res.result == "success") {
+          this.$message.success("添加备注成功!");
         }
+      });
+    },
+    getData() {
+      this.circle1 = this.data.strategyReliability || 0;
+      this.circle2 = 100 - this.circle1;
+      this.drawCircle();
     },
-    mounted(){
-        this.getData()
-       
+    drawCircle() {
+      var circleEcharts = echarts.init(
+        document.getElementById("circleEcharts")
+      );
+      let option = {
+        tooltip: {
+          trigger: "item",
+          formatter: "{a} <br/>{b}: {c} ({d}%)"
+        },
+        series: [
+          {
+            name: "访问来源",
+            type: "pie",
+            radius: ["50%", "70%"],
+            avoidLabelOverlap: false,
+            label: {
+              normal: {
+                show: false,
+                position: "center"
+              },
+              emphasis: {
+                show: true,
+                textStyle: {
+                  fontSize: "30",
+                  fontWeight: "bold"
+                }
+              }
+            },
+            labelLine: {
+              normal: {
+                show: false
+              }
+            },
+            data: [
+              { value: this.circle1, name: "直接访问" },
+              { value: this.circle2, name: "邮件营销" }
+            ]
+          }
+        ]
+      };
+      circleEcharts.setOption(option);
     }
-
-}
+  },
+  mounted() {
+    this.getData();
+  }
+};
 </script>
 
 <style lang='scss' scoped>
-.bomb{
-    background: #cccccc;
-    width:98%;
-    display: flex;
-    align-items: center;
-    padding:20px 0;
-    .close {
-        cursor: pointer;
-        margin-left: 10px;
+.bomb {
+  background: #cccccc;
+  width: 98%;
+  display: flex;
+  align-items: center;
+  padding: 20px 0;
+  .close {
+    cursor: pointer;
+    margin-left: 10px;
+  }
+  .bomb-left {
+    width: 240px;
+    padding-left: 30px;
+    .bomb-left1 {
+      font-size: 16px;
+      margin: 38px 0 16px 0;
+    }
+    .bomb-left2 {
+      color: #646c73;
+      font-size: 14px;
+      margin-bottom: 16px;
     }
-    .bomb-left{
-        width:240px;
-        padding-left:30px;
-        .bomb-left1{
-            font-size:16px;
-            margin:38px 0 16px 0
+    .bomb-left3 {
+      color: #646c73;
+      font-size: 14px;
+      margin-bottom: 22px;
+    }
+  }
+  .bomb-right {
+    flex: 1;
+    .snapshotss-center2 {
+      padding: 20px 0;
+      margin-bottom: 44px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      .snapshotss-cont2-box1,
+      .snapshotss-cont2-box2 {
+        flex: 1;
+        height: 80px;
+        background: url("../../assets/copy.png");
+        background-size: 100% 100%;
+        display: flex;
+        align-items: center;
+        padding-left: 24px;
+      }
+      .snapshotss-cont2-box1 {
+        margin-right: 12px;
+        span:nth-of-type(1) {
+          height: 22px;
+          font-size: 14px;
+          color: rgba(100, 108, 115, 1);
+          line-height: 19px;
+          margin-right: 20px;
         }
-        .bomb-left2{
-            color: #646C73;
-            font-size: 14px;
-            margin-bottom:16px;
+        span:not(:first-child) {
+          height: 28px;
+          background: rgba(255, 255, 255, 1);
+          border-radius: 16px;
+          font-size: 14px;
+          color: rgba(31, 36, 41, 1);
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          padding: 0 6px 0 12px;
+          margin-right: 20px;
+          img {
+            width: 20px;
+            height: 20px;
+            margin-left: 8px;
+          }
         }
-        .bomb-left3{
-            color:#646C73;
-            font-size: 14px;
-            margin-bottom:22px;
+        .span1 {
+          border: 1px solid rgba(52, 199, 36, 1);
         }
-    }
-    .bomb-right{
-        flex:1;
-        .snapshotss-center2 {
-            padding: 20px 0;
-            margin-bottom: 44px;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            .snapshotss-cont2-box1,
-            .snapshotss-cont2-box2 {
-                flex:1;
-                height: 80px;
-                background: url("../../assets/copy.png");
-                background-size: 100% 100%;
-                display: flex;
-                align-items: center;
-                padding-left: 24px;
-            }
-            .snapshotss-cont2-box1 {
-            margin-right: 12px;
-            span:nth-of-type(1) {
-                height: 22px;
-                font-size: 14px;
-                color: rgba(100, 108, 115, 1);
-                line-height: 19px;
-                margin-right: 20px;
-            }
-            span:not(:first-child) {
-                height: 28px;
-                background: rgba(255, 255, 255, 1);
-                border-radius: 16px;
-                font-size: 14px;
-                color: rgba(31, 36, 41, 1);
-                display: flex;
-                justify-content: space-between;
-                align-items: center;
-                padding: 0 6px 0 12px;
-                margin-right: 20px;
-                img {
-                width: 20px;
-                height: 20px;
-                margin-left: 8px;
-                }
-            }
-            .span1 {
-                border: 1px solid rgba(52, 199, 36, 1);
-            }
-            .span2 {
-                border: 1px solid rgba(245, 78, 69, 1);
-            }
-            }
-            .snapshotss-cont2-box2 {
-            span:nth-of-type(1),
-            span:nth-of-type(3) {
-                height: 22px;
-                font-size: 14px;
-                color: rgba(100, 108, 115, 1);
-                line-height: 19px;
-                margin-right: 16px;
-            }
-            span:nth-of-type(2),
-            span:nth-of-type(4) {
-                height: 32px;
-                font-size: 24px;
-                font-family: Persagy;
-                color: rgba(31, 36, 41, 1);
-                line-height: 29px;
-                margin-right: 64px;
-            }
-            span:nth-of-type(3) {
-                margin-right: 16px;
-            }
-            }
+        .span2 {
+          border: 1px solid rgba(245, 78, 69, 1);
+        }
+      }
+      .snapshotss-cont2-box2 {
+        span:nth-of-type(1),
+        span:nth-of-type(3) {
+          height: 22px;
+          font-size: 14px;
+          color: rgba(100, 108, 115, 1);
+          line-height: 19px;
+          margin-right: 16px;
+        }
+        span:nth-of-type(2),
+        span:nth-of-type(4) {
+          height: 32px;
+          font-size: 24px;
+          font-family: Persagy;
+          color: rgba(31, 36, 41, 1);
+          line-height: 29px;
+          margin-right: 64px;
         }
-        .bomb-right-bottom{
-            margin-top: 16px;
+        span:nth-of-type(3) {
+          margin-right: 16px;
         }
+      }
     }
+    .bomb-right-bottom {
+      margin-top: 16px;
+    }
+  }
 }
-
 </style>

+ 72 - 52
src/views/strategy/index.vue

@@ -4,31 +4,42 @@
     <Head :headText="headText"></Head>
     <div class="nav-right">
       <img class="nav-icon" v-if="navText" src="@/assets/shape.png" alt />
-      <span class="nav-text1" v-if="navText">今日已收到 {{chillerCommand.chillerCount || 0}} 条策略,其中有 {{chillerCommand.hillerIsNotExecutedCount || 0}} 条未执行</span>
+      <span
+        class="nav-text1"
+        v-if="navText"
+      >今日已收到 {{chillerCommand.chillerCount || 0}} 条策略,其中有 {{chillerCommand.hillerIsNotExecutedCount || 0}} 条未执行</span>
       <span class="nav-text" v-else>今天已收到 {{chillerCommand.chillerCount || 0}} 条策略</span>
       <span class="nav-look MicrYaHei" @click="showTodayStrategy = true">查看</span>
     </div>
     <div class="strategyContainer">
       <div class="strate-left">
         <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>
+        <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>
         <div class="strate-left-1">当前运行模式</div>
         <div class="strate-left-2">{{chillerCommand.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.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">新风机组:开启</div>
           <div class="strate-left-info">组合式空调机组:全新风</div>
         </div>
       </div>
       <div class="starte-right">
         <p class="strate-right-title">当前状态</p>
-        <water-unit :data='chillerOrg '></water-unit>
-        <animation-box v-if="chillerHourList.length>0" :data='chillerCommand' :chillerHourList='chillerHourList'></animation-box>
+        <water-unit :data="chillerOrg "></water-unit>
+        <animation-box
+          v-if="chillerHourList.length>0"
+          :data="chillerCommand"
+          :chillerHourList="chillerHourList"
+        ></animation-box>
       </div>
     </div>
     <el-dialog title="提示" :visible.sync="showTodayStrategy" width="1260px">
-      <today-strategy :data='tableData'></today-strategy>
+      <today-strategy :data="tableData"></today-strategy>
     </el-dialog>
   </div>
 </template>
@@ -38,19 +49,19 @@ import Head from "../main/index";
 import animationBox from "./animationBox";
 import waterUnit from "./waterUnit";
 import TodayStrategy from "@/components/todayStrategy.vue";
-import {queryCommand,getCommand} from '@/api/strategy/strategy.js'
+import { queryCommand, getCommand } from "@/api/strategy/strategy.js";
 export default {
   data() {
     return {
       headText: "当日运行策略",
       navText: true,
       showTodayStrategy: false,
-      tableData:[],
-      chillerCommand:{},
-      today:'',
-      now:'',
-      chillerOrg:{},
-      chillerHourList:[]
+      tableData: [],
+      chillerCommand: {},
+      today: "",
+      now: "",
+      chillerOrg: {},
+      chillerHourList: []
     };
   },
   components: {
@@ -59,62 +70,71 @@ export default {
     waterUnit,
     TodayStrategy
   },
-  methods:{
-    formatTime(){
-      let year = new Date().getFullYear()
-      let month = new Date().getMonth()+1>10?(new Date().getMonth()+1): ('0'+(new Date().getMonth()+1))
-      let date = new Date().getDate()>10?new Date().getDate():('0'+new Date.getDate())
-      console.log(year,month,date)
-      return this.today = year + ''+ month+''+date
+  methods: {
+    formatTime() {
+      let year = new Date().getFullYear();
+      let month =
+        new Date().getMonth() + 1 > 10
+          ? new Date().getMonth() + 1
+          : "0" + (new Date().getMonth() + 1);
+      let date =
+        new Date().getDate() > 10
+          ? new Date().getDate()
+          : "0" + new Date.getDate();
+      return (this.today = year + "" + month + "" + date);
     },
-    getPer5Time(){
-      let now = new Date().getTime()
-      let datetime = now-5*60*1000
-      let hours = new Date(datetime).getHours() < 10 ? "0" +  new Date(datetime).getHours(): new Date(datetime).getHours()
-      let minute = new Date(datetime).getMinutes() < 10 ? "0" + new Date(datetime).getMinutes() : new Date(datetime).getMinutes();
-      return this.now = hours + '' + minute
+    getPer5Time() {
+      let now = new Date().getTime();
+      let datetime = now - 5 * 60 * 1000;
+      let hours =
+        new Date(datetime).getHours() < 10
+          ? "0" + new Date(datetime).getHours()
+          : new Date(datetime).getHours();
+      let minute =
+        new Date(datetime).getMinutes() < 10
+          ? "0" + new Date(datetime).getMinutes()
+          : new Date(datetime).getMinutes();
+      return (this.now = hours + "" + minute);
     },
-    getQuickData(){
+    getQuickData() {
       let params = {
-        getParams:{
-          date: this.today, //日期 yyyyMMdd
+        getParams: {
+          date: this.today //日期 yyyyMMdd
         }
-      }
-      queryCommand(params).then(res=>{
-        console.log(res)
-           this.chillerOrg = res.chillerOrg
-           this.chillerCommand = res.chillerCommand
-           this.chillerHourList = res.chillerHourList
-      })
+      };
+      queryCommand(params).then(res => {
+        this.chillerOrg = res.chillerOrg;
+        this.chillerCommand = res.chillerCommand;
+        this.chillerHourList = res.chillerHourList;
+      });
     },
-    getData(){
+    getData() {
       let params = {
-        postParams:{
-          criteria:{
-            projectId:"Pj4419000005",
-            date:this.today
+        postParams: {
+          criteria: {
+            projectId: "Pj4419000005",
+            date: this.today
           }
         }
-      }
-      getCommand(params).then(res=>{
-        
-          this.tableData = res.content?res.data.content:[]
-        
-      })
+      };
+      getCommand(params).then(res => {
+        this.tableData = res.content ? res.data.content : [];
+      });
     }
   },
-  mounted(){
-    this.formatTime()
-    this.getPer5Time()
+  mounted() {
+    this.formatTime();
+    this.getPer5Time();
     // let vm = this
     // setInterval(function(){
     //    vm.getData()
     // },1500)
-    this.getQuickData()
-    this.getData()
+    this.getQuickData();
+    this.getData();
   }
 };
 </script>
+
 <style lang="scss" scoped>
 .nav-right {
   height: 48px;