| | |
| | | }); |
| | | }; |
| | | |
| | | export const getChildLazyTree = (params) => { |
| | | return request({ |
| | | url: '/blade-system/dept/getChildLazyTree', |
| | | method: 'get', |
| | | params: params |
| | | }); |
| | | }; |
| | | |
| | | export const remove = ids => { |
| | | return request({ |
| | | url: '/blade-system/dept/remove', |
| | |
| | | }); |
| | | }; |
| | | |
| | | export const getDeptLazyTree = parentId => { |
| | | export const getDeptLazyTree = param => { |
| | | return request({ |
| | | url: '/blade-system/dept/lazy-tree', |
| | | method: 'get', |
| | | params: { |
| | | parentId, |
| | | }, |
| | | params: param |
| | | }); |
| | | }; |
| | | |
| | |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | export const getRoleList = ( params) => { |
| | | return request({ |
| | | url: '/blade-system/role/getRoleList', |
| | | method: 'get', |
| | | params: params |
| | | }); |
| | | }; |
| | | |
| | | export const grantTree = () => { |
| | | return request({ |
| | | url: '/blade-system/menu/grant-tree', |
| | |
| | | </el-button> |
| | | <el-button |
| | | icon="el-icon-setting" |
| | | @click="handleRole" |
| | | v-if="userInfo.role_name.includes('admin')" |
| | | @click="handleRole" |
| | | plain |
| | | >权限设置 |
| | | </el-button> |
| | | <!-- --> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="角色权限配置" append-to-body v-model="box" width="345px"> |
| | |
| | | > |
| | | </el-tree> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="数据权限"> |
| | | <!-- <el-tab-pane label="数据权限"> |
| | | <el-tree |
| | | :data="dataScopeGrantList" |
| | | show-checkbox |
| | |
| | | :props="props" |
| | | > |
| | | </el-tree> |
| | | </el-tab-pane> |
| | | </el-tab-pane> --> |
| | | </el-tabs> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | }, |
| | | submit() { |
| | | const menuList = this.$refs.treeMenu.getCheckedKeys(); |
| | | const dataScopeList = this.$refs.treeDataScope.getCheckedKeys(); |
| | | const apiScopeList = this.$refs.treeApiScope.getCheckedKeys(); |
| | | // const dataScopeList = this.$refs.treeDataScope.getCheckedKeys(); |
| | | const dataScopeList = []; |
| | | // const apiScopeList = this.$refs.treeApiScope.getCheckedKeys(); |
| | | const apiScopeList = []; |
| | | grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => { |
| | | this.box = false; |
| | | this.$message({ |
| | |
| | | <script> |
| | | import { |
| | | getLazyList, |
| | | getChildLazyTree, |
| | | remove, |
| | | update, |
| | | add, |
| | |
| | | hide: true, |
| | | addDisabled: false, |
| | | props: { |
| | | label: 'title', |
| | | label: 'name', |
| | | value:'id' |
| | | }, |
| | | labelWidth: 120, |
| | | rules: [{ |
| | |
| | | }); |
| | | }, |
| | | treeLoad(tree, treeNode, resolve) { |
| | | const parentId = tree.id; |
| | | getLazyList(parentId).then(res => { |
| | | getChildLazyTree({parentId:tree.id}).then(res => { |
| | | resolve(res.data.data); |
| | | }); |
| | | }, |
| | |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = node.level === 0 ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then(res => { |
| | | console.log(node,666) |
| | | const param = { |
| | | parentId:parentId, |
| | | level:node.level |
| | | } |
| | | getDeptLazyTree(param).then(res => { |
| | | resolve( |
| | | res.data.data.map(item => { |
| | | return { |
| | |
| | | port: 2888, |
| | | proxy: { |
| | | '/api': { |
| | | // target: 'http://localhost', |
| | | target: 'https://wrj.shuixiongit.com/api', |
| | | target: 'http://localhost', |
| | | // target: 'https://wrj.shuixiongit.com/api', |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(/^\/api/, ''), |
| | | }, |