deason пре 4 година
родитељ
комит
e040ea5ffb
2 измењених фајлова са 25 додато и 4 уклоњено
  1. 6 0
      src/modules/basic/routes/routes.js
  2. 19 4
      src/modules/basic/view/sys_login_rule_list.vue

+ 6 - 0
src/modules/basic/routes/routes.js

@@ -16,6 +16,7 @@ import client_config from "../view/clientConfig";
 import school_config from "../view/school_config";
 import unimportant_school_config from "../view/unimportant_school_config";
 import sys_notice from "../view/sys_notice";
+import sysLoginRuleList from "../view/sys_login_rule_list";
 
 export default [
   {
@@ -105,6 +106,11 @@ export default [
         path: "sys_notice", //系统通知
         meta: { privilegeCodes: "sys_notice" },
         component: sys_notice
+      },
+      {
+        path: "sysLoginRuleList",
+        meta: { privilegeCodes: "sys_login_rule_list" },
+        component: sysLoginRuleList //登录规则列表
       }
     ]
   }

+ 19 - 4
src/modules/basic/view/sys_login_rule_list.vue

@@ -67,11 +67,17 @@
     >
       <el-table-column label="ID" prop="id" width="80px" sortable />
       <el-table-column label="学校ID" prop="rootOrgId" width="110px" sortable />
-      <el-table-column label="规则类型" prop="type" width="150px" sortable />
+
+      <el-table-column label="规则类型" width="150px">
+        <template slot-scope="scope">
+          <span>{{ getTypeTitle(scope.row.type) }} </span></template
+        >
+      </el-table-column>
+
       <el-table-column label="是否例外(白名单)" width="150px">
-        <template slot-scope="scope">{{
-          scope.row.allow ? "是" : "否"
-        }}</template>
+        <template slot-scope="scope">
+          <span>{{ scope.row.allow ? "是" : "否" }}</span>
+        </template>
       </el-table-column>
 
       <el-table-column label="创建时间" prop="creationTime" sortable />
@@ -115,6 +121,7 @@ export default {
       formSearch: {
         rootOrgId: null,
         type: null,
+        allow: null,
         pageNo: 1,
         pageSize: 10
       },
@@ -182,9 +189,17 @@ export default {
     clearTypeValue() {
       this.formSearch.type = null;
     },
+    getTypeTitle(val) {
+      for (let type of this.ruleTypes) {
+        if (type.value == val) {
+          return type.label;
+        }
+      }
+    },
     resetSearchForm() {
       this.formSearch.rootOrgId = null;
       this.formSearch.type = null;
+      this.formSearch.allow = null;
       this.doSearch(1);
     }
   },