update 树形字典修改
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user