Sfoglia il codice sorgente

refactor(gateway): data completion

Casper Dai 3 anni fa
parent
commit
1dfc21307b
50 ha cambiato i file con 414 aggiunte e 356 eliminazioni
  1. 1 1
      src/components/dialog/CameraDialog/index.vue
  2. 1 1
      src/components/dialog/MaterialDialog/index.vue
  3. 3 3
      src/components/dialog/PreviewDialog/index.vue
  4. 2 2
      src/components/service/DraggableItem/index.vue
  5. 1 1
      src/components/service/EventTargetPicker/index.vue
  6. 1 1
      src/components/service/Schedule/ScheduleCalendar/EventItemWeek.vue
  7. 2 2
      src/components/service/external/DevicePlayer/index.vue
  8. 3 3
      src/components/service/external/camera/CameraDetail/index.vue
  9. 1 1
      src/components/service/external/camera/CameraPlayer/index.vue
  10. 1 1
      src/components/table/Table/Column.vue
  11. 2 2
      src/components/tree/DirectoryTree/index.vue
  12. 1 1
      src/layout/components/Navbar/Profile/components/UserInfoItem.vue
  13. 3 3
      src/layout/components/Navbar/Profile/index.vue
  14. 2 2
      src/layout/components/Navbar/UploadDashboard/FileProgress.vue
  15. 2 2
      src/layout/components/Navbar/index.vue
  16. 2 16
      src/scss/bem/_component.scss
  17. 2 0
      src/scss/bem/_ishas.scss
  18. 6 4
      src/views/ad/contract/index.vue
  19. 1 1
      src/views/dashboard/Dashboard.vue
  20. 3 3
      src/views/dashboard/v0/Record.vue
  21. 112 89
      src/views/device/detail/components/DeviceExternal/external/Gateway/index.vue
  22. 6 6
      src/views/device/detail/components/DeviceExternal/external/ReceivingCard/ReceivingCardInfo.vue
  23. 12 12
      src/views/device/detail/components/DeviceExternal/external/SendingCard/index.vue
  24. 9 9
      src/views/device/detail/components/DeviceInfo.vue
  25. 1 1
      src/views/device/detail/components/DeviceMap.vue
  26. 2 2
      src/views/device/detail/components/DeviceTakeOver/components/AssetCard.vue
  27. 1 1
      src/views/device/detail/components/DeviceTakeOver/index.vue
  28. 1 1
      src/views/device/detail/components/external/ContentProtection.vue
  29. 1 1
      src/views/device/detail/index.vue
  30. 31 32
      src/views/external/camera/index.vue
  31. 2 6
      src/views/external/gateway/Sensor.vue
  32. 51 7
      src/views/external/gateway/index.vue
  33. 0 1
      src/views/external/screen/index.vue
  34. 0 1
      src/views/external/transmitter/index.vue
  35. 0 2
      src/views/platform/ai-stock/Assign.vue
  36. 0 1
      src/views/platform/ai-stock/Stock.vue
  37. 0 1
      src/views/platform/tenant/device/components/Device.vue
  38. 1 1
      src/views/platform/tenant/device/settings/components/ContentProtectionConfigDialog.vue
  39. 2 2
      src/views/platform/tenant/device/settings/components/external/Camera/index.vue
  40. 92 78
      src/views/platform/tenant/device/settings/components/external/Gateway/index.vue
  41. 7 7
      src/views/platform/tenant/device/settings/components/external/ReceivingCard/index.vue
  42. 14 15
      src/views/platform/tenant/device/settings/components/external/SendingCard/index.vue
  43. 0 1
      src/views/platform/upgrade/deploy/index.vue
  44. 0 1
      src/views/platform/upgrade/index.vue
  45. 0 1
      src/views/realm/ai/ai-audit/index.vue
  46. 0 1
      src/views/realm/ai/ai-timing/index.vue
  47. 24 21
      src/views/realm/logger/index.vue
  48. 1 1
      src/views/screen/deploy/device/index.vue
  49. 3 3
      src/views/screen/material/program/ast/Designer.vue
  50. 1 1
      src/views/screen/review/workflow/mine/index.vue

+ 1 - 1
src/components/dialog/CameraDialog/index.vue

@@ -11,7 +11,7 @@
     <template v-if="contentRender">
       <camera-detail :camera="camera" />
       <i
-        class="l-flex__none c-dialog--full__close el-icon-close has-active u-bold u-pointer"
+        class="l-flex__none c-dialog--full__close el-icon-close has-active u-bold"
         @click="hide"
       />
     </template>

+ 1 - 1
src/components/dialog/MaterialDialog/index.vue

@@ -25,7 +25,7 @@
         <preview-dialog ref="previewDialog" />
       </schema-table>
       <i
-        class="l-flex__none c-dialog--preview__close el-icon-close has-active u-bold u-pointer"
+        class="l-flex__none c-dialog--preview__close el-icon-close has-active u-bold"
         @click="hide"
       />
     </template>

+ 3 - 3
src/components/dialog/PreviewDialog/index.vue

@@ -36,16 +36,16 @@
         controls
       />
       <i
-        class="o-close o-icon el-icon-close has-active u-bold u-pointer"
+        class="o-close o-icon el-icon-close has-active u-bold"
         @click="hide"
       />
       <template v-if="isMultipleFiles">
         <i
-          class="o-arrow o-icon el-icon-arrow-left has-active u-bold u-pointer"
+          class="o-arrow o-icon el-icon-arrow-left has-active u-bold"
           @click="onPresent"
         />
         <i
-          class="o-arrow o-icon el-icon-arrow-right has-active u-bold u-pointer"
+          class="o-arrow o-icon el-icon-arrow-right has-active u-bold"
           @click="onNext"
         />
         <div class="o-total">{{ active + 1 }}/{{ total }}</div>

+ 2 - 2
src/components/service/DraggableItem/index.vue

@@ -3,7 +3,7 @@
     <div class="l-flex__auto l-flex--row mover">
       <i class="l-flex__none o-draggable-item__mover el-icon-sort has-active" />
       <div
-        class="l-flex__auto c-slibing-item o-draggable-item__name has-padding--v u-ellipsis has-active u-pointer"
+        class="l-flex__auto c-slibing-item o-draggable-item__name has-padding--v u-ellipsis has-active"
         @click="onView"
       >
         {{ label }}
@@ -23,7 +23,7 @@
       />
     </template>
     <i
-      class="l-flex__none o-draggable-item__del el-icon-delete has-padding--h has-active u-pointer"
+      class="l-flex__none o-draggable-item__del el-icon-delete has-padding--h has-active"
       @click="onDel"
     />
   </div>

+ 1 - 1
src/components/service/EventTargetPicker/index.vue

@@ -26,7 +26,7 @@
           />
         </el-select>
         <div
-          class="l-flex--row c-sibling-item far has-active u-pointer u-ellipsis"
+          class="l-flex--row c-sibling-item far has-active u-ellipsis"
           @click="onViewCurrentTarget"
         >
           {{ targetInfo }}

+ 1 - 1
src/components/service/Schedule/ScheduleCalendar/EventItemWeek.vue

@@ -9,7 +9,7 @@
         {{ item.event.origin.target.name }}
         <i
           v-if="editable"
-          class="el-icon-delete has-active u-pointer"
+          class="el-icon-delete has-active"
           @click="onRemove"
         />
       </div>

+ 2 - 2
src/components/service/external/DevicePlayer/index.vue

@@ -53,7 +53,7 @@
               <div
                 v-for="item in qualities"
                 :key="item.value"
-                class="o-quality-menu__item has-active u-pointer"
+                class="o-quality-menu__item has-active"
                 :class="{ 'u-color--success': quality.value === item.value }"
                 @click="changeQuality(item)"
               >
@@ -63,7 +63,7 @@
             <span class="has-active">{{ quality.label }}</span>
           </div>
           <i
-            class="c-sibling-item el-icon-full-screen has-active u-pointer"
+            class="c-sibling-item el-icon-full-screen has-active"
             @click="onFullScreen"
           />
         </template>

