Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hr-admin-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
anjia-hr
hr-admin-view
Commits
f12404d6
Commit
f12404d6
authored
Dec 09, 2025
by
刘斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 测试文件预览3
parent
4d07056f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
289 additions
and
246 deletions
+289
-246
package.json
apps/web-antd/package.json
+1
-0
modal.vue
apps/web-antd/src/views/hr/laborCost/modal.vue
+12
-7
vite.config.mts
apps/web-antd/vite.config.mts
+7
-0
pnpm-lock.yaml
pnpm-lock.yaml
+269
-239
No files found.
apps/web-antd/package.json
View file @
f12404d6
...
...
@@ -46,6 +46,7 @@
"@vueuse/core"
:
"catalog:"
,
"ant-design-vue"
:
"catalog:"
,
"dayjs"
:
"catalog:"
,
"js-base64"
:
"3.7.8"
,
"lodash-es"
:
"^4.17.21"
,
"pinia"
:
"catalog:"
,
"tinymce"
:
"7.9.1"
,
...
...
apps/web-antd/src/views/hr/laborCost/modal.vue
View file @
f12404d6
...
...
@@ -3,9 +3,9 @@ import { ref } from 'vue';
import
{
useVbenModal
}
from
'@vben/common-ui'
;
import
{
ossInfo
}
from
'#/api/system/oss
'
;
import
{
Base64
}
from
'js-base64
'
;
import
{
urlToBase64
}
from
'../../../utils/file/base64Conver
'
;
import
{
ossInfo
}
from
'#/api/system/oss
'
;
// const emit = defineEmits
<
{
// success: [];
...
...
@@ -74,11 +74,16 @@ const [BasicModal, modalApi] = useVbenModal({
if
(
ossId
)
{
const
resp
=
await
ossInfo
(
ossId
);
const
ossData
=
resp
[
0
];
ossData
.
url
=
(
ossData
?.
url
as
string
).
replace
(
'http://cdn.hr.antaikeji.top'
,
'/oss-proxy'
,
);
url
.
value
=
`/file-preview/onlinePreview?url=
${
encodeURIComponent
(
await
urlToBase64
(
ossData
.
url
))}
`
;
// ossData.url = (ossData?.url as string).replace(
// 'http://cdn.hr.antaikeji.top',
// '/oss-proxy',
// );
// console.log('[ossData.url)]', ossData.url);
const
base64
=
encodeURIComponent
(
Base64
.
encode
(
ossData
.
url
));
// console.log('[base64]', base64);
url
.
value
=
`/file-preview/onlinePreview?url=
${
encodeURIComponent
(
base64
)}
`
;
// url.value = `http://119.184.127.215:18010/file-preview/onlinePreview?url=${base64}`;
// url.value = `http://172.16.200.110:8012/onlinePreview?url=${base64}`;
// console.log('[url.value]', url.value);
// formData.value = data;
// await formApi.setValues(formData.value);
...
...
apps/web-antd/vite.config.mts
View file @
f12404d6
...
...
@@ -13,6 +13,13 @@ export default defineConfig(async () => {
target: 'http://localhost:9000/api',
ws: true,
},
'/file-preview': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/file-preview/, ''),
// mock代理目标地址
target: 'http://119.184.127.215:18010/file-preview',
ws: true,
},
},
},
},
...
...
pnpm-lock.yaml
View file @
f12404d6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment