Browse Source

禅道问题修复

刘湘琪 2 years ago
parent
commit
d3be88c270

+ 136 - 136
src/views/enterprise/employee/index.vue

@@ -18,15 +18,15 @@
           style="width: 240px"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
-      <el-form-item label="手机号" prop="mobile">
-        <el-input
-          v-model="queryParams.mobile"
-          placeholder="请输入手机号"
-          clearable
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
+      </el-form-item>
+      <el-form-item label="手机号" prop="mobile">
+        <el-input
+          v-model="queryParams.mobile"
+          placeholder="请输入手机号"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -49,7 +49,7 @@
       <el-table-column label="登录账号" prop="userName" width="150" />
       <el-table-column label="姓名" prop="nickName" width="150" />
       <el-table-column label="手机号码" prop="phonenumber" width="150" />
-      <el-table-column label="邮箱" prop="email" width="180" />
+      <el-table-column label="邮箱" prop="email" width="180" />
       <el-table-column label="用户角色" prop="userType" width="150" :formatter="userTypeFormat"/>
       <el-table-column label="状态" align="center" width="100">
         <template slot-scope="scope">
@@ -66,12 +66,12 @@
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
-     <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
-       <template slot-scope="scope">
-         <el-button type="text" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:query']">修改</el-button>
-         <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
-         <el-button type="text" @click="handleReset(scope.row)">重置密码</el-button>
-       </template>
+     <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
+       <template slot-scope="scope">
+         <el-button type="text" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:query']">修改</el-button>
+         <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+         <el-button type="text" @click="handleReset(scope.row)">重置密码</el-button>
+       </template>
      </el-table-column>
     </el-table>
     <pagination
@@ -79,98 +79,98 @@
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
-      @pagination="getList"/>
+      @pagination="getList"/>
 
-      <!-- 添加或修改用户配置对话框 -->
-      <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-          <el-row>
-            <el-col :span="12">
-              <el-form-item label="用户昵称" prop="nickName">
-                <el-input v-model="form.nickName" placeholder="请输入用户昵称" maxlength="30" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="用户角色">
-                <el-select v-model="form.userType" placeholder="请选择用户角色">
-                  <el-option
-                    v-for="(item, index) in userListOptions"
-                    :key="index"
-                    :label="item.dictLabel"
-                    :value="item.dictValue"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="12">
-              <el-form-item label="手机号码" prop="phonenumber">
-                <el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="邮箱" prop="email">
-                <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="12">
-              <el-form-item label="用户名称" prop="userName">
-                <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="用户密码" prop="password">
-                <el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="12">
-              <el-form-item label="用户性别">
-                <el-select v-model="form.sex" placeholder="请选择性别">
-                  <el-option
-                    v-for="dict in dict.type.sys_user_sex"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="状态">
-                <el-radio-group v-model="form.status">
-                  <el-radio
-                    v-for="dict in dict.type.sys_normal_disable"
-                    :key="dict.value"
-                    :label="dict.value"
-                  >{{dict.label}}</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24">
-              <el-form-item label="备注">
-                <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="submitForm">确 定</el-button>
-          <el-button @click="cancel">取 消</el-button>
-        </div>
+      <!-- 添加或修改用户配置对话框 -->
+      <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="用户姓名" prop="nickName">
+                <el-input v-model="form.nickName" placeholder="请输入用户姓名" maxlength="30" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="用户角色">
+                <el-select v-model="form.userType" placeholder="请选择用户角色">
+                  <el-option
+                    v-for="(item, index) in userListOptions"
+                    :key="index"
+                    :label="item.dictLabel"
+                    :value="item.dictValue"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="手机号码" prop="phonenumber">
+                <el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="邮箱" prop="email">
+                <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="登录名称" prop="userName">
+                <el-input v-model="form.userName" placeholder="请输入登录名称" maxlength="30" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="用户密码" prop="password">
+                <el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="用户性别">
+                <el-select v-model="form.sex" placeholder="请选择性别">
+                  <el-option
+                    v-for="dict in dict.type.sys_user_sex"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="状态">
+                <el-radio-group v-model="form.status">
+                  <el-radio
+                    v-for="dict in dict.type.sys_normal_disable"
+                    :key="dict.value"
+                    :label="dict.value"
+                  >{{dict.label}}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="备注">
+                <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
       </el-dialog>
   </div>
 </template>
 
