guoxiaohuan преди 5 години
родител
ревизия
abcc6a9074
променени са 3 файла, в които са добавени 66 реда и са изтрити 18 реда
  1. 27 12
      src/views/evaluate/evCard.vue
  2. 19 4
      src/views/evaluate/evSnapshotsDialog.vue
  3. 20 2
      src/views/strategy/waterUnit.vue

+ 27 - 12
src/views/evaluate/evCard.vue

@@ -1,22 +1,22 @@
 <template>
     <div class='count-card-box'>
         <div class='count-card' v-for='(item,index) in cardList' :key='index'>
-            <div class='card-div1' v-if="item.recommend.onTime">执行时间:{{item.recommend?formatterStr2(item.recommend.onTime):'--'}}</div>
-            <div class='card-div1' v-else-if="item.recommend.offTime">执行时间:{{item.recommend?formatterStr2(item.recommend.offTime):'--'}}</div>
+            <div class='card-div1' v-if='item.recommend.onTime'>执行时间:{{item.recommend?formatterStr2(item.recommend.onTime):'--'}}</div>
+            <div class='card-div1' v-else-if='item.recommend.offTime'>执行时间:{{item.recommend?formatterStr2(item.recommend.offTime):'--'}}</div>
             <div class='card-div1' v-else>执行时间:{{item.recommend?formatterStr2(item.recommend.time):'--'}}</div>
             <div class='card-div2 MicrYaHei'>
                 <span>策略建议</span>
                 <span>冷机台数</span>
                 <span>
-                    <b style='width:50px;display: inline-block;text-align: center;'>{{shutDown(item.recommend.chillerNumSetL,true,null)}}</b>
+                    <b style='width:50px;display: inline-block;text-align: center;'>{{formatterRes(item.recommend.chillerNumSetL,true,0)}}</b>
                     <b
                         style='width:50px;display: inline-block;text-align: center;'
-                    >{{shutDown(item.recommend.chillerNumSetS,true,null)}}</b>小
+                    >{{formatterRes(item.recommend.chillerNumSetS,true,0)}}</b>小
                 </span>
                 <span>冷机出水温度</span>
                 <span>
-                    <b style='width:50px;display: inline-block;text-align: center;'>{{shutDown(item.recommend.chillWaterOutTempSet,false,1)}}</b> °C
+                    <b style='width:50px;display: inline-block;text-align: center;'>{{formatterRes(item.recommend.chillWaterOutTempSet,false,1)}}</b> °C
                 </span>
             </div>
             <div class='card-div3 MicrYaHei'>
@@ -27,12 +27,12 @@
                         v-if='item.real'
                         style='width:50px;display: inline-block;text-align: center;'
                         :class='item.recommend.chillerNumSetL==item.real.chillerNumSetLOrg?"":"red"'
-                    >{{shutDown(item.real.chillerNumSetLOrg,true,null)}}</b>大
+                    >{{formatterRes(item.real.chillerNumSetLOrg,true,0)}}</b>大
                     <b
                         v-if='item.real'
                         style='width:50px;display: inline-block;text-align: center;'
                         :class='item.recommend.chillerNumSetS==item.real.chillerNumSetSOrg?"":"red"'
-                    >{{shutDown(item.real.chillerNumSetSOrg,true,null)}}</b> 小
+                    >{{formatterRes(item.real.chillerNumSetSOrg,true,0)}}</b> 小
                 </span>
                 <span>冷机出水温度</span>
                 <span>
@@ -40,7 +40,7 @@
                         v-if='item.real'
                         style='width:50px;display: inline-block;text-align: center;'
                         :class='item.recommend.chillWaterOutTempSet==item.real.chillWaterOutTempSetOrg?"":"red"'
-                    >{{shutDown(item.real.chillWaterOutTempSetOrg,false,1)}}</b>°C
+                    >{{formatterRes(item.real.chillWaterOutTempSetOrg,false,1)}}</b>°C
                 </span>
             </div>
 
@@ -50,7 +50,7 @@
                     <img src='../../assets/completed.png' alt />
                     已按策略执行
                 </span>
