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
3748a040
Commit
3748a040
authored
Jan 13, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c948de9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
37 deletions
+39
-37
chapterEditor.vue
src/pages/course/chapterEditor.vue
+39
-37
No files found.
src/pages/course/chapterEditor.vue
View file @
3748a040
...
...
@@ -15,7 +15,7 @@
<q-btn
color=
"primary"
size=
"xs"
title=
"向下移动"
:disable=
"!canDown"
@
click=
"moveDown"
outline
icon=
"iconfont icon-down1"
></q-btn>
<q-btn
color=
"primary"
size=
"xs"
unelevated
label=
"导入 ..."
@
click=
"getImport()"
></q-btn>
<el-upload
class=
"upload-demo"
action=
""
style=
"display:inline-block;margin-left:80px;"
:accept=
"accept"
:show-file-list=
"false"
:http-request=
"UploadAttachment"
>
<q-btn
color=
"primary"
size=
"xs"
unelevated
label=
"导入单词"
></q-btn>
...
...
@@ -82,35 +82,35 @@
<
editor
v
-
model
=
"chapter.Requirement"
placeHolder
=
"请输入章节学生学习要求"
:
config
=
"config"
ref
=
"requirement"
>
<
/editor
>
<
/div
>
<
div
class
=
"text-h6 q-mb-md"
>
单词列表
<
/div
>
<
div
class
=
"q-mb-md"
>
<
q
-
table
:
pagination
=
"wordMsg"
no
-
data
-
label
=
"暂无相关数据"
flat
class
=
"sticky-right-column-table sticky-column-table"
separator
=
"none"
:
data
=
"WordData"
:
columns
=
"columns"
row
-
key
=
"name"
>
<
template
v
-
slot
:
top
=
""
>
<
q
-
space
/>
<
div
class
=
"page-option"
>
<
q
-
btn
color
=
"accent"
size
=
"sm"
class
=
"q-mr-md"
icon
=
"add"
label
=
"新增单词"
@
click
=
"EditWord(null)"
/>
<
/div
>
<
/template
>
<
template
v
-
slot
:
bottom
>
<
q
-
pagination
class
=
"full-width justify-end"
v
-
model
=
"wordMsg.PageIndex"
color
=
"primary"
:
max
=
"PageCount"
:
input
=
"true"
@
input
=
"changePage"
/>
<
/template
>
<
template
v
-
slot
:
body
-
cell
-
Id
=
"props"
>
<
q
-
td
:
props
=
"props"
>
<
div
>
<
q
-
btn
flat
size
=
"xs"
icon
=
"edit"
color
=
"accent"
style
=
"font-weight:400"
label
=
"编辑"
@
click
=
"EditWord(props.row)"
/>
<
q
-
btn
flat
size
=
"xs"
icon
=
"delete"
color
=
"negative"
style
=
"font-weight:400"
label
=
"删除"
@
click
=
"delWord(props.row)"
><
/q-btn
>
<
/div
>
<
/q-td
>
<
/template
>
<
/q-table
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"text-h6 q-mb-md"
>
单词列表
<
/div
>
<
div
class
=
"q-mb-md"
>
<
q
-
table
:
pagination
=
"wordMsg"
no
-
data
-
label
=
"暂无相关数据"
flat
class
=
"sticky-right-column-table sticky-column-table"
separator
=
"none"
:
data
=
"WordData"
:
columns
=
"columns"
row
-
key
=
"name"
>
<
template
v
-
slot
:
top
=
""
>
<
q
-
space
/>
<
div
class
=
"page-option"
>
<
q
-
btn
color
=
"accent"
size
=
"sm"
class
=
"q-mr-md"
icon
=
"add"
label
=
"新增单词"
@
click
=
"EditWord(null)"
/>
<
/div
>
<
/template
>
<
template
v
-
slot
:
bottom
>
<
q
-
pagination
class
=
"full-width justify-end"
v
-
model
=
"wordMsg.PageIndex"
color
=
"primary"
:
max
=
"PageCount"
:
input
=
"true"
@
input
=
"changePage"
/>
<
/template
>
<
template
v
-
slot
:
body
-
cell
-
Id
=
"props"
>
<
q
-
td
:
props
=
"props"
>
<
div
>
<
q
-
btn
flat
size
=
"xs"
icon
=
"edit"
color
=
"accent"
style
=
"font-weight:400"
label
=
"编辑"
@
click
=
"EditWord(props.row)"
/>
<
q
-
btn
flat
size
=
"xs"
icon
=
"delete"
color
=
"negative"
style
=
"font-weight:400"
label
=
"删除"
@
click
=
"delWord(props.row)"
><
/q-btn
>
<
/div
>
<
/q-td
>
<
/template
>
<
/q-table
>
<
/div
>
<
/div
>
<
/template
>
<
/q-splitter
>
...
...
@@ -276,11 +276,10 @@
this
.
initRateList
();
this
.
getCourseInfo
();
}
this
.
getAllWords
(
0
);
}
,
mounted
()
{
this
.
showContent
=
false
;
this
.
getAllWords
(
0
);
setTimeout
(()
=>
{
this
.
showContent
=
true
;
}
,
3000
);
...
...
@@ -297,13 +296,13 @@
}
UploadLocalSystem
(
JSON
.
stringify
(
fileParams
),
files
.
file
,
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'导入单词成功!'
,
position
:
'top'
}
)
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'导入单词成功!'
,
position
:
'top'
}
)
this
.
questionData
=
res
.
Data
;
this
.
getAllWords
();
}
...
...
@@ -311,6 +310,7 @@
}
,
//导入成功获取所有
getAllWords
(
ChapterId
)
{
console
.
log
(
ChapterId
,
'ChapterId'
);
this
.
wordMsg
.
CourseId
=
this
.
courseId
;
this
.
wordMsg
.
ChapterId
=
ChapterId
;
GetCourseWordsPage
(
this
.
wordMsg
).
then
(
res
=>
{
...
...
@@ -376,6 +376,7 @@
}
)
}
,
changeNode
(
data
,
node
,
ev
)
{
console
.
log
(
'进入'
);
if
(
this
.
chapter
&&
this
.
chapter
.
ChapterId
>
0
)
{
if
(
this
.
defauRateObj
.
Id
!=
0
)
{
this
.
chapter
.
CourseRate
=
this
.
defauRateObj
.
Id
...
...
@@ -418,6 +419,7 @@
this
.
addObj
.
CourseId
=
data
.
CourseId
;
this
.
addObj
.
ChapterId
=
data
.
ChapterId
;
//点击调用章节下的单词
console
.
log
(
'点击了'
);
this
.
getAllWords
(
data
.
ChapterNo
);
}
,
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