Ver Fonte

fix:控制维护按钮

lupeng há 1 ano atrás
pai
commit
8cd6ab3b88
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/views/device/maintenance/index.vue

+ 2 - 2
src/views/device/maintenance/index.vue

@@ -33,14 +33,14 @@
                    icon="el-icon-setting"
                    text
                    v-hasPerm="[ButtonPermKeys.DEVICE.BTNS.maintenance_handle]"
-                   v-if="row.type === '1' && row.state === 0"
+                   v-if="row.type === '1' && row.state === 0 && Date.parse(row.nextTime) <= new Date()"
                    type="primary"
                    :size="size">维护</el-button>
         <el-button disabled
                    icon="el-icon-setting"
                    text
                    v-hasPerm="[ButtonPermKeys.DEVICE.BTNS.maintenance_handle]"
-                   v-if="row.type === '1' && row.state === 1"
+                   v-if="row.type === '1' && row.state === 1 && Date.parse(row.nextTime) <= new Date()"
                    type="primary"
                    :size="size">维护</el-button>
         <el-button @click="maintenanceList(row)"