删除用户,无法创建 优化
This commit is contained in:
@ -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>
|
Reference in New Issue
Block a user