若依 2.0
This commit is contained in:
@ -168,6 +168,7 @@
|
||||
import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig } from "@/api/system/config";
|
||||
|
||||
export default {
|
||||
name: "Config",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -143,6 +143,7 @@ import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Dept",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
|
@ -159,6 +159,7 @@ import { listData, getData, delData, addData, updateData, exportData } from "@/a
|
||||
import { listType, getType } from "@/api/system/dict/type";
|
||||
|
||||
export default {
|
||||
name: "Data",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -176,6 +176,7 @@
|
||||
import { listType, getType, delType, addType, updateType, exportType } from "@/api/system/dict/type";
|
||||
|
||||
export default {
|
||||
name: "Dict",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -179,6 +179,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import IconSelect from "@/components/IconSelect";
|
||||
|
||||
export default {
|
||||
name: "Menu",
|
||||
components: { Treeselect, IconSelect },
|
||||
data() {
|
||||
return {
|
||||
|
@ -176,6 +176,7 @@ import { listNotice, getNotice, delNotice, addNotice, updateNotice, exportNotice
|
||||
import Editor from '@/components/Editor';
|
||||
|
||||
export default {
|
||||
name: "Notice",
|
||||
components: {
|
||||
Editor
|
||||
},
|
||||
|
@ -153,6 +153,7 @@
|
||||
import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post";
|
||||
|
||||
export default {
|
||||
name: "Post",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -238,6 +238,7 @@ import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/m
|
||||
import { treeselect as deptTreeselect, roleDeptTreeselect } from "@/api/system/dept";
|
||||
|
||||
export default {
|
||||
name: "Role",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -290,12 +290,11 @@
|
||||
<script>
|
||||
import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus } from "@/api/system/user";
|
||||
import { treeselect } from "@/api/system/dept";
|
||||
import { listPost } from "@/api/system/post";
|
||||
import { listRole } from "@/api/system/role";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
@ -423,18 +422,6 @@ export default {
|
||||
this.queryParams.deptId = data.id;
|
||||
this.getList();
|
||||
},
|
||||
/** 查询岗位列表 */
|
||||
getPosts() {
|
||||
listPost().then(response => {
|
||||
this.postOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询角色列表 */
|
||||
getRoles() {
|
||||
listRole().then(response => {
|
||||
this.roleOptions = response.rows;
|
||||
});
|
||||
},
|
||||
// 用户状态修改
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
@ -494,21 +481,23 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
this.getPosts();
|
||||
this.getRoles();
|
||||
this.open = true;
|
||||
this.title = "添加用户";
|
||||
this.form.password = this.initPassword;
|
||||
getUser().then(response => {
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
this.open = true;
|
||||
this.title = "添加用户";
|
||||
this.form.password = this.initPassword;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
this.getPosts();
|
||||
this.getRoles();
|
||||
const userId = row.userId || this.ids
|
||||
getUser(userId).then(response => {
|
||||
this.form = response.data;
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
this.form.postIds = response.postIds;
|
||||
this.form.roleIds = response.roleIds;
|
||||
this.open = true;
|
||||
|
@ -89,13 +89,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
line-height: 120px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user