fix dic tree

This commit is contained in:
smallwei 2019-02-15 15:15:08 +08:00
parent 9e6ba56c0a
commit d0c6870478
3 changed files with 20 additions and 5 deletions

View File

@ -48,4 +48,10 @@ export const getDict = (id) => {
id,
}
})
}
}
export const getDictTree = () => {
return request({
url: 'api/blade-system/dict/tree?code=DICT',
method: 'get'
})
}

View File

@ -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;
});
});
}
}

View File

@ -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: {