Przeglądaj źródła

重构公共组件;角色过滤

Michael Wang 4 lat temu
rodzic
commit
4e28019085

+ 0 - 47
src/components/EcsFormSearch.vue

@@ -1,47 +0,0 @@
-<template>
-  <section class="content">
-    <!-- 表单 -->
-    <el-form
-      ref="resetEcsFormSearch"
-      :inline="!advanceSearch"
-      :model="model"
-      :advance-search="advanceSearch"
-      :label-position="labelPosition"
-      :label-width="advanceSearch ? labelWidth : 'auto'"
-    >
-      <slot />
-    </el-form>
-
-    <div
-      style="width: 100%; border-bottom: 1px solid #ddd; margin: 10px 0"
-    ></div>
-  </section>
-</template>
-<script>
-export default {
-  name: "EcsFormSearch",
-  props: {
-    model: { type: Object, default: () => {} },
-    advanceSearch: {
-      type: Boolean,
-      default: false,
-    },
-    labelPosition: {
-      type: String,
-      default: "left",
-    },
-    labelWidth: {
-      type: String,
-      default: "100px",
-    },
-  },
-  data() {
-    return {
-      // inline: true,
-      // formLabelWidth: ""
-    };
-  },
-};
-</script>
-
-<style scoped></style>

+ 1 - 1
src/components/LevelTypeSelect.vue

