Просмотр исходного кода

修复部分权限管理问题

cehn 7 месяцев назад
Родитель
Сommit
9e74749929

+ 10 - 10
projects/textbook/src/modules/nav-admin/page-process/process-list/process-list.component.ts

@@ -148,6 +148,16 @@ export class ProcessListComponent implements OnInit {
         del: true,
       };
     }
+    if (e?.get('deadline') && new Date() > new Date(e?.get('deadline'))) {
+      return {
+        title: '已逾期',
+        color: 'red',
+        strat: true,
+        stop: false,
+        end: false,
+        del: true,
+      };
+    }
     if (
       e.get('status') == '200' &&
       e?.get('startDate') &&
@@ -162,16 +172,6 @@ export class ProcessListComponent implements OnInit {
         del: false,
       };
     }
-    if (e?.get('deadline') && new Date() > new Date(e?.get('deadline'))) {
-      return {
-        title: '已逾期',
-        color: 'red',
-        strat: true,
-        stop: false,
-        end: false,
-        del: true,
-      };
-    }
     if (e.get('status') == '300') {
       return {
         title: '已公示',

+ 0 - 2
projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.ts

@@ -73,8 +73,6 @@ export class PageProcessComponent implements OnInit {
           let vrifly = await this.tbookSer.getEduProcess(
             res.get('department').id
           );
-          console.log(vrifly);
-          
           if (vrifly) {
             this.beforeFilterObj.btns = {
               reject: true, //退回教材

+ 10 - 10
projects/textbook/src/modules/nav-province-contact/page-process/process-list/process-list.component.ts

@@ -141,6 +141,16 @@ export class ProcessListComponent implements OnInit {
         del: true,
       };
     }
+    if (e?.get('deadline') && new Date() > new Date(e?.get('deadline'))) {
+      return {
+        title: '已逾期',
+        color: 'red',
+        strat: true,
+        stop: false,
+        end: false,
+        del: true,
+      };
+    }
     if (
       e.get('status') == '200' &&
       e?.get('startDate') &&
@@ -155,16 +165,6 @@ export class ProcessListComponent implements OnInit {
         del: false,
       };
     }
-    if (e?.get('deadline') && new Date() > new Date(e?.get('deadline'))) {
-      return {
-        title: '已逾期',
-        color: 'red',
-        strat: true,
-        stop: false,
-        end: false,
-        del: true,
-      };
-    }
     if (e.get('status') == '300') {
       return {
         title: '已公示',

+ 4 - 0
projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.ts

@@ -133,6 +133,10 @@ export class PageTextbookComponent implements OnInit {
       );
       return;
     }
+    if(this.eduProcess?.get('deadline') && new Date() > new Date(this.eduProcess?.get('deadline'))){
+      this.message.warning('流程已逾期');
+      return
+    }
     // this.eduProcess?.set('status', '400');
     // this.eduProcess?.set('releaseDate', new Date());
     let query = new Parse.Query('EduTextbook');