mirror of
https://github.com/chillzhuang/Saber.git
synced 2024-11-05 10:09:40 +08:00
fix dic tree
This commit is contained in:
parent
9e6ba56c0a
commit
d0c6870478
@ -49,3 +49,9 @@ export const getDict = (id) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
export const getDictTree = () => {
|
||||
return request({
|
||||
url: 'api/blade-system/dict/tree?code=DICT',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -33,7 +33,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList, remove, update, add, getDict } from "@/api/system/dict";
|
||||
import {
|
||||
getList,
|
||||
remove,
|
||||
update,
|
||||
add,
|
||||
getDict,
|
||||
getDictTree
|
||||
} from "@/api/system/dict";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -65,7 +72,7 @@ export default {
|
||||
label: "上级字典",
|
||||
prop: "parentId",
|
||||
type: "tree",
|
||||
dicUrl: "/api/blade-system/dict/tree?code=DICT",
|
||||
dicData: [],
|
||||
hide: true,
|
||||
props: {
|
||||
label: "title"
|
||||
@ -174,6 +181,10 @@ export default {
|
||||
getList(page.currentPage, page.pageSize, params).then(res => {
|
||||
const data = res.data.data;
|
||||
this.data = data;
|
||||
getDictTree().then(res => {
|
||||
const data = res.data.data;
|
||||
this.option.column[2].dicData = data;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,6 @@ export default {
|
||||
{
|
||||
label: "所属角色",
|
||||
prop: "roleId",
|
||||
checkStrictly: true,
|
||||
multiple: true,
|
||||
type: "tree",
|
||||
dicUrl: "/api/blade-system/role/tree",
|
||||
@ -92,7 +91,6 @@ export default {
|
||||
label: "所属部门",
|
||||
prop: "deptId",
|
||||
type: "tree",
|
||||
checkStrictly: true,
|
||||
multiple: true,
|
||||
dicUrl: "/api/blade-system/dept/tree",
|
||||
props: {
|
||||
|
Loading…
Reference in New Issue
Block a user