Casper Dai пре 3 година
родитељ
комит
e809fd43aa

+ 4 - 0
src/scss/bem/_utility.scss

@@ -17,6 +17,10 @@
   text-overflow: ellipsis;
 }
 
+.u-color--primary {
+  color: $primary;
+}
+
 .u-color--success {
   color: $success;
 }

+ 2 - 0
src/scss/helpers/_variables.scss

@@ -7,6 +7,8 @@ $gray--dark: #969696;
 
 $black: #333333;
 
+$primary: #409eff;
+
 $success: #67c23a;
 $success--dark: #04a681;
 

+ 30 - 5
src/views/dashboard/components/Device.vue

@@ -63,17 +63,38 @@ export default {
     name () {
       return this.device.name
     },
-    online () {
-      return this.device.activate && this.device.onlineStatus === 1
+    isActivated () {
+      return this.device.activate === 2
+    },
+    isOnline () {
+      return this.device.onlineStatus === 1
     },
     statusClass () {
-      return this.online ? 'u-color--success' : this.device.activate ? 'u-color--error' : 'u-color--warning'
+      return this.isActivated
+        ? this.isOnline
+          ? 'u-color--success'
+          : 'u-color--error'
+        : this.device.activate
+          ? 'u-color--primary'
+          : 'u-color--warning'
     },
     statusType () {
-      return this.online ? '' : this.device.activate ? 'error' : 'warning'
+      return this.isActivated
+        ? this.isOnline
+          ? 'success'
+          : 'error'
+        : this.device.activate
+          ? 'primary'
+          : 'warning'
     },
     statusTip () {
-      return this.online ? '在线' : this.device.activate ? '离线' : '未激活'
+      return this.isActivated
+        ? this.isOnline
+          ? '在线'
+          : '离线'
+        : this.device.activate
+          ? '已激活'
+          : '未激活'
     },
     address () {
       // return `位置:${this.device.address}`
@@ -120,6 +141,10 @@ export default {
     border-radius: 9px 0 0 9px;
     background-color: $success--dark;
 
+    &.primary {
+      background-color: $primary;
+    }
+
     &.error {
       background-color: $error;
     }

+ 2 - 2
src/views/dashboard/index.vue

@@ -197,10 +197,10 @@ export default {
       })
     },
     sort (a, b) {
-      if (a.activate && a.onlineStatus === 1) {
+      if (a.activate === 2 && a.onlineStatus === 1) {
         return -1
       }
-      if (b.activate && b.onlineStatus === 1) {
+      if (b.activate === 2 && b.onlineStatus === 1) {
         return 1
       }
       return b.activate - a.activate

+ 1 - 1
src/views/review/components/ReviewRelease.vue

@@ -114,7 +114,7 @@ export default {
         ...params,
         name: programCalendarName,
         type: startDateTime !== endDateTime ? '轮播' : '日程',
-        time: startDateTime && startDateTime !== endDateTime ? `${startDateTime}~${endDateTime || '∞'}` : '',
+        time: startDateTime && startDateTime !== endDateTime ? `${startDateTime} ~ ${endDateTime || '∞'}` : '',
         createBy: createByUsername || createBy,
         device: calendarReleaseDeviceList?.map(item => item.deviceName).join(',')
       }

+ 1 - 1
src/views/schedule/history/index.vue

@@ -104,7 +104,7 @@ export default {
         id: programCalendarId,
         name: programCalendarName,
         type: startDateTime !== endDateTime ? '轮播' : '日程',
-        time: startDateTime && startDateTime !== endDateTime ? `${startDateTime}~${endDateTime || '∞'}` : '',
+        time: startDateTime && startDateTime !== endDateTime ? `${startDateTime} ~ ${endDateTime || '∞'}` : '',
         resolutionRatio,
         createBy: createByUsername || createBy,
         createTime,