소스 검색

fix: cannot go to the next step when selecting devices with different resolutions

Casper Dai 3 년 전
부모
커밋
c21e2811cd

+ 2 - 2
src/api/device.js

@@ -166,7 +166,7 @@ export function unbindDevices (params) {
 export function activateDevice ({ id, name }) {
   return confirmAndSend('激活', name, {
     url: '/device/batch/activate',
-    method: 'put',
+    method: 'PUT',
     data: [id]
   })
 }
@@ -174,7 +174,7 @@ export function activateDevice ({ id, name }) {
 export function deactivateDevice ({ id, name }) {
   return confirmAndSend('停用', name, {
     url: '/device/batch/deactivate',
-    method: 'put',
+    method: 'PUT',
     data: [id]
   })
 }

+ 1 - 1
src/views/device/detail/components/DeviceTakeOver/takeover.js

@@ -103,7 +103,7 @@ export function takeOver (device, { onMessage, onCreated, onClose, debug }) {
         payload.assets.forEach(asset => {
           if (asset.type !== MediaType.WEB) {
             onMqttMessage(Topic.DOWNLOAD, {
-              messageId: createMessageId,
+              messageId: createMessageId(),
               asset,
               complete: true,
               success: [true, false][Math.random() * 2 | 0]

+ 4 - 5
src/views/realm/device/settings/components/AdConfigDialog.vue

@@ -11,8 +11,6 @@
           v-model="attributes.enable"
           active-color="#13ce66"
           inactive-color="#ff4949"
-          :active-value="1"
-          :inactive-value="0"
         />
       </div>
       <span class="c-grid-form__label required">开机时间</span>
@@ -52,7 +50,7 @@
         :max="1000"
         step-strictly
       />
-      <span class="c-grid-form__label required">价(分)</span>
+      <span class="c-grid-form__label required">价(分)</span>
       <el-input-number
         v-model="attributes.price"
         class="c-grid-form__info c-grid-form__option"
@@ -85,7 +83,7 @@ export default {
     },
     price () {
       const price = this.attributes.price || 0
-      return `${(price / 100).toFixed(2)}元`
+      return `5秒 x ${this.attributes.minCount}次 = ${(price / 100).toFixed(2)}元`
     }
   },
   methods: {
@@ -95,7 +93,7 @@ export default {
       getAdAttributes(id).then(({ data }) => {
         this.isAdd = !data
         this.attributes = {
-          enable: 0,
+          enable: false,
           openTime: '07:00', // 开机时间
           closeTime: '22:00', // 关机时间
           minDuration: 5, // 最小投放广告时长(单位秒)
@@ -103,6 +101,7 @@ export default {
           price: 1000, // 单位分
           ...data
         }
+        console.log(this.attributes)
         this.$refs.configDialog.show()
       }).finally(() => {
         this.$closeLoading(loading)

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

@@ -254,6 +254,7 @@ export default {
           '选择的设备分辨率不一致',
           { type: 'warning' }
         ).then(() => {
+          this.eventOptions = this.createEventOptions()
           this.active += 1
         })
         return false