From d1b058faa19088838b668d6c03dd71c2bcc7d5d3 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 09 Dec 2021 10:30:44 +0800
Subject: [PATCH] 用户角色控制修改

---
 src/views/trainApply/index.vue |   59 +++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 37 insertions(+), 22 deletions(-)

diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index bb44ef7..c3e3594 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -2,7 +2,7 @@
  * @Author: Morpheus
  * @Date: 2021-07-05 16:31:54
  * @Last Modified by: liu
- * @Last Modified time: 2021-11-23 16:23:28
+ * @Last Modified time: 2021-11-30 10:23:40
  * menu-name 报名考试
  */
 <template>
@@ -33,6 +33,7 @@
             @size-change="questionBankSizeChange"
             @row-save="questionBankRowSave"
             @row-del="questionBankRowDel"
+            :row-style="rowStyle"
           >
             <!-- 自定义按钮 -->
             <template slot="menuLeft">
@@ -69,7 +70,11 @@
                 :type="type"
                 size="small"
                 icon="el-icon-receiving"
-                :disabled="row.candidateNo == '' || row.cancel == 2"
+                :disabled="
+                  row.candidateNo == '' ||
+                  row.cancel == 2 ||
+                  row.auditStatus == 2
+                "
                 @click="handlePrint(row)"
                 >准考证打印
               </el-button>
@@ -84,6 +89,7 @@
                 >取消报名
               </el-button>
               <el-button
+                style="display: none"
                 :type="type"
                 size="small"
                 icon="el-icon-circle-check"
@@ -303,8 +309,8 @@
             searchValue: 1,
             dicData: [
               {
-                  label: '全部',
-                  value: 0,
+                label: "全部",
+                value: 0,
               },
               {
                 label: "已报名",
@@ -517,35 +523,36 @@
             searchSpan: 4,
             prop: "isExam",
             searchValue: 1,
-            dicData: [{
-                label: '全部',
+            dicData: [
+              {
+                label: "全部",
                 value: 0,
-            },
-            {
-                label: '未考试',
+              },
+              {
+                label: "未考试",
                 value: 1,
-            },
-            {
-                label: '考试结束',
+              },
+              {
+                label: "考试结束",
                 value: 2,
-            },
-            {
-                label: '考试中',
+              },
+              {
+                label: "考试中",
                 value: 3,
-            },
-            {
-                label: '缺考',
+              },
+              {
+                label: "缺考",
                 value: 4,
-            }
+              },
             ],
             props: {
-                label: "label",
-                value: "value"
+              label: "label",
+              value: "value",
             },
             editDisplay: false,
             addDisplay: false,
             width: 100,
-        },
+          },
         ],
       },
       questionBankSearch: {},
@@ -659,6 +666,14 @@
     },
   },
   methods: {
+    //行样式调整
+    rowStyle({ row, column, rowIndex }) {
+      if (row.auditStatus == "2") {
+        return {
+          color: "#ff2727",
+        };
+      }
+    },
     //准考证查看
     handlePrint(row) {
       var obj = row;

--
Gitblit v1.9.3