-<script>
-import { listUserApi,addRoleApi,updateUserApi } from "@/api/enterprise/employee/employee"
-import { changeUserStatus, getUser } from "@/api/system/user";
+<script>
+import { listUserApi,addRoleApi,updateUserApi } from "@/api/enterprise/employee/employee"
+import { changeUserStatus, getUser } from "@/api/system/user";
 import { userListOptions, getLabel,userAllListOptions } from "@/utils/dataFormat"
 
 export default {
@@ -198,7 +198,7 @@ export default {
       open: false,
       // 日期范围
       dateRange: [],
-      userListOptions: userListOptions,
+      userListOptions: userListOptions,
       userAllListOptions: userAllListOptions,
       // 查询参数
       queryParams: {
@@ -225,23 +225,23 @@ export default {
     /** 查询角色列表 */
     getList() {
       this.loading = true;
-      listUserApi(this.queryParams).then(res => {
-        this.loading = false;
-        if(res.code == 200) {
-          this.roleList = res.data.records;
-          this.total = res.data.total;
+      listUserApi(this.queryParams).then(res => {
+        this.loading = false;
+        if(res.code == 200) {
+          this.roleList = res.data.records;
+          this.total = res.data.total;
         }
       });
     },
     // 角色状态修改
     handleStatusChange(row) {
-      let text = row.status === "0" ? "启用" : "停用";
-      this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
-        return changeUserStatus(row.userId, row.status);
-      }).then(() => {
-        this.$modal.msgSuccess(text + "成功");
-      }).catch(function() {
-        row.status = row.status === "0" ? "1" : "0";
+      let text = row.status === "0" ? "启用" : "停用";
+      this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
+        return changeUserStatus(row.userId, row.status);
+      }).then(() => {
+        this.$modal.msgSuccess(text + "成功");
+      }).catch(function() {
+        row.status = row.status === "0" ? "1" : "0";
       });
     },
     // 取消按钮
@@ -272,23 +272,23 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
+      this.reset();
+      this.open = true;
       this.title = "添加用户";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
-      const userId = row.userId;
-      getUser(userId).then(response => {
-        this.form = response.data;
-        // this.postOptions = response.posts;
-        // this.roleOptions = response.roles;
-        // this.form.postIds = response.postIds;
-        // this.form.roleIds = response.roleIds;
-        this.open = true;
-        this.title = "修改用户";
-        this.form.password = "";
+      this.reset();
+      const userId = row.userId;
+      getUser(userId).then(response => {
+        this.form = response.data;
+        // this.postOptions = response.posts;
+        // this.roleOptions = response.roles;
+        // this.form.postIds = response.postIds;
+        // this.form.roleIds = response.roleIds;
+        this.open = true;
+        this.title = "修改用户";
+        this.form.password = "";
       });
     },
     /** 提交按钮 */
@@ -320,13 +320,13 @@ export default {
         this.getList();
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
-    },
-    handleReset(row) {
-
-    },
-    userTypeFormat(row, col, val, index) {
-      return getLabel(userAllListOptions, val)
+    },
+    handleReset(row) {
+
+    },
+    userTypeFormat(row, col, val, index) {
+      return getLabel(userAllListOptions, val)
     }
   }
 };
-</script>
+</script>

+ 1 - 1
src/views/enterprise/project/index.vue

@@ -54,7 +54,7 @@
       <el-table-column label="创建时间" align="center" prop="createTime" width="160"></el-table-column>
       <el-table-column label="资料完善度" prop="linkEmail" align="center" width="340">
         <template slot-scope="scope">
-          <span>企业 {{scope.row.compRate}} 科德技术 {{scope.row.techCompRate}} 科德财务 {{scope.row.finCompRate}}</span>
+          <span>企业 {{scope.row.entCompRate}} 技术 {{scope.row.techCompRate}} 财务 {{scope.row.finCompRate}}</span>
         </template>
       </el-table-column>
       <el-table-column label="负责状态" align="center" width="160">

+ 3 - 3
src/views/monitor/logininfor/index.vue

@@ -10,10 +10,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="用户名称" prop="userName">
+      <el-form-item label="登录名称" prop="userName">
         <el-input
           v-model="queryParams.userName"
-          placeholder="请输入用户名称"
+          placeholder="请输入登录名称"
           clearable
           style="width: 240px;"
           @keyup.enter.native="handleQuery"
@@ -89,7 +89,7 @@
     <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="访问编号" align="center" prop="infoId" />
-      <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
+      <el-table-column label="登录名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
       <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
       <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
       <el-table-column label="浏览器" align="center" prop="browser" :show-overflow-tooltip="true" />

+ 2 - 2
src/views/monitor/online/index.vue

@@ -9,10 +9,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="用户名称" prop="userName">
+      <el-form-item label="登录名称" prop="userName">
         <el-input
           v-model="queryParams.userName"
-          placeholder="请输入用户名称"
+          placeholder="请输入登录名称"
           clearable
           @keyup.enter.native="handleQuery"
         />

+ 4 - 4
src/views/system/role/authUser.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="app-container">
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
-      <el-form-item label="用户名称" prop="userName">
+      <el-form-item label="登录名称" prop="userName">
         <el-input
           v-model="queryParams.userName"
-          placeholder="请输入用户名称"
+          placeholder="请输入登录名称"
           clearable
           style="width: 240px"
           @keyup.enter.native="handleQuery"
@@ -61,8 +61,8 @@
 
     <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
-      <el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />
+      <el-table-column label="登录名称" prop="userName" :show-overflow-tooltip="true" />
+      <el-table-column label="用户姓名" prop="nickName" :show-overflow-tooltip="true" />
       <el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" />
       <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
       <el-table-column label="状态" align="center" prop="status">

+ 4 - 4
src/views/system/role/selectUser.vue

@@ -2,10 +2,10 @@
   <!-- 授权用户 -->
   <el-dialog title="选择用户" :visible.sync="visible" width="800px" top="5vh" append-to-body>
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
-      <el-form-item label="用户名称" prop="userName">
+      <el-form-item label="登录名称" prop="userName">
         <el-input
           v-model="queryParams.userName"
-          placeholder="请输入用户名称"
+          placeholder="请输入登录名称"
           clearable
           @keyup.enter.native="handleQuery"
         />
@@ -26,8 +26,8 @@
     <el-row>
       <el-table @row-click="clickRow" ref="table" :data="userList" @selection-change="handleSelectionChange" height="260px">
         <el-table-column type="selection" width="55"></el-table-column>
-        <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
-        <el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />
+        <el-table-column label="登录名称" prop="userName" :show-overflow-tooltip="true" />
+        <el-table-column label="用户姓名" prop="nickName" :show-overflow-tooltip="true" />
         <el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" />
         <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
         <el-table-column label="状态" align="center" prop="status">

+ 1 - 1
src/views/system/user/authRole.vue

@@ -4,7 +4,7 @@
     <el-form ref="form" :model="form" label-width="80px">
       <el-row>
         <el-col :span="8" :offset="2">
-          <el-form-item label="用户昵称" prop="nickName">
+          <el-form-item label="用户姓名" prop="nickName">
             <el-input v-model="form.nickName" disabled />
           </el-form-item>
         </el-col>

+ 13 - 13
src/views/system/user/index.vue

@@ -28,10 +28,10 @@
       <!--用户数据-->
       <el-col :span="20" :xs="24">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-          <el-form-item label="用户名称" prop="userName">
+          <el-form-item label="登录名称" prop="userName">
             <el-input
               v-model="queryParams.userName"
-              placeholder="请输入用户名称"
+              placeholder="请输入登录名称"
               clearable
               style="width: 240px"
               @keyup.enter.native="handleQuery"
@@ -137,8 +137,8 @@
         <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
-          <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-          <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="登录名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="用户姓名" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
           <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
           <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
           <el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
@@ -207,8 +207,8 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="12">
-            <el-form-item label="用户昵称" prop="nickName">
-              <el-input v-model="form.nickName" placeholder="请输入用户昵称" maxlength="30" />
+            <el-form-item label="用户姓名" prop="nickName">
+              <el-input v-model="form.nickName" placeholder="请输入用户姓名" maxlength="30" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -231,8 +231,8 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
-              <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
+            <el-form-item v-if="form.userId == undefined" label="登录名称" prop="userName">
+              <el-input v-model="form.userName" placeholder="请输入登录名称" maxlength="30" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -416,8 +416,8 @@ export default {
       // 列信息
       columns: [
         { key: 0, label: `用户编号`, visible: true },
-        { key: 1, label: `用户名称`, visible: true },
-        { key: 2, label: `用户昵称`, visible: true },
+        { key: 1, label: `登录名称`, visible: true },
+        { key: 2, label: `用户姓名`, visible: true },
         { key: 3, label: `部门`, visible: true },
         { key: 4, label: `手机号码`, visible: true },
         { key: 5, label: `状态`, visible: true },
@@ -426,11 +426,11 @@ export default {
       // 表单校验
       rules: {
         userName: [
-          { required: true, message: "用户名称不能为空", trigger: "blur" },
-          { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
+          { required: true, message: "登录名称不能为空", trigger: "blur" },
+          { min: 2, max: 20, message: '登录名称长度必须介于 2 和 20 之间', trigger: 'blur' }
         ],
         nickName: [
-          { required: true, message: "用户昵称不能为空", trigger: "blur" }
+          { required: true, message: "用户姓名不能为空", trigger: "blur" }
         ],
         password: [
           { required: true, message: "用户密码不能为空", trigger: "blur" },

+ 1 - 1
src/views/system/user/profile/index.vue

@@ -12,7 +12,7 @@
             </div>
             <ul class="list-group list-group-striped">
               <li class="list-group-item">
-                <svg-icon icon-class="user" />用户名称
+                <svg-icon icon-class="user" />登录名称
                 <div class="pull-right">{{ user.userName }}</div>
               </li>
               <li class="list-group-item">

+ 3 - 3
src/views/system/user/profile/userInfo.vue

@@ -1,6 +1,6 @@
 <template>
   <el-form ref="form" :model="user" :rules="rules" label-width="80px">
-    <el-form-item label="用户昵称" prop="nickName">
+    <el-form-item label="用户姓名" prop="nickName">
       <el-input v-model="user.nickName" maxlength="30" />
     </el-form-item> 
     <el-form-item label="手机号码" prop="phonenumber">
@@ -36,10 +36,10 @@ export default {
       // 表单校验
       rules: {
         nickName: [
-          { required: true, message: "用户昵称不能为空", trigger: "blur" }
+          { required: true, message: "用户姓名不能为空", trigger: "blur" }
         ],
         email: [
-          { required: true, message: "邮箱地址不能为空", trigger: "blur" },
+          // { required: true, message: "邮箱地址不能为空", trigger: "blur" },
           {
             type: "email",
             message: "请输入正确的邮箱地址",

+ 44 - 7
src/views/tax/components/AddTaxUser.vue

@@ -1,7 +1,7 @@
  <template>
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
-         <el-form-item label="账户" prop="userName" v-if="type == 'add'">
+         <el-form-item label="登录名称" prop="userName" v-if="type == 'add'">
            <el-input v-model="form.userName"></el-input>
          </el-form-item>
          <el-form-item label="姓名" prop="nickName">
@@ -50,6 +50,13 @@
    import {dutyAreaOptions} from '@/utils/dataFormat'
    export default {
      data () {
+       const equalToPassword = (rule, value, callback) => {
+         if (this.form.password !== value) {
+           callback(new Error("两次输入的密码不一致"));
+         } else {
+           callback();
+         }
+       };
        return {
          open: false,
          disabled: false,
@@ -67,12 +74,42 @@
            id: ''
          },
          rules: {
-           checkStatus: [
-             {required: true, message: '请选择审核结果', trigger: 'change'}
+           userName: [
+             {required: true, message: '请输入用户名称', trigger: 'blur'},
+             {max: 30, message: '最多输入30个字符', trigger: 'blur' }
+           ],
+           nickName: [
+             {required: true, message: '请输入姓名', trigger: 'blur'},
+             {max: 30, message: '最多输入30个字符', trigger: 'blur' }
+           ],
+           phonenumber: [
+             {required: true, message: '请输入手机号', trigger: 'blur'},
+             {
+               pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+               message: "请输入正确的手机号码",
+               trigger: "blur"
+             }
+           ],
+           dutyArea: [
+             {required: true, message: '请选择负责区域', trigger: 'change'}
+           ],
+           provinceId: [
+             {required: true, message: '请选择省', trigger: 'change'}
+           ],
+           cityId: [
+             {required: true, message: '请选择市', trigger: 'change'}
+           ],
+           districtId: [
+             {required: true, message: '请选择区', trigger: 'change'}
+           ],
+           password: [
+             { required: true, trigger: "blur", message: "请输入您的密码" },
+             { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
+           ],
+           confirmPassword: [
+             { required: true, trigger: "blur", message: "请再次输入您的密码" },
+             { required: true, validator: equalToPassword, trigger: "blur" }
            ],
-           serviceTime: [
-             {required: true, message: '请设置服务时间段', trigger: 'change'}
-           ]
          }
        }
      },
@@ -190,7 +227,6 @@
        submitForm() {
          this.$refs.form.validate(valid => {
            if (valid) {
-             this.disabled = true
              if(this.form.dutyArea == '1') {
                let obj = this.provinceDataList.find(item => {
                  return item.id == this.form.provinceId
@@ -227,6 +263,7 @@
                this.form.scopeId = this.form.districtId
                this.form.userType = 'GOV_DISTRI'
              }
+             this.disabled = true
              if(this.id) {
                updateTaxInfoApi(this.form).then(res => {
                  this.disabled = false;

+ 4 - 4
src/views/tax/index.vue

@@ -16,8 +16,8 @@
           <el-option v-for="(item, index) in districtDataList" :key="index" :label="item.name" :value="item.name"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="用户名称" prop="nickName">
-        <el-input v-model="queryParams.nickName" clearable style="width: 200px;" placeholder="请输入用户名称"></el-input>
+      <el-form-item label="登录名称" prop="userName">
+        <el-input v-model="queryParams.userName" clearable style="width: 200px;" placeholder="请输入登录名称"></el-input>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="handleQuery">搜索</el-button>
@@ -31,8 +31,8 @@
       </div>
     </h3>
     <el-table v-loading="loading" :data="list" border>
-      <el-table-column label="账户" prop="userName" width="120" align="center" />
-      <el-table-column label="用户名称" prop="nickName" align="center" width="120"></el-table-column>
+      <el-table-column label="账户" prop="nickName" width="120" align="center" />
+      <el-table-column label="登录名称" prop="userName" align="center" width="120"></el-table-column>
       <el-table-column label="手机号" prop="phonenumber" align="center" width="120" />
       <el-table-column label="负责地区" prop="remark" align="center" width="200"></el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" width="160"></el-table-column>