diff --git a/src/api/api.js b/src/api/api.js index 13322342..9b578556 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -64,6 +64,8 @@ const addDictItem = (params) => postAction('/sys/dictItem/add', params) const editDictItem = (params) => postAction('/sys/dictItem/edit', params) // 获得数据字典的树形格式数据 const getDictTreeList = (params) => getAction('/sys/dictItem/treeList', params) +// 获取能在form中使用的数据字典树形格式数据 +const getFormDictTreeList = (params) => getAction('/sys/dictItem/treeListOption', params) // 字典标签专用(通过code获取字典数组) export const ajaxGetDictItems = (code, params) => getAction(`/sys/dict/getDictItems/${code}`, params) @@ -165,6 +167,7 @@ export { addDictItem, editDictItem, getDictTreeList, + getFormDictTreeList, doReleaseData, doReovkeData, getLoginfo, diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index 6b2b6c07..ddbfe997 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -240,7 +240,7 @@ import { FieldType } from '../../enums/commonEnums' import JMultipleDatePicker from '../JMultipleDatePicker' import UserSelection from '../selection/UserSelection' import { getAction } from '../../api/manage.js' -import { getDictTreeList } from '../../api/api.js' +import { getFormDictTreeList } from '../../api/api.js' export default { name: 'AddForm', @@ -416,7 +416,7 @@ export default { }) } if (item.fieldShowType === FieldType.TREE.value && item.dictId) { - getDictTreeList({ dictId: item.dictId }).then(res => { + getFormDictTreeList({ dictId: item.dictId }).then(res => { if (res.success) { this.$set(this.optionsData, item.dbFieldName, res.result) }