tangning 1 рік тому
батько
коміт
cade8d2df5

+ 1 - 1
src/views/productOperation/cameraScene.vue

@@ -40,7 +40,7 @@
               },
               },
               {
               {
                 label: '权限',
                 label: '权限',
-                disabled: (!(record.status == 1 || record.status == -2)),
+                disabled: (!(record.status == 1 || record.status == -2)) || !record.isAuth,
                 ifShow: getTypeCheckPerm('scenes-powers'),
                 ifShow: getTypeCheckPerm('scenes-powers'),
                 onClick: handlePowers.bind(null, record),
                 onClick: handlePowers.bind(null, record),
               },
               },

+ 2 - 2
src/views/productOperation/modal/PowersModal.vue

@@ -86,7 +86,7 @@
           title: '查看权限',
           title: '查看权限',
           dataIndex: 'lookAuth',
           dataIndex: 'lookAuth',
           customRender: ({ record }) => {
           customRender: ({ record }) => {
-            return record.lookAuth == 1 ? '不限时间' : record.lookAuth == 0 ? '无权' : `${dayjs(record.lookEndTime).format('YYYY-MM-DD HH:mm')} 截止`;
+            return record.lookAuth == 1 ? '不限时间' : record.lookAuth == 0 ? '无权' : dayjs().isBefore(dayjs(record.lookEndTime)) ? '已过期' : `${dayjs(record.lookEndTime).format('YYYY-MM-DD HH:mm')} 截止`;
           },
           },
           width: 150,
           width: 150,
         },
         },
@@ -94,7 +94,7 @@
           title: '编辑权限',
           title: '编辑权限',
           dataIndex: 'editAuth',
           dataIndex: 'editAuth',
           customRender: ({ record }) => {
           customRender: ({ record }) => {
-            return record.editAuth == 1 ? '不限时间' : record.editAuth == 0 ? '无权' : `${dayjs(record.editEndTime).format('YYYY-MM-DD HH:mm')} 截止`;
+            return record.editAuth == 1 ? '不限时间' : record.editAuth == 0 ? '无权' : dayjs().isBefore(dayjs(record.editEndTime)) ? '已过期' : `${dayjs(record.editEndTime).format('YYYY-MM-DD HH:mm')} 截止`;
           },
           },
           width: 150,
           width: 150,
         },
         },

+ 3 - 2
src/views/productOperation/modal/detailModal.vue

@@ -376,11 +376,12 @@
             componentProps: {
             componentProps: {
               disabled: checkAuthOther.lookEndTime,
               disabled: checkAuthOther.lookEndTime,
               disabledDate: (current) => {
               disabledDate: (current) => {
-                if (checkAuthOther.lookEndTime) {
+                let mylookEndTime = dayjs(checkAuthOther.editEndTime)>dayjs(checkAuthOther.lookEndTime)?checkAuthOther.editEndTime:checkAuthOther.lookEndTime
+                if (mylookEndTime) {
                   return (
                   return (
                     current &&
                     current &&
                     (current < dayjs().startOf('day') ||
                     (current < dayjs().startOf('day') ||
-                      current > dayjs(checkAuthOther.lookEndTime))
+                      current > dayjs(mylookEndTime))
                   );
                   );
                 } else {
                 } else {
                   return current && current < dayjs().startOf('day');
                   return current && current < dayjs().startOf('day');