Explorar o código

fix(deploy): resolution check

Casper Dai %!s(int64=2) %!d(string=hai) anos
pai
achega
2839ff98ea

+ 1 - 1
src/components/layout/TenantPage/index.vue

@@ -1,10 +1,10 @@
 <template>
   <wrapper
-    :vertical="false"
     fill
     margin
     padding
     background
+    horizontal
   >
     <template v-if="groups">
       <div

+ 8 - 8
src/components/layout/Wrapper/index.vue

@@ -7,8 +7,8 @@
       class="c-page__content"
       :class="{
         fill, auto, padding, background,
-        'l-flex': !vertical,
-        'l-flex--col': vertical
+        'l-flex': horizontal,
+        'l-flex--col': !horizontal
       }"
     >
       <slot />
@@ -28,19 +28,19 @@ export default {
       type: [Boolean, String],
       default: false
     },
-    background: {
+    margin: {
       type: [Boolean, String],
       default: false
     },
-    vertical: {
-      type: Boolean,
-      default: true
+    padding: {
+      type: [Boolean, String],
+      default: false
     },
-    margin: {
+    background: {
       type: [Boolean, String],
       default: false
     },
-    padding: {
+    horizontal: {
       type: [Boolean, String],
       default: false
     }

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

@@ -320,7 +320,7 @@ export default {
     },
     getValue () {
       const eventTarget = this.createEventTarget()
-      if (eventTarget && !this.isAssets && this.ratio && this.ratio !== this.currentTarget.detail.resolutionRatio) {
+      if (eventTarget && !this.isAssets && (!this.ratio || this.ratio !== this.currentTarget.detail.resolutionRatio)) {
         eventTarget.adaptive = 1
       }
       return eventTarget

+ 1 - 1
src/views/ad/automation/scheduling/index.vue

@@ -1,10 +1,10 @@
 <template>
   <wrapper
-    :vertical="false"
     fill
     margin
     padding
     background
+    horizontal
   >
     <device-tree-single
       class="c-sibling-item c-sidebar u-font-size--sm"

+ 1 - 1
src/views/ad/automation/task/AssetTask.vue

@@ -1,10 +1,10 @@
 <template>
   <wrapper
-    :vertical="false"
     fill
     margin
     padding
     background
+    horizontal
   >
     <schema-table
       ref="table"

+ 1 - 1
src/views/ad/automation/task/ScreenTask.vue

@@ -1,10 +1,10 @@
 <template>
   <wrapper
-    :vertical="false"
     fill
     margin
     padding
     background
+    horizontal
   >
     <device-tree-single
       class="c-sibling-item c-sidebar u-font-size--sm"

+ 2 - 6
src/views/screen/deploy/device/index.vue

@@ -164,7 +164,7 @@ export default {
       ],
       schema: {
         list: getSchedules,
-        condition: { name: '', type: ScheduleType.COMPLEX, status: State.AVAILABLE },
+        condition: { type: ScheduleType.COMPLEX, status: State.AVAILABLE },
         filters: [
           { key: 'name', type: 'search', placeholder: '名称' }
         ],
@@ -203,9 +203,6 @@ export default {
     btnMsg () {
       return this.active < 1 ? '下一步' : '发布'
     },
-    resolutionRatio () {
-      return this.selectedDevices[0]?.resolutionRatio
-    },
     selectedId () {
       return this.eventOptions?.target?.id
     },
@@ -273,7 +270,6 @@ export default {
           this.active += 1
         })
         return false
-        // return this.onError('选择的设备分辨率不一致')
       }
       this.ratio = ratio
       this.eventOptions = this.createEventOptions(PublishTargetType.EVENT)
@@ -321,7 +317,7 @@ export default {
     publish () {
       return this.getPublishTarget().then(
         ({ publishType, publishTarget, name, resolutionRatio }) => this.$confirm(
-          `${resolutionRatio && (!this.radio || resolutionRatio !== this.radio) ? '<p class="u-color--error">上播内容与设备分辨率不一致,可能无法完全适配</p>' : ''}发布后需审核生效,操作完成后请通知相关人员进行审核`,
+          `${resolutionRatio && (!this.ratio || resolutionRatio !== this.ratio) ? '<p class="u-color--error">上播内容与设备分辨率不一致,可能无法完全适配</p>' : ''}发布后需审核生效,操作完成后请通知相关人员进行审核`,
           '发布确认',
           {
             dangerouslyUseHTMLString: true,