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

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

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