Explorar o código

feat(power): adjust scheduled task sorting

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

+ 4 - 4
src/views/device/detail/components/DeviceInvoke/MultifunctionCardPowerSwitch.vue

@@ -153,13 +153,13 @@ export default {
         { key: GET_POWER_STATUS, name: '电源状态' }
       ],
       powerSchema: {
+        nonPagination: true,
+        list: this.getPowers,
         buttons: [
           { label: '一键开启', on: this.onSwitchOpen },
           { label: '一键关闭', on: this.onSwitchClose },
           { label: '回读', on: this.getPowerStatus }
         ],
-        singlePage: true,
-        list: this.getPowers,
         cols: [
           { label: '设备', render: ({ portIndex }) => portIndex === RELAY_KEY ? '播控盒' : `多功能卡${portIndex}` },
           { prop: 'powerIndex', label: '电源端口' },
@@ -241,7 +241,7 @@ export default {
     },
     taskSchema () {
       return {
-        singlePage: true,
+        nonPagination: true,
         list: this.getTasks,
         condition: { type: '', action: '', enable: '' },
         buttons: [
@@ -966,7 +966,7 @@ export default {
       }
       if (this.isAdd) {
         task.enable = true
-        this.$tasks.push(task)
+        this.$tasks.unshift(task)
         this.$refs.table.pageTo()
       } else {
         Object.assign(this.$task, task)