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
7f7c03c9
Commit
7f7c03c9
authored
Jun 03, 2025
by
15011343103
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 控制编辑状态
parent
1e3c2fff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
index.css
form/index.css
+1
-0
index.html
form/index.html
+6
-2
index.js
form/index.js
+12
-0
No files found.
form/index.css
View file @
7f7c03c9
...
@@ -295,6 +295,7 @@ html, body {
...
@@ -295,6 +295,7 @@ html, body {
}
}
.group-title
{
.group-title
{
display
:
inline-block
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#303133
;
color
:
#303133
;
...
...
form/index.html
View file @
7f7c03c9
...
@@ -180,12 +180,13 @@
...
@@ -180,12 +180,13 @@
<!-- 选中组的编辑区域 -->
<!-- 选中组的编辑区域 -->
<template
v-if=
"currentPage && selectedGroup !== null && currentGroup"
>
<template
v-if=
"currentPage && selectedGroup !== null && currentGroup"
>
<div
class=
"group-header"
>
<div
class=
"group-header"
>
<
span
class=
"group-title"
>
组编辑
</span
>
<
div
class=
"group-title"
>
组编辑
<span
v-if=
"!isPageLocked"
style=
"margin-left: 10px; font-size: 12px; color: #999;"
>
(锁定后可编辑)
</span>
</div
>
<el-button
type=
"danger"
size=
"small"
@
click=
"deleteGroup"
>
删除整组
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"deleteGroup"
>
删除整组
</el-button>
</div>
</div>
<el-form
label-width=
"100px"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"英文句子"
>
<el-form-item
label=
"英文句子"
>
<el-input
<el-input
:disabled=
"!isPageLocked"
type=
"textarea"
type=
"textarea"
:rows=
"3"
:rows=
"3"
v-model=
"currentGroup.sentence"
v-model=
"currentGroup.sentence"
...
@@ -194,6 +195,7 @@
...
@@ -194,6 +195,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"中文翻译"
>
<el-form-item
label=
"中文翻译"
>
<el-input
<el-input
:disabled=
"!isPageLocked"
type=
"textarea"
type=
"textarea"
:rows=
"3"
:rows=
"3"
v-model=
"currentGroup.sentence_cn"
v-model=
"currentGroup.sentence_cn"
...
@@ -203,6 +205,7 @@
...
@@ -203,6 +205,7 @@
<el-form-item
label=
"时间范围"
>
<el-form-item
label=
"时间范围"
>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-input
<el-input
:disabled=
"!isPageLocked"
v-model=
"currentGroup.start"
v-model=
"currentGroup.start"
size=
"small"
size=
"small"
placeholder=
"开始时间"
>
placeholder=
"开始时间"
>
...
@@ -220,6 +223,7 @@
...
@@ -220,6 +223,7 @@
<el-col
class=
"line"
:span=
"2"
>
-
</el-col>
<el-col
class=
"line"
:span=
"2"
>
-
</el-col>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-input
<el-input
:disabled=
"!isPageLocked"
v-model=
"currentGroup.end"
v-model=
"currentGroup.end"
size=
"small"
size=
"small"
placeholder=
"结束时间"
>
placeholder=
"结束时间"
>
...
@@ -335,7 +339,7 @@
...
@@ -335,7 +339,7 @@
/>
/>
</el-select>
</el-select>
<
span>
当前时间:{{ Math.round(currentTime*100)/100 }} 秒
</span
>
<
div
style=
"margin-left: 10px; display: inline-block; width: 200px;"
>
当前时间:
<div
style=
"display: inline-block; width: 50px;"
>
{{ formatTime(currentTime) }}
</div>
秒
</div
>
<el-button
:disabled=
"!isDataModified && !isPreviewMode"
type=
"success"
@
click=
"save()"
>
<el-button
:disabled=
"!isDataModified && !isPreviewMode"
type=
"success"
@
click=
"save()"
>
保存修改
保存修改
</el-button>
</el-button>
...
...
form/index.js
View file @
7f7c03c9
...
@@ -2033,6 +2033,18 @@ new Vue({
...
@@ -2033,6 +2033,18 @@ new Vue({
console
.
log
(
'
----save----
'
);
console
.
log
(
'
----save----
'
);
this
.
isDataModified
=
false
;
this
.
isDataModified
=
false
;
},
t_name
);
},
t_name
);
},
// 处理秒的显示
formatTime
(
_seconds
)
{
let
seconds
=
Math
.
round
(
_seconds
*
100
)
/
100
;
// 小数点后保留两位,如果只有一位则补充 0
if
(
seconds
.
toString
().
indexOf
(
'
.
'
)
===
-
1
)
{
seconds
=
seconds
+
'
.00
'
;
}
else
if
(
seconds
.
toString
().
indexOf
(
'
.
'
)
===
seconds
.
toString
().
length
-
2
)
{
seconds
=
seconds
+
'
0
'
;
}
return
seconds
.
toString
();
}
}
},
},
...
...
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