Commit 55ec5905 authored by 扫地僧's avatar 扫地僧

添加系统用户新增店铺管理员属性

parent 95bcf7b0
......@@ -80,6 +80,7 @@ public class SysUserController extends BaseController {
sysUser.setMobilePhone(sysUserRoleIds.getMobilePhone());
sysUser.setSex(sysUserRoleIds.getSex());
sysUser.setDeptId(sysUserRoleIds.getDeptId());
sysUser.setAdministratorsId(sysUserRoleIds.getAdministratorsId());
if (sysUserRoleIds.getSysRole()!=null) {
String[] roleIds = sysUserRoleIds.getSysRole();
List<SysRole> sysRoles = new ArrayList<SysRole>();
......
......@@ -45,6 +45,8 @@ public class SysUserRoleIds extends Entity<String> {
private Integer operatorType;
//操作人id(根据操作人类型会对应不同的表记录)
private String operatorId;
//店铺管理员编号
private String administratorsId;
private String[] sysRole;
......@@ -57,6 +59,16 @@ public class SysUserRoleIds extends Entity<String> {
return userId;
}
public String getAdministratorsId() {
return administratorsId;
}
public void setAdministratorsId(String administratorsId) {
this.administratorsId = administratorsId;
}
public void setUserId(String userId){
this.userId = userId;
}
......
......@@ -12,7 +12,6 @@ const service = axios.create({
console.log('请求地址:'+process.env.BASE_API);
// request interceptor
service.interceptors.request.use(config => {
debugger
// Do something before request is sent
const userInfro = getUserInfro()
let param = config.data;
......
......@@ -41,7 +41,7 @@ export function queryAllSysRole() {
// 选择管理员
export function queryAllShopAdmin() {
return request({
url: '/sysRole/queryAllSysRole',
url: '/administrators/getAdministrators',
method: 'post',
})
}
......
......@@ -118,15 +118,15 @@
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>店铺管理员</label></el-col>
<el-col :span="16" class="content-right">
<el-select size="small" v-if="dialogType===1 || dialogType===2" placeholder="请选择店铺管理员" v-model="dialogBindData.deptId" @change="getSectionsByDeptId">
<el-select size="small" v-if="dialogType===1 || dialogType===2" placeholder="请选择店铺管理员" v-model="dialogBindData.administratorsId">
<el-option
v-for="item in shopAdminsData"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId">
:key="item.administratorsId"
:label="item.administratorsName"
:value="item.administratorsId">
</el-option>
</el-select>
<span v-else>{{viewDeptName(dialogBindData.deptId)}}</span>
<span v-else>{{dialogBindData.administratorsName}}</span>
</el-col>
</el-row>
......@@ -234,8 +234,8 @@ export default {
sex: "",
mobilePhone: "",
isAvailable: 1,
sysRole: "",
flag: ""
administratorsName:"",
administratorsId:""
},
//店铺管理员下拉数据
......@@ -340,6 +340,7 @@ export default {
});
},
edit(data) {
debugger
this.dialogType = 2;
this.getRoleList(() => {
this.getSectionsByDeptId(data.deptId, () => {
......@@ -370,6 +371,8 @@ export default {
}
},
submmitFun() {
console.log(this.dialogBindData)
let isSubmitActive;
if (this.dialogType === 1) {
// alert(`添加${JSON.stringify(this.dialogBindData)}`);
......@@ -379,8 +382,8 @@ export default {
this.dialogBindData.realName &&
this.dialogBindData.mobilePhone &&
this.dialogBindData.sysRole &&
this.dialogBindData.deptId &&
this.dialogBindData.sectionId;
this.dialogBindData.administratorsId;
// this.dialogBindData.administratorsName;
} else {
// alert(`编辑${JSON.stringify(this.dialogBindData)}`);
isSubmitActive =
......@@ -389,9 +392,8 @@ export default {
this.dialogBindData.password &&
this.dialogBindData.realName &&
this.dialogBindData.mobilePhone &&
this.dialogBindData.sysRole &&
this.dialogBindData.deptId &&
this.dialogBindData.sectionId;
this.dialogBindData.administratorsId;
// this.dialogBindData.administratorsName;
}
// // 发送添加请求
if (isSubmitActive) {
......@@ -494,11 +496,13 @@ export default {
.all([
//方法一
system.queryAllSysRole().then(res => {
debugger
this.chooseRole = res.data;
}),
//方法二
system.queryAllShopAdmin().then(res => {
this.shopAdminsData = res.data;
debugger
this.shopAdminsData = res.data.data;
})
])
.then(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment