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
ce52db0f
Commit
ce52db0f
authored
May 22, 2025
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
d8ded133
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
index.html
form/index.html
+3
-0
index.js
form/index.js
+22
-4
No files found.
form/index.html
View file @
ce52db0f
...
...
@@ -332,6 +332,9 @@
</el-select>
<span>
当前时间:{{ Math.round(currentTime*100)/100 }} 秒
</span>
<el-button
:disabled=
"!isDataModified && !isPreviewMode"
type=
"success"
@
click=
"save()"
>
保存修改
</el-button>
</div>
</div>
</div>
...
...
form/index.js
View file @
ce52db0f
var
t_name
=
'
AI_BOOK_TOOL
'
;
new
Vue
({
el
:
'
#app
'
,
data
:
{
...
...
@@ -62,6 +63,8 @@ new Vue({
currentPlaybackRate
:
1
,
previewTimer
:
null
,
lastCheckedTime
:
0
,
// 用于优化检查间隔
isDataModified
:
false
,
},
mounted
()
{
...
...
@@ -87,11 +90,18 @@ new Vue({
this
.
$message
.
info
(
'
正在加载数据...
'
);
try
{
let
data
=
await
new
Promise
((
resolve
)
=>
{
window
.
courseware
.
getData
((
data
)
=>
{
resolve
(
data
);
});
});
if
(
!
data
)
{
const
response
=
await
fetch
(
'
./defaultData.json
'
);
if
(
!
response
.
ok
)
{
throw
new
Error
(
'
Network response was not ok
'
);
}
const
data
=
await
response
.
json
();
data
=
await
response
.
json
();
}
this
.
audioPoints
=
data
.
audio_points
;
this
.
pages
=
data
.
pages
;
...
...
@@ -1039,6 +1049,8 @@ new Vue({
group
.
sentence
=
texts
.
join
(
'
'
);
}
this
.
pages
[
this
.
currentPageIndex
-
1
]
=
this
.
currentPage
;
this
.
isDataModified
=
true
;
this
.
$message
.
success
(
'
删除成功
'
);
}
catch
(
err
)
{
console
.
error
(
'
Error deleting rectangle from group:
'
,
err
);
...
...
@@ -1966,6 +1978,12 @@ new Vue({
this
.
currentPlaybackRate
=
rate
;
this
.
wavesurfer
.
setPlaybackRate
(
rate
);
},
save
()
{
if
(
!
this
.
isDataModified
)
return
;
console
.
log
(
'
----save----
'
);
}
},
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