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 @@
所有角色
+ 新增角色 请选择角色: - +