WANG 6 anni fa
parent
commit
814fc2f445
1 ha cambiato i file con 10 aggiunte e 10 eliminazioni
  1. 10 10
      src/modules/examwork/view/examInfo.vue

+ 10 - 10
src/modules/examwork/view/examInfo.vue

@@ -93,8 +93,16 @@
           </el-table-column>
           <el-table-column prop="updateTime" width="155" label="更新时间">
           </el-table-column>
-          <el-table-column width="55" label="状态">
-            <span slot-scope="scope"> {{ getStatus(scope.row.enable) }} </span>
+          <el-table-column width="70" label="状态">
+            <span slot-scope="scope">
+              <span v-if="scope.row.enable">
+                <i class="el-icon-success" style="color:green;"></i
+                >&nbsp;启用</span
+              >
+              <span v-else>
+                <i class="el-icon-error" style="color:red;"></i>&nbsp;禁用</span
+              >
+            </span>
           </el-table-column>
           <el-table-column label="操作" width="160">
             <template slot-scope="scope">
@@ -231,14 +239,6 @@ export default {
       });
       console.log(this.selectedExamIds);
     },
-    getStatus(enable) {
-      if (enable == true) {
-        return "启用";
-      } else if (enable == false) {
-        return "禁用";
-      }
-      return enable;
-    },
     enableById(row) {
       this.$confirm("是否启用该考试?", "提示", {
         confirmButtonText: "确定",