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