Parcourir la source

fix:控制维护按钮

lupeng il y a 1 an
Parent
commit
8cd6ab3b88
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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)"