浏览代码

基础管理修改

zhangjie 3 年之前
父节点
当前提交
98391947e6

+ 7 - 0
src/assets/styles/pages.scss

@@ -252,3 +252,10 @@
     }
   }
 }
+// privilege-set
+.privilege-set {
+  .cell-check-list {
+    text-align: left;
+    padding-left: 20px;
+  }
+}

+ 7 - 0
src/constants/enumerate.js

@@ -37,6 +37,13 @@ export const URL_PRIVILEGE_TYPE = {
 };
 
 // 基础 -------------->
+// 机构
+export const ORG_TYPE = {
+  COLLEGE: "学院",
+  SUBJECT: "系",
+  STARFF_ROOM: "教研室",
+  PRINT_ROOM: "印刷室"
+};
 // 角色
 export const ROLE_TYPE = {
   SCHOOL_ADMIN: "管理员",

+ 10 - 20
src/modules/base/api.js

@@ -111,8 +111,8 @@ export const courseListPage = datas => {
 export const courseQuery = datas => {
   return $postParam("/api/admin/basic/course/query", datas);
 };
-export const deleteCourse = id => {
-  return $post("/api/admin/basic/course/remove", { id });
+export const deleteCourse = idList => {
+  return $post("/api/admin/basic/course/delete_batch", { idList });
 };
 export const updateCourse = datas => {
   return $post("/api/admin/basic/course/save", datas);
@@ -121,10 +121,10 @@ export const updateCourse = datas => {
 // dict --------------------------------->
 // campus-manage
 export const campusQuery = () => {
-  return $postParam("/api/admin/basic/campus/list", {});
+  return $postParam("/api/admin/basic/campus/query", {});
 };
 export const deleteCampus = id => {
-  return $post("/api/admin/basic/campus/remove", { id });
+  return $post("/api/admin/basic/campus/delete", { id });
 };
 export const updateCampus = datas => {
   return $post("/api/admin/basic/campus/save", datas);
@@ -133,28 +133,18 @@ export const updateCampus = datas => {
 export const printRoomQuery = () => {
   return $postParam("/api/admin/basic/print_room/list", {});
 };
-export const deletePrintRoom = id => {
-  return $post("/api/admin/basic/print_room/remove", { id });
-};
-export const updatePrintRoom = datas => {
-  return $post("/api/admin/basic/print_room/save", datas);
-};
+
 // staff-room-manage
 export const staffRoomQuery = () => {
   return $postParam("/api/admin/basic/staff_room/list", {});
 };
-export const deleteStaffRoom = id => {
-  return $post("/api/admin/basic/staff_room/remove", { id });
-};
-export const updateStaffRoom = datas => {
-  return $post("/api/admin/basic/staff_room/save", datas);
-};
+
 // student-manage
-export const studentListQuery = () => {
-  return $postParam("/api/admin/basic/student/list", {});
+export const studentListQuery = datas => {
+  return $postParam("/api/admin/basic/student/query", datas);
 };
-export const deleteStudent = id => {
-  return $post("/api/admin/basic/student/remove", { id });
+export const deleteStudent = idList => {
+  return $post("/api/admin/basic/student/delete_batch", { idList });
 };
 export const updateStudent = datas => {
   return $post("/api/admin/basic/student/save", datas);

+ 19 - 4
src/modules/base/components/ModifyCourse.vue

@@ -31,12 +31,19 @@
           clearable
         ></el-input>
       </el-form-item>
-      <el-form-item prop="staffRoomId" label="所属教研室:">
+      <el-form-item prop="teachingRoomId" label="所属教研室:">
         <staff-room-select
-          v-model.trim="modalForm.staffRoomId"
+          v-model.trim="modalForm.teachingRoomId"
           clearable
         ></staff-room-select>
       </el-form-item>
+      <el-form-item prop="clazz" label="授课班级:">
+        <el-input
+          v-model.trim="modalForm.clazz"
+          placeholder="请输入授课班级"
+          clearable
+        ></el-input>
+      </el-form-item>
     </el-form>
     <div slot="footer">
       <el-button type="primary" :disabled="isSubmit" @click="submit"
@@ -54,7 +61,8 @@ const initModalForm = {
   id: null,
   name: "",
   code: "",
-  staffRoomId: ""
+  teachingRoomId: "",
+  clazz: ""
 };
 
 export default {
@@ -99,12 +107,19 @@ export default {
             trigger: "change"
           }
         ],
-        staffRoomId: [
+        teachingRoomId: [
           {
             required: true,
             message: "请选择所属教研室",
             trigger: "change"
           }
+        ],
+        clazz: [
+          {
+            required: true,
+            message: "请输入授课班级",
+            trigger: "change"
+          }
         ]
       }
     };

+ 45 - 18
src/modules/base/components/ModifyOrganization.vue

@@ -18,6 +18,13 @@
         label-width="100px"
       >
         <el-form-item prop="name" label="机构名称:">
+          <el-form-item label="上级机构:">
+            <el-input
+              style="width:282px;"
+              v-model.trim="modalForm.parentName"
+              disabled
+            ></el-input>
+          </el-form-item>
           <el-input
             style="width:282px;"
             v-model.trim="modalForm.name"
@@ -25,29 +32,40 @@
             clearable
           ></el-input>
         </el-form-item>
-        <el-form-item prop="code" label="机构代码:">
-          <el-input
-            style="width:282px;"
-            v-model.trim="modalForm.code"
-            placeholder="请输入机构代码"
+        <el-form-item prop="orgType" label="机构类型:">
+          <el-select
+            v-model="modalForm.orgType"
+            style="width: 282px;"
+            placeholder="请选择"
             clearable
-          ></el-input>
+          >
+            <el-option
+              v-for="(val, key) in ORG_TYPE"
+              :key="key"
+              :value="key"
+              :label="val"
+            ></el-option>
+          </el-select>
         </el-form-item>
-        <el-form-item label="上级机构:">
-          <el-input
-            style="width:282px;"
-            v-model.trim="modalForm.parentName"
-            disabled
-          ></el-input>
+        <el-form-item
+          v-if="modalForm.orgType === 'PRINT_ROOM'"
+          prop="campusId"
+          label="所属校区:"
+        >
+          <campus-select
+            v-model="modalForm.campusId"
+            style="width: 282px;"
+            clearable
+          ></campus-select>
         </el-form-item>
-        <el-form-item label="启用/禁用:">
+        <!-- <el-form-item label="启用/禁用:">
           <el-switch
             v-model="modalForm.enable"
             active-color="#23c4b9"
             inactive-color="#dcdfe6"
           >
           </el-switch>
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
     </div>
     <div slot="footer">
@@ -61,11 +79,13 @@
 
 <script>
 import { updateOrganization } from "../api";
+import { ORG_TYPE } from "@/constants/enumerate";
 
 const initModalForm = {
   id: null,
   name: "",
-  code: "",
+  orgType: "",
+  campusId: "",
   parentId: null,
   parentName: "",
   enable: true
@@ -93,6 +113,7 @@ export default {
     return {
       modalIsShow: false,
       isSubmit: false,
+      ORG_TYPE,
       modalForm: {},
       rules: {
         name: [
@@ -103,11 +124,17 @@ export default {
             trigger: "change"
           }
         ],
-        code: [
+        orgType: [
+          {
+            required: true,
+            message: "请选择机构类型",
+            trigger: "change"
+          }
+        ],
+        campusId: [
           {
             required: true,
-            pattern: /^[0-9a-zA-Z_-]{3,30}$/,
-            message: "机构代码只能由数字字母短横线组成,长度在3-30之间",
+            message: "请选择校区",
             trigger: "change"
           }
         ]

+ 0 - 136
src/modules/base/components/ModifyPrintRoom.vue

@@ -1,136 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-print-room"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="500px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      :key="modalForm.id"
-      label-width="100px"
-    >
-      <el-form-item prop="name" label="印刷室名称:">
-        <el-input
-          v-model.trim="modalForm.name"
-          placeholder="请输入印刷室名称"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="code" label="印刷室编码:">
-        <el-input
-          v-model.trim="modalForm.code"
-          placeholder="请输入印刷室编码"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="campus" label="所属校区:">
-        <campus-select v-model="modalForm.campusId"></campus-select>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button type="danger" @click="cancel" plain>取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { updatePrintRoom } from "../api";
-
-const initModalForm = {
-  id: null,
-  name: "",
-  code: "",
-  campusId: ""
-};
-
-export default {
-  name: "modify-print-room",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "印刷室";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: { ...initModalForm },
-      rules: {
-        name: [
-          {
-            required: true,
-            message: "印刷室名称不能超过30个字",
-            max: 30,
-            trigger: "change"
-          }
-        ],
-        code: [
-          {
-            required: true,
-            pattern: /^[0-9a-zA-Z_-]{3,30}$/,
-            message: "印刷室编码只能由数字字母短横线组成,长度在3-30之间",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      if (val.id) {
-        this.modalForm = this.$objAssign(initModalForm, val);
-      } else {
-        this.modalForm = { ...initModalForm };
-      }
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      const data = await updatePrintRoom(this.modalForm).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success(this.title + "成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 22 - 91
src/modules/base/components/ModifyRole.vue

@@ -3,11 +3,10 @@
     class="modify-role"
     :visible.sync="modalIsShow"
     :title="title"
-    top="10px"
-    width="700px"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body
+    fullscreen
     @opened="visibleChange"
   >
     <div class="part-box part-box-pad part-box-border">
@@ -25,34 +24,13 @@
             clearable
           ></el-input>
         </el-form-item>
-        <el-form-item
-          v-show="modalForm.type === 'CUSTOM'"
-          prop="privilegeIds"
-          label="角色权限:"
-        >
-          <div class="part-box part-box-pad part-box-border">
-            <el-tree
-              :data="menus"
-              show-checkbox
-              node-key="id"
-              ref="MenuTree"
-              highlight-current
-              check-on-click-node
-              :expand-on-click-node="false"
-              :default-expanded-keys="defaultExpandedKeys"
-              :props="defaultProps"
-              @check-change="checkChange"
-            >
-              <span class="custom-tree-node" slot-scope="{ node, data }">
-                <span
-                  ><i class="el-icon-link" v-if="data.type === 'URL'"></i>
-                  {{ node.label }}</span
-                >
-              </span>
-            </el-tree>
-          </div>
-        </el-form-item>
+        <el-form-item label="角色权限:" required></el-form-item>
       </el-form>
+      <privilege-set
+        v-if="menus && menus.length"
+        ref="PrivilegeSet"
+        :menus="menus"
+      ></privilege-set>
     </div>
     <div slot="footer">
       <el-button type="primary" :disabled="isSubmit" @click="submit"
@@ -65,6 +43,8 @@
 
 <script>
 import { updateRole, menuAuthList, roleBoundPrivileges } from "../api";
+import PrivilegeSet from "./PrivilegeSet";
+import navs from "./privilege/navs.json";
 
 const initModalForm = {
   id: null,
@@ -75,6 +55,7 @@ const initModalForm = {
 
 export default {
   name: "modify-role",
+  components: { PrivilegeSet },
   props: {
     instance: {
       type: Object,
@@ -95,12 +76,8 @@ export default {
     return {
       modalIsShow: false,
       isSubmit: false,
-      menus: [],
-      defaultExpandedKeys: [],
+      menus: navs,
       modalForm: {},
-      defaultProps: {
-        label: "name"
-      },
       rules: {
         name: [
           {
@@ -109,32 +86,12 @@ export default {
             message: "角色名称只能输入汉字、字母和数字,长度不能超过10",
             trigger: "change"
           }
-        ],
-        type: [
-          {
-            required: true,
-            message: "请选择角色类型",
-            trigger: "change"
-          }
-        ],
-        privilegeIds: [
-          {
-            required: true,
-            validator: (rule, value, callback) => {
-              if (this.modalForm.type !== "CUSTOM" || value.length) {
-                callback();
-              } else {
-                callback(new Error("请选择扩展字段"));
-              }
-            },
-            trigger: "change"
-          }
         ]
       }
     };
   },
   created() {
-    this.getMenus();
+    // this.getMenus();
   },
   methods: {
     async getMenus() {
@@ -142,8 +99,6 @@ export default {
       const needHideModules = ["common", "customer"];
       if (data)
         this.menus = data.filter(item => !needHideModules.includes(item.url));
-      this.defaultExpandedKeys = [];
-      this.getDefaultExpandedKeys(this.menus);
     },
     async visibleChange() {
       if (this.instance.id) {
@@ -151,20 +106,10 @@ export default {
         if (this.instance.type === "CUSTOM") {
           let privilegeIds = await roleBoundPrivileges(this.instance.id);
           privilegeIds = privilegeIds || [];
-          let checkedIds = [];
-          const getCheckedIds = list => {
-            list.forEach(item => {
-              if (item["children"] && item["children"].length) {
-                getCheckedIds(item.children);
-              } else {
-                const isChecked = privilegeIds.includes(item.id);
-                if (isChecked) checkedIds.push(item.id);
-              }
-            });
-          };
-          getCheckedIds(this.menus);
-          this.$refs.MenuTree.setCheckedKeys(checkedIds);
-          this.modalForm.privilegeIds = checkedIds;
+          this.modalForm.privilegeIds = privilegeIds;
+          this.$nextTick(() => {
+            this.$refs.PrivilegeSet.buildTableData(privilegeIds);
+          });
         }
       } else {
         this.modalForm = { ...initModalForm };
@@ -180,33 +125,19 @@ export default {
     open() {
       this.modalIsShow = true;
     },
-    getDefaultExpandedKeys(menus) {
-      menus.forEach(item => {
-        if (
-          item.children &&
-          item.children.length &&
-          !item.children.some(elem => elem.type === "URL")
-        ) {
-          this.defaultExpandedKeys.push(item.id);
-          this.getDefaultExpandedKeys(item.children);
-        }
-      });
-    },
-    checkChange(data, checked) {
-      this.modalForm.privilegeIds = this.$refs.MenuTree.getCheckedKeys();
-      this.$refs.modalFormComp.validateField("privilegeIds");
-    },
     async submit() {
       const valid = await this.$refs.modalFormComp.validate().catch(() => {});
       if (!valid) return;
 
+      const privilegeIds = this.$refs.PrivilegeSet.getSelectedPrivilegeIds();
+      if (!privilegeIds.length) {
+        this.$emit("请设置角色权限!");
+        return;
+      }
+
       if (this.isSubmit) return;
       this.isSubmit = true;
       const datas = { ...this.modalForm };
-      const privilegeIds = [
-        ...this.$refs.MenuTree.getCheckedKeys(),
-        ...this.$refs.MenuTree.getHalfCheckedKeys()
-      ];
       datas.privilegeIds = privilegeIds;
       const data = await updateRole(datas).catch(() => {});
       this.isSubmit = false;

+ 0 - 134
src/modules/base/components/ModifyStaffRoom.vue

@@ -1,134 +0,0 @@
-<template>
-  <el-dialog
-    class="modify-staff-room"
-    :visible.sync="modalIsShow"
-    :title="title"
-    top="10vh"
-    width="500px"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    append-to-body
-    @open="visibleChange"
-  >
-    <el-form
-      ref="modalFormComp"
-      :model="modalForm"
-      :rules="rules"
-      :key="modalForm.id"
-      label-width="100px"
-    >
-      <el-form-item prop="name" label="教研室名称:">
-        <el-input
-          v-model.trim="modalForm.name"
-          placeholder="请输入教研室名称"
-          clearable
-        ></el-input>
-      </el-form-item>
-      <el-form-item prop="code" label="教研室编码:">
-        <el-input
-          v-model.trim="modalForm.code"
-          placeholder="请输入教研室编码"
-          clearable
-        ></el-input>
-      </el-form-item>
-    </el-form>
-    <div slot="footer">
-      <el-button type="primary" :disabled="isSubmit" @click="submit"
-        >确认</el-button
-      >
-      <el-button type="danger" @click="cancel" plain>取消</el-button>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import { updateStaffRoom } from "../api";
-
-const initModalForm = {
-  id: null,
-  name: "",
-  code: ""
-};
-
-export default {
-  name: "modify-staff-room",
-  props: {
-    instance: {
-      type: Object,
-      default() {
-        return {};
-      }
-    }
-  },
-  computed: {
-    isEdit() {
-      return !!this.instance.id;
-    },
-    title() {
-      return (this.isEdit ? "编辑" : "新增") + "教研室";
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      modalForm: { ...initModalForm },
-      rules: {
-        name: [
-          {
-            required: true,
-            // pattern: /^[0-9a-zA-Z\u4E00-\u9FA5]{1,20}$/,
-            // message: "教研室名称只能输入汉字、数字和字母,长度不能超过20",
-            message: "教研室名称不能超过30个字",
-            max: 30,
-            trigger: "change"
-          }
-        ],
-        code: [
-          {
-            required: true,
-            pattern: /^[0-9a-zA-Z_-]{3,30}$/,
-            message: "教研室编码只能由数字字母短横线组成,长度在3-30之间",
-            trigger: "change"
-          }
-        ]
-      }
-    };
-  },
-  methods: {
-    initData(val) {
-      if (val.id) {
-        this.modalForm = this.$objAssign(initModalForm, val);
-      } else {
-        this.modalForm = { ...initModalForm };
-      }
-    },
-    visibleChange() {
-      this.initData(this.instance);
-    },
-    cancel() {
-      this.modalIsShow = false;
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      const valid = await this.$refs.modalFormComp.validate().catch(() => {});
-      if (!valid) return;
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      const data = await updateStaffRoom(this.modalForm).catch(() => {
-        this.isSubmit = false;
-      });
-
-      if (!data) return;
-
-      this.isSubmit = false;
-      this.$message.success(this.title + "成功!");
-      this.$emit("modified");
-      this.cancel();
-    }
-  }
-};
-</script>

+ 13 - 12
src/modules/base/components/ModifyStudent.vue

@@ -17,23 +17,23 @@
       :key="modalForm.id"
       label-width="100px"
     >
-      <el-form-item prop="name" label="姓名:">
+      <el-form-item prop="studentName" label="姓名:">
         <el-input
-          v-model.trim="modalForm.name"
+          v-model.trim="modalForm.studentName"
           placeholder="请输入课程名称"
           clearable
         ></el-input>
       </el-form-item>
-      <el-form-item prop="studentNo" label="学号:">
+      <el-form-item prop="studentCode" label="学号:">
         <el-input
-          v-model.trim="modalForm.studentNo"
+          v-model.trim="modalForm.studentCode"
           placeholder="请输入学号"
           clearable
         ></el-input>
       </el-form-item>
-      <el-form-item prop="phone" label="手机号:">
+      <el-form-item prop="phoneNumber" label="手机号:">
         <el-input
-          v-model.trim="modalForm.phone"
+          v-model.trim="modalForm.phoneNumber"
           placeholder="请输入手机号"
           clearable
         ></el-input>
@@ -64,9 +64,10 @@ import { phone } from "@/plugins/formRules";
 const initModalForm = {
   id: null,
   name: "",
-  studentNo: "",
-  phone: "",
-  campusId: ""
+  studentCode: "",
+  phoneNumber: "",
+  campusId: "",
+  clazz: ""
 };
 
 export default {
@@ -93,7 +94,7 @@ export default {
       isSubmit: false,
       modalForm: { ...initModalForm },
       rules: {
-        name: [
+        studentName: [
           {
             required: true,
             message: "请输入姓名",
@@ -105,7 +106,7 @@ export default {
             trigger: "change"
           }
         ],
-        studentNo: [
+        studentCode: [
           {
             required: true,
             message: "请输入学号",
@@ -117,7 +118,7 @@ export default {
             trigger: "change"
           }
         ],
-        phone,
+        phoneNumber: phone,
         campusId: [
           {
             required: true,

+ 213 - 0
src/modules/base/components/PrivilegeSet.vue

@@ -0,0 +1,213 @@
+<template>
+  <div class="privilege-set">
+    <table class="table">
+      <tr>
+        <th v-for="(item, index) in tableHead" :key="index">{{ item }}</th>
+      </tr>
+      <tr v-for="row in tableData" :key="row.id">
+        <td v-for="(col, cindex) in row.columns" :key="cindex">
+          <div v-if="col && col.type === 'page'">{{ col.name }}</div>
+          <div v-else-if="col && col.type === 'page-checkbox'">
+            <el-checkbox
+              v-model="row.enable"
+              @change="enable => pageSelectChange(row, enable)"
+            ></el-checkbox>
+          </div>
+          <div v-else-if="col && col.type">
+            <div
+              class="cell-check-list"
+              v-for="item in col.datas"
+              :key="item.field"
+            >
+              <el-checkbox v-model="item.enable">{{ item.name }}</el-checkbox>
+            </div>
+          </div>
+          <div v-else></div>
+        </td>
+      </tr>
+    </table>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "privilege-set",
+  props: {
+    menus: {
+      type: Array,
+      default() {
+        return [];
+      }
+    }
+  },
+  data() {
+    return {
+      maxDeep: 0,
+      tableData: [],
+      tableHead: []
+    };
+  },
+  created() {
+    this.initData();
+  },
+  methods: {
+    initData() {
+      this.maxDeep = this.getNavsDeep();
+      this.tableHead = this.buildTableHead();
+    },
+    getNavsDeep() {
+      let maxDeep = 0;
+      const getDeep = (navs, deep) => {
+        ++deep;
+        navs.forEach(nav => {
+          if (maxDeep < deep) maxDeep = deep;
+
+          if (nav.children && nav.children.length) getDeep(nav.children, deep);
+        });
+      };
+      getDeep(this.menus, maxDeep);
+
+      return maxDeep;
+    },
+    buildTableHead() {
+      let headers = [];
+      let codes = ["一", "二", "三", "四", "五", "六", "七", "八"];
+      for (let index = 0; index < this.maxDeep; index++) {
+        headers.push(`${codes[index]}级页面`);
+      }
+      headers = [
+        ...headers,
+        "页面",
+        "查询条件限制",
+        "功能按钮可用性",
+        "列表展示项",
+        "操作列权限"
+      ];
+      return headers;
+    },
+    buildTableData(privilegeIds = []) {
+      let tableData = [];
+      let tableColumnCount = this.maxDeep + 6;
+      const pageSetTypes = ["querys", "buttons", "columns", "links"];
+      const buildData = (navs, deep) => {
+        ++deep;
+        navs.forEach(nav => {
+          let columns = new Array(tableColumnCount);
+          columns[deep - 1] = { type: "page", name: nav.name };
+          columns[this.maxDeep] = {
+            type: "page-checkbox"
+          };
+
+          const isPage = pageSetTypes.some(
+            type => nav[type] && nav[type].length
+          );
+          if (isPage) {
+            pageSetTypes.forEach((type, index) => {
+              const datas = !nav[type]
+                ? []
+                : nav[type].map(elem => {
+                    let data = { ...elem };
+                    // todo:data.status
+                    return data;
+                  });
+              columns[this.maxDeep + index + 1] = { type, datas };
+            });
+          }
+
+          tableData.push({
+            id: nav.id,
+            name: nav.name,
+            enable: true,
+            type: nav.type,
+            parentId: nav.parentId,
+            isPage,
+            columns
+          });
+
+          if (nav.children && nav.children.length)
+            buildData(nav.children, deep);
+        });
+      };
+      buildData(this.menus, 0);
+
+      this.tableData = tableData;
+    },
+    getSelectedPrivilegeIds() {
+      let privilegeIds = [];
+      this.tableData
+        .filter(row => row.enable)
+        .forEach(row => {
+          if (!row.isPage) {
+            privilegeIds.push(row.id);
+            return;
+          }
+          row.columns.forEach(column => {
+            if (column.type === "page" || column.type === "page-checkbox")
+              return;
+
+            column.datas.forEach(item => {
+              if (item.enable) privilegeIds.push(item.id);
+            });
+          });
+        });
+      return privilegeIds;
+    },
+    // set change
+    pageSelectChange(row, enable) {
+      this.changRowColumnEnable(row, enable);
+      this.changeParentNodeSelected(row.parentId, enable);
+      this.changeChildrenNodeSelected(row.id, enable);
+    },
+    changRowColumnEnable(row, enable) {
+      if (!row.isPage) return;
+      row.columns.forEach(column => {
+        if (column.type === "page" || column.type === "page-checkbox") return;
+
+        column.datas.forEach(item => {
+          item.enable = enable;
+        });
+      });
+    },
+    changeParentNodeSelected(parentId, enable) {
+      if (!parentId) return;
+      let curParentId = parentId;
+      if (enable) {
+        while (curParentId) {
+          let curParentNode = this.tableData.find(
+            row => row.id === curParentId
+          );
+          curParentNode.enable = enable;
+          curParentId = curParentNode.parentId;
+          this.changRowColumnEnable(curParentNode, enable);
+        }
+      } else {
+        while (curParentId) {
+          let curParentNode = this.tableData.find(
+            row => row.id === curParentId
+          );
+          let childrenHasOneSelected = this.tableData
+            .filter(row => row.parentId === curParentId)
+            .some(row => row.enable);
+          curParentNode.enable = childrenHasOneSelected;
+          curParentId = curParentNode.parentId;
+          this.changRowColumnEnable(curParentNode, enable);
+        }
+      }
+    },
+    changeChildrenNodeSelected(id, enable) {
+      if (!id) return;
+      let curIds = [id];
+      while (curIds.length) {
+        const validNodes = this.tableData.filter(row =>
+          curIds.includes(row.parentId)
+        );
+        validNodes.forEach(row => {
+          row.enable = enable;
+          this.changRowColumnEnable(row, enable);
+        });
+        curIds = validNodes.map(row => row.id);
+      }
+    }
+  }
+};
+</script>

+ 812 - 0
src/modules/base/components/privilege/navs.json

@@ -0,0 +1,812 @@
+[
+  {
+    "id": "001",
+    "name": "基础管理",
+    "url": "base",
+    "type": "MENU",
+    "parentId": null,
+    "children": [
+      {
+        "id": "002",
+        "name": "机构管理",
+        "url": "org",
+        "type": "MENU",
+        "parentId": "001",
+        "children": [
+          {
+            "id": "003",
+            "name": "学校列表",
+            "url": "RightManage",
+            "type": "MENU",
+            "parentId": "002",
+            "querys": [
+              {
+                "id": "003001",
+                "name": "学校代码",
+                "url": "schoolCode",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "003002",
+                "name": "学校名称",
+                "url": "schoolName",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "003003",
+                "name": "状态",
+                "url": "status",
+                "type": "QUERY",
+                "enable": true
+              }
+            ],
+            "buttons": [
+              {
+                "id": "003004",
+                "name": "查询",
+                "url": "search",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "003005",
+                "name": "新增",
+                "url": "create",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "003006",
+                "name": "批量禁用",
+                "url": "batDisable",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "003007",
+                "name": "批量启用",
+                "url": "batEnable",
+                "type": "BUTTON",
+                "enable": false
+              }
+            ],
+            "columns": [
+              {
+                "id": "003008",
+                "name": "学校代码",
+                "url": "schoolCode",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "003009",
+                "name": "学校名称",
+                "url": "schoolName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "003010",
+                "name": "状态",
+                "url": "status",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "003011",
+                "name": "备注",
+                "url": "comment",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "003012",
+                "name": "操作",
+                "url": "action",
+                "type": "COLUMN",
+                "enable": false
+              }
+            ],
+            "links": [
+              {
+                "id": "003013",
+                "name": "修改",
+                "url": "edit",
+                "type": "ROW_ACTION",
+                "enable": false
+              },
+              {
+                "id": "003014",
+                "name": "启用/禁用",
+                "url": "enable",
+                "type": "ROW_ACTION",
+                "enable": false
+              }
+            ],
+            "ranges": []
+          },
+          {
+            "id": "004",
+            "name": "合作方列表",
+            "url": "CustomerManage",
+            "type": "MENU",
+            "parentId": "002",
+            "querys": [
+              {
+                "id": "004001",
+                "name": "合作方代码",
+                "url": "customerCode",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "004002",
+                "name": "合作方名称",
+                "url": "customerName",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "004003",
+                "name": "状态",
+                "url": "status",
+                "type": "QUERY",
+                "enable": false
+              }
+            ],
+            "buttons": [
+              {
+                "id": "004004",
+                "name": "查询",
+                "url": "search",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "004005",
+                "name": "新增",
+                "url": "create",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "004006",
+                "name": "批量禁用",
+                "url": "batDisable",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "004007",
+                "name": "批量启用",
+                "url": "batEnable",
+                "type": "BUTTON",
+                "enable": false
+              }
+            ],
+            "columns": [
+              {
+                "id": "004001",
+                "name": "合作方代码",
+                "url": "customerCode",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "004001",
+                "name": "合作方名称",
+                "url": "customerName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "004001",
+                "name": "状态",
+                "url": "status",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "004001",
+                "name": "备注",
+                "url": "comment",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "004001",
+                "name": "操作",
+                "url": "action",
+                "type": "COLUMN",
+                "enable": false
+              }
+            ],
+            "links": [
+              {
+                "id": "004001",
+                "name": "修改",
+                "url": "edit",
+                "type": "LINK",
+                "enable": false
+              },
+              {
+                "id": "004001",
+                "name": "启用/禁用",
+                "url": "enable",
+                "type": "LINK",
+                "enable": false
+              }
+            ],
+            "ranges": []
+          }
+        ]
+      },
+      {
+        "id": "005",
+        "name": "角色管理",
+        "url": "role",
+        "type": "MENU",
+        "parentId": "001",
+        "children": [
+          {
+            "id": "006",
+            "name": "角色列表",
+            "url": "RoleManage",
+            "type": "MENU",
+            "parentId": "005",
+            "querys": [
+              {
+                "id": "006001",
+                "name": "角色名称",
+                "url": "roleName",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "006002",
+                "name": "角色类别",
+                "url": "roleCode",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "006003",
+                "name": "状态",
+                "url": "status",
+                "type": "QUERY",
+                "enable": false
+              }
+            ],
+            "buttons": [
+              {
+                "id": "006004",
+                "name": "新增",
+                "url": "create",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "006005",
+                "name": "批量禁用",
+                "url": "batDisable",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "006006",
+                "name": "批量启用",
+                "url": "batEnable",
+                "type": "BUTTON",
+                "enable": false
+              }
+            ],
+            "columns": [
+              {
+                "id": "006007",
+                "name": "角色名称",
+                "url": "roleName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "006008",
+                "name": "角色类别",
+                "url": "roleCode",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "006009",
+                "name": "状态",
+                "url": "status",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "006010",
+                "name": "创建时间",
+                "url": "createTime",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "006011",
+                "name": "创建人",
+                "url": "createrName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "006012",
+                "name": "更新时间",
+                "url": "updateTime",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "006013",
+                "name": "执行人",
+                "url": "actionerName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "006014",
+                "name": "操作",
+                "url": "action",
+                "type": "COLUMN",
+                "enable": false
+              }
+            ],
+            "links": [
+              {
+                "id": "006015",
+                "name": "修改",
+                "url": "edit",
+                "type": "LINK",
+                "enable": false
+              },
+              {
+                "id": "006016",
+                "name": "启用/禁用",
+                "url": "enable",
+                "type": "LINK",
+                "enable": false
+              },
+              {
+                "id": "006017",
+                "name": "权限设置",
+                "url": "privilegeEdit",
+                "type": "LINK",
+                "enable": false
+              }
+            ],
+            "ranges": []
+          }
+        ]
+      },
+      {
+        "id": "007",
+        "name": "用户管理",
+        "url": "user",
+        "type": "MENU",
+        "parentId": "001",
+        "children": [
+          {
+            "id": "008",
+            "name": "用户列表",
+            "url": "UserManage",
+            "type": "MENU",
+            "parentId": "007",
+            "querys": [
+              {
+                "id": "008001",
+                "name": "姓名",
+                "url": "userName",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "008002",
+                "name": "登录名",
+                "url": "loginName",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "008003",
+                "name": "角色",
+                "url": "roleCode",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "008004",
+                "name": "学校",
+                "url": "schoolId",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "008005",
+                "name": "合作方",
+                "url": "customerId",
+                "type": "QUERY",
+                "enable": false
+              },
+              {
+                "id": "008006",
+                "name": "状态",
+                "url": "status",
+                "type": "QUERY",
+                "enable": false
+              }
+            ],
+            "buttons": [
+              {
+                "id": "008007",
+                "name": "查询",
+                "url": "search",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "008008",
+                "name": "新增",
+                "url": "create",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "008009",
+                "name": "批量导入",
+                "url": "batImport",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "008010",
+                "name": "批量导出",
+                "url": "batExport",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "008011",
+                "name": "批量设置权限",
+                "url": "batSetPrivilege",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "008012",
+                "name": "批量重置密码",
+                "url": "batResetPwd",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "008013",
+                "name": "批量禁用",
+                "url": "batDisable",
+                "type": "BUTTON",
+                "enable": false
+              },
+              {
+                "id": "008014",
+                "name": "批量启用",
+                "url": "batEnable",
+                "type": "BUTTON",
+                "enable": false
+              }
+            ],
+            "columns": [
+              {
+                "id": "008015",
+                "name": "姓名",
+                "url": "userName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "008016",
+                "name": "登录名",
+                "url": "loginName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "008017",
+                "name": "角色",
+                "url": "roleCode",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "008018",
+                "name": "学校",
+                "url": "schoolName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "008019",
+                "name": "合作方",
+                "url": "customerName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "008020",
+                "name": "状态",
+                "url": "status",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "008021",
+                "name": "更新时间",
+                "url": "updateTime",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "008022",
+                "name": "执行人",
+                "url": "actionerName",
+                "type": "COLUMN",
+                "enable": false
+              },
+              {
+                "id": "008023",
+                "name": "操作",
+                "url": "action",
+                "type": "COLUMN",
+                "enable": false
+              }
+            ],
+            "links": [
+              {
+                "id": "008024",
+                "name": "修改",
+                "url": "edit",
+                "type": "LINK",
+                "enable": false
+              },
+              {
+                "id": "008025",
+                "name": "启用/禁用",
+                "url": "enable",
+                "type": "LINK",
+                "enable": false
+              },
+              {
+                "id": "008026",
+                "name": "重置密码",
+                "url": "resetPwd",
+                "type": "LINK",
+                "enable": false
+              },
+              {
+                "id": "008027",
+                "name": "权限设置",
+                "url": "privilegeEdit",
+                "type": "LINK",
+                "enable": false
+              }
+            ],
+            "ranges": []
+          }
+        ]
+      },
+      {
+        "id": "009",
+        "name": "单元管理",
+        "url": "unit",
+        "type": "MENU",
+        "parentId": "001",
+        "children": [
+          {
+            "id": "010",
+            "name": "课程单元",
+            "url": "CourseUnit",
+            "type": "MENU",
+            "parentId": "009"
+          },
+          {
+            "id": "011",
+            "name": "机构单元",
+            "url": "OrgUnit",
+            "type": "MENU",
+            "parentId": "009",
+            "children": [
+              {
+                "id": "012",
+                "name": "子机构页面",
+                "url": "SubOrgUnit",
+                "type": "MENU",
+                "parentId": "011"
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  },
+  {
+    "id": "013",
+    "name": "资源管理",
+    "url": "source",
+    "type": "MENU",
+    "parentId": null,
+    "children": [
+      {
+        "id": "014",
+        "name": "学生管理",
+        "url": "student",
+        "type": "MENU",
+        "parentId": "013",
+        "children": [
+          {
+            "id": "015",
+            "name": "学生列表",
+            "url": "StudentManage",
+            "type": "MENU",
+            "parentId": "014"
+          },
+          {
+            "id": "016",
+            "name": "考生列表",
+            "url": "ExamStudentManage",
+            "type": "MENU",
+            "parentId": "014"
+          }
+        ]
+      },
+      {
+        "id": "017",
+        "name": "试卷管理",
+        "url": "paper",
+        "type": "MENU",
+        "children": [
+          {
+            "id": "018",
+            "name": "试卷列表",
+            "url": "PaperManage",
+            "type": "MENU",
+            "parentId": "017"
+          }
+        ]
+      },
+      {
+        "id": "019",
+        "name": "模板管理",
+        "url": "template",
+        "type": "MENU",
+        "children": [
+          {
+            "id": "020",
+            "name": "通用模板",
+            "url": "CommonTemplate",
+            "type": "MENU",
+            "parentId": "019"
+          },
+          {
+            "id": "021",
+            "name": "自定义模板",
+            "url": "CustomTemplate",
+            "type": "MENU",
+            "parentId": "019"
+          }
+        ]
+      }
+    ]
+  },
+  {
+    "id": "022",
+    "name": "进程管理",
+    "url": "process",
+    "type": "MENU",
+    "parentId": null,
+    "children": [
+      {
+        "id": "023",
+        "name": "任务管理",
+        "url": "task",
+        "type": "MENU",
+        "parentId": "022",
+        "children": [
+          {
+            "id": "024",
+            "name": "任务列表",
+            "url": "TaskManage",
+            "type": "MENU",
+            "parentId": "023",
+            "children": [
+              {
+                "id": "025",
+                "name": "规则详情",
+                "url": "RuleDetail",
+                "type": "MENU",
+                "parentId": "024"
+              }
+            ]
+          },
+          {
+            "id": "026",
+            "name": "任务详情",
+            "url": "TaskDetail",
+            "type": "MENU",
+            "parentId": "023",
+            "children": [
+              {
+                "id": "027",
+                "name": "任务清单",
+                "url": "TaskList",
+                "type": "MENU",
+                "parentId": "026"
+              },
+              {
+                "id": "028",
+                "name": "日志记录",
+                "url": "TaskLog",
+                "type": "MENU",
+                "parentId": "026"
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "id": "029",
+        "name": "验证管理",
+        "url": "check",
+        "type": "MENU",
+        "parentId": "022",
+        "children": [
+          {
+            "id": "030",
+            "name": "验证总览",
+            "url": "CheckOverview",
+            "type": "MENU",
+            "parentId": "029",
+            "children": [
+              {
+                "id": "031",
+                "name": "数据验证",
+                "url": "DataCheck",
+                "type": "MENU",
+                "parentId": "030"
+              },
+              {
+                "id": "032",
+                "name": "机构进度详情",
+                "url": "OrgProcessDetail",
+                "type": "MENU",
+                "parentId": "030"
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "id": "033",
+        "name": "邮寄管理",
+        "url": "mail",
+        "type": "MENU",
+        "parentId": "022",
+        "children": [
+          {
+            "id": "034",
+            "name": "箱贴目录",
+            "url": "MailManage",
+            "type": "MENU",
+            "parentId": "033"
+          }
+        ]
+      }
+    ]
+  }
+]

+ 288 - 0
src/modules/base/components/privilege/privilege.json

@@ -0,0 +1,288 @@
+[
+  {
+    "id": "001",
+    "name": "基础管理",
+    "url": "base",
+    "selected": true,
+    "parentId": null
+  },
+  {
+    "id": "002",
+    "name": "机构管理",
+    "url": "org",
+    "selected": true,
+    "parentId": "001"
+  },
+  {
+    "id": "003",
+    "name": "学校列表",
+    "url": "RightManage",
+    "selected": true,
+    "parentId": "002",
+    "pageSet": {
+      "query": {
+        "schoolCode": "none",
+        "schoolName": "none",
+        "status": "none"
+      },
+      "button": {
+        "search": "valid",
+        "create": "valid",
+        "batDisable": "valid",
+        "batEnable": "valid"
+      },
+      "columns": {
+        "schoolCode": "show",
+        "schoolName": "show",
+        "status": "show",
+        "comment": "show",
+        "action": "show"
+      },
+      "rowAction": {
+        "edit": "valid",
+        "enable": "valid"
+      }
+    }
+  },
+  {
+    "id": "004",
+    "name": "合作方列表",
+    "url": "CustomerManage",
+    "selected": true,
+    "parentId": "002",
+    "pageSet": {
+      "query": {
+        "customerCode": "none",
+        "customerName": "none",
+        "status": "dataRange"
+      },
+      "button": {
+        "search": "valid",
+        "create": "valid",
+        "batDisable": "valid",
+        "batEnable": "valid"
+      },
+      "columns": {
+        "customerCode": "show",
+        "customerName": "show",
+        "status": "show",
+        "comment": "show",
+        "action": "show"
+      },
+      "rowAction": {
+        "edit": "valid",
+        "enable": "valid"
+      }
+    }
+  },
+  {
+    "id": "005",
+    "name": "角色管理",
+    "url": "role",
+    "selected": true,
+    "parentId": "001"
+  },
+  {
+    "id": "006",
+    "name": "角色列表",
+    "url": "RoleManage",
+    "selected": true,
+    "parentId": "005"
+  },
+  {
+    "id": "007",
+    "name": "用户管理",
+    "url": "user",
+    "selected": true,
+    "parentId": "001"
+  },
+  {
+    "id": "008",
+    "name": "角色列表",
+    "url": "UserManage",
+    "selected": true,
+    "parentId": "007"
+  },
+  {
+    "id": "009",
+    "name": "单元管理",
+    "url": "unit",
+    "selected": true,
+    "parentId": "001"
+  },
+  {
+    "id": "010",
+    "name": "课程单元",
+    "url": "CourseUnit",
+    "selected": true,
+    "parentId": "009"
+  },
+  {
+    "id": "011",
+    "name": "机构单元",
+    "url": "OrgUnit",
+    "selected": true,
+    "parentId": "009"
+  },
+  {
+    "id": "101",
+    "name": "子机构页面",
+    "url": "SubOrgUnit",
+    "selected": true,
+    "parentId": "011"
+  },
+  {
+    "id": "012",
+    "name": "资源管理",
+    "url": "source",
+    "selected": true,
+    "parentId": null
+  },
+  {
+    "id": "013",
+    "name": "学生管理",
+    "url": "student",
+    "selected": true,
+    "parentId": "012"
+  },
+  {
+    "id": "014",
+    "name": "学生列表",
+    "url": "StudentManage",
+    "selected": true,
+    "parentId": "013"
+  },
+  {
+    "id": "015",
+    "name": "考生列表",
+    "url": "ExamStudentManage",
+    "selected": true,
+    "parentId": "013"
+  },
+  {
+    "id": "016",
+    "name": "试卷管理",
+    "url": "paper",
+    "selected": true,
+    "parentId": "012"
+  },
+  {
+    "id": "017",
+    "name": "试卷列表",
+    "url": "PaperManage",
+    "selected": true,
+    "parentId": "016"
+  },
+  {
+    "id": "018",
+    "name": "模板管理",
+    "url": "template",
+    "selected": true,
+    "parentId": "012"
+  },
+  {
+    "id": "019",
+    "name": "通用模板",
+    "url": "CommonTemplate",
+    "selected": true,
+    "parentId": "018"
+  },
+  {
+    "id": "020",
+    "name": "自定义模板",
+    "url": "CustomTemplate",
+    "selected": true,
+    "parentId": "018"
+  },
+  {
+    "id": "021",
+    "name": "进程管理",
+    "url": "process",
+    "selected": true,
+    "parentId": null
+  },
+  {
+    "id": "022",
+    "name": "任务管理",
+    "url": "task",
+    "selected": true,
+    "parentId": "021"
+  },
+  {
+    "id": "023",
+    "name": "任务列表",
+    "url": "TaskManage",
+    "selected": true,
+    "parentId": "022"
+  },
+  {
+    "id": "102",
+    "name": "规则详情",
+    "url": "RuleDetail",
+    "selected": true,
+    "parentId": "023"
+  },
+  {
+    "id": "024",
+    "name": "任务详情",
+    "url": "TaskDetail",
+    "selected": true,
+    "parentId": "022"
+  },
+  {
+    "id": "103",
+    "name": "任务清单",
+    "url": "TaskList",
+    "selected": true,
+    "parentId": "024"
+  },
+  {
+    "id": "104",
+    "name": "日志记录",
+    "url": "TaskLog",
+    "selected": true,
+    "parentId": "024"
+  },
+  {
+    "id": "025",
+    "name": "验证管理",
+    "url": "check",
+    "selected": true,
+    "parentId": "021"
+  },
+  {
+    "id": "026",
+    "name": "验证总览",
+    "url": "CheckOverview",
+    "selected": true,
+    "parentId": "025"
+  },
+  {
+    "id": "105",
+    "name": "数据验证",
+    "url": "DataCheck",
+    "selected": true,
+    "parentId": "026"
+  },
+  {
+    "id": "106",
+    "name": "机构进度详情",
+    "url": "OrgProcessDetail",
+    "selected": true,
+    "parentId": "026"
+  },
+  {
+    "id": "027",
+    "name": "邮寄管理",
+    "url": "mail",
+    "selected": true,
+    "parentId": "021"
+  },
+  {
+    "id": "028",
+    "name": "箱贴目录",
+    "url": "MailManage",
+    "selected": true,
+    "parentId": "027"
+  }
+]

+ 12 - 9
src/modules/base/views/CourseManage.vue

@@ -24,13 +24,13 @@
           >
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="所属教研室:">
+        <!-- <el-form-item label="所属教研室:">
           <staff-room-select
             style="width: 142px;"
             v-model.trim="filter.staffRoomId"
             clearable
           ></staff-room-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" @click="toPage(1)"
             >查询</el-button
@@ -62,10 +62,13 @@
     </div>
     <div class="part-box">
       <el-table ref="TableList" :data="courses" border stripe>
-        <el-table-column prop="name" label="课程名称"></el-table-column>
-        <el-table-column prop="code" label="课程编码"></el-table-column>
-        <el-table-column prop="staffRoom" label="所属教研室"></el-table-column>
-        <el-table-column prop="code" label="授课班级"></el-table-column>
+        <el-table-column prop="courseName" label="课程名称"></el-table-column>
+        <el-table-column prop="courseCode" label="课程编码"></el-table-column>
+        <el-table-column
+          prop="teachingRoomName"
+          label="所属教研室"
+        ></el-table-column>
+        <el-table-column prop="clazz" label="授课班级"></el-table-column>
         <el-table-column prop="createTime" label="创建日期">
           <span slot-scope="scope">{{
             scope.row.createTime | timestampFilter
@@ -112,7 +115,7 @@
 </template>
 
 <script>
-import { courseListPage, deleteCourse } from "../api";
+import { courseQuery, deleteCourse } from "../api";
 import pickerOptions from "@/constants/datePickerOptions";
 import ModifyCourse from "../components/ModifyCourse";
 import UploadButton from "../../../components/UploadButton";
@@ -134,7 +137,7 @@ export default {
       total: 0,
       courses: [],
       // import
-      uploadUrl: "/api/admin/basic/course/import",
+      uploadUrl: "/api/admin/basic/course/data_import",
       downloadUrl: "/temps/课程导入模板.xlsx",
       dfilename: "课程导入模板.xlsx",
       // date-picker
@@ -156,7 +159,7 @@ export default {
         datas.startTime = this.createTime[0];
         datas.endTime = this.createTime[1];
       }
-      const data = await courseListPage(datas);
+      const data = await courseQuery(datas);
       this.courses = data.records;
       this.total = data.total;
     },

+ 3 - 0
src/modules/base/views/OrganizationManage.vue

@@ -20,6 +20,9 @@
             ></el-button>
           </span>
           <span v-else>
+            <el-button type="text">{{
+              data.orgType | orgTypeFilter
+            }}</el-button>
             <el-button
               class="btn-table-icon"
               type="text"

+ 0 - 102
src/modules/base/views/PrintRoomManage.vue

@@ -1,102 +0,0 @@
-<template>
-  <div class="print-room-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <div></div>
-      <div class="part-box-action">
-        <el-button
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >新增印刷室</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box">
-      <el-table ref="TableList" :data="dataList" border stripe>
-        <el-table-column prop="name" label="印刷室名称"></el-table-column>
-        <el-table-column prop="code" label="印刷室编码"></el-table-column>
-        <el-table-column prop="campus" label="所属校区"></el-table-column>
-        <el-table-column label="操作" align="center" width="120px">
-          <template slot-scope="scope">
-            <el-button
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-edit"
-              @click="toEdit(scope.row)"
-              title="编辑"
-            ></el-button>
-            <el-button
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-delete"
-              @click="toDelete(scope.row)"
-              title="删除"
-            ></el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <modify-print-room
-      :instance="curRow"
-      @modified="getList"
-      ref="ModifyPrintRoom"
-    ></modify-print-room>
-  </div>
-</template>
-
-<script>
-import { printRoomQuery, deletePrintRoom } from "../api";
-import ModifyPrintRoom from "../components/ModifyPrintRoom";
-
-export default {
-  name: "print-room-manage",
-  components: { ModifyPrintRoom },
-  data() {
-    return {
-      dataList: [],
-      curRow: {}
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    async getList() {
-      this.dataList = await printRoomQuery();
-    },
-    toAdd() {
-      this.curRow = {};
-      this.$refs.ModifyPrintRoom.open();
-    },
-    toEdit(row) {
-      this.curRow = row;
-      this.$refs.ModifyPrintRoom.open();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除印刷室【${row.name}】吗?`, "提示", {
-        cancelButtonClass: "el-button--danger is-plain",
-        confirmButtonClass: "el-button--primary",
-        type: "warning"
-      })
-        .then(async () => {
-          await deletePrintRoom(row.id);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 2 - 2
src/modules/base/views/RoleManage.vue

@@ -10,7 +10,7 @@
             clearable
           ></el-input>
         </el-form-item>
-        <el-form-item label="启用/禁用:" label-width="90px">
+        <!-- <el-form-item label="启用/禁用:" label-width="90px">
           <el-select
             v-model="filter.enable"
             style="width: 100px;"
@@ -24,7 +24,7 @@
               :label="val"
             ></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" @click="toPage(1)"
             >查询</el-button

+ 0 - 101
src/modules/base/views/StaffRoomManage.vue

@@ -1,101 +0,0 @@
-<template>
-  <div class="staff-room-manage">
-    <div class="part-box part-box-filter part-box-flex">
-      <div></div>
-      <div class="part-box-action">
-        <el-button
-          type="primary"
-          icon="el-icon-circle-plus-outline"
-          @click="toAdd"
-          >新增教研室</el-button
-        >
-      </div>
-    </div>
-    <div class="part-box">
-      <el-table ref="TableList" :data="dataList" border stripe>
-        <el-table-column prop="name" label="教研室名称"></el-table-column>
-        <el-table-column prop="code" label="教研室编码"></el-table-column>
-        <el-table-column label="操作" align="center" width="120px">
-          <template slot-scope="scope">
-            <el-button
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-edit"
-              @click="toEdit(scope.row)"
-              title="编辑"
-            ></el-button>
-            <el-button
-              class="btn-table-icon"
-              type="text"
-              icon="icon icon-delete"
-              @click="toDelete(scope.row)"
-              title="删除"
-            ></el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="part-page">
-        <el-pagination
-          background
-          layout="total,prev, pager, next"
-          :current-page="current"
-          :total="total"
-          :page-size="size"
-          @current-change="toPage"
-        >
-        </el-pagination>
-      </div>
-    </div>
-
-    <modify-staff-room
-      :instance="curRow"
-      @modified="getList"
-      ref="ModifyStaffRoom"
-    ></modify-staff-room>
-  </div>
-</template>
-
-<script>
-import { staffRoomQuery, deleteStaffRoom } from "../api";
-import ModifyStaffRoom from "../components/ModifyStaffRoom";
-
-export default {
-  name: "staff-room-manage",
-  components: { ModifyStaffRoom },
-  data() {
-    return {
-      dataList: [],
-      curRow: {}
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    async getList() {
-      this.dataList = await staffRoomQuery();
-    },
-    toAdd() {
-      this.curRow = {};
-      this.$refs.ModifyStaffRoom.open();
-    },
-    toEdit(row) {
-      this.curRow = row;
-      this.$refs.ModifyStaffRoom.open();
-    },
-    toDelete(row) {
-      this.$confirm(`确定要删除教研室【${row.name}】吗?`, "提示", {
-        cancelButtonClass: "el-button--danger is-plain",
-        confirmButtonClass: "el-button--primary",
-        type: "warning"
-      })
-        .then(async () => {
-          await deleteStaffRoom(row.id);
-          this.$message.success("删除成功!");
-          this.deletePageLastItem();
-        })
-        .catch(() => {});
-    }
-  }
-};
-</script>

+ 5 - 5
src/modules/base/views/StudentManage.vue

@@ -41,13 +41,13 @@
     </div>
     <div class="part-box">
       <el-table ref="TableList" :data="dataList" border stripe>
-        <el-table-column prop="name" label="姓名"></el-table-column>
-        <el-table-column prop="studentNo" label="学号"></el-table-column>
-        <el-table-column prop="phone" label="手机号"></el-table-column>
-        <el-table-column prop="campus" label="校区"></el-table-column>
+        <el-table-column prop="studentName" label="姓名"></el-table-column>
+        <el-table-column prop="studentCode" label="学号"></el-table-column>
+        <el-table-column prop="phoneNumber" label="手机号"></el-table-column>
+        <el-table-column prop="campusName" label="校区"></el-table-column>
         <el-table-column prop="college" label="学院"></el-table-column>
         <el-table-column prop="subject" label="专业"></el-table-column>
-        <el-table-column prop="className" label="班级"></el-table-column>
+        <el-table-column prop="clazz" label="班级"></el-table-column>
         <el-table-column prop="status" label="状态"></el-table-column>
         <el-table-column label="操作" align="center" width="120px">
           <template slot-scope="scope">

+ 9 - 7
src/modules/base/views/UserManage.vue

@@ -55,6 +55,12 @@
           @click="toAdd"
           >新增用户</el-button
         >
+        <el-button
+          type="primary"
+          icon="el-icon-circle-plus-outline"
+          @click="toExport"
+          >批量导入</el-button
+        >
       </div>
     </div>
 
@@ -85,11 +91,6 @@
             {{ scope.row.roles | rolesFilter }}
           </template>
         </el-table-column>
-        <!-- <el-table-column prop="courses" label="课程名称(编码)">
-          <template slot-scope="scope">
-            {{ scope.row.courses | coursesFilter }}
-          </template>
-        </el-table-column> -->
         <el-table-column prop="enable" label="状态" width="100">
           <template slot-scope="scope">
             {{ scope.row.enable | enableFilter }}
@@ -266,13 +267,14 @@ export default {
       // const userId = this.$ls.get("user", { id: "" }).id;
       // if (row.id !== userId) return;
       // this.toLogout();
-    }
+    },
     // async toLogout() {
     //   await logout();
     //   this.$ls.clear();
     //   this.$router.push({ name: "Login" });
     //   this.$message.info("您的密码已经变更,请重新登录系统!");
-    // }
+    // },
+    toExport() {}
   }
 };
 </script>

+ 1 - 13
src/modules/login/views/Login.vue

@@ -72,15 +72,8 @@
 
 <script>
 import { password, smscode } from "@/plugins/formRules";
-import {
-  login,
-  getSmsCode,
-  getSchoolInfo,
-  getSysConfig,
-  getSysTime
-} from "../api";
+import { login, getSmsCode, getSchoolInfo, getSysConfig } from "../api";
 import { Base64 } from "@/plugins/crypto";
-import { initSyncTime } from "@/plugins/syncServerTime";
 import ResetPwd from "@/modules/base/components/ResetPwd";
 import { ORG_CODE } from "@/constants/app";
 
@@ -148,13 +141,8 @@ export default {
     this.setWaitingTime();
     this.getSchool();
     this.getSmsCodeRequired();
-    this.syncServerTime();
   },
   methods: {
-    async syncServerTime() {
-      const time = await getSysTime();
-      initSyncTime(time);
-    },
     async getSmsCodeRequired() {
       const data = await getSysConfig("sys.code.enable");
       this.smsCodeRequired = data.configValue === "true";

+ 5 - 1
src/plugins/filters.js

@@ -8,7 +8,8 @@ import {
   PRINT_TASK_STATUS,
   DATA_TASK_STATUS,
   DATA_TASK_TYPE,
-  DATA_TASK_RESULT
+  DATA_TASK_RESULT,
+  ORG_TYPE
 } from "../constants/enumerate";
 import { formatDate } from "../plugins/utils";
 
@@ -56,6 +57,9 @@ Vue.filter("dataTaskStatusFilter", function(val) {
 Vue.filter("dataTaskResultFilter", function(val) {
   return DATA_TASK_RESULT[val] || DEFAULT_FIELD;
 });
+Vue.filter("orgTypeFilter", function(val) {
+  return ORG_TYPE[val] || DEFAULT_FIELD;
+});
 Vue.filter("timestampFilter", function(val) {
   return val ? formatDate("YYYY-MM-DD HH:mm:ss", new Date(val)) : DEFAULT_FIELD;
 });