@@ -21,7 +21,7 @@
 <script>
 import { LEVEL_TYPE_SELECT } from "@/constants/constants";
 export default {
-  name: "ExamTypeSelect",
+  name: "LevelTypeSelect",
   props: {
     value: {
       type: String,

+ 1 - 3
src/main.js

@@ -4,6 +4,7 @@ import router from "./router";
 import store from "./store";
 // import "./registerServiceWorker";
 import "./components/registerComponents";
+import "./modules/basic/components/registerComponents";
 import "./plugins/element.js";
 import "./plugins/axios";
 import "./plugins/vueAwesome";
@@ -11,7 +12,6 @@ import "./directives/directives.js";
 import "./filters/filters.js";
 import "./styles/bootstrap.scss";
 import "./styles/global.css";
-import EcsFormSearch from "./components/EcsFormSearch";
 
 Vue.config.productionTip = process.env.NODE_ENV !== "production";
 
@@ -23,8 +23,6 @@ if (
   vueLifecylceLogs({});
 }
 
-Vue.component("EcsFormSearch", EcsFormSearch);
-
 Vue.prototype.$eventHub = new Vue();
 
 new Vue({

+ 92 - 0
src/modules/basic/components/RoleSelect.vue

@@ -0,0 +1,92 @@
+<template>
+  <el-select
+    v-model="selected"
+    class="size-select"
+    placeholder="请选择"
+    :style="styles"
+    remote
+    :remote-method="search"
+    clearable
+    :disabled="disabled"
+    :multiple="multiple"
+    @change="select"
+  >
+    <el-option
+      v-for="item in optionList"
+      :key="item.roleId"
+      :label="item.roleName"
+      :value="item.roleId"
+    >
+      <span>{{ item.roleName }}</span>
+    </el-option>
+  </el-select>
+</template>
+
+<script>
+import { CORE_API } from "@/constants/constants";
+export default {
+  name: "RoleSelect",
+  props: {
+    value: { type: [String, Number, Array], default: "" },
+    schoolId: { type: [String, Number], default: 0 },
+    styles: { type: String, default: "" },
+    disabled: { type: Boolean, default: false },
+    multiple: { type: Boolean, default: false },
+    enableSuper: { type: Boolean, default: false },
+  },
+  data() {
+    return {
+      optionList: [],
+      selected: "",
+    };
+  },
+  watch: {
+    value: {
+      immediate: true,
+      handler(val) {
+        this.selected = val;
+      },
+    },
+    schoolId() {
+      this.search();
+    },
+  },
+  async created() {
+    this.search();
+  },
+  methods: {
+    async search() {
+      const url =
+        CORE_API +
+        "/rolePrivilege/getRoles?includeSuperAdmin=" +
+        true +
+        "&rootOrgId=" +
+        this.schoolId;
+
+      const res = await this.$httpWithMsg.post(url);
+      const isSuperAdminOrOrgAdmin = this.$store.state.user.roleList.some(
+        (role) => role.roleCode == "SUPER_ADMIN" || role.roleCode == "ORG_ADMIN"
+      );
+      // console.log(isSuperAdminOrOrgAdmin);
+
+      this.optionList = res?.data;
+      if (!this.enableSuper) {
+        this.optionList = this.optionList.filter(
+          (item) => item.roleCode != "SUPER_ADMIN"
+        );
+      }
+      if (!isSuperAdminOrOrgAdmin) {
+        this.optionList = this.optionList.filter(
+          (item) => item.roleCode != "ORG_ADMIN"
+        );
+      }
+    },
+    select() {
+      this.$emit("input", this.selected);
+      this.$emit("change", this.selected, this.optionList);
+    },
+  },
+};
+</script>
+
+<style></style>

+ 74 - 0
src/modules/basic/components/SchoolSelectForRoot.vue

@@ -0,0 +1,74 @@
+<template>
+  <el-select
+    v-model="selected"
+    class="size-select"
+    placeholder="请选择"
+    :style="styles"
+    filterable
+    remote
+    :remote-method="search"
+    clearable
+    :disabled="disabled"
+    @change="select"
+  >
+    <el-option
+      v-for="item in optionList"
+      :key="item.id"
+      :label="item.name"
+      :value="item.id"
+    >
+      <span>{{ item.name }}</span>
+    </el-option>
+  </el-select>
+</template>
+
+<script>
+import { CORE_API } from "@/constants/constants";
+export default {
+  name: "SchoolSelectForRoot",
+  props: {
+    value: { type: [String, Number], default: "" },
+    styles: { type: String, default: "" },
+    disabled: { type: Boolean, default: false },
+  },
+  data() {
+    return {
+      optionList: [],
+      selected: "",
+    };
+  },
+  watch: {
+    value: {
+      immediate: true,
+      handler(val) {
+        this.selected = val;
+      },
+    },
+  },
+  async created() {
+    this.search();
+  },
+  methods: {
+    async search(query) {
+      const url1 = CORE_API + "/org/getRootOrgList";
+      const res = await this.$httpWithMsg.get(url1);
+      this.optionList = res?.data.map((v) => {
+        return { id: v.id, name: `${v.name}(${v.id})` };
+      });
+      const all = this.optionList;
+      if (query) {
+        this.optionList = this.optionList.filter((v) => v.name.includes(query));
+      } else {
+        this.optionList = all;
+      }
+      // console.log(res, this.optionList);
+    },
+    select() {
+      this.$emit("input", this.selected);
+      this.$emit("change", this.selected);
+    },
+  },
+};
+</script>
+
+<style></style>

+ 38 - 0
src/modules/basic/components/registerComponents.js

@@ -0,0 +1,38 @@
+import Vue from "vue";
+// import upperFirst from "lodash/upperFirst";
+// import camelCase from "lodash/camelCase";
+
+const requireComponent = require.context(
+  // The relative path of the components folder
+  "./",
+  // Whether or not to look in subfolders
+  false,
+  // The regular expression used to match base component filenames
+  /[A-Z]\w+\.(vue|js)$/
+);
+
+requireComponent.keys().forEach((fileName) => {
+  // Get component config
+  const componentConfig = requireComponent(fileName);
+
+  // Get PascalCase name of component
+  const componentName =
+    // upperFirst(
+    //   camelCase(
+    // Gets the file name regardless of folder depth
+    fileName
+      .split("/")
+      .pop()
+      .replace(/\.\w+$/, "");
+  //   )
+  // );
+
+  // Register component globally
+  Vue.component(
+    componentName,
+    // Look for the component options on `.default`, which will
+    // exist if the component was exported with `export default`,
+    // otherwise fall back to module's root.
+    componentConfig.default || componentConfig
+  );
+});

+ 73 - 256
src/modules/basic/view/user.vue

@@ -9,36 +9,19 @@
         <!-- 搜索 -->
         <el-form inline :model="searchForm">
           <el-form-item v-if="isSuperAdmin" label="学校">
-            <el-select
+            <SchoolSelectForRoot
               v-model="searchForm.rootOrgId"
-              placeholder="请选择"
-              :disabled="!isSuperAdmin"
               class="input_width"
-              filterable
-              @change="rootOrgChanged4Search"
-            >
-              <el-option
-                v-for="item in rootSchoolSelect"
-                :key="item.id"
-                :label="item.name"
-                :value="item.id"
-              />
-            </el-select>
+              @change="() => (searchForm.roleId = '')"
+            />
           </el-form-item>
           <el-form-item label="角色">
-            <el-select
+            <RoleSelect
               v-model="searchForm.roleId"
-              clearable
-              placeholder="请选择"
+              :school-id="searchForm.rootOrgId"
+              :enable-super="isSuperAdmin"
               class="input_width"
-            >
-              <el-option
-                v-for="item in roleList4Search"
-                :key="item.roleId"
-                :label="item.roleName"
-                :value="item.roleId"
-              />
-            </el-select>
+            />
           </el-form-item>
           <el-form-item label="登录名">
             <el-input
@@ -118,13 +101,13 @@
           type="danger"
           icon="el-icon-close"
           :disabled="noBatchSelected"
-          @click="disableByIds"
+          @click="disableUsers"
           >禁用
         </el-button>
 
         <div class="block-seperator"></div>
         <!-- 添加用户信息弹出框 -->
-        <el-dialog title="新增用户" width="450px" :visible.sync="addingDialog">
+        <el-dialog title="新增用户" width="520px" :visible.sync="addingDialog">
           <el-form
             ref="addingForm"
             :inline="true"
@@ -176,41 +159,22 @@
             </el-row>
             <el-row>
               <el-form-item v-if="isSuperAdmin" label="学校" prop="rootOrgId">
-                <el-select
-                  v-model="userForm.rootOrgId"
+                <SchoolSelectForRoot
+                  v-model="searchForm.rootOrgId"
                   class="input_width_lg"
-                  placeholder="请选择"
-                  :disabled="!isSuperAdmin"
-                  filterable
-                  @change="rootOrgChanged4InsertOrUpdate"
-                >
-                  <el-option
-                    v-for="item in rootSchoolSelect"
-                    :key="item.id"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
+                  @change="() => (userForm.roleIds = '')"
+                />
               </el-form-item>
             </el-row>
             <el-row>
               <el-form-item label="角色" prop="roleIds">
-                <el-select
+                <RoleSelect
                   v-model="userForm.roleIds"
-                  class="input_width_lg"
+                  :school-id="searchForm.rootOrgId"
                   multiple
-                  placeholder="请选择"
-                  @change="rolesChanged"
-                >
-                  <el-option
-                    v-for="item in roleList4InsertOrUpdateWithoutSuperAdmin"
-                    :key="item.roleId"
-                    :label="item.roleName"
-                    :value="item.roleId"
-                  >
-                  </el-option>
-                </el-select>
+                  class="input_width_lg"
+                  @change="selectRoleChanged"
+                />
               </el-form-item>
             </el-row>
             <el-row>
@@ -252,7 +216,7 @@
         </el-dialog>
 
         <!-- 修改用户信息弹出框 -->
-        <el-dialog title="编辑用户" width="450px" :visible.sync="updateDialog">
+        <el-dialog title="编辑用户" width="520px" :visible.sync="updateDialog">
           <el-form
             ref="updateForm"
             :inline="true"
@@ -303,41 +267,22 @@
             </el-row>
             <el-row>
               <el-form-item v-if="isSuperAdmin" label="学校" prop="rootOrgId">
-                <el-select
-                  v-model="userForm.rootOrgId"
+                <SchoolSelectForRoot
+                  v-model="searchForm.rootOrgId"
                   class="input_width_lg"
-                  placeholder="请选择"
-                  :disabled="true"
-                >
-                  <el-option
-                    v-for="item in rootSchoolSelect"
-                    :key="item.id"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
+                  @change="() => (userForm.roleIds = '')"
+                />
               </el-form-item>
             </el-row>
             <el-row>
               <el-form-item label="角色" prop="roleIds">
-                <el-select
+                <RoleSelect
                   v-model="userForm.roleIds"
-                  class="input_width_lg"
+                  :school-id="searchForm.rootOrgId"
                   multiple
-                  placeholder="请选择"
-                  :disabled="rowIsSuperAdmin"
-                  @change="rolesChanged"
-                >
-                  <el-option
-                    v-for="item in roleList4InsertOrUpdate"
-                    :key="item.roleId"
-                    :label="item.roleName"
-                    :disabled="item.roleCode == 'SUPER_ADMIN'"
-                    :value="item.roleId"
-                  >
-                  </el-option>
-                </el-select>
+                  class="input_width_lg"
+                  @change="selectRoleChanged"
+                />
               </el-form-item>
             </el-row>
             <el-row>
@@ -397,7 +342,6 @@
           <el-table-column prop="name" width="120" label="姓名" />
           <el-table-column prop="loginName" width="100" label="登录名" />
           <el-table-column prop="rootOrgName" label="学校" />
-          <!-- <el-table-column prop="roleNamesStr" width="110" label="角色" /> -->
           <el-table-column width="120" label="角色">
             <span
               slot-scope="scope"
@@ -452,7 +396,7 @@
                 size="mini"
                 type="danger"
                 icon="el-icon-close"
-                @click="disableById(scope.row)"
+                @click="disableTheUser(scope.row)"
               >
                 禁用
               </el-button>
@@ -548,22 +492,13 @@ export default {
         callback();
       }
     };
-    var validateRoles = (rule, value, callback) => {
-      if (value.length == 0) {
-        callback(new Error("请选择角色"));
-      } else {
-        callback();
-      }
-    };
     return {
       rolePrivileges: {
         user_data_rule_setting: false,
       },
       loading: false,
       orgLoading4InsertOrUpdate: false,
-      roleList4Search: [],
       roleList4InsertOrUpdate: [],
-      rootOrgList: [],
       orgList4InsertOrUpdate: [],
       searchForm: {
         name: "",
@@ -618,24 +553,23 @@ export default {
             trigger: "blur",
           },
         ],
-        phoneNumber: [
-          // {
-          //   message: "请输入联系方式",
-          //   trigger: "blur"
-          // }
-        ],
         rootOrgId: [
           {
             validator: validateRootOrg,
             trigger: "blur",
           },
         ],
-        orgId: [],
+        orgId: [
+          {
+            required: "", // changed by role
+            message: "学习中心用户必须选择子机构",
+          },
+        ],
         roleIds: [
           {
             required: true,
-            validator: validateRoles,
-            trigger: ["blur", "change"],
+            message: "请选择角色",
+            trigger: "blur",
           },
         ],
       },
@@ -659,36 +593,20 @@ export default {
     noBatchSelected() {
       return this.selectedUserIds.length === 0;
     },
-    roleList4InsertOrUpdateWithoutSuperAdmin() {
-      // console.log(
-      //   this.isSuperAdminOrOrgAdmin,
-      //   this.roleList4InsertOrUpdate.map((v) => v.roleCode)
-      // );
-      return this.roleList4InsertOrUpdate
-        .filter((item) => item.roleCode != "SUPER_ADMIN")
-        .filter(
-          (item) => !this.isSuperAdminOrOrgAdmin && item.roleCode != "ORG_ADMIN"
-        );
-    },
     isSuperAdmin() {
       return this.user.roleList.some((role) => role.roleCode == "SUPER_ADMIN");
     },
+    isOrgAdminNotSuperAdmin() {
+      return (
+        this.user.roleList.some((role) => role.roleCode == "ORG_ADMIN") &&
+        !this.user.roleList.some((role) => role.roleCode == "SUPER_ADMIN")
+      );
+    },
     isSuperAdminOrOrgAdmin() {
       return this.user.roleList.some(
         (role) => role.roleCode == "SUPER_ADMIN" || role.roleCode == "ORG_ADMIN"
       );
     },
-    rootSchoolSelect() {
-      let rootSchools = [];
-      for (let i = 0; i < this.rootOrgList.length; i++) {
-        let info = {
-          name: this.rootOrgList[i].name + "(" + this.rootOrgList[i].id + ")",
-          id: this.rootOrgList[i].id,
-        };
-        rootSchools.push(info);
-      }
-      return rootSchools;
-    },
   },
   //初始化查询
   created() {
@@ -696,6 +614,14 @@ export default {
     this.init();
   },
   methods: {
+    selectRoleChanged(selectRoles, roleList) {
+      const isLCUser = selectRoles.includes(
+        roleList.filter((v) => v.roleCode === "LC_USER").map((v) => v.roleId)[0]
+      );
+      this.rules.orgId[0].required = isLCUser;
+      this.$refs.addingForm && this.$refs.addingForm.validateField("orgId");
+      this.$refs.updateForm && this.$refs.updateForm.validateField("orgId");
+    },
     resetEcsFormSearch() {
       this.searchForm = Object.assign(this.searchForm, {
         roleId: "",
@@ -709,71 +635,6 @@ export default {
       this.pageSize = val;
       this.search();
     },
-    validateOrg(rule, value, callback) {
-      if (0 != value && !value) {
-        callback(new Error("请选择子机构"));
-      } else {
-        callback();
-      }
-    },
-    rolesChanged() {
-      var isLC = false;
-      for (let cur of this.roleList4InsertOrUpdate) {
-        if (
-          cur.roleCode == "LC_USER" &&
-          this.userForm.roleIds.includes(cur.roleId)
-        ) {
-          isLC = true;
-          break;
-        }
-      }
-      console.log("rolesChanged(); isLC:", isLC);
-      if (isLC) {
-        this.rules.orgId = [
-          {
-            validator: this.validateOrg,
-            trigger: ["blur", "change"],
-          },
-        ];
-      } else {
-        this.rules.orgId = [];
-        if (this.updateDialog) {
-          this.$refs.updateForm && this.$refs.updateForm.clearValidate("orgId");
-        } else if (this.addingDialog) {
-          this.$refs.addingForm && this.$refs.addingForm.clearValidate("orgId");
-        }
-      }
-      if (this.updateDialog) {
-        this.$refs.updateForm && this.$refs.updateForm.validateField("orgId");
-      } else if (this.addingDialog) {
-        this.$refs.addingForm && this.$refs.addingForm.validateField("orgId");
-      }
-    },
-    rootOrgChanged4Search() {
-      var url =
-        CORE_API +
-        "/rolePrivilege/getRoles?includeSuperAdmin=" +
-        true +
-        "&rootOrgId=" +
-        this.searchForm.rootOrgId;
-      this.$httpWithMsg.post(url).then((response) => {
-        this.roleList4Search = response.data;
-      });
-    },
-    rootOrgChanged4InsertOrUpdate() {
-      this.orgList4InsertOrUpdate = [];
-
-      var url =
-        CORE_API +
-        "/rolePrivilege/getRoles?includeSuperAdmin=" +
-        true +
-        "&rootOrgId=" +
-        this.userForm.rootOrgId;
-      this.$httpWithMsg.post(url).then((response) => {
-        this.roleList4InsertOrUpdate = response.data;
-        this.rolesChanged();
-      });
-    },
     getOrgList4InsertOrUpdate(query) {
       this.orgLoading4InsertOrUpdate = true;
       var url =
@@ -793,22 +654,6 @@ export default {
           this.orgLoading4InsertOrUpdate = false;
         });
     },
-    getTag(status) {
-      if (status == true) {
-        return "success";
-      } else if (status == false) {
-        return "danger";
-      }
-      return status;
-    },
-    getLevel(level) {
-      if (level == "ZSB") {
-        return "专升本";
-      } else if (level == "GQZ") {
-        return "高起专";
-      }
-      return level;
-    },
     handleSearchBtn() {
       this.currentPage = 1;
       this.search();
@@ -821,6 +666,11 @@ export default {
         }
       }, 500);
       var param = new URLSearchParams(this.searchForm);
+      if (!this.isSuperAdminOrOrgAdmin)
+        param.append("ignoreRoleCodes", "SUPER_ADMIN,ORG_ADMIN");
+      else if (this.isOrgAdminNotSuperAdmin) {
+        param.append("ignoreRoleCodes", "SUPER_ADMIN");
+      }
       var url =
         CORE_API +
         "/user/all/" +
@@ -854,11 +704,14 @@ export default {
     },
     //新增
     openAddingDialog() {
+      this.rules.orgId[0].required = false;
       if (this.$refs.addingForm) {
         this.$refs.addingForm.resetFields();
+        this.$refs.addingForm.clearValidate();
       }
       if (this.$refs.updateForm) {
         this.$refs.updateForm.resetFields();
+        this.$refs.updateForm.clearValidate();
       }
       this.addingDialog = true;
       this.userForm.name = "";
@@ -869,10 +722,10 @@ export default {
       this.userForm.orgId = null;
       this.enableStr = "true";
       this.orgList4InsertOrUpdate = [];
-      this.rolesChanged();
     },
     //修改
     openUpdateDialog(row) {
+      this.rules.orgId[0].required = row.roleCodes.includes("LC_USER");
       if (this.$refs.updateForm) {
         this.$refs.updateForm.resetFields();
       }
@@ -897,14 +750,9 @@ export default {
         }
       }
 
-      this.rootOrgChanged4InsertOrUpdate();
       this.orgList4InsertOrUpdate = [{ id: row.orgId, name: row.orgName }];
       this.userForm.orgId = row.orgId;
     },
-    exportUser() {
-      var param = new URLSearchParams(this.searchForm);
-      window.open(CORE_API + "/user/export?" + param);
-    },
     //保存
     add() {
       var url = CORE_API + "/user";
@@ -1043,38 +891,27 @@ export default {
         });
       });
     },
-    //禁用
-    disableByIds() {
+    disableUsers() {
       if (this.selectedUserIds.length === 0) {
         this.$notify({
           type: "warning",
           message: "请选择要禁用的用户",
         });
       } else {
-        this.$confirm("是否禁用这些用户?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "error",
-        }).then(() => {
-          var url = CORE_API + "/user/disable/" + this.userIds;
-          this.$httpWithMsg.put(url, {}).then(() => {
-            this.$notify({
-              type: "success",
-              message: "禁用成功!",
-            });
-            this.search();
-          });
-        });
+        this.disableByIds(this.userIds);
       }
     },
+    disableTheUser(user) {
+      this.disableByIds(user.id);
+    },
     //禁用
-    disableById(row) {
-      this.$confirm("是否禁用该用户?", "提示", {
+    disableByIds(ids) {
+      this.$confirm("是否禁用用户?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "error",
       }).then(() => {
-        var url = CORE_API + "/user/disable/" + row.id;
+        var url = CORE_API + "/user/disable/" + ids;
         this.$httpWithMsg.put(url, {}).then(() => {
           this.$notify({
             type: "success",
@@ -1089,21 +926,7 @@ export default {
       this.searchForm.rootOrgId = this.user.rootOrgId;
       this.userForm.rootOrgId = this.user.rootOrgId;
 
-      var url1 = CORE_API + "/org/getRootOrgList";
-      var url2 =
-        CORE_API +
-        "/rolePrivilege/getRoles?includeSuperAdmin=true&rootOrgId=" +
-        this.user.rootOrgId;
-
-      Promise.all([
-        this.$httpWithMsg.get(url1),
-        this.$httpWithMsg.post(url2),
-      ]).then(([resp1, resp2]) => {
-        this.rootOrgList = resp1.data;
-        this.roleList4Search = resp2.data;
-        this.roleList4InsertOrUpdate = resp2.data;
-        this.search();
-      });
+      this.search();
     },
     initPrivileges() {
       let params = new URLSearchParams();
@@ -1121,17 +944,11 @@ export default {
         return false;
       }
 
-      let roleCodes = row.roleCodes;
-      // console.log(JSON.stringify(roleCodes));
-
-      for (let n = 0; n < roleCodes.length; n++) {
-        let roleCode = roleCodes[n];
-        if (roleCode == "SUPER_ADMIN" || roleCode == "ORG_ADMIN") {
-          return false;
-        }
-      }
+      const isSuperOrOrgAdmin = row.roleCodes.includes((v) =>
+        ["SUPER_ADMIN", "ORG_ADMIN"].includes(v)
+      );
 
-      return true;
+      return !isSuperOrOrgAdmin;
     },
     copyPrevillegeDialog() {
       const refIds = this.$refs.table.selection;

+ 2 - 2
src/modules/portal/views/Login.vue

@@ -61,7 +61,7 @@
         <button class="login-btn" @click="login">登 录</button>
       </div>
       <footer class="login-footer">
-        Copyright &copy; 2019 <a href="javascript:void(0)">武汉启明软件</a>.
+        Copyright &copy; 2021 <a href="javascript:void(0)">武汉启明软件</a>.
       </footer>
     </main>
   </div>
@@ -111,7 +111,7 @@ export default {
   methods: {
     ...mapActions([USER_SIGNIN]),
     nameChange() {
-      this.dialogVisible = false;
+      // this.dialogVisible = false;
     },
     checkAccountValue() {
       this.errorInfo = "";