mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-08-12 07:25:39 +08:00
refactor(admin): 用户协议页面迁移至 system/basic/protocol
API 与视图从 system/protocol 迁到 system/basic/protocol,并同步协议展示入口引用。
This commit is contained in:
@@ -19,7 +19,7 @@ export const UserProtocolVersionApi = {
|
||||
return defHttp.post({ url: '/user/protocol/version/add', data });
|
||||
},
|
||||
/** 查询新建草稿可继承的源版本(已发布优先, 否则最新归档) */
|
||||
findInheritSource(protocolId: string, language: string): Promise<Result<UserProtocolVersion | null>> {
|
||||
findInheritSource(protocolId: string, language: string): Promise<Result<null | UserProtocolVersion>> {
|
||||
return defHttp.get({
|
||||
url: '/user/protocol/version/find-inherit-source',
|
||||
params: { protocolId, language },
|
||||
@@ -6,7 +6,7 @@
|
||||
import dayjs from 'dayjs';
|
||||
import { MdPreview } from 'md-editor-v3';
|
||||
|
||||
import { UserProtocolApi, type UserProtocolContent } from '#/api/system/protocol/user-protocol.api';
|
||||
import { UserProtocolApi, type UserProtocolContent } from '#/api/system/basic/protocol/user-protocol.api';
|
||||
|
||||
import 'md-editor-v3/lib/preview.css';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { type UserProtocol, UserProtocolApi } from '#/api/system/protocol/user-protocol.api';
|
||||
import { type UserProtocol, UserProtocolApi } from '#/api/system/basic/protocol/user-protocol.api';
|
||||
import { FormEditType } from '#/enums/formEditType';
|
||||
import { useFormEdit } from '#/hooks/useFormEdit';
|
||||
import { useMessage } from '#/hooks/useMessage';
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { IconifyIcon } from '@vben-core/icons';
|
||||
|
||||
import { UserProtocolApi } from '#/api/system/protocol/user-protocol.api';
|
||||
import { UserProtocolApi } from '#/api/system/basic/protocol/user-protocol.api';
|
||||
import { BQuery, type QueryField } from '#/components/query';
|
||||
import { FormEditType } from '#/enums/formEditType';
|
||||
import { useMessage } from '#/hooks/useMessage';
|
||||
@@ -223,12 +223,8 @@
|
||||
|
||||
/** 确认复制 */
|
||||
async function confirmCopy() {
|
||||
try {
|
||||
await copyFormRef.value?.validate();
|
||||
} catch {
|
||||
// 校验失败: 表单已显示错误提示; 拒绝以阻止 modal 关闭
|
||||
return Promise.reject();
|
||||
}
|
||||
// 校验失败: 表单已显示错误提示; 抛出异常以阻止 modal 关闭
|
||||
await copyFormRef.value?.validate();
|
||||
return UserProtocolApi.copyToClient(copySourceId.value, copyForm.value.clientType!).then(() => {
|
||||
message.success($t('common.operationSuccess'));
|
||||
copyVisible.value = false;
|
||||
@@ -5,7 +5,10 @@
|
||||
|
||||
import { MdEditor, MdPreview } from 'md-editor-v3';
|
||||
|
||||
import { type UserProtocolVersion, UserProtocolVersionApi } from '#/api/system/protocol/user-protocol-version.api';
|
||||
import {
|
||||
type UserProtocolVersion,
|
||||
UserProtocolVersionApi,
|
||||
} from '#/api/system/basic/protocol/user-protocol-version.api';
|
||||
import { FormEditType } from '#/enums/formEditType';
|
||||
import { useFormEdit } from '#/hooks/useFormEdit';
|
||||
import { useMessage } from '#/hooks/useMessage';
|
||||
@@ -4,10 +4,11 @@
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { IconifyIcon } from '@vben-core/icons';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { UserProtocolVersionApi } from '#/api/system/protocol/user-protocol-version.api';
|
||||
import { IconifyIcon } from '@vben-core/icons';
|
||||
|
||||
import { UserProtocolVersionApi } from '#/api/system/basic/protocol/user-protocol-version.api';
|
||||
import { FormEditType } from '#/enums/formEditType';
|
||||
import { useMessage } from '#/hooks/useMessage';
|
||||
|
||||
Reference in New Issue
Block a user