Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yl16_ai_cartoon
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
yl16_ai_cartoon
Commits
f169b8a3
Commit
f169b8a3
authored
Mar 11, 2026
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
9d944887
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
944 additions
and
38 deletions
+944
-38
index.css
form/index.css
+294
-2
index.html
form/index.html
+198
-6
index.js
form/index.js
+452
-30
No files found.
form/index.css
View file @
f169b8a3
.edit-data
{
padding
:
10px
;
html
,
body
{
height
:
100%
;
}
body
{
margin
:
0
;
}
.page
{
padding
:
15px
;
box-sizing
:
border-box
;
height
:
100vh
;
background
:
#f5f7fa
;
}
[
v-cloak
]
{
display
:
none
;
}
.split
{
height
:
calc
(
100vh
-
30px
);
display
:
flex
;
gap
:
15px
;
}
.split
>
.el-col
{
float
:
none
;
flex
:
1
;
max-width
:
none
;
}
.panel
{
background
:
#fff
;
border-radius
:
6px
;
padding
:
16px
;
box-sizing
:
border-box
;
height
:
100%
;
overflow
:
auto
;
border
:
1px
solid
#ebeef5
;
}
.panel-title
{
font-size
:
16px
;
font-weight
:
600
;
margin-bottom
:
16px
;
color
:
#303133
;
}
.panel-actions
{
margin-bottom
:
12px
;
}
.group-card
{
padding
:
12px
;
border
:
1px
solid
#ebeef5
;
border-radius
:
6px
;
margin-bottom
:
12px
;
background
:
#fafafa
;
}
.group-row
{
display
:
flex
;
align-items
:
center
;
gap
:
12px
;
padding
:
6px
4px
;
flex-wrap
:
wrap
;
}
.group-title
{
font-size
:
14px
;
font-weight
:
600
;
color
:
#303133
;
}
.group-row-item
{
display
:
flex
;
align-items
:
center
;
}
.group-row-actions
{
margin-left
:
auto
;
display
:
flex
;
gap
:
8px
;
}
.image-thumb
{
width
:
52px
;
height
:
52px
;
border-radius
:
4px
;
object-fit
:
cover
;
border
:
1px
solid
#dcdfe6
;
cursor
:
pointer
;
}
.audio-icon
{
width
:
40px
;
height
:
40px
;
border-radius
:
50%
;
background
:
#f2f6fc
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#409eff
;
border
:
1px
solid
#dcdfe6
;
cursor
:
pointer
;
}
.audio-icon.playing
{
background
:
#ecf5ff
;
border-color
:
#b3d8ff
;
}
.hidden-audio
{
display
:
none
;
}
.group-progress
{
margin-top
:
8px
;
}
.group-detail
{
margin-top
:
8px
;
}
.ai-tag-content
{
margin-top
:
8px
;
font-size
:
12px
;
color
:
#606266
;
background
:
#fff
;
border
:
1px
dashed
#dcdfe6
;
border-radius
:
4px
;
padding
:
8px
;
line-height
:
18px
;
}
.ai-status
{
font-size
:
12px
;
color
:
#409eff
;
margin-bottom
:
6px
;
}
.ai-status.error
{
color
:
#f56c6c
;
}
.empty-text
{
color
:
#909399
;
}
.json-editor
{
display
:
block
;
}
.json-node
{
margin-bottom
:
6px
;
}
.json-children
{
padding-left
:
12px
;
border-left
:
1px
dashed
#ebeef5
;
margin-left
:
4px
;
}
.json-leaf
{
display
:
flex
;
align-items
:
center
;
gap
:
8px
;
margin
:
4px
0
;
}
.json-label
{
min-width
:
90px
;
color
:
#303133
;
font-size
:
12px
;
word-break
:
break-all
;
}
.json-table
{
width
:
100%
;
border-collapse
:
collapse
;
font-size
:
12px
;
}
.json-table
th
,
.json-table
td
{
border
:
1px
solid
#ebeef5
;
padding
:
6px
8px
;
vertical-align
:
top
;
}
.json-col-index
{
width
:
60px
;
text-align
:
center
;
color
:
#606266
;
}
.json-col-action
{
width
:
80px
;
text-align
:
center
;
}
.json-nested-hint
{
color
:
#909399
;
}
.json-table-detail
td
{
background
:
#fafafa
;
}
.ai-dialog-table
{
margin-top
:
8px
;
}
.ai-table
{
width
:
100%
;
border-collapse
:
collapse
;
font-size
:
12px
;
}
.ai-table
th
,
.ai-table
td
{
border
:
1px
solid
#ebeef5
;
padding
:
6px
8px
;
vertical-align
:
top
;
}
.ai-col-index
{
width
:
60px
;
text-align
:
center
;
color
:
#606266
;
}
.ai-col-text
{
width
:
180px
;
}
.ai-col-time
{
width
:
110px
;
}
.ai-subtable
{
width
:
100%
;
border-collapse
:
collapse
;
font-size
:
12px
;
}
.ai-subtable
th
,
.ai-subtable
td
{
border
:
1px
solid
#ebeef5
;
padding
:
4px
6px
;
}
.uploader
.hint
{
margin-left
:
10px
;
color
:
#909399
;
font-size
:
12px
;
}
.upload-progress
{
width
:
100%
;
}
.upload-progress
.progress-info
{
display
:
flex
;
justify-content
:
space-between
;
color
:
#606266
;
font-size
:
12px
;
margin-bottom
:
6px
;
}
.image-preview
{
width
:
100%
;
max-height
:
260px
;
object-fit
:
contain
;
background
:
#f2f2f2
;
cursor
:
pointer
;
}
.audio-preview
{
width
:
100%
;
}
.image-preview-dialog
.el-message-box__content
{
text-align
:
center
;
}
.meta
{
font-size
:
13px
;
color
:
#606266
;
line-height
:
22px
;
}
.json-alert
{
margin-top
:
12px
;
}
\ No newline at end of file
form/index.html
View file @
f169b8a3
...
...
@@ -9,17 +9,209 @@
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/jquery-1.12.3.min.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/vue.min.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/crypto-js.min.js"
></script>
<script
type=
"text/javascript"
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/aliyun-oss-sdk-6.18.1.min.js"
></script>
<!-- 引入样式 -->
<link
href=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/element-ui/theme-chalk/index.css"
rel=
"stylesheet"
>
<!-- 引入组件库 -->
<script
src=
"//teach.cdn.ireadabc.com/h5template/h5-static-lib/js/element-ui/index.js"
></script>
</head>
<body>
<div
class=
"edit-data"
>
<!-- 简单的例子,一个输入框+一个按钮,保存输入框的信息 -->
test:
<input
type=
"text"
name=
"test"
/>
<input
id=
"save"
type=
"button"
value=
"保存"
>
</div>
<body>
<div
id=
"app"
v-cloak
class=
"page"
>
<el-row
:gutter=
"0"
class=
"split"
>
<el-col
:span=
"12"
class=
"panel"
>
<div
class=
"panel-title"
>
内容录入区
</div>
<el-form
label-width=
"90px"
size=
"small"
>
<el-form-item
label=
"上传图片"
>
<el-upload
v-if=
"!imagePreviewUrl"
ref=
"imageUpload"
class=
"uploader"
:show-file-list=
"false"
:before-upload=
"beforeImageUpload"
:on-change=
"handleImageChange"
:on-error=
"handleUploadError"
accept=
"image/*"
>
<el-button
type=
"primary"
:disabled=
"uploading"
>
选择图片
</el-button>
<span
class=
"hint"
>
支持重复上传,会覆盖当前图片
</span>
</el-upload>
<el-button
v-else
type=
"warning"
:disabled=
"uploading"
@
click=
"confirmImageReupload"
>
重新上传
</el-button>
</el-form-item>
<el-form-item
label=
"图片预览"
v-if=
"imagePreviewUrl"
>
<img
class=
"image-preview"
:src=
"imagePreviewUrl"
alt=
"图片预览"
@
click=
"openImagePreview"
></img>
</el-form-item>
<el-form-item
label=
"上传音频"
>
<el-upload
v-if=
"!audioPreviewUrl"
ref=
"audioUpload"
class=
"uploader"
:show-file-list=
"false"
:before-upload=
"beforeAudioUpload"
:on-change=
"handleAudioChange"
:on-error=
"handleUploadError"
accept=
"audio/*"
>
<el-button
type=
"primary"
:disabled=
"uploading"
>
选择音频
</el-button>
<span
class=
"hint"
>
支持重复上传,会覆盖当前音频
</span>
</el-upload>
<el-button
v-else
type=
"warning"
:disabled=
"uploading"
@
click=
"confirmAudioReupload"
>
重新上传
</el-button>
</el-form-item>
<el-form-item
label=
"上传进度"
v-if=
"uploading"
>
<div
class=
"upload-progress"
>
<div
class=
"progress-info"
>
<span>
正在上传{{ currentUploadType === 'image' ? '图片' : '音频' }}...
</span>
<span>
{{ uploadProgress }}%
</span>
</div>
<el-progress
:percentage=
"uploadProgress"
:stroke-width=
"8"
:show-text=
"false"
status=
"success"
>
</el-progress>
</div>
</el-form-item>
<el-form-item
label=
"音频试听"
v-if=
"audioPreviewUrl"
>
<audio
class=
"audio-preview"
controls
:src=
"audioPreviewUrl"
></audio>
</el-form-item>
<el-form-item
label=
"操作"
>
<el-button
type=
"success"
@
click=
"handleAiTag"
>
AI打点
</el-button>
<el-button
type=
"info"
@
click=
"openAiDialog"
>
编辑AI打点内容
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleAiImage"
>
AI图片理解
</el-button>
<el-button
type=
"info"
plain
@
click=
"openAiImageDialog"
>
编辑AI图片理解内容
</el-button>
</el-form-item>
</el-form>
</el-col>
<el-dialog
title=
"打点信息"
:visible
.
sync=
"aiDialogVisible"
width=
"70%"
@
close=
"closeAiDialog"
>
<div>
<div
class=
"ai-status"
v-if=
"aiLoading"
>
AI打点处理中...
</div>
<div
class=
"ai-status error"
v-else-if=
"aiError"
>
{{ aiError }}
</div>
<div
v-if=
"aiTagData && aiTagData.length"
class=
"ai-dialog-table"
>
<table
class=
"ai-table"
>
<thead>
<tr>
<th
class=
"ai-col-index"
>
序号
</th>
<th
class=
"ai-col-text"
>
文本
</th>
<th
class=
"ai-col-time"
>
开始时间
</th>
<th
class=
"ai-col-time"
>
结束时间
</th>
<th
class=
"ai-col-words"
>
单词
</th>
</tr>
</thead>
<tbody>
<tr
v-for=
"(row, rowIndex) in aiTagData"
:key=
"rowIndex"
>
<td
class=
"ai-col-index"
>
{{ rowIndex + 1 }}
</td>
<td
class=
"ai-col-text"
>
<el-input
size=
"mini"
v-model=
"row.text"
@
input=
"saveData"
></el-input>
</td>
<td
class=
"ai-col-time"
>
<el-input
size=
"mini"
v-model=
"row.start"
@
input=
"saveData"
></el-input>
</td>
<td
class=
"ai-col-time"
>
<el-input
size=
"mini"
v-model=
"row.end"
@
input=
"saveData"
></el-input>
</td>
<td
class=
"ai-col-words"
>
<table
class=
"ai-subtable"
v-if=
"row.words && row.words.length"
>
<thead>
<tr>
<th>
单词
</th>
<th>
开始时间
</th>
<th>
结束时间
</th>
</tr>
</thead>
<tbody>
<tr
v-for=
"(word, wordIndex) in row.words"
:key=
"wordIndex"
>
<td>
<el-input
size=
"mini"
v-model=
"word.word"
@
input=
"saveData"
></el-input>
</td>
<td>
<el-input
size=
"mini"
v-model=
"word.start"
@
input=
"saveData"
></el-input>
</td>
<td>
<el-input
size=
"mini"
v-model=
"word.end"
@
input=
"saveData"
></el-input>
</td>
</tr>
</tbody>
</table>
<div
v-else
class=
"empty-text"
>
暂无单词
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div
v-else
class=
"empty-text"
>
暂无打点内容
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeAiDialog"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"saveAiDialog"
>
保存
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"AI图片理解"
:visible
.
sync=
"aiImageDialogVisible"
width=
"60%"
@
close=
"closeAiImageDialog"
>
<div>
<div
class=
"ai-status"
v-if=
"aiImageLoading"
>
AI图片理解处理中...
</div>
<div
class=
"ai-status error"
v-else-if=
"aiImageError"
>
{{ aiImageError }}
</div>
<el-input
type=
"textarea"
:rows=
"10"
v-model=
"aiImageContent"
placeholder=
"请输入 AI 图片理解内容"
></el-input>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"closeAiImageDialog"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"saveAiImageDialog"
>
保存
</el-button>
</span>
</el-dialog>
<el-col
:span=
"12"
class=
"panel"
>
<div
class=
"panel-title"
>
AI 编排脚本区
</div>
<el-input
type=
"textarea"
:rows=
"16"
v-model=
"scriptText"
placeholder=
"请输入 JSON"
></el-input>
<el-alert
v-if=
"jsonError"
type=
"error"
:closable=
"false"
class=
"json-alert"
:title=
"jsonError"
></el-alert>
<el-alert
v-else
type=
"success"
:closable=
"false"
class=
"json-alert"
title=
"JSON 格式正确"
></el-alert>
</el-col>
</el-row>
</div>
</body>
<script
src=
"./index.js"
></script>
</html>
\ No newline at end of file
form/index.js
View file @
f169b8a3
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