From b5610241bf38760ef678d9d813b23e858c76aa43 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 06 八月 2026 17:59:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0
---
src/preferences.ts | 2
src/components/form-create/components/use-api-select.tsx | 4
src/views/ai/chat/index/modules/message/list-empty.vue | 2
src/packages/effects/layouts/src/widgets/help/help.vue | 67 ----------------
src/views/bpm/processInstance/detail/modules/operation-button.vue | 56 --------------
src/packages/@core/base/shared/src/constants/vben.ts | 5
internal/vite-config/src/config/application.ts | 2
src/components/upload/file-upload.vue | 35 ++++++++
src/packages/effects/common-ui/src/ui/authentication/doc-link.vue | 41 ----------
9 files changed, 41 insertions(+), 173 deletions(-)
diff --git a/internal/vite-config/src/config/application.ts b/internal/vite-config/src/config/application.ts
index fa996b2..abfa44b 100644
--- a/internal/vite-config/src/config/application.ts
+++ b/internal/vite-config/src/config/application.ts
@@ -44,7 +44,7 @@
nitroMockOptions: {},
print: !isBuild,
printInfoMap: {
- Docs: 'https://doc.iocoder.cn/quick-start/',
+ Docs: '#',
},
pwa: true,
pwaOptions: getDefaultPwaOptions(appTitle),
diff --git a/src/components/form-create/components/use-api-select.tsx b/src/components/form-create/components/use-api-select.tsx
index 1fb4cf8..5ff3d2a 100644
--- a/src/components/form-create/components/use-api-select.tsx
+++ b/src/components/form-create/components/use-api-select.tsx
@@ -161,9 +161,9 @@
parseOptions0(data);
return;
}
- // 鎯呭喌涓夛細涓嶆槸 yudao-vue-pro 鏍囧噯杩斿洖
+ // 鎯呭喌涓夛細涓嶆槸鏍囧噯杩斿洖
console.warn(
- `鎺ュ彛[${props.url}] 杩斿洖缁撴灉涓嶆槸 yudao-vue-pro 鏍囧噯杩斿洖寤鸿閲囩敤鑷畾涔夎В鏋愬嚱鏁板鐞哷,
+ `鎺ュ彛[${props.url}] 杩斿洖缁撴灉涓嶆槸鏍囧噯杩斿洖寤鸿閲囩敤鑷畾涔夎В鏋愬嚱鏁板鐞哷,
);
}
diff --git a/src/components/upload/file-upload.vue b/src/components/upload/file-upload.vue
index fb2f1dd..b095bdd 100644
--- a/src/components/upload/file-upload.vue
+++ b/src/components/upload/file-upload.vue
@@ -10,9 +10,12 @@
import { IconifyIcon } from '@vben/icons';
import { $t } from '@vben/locales';
-import { checkFileType, isFunction, isObject, isString } from '@vben/utils';
+import { checkFileType, isFunction, isImage, isObject, isString } from '@vben/utils';
import { Button, message, Upload } from 'ant-design-vue';
+
+import { requestClient } from '#/api/request';
+import { FilePreviewModal, useFilePreview } from '#/components/file-preview';
import { UploadResultStatus } from './typing';
import { useUpload, useUploadType } from './use-upload';
@@ -139,9 +142,30 @@
}
}
+const { openPreview, previewState } = useFilePreview();
+
/** 澶勭悊鏂囦欢棰勮 */
-function handlePreview(file: UploadFile) {
- emit('preview', file);
+async function handlePreview(file: UploadFile) {
+ const url = (file as any)?.url || (file as any)?.response?.url || (file as any)?.response;
+ if (!url) {
+ message.warning('鏂囦欢鍦板潃涓嶅瓨鍦紝鏃犳硶棰勮');
+ return;
+ }
+ const name = file.name || (file as any)?.fileName || '';
+ if (isImage(name || url)) {
+ window.open(url, '_blank');
+ return;
+ }
+ try {
+ // 灏嗙粷瀵� URL 杞负鐩稿璺緞锛岃蛋 Vite 浠g悊閬垮厤璺ㄥ煙
+ const path = typeof url === 'string' ? url.replace(/^https?:\/\/[^/]+/, '') : url;
+ const blob = await requestClient.download(path);
+ const blobUrl = URL.createObjectURL(blob as Blob);
+ openPreview(blobUrl, name);
+ emit('preview', file);
+ } catch {
+ message.error('鏂囦欢鍔犺浇澶辫触');
+ }
}
/** 澶勭悊鏂囦欢鏁伴噺瓒呴檺 */
@@ -319,6 +343,11 @@
鏍煎紡鏂囦欢
</div>
</Upload>
+ <FilePreviewModal
+ v-model:visible="previewState.visible.value"
+ :file-url="previewState.fileUrl.value"
+ :file-name="previewState.fileName.value"
+ />
</div>
</template>
diff --git a/src/packages/@core/base/shared/src/constants/vben.ts b/src/packages/@core/base/shared/src/constants/vben.ts
index 5e17ca3..683f66c 100644
--- a/src/packages/@core/base/shared/src/constants/vben.ts
+++ b/src/packages/@core/base/shared/src/constants/vben.ts
@@ -2,14 +2,13 @@
* @zh_CN GITHUB 浠撳簱鍦板潃
*/
// export const VBEN_GITHUB_URL = 'https://github.com/vbenjs/vue-vben-admin';
-export const VBEN_GITHUB_URL =
- 'https://github.com/yudaocode/yudao-ui-admin-vben';
+export const VBEN_GITHUB_URL = '#';
/**
* @zh_CN 鏂囨。鍦板潃
*/
// export const VBEN_DOC_URL = 'https://doc.vben.pro';
-export const VBEN_DOC_URL = 'https://doc.iocoder.cn/';
+export const VBEN_DOC_URL = '#';
/**
* @zh_CN Vben Logo
diff --git a/src/packages/effects/common-ui/src/ui/authentication/doc-link.vue b/src/packages/effects/common-ui/src/ui/authentication/doc-link.vue
index abf43c8..4850d8e 100644
--- a/src/packages/effects/common-ui/src/ui/authentication/doc-link.vue
+++ b/src/packages/effects/common-ui/src/ui/authentication/doc-link.vue
@@ -5,44 +5,5 @@
</script>
<template>
- <div class="w-full sm:mx-auto md:max-w-md">
- <div class="mt-4 flex items-center justify-between">
- <span class="border-input w-[35%] border-b dark:border-gray-600"></span>
- <span class="text-muted-foreground text-center text-xs uppercase">
- 钀屾柊蹇呰
- </span>
- <span class="border-input w-[35%] border-b dark:border-gray-600"></span>
- </div>
-
- <div class="mt-4 flex w-full justify-between">
- <a
- href="https://doc.iocoder.cn/"
- target="_blank"
- class="text-primary hover:text-primary/80 text-sm"
- >
- 馃摎 寮�鍙戞寚鍗�
- </a>
- <a
- href="https://doc.iocoder.cn/video/"
- target="_blank"
- class="text-primary hover:text-primary/80 text-sm"
- >
- 馃敟 瑙嗛鏁欑▼
- </a>
- <a
- href="https://www.iocoder.cn/Interview/good-collection/"
- target="_blank"
- class="text-primary hover:text-primary/80 text-sm"
- >
- 鈿� 闈㈣瘯鎵嬪唽
- </a>
- <a
- href="http://static.yudao.iocoder.cn/mp/xinyu370.jpeg"
- target="_blank"
- class="text-primary hover:text-primary/80 text-sm"
- >
- 馃 澶栧寘鍜ㄨ
- </a>
- </div>
- </div>
+ <div class="w-full sm:mx-auto md:max-w-md" />
</template>
diff --git a/src/packages/effects/layouts/src/widgets/help/help.vue b/src/packages/effects/layouts/src/widgets/help/help.vue
index e902d0b..7890875 100644
--- a/src/packages/effects/layouts/src/widgets/help/help.vue
+++ b/src/packages/effects/layouts/src/widgets/help/help.vue
@@ -3,7 +3,7 @@
import { openWindow } from '../../../../../utils/src';
import { useVbenModal } from '../../../../../@core/ui-kit/popup-ui/src';
-import { Badge, VbenButton, VbenButtonGroup } from '../../../../../@core/ui-kit/shadcn-ui/src';
+import { VbenButton, VbenButtonGroup } from '../../../../../@core/ui-kit/shadcn-ui/src';
import { useMagicKeys, whenever } from '@vueuse/core';
@@ -30,77 +30,12 @@
<div class="mt-2 flex flex-col">
<div class="mt-2 flex flex-col">
<VbenButtonGroup class="basis-1/3" :gap="2" border size="large">
- <p class="w-24 p-2">椤圭洰鍦板潃:</p>
- <VbenButton
- variant="link"
- @click="
- openWindow('https://gitee.com/yudaocode/yudao-ui-admin-vben')
- "
- >
- Gitee
- </VbenButton>
- <VbenButton
- variant="link"
- @click="
- openWindow('https://github.com/yudaocode/yudao-ui-admin-vben')
- "
- >
- Github
- </VbenButton>
- </VbenButtonGroup>
-
- <VbenButtonGroup class="basis-1/3" :gap="2" border size="large">
- <p class="w-24 p-2">issues:</p>
- <VbenButton
- variant="link"
- @click="
- openWindow(
- 'https://gitee.com/yudaocode/yudao-ui-admin-vben/issues',
- )
- "
- >
- Gitee
- </VbenButton>
- <VbenButton
- variant="link"
- @click="
- openWindow(
- 'https://github.com/yudaocode/yudao-ui-admin-vben/issues',
- )
- "
- >
- Github
- </VbenButton>
- </VbenButtonGroup>
-
- <VbenButtonGroup class="basis-1/3" :gap="2" border size="large">
<p class="w-24 p-2">寮�鍙戞枃妗�:</p>
- <VbenButton
- variant="link"
- @click="openWindow('https://doc.iocoder.cn/quick-start/')"
- >
- 椤圭洰鏂囨。
- </VbenButton>
<VbenButton variant="link" @click="openWindow('https://antdv.com/')">
antdv 鏂囨。
</VbenButton>
</VbenButtonGroup>
</div>
-
- <div class="mt-2 flex justify-start">
- <p class="w-24 p-2">杞欢澶栧寘:</p>
- <img
- src="/wx-xingyu.png"
- alt="鏁拌埖绉戞妧"
- class="cursor-pointer"
- width="80%"
- @click="openWindow('https://shuduokeji.com')"
- />
- </div>
- <p class="mt-2 flex justify-center pt-4 text-sm italic">
- 鏈」鐩噰鐢� <Badge class="mx-2" variant="destructive">MIT</Badge>
- 寮�婧愬崗璁紝涓汉涓庝紒涓氬彲100% 鍏嶈垂浣跨敤
- </p>
</div>
</Modal>
</template>
diff --git a/src/preferences.ts b/src/preferences.ts
index 6b87741..fbaa7b4 100644
--- a/src/preferences.ts
+++ b/src/preferences.ts
@@ -32,7 +32,7 @@
},
copyright: {
companyName: import.meta.env.VITE_APP_TITLE,
- companySiteLink: 'https://gitee.com/yudaocode/yudao-ui-admin-vben',
+ companySiteLink: '#',
},
logo: {
source: __APP_LOGO__ || undefined,
diff --git a/src/views/ai/chat/index/modules/message/list-empty.vue b/src/views/ai/chat/index/modules/message/list-empty.vue
index 6f7b9b8..1f0b866 100644
--- a/src/views/ai/chat/index/modules/message/list-empty.vue
+++ b/src/views/ai/chat/index/modules/message/list-empty.vue
@@ -20,7 +20,7 @@
<div class="relative flex h-full w-full flex-row justify-center">
<div class="flex flex-col justify-center">
<!-- title -->
- <div class="text-center text-3xl font-bold">瓒呯骇绠$悊鍛� AI</div>
+ <div class="text-center text-3xl font-bold">AI 鍔╂墜</div>
<!-- role-list -->
<div class="mt-5 flex w-96 flex-wrap items-center justify-center">
<div
diff --git a/src/views/bpm/processInstance/detail/modules/operation-button.vue b/src/views/bpm/processInstance/detail/modules/operation-button.vue
index 248bc1d..89dc1ca 100644
--- a/src/views/bpm/processInstance/detail/modules/operation-button.vue
+++ b/src/views/bpm/processInstance/detail/modules/operation-button.vue
@@ -23,8 +23,6 @@
import { useUserStore } from '@vben/stores';
import { isEmpty } from '@vben/utils';
-import { FilePreviewModal, useFilePreview } from '#/components/file-preview';
-
import FormCreate from '@form-create/ant-design-vue';
import { until, useDebounceFn } from '@vueuse/core';
import {
@@ -787,38 +785,6 @@
approveFormRef.value?.validateFields(['signPicUrl']);
}
-/** 闄勪欢鍥剧墖棰勮 */
-const imagePreviewVisible = ref(false);
-const imagePreviewUrl = ref('');
-
-const { openPreview: openFilePreview, previewState: filePreviewState } = useFilePreview();
-
-/** 鍒ゆ柇鏂囦欢鏄惁涓哄浘鐗囩被鍨� */
-function isImageUrl(url: string) {
- return /\.(jpg|jpeg|png|gif|bmp|webp|svg)$/i.test(
- url.split(/[?#]/)[0] || '',
- );
-}
-
-/** 澶勭悊鏂囦欢棰勮 */
-function handleFilePreview(file: any) {
- if (!file?.url && !file?.response) {
- message.warning('鏂囦欢鍦板潃涓嶅瓨鍦紝鏃犳硶棰勮');
- return;
- }
- const url = file.url || file?.response?.url || file?.response;
- if (!url) {
- message.warning('鏂囦欢鍦板潃涓嶅瓨鍦紝鏃犳硶棰勮');
- return;
- }
- if (isImageUrl(url)) {
- imagePreviewUrl.value = url;
- imagePreviewVisible.value = true;
- } else {
- openFilePreview(url, file?.name);
- }
-}
-
/** 澶勭悊寮圭獥鍙鎬� */
function handlePopoverVisible(visible: boolean) {
if (!visible) {
@@ -926,7 +892,6 @@
:show-description="true"
:show-download-icon="false"
help-text="鏀寔澶氭枃浠�/鍥剧墖涓婁紶"
- @preview="handleFilePreview"
/>
</FormItem>
<FormItem>
@@ -996,7 +961,6 @@
:multiple="true"
:show-description="true"
help-text="鏀寔澶氭枃浠�/鍥剧墖涓婁紶"
- @preview="handleFilePreview"
/>
</FormItem>
<FormItem>
@@ -1543,24 +1507,4 @@
<!-- 绛惧悕寮圭獥 -->
<SignatureModal @success="handleSignFinish" />
-
- <!-- 鍥剧墖棰勮锛堥殣钘忕殑 Image 缁勪欢锛屼粎鐢ㄤ簬闄勪欢棰勮寮圭獥锛� -->
- <div style="display: none">
- <Image
- :preview="{
- visible: imagePreviewVisible,
- onVisibleChange: (visible: boolean) => {
- imagePreviewVisible = visible;
- },
- }"
- :src="imagePreviewUrl"
- />
- </div>
-
- <!-- 鏂囦欢棰勮锛圥DF/Word/Excel/PPT锛� -->
- <FilePreviewModal
- v-model:visible="filePreviewState.visible.value"
- :file-url="filePreviewState.fileUrl.value"
- :file-name="filePreviewState.fileName.value"
- />
</template>
--
Gitblit v1.9.3