删除用户,无法创建 优化
This commit is contained in:
parent
09f04a3bb5
commit
e7dafbeb1e
@ -254,8 +254,8 @@ li {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.vue-treeselect__control {
|
// .vue-treeselect__control {
|
||||||
height: 34px !important;
|
// height: 34px !important;
|
||||||
line-height: 34px;
|
// line-height: 34px;
|
||||||
overflow: hidden;
|
// overflow: hidden;
|
||||||
}
|
// }
|
@ -14,11 +14,17 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<svg-icon icon-class="tree" />所属部门
|
<svg-icon icon-class="tree" />所属部门
|
||||||
<div class="pull-right" v-if="user.dept">{{ user.dept.deptName }}</div>
|
<div class="pull-right" v-if="user.dept">
|
||||||
|
{{ user.dept.deptName }}
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<svg-icon icon-class="tree" />选择部门
|
<svg-icon icon-class="tree" />选择部门
|
||||||
<div class="pull-right" v-for="item in deptsOptions" :key="item.deptId">
|
<div
|
||||||
|
class="pull-right"
|
||||||
|
v-for="item in deptsOptions"
|
||||||
|
:key="item.deptId"
|
||||||
|
>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="dept"
|
name="dept"
|
||||||
@ -30,8 +36,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<el-button type="primary" size="mini" @click="submit">保存</el-button>
|
<el-button type="primary" size="mini" @click="submit"
|
||||||
<el-button type="danger" size="mini" @click="close">关闭</el-button>
|
>保存</el-button
|
||||||
|
>
|
||||||
|
<el-button type="danger" size="mini" @click="close"
|
||||||
|
>关闭</el-button
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -43,7 +53,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getUserProfile } from "@/api/system/user";
|
import { getUserProfile } from "@/api/system/user";
|
||||||
import { getDeptsInfo,changeDept } from "@/api/system/dept";
|
import { getDeptsInfo, changeDept } from "@/api/system/dept";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "changedept",
|
name: "changedept",
|
||||||
@ -52,7 +62,7 @@ export default {
|
|||||||
checkedValue: null,
|
checkedValue: null,
|
||||||
oldValue: null,
|
oldValue: null,
|
||||||
user: {},
|
user: {},
|
||||||
deptsOptions: []
|
deptsOptions: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -61,7 +71,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDepts() {
|
getDepts() {
|
||||||
getDeptsInfo().then(response => {
|
getDeptsInfo().then((response) => {
|
||||||
// console.log("school=" + response.total);
|
// console.log("school=" + response.total);
|
||||||
// console.log( response);
|
// console.log( response);
|
||||||
if (response.total <= 1) {
|
if (response.total <= 1) {
|
||||||
@ -72,7 +82,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getUser() {
|
getUser() {
|
||||||
getUserProfile().then(response => {
|
getUserProfile().then((response) => {
|
||||||
this.user = response.data;
|
this.user = response.data;
|
||||||
this.checkedValue = response.data.dept.deptId;
|
this.checkedValue = response.data.dept.deptId;
|
||||||
this.oldValue = response.data.dept.deptId;
|
this.oldValue = response.data.dept.deptId;
|
||||||
@ -84,23 +94,22 @@ export default {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
//切换岗位
|
//切换岗位
|
||||||
changeDept(this.checkedValue).then(
|
changeDept(this.checkedValue).then((response) => {
|
||||||
response => {
|
if (response.code === 200) {
|
||||||
if (response.code === 200) {
|
this.msgSuccess(response.msg);
|
||||||
this.msgSuccess(response.msg);
|
this.getUser();
|
||||||
this.getUser();
|
this.getDepts();
|
||||||
this.getDepts();
|
location.reload();
|
||||||
} else {
|
} else {
|
||||||
this.msgError(response.msg);
|
this.msgError(response.msg);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$store.dispatch("tagsView/delView", this.$route);
|
this.$store.dispatch("tagsView/delView", this.$route);
|
||||||
this.$router.push({ path: "/index" });
|
this.$router.push({ path: "/index" });
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
@ -279,16 +279,17 @@ public class SysUserController extends BaseController {
|
|||||||
|
|
||||||
//先判断前端的roleids是否有变化
|
//先判断前端的roleids是否有变化
|
||||||
boolean isPd = true;
|
boolean isPd = true;
|
||||||
if (schoolCommon.isSchool() == true) {
|
// if (schoolCommon.isSchool() == true) {
|
||||||
List<Integer> roleIdsOld = roleService.selectYeyRoleListByUserId(user.getUserId());
|
List<Integer> roleIdsOld = roleService.selectYeyRoleListByUserId(user.getUserId());
|
||||||
if (roleIdsOld != null && roleIdsOld.size() > 0) {
|
if (roleIdsOld != null && roleIdsOld.size() > 0) {
|
||||||
for (int i = 0; i < roleIdsOld.size(); i++) {
|
for (int i = 0; i < roleIdsOld.size(); i++) {
|
||||||
if (roleIdsOld.get(i) == 100) {
|
System.out.println(roleIdsOld.get(i) == 100);
|
||||||
isPd = false;
|
if (roleIdsOld.get(i) == 100) {
|
||||||
}
|
isPd = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
if (isPd) {
|
if (isPd) {
|
||||||
//判断当前学校有多少个幼儿园管理员 需求至多3个幼儿园管理员
|
//判断当前学校有多少个幼儿园管理员 需求至多3个幼儿园管理员
|
||||||
Long[] roleIds = user.getRoleIds();
|
Long[] roleIds = user.getRoleIds();
|
||||||
@ -307,7 +308,7 @@ public class SysUserController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
user.setPhonenumber(user.getUserName());
|
user.setPhonenumber(user.getUserName());
|
||||||
user.setEmail(user.getUserName()+"@benyi.com");
|
user.setEmail(user.getUserName() + "@benyi.com");
|
||||||
user.setUpdateBy(SecurityUtils.getUsername());
|
user.setUpdateBy(SecurityUtils.getUsername());
|
||||||
return toAjax(userService.updateUser(user));
|
return toAjax(userService.updateUser(user));
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,7 @@
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteUserByIds" parameterType="Long">
|
<delete id="deleteUserByIds" parameterType="Long">
|
||||||
update sys_user set del_flag = '2' where user_id in
|
update sys_user set del_flag = '2',user_name=CONCAT('del-',user_name),phonenumber=CONCAT('del-',phonenumber),email=CONCAT('del-',email) where user_id in
|
||||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||||
#{userId}
|
#{userId}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user