Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AI_BOOK_TOOL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
AI_BOOK_TOOL
Commits
f2d92881
Commit
f2d92881
authored
Jun 11, 2025
by
15011343103
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
0a1309af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
67 deletions
+103
-67
index.css
form/index.css
+22
-0
index.html
form/index.html
+69
-67
index.js
form/index.js
+12
-0
No files found.
form/index.css
View file @
f2d92881
...
@@ -826,6 +826,28 @@ html, body {
...
@@ -826,6 +826,28 @@ html, body {
padding
:
10px
0
;
padding
:
10px
0
;
}
}
/* 添加时间轴容器的最大高度和滚动条样式 */
.upload-section
.el-timeline
{
max-height
:
400px
;
overflow-y
:
auto
;
padding-right
:
10px
;
}
/* 自定义滚动条样式 */
.upload-section
.el-timeline
::-webkit-scrollbar
{
width
:
6px
;
}
.upload-section
.el-timeline
::-webkit-scrollbar-thumb
{
background-color
:
#909399
;
border-radius
:
3px
;
}
.upload-section
.el-timeline
::-webkit-scrollbar-track
{
background-color
:
#f5f7fa
;
border-radius
:
3px
;
}
.timeline-content
h4
{
.timeline-content
h4
{
margin
:
0
0
10px
0
;
margin
:
0
0
10px
0
;
color
:
#303133
;
color
:
#303133
;
...
...
form/index.html
View file @
f2d92881
...
@@ -32,62 +32,6 @@
...
@@ -32,62 +32,6 @@
<!-- 文件上传界面 -->
<!-- 文件上传界面 -->
<div
class=
"upload-container"
v-if=
"!hasData"
>
<div
class=
"upload-container"
v-if=
"!hasData"
>
<div
class=
"upload-area"
>
<div
class=
"upload-area"
>
<div
class=
"upload-section"
>
<h3>
音频文件上传
</h3>
<el-upload
class=
"upload-box"
drag
action=
"#"
:auto-upload=
"true"
:http-request=
"handleAudioUpload"
:show-file-list=
"true"
:limit=
"1"
:on-exceed=
"handleExceed"
:before-upload=
"beforeAudioUpload"
:on-remove=
"removeAudioFile"
accept=
".mp3"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"upload-text"
>
<p>
点击或拖拽文件到此处上传
</p>
<p
class=
"upload-hint"
>
支持 .mp3 格式
</p>
</div>
</el-upload>
<el-progress
v-if=
"audioUploadProgress > 0 && audioUploadProgress < 100"
:percentage=
"audioUploadProgress"
:format=
"progressFormat"
></el-progress>
</div>
<div
class=
"upload-section"
>
<h3>
PDF文件上传
</h3>
<el-upload
class=
"upload-box"
drag
action=
"#"
:auto-upload=
"true"
:http-request=
"handlePdfUpload"
:show-file-list=
"true"
:limit=
"1"
:on-exceed=
"handleExceed"
:before-upload=
"beforePdfUpload"
:on-remove=
"removePdfFile"
accept=
".pdf"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"upload-text"
>
<p>
点击或拖拽文件到此处上传
</p>
<p
class=
"upload-hint"
>
支持 .pdf 格式
</p>
</div>
</el-upload>
<el-progress
v-if=
"pdfUploadProgress > 0 && pdfUploadProgress < 100"
:percentage=
"pdfUploadProgress"
:format=
"progressFormat"
></el-progress>
</div>
<!-- 添加任务处理进度时间轴 -->
<!-- 添加任务处理进度时间轴 -->
<div
class=
"upload-section"
v-if=
"queueTasks.length > 0"
>
<div
class=
"upload-section"
v-if=
"queueTasks.length > 0"
>
<h3>
处理进度
</h3>
<h3>
处理进度
</h3>
...
@@ -97,7 +41,7 @@
...
@@ -97,7 +41,7 @@
:key=
"index"
:key=
"index"
:type=
"getTimelineItemType(task.step_status)"
:type=
"getTimelineItemType(task.step_status)"
:color=
"getTimelineItemColor(task.step_status)"
:color=
"getTimelineItemColor(task.step_status)"
:timestamp=
"
task.create_at
"
:timestamp=
"
formatTimestamp(task.create_at)
"
>
>
<div
class=
"timeline-content"
>
<div
class=
"timeline-content"
>
<h4>
{{ task.step_code_desc }}
</h4>
<h4>
{{ task.step_code_desc }}
</h4>
...
@@ -111,16 +55,74 @@
...
@@ -111,16 +55,74 @@
</el-timeline>
</el-timeline>
</div>
</div>
<div
class=
"upload-actions"
>
<template
v-if=
"queueTasks.length === 0"
>
<el-button
<div
class=
"upload-section"
>
type=
"primary"
<h3>
音频文件上传
</h3>
size=
"large"
<el-upload
:disabled=
"!isUploadComplete"
class=
"upload-box"
@
click=
"handleProcess"
drag
>
action=
"#"
开始处理
:auto-upload=
"true"
</el-button>
:http-request=
"handleAudioUpload"
</div>
:show-file-list=
"true"
:limit=
"1"
:on-exceed=
"handleExceed"
:before-upload=
"beforeAudioUpload"
:on-remove=
"removeAudioFile"
accept=
".mp3"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"upload-text"
>
<p>
点击或拖拽文件到此处上传
</p>
<p
class=
"upload-hint"
>
支持 .mp3 格式
</p>
</div>
</el-upload>
<el-progress
v-if=
"audioUploadProgress > 0 && audioUploadProgress < 100"
:percentage=
"audioUploadProgress"
:format=
"progressFormat"
></el-progress>
</div>
<div
class=
"upload-section"
>
<h3>
PDF文件上传
</h3>
<el-upload
class=
"upload-box"
drag
action=
"#"
:auto-upload=
"true"
:http-request=
"handlePdfUpload"
:show-file-list=
"true"
:limit=
"1"
:on-exceed=
"handleExceed"
:before-upload=
"beforePdfUpload"
:on-remove=
"removePdfFile"
accept=
".pdf"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"upload-text"
>
<p>
点击或拖拽文件到此处上传
</p>
<p
class=
"upload-hint"
>
支持 .pdf 格式
</p>
</div>
</el-upload>
<el-progress
v-if=
"pdfUploadProgress > 0 && pdfUploadProgress < 100"
:percentage=
"pdfUploadProgress"
:format=
"progressFormat"
></el-progress>
</div>
<div
class=
"upload-actions"
>
<el-button
type=
"primary"
size=
"large"
:disabled=
"!isUploadComplete"
@
click=
"handleProcess"
>
开始处理
</el-button>
</div>
</template>
</div>
</div>
</div>
</div>
...
...
form/index.js
View file @
f2d92881
...
@@ -2260,6 +2260,18 @@ new Vue({
...
@@ -2260,6 +2260,18 @@ new Vue({
default
:
return
''
;
default
:
return
''
;
}
}
},
},
formatTimestamp
(
timestamp
)
{
if
(
!
timestamp
)
return
''
;
const
date
=
new
Date
(
timestamp
);
const
year
=
date
.
getFullYear
();
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
'
0
'
);
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
'
0
'
);
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
'
0
'
);
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
'
0
'
);
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
'
0
'
);
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
},
},
},
beforeDestroy
()
{
beforeDestroy
()
{
...
...
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