-                <template v-else-if="item.recommend.appealId" v-for='(item1,index) in titles'>
+                <template v-else-if='item.recommend.appealId' v-for='(item1,index) in titles'>
                     <template v-if='item1.id==item.recommend.appealId'>
                         <span class='card-div8' v-if='item1.status==302' :key='"l"+index'>
                             <img src='../../assets/processing.png' alt />
@@ -100,7 +100,6 @@ export default {
     },
     methods: {
         lookQuickData(item) {
-            console.log(item)
             this.time = item.recommend.time
             this.viewSnapshots = true
         },
@@ -119,13 +118,29 @@ export default {
                 this.titles = res.content
             })
         },
+        formatterRes(res, type, num) {
+            if (res == '-9999') {
+                return 'x'
+            } else if (res == '-9998') {
+                if (type) {
+                    return 0
+                } else {
+                    return '--'
+                }
+            } else {
+                if (res != undefined) {
+                    res = res.toFixed(num)
+                } else {
+                    return '--'
+                }
+                return res
+            }
+        },
         getAppealId() {
             this.cardList.forEach(el => {
                 if (!el.recommend.isExecuted) {
-                    console.log(el)
                     this.ids.push(el.recommend.appealId)
                 }
-                console.log(this.ids)
             })
             this.queryFlow(this.ids)
         }

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

@@ -36,7 +36,7 @@
                         </div>
                         <div class='snapshotss-cont-bot-2 MicrYaHei'>
                             <span>大</span>
-                            <span style='margin-right: 20px;'>小</span>
+                            <span>小</span>
                             <span>供水温度设定</span>
                         </div>
                     </div>
@@ -674,6 +674,7 @@ export default {
             align-items: center;
             .snapshotss-cont {
                 border-radius: 4px;
+                flex: 1;
                 border: 1px solid rgba(238, 238, 238, 1);
                 .snapshotss-cont-top {
                     height: 40px;
@@ -688,7 +689,6 @@ export default {
                     padding: 14px 20px;
                     .snapshotss-cont-bot-1 {
                         display: flex;
-                        // justify-content: space-around;
                         justify-content: space-between;
                         align-items: center;
                         margin-bottom: 4px;
@@ -698,24 +698,39 @@ export default {
                             font-family: Persagy;
                             color: rgba(31, 36, 41, 1);
                             line-height: 29px;
+                            display: inline-block;
+                            width: 35%;
+                            text-align: center;
                         }
+                        span:nth-of-type(1),
                         span:nth-of-type(2) {
-                            margin: 0 20px;
+                            width: 15%;
                         }
                     }
                     .snapshotss-cont-bot-2 {
+                        display: flex;
+                        justify-content: space-between;
+                        align-items: center;
                         span {
                             height: 22px;
                             font-size: 14px;
                             color: rgba(100, 108, 115, 1);
                             line-height: 19px;
+                            display: inline-block;
+                            width: 35%;
+                            text-align: center;
                         }
+                        span:nth-of-type(1),
                         span:nth-of-type(2) {
-                            margin: 0 50px;
+                            width: 15%;
                         }
                     }
                 }
             }
+            .snapshotss-cont:nth-of-type(2),
+            .snapshotss-cont:nth-of-type(3) {
+                margin: 0 6px;
+            }
         }
     }
     .snapshotss-center2 {

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

@@ -21,8 +21,8 @@
                 </p>
             </div>
             <div class='starte-right-box-1-content'>
-                <p style='margin-left: 20px;'>大</p>
-                <p style='margin-left: 20px;'>小</p>
+                <p>大</p>
+                <p>小</p>
                 <p>供水温度设定</p>
             </div>
         </div>
@@ -168,6 +168,15 @@ export default {
             font-size: 24px;
             justify-content: space-evenly;
             margin-top: 11px;
+            p {
+                width: 35%;
+                text-align: center;
+            }
+            p:nth-of-type(1),
+            p:nth-of-type(2) {
+                width: 15%;
+                text-align: center;
+            }
         }
         .starte-right-box-1-content {
             display: flex;
@@ -175,6 +184,15 @@ export default {
             margin-top: 4px;
             margin-bottom: 14px;
             justify-content: space-evenly;
+            p {
+                width: 35%;
+                text-align: center;
+            }
+            p:nth-of-type(1),
+            p:nth-of-type(2) {
+                width: 15%;
+                text-align: center;
+            }
         }
     }
 }