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
77700208
Commit
77700208
authored
Jan 06, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
e9857fc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
28 deletions
+47
-28
chapterEditor.vue
src/pages/course/chapterEditor.vue
+47
-28
No files found.
src/pages/course/chapterEditor.vue
View file @
77700208
...
...
@@ -15,6 +15,11 @@
<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"
>
<el-button
size=
"small"
type=
"primary"
>
导入单词
</el-button>
</el-upload>
</div>
<div
class=
"q-mt-lg"
style=
"height:calc(100% - 140px)"
>
<q-scroll-area
:thumb-style=
"thumbStyle"
:content-style=
"contentStyle"
...
...
@@ -28,9 +33,8 @@
<div
class=
"row chapter-node full-width"
slot-scope=
"
{ node, data }">
<div
class=
"q-mr-md"
>
{{
data
.
ChapterNo
.
length
>
1
?
data
.
ChapterNo
:
`0${data.ChapterNo
}
`
}}
<
/div
>
<
div
class
=
"col q-mr-xs"
v
-
if
=
"editorNodeId==data.ChapterId"
>
<
input
type
=
"text"
@
blur
=
"changeChapterName(data)"
maxlength
=
"100"
draggable
=
"true"
class
=
"tree-input"
v
-
focus
v
-
model
=
"data.ChapterName"
@
focus
=
"selectValue($event)"
/>
<
input
type
=
"text"
@
blur
=
"changeChapterName(data)"
maxlength
=
"100"
draggable
=
"true"
class
=
"tree-input"
v
-
focus
v
-
model
=
"data.ChapterName"
@
focus
=
"selectValue($event)"
/>
<
/div
>
<
div
class
=
"col q-mr-md ellipsis"
v
-
if
=
"editorNodeId!=data.ChapterId"
>
{{
data
.
ChapterName
}}
<
/div
>
<
div
class
=
"oops-box q-mr-xs"
v
-
if
=
"editorNodeId!=data.ChapterId"
>
...
...
@@ -63,7 +67,6 @@
v
-
model
=
"defauRateObj"
><
/q-select
>
<
/div
>
<
/div
>
<!--
<
div
v
-
if
=
"chapter.ParentId!=0"
>
-->
<
div
>
<
div
class
=
"text-h6 q-mb-md"
>
章节学习内容
<
/div
>
<
div
class
=
"q-mb-md"
>
...
...
@@ -80,7 +83,6 @@
<
/editor
>
<
/div
>
<
/div
>
<!--
<
div
v
-
else
class
=
"text-center text-h5 text-grey-4 q-mt-lg"
>
单元节点不支持编辑相关内容
<
/div> --
>
<
/div
>
<
/div
>
<
/template
>
...
...
@@ -112,7 +114,10 @@
}
from
"../../api/course/index"
;
import
{
compareObject
}
from
'../../utils/validate'
}
from
'../../utils/validate'
;
import
{
UploadLocalSystem
}
from
'../../api/common/common'
import
{
extend
}
from
'quasar'
...
...
@@ -180,8 +185,8 @@
defaultChapterId
:
0
,
splitterModel
:
30
,
//左侧默认占据多大
isShowChapter
:
false
,
//是否显示导入
chapterObj
:{
}
,
MyChapterNo
:
0
chapterObj
:
{
}
,
MyChapterNo
:
0
}
;
}
,
created
()
{
...
...
@@ -203,6 +208,21 @@
}
,
3000
);
}
,
methods
:
{
//上传文件
UploadAttachment
(
files
)
{
this
.
questionData
=
[];
var
fileParams
=
{
Analysis
:
1
,
CourseId
:
this
.
courseId
,
CourseWords
:
1
,
Uid
:
this
.
getLocalStorage
().
Id
}
UploadLocalSystem
(
JSON
.
stringify
(
fileParams
),
files
.
file
,
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
questionData
=
res
.
Data
;
}
}
)
}
,
changeContent
()
{
}
,
getCourseInfo
()
{
queryCourseInfo
({
...
...
@@ -313,7 +333,7 @@
}
)
}
)
}
).
onCancel
(()
=>
{
}
)
}
,
...
...
@@ -332,10 +352,10 @@
saveChapter
(
msg
).
then
(
r
=>
{
this
.
submiting
=
false
let
msg
=
''
;
if
(
type
==
1
)
{
msg
=
'自动保存成功!'
}
else
{
msg
=
'数据保存成功!'
if
(
type
==
1
)
{
msg
=
'自动保存成功!'
}
else
{
msg
=
'数据保存成功!'
}
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
...
...
@@ -366,7 +386,7 @@
moveUp
()
{
let
data
=
this
.
$refs
.
chapterTree
.
getCurrentNode
()
let
node
=
this
.
$refs
.
chapterTree
.
getNode
(
data
.
ChapterId
)
if
(
node
)
{
let
noTemp
=
data
.
ChapterNo
.
toString
().
split
(
'.'
)
let
no
=
parseInt
(
noTemp
[
noTemp
.
length
-
1
])
-
1
...
...
@@ -388,7 +408,7 @@
moveDown
()
{
let
data
=
this
.
$refs
.
chapterTree
.
getCurrentNode
()
let
node
=
this
.
$refs
.
chapterTree
.
getNode
(
data
.
ChapterId
)
if
(
node
)
{
let
noTemp
=
data
.
ChapterNo
.
toString
().
split
(
'.'
)
let
no
=
parseInt
(
noTemp
[
noTemp
.
length
-
1
])
-
1
...
...
@@ -467,16 +487,16 @@
}
}
,
handleDragStart
(
node
,
ev
)
{
}
,
handleDragEnter
(
draggingNode
,
dropNode
,
ev
)
{
}
,
handleDragLeave
(
draggingNode
,
dropNode
,
ev
)
{
}
,
handleDragOver
(
draggingNode
,
dropNode
,
ev
)
{
}
,
handleDragEnd
(
draggingNode
,
dropNode
,
dropType
,
ev
)
{
this
.
updateChapters
=
[]
...
...
@@ -580,23 +600,22 @@
}
,
batchUpdate
()
{
batchUpdateChapterNo
(
this
.
updateChapters
).
then
(
r
=>
{
}
)
}
,
//点击导入
getImport
(){
this
.
isShowChapter
=
true
;
getImport
()
{
this
.
isShowChapter
=
true
;
}
,
closeChapterForm
(){
this
.
isShowChapter
=
false
;
closeChapterForm
()
{
this
.
isShowChapter
=
false
;
}
,
refreshPage
(){
refreshPage
()
{
this
.
initTree
();
this
.
getCourseInfo
();
}
}
}
;
<
/script
>
<
style
>
...
...
@@ -609,9 +628,10 @@
.
chapter
-
tree
.
chapter
-
node
.
rate
-
box
{
display
:
block
;
}
.
chapter
-
tree
.
el
-
tree
-
node__content
{
height
:
32
px
!
important
;
padding
-
right
:
20
px
;
padding
-
right
:
20
px
;
}
.
chapter
-
tree
.
el
-
tree
-
node__content
:
hover
,
...
...
@@ -630,5 +650,4 @@
font
-
size
:
14
px
;
width
:
100
%
}
<
/style
>
<
/style>
\ No newline at end of file
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