From a200f3ca88dcaaf13b5f6e017ab5532dc35d9fef Mon Sep 17 00:00:00 2001 From: bibi <541660090@qq.com> Date: Wed, 26 Jan 2022 16:56:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 4 +- .../Basic/Authority/depend/permissions.vue | 31 +++----- src/views/Basic/Authority/index.vue | 71 +++++++++++++------ 3 files changed, 63 insertions(+), 43 deletions(-) diff --git a/src/main.js b/src/main.js index eea5209..500d370 100644 --- a/src/main.js +++ b/src/main.js @@ -3,7 +3,7 @@ import App from './App.vue' import './styles/index.less'; import mixins from "@/mixins" import Antd from 'ant-design-vue'; -import ElementUI from 'element-ui'; +import {Cascader} from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; // import moment from 'moment'; import util from '@/utils/util.js' @@ -12,7 +12,7 @@ import 'ant-design-vue/dist/antd.css'; Vue.use(util); Vue.use(Antd); Vue.use(mixins); -Vue.use(ElementUI); +Vue.use(Cascader); import store from "@/store"; import router from "@/permission"; diff --git a/src/views/Basic/Authority/depend/permissions.vue b/src/views/Basic/Authority/depend/permissions.vue index f109172..9db1268 100644 --- a/src/views/Basic/Authority/depend/permissions.vue +++ b/src/views/Basic/Authority/depend/permissions.vue @@ -105,15 +105,6 @@ export default { mounted() { this.getData(); }, - // computed: { - // items: function() { - // return this.roleList.forEach(ele=>{ - // if(ele.childrenList===undefined||ele.childrenList===null){ - // ele.childrenList = {name:'无'} - // } - // }) - // } - // }, methods: { getData() { rolelist().then((res) => { @@ -151,21 +142,19 @@ export default { // okText:'删除', // cancelText:'取消', icon: "", - onOk: async function () { - const res = await roleDel({roleId:id}) - if(res.code === 200){ - vm.$message.success(res.msg) - vm.getData() - }else{ - vm.$message.error(res.msg) - } - }, + onOk:()=> { + roleDel({roleId:id}).then(res=>{ + if(res.code === 200){ + this.$message.success(res.msg) + this.getData() + }else{ + this.$message.error(res.msg) + } + }) + } }); }, onExpand(expandedKeys) { - // console.log('onExpand', expandedKeys); - // if not set autoExpandParent to false, if children expanded, parent can not collapse. - // or, you can remove all expanded children keys. this.expandedKeys = expandedKeys; this.autoExpandParent = false; }, diff --git a/src/views/Basic/Authority/index.vue b/src/views/Basic/Authority/index.vue index 3bad29e..76424bd 100644 --- a/src/views/Basic/Authority/index.vue +++ b/src/views/Basic/Authority/index.vue @@ -6,6 +6,9 @@
所有角色
+ 新增角色 请选择角色: - +