+ 3 - 3
src/components/service/external/camera/CameraDetail/index.vue

@@ -60,17 +60,17 @@
           />
           <i
             v-else
-            class="c-video-controls__btn has-active u-pointer"
+            class="c-video-controls__btn has-active"
             :class="iconClass"
             @click="onPlayOrPause"
           />
         </div>
         <i
-          class="c-sibling-item c-video-controls__btn el-icon-setting has-active u-pointer"
+          class="c-sibling-item c-video-controls__btn el-icon-setting has-active"
           @click.stop="onSettings"
         />
         <i
-          class="c-sibling-item farther c-video-controls__btn el-icon-refresh has-active u-pointer"
+          class="c-sibling-item farther c-video-controls__btn el-icon-refresh has-active"
           @click="onRefresh"
         />
       </div>

+ 1 - 1
src/components/service/external/camera/CameraPlayer/index.vue

@@ -34,7 +34,7 @@
       <slot />
       <i
         v-if="online"
-        class="c-sibling-item el-icon-full-screen has-active u-pointer"
+        class="c-sibling-item el-icon-full-screen has-active"
         @click="onFullScreen"
       />
     </div>

+ 1 - 1
src/components/table/Table/Column.vue

@@ -33,7 +33,7 @@ export default {
     },
     renderRefreshColumnHeader () {
       return this.$createElement('i', {
-        staticClass: 'el-icon-refresh u-color--black light u-font-size--xl u-vertical--middle has-active u-pointer',
+        staticClass: 'el-icon-refresh u-color--black light u-font-size--xl u-vertical--middle has-active',
         on: { click: $event => {
           $event.stopPropagation()
           this.table.pageTo()

+ 2 - 2
src/components/tree/DirectoryTree/index.vue

@@ -19,13 +19,13 @@
       @click.native.stop
     >
       <div
-        class="l-flex--row c-contentmenu__item has-active u-pointer"
+        class="l-flex--row c-contentmenu__item has-active"
         @click="onAddNode"
       >
         <i class="c-sibling-item el-icon-circle-plus-outline" /><span class="c-sibling-item">增加节点</span>
       </div>
       <div
-        class="l-flex--row c-contentmenu__item has-active u-pointer"
+        class="l-flex--row c-contentmenu__item has-active"
         @click="onDeleteNode"
       >
         <i class="c-sibling-item el-icon-remove-outline" /><span class="c-sibling-item">删除节点</span>

+ 1 - 1
src/layout/components/Navbar/Profile/components/UserInfoItem.vue

@@ -19,7 +19,7 @@
         </button>
         <div
           v-else
-          class="u-color--blue u-pointer has-active"
+          class="u-color--blue has-active"
           @click="onUnexpanded"
         >
           收起

+ 3 - 3
src/layout/components/Navbar/Profile/index.vue

@@ -79,7 +79,7 @@
             class="l-flex--row center c-sibling-item--v farther"
           >
             <div
-              class="o-app has-active u-pointer"
+              class="o-app has-active"
               @click="onClickWechat"
             >
               <i class="c-sibling-item--v o-icon md wechat" />
@@ -94,7 +94,7 @@
               </div>
             </div>
             <div
-              class="o-app has-active u-pointer"
+              class="o-app has-active"
               @click="onClickApplet"
             >
               <i class="c-sibling-item--v o-icon md applet" />
@@ -126,7 +126,7 @@
           <i class="c-sibling-item o-icon wechat" />
           <span class="c-sibling-item u-color--black u-bold">请使用微信扫一扫</span>
           <i
-            class="c-wechat__close el-icon-close o-icon has-active u-bold u-pointer"
+            class="c-wechat__close el-icon-close o-icon has-active u-bold"
             @click="onCloseQr"
           />
         </div>

+ 2 - 2
src/layout/components/Navbar/UploadDashboard/FileProgress.vue

@@ -25,11 +25,11 @@
       <div class="l-flex__none c-sibling-item c-progress-list__icon u-font-size--md">
         <i
           v-if="!file.valid"
-          class="el-icon-refresh has-active u-pointer"
+          class="el-icon-refresh has-active"
           @click="retry(file)"
         />
         <i
-          class="el-icon-error has-active u-pointer"
+          class="el-icon-error has-active"
           @click="del(file)"
         />
       </div>

+ 2 - 2
src/layout/components/Navbar/index.vue

@@ -3,7 +3,7 @@
     <breadcrumb class="l-flex__auto c-sibling-item" />
     <div
       v-if="isSuperAdmin"
-      class="l-flex__none c-sibling-item farthest has-active u-pointer"
+      class="l-flex__none c-sibling-item farthest has-active"
       @click="onChangeTenant"
     >
       {{ tenantName }}
@@ -13,7 +13,7 @@
       class="l-flex__none c-sibling-item farthest"
     />
     <el-dropdown
-      class="l-flex__none c-sibling-item farthest c-navbar__user u-color--blue u-font-size--sm has-active u-pointer"
+      class="l-flex__none c-sibling-item farthest c-navbar__user u-color--blue u-font-size--sm has-active"
       trigger="click"
       @command="onCommand"
     >

+ 2 - 16
src/scss/bem/_component.scss

@@ -418,10 +418,11 @@
 
 .c-info {
   color: $black;
+  font-size: $font-size--sm;
   line-height: 1;
 
   &__block {
-    padding: $spacing--md $spacing--2xl;
+    padding: $padding--lg $padding--xl;
     background-color: #f5f7f9;
 
     & + & {
@@ -429,31 +430,16 @@
     }
   }
 
-  &__item + &__item {
-    margin-left: $spacing;
-  }
-
   &__title {
     display: inline-flex;
     align-items: center;
     width: 120px;
     color: $info--dark;
-    font-size: $font-size--sm;
-    line-height: 1;
   }
 
   &__value {
     font-size: $font-size--md;
     font-weight: bold;
-
-    &.primary {
-      color: $blue;
-    }
-  }
-
-  &__edit {
-    color: $blue;
-    font-size: $font-size--sm;
   }
 }
 

+ 2 - 0
src/scss/bem/_ishas.scss

@@ -54,6 +54,8 @@
 }
 
 .has-active {
+  cursor: pointer;
+
   &:hover {
     color: $primary  !important;
   }

+ 6 - 4
src/views/ad/contract/index.vue

@@ -110,13 +110,15 @@
                     class="l-flex--row c-contract-dialog__file"
                   >
                     <i
-                      class="l-flex__none c-contract-dialog__del el-icon-minus has-active u-pointer"
+                      class="l-flex__none c-contract-dialog__del el-icon-minus has-active"
                       @click="onDelFile(file, index)"
                     />
                     <div
-                      class="l-flex__fill has-active u-ellipsis u-pointer"
+                      class="l-flex__fill has-active u-ellipsis"
                       @click="onDownload(file)"
-                    >{{ file.name }}</div>
+                    >
+                      {{ file.name }}
+                    </div>
                   </div>
                 </div>
               </div>
@@ -127,7 +129,7 @@
           <div class="l-flex--row c-contract-dialog__header u-color--black u-font-size--sm has-bottom-border">
             <span class="c-sibling-item u-bold">上播内容</span>
             <i
-              class="c-sibling-item near el-icon-circle-plus-outline u-color--blue has-active u-pointer"
+              class="c-sibling-item near el-icon-circle-plus-outline u-color--blue has-active"
               @click="onAddAsset"
             />
           </div>

+ 1 - 1
src/views/dashboard/Dashboard.vue

@@ -38,7 +38,7 @@
         <div v-else>{{ monitor.inactive }}</div>
       </div>
       <i
-        class="el-icon-refresh o-icon md u-color--blue has-active u-pointer"
+        class="el-icon-refresh o-icon md u-color--blue has-active"
         @click.stop="onRefresh"
       />
     </div>

+ 3 - 3
src/views/dashboard/v0/Record.vue

@@ -19,19 +19,19 @@
         >
           <template #controls="{canPlay, onFullScreen}">
             <svg-icon
-              class="c-sibling-item control__icon has-active u-pointer"
+              class="c-sibling-item control__icon has-active"
               :class="item.statusClass"
               icon-class="v0-link"
               @click="$emit('openLinkState', item)"
             />
             <svg-icon
-              class="c-sibling-item control__icon has-active u-pointer"
+              class="c-sibling-item control__icon has-active"
               icon-class="v0-info"
               @click="$emit('openDeviceInfo', item)"
             />
             <svg-icon
               v-if="canPlay"
-              class="c-sibling-item control__icon has-active u-pointer"
+              class="c-sibling-item control__icon has-active"
               icon-class="v0-full-screen"
               @click="onFullScreen"
             />

+ 112 - 89
src/views/device/detail/components/DeviceExternal/external/Gateway/index.vue

@@ -9,84 +9,100 @@
         @click="getGateway"
       />
       <template v-else>
-        <div class="c-sibling-item--v c-info">
-          <div class="l-flex--row has-bottom-padding u-bold">网关信息</div>
-          <div class="l-flex--row c-info__block">
-            <div class="l-flex--row l-flex__fill c-info__item">
-              <div class="l-flex__none c-info__title">名称</div>
-              <auto-text
-                class="l-flex__fill c-info__value"
-                :text="gateway.name"
-              />
-            </div>
-            <div class="l-flex--row l-flex__fill c-info__item">
-              <div class="l-flex__none c-info__title">地址</div>
-              <div class="l-flex__fill c-info__value">{{ gateway.ip }}</div>
+        <template v-if="gateway">
+          <div class="c-sibling-item--v c-info">
+            <div class="l-flex--row c-sibling-item--v u-bold">网关信息</div>
+            <div class="l-flex--row c-sibling-item--v  c-info__block">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
+                <div class="l-flex__none c-info__title">名称</div>
+                <auto-text
+                  class="l-flex__fill c-info__value"
+                  :text="gateway.name"
+                />
+              </div>
+              <div class="l-flex--row l-flex__fill c-sibling-item">
+                <div class="l-flex__none c-info__title">地址</div>
+                <div class="l-flex__fill c-info__value">{{ gateway.ip }}</div>
+              </div>
             </div>
           </div>
-        </div>
-        <div class="c-sibling-item--v far c-info">
-          <div class="l-flex--row has-bottom-padding u-bold">PLC信息</div>
-          <div
-            v-if="plcs.length === 0"
-            class="u-color--info"
-          >
-            暂未绑定
-          </div>
-          <div
-            v-for="plc in plcs"
-            :key="plc.id"
-            class="l-flex--row c-info__block"
-          >
-            <div class="l-flex--row l-flex__fill c-info__item">
-              <auto-text
-                class="l-flex__fill c-info__value"
-                :text="plc.thirdPartyDevice.name"
+          <div class="c-sibling-item--v far c-info">
+            <div class="l-flex--row c-sibling-item--v u-bold">
+              <span class="c-sibling-item">PLC信息</span>
+              <i
+                v-if="plcOptions.loading"
+                class="c-sibling-item el-icon-loading"
               />
             </div>
-            <div class="l-flex--row l-flex__fill c-info__item">
-              <div class="l-flex__none c-info__title">地址</div>
-              <div class="l-flex__fill c-info__value">{{ plc.thirdPartyDevice.identifier }}</div>
+            <warning
+              v-if="plcOptions.error"
+              @click="getBoundPLCs"
+            />
+            <div
+              v-if="!plcOptions.loading && plcOptions.list.length === 0"
+              class="c-sibling-item--v u-font-size--sm u-color--info"
+            >
+              暂未绑定
+            </div>
+            <div
+              v-for="plc in plcOptions.list"
+              :key="plc.id"
+              class="l-flex--row c-sibling-item--v c-info__block"
+            >
+              <div class="l-flex--row l-flex__fill c-sibling-item">
+                <div class="l-flex__none c-info__title">名称</div>
+                <auto-text
+                  class="l-flex__fill c-info__value"
+                  :text="plc.thirdPartyDevice.name"
+                />
+              </div>
+              <div class="l-flex--row l-flex__fill c-sibling-item">
+                <div class="l-flex__none c-info__title">地址</div>
+                <div class="l-flex__fill c-info__value">{{ plc.thirdPartyDevice.identifier }}</div>
+              </div>
             </div>
           </div>
-        </div>
-        <div class="c-sibling-item--v far c-info">
-          <div class="l-flex--row has-bottom-padding u-bold">传感器信息</div>
-          <warning
-            v-if="sensorOptions.error"
-            @click="getSensors"
-          />
-          <div v-else-if="sensorOptions.loading">
-            <i class="el-icon el-icon-loading" />
-          </div>
-          <div
-            v-else-if="sensorOptions.list.length === 0"
-            class="u-color--info"
-          >
-            暂未绑定
-          </div>
-          <div
-            v-for="sensor in sensorOptions.list"
-            :key="sensor.id"
-            class="l-flex--row c-info__block"
-          >
-            <div class="l-flex--row l-flex__fill c-info__item">
-              <div class="l-flex__none c-info__title">名称</div>
-              <auto-text
-                class="l-flex__fill c-info__value"
-                :text="sensor.name"
+          <div class="c-sibling-item--v far c-info">
+            <div class="l-flex--row c-sibling-item--v u-bold">
+              <span class="c-sibling-item">传感器信息</span>
+              <i
+                v-if="sensorOptions.loading"
+                class="c-sibling-item el-icon-loading"
               />
             </div>
-            <div class="l-flex--row l-flex__fill c-info__item">
-              <div class="l-flex__none c-info__title">标识</div>
-              <div class="l-flex__fill c-info__value">{{ sensor.identifier }}</div>
+            <warning
+              v-if="sensorOptions.error"
+              @click="getSensors"
+            />
+            <div
+              v-if="!sensorOptions.loading && sensorOptions.list.length === 0"
+              class="c-sibling-item--v u-font-size--sm u-color--info"
+            >
+              暂未绑定
             </div>
-            <div class="l-flex--row l-flex__fill c-info__item">
-              <div class="l-flex__none c-info__title">类型</div>
-              <div class="l-flex__fill c-info__value">{{ sensor.type }}</div>
+            <div
+              v-for="sensor in sensorOptions.list"
+              :key="sensor.id"
+              class="l-flex--row c-sibling-item--v c-info__block"
+            >
+              <div class="l-flex--row l-flex__fill c-sibling-item">
+                <div class="l-flex__none c-info__title">名称</div>
+                <auto-text
+                  class="l-flex__fill c-info__value"
+                  :text="sensor.name"
+                />
+              </div>
+              <div class="l-flex--row l-flex__fill c-sibling-item">
+                <div class="l-flex__none c-info__title">标识</div>
+                <div class="l-flex__fill c-info__value">{{ sensor.identifier }}</div>
+              </div>
+              <div class="l-flex--row l-flex__fill c-sibling-item">
+                <div class="l-flex__none c-info__title">类型</div>
+                <div class="l-flex__fill c-info__value">{{ sensor.type }}</div>
+              </div>
             </div>
           </div>
-        </div>
+        </template>
       </template>
     </template>
   </div>
@@ -111,7 +127,13 @@ export default {
     return {
       loading: false,
       error: false,
-      info: null,
+      gatewayProxy: null,
+      deviceType: 'GATEWAY',
+      plcOptions: {
+        list: [],
+        loading: false,
+        error: false
+      },
       sensorOptions: {
         list: [],
         loading: false,
@@ -121,29 +143,25 @@ export default {
   },
   computed: {
     gateway () {
-      return this.info?.gateway?.thirdPartyDevice
-    },
-    plcs () {
-      return this.info?.plcs || []
+      return this.gatewayProxy?.thirdPartyDevice
     }
   },
   created () {
-    this.getInfo()
+    this.getGateway()
   },
   methods: {
-    getInfo () {
+    getGateway () {
       if (this.loading) {
         return
       }
       this.loading = true
       this.error = false
-
-      this.info = null
-      Promise.all([this.getGateway(), this.getBoundPLCs()]).then(
-        data => {
-          this.info = {
-            gateway: data[0],
-            plcs: data[1]
+      getGateway(this.device.id).then(
+        gateway => {
+          this.gatewayProxy = gateway
+          if (gateway) {
+            this.getBoundPLCs()
+            this.getSensors()
           }
         },
         () => {
@@ -151,21 +169,26 @@ export default {
         }
       ).finally(() => {
         this.loading = false
-        if (this.gateway) {
-          this.getSensors()
-        }
       })
     },
-    getGateway () {
-      return getGateway(this.device.id)
-    },
     getBoundPLCs () {
-      return getBoundPLCs(this.device.id)
+      this.plcOptions.loading = true
+      this.plcOptions.error = false
+      getBoundPLCs(this.device.id).then(
+        data => {
+          this.plcOptions.list = data
+        },
+        () => {
+          this.plcOptions.error = true
+        }
+      ).finally(() => {
+        this.plcOptions.loading = false
+      })
     },
     getSensors () {
       this.sensorOptions.loading = true
       this.sensorOptions.error = false
-      getSensors(this.gateway.id).then(
+      getSensors(this.gatewayProxy.id).then(
         ({ data }) => {
           this.sensorOptions.list = data.map(sensor => {
             sensor.type = ['烟雾', '温度', '光照', '水浸'][sensor.sensorType]

+ 6 - 6
src/views/device/detail/components/DeviceExternal/external/ReceivingCard/ReceivingCardInfo.vue

@@ -1,34 +1,34 @@
 <template>
   <div class="c-info">
     <div class="l-flex--row c-info__block">
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">厂商名称</div>
         <div class="l-flex__fill c-info__value">{{ manufacturer }}</div>
       </div>
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">设备IP</div>
         <div class="l-flex__fill c-info__value">{{ ip }}</div>
       </div>
     </div>
     <div class="l-flex--row c-info__block">
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">设备型号</div>
         <auto-text
           class="l-flex__fill c-info__value"
           :text="screen"
         />
       </div>
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">设备类型</div>
         <div class="l-flex__fill c-info__value">{{ type }}</div>
       </div>
     </div>
     <div class="l-flex--row c-info__block">
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">温度监测</div>
         <div class="l-flex__fill c-info__value">{{ temperature }}</div>
       </div>
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">电压监测</div>
         <div class="l-flex__fill c-info__value">{{ voltage }}</div>
       </div>

+ 12 - 12
src/views/device/detail/components/DeviceExternal/external/SendingCard/index.vue

@@ -13,47 +13,47 @@
         class="c-info"
       >
         <div class="l-flex--row c-info__block">
-          <div class="l-flex--row l-flex__fill c-info__item">
+          <div class="l-flex--row l-flex__fill c-sibling-item">
             <div class="l-flex__none c-info__title">名称</div>
             <auto-text
               class="l-flex__fill c-info__value"
               :text="transmitter.name"
             />
           </div>
-          <div class="l-flex--row l-flex__fill c-info__item">
+          <div class="l-flex--row l-flex__fill c-sibling-item">
             <div class="l-flex__none c-info__title">厂商</div>
             <div class="l-flex__fill c-info__value">{{ transmitter.manufacturerName }}</div>
           </div>
         </div>
         <div class="l-flex--row c-info__block">
-          <div class="l-flex--row l-flex__fill c-info__item">
+          <div class="l-flex--row l-flex__fill c-sibling-item">
             <div class="l-flex__none c-info__title">型号</div>
             <auto-text
               class="l-flex__fill c-info__value"
               :text="transmitter.type"
             />
           </div>
-          <div class="l-flex--row l-flex__fill c-info__item">
+          <div class="l-flex--row l-flex__fill c-sibling-item">
             <div class="l-flex__none c-info__title">类型</div>
-            <div class="l-flex__fill c-info__value">{{ type }}</div>
+            <div class="l-flex__fill c-info__value u-color--blue">{{ type }}</div>
           </div>
         </div>
         <div class="l-flex--row c-info__block">
-          <div class="l-flex--row l-flex__fill c-info__item">
+          <div class="l-flex--row l-flex__fill c-sibling-item">
             <div class="l-flex__none c-info__title">设备监测</div>
-            <div class="l-flex__fill c-info__value">{{ supportDetection }}</div>
+            <div class="l-flex__fill c-info__value u-color--blue">{{ supportDetection }}</div>
           </div>
-          <div class="l-flex--row l-flex__fill c-info__item">
+          <div class="l-flex--row l-flex__fill c-sibling-item">
             <div class="l-flex__none c-info__title">内容保护</div>
-            <div class="l-flex__fill c-info__value">{{ supportContentProtection }}</div>
+            <div class="l-flex__fill c-info__value u-color--blue">{{ supportContentProtection }}</div>
           </div>
         </div>
         <div class="l-flex--row c-info__block">
-          <div class="l-flex--row l-flex__fill c-info__item">
+          <div class="l-flex--row l-flex__fill c-sibling-item">
             <div class="l-flex__none c-info__title">回采卡</div>
-            <div class="l-flex__fill c-info__value">{{ recoveryCard }}</div>
+            <div class="l-flex__fill c-info__value u-color--blue">{{ recoveryCard }}</div>
           </div>
-          <div class="l-flex--row l-flex__fill c-info__item" />
+          <div class="l-flex--row l-flex__fill c-sibling-item" />
         </div>
       </div>
     </template>

+ 9 - 9
src/views/device/detail/components/DeviceInfo.vue

@@ -5,41 +5,41 @@
   >
     <div class="l-flex--row has-bottom-padding u-bold">设备信息</div>
     <div class="l-flex--row c-info__block">
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">序列号</div>
         <div class="l-flex__fill c-info__value">{{ device.serialNumber }}</div>
       </div>
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">MAC</div>
         <div class="l-flex__fill c-info__value">{{ device.mac }}</div>
       </div>
     </div>
     <div class="l-flex--row c-info__block">
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">配置</div>
         <div class="l-flex__fill c-info__value">{{ device.productName }}</div>
       </div>
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">运行时间</div>
         <div class="l-flex__fill c-info__value">{{ device.openTime }} - {{ device.closeTime }}</div>
       </div>
     </div>
     <div class="l-flex--row c-info__block">
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">分辨率</div>
         <div class="l-flex__fill c-info__value">{{ device.resolutionRatio }}</div>
       </div>
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">内容保护</div>
-        <div class="l-flex__fill c-info__value primary">
+        <div class="l-flex__fill c-info__value u-color--blue">
           <content-protection :device="device" />
         </div>
       </div>
     </div>
     <div class="l-flex--row c-info__block">
-      <div class="l-flex--row l-flex__fill c-info__item">
+      <div class="l-flex--row l-flex__fill c-sibling-item">
         <div class="l-flex__none c-info__title">地址</div>
-        <div class="l-flex__fill c-info__value primary">{{ device.address }}</div>
+        <div class="l-flex__fill c-info__value u-color--blue">{{ device.address }}</div>
       </div>
     </div>
     <device-map

+ 1 - 1
src/views/device/detail/components/DeviceMap.vue

@@ -5,7 +5,7 @@
   >
     <i
       v-if="center"
-      class="o-place el-icon-place has-active u-pointer"
+      class="o-place el-icon-place has-active"
       @click="onPlace"
     />
   </div>

+ 2 - 2
src/views/device/detail/components/DeviceTakeOver/components/AssetCard.vue

@@ -12,7 +12,7 @@
       />
       <i
         v-if="status === -1"
-        class="o-preload-asset__refresh o-icon lg has-active el-icon-refresh u-pointer"
+        class="o-preload-asset__refresh o-icon lg el-icon-refresh has-active"
       />
     </div>
     <div class="l-flex--row o-preload-asset__footer">
@@ -22,7 +22,7 @@
       />
       <i
         v-if="canDel"
-        class="l-flex__none c-slibing-item el-icon-delete has-active u-pointer"
+        class="l-flex__none c-slibing-item el-icon-delete has-active"
         @click="onDel"
       />
     </div>

+ 1 - 1
src/views/device/detail/components/DeviceTakeOver/index.vue

@@ -96,7 +96,7 @@
                   class="o-card__checkbox"
                 />
                 <i
-                  class="o-card__icon el-icon-video-play has-active u-pointer"
+                  class="o-card__icon el-icon-video-play has-active"
                   @click.stop="onView(item)"
                 />
               </media-card>

+ 1 - 1
src/views/device/detail/components/external/ContentProtection.vue

@@ -38,7 +38,7 @@ export default {
   render (h) {
     if (this.loading) {
       return h('i', {
-        class: 'el-icon-loading'
+        class: 'el-icon-loading u-font-size'
       })
     }
     if (this.error) {

+ 1 - 1
src/views/device/detail/index.vue

@@ -13,7 +13,7 @@
         <template v-if="device">
           <i
             v-if="useDashboard"
-            class="c-sibling-item near el-icon-full-screen u-font-size--xl has-active u-pointer"
+            class="c-sibling-item near el-icon-full-screen u-font-size--xl has-active"
             @click="onDashboard"
           />
           <span

+ 31 - 32
src/views/external/camera/index.vue

@@ -15,14 +15,6 @@
       @confirm="onConfirm"
     >
       <div class="c-grid-form u-align-self--center">
-        <template v-if="!isEdit">
-          <span class="c-grid-form__label u-required">类型</span>
-          <schema-select
-            v-model="camera.cameraType"
-            class="u-width--sm"
-            :schema="cameraTypeSelectSchema"
-          />
-        </template>
         <span class="c-grid-form__label u-required">名称</span>
         <el-input
           v-model.trim="camera.name"
@@ -30,20 +22,22 @@
           maxlength="30"
           clearable
         />
-        <span class="c-grid-form__label u-required">标识</span>
-        <el-input
-          v-model.trim="camera.identifier"
-          placeholder="最多30个字符"
-          maxlength="30"
-          :disabled="isEdit"
-          clearable
-        />
-        <span class="c-grid-form__label u-required">账号</span>
-        <el-input
-          v-model.trim="camera.username"
-          :disabled="isEdit"
-        />
         <template v-if="!isEdit">
+          <span class="c-grid-form__label">类型</span>
+          <schema-select
+            v-model="camera.cameraType"
+            class="u-width--sm"
+            :schema="cameraTypeSelectSchema"
+          />
+          <span class="c-grid-form__label u-required">标识</span>
+          <el-input
+            v-model.trim="camera.identifier"
+            placeholder="仅支持数字和字母,最多30个字符"
+            maxlength="30"
+            clearable
+          />
+          <span class="c-grid-form__label u-required">账号</span>
+          <el-input v-model.trim="camera.username" />
           <span class="c-grid-form__label u-required">密码</span>
           <el-input
             v-model.trim="camera.password"
@@ -87,7 +81,6 @@ export default {
     return {
       cameraTypeSelectSchema,
       schema: {
-        condition: { cameraType: void 0, name: '' },
         list: getCameras,
         buttons: [
           { type: 'add', on: this.onAdd }
@@ -100,7 +93,6 @@ export default {
           { type: 'refresh' },
           { label: '类型', render: ({ cameraType }) => ['', '人流量监测', 'LED屏监测'][cameraType] },
           { prop: 'name', label: '名称' },
-          { prop: 'identifier', label: '标识' },
           { type: 'tag', render: ({ onlineStatus }) => onlineStatus === 1
             ? { type: 'success', label: '在线' }
             : { type: 'danger', label: '离线' } },
@@ -156,13 +148,6 @@ export default {
         })
         return
       }
-      if (!this.camera.name) {
-        this.$message({
-          type: 'identifier',
-          message: '请填写设备标识'
-        })
-        return
-      }
       if (this.isEdit) {
         this.editCamera(done)
       } else {
@@ -170,16 +155,30 @@ export default {
       }
     },
     addCamera (done) {
+      if (!this.camera.identifier) {
+        this.$message({
+          type: 'warning',
+          message: '请填写设备标识'
+        })
+        return
+      }
+      if (!/^[0-9a-zA-Z]$/.test(this.camera.identifier)) {
+        this.$message({
+          type: 'warning',
+          message: '设备标识格式错误仅支持数字和字母'
+        })
+        return
+      }
       if (!this.camera.username) {
         this.$message({
-          type: 'identifier',
+          type: 'warning',
           message: '请填写账号'
         })
         return
       }
       if (!this.camera.password) {
         this.$message({
-          type: 'identifier',
+          type: 'warning',
           message: '请填写密码'
         })
         return

+ 2 - 6
src/views/external/gateway/Sensor.vue

@@ -27,8 +27,8 @@
         <span class="c-grid-form__label u-required">标识</span>
         <el-input
           v-model.trim="sensor.identifier"
-          placeholder="最多50个字符"
-          maxlength="50"
+          placeholder="最多30个字符"
+          maxlength="30"
           :disabled="!isAdd"
           clearable
         />
@@ -106,10 +106,6 @@ export default {
       }
       this.$refs.editDialog.show()
     },
-    onEdit ({ id, gatewayId, name, identifier, sensorType }) {
-      this.sensor = { id, gatewayId, name, identifier, sensorType }
-      this.$refs.editDialog.show()
-    },
     onEditName (sensor, { newVal, oldVal }) {
       if (newVal === oldVal) {
         return

+ 51 - 7
src/views/external/gateway/index.vue

@@ -28,6 +28,27 @@
           placeholder="网关网络地址"
           clearable
         />
+        <span class="c-grid-form__label">MAC</span>
+        <el-input
+          v-model.trim="gateway.mac"
+          class="u-width--sm"
+          placeholder="ff:ff:ff:ff:ff:ff"
+          maxlength="17"
+          clearable
+        />
+        <span class="c-grid-form__label">账号</span>
+        <el-input
+          v-model.trim="gateway.account"
+          placeholder="最多50个字符"
+          clearable
+        />
+        <span class="c-grid-form__label">密码</span>
+        <el-input
+          v-model.trim="gateway.password"
+          placeholder="最多100个字符"
+          class="u-password"
+          clearable
+        />
         <span class="c-grid-form__label">备注</span>
         <el-input
           v-model.trim="gateway.remark"
@@ -58,6 +79,7 @@
 </template>
 
 <script>
+import { validMAC } from '@/utils/validate'
 import {
   getGateways,
   addGateway,
@@ -81,9 +103,15 @@ export default {
         buttons: [
           { type: 'add', on: this.onAdd }
         ],
+        filters: [
+          { key: 'name', type: 'search', placeholder: '网关名称' }
+        ],
         cols: [
           { prop: 'name', label: '名称' },
           { prop: 'ip', label: '地址' },
+          { type: 'tag', render: ({ status }) => status === 1
+            ? { type: 'success', label: '在线' }
+            : { type: 'danger', label: '离线' } },
           { prop: 'remark', label: '备注' },
           { type: 'invoke', width: 200, render: [
             { label: '编辑', on: this.onEdit },
@@ -124,29 +152,45 @@ export default {
       }
       this.$refs.editDialog.show()
     },
-    onEdit ({ id, name, ip, remark }) {
-      this.gateway = { id, name, ip, remark }
+    onEdit ({ id, name, ip, mac, account, password, remark }) {
+      this.$gateway = { id, name, ip, mac, account, password, remark }
+      this.gateway = { id, name, ip, mac, account, password, remark }
       this.$refs.editDialog.show()
     },
     onConfirm (done) {
-      if (!this.gateway.name) {
+      const gateway = this.gateway
+      if (!gateway.name) {
         this.$message({
           type: 'warning',
           message: '请填写网关名称'
         })
         return
       }
-      if (!this.gateway.ip) {
+      if (!gateway.ip) {
         this.$message({
           type: 'warning',
           message: '请填写网关地址'
         })
         return
       }
-      if (this.gateway.id) {
-        this.onConfirmEdit(this.gateway, done)
+      if (!validMAC(gateway.mac)) {
+        this.$message({
+          type: 'warning',
+          message: 'MAC格式不正确,例 ff:ff:ff:ff:ff:ff'
+        })
+        return
+      }
+      if (!gateway.account !== !gateway.password) {
+        this.$message({
+          type: 'warning',
+          message: '账号密码必须同时填写'
+        })
+        return
+      }
+      if (gateway.id) {
+        this.onConfirmEdit(gateway, done)
       } else {
-        this.onConfirmAdd(this.gateway, done)
+        this.onConfirmAdd(gateway, done)
       }
     },
     onConfirmAdd (gateway, done) {

+ 0 - 1
src/views/external/screen/index.vue

@@ -94,7 +94,6 @@ export default {
       screen: {},
       manufacturerSelectSchema,
       schema: {
-        condition: { manufacturerKey: void 0 },
         list: getScreens,
         buttons: [
           { type: 'add', on: this.onAdd }

+ 0 - 1
src/views/external/transmitter/index.vue

@@ -72,7 +72,6 @@ export default {
       flag: {},
       manufacturerSelectSchema,
       schema: {
-        condition: { manufacturerKey: void 0 },
         list: getSendingCards,
         buttons: [
           { type: 'add', on: this.onAdd }

+ 0 - 2
src/views/platform/ai-stock/Assign.vue

@@ -80,7 +80,6 @@ export default {
         options: auditTypeOptions
       },
       schema: {
-        condition: { auditType: void 0 },
         list: this.getTenantCredits,
         buttons: [
           { type: 'add', label: '分配', on: this.onAdd }
@@ -100,7 +99,6 @@ export default {
         ]
       },
       stockSchema: {
-        condition: { auditType: void 0 },
         list: getCredits,
         filters: [
           { key: 'auditType', type: 'select', placeholder: '类型', options: auditTypeOptions }

+ 0 - 1
src/views/platform/ai-stock/Stock.vue

@@ -65,7 +65,6 @@ export default {
     return {
       auditTypeSchema: { options: auditTypeOptions },
       schema: {
-        condition: { auditType: void 0 },
         list: getCredits,
         buttons: [
           { type: 'add', on: this.onAdd },

+ 0 - 1
src/views/platform/tenant/device/components/Device.vue

@@ -128,7 +128,6 @@ export default {
       productSelectSchema,
       schema: {
         keepalive: true,
-        condition: { productId: void 0, name: '' },
         list: this.getDevicesByAdmin,
         transform: this.transform,
         transformData: __SUB_DEVICE__ && this.transformTableData,

+ 1 - 1
src/views/platform/tenant/device/settings/components/ContentProtectionConfigDialog.vue

@@ -33,7 +33,7 @@
           <span class="c-sibling-item c-grid-form__label c-grid-form__text">配置{{ index + 1 }}</span>
           <i
             v-if="hasMore"
-            class="c-sibling-item far el-icon-delete has-active u-pointer"
+            class="c-sibling-item far el-icon-delete has-active"
             @click="onDel(index)"
           />
         </div>

+ 2 - 2
src/views/platform/tenant/device/settings/components/external/Camera/index.vue

@@ -43,7 +43,7 @@
           @click.native="onFullScreen(item)"
         >
           <i
-            class="c-sibling-item el-icon-delete has-active u-pointer"
+            class="c-sibling-item el-icon-delete has-active"
             @click.stop="onDel(item)"
           />
         </camera-player>
@@ -107,8 +107,8 @@ export default {
     },
     cameraSchema () {
       return {
-        condition: { deviceType: this.deviceType },
         list: getThirdPartyDevices,
+        condition: { deviceType: this.deviceType },
         cols: [
           { prop: 'name', label: '名称' },
           { prop: 'remark', label: '备注' }

+ 92 - 78
src/views/platform/tenant/device/settings/components/external/Gateway/index.vue

@@ -11,105 +11,119 @@
       <template v-else>
         <template v-if="gateway">
           <div class="c-sibling-item--v c-info">
-            <div class="l-flex--row has-bottom-padding u-bold">
+            <div class="l-flex--row c-sibling-item--v u-bold">
               <span class="c-sibling-item">网关信息</span>
               <span
-                class="c-sibling-item c-info__edit u-pointer"
+                class="c-sibling-item u-color--blue u-font-size--sm has-active"
                 @click="onUnbindGateway"
               >
                 <i class="el-icon-edit" />
                 解绑
               </span>
             </div>
-            <div class="l-flex--row c-info__block">
-              <div class="l-flex--row l-flex__fill c-info__item">
+            <div class="l-flex--row c-sibling-item--v  c-info__block">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">名称</div>
                 <auto-text
                   class="l-flex__fill c-info__value"
                   :text="gateway.name"
                 />
               </div>
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">地址</div>
                 <div class="l-flex__fill c-info__value">{{ gateway.ip }}</div>
               </div>
             </div>
           </div>
           <div class="c-sibling-item--v far c-info">
-            <div class="l-flex--row has-bottom-padding u-bold">
+            <div class="l-flex--row c-sibling-item--v u-bold">
               <span class="c-sibling-item">PLC信息</span>
+              <i
+                v-if="plcOptions.loading"
+                class="c-sibling-item el-icon-loading"
+              />
               <span
-                class="c-sibling-item c-info__edit u-pointer"
+                v-else-if="!plcOptions.error"
+                class="c-sibling-item u-color--blue u-font-size--sm has-active"
                 @click="onBindPLC"
               >
                 <i class="el-icon-edit" />
                 绑定
               </span>
             </div>
+            <warning
+              v-if="plcOptions.error"
+              @click="getBoundPLCs"
+            />
             <div
-              v-if="plcs.length === 0"
-              class="u-color--info"
+              v-if="!plcOptions.loading && plcOptions.list.length === 0"
+              class="c-sibling-item--v u-font-size--sm u-color--info"
             >
               暂未绑定
             </div>
             <div
-              v-for="plc in plcs"
+              v-for="plc in plcOptions.list"
               :key="plc.id"
-              class="l-flex--row c-info__block"
+              class="l-flex--row c-sibling-item--v c-info__block"
             >
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">
                   <span
-                    class="c-info__edit u-pointer"
+                    class="c-sibling-item u-color--blue u-font-size--sm has-active"
                     @click="onUnbindPLC(plc)"
                   >
                     解绑
                   </span>
-                  名称
+                  <span class="c-sibling-item">
+                    名称
+                  </span>
                 </div>
                 <auto-text
                   class="l-flex__fill c-info__value"
                   :text="plc.thirdPartyDevice.name"
                 />
               </div>
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">地址</div>
                 <div class="l-flex__fill c-info__value">{{ plc.thirdPartyDevice.identifier }}</div>
               </div>
             </div>
           </div>
           <div class="c-sibling-item--v far c-info">
-            <div class="l-flex--row has-bottom-padding u-bold">传感器信息</div>
+            <div class="l-flex--row c-sibling-item--v u-bold">
+              <span class="c-sibling-item">传感器信息</span>
+              <i
+                v-if="sensorOptions.loading"
+                class="c-sibling-item el-icon-loading"
+              />
+            </div>
             <warning
               v-if="sensorOptions.error"
               @click="getSensors"
             />
-            <div v-else-if="sensorOptions.loading">
-              <i class="el-icon el-icon-loading" />
-            </div>
             <div
-              v-else-if="sensorOptions.list.length === 0"
-              class="u-color--info"
+              v-if="!sensorOptions.loading && sensorOptions.list.length === 0"
+              class="c-sibling-item--v u-font-size--sm u-color--info"
             >
               暂未绑定
             </div>
             <div
               v-for="sensor in sensorOptions.list"
               :key="sensor.id"
-              class="l-flex--row c-info__block"
+              class="l-flex--row c-sibling-item--v c-info__block"
             >
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">名称</div>
                 <auto-text
                   class="l-flex__fill c-info__value"
                   :text="sensor.name"
                 />
               </div>
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">标识</div>
                 <div class="l-flex__fill c-info__value">{{ sensor.identifier }}</div>
               </div>
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">类型</div>
                 <div class="l-flex__fill c-info__value">{{ sensor.type }}</div>
               </div>
@@ -142,15 +156,16 @@
 </template>
 
 <script>
+import { ThirdPartyDevice } from '@/constant'
 import {
   getGateway,
-  getGateways,
   bindGateway,
   getBoundPLCs,
   getPLCs,
   bindPLC,
   unbind,
-  getSensors
+  getSensors,
+  getThirdPartyDevices
 } from '@/api/external'
 
 export default {
@@ -165,8 +180,13 @@ export default {
     return {
       loading: false,
       error: false,
-      info: null,
+      gatewayProxy: null,
       deviceType: 'GATEWAY',
+      plcOptions: {
+        list: [],
+        loading: false,
+        error: false
+      },
       sensorOptions: {
         list: [],
         loading: false,
@@ -204,52 +224,39 @@ export default {
           }
         default:
           return {
-            list: getGateways,
+            list: getThirdPartyDevices,
+            condition: { deviceType: ThirdPartyDevice.GATEWAY },
+            filters: [
+              { key: 'name', type: 'search', placeholder: '网关名称' }
+            ],
             cols: [
               { prop: 'name', label: '名称' },
-              { prop: 'ip', label: '地址' }
+              { prop: 'ip', label: '地址' },
+              { prop: 'remark', label: '备注' }
             ]
           }
       }
     },
     gateway () {
-      return this.info?.gateway?.thirdPartyDevice
-    },
-    plcs () {
-      return this.info?.plcs || []
+      return this.gatewayProxy?.thirdPartyDevice
     }
   },
   created () {
-    this.getInfo()
+    this.getGateway()
   },
   methods: {
-    getInfo (type) {
+    getGateway () {
       if (this.loading) {
         return
       }
       this.loading = true
       this.error = false
-
-      let arr
-      if (this.info && type) {
-        switch (type) {
-          case 'PLC':
-            arr = [Promise.resolve(this.info.gateway), this.getBoundPLCs()]
-            break
-          default:
-            arr = [this.getGateway(), this.getBoundPLCs()]
-            break
-        }
-      } else {
-        arr = [this.getGateway(), this.getBoundPLCs()]
-      }
-
-      this.info = null
-      Promise.all(arr).then(
-        data => {
-          this.info = {
-            gateway: data[0],
-            plcs: data[1]
+      getGateway(this.device.id).then(
+        gateway => {
+          this.gatewayProxy = gateway
+          if (gateway) {
+            this.getBoundPLCs()
+            this.getSensors()
           }
         },
         () => {
@@ -257,21 +264,33 @@ export default {
         }
       ).finally(() => {
         this.loading = false
-        if (this.gateway) {
-          this.getSensors()
-        }
       })
     },
-    getGateway () {
-      return getGateway(this.device.id)
-    },
     getBoundPLCs () {
-      return getBoundPLCs(this.device.id)
+      this.plcOptions.loading = true
+      this.plcOptions.error = false
+      getBoundPLCs(this.device.id).then(
+        data => {
+          this.plcOptions.list = data
+        },
+        () => {
+          this.plcOptions.error = true
+        }
+      ).finally(() => {
+        this.plcOptions.loading = false
+      })
     },
     onChoosen ({ value, done }) {
       (this.deviceType === 'PLC' ? bindPLC : bindGateway)(this.device.id, value.id).then(() => {
         done()
-        this.getInfo(this.deviceType)
+        switch (this.deviceType) {
+          case 'PLC':
+            this.getBoundPLCs()
+            break
+          default:
+            this.getGateway()
+            break
+        }
       })
     },
     onBindGateway () {
@@ -279,25 +298,19 @@ export default {
       this.$refs.chooseDialog.show()
     },
     onUnbindGateway () {
-      if (this.plcs.length) {
-        this.$message({
-          type: 'warning',
-          message: '请先解绑所有PLC'
-        })
-        return
-      }
       this.$confirm(
-        '解绑网关?',
+        `解绑网关 ${this.gateway.name}?`,
+        '操作确认',
         { type: 'warning' }
       ).then(() => {
-        unbind(this.info.gateway.id).then(() => {
-          this.info = null
+        unbind(this.gatewayProxy.id).then(() => {
+          this.gatewayProxy = null
         })
       })
     },
     getPLCs (params) {
       return getPLCs({
-        gatewayId: this.gateway.id,
+        gatewayId: this.gatewayProxy.id,
         ...params
       })
     },
@@ -308,17 +321,18 @@ export default {
     onUnbindPLC (plc) {
       this.$confirm(
         `解绑PLC ${plc.thirdPartyDevice.name}?`,
+        '操作确认',
         { type: 'warning' }
       ).then(() => {
         unbind(plc.id).then(() => {
-          this.plcs.splice(this.plcs.indexOf(plc), 1)
+          this.plcOptions.list.splice(this.plcOptions.list.indexOf(plc), 1)
         })
       })
     },
     getSensors () {
       this.sensorOptions.loading = true
       this.sensorOptions.error = false
-      getSensors(this.gateway.id).then(
+      getSensors(this.gatewayProxy.id).then(
         ({ data }) => {
           this.sensorOptions.list = data.map(sensor => {
             sensor.type = ['烟雾', '温度', '光照', '水浸'][sensor.sensorType]

+ 7 - 7
src/views/platform/tenant/device/settings/components/external/ReceivingCard/index.vue

@@ -11,7 +11,7 @@
       <template v-else-if="info">
         <div class="c-info">
           <div class="l-flex--row c-info__block">
-            <div class="l-flex--row l-flex__fill c-info__item">
+            <div class="l-flex--row l-flex__fill c-sibling-item">
               <div class="l-flex__none c-info__title">厂商名称</div>
               <schema-select
                 v-model="info.manufacturerKey"
@@ -20,7 +20,7 @@
                 @change="onChangeProp('manufacturerKey')"
               />
             </div>
-            <div class="l-flex--row l-flex__fill c-info__item">
+            <div class="l-flex--row l-flex__fill c-sibling-item">
               <div class="l-flex__none c-info__title">
                 拓扑结构
                 <i
@@ -42,7 +42,7 @@
             </div>
           </div>
           <div class="l-flex--row c-info__block">
-            <div class="l-flex--row l-flex__fill c-info__item">
+            <div class="l-flex--row l-flex__fill c-sibling-item">
               <div class="l-flex__none c-info__title">设备型号</div>
               <edit-input
                 v-model.trim="info.screen"
@@ -50,7 +50,7 @@
                 @edit="onChangeProp('screen')"
               />
             </div>
-            <div class="l-flex--row l-flex__fill c-info__item">
+            <div class="l-flex--row l-flex__fill c-sibling-item">
               <div class="l-flex__none c-info__title">设备IP</div>
               <edit-input
                 v-model.trim="info.ip"
@@ -61,7 +61,7 @@
             </div>
           </div>
           <div class="l-flex--row c-info__block">
-            <div class="l-flex--row l-flex__fill c-info__item">
+            <div class="l-flex--row l-flex__fill c-sibling-item">
               <div class="l-flex__none c-info__title">异步盒</div>
               <div class="l-flex__fill">
                 <el-switch
@@ -72,7 +72,7 @@
                 />
               </div>
             </div>
-            <div class="l-flex--row l-flex__fill c-info__item">
+            <div class="l-flex--row l-flex__fill c-sibling-item">
               <div class="l-flex__none c-info__title">温度监测</div>
               <div class="l-flex__fill">
                 <el-switch
@@ -85,7 +85,7 @@
             </div>
           </div>
           <div class="l-flex--row c-info__block">
-            <div class="l-flex--row l-flex__fill c-info__item">
+            <div class="l-flex--row l-flex__fill c-sibling-item">
               <div class="l-flex__none c-info__title">电压监测</div>
               <div class="l-flex__fill">
                 <el-switch

+ 14 - 15
src/views/platform/tenant/device/settings/components/external/SendingCard/index.vue

@@ -14,7 +14,7 @@
             <div class="l-flex--row has-bottom-padding u-bold">
               <span class="c-sibling-item">发送控制设备信息</span>
               <span
-                class="c-sibling-item c-info__edit u-pointer"
+                class="c-sibling-item u-color--blue u-font-size--sm has-active"
                 @click="onUnbind"
               >
                 <i class="el-icon-edit" />
@@ -22,47 +22,47 @@
               </span>
             </div>
             <div class="l-flex--row c-info__block">
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">名称</div>
                 <auto-text
                   class="l-flex__fill c-info__value"
                   :text="transmitter.name"
                 />
               </div>
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">厂商</div>
                 <div class="l-flex__fill c-info__value">{{ transmitter.manufacturerName }}</div>
               </div>
             </div>
             <div class="l-flex--row c-info__block">
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">型号</div>
                 <auto-text
                   class="l-flex__fill c-info__value"
                   :text="transmitter.type"
                 />
               </div>
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">类型</div>
-                <div class="l-flex__fill c-info__value">{{ type }}</div>
+                <div class="l-flex__fill c-info__value u-color--blue">{{ type }}</div>
               </div>
             </div>
             <div class="l-flex--row c-info__block">
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">设备监测</div>
-                <div class="l-flex__fill c-info__value">{{ supportDetection }}</div>
+                <div class="l-flex__fill c-info__value u-color--blue">{{ supportDetection }}</div>
               </div>
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">内容保护</div>
-                <div class="l-flex__fill c-info__value">{{ supportContentProtection }}</div>
+                <div class="l-flex__fill c-info__value u-color--blue">{{ supportContentProtection }}</div>
               </div>
             </div>
             <div class="l-flex--row c-info__block">
-              <div class="l-flex--row l-flex__fill c-info__item">
+              <div class="l-flex--row l-flex__fill c-sibling-item">
                 <div class="l-flex__none c-info__title">回采卡</div>
-                <div class="l-flex__fill c-info__value">{{ recoveryCard }}</div>
+                <div class="l-flex__fill c-info__value u-color--blue">{{ recoveryCard }}</div>
               </div>
-              <div class="l-flex--row l-flex__fill c-info__item" />
+              <div class="l-flex--row l-flex__fill c-sibling-item" />
             </div>
           </div>
         </template>
@@ -116,11 +116,10 @@ export default {
       error: false,
       info: null,
       schema: {
-        condition: { manufacturerKey: void 0 },
+        list: getSendingCards,
         filters: [
           { key: 'manufacturerKey', type: 'select', placeholder: '厂商', value: 'manufacturerKey', label: 'manufacturerName', remote: getSendingCardManufacturers }
         ],
-        list: getSendingCards,
         cols: [
           { prop: 'manufacturerName', label: '厂商', 'min-width': 60 },
           { prop: 'name', label: '设备名称' },

+ 0 - 1
src/views/platform/upgrade/deploy/index.vue

@@ -113,7 +113,6 @@ export default {
       apk: '',
       devices: '',
       schema: {
-        condition: { status: void 0, name: '' },
         list: getVersions,
         buttons: [
           { type: 'add', on: this.onAdd }

+ 0 - 1
src/views/platform/upgrade/index.vue

@@ -132,7 +132,6 @@ export default {
       showProgress: false,
       progress: 0,
       schema: {
-        condition: { status: void 0, name: '' },
         list: getApks,
         buttons: [
           { type: 'add', on: this.onAdd }

+ 0 - 1
src/views/realm/ai/ai-audit/index.vue

@@ -30,7 +30,6 @@ export default {
   data () {
     return {
       schema: {
-        condition: { auditType: void 0 },
         list: this.getTenantCredits,
         buttons: [
           { label: '开关配置', on: this.onServiceConfig },

+ 0 - 1
src/views/realm/ai/ai-timing/index.vue

@@ -71,7 +71,6 @@ export default {
     },
     historySchema () {
       return {
-        condition: { auditState: void 0 },
         list: this.getHistory,
         transform: this.transform,
         filters: [

+ 24 - 21
src/views/realm/logger/index.vue

@@ -10,9 +10,9 @@
       :schema="schema"
       @row-click="onClick"
     >
-      <template #header="{ condition }">
+      <template #header>
         <el-date-picker
-          v-model="beginTime"
+          v-model="condition.beginTime"
           class="c-option-grid__item"
           type="datetime"
           placeholder="开始时间"
@@ -24,7 +24,7 @@
           @change="onDateTimeChange('beginTime')"
         />
         <el-date-picker
-          v-model="endTime"
+          v-model="condition.endTime"
           class="c-option-grid__item"
           type="datetime"
           placeholder="结束时间"
@@ -133,18 +133,16 @@ export default {
           { value: 1, label: '成功' }
         ]
       },
-      beginTime: '',
-      endTime: '',
+      condition: {
+        beginTime: '',
+        endTime: '',
+        userName: '',
+        business: '',
+        description: '',
+        status: ''
+      },
       schema: {
-        condition: {
-          beginTime: '',
-          endTime: '',
-          userName: '',
-          business: void 0,
-          description: '',
-          status: void 0
-        },
-        list: getLogs,
+        list: this.getLogs,
         cols: [
           { prop: 'userName', label: '操作中' },
           { prop: 'business', label: '业务模块' },
@@ -161,20 +159,25 @@ export default {
     }
   },
   methods: {
+    getLogs (params) {
+      return getLogs({
+        ...this.condition,
+        ...params
+      })
+    },
     onChange () {
       this.$refs.table.pageTo(1)
     },
     onReset () {
-      this.beginTime = ''
-      this.endTime = ''
-      this.$refs.table.mergeCondition({
+      this.condition = {
         beginTime: '',
         endTime: '',
         userName: '',
-        business: void 0,
+        business: '',
         description: '',
-        status: void 0
-      })
+        status: ''
+      }
+      this.onChange()
     },
     onClick ({ id }) {
       getLog(id).then(({ data }) => {
@@ -214,7 +217,7 @@ export default {
       } else {
         this[type] = ''
       }
-      this.$refs.table.mergeCondition({ [type]: this[type] })
+      this.onChange()
     }
   }
 }

+ 1 - 1
src/views/screen/deploy/device/index.vue

@@ -71,7 +71,7 @@
                 />
               </el-select>
               <div
-                class="l-flex--row c-sibling-item far has-active u-pointer u-ellipsis"
+                class="l-flex--row c-sibling-item far has-active u-ellipsis"
                 @click="onView"
               >
                 {{ currentTarget }}

+ 3 - 3
src/views/screen/material/program/ast/Designer.vue

@@ -322,12 +322,12 @@
               class="o-card__checkbox"
             />
             <i
-              class="o-card__play el-icon-video-play has-active u-pointer"
+              class="o-card__play el-icon-video-play has-active"
               @click.stop="onView(item)"
             />
             <i
               v-if="item.files"
-              class="o-card__grid el-icon-s-grid has-active u-pointer"
+              class="o-card__grid el-icon-s-grid has-active"
               @click.stop="onChooseDir(item)"
             />
           </media-card>
@@ -347,7 +347,7 @@
               class="o-card__checkbox"
             />
             <i
-              class="o-card__play el-icon-video-play has-active u-pointer"
+              class="o-card__play el-icon-video-play has-active"
               @click.stop="onView(file)"
             />
           </media-card>

+ 1 - 1
src/views/screen/review/workflow/mine/index.vue

@@ -169,7 +169,7 @@ export default {
       const category = CategoryInfo[item.category]
       const canClick = !isView && !!category
       return h('div', {
-        staticClass: canClick ? 'u-color--blue has-active u-pointer' : 'u-color--black',
+        staticClass: canClick ? 'u-color--blue has-active' : 'u-color--black',
         staticStyle: { padding: '4px 0' },
         on: canClick
           ? {