|
@@ -292,15 +292,28 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item> -->
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="用户姓名" prop="nickName">
|
|
|
- <el-input
|
|
|
- v-model="form.nickName"
|
|
|
- placeholder="请输入用户姓名"
|
|
|
- maxlength="50"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="手机号" prop="userName">
|
|
|
+ <el-input
|
|
|
+ v-model="form.userName"
|
|
|
+ placeholder="请输入登录手机号"
|
|
|
+ maxlength="11"
|
|
|
+ :disabled="isUpdate"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="用户姓名" prop="nickName">
|
|
|
+ <el-input
|
|
|
+ v-model="form.nickName"
|
|
|
+ placeholder="请输入用户姓名"
|
|
|
+ maxlength="50"
|
|
|
+ :disabled="isName"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<!-- <el-col :span="12" v-if="rodeptShow"> -->
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="归属部门" prop="deptId">
|
|
@@ -326,18 +339,6 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="手机号" prop="userName">
|
|
|
- <el-input
|
|
|
- v-model="form.userName"
|
|
|
- placeholder="请输入登录手机号"
|
|
|
- maxlength="11"
|
|
|
- :disabled="isUpdate"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
<el-form-item label="角色" prop="roleIds">
|
|
|
<el-select v-model="form.roleIds" multiple placeholder="请选择">
|
|
|
<el-option
|
|
@@ -521,7 +522,8 @@ import {
|
|
|
getRoleDept,
|
|
|
companyList,
|
|
|
adminChange,
|
|
|
- handlerChange
|
|
|
+ handlerChange,
|
|
|
+ selectNormalUser
|
|
|
} from "@/api/system/user";
|
|
|
import { uploadFileNew } from "@/api/common/file";
|
|
|
import { getToken } from "@/utils/auth";
|
|
@@ -581,6 +583,7 @@ export default {
|
|
|
open: false,
|
|
|
imgs: false,
|
|
|
openPassWord: false,
|
|
|
+ isName:false,
|
|
|
//离职日期
|
|
|
leave: false,
|
|
|
// 部门名称
|
|
@@ -766,6 +769,7 @@ export default {
|
|
|
deptName(val) {
|
|
|
this.$refs.tree.filter(val);
|
|
|
},
|
|
|
+ 'form.userName':'getLoginName'
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
@@ -812,6 +816,19 @@ export default {
|
|
|
}
|
|
|
columnfilter(this.selfDom);
|
|
|
},
|
|
|
+ getLoginName(item){
|
|
|
+ const userName = item;
|
|
|
+ selectNormalUser(userName).then((response) => {
|
|
|
+ console.log(response,"根据手机号获取用户姓名")
|
|
|
+ if(response.data.length > 0){
|
|
|
+ this.$set(this.form, "nickName", response.data[0].nickName);
|
|
|
+ this.isName = true;
|
|
|
+ }else{
|
|
|
+ this.$set(this.form, "nickName", '');
|
|
|
+ this.isName = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//获取当前用户信息
|
|
|
getNowUser() {
|
|
|
getNowUser().then((response) => {
|
|
@@ -927,7 +944,8 @@ export default {
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.page = 1;
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.queryParams.pageSize = 10;
|
|
|
this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
@@ -1053,6 +1071,7 @@ export default {
|
|
|
this.rodeptShow = true;
|
|
|
}
|
|
|
this.isUpdate = false;
|
|
|
+ this.isName = false;
|
|
|
this.reset();
|
|
|
this.peoplpeName = false;
|
|
|
this.getFormTreeselect();
|
|
@@ -1077,7 +1096,7 @@ export default {
|
|
|
Cookies.set("/user/detail/" + row.userId, this.$route.fullPath)
|
|
|
this.$router.push({ path: "/user/detail/" + row.userId });
|
|
|
},
|
|
|
- /** 修改按钮操作 */
|
|
|
+ /** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
console.log(row)
|
|
|
if (this.signCompanyId == "000000") {
|
|
@@ -1086,6 +1105,7 @@ export default {
|
|
|
this.rodeptShow = true;
|
|
|
}
|
|
|
this.isUpdate = true;
|
|
|
+ this.isName = true;
|
|
|
var self = this;
|
|
|
this.reset();
|
|
|
this.peoplpeName = true;
|