Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
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
罗超
confucius
Commits
1ca725b5
Commit
1ca725b5
authored
Jan 13, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
721eae4a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
chapterEditor.vue
src/pages/course/chapterEditor.vue
+22
-12
No files found.
src/pages/course/chapterEditor.vue
View file @
1ca725b5
...
...
@@ -216,7 +216,7 @@
opacity
:
0.75
}
,
defaultChapterId
:
0
,
defaultExpandedKeys
:
[],
//默认展开数组
defaultExpandedKeys
:
[],
//默认展开数组
splitterModel
:
30
,
//左侧默认占据多大
isShowChapter
:
false
,
//是否显示导入
chapterObj
:
{
}
,
...
...
@@ -313,14 +313,16 @@
position
:
'top'
}
)
this
.
questionData
=
res
.
Data
;
this
.
getAllWords
();
this
.
refreshWordsPage
();
}
}
)
}
,
//导入成功获取所有
getAllWords
(
ChapterId
)
{
this
.
wordMsg
.
CourseId
=
this
.
courseId
;
if
(
ChapterId
)
{
this
.
wordMsg
.
ChapterId
=
ChapterId
;
}
GetCourseWordsPage
(
this
.
wordMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
WordData
=
res
.
Data
.
PageData
;
...
...
@@ -328,6 +330,11 @@
}
}
)
}
,
//刷新单词
refreshWordsPage
(
ChapterId
)
{
this
.
wordMsg
.
PageIndex
=
1
;
this
.
getAllWords
(
ChapterId
);
}
,
changePage
(
val
)
{
this
.
wordMsg
.
PageIndex
=
val
;
this
.
getAllWords
();
...
...
@@ -354,7 +361,7 @@
message
:
'删除成功!'
,
position
:
'top'
}
)
this
.
getAllWords
();
this
.
refreshWordsPage
();
}
}
)
}
).
onCancel
(()
=>
{
...
...
@@ -390,7 +397,7 @@
this
.
chapter
.
CourseRateName
=
this
.
defauRateObj
.
Name
}
if
(
!
compareObject
(
this
.
bakObj
,
this
.
chapter
,
false
))
{
this
.
saveChapterUpdate
(
1
)
this
.
saveChapterUpdate
(
1
)
;
if
(
this
.
bakObj
.
CourseRate
!=
this
.
chapter
.
CourseRate
)
{
if
(
this
.
chapter
.
ChildList
&&
this
.
chapter
.
ChildList
.
length
>
0
)
{
this
.
updateRate
()
...
...
@@ -425,8 +432,7 @@
}
)
this
.
addObj
.
CourseId
=
data
.
CourseId
;
this
.
addObj
.
ChapterId
=
data
.
ChapterId
;
//点击调用章节下的单词
this
.
getAllWords
(
data
.
ChapterNo
);
}
,
updateRate
()
{
setChaptersRate
({
...
...
@@ -434,7 +440,7 @@
CourseId
:
this
.
courseId
,
ChapterNo
:
this
.
chapter
.
ChapterNo
+
"."
}
).
then
(
r
=>
{
//this.initTree()
}
)
}
,
updateRateNode
(
arr
)
{
...
...
@@ -500,19 +506,23 @@
msg
.
Requirement
=
encodeURIComponent
(
msg
.
Requirement
)
saveChapter
(
msg
).
then
(
r
=>
{
this
.
submiting
=
false
let
m
sg
=
''
;
let
tipM
sg
=
''
;
if
(
type
==
1
)
{
m
sg
=
'自动保存成功!'
tipM
sg
=
'自动保存成功!'
}
else
{
m
sg
=
'数据保存成功!'
tipM
sg
=
'数据保存成功!'
}
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
m
sg
,
message
:
tipM
sg
,
position
:
'top'
}
)
//点击调用章节下的单词
if
(
this
.
chapter
&&
this
.
chapter
.
ParentId
==
0
)
{
this
.
refreshWordsPage
(
this
.
chapter
.
ChapterNo
);
}
if
(
this
.
bakObj
.
CourseRate
!=
this
.
defauRateObj
.
Id
)
{
if
(
this
.
chapter
.
ChildList
&&
this
.
chapter
.
ChildList
.
length
>
0
)
{
this
.
updateRate
()
...
...
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