diff --git a/zyplayer-doc-data/src/main/java/com/zyplayer/doc/data/service/manage/impl/ApiCustomNodeServiceImpl.java b/zyplayer-doc-data/src/main/java/com/zyplayer/doc/data/service/manage/impl/ApiCustomNodeServiceImpl.java index f1d13fa1..3e36fd62 100644 --- a/zyplayer-doc-data/src/main/java/com/zyplayer/doc/data/service/manage/impl/ApiCustomNodeServiceImpl.java +++ b/zyplayer-doc-data/src/main/java/com/zyplayer/doc/data/service/manage/impl/ApiCustomNodeServiceImpl.java @@ -37,31 +37,30 @@ public class ApiCustomNodeServiceImpl extends ServiceImpl nodeParamsWrapper = new QueryWrapper<>(); - nodeParamsWrapper.eq("node_id", apiCustomFolder.getId()); + nodeParamsWrapper.eq("node_id", apiCustomNode.getId()); ApiCustomParams customParams = apiCustomParamsService.getOne(nodeParamsWrapper); if (customParams != null) { apiCustomParams.setId(customParams.getId()); diff --git a/zyplayer-doc-ui/api-ui/.env.development b/zyplayer-doc-ui/api-ui/.env.development index 45732d00..4d516ca1 100644 --- a/zyplayer-doc-ui/api-ui/.env.development +++ b/zyplayer-doc-ui/api-ui/.env.development @@ -1,7 +1,7 @@ VITE_APP_TITLE=API文档管理 本地切换环境改这个参数,可选值:dev、online -VITE_APP_ENV=dev +VITE_APP_ENV=online # 线上环境 VITE_APP_BASE_URL_ONLINE=http://doc.zyplayer.com/zyplayer-doc-manage diff --git a/zyplayer-doc-ui/api-ui/src/components/layouts/doc-tree/CustomRequest.vue b/zyplayer-doc-ui/api-ui/src/components/layouts/doc-tree/CustomRequest.vue index 229250c2..3dd7ab11 100644 --- a/zyplayer-doc-ui/api-ui/src/components/layouts/doc-tree/CustomRequest.vue +++ b/zyplayer-doc-ui/api-ui/src/components/layouts/doc-tree/CustomRequest.vue @@ -19,6 +19,7 @@ 新建接口 新建文件夹 + 刷新 @@ -50,6 +51,9 @@ {{record.title}} @@ -86,14 +90,25 @@ FolderAddOutlined, ApiOutlined, PlusOutlined, - ExclamationCircleOutlined + ExclamationCircleOutlined, + ReloadOutlined } from '@ant-design/icons-vue'; import {zyplayerApi} from '../../../api' import {getTreeDataForTag} from '../../../assets/core/CustomRequestTreeAnalysis.js' export default { - components: {InfoCircleOutlined, FileTextOutlined, EllipsisOutlined, EditOutlined, DeleteOutlined, FolderAddOutlined, ApiOutlined, PlusOutlined}, - setup() { + components: { + InfoCircleOutlined, + FileTextOutlined, + EllipsisOutlined, + EditOutlined, + DeleteOutlined, + FolderAddOutlined, + ApiOutlined, + PlusOutlined, + ReloadOutlined, + }, + setup() { const store = useStore(); const route = useRoute(); const router = useRouter(); @@ -176,10 +191,11 @@ // 点击触发弹出事件不处理 if (visible) { record.data.editing = false; - return; } + }; + const editFolderSave = (record) => { + // 没做修改不处理 let title = record.data.titleEditing; - // 没做修改不处理 if (title === record.data.title) { return; } @@ -190,6 +206,8 @@ if (folderItem) { folderItem.name = title; } + record.data.editing = false; + message.success('修改成功'); }); }; const handleApiTitleDropdownClick = (event, record) => { @@ -242,6 +260,12 @@ changeSelectedRequestKeys(requestSaved.id); }); }); + } else if (event.key === 'refresh') { + loadDoc(choiceDocId, searchKeyword, res => { + if(res) { + message.success('重新加载成功'); + } + }); } else if (event.key === 'edit') { record.data.editing = true; } else if (event.key === 'delete') { @@ -291,6 +315,7 @@ expandedKeys, selectedKeys, editFolderVisibleChange, + editFolderSave, docChecked, treeDataDragEnd, loadDoc, diff --git a/zyplayer-doc-ui/api-ui/src/views/manage/components/EditShareInstruction.vue b/zyplayer-doc-ui/api-ui/src/views/manage/components/EditShareInstruction.vue index ec294a06..3d452429 100644 --- a/zyplayer-doc-ui/api-ui/src/views/manage/components/EditShareInstruction.vue +++ b/zyplayer-doc-ui/api-ui/src/views/manage/components/EditShareInstruction.vue @@ -1,7 +1,7 @@