From 78ccb24a2075999e5187ed518521e84561e60292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Wed, 13 Sep 2023 11:41:24 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=A0=91=E5=BD=A2=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api.js | 3 +++ src/components/customField/AddForm.vue | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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) }