Эх сурвалжийг харах

布撤防状态文字颜色调整

jiawuxian 2 жил өмнө
parent
commit
3e745d7e32

+ 7 - 1
src/views/menu/protection/components/item.vue

@@ -21,7 +21,13 @@
         >
         </template>
       </van-cell>
-      <van-cell title="布撤防状态" :value="getDictLabel(data.status, 'protection_status', '未上报')" />
+      <van-cell title="布撤防状态" >
+        <template #right-icon>
+            <span v-if="data.status==1" style="color:rgb(0,164,46)">布防</span>
+            <span v-else-if="data.status==0" style="color:rgb(215,0,15)">撤防</span>
+            <span v-else>{{getDictLabel(data.status, 'protection_status', '未上报')}}</span>
+        </template>
+      </van-cell>
       <van-cell
         v-if="data.status == '0' || data.status == '1'"
         :title="data.status == '0' ? '撤防时间' : '布防时间'"

+ 8 - 6
src/views/menu/protection/detail.vue

@@ -21,7 +21,9 @@
           </template>
           <template slot-scope="{ data }">
             <div class="datarow">
-              <span>{{ getLabel(statusOptions, data.status) }}</span>
+              <span v-if="data.status == 1" style="color: rgb(0, 164, 46)">布防</span>
+              <span v-else-if="data.status == 0" style="color: rgb(215, 0, 15)">撤防</span>
+              <span v-else>{{ getLabel(data.status, 'protection_status', '未上报') }}</span>
               <span>{{ data.updateTime }}</span>
               <span>{{ data.statusUpdatorName }}</span>
             </div>
@@ -71,12 +73,12 @@ export default {
 .detail {
   margin: 15px;
 }
-.info{
-  ::v-deep .van-cell__title{
-    max-width:40%;
+.info {
+  ::v-deep .van-cell__title {
+    max-width: 40%;
   }
-  ::v-deep .van-cell__value{
-    max-width:60%;
+  ::v-deep .van-cell__value {
+    max-width: 60%;
   }
 }
 .history {