diff --git a/src/views/system/tags/modules/TagContentDictItemModal.vue b/src/views/system/tags/modules/TagContentDictItemModal.vue index 5f9cdb4..746c619 100644 --- a/src/views/system/tags/modules/TagContentDictItemModal.vue +++ b/src/views/system/tags/modules/TagContentDictItemModal.vue @@ -176,6 +176,10 @@ export default { } else { obj = editDictItem } + // 树形结构没有parentId说明是一级 + if (this.attributeType === TagsAttributeTypeEnums.TREE.value && !params.parentId) { + params.parentId = '0' + } obj(params).then((res) => { if (res.success) { that.$message.success(res.message) diff --git a/src/views/system/tags/modules/TagContentDictListDrawer.vue b/src/views/system/tags/modules/TagContentDictListDrawer.vue index 22e337d..1c975c0 100644 --- a/src/views/system/tags/modules/TagContentDictListDrawer.vue +++ b/src/views/system/tags/modules/TagContentDictListDrawer.vue @@ -150,7 +150,7 @@ export default { }, // 树形结构对应的接口 treeUrl: { - list: 'sys/dictItem/treeList', + list: 'sys/dictItem/treeListByTag', delete: 'sys/dictItem/delete', deleteBatch: 'sys/dictItem/deleteBatch' },