功能变化: 菜单授权返回包含父级的完整名称
This commit is contained in:
@@ -19,6 +19,7 @@ watch(()=>{
|
|||||||
const result = await deptInfoStore.getParentDeptById(newVal)
|
const result = await deptInfoStore.getParentDeptById(newVal)
|
||||||
if(result?.nodes){
|
if(result?.nodes){
|
||||||
let name = ""
|
let name = ""
|
||||||
|
console.log(result)
|
||||||
result.nodes.forEach((item:any,index:number)=>{
|
result.nodes.forEach((item:any,index:number)=>{
|
||||||
name += index>0?`/${item.name}`:item.name
|
name += index>0?`/${item.name}`:item.name
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import {SystemConfigStore} from "/@/stores/systemConfig";
|
|||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
import {computed} from "vue";
|
import {computed} from "vue";
|
||||||
import { Md5 } from 'ts-md5';
|
import { Md5 } from 'ts-md5';
|
||||||
|
import {commonCrudConfig} from "/@/utils/commonCrud";
|
||||||
export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const pageRequest = async (query: UserPageQuery) => {
|
const pageRequest = async (query: UserPageQuery) => {
|
||||||
return await api.GetList(query);
|
return await api.GetList(query);
|
||||||
@@ -372,6 +373,12 @@ export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps)
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
...commonCrudConfig({
|
||||||
|
dept_belong_id: {
|
||||||
|
form: true,
|
||||||
|
table: true
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user