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
d9074ba6
Commit
d9074ba6
authored
Jan 26, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
冲突修改
parents
b67d9667
64b29bb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
13 deletions
+137
-13
questionlist-form.vue
src/components/question/questionlist-form.vue
+2
-5
questionlist.vue
src/pages/course/questionlist.vue
+135
-8
No files found.
src/components/question/questionlist-form.vue
View file @
d9074ba6
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
deleteQuestion
,
deleteQuestion
,
queryDifficultyType
,
queryDifficultyType
,
queryQuestionCategory
,
queryQuestionCategory
,
Update
QuestionSort
set
QuestionSort
}
from
'../../api/question/question'
;
}
from
'../../api/question/question'
;
import
questionForm
from
'../question/question-form'
;
import
questionForm
from
'../question/question-form'
;
import
questionUpload
from
'../question/question-upload'
;
import
questionUpload
from
'../question/question-upload'
;
...
@@ -322,7 +322,6 @@
...
@@ -322,7 +322,6 @@
},
},
//上移
//上移
getUpStatus
(
item
,
num
){
getUpStatus
(
item
,
num
){
console
.
log
(
item
,
'数据'
);
var
QuestionId
=
item
.
QuestionId
;
var
QuestionId
=
item
.
QuestionId
;
var
index
=
-
1
;
var
index
=
-
1
;
for
(
var
i
=
0
;
i
<
this
.
data
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
this
.
data
.
length
;
i
++
){
...
@@ -337,13 +336,11 @@
...
@@ -337,13 +336,11 @@
if
(
num
==
2
){
//下移
if
(
num
==
2
){
//下移
var
targetQId
=
this
.
data
[
index
+
1
].
QuestionId
;
var
targetQId
=
this
.
data
[
index
+
1
].
QuestionId
;
}
}
console
.
log
(
targetQId
,
'targetQId'
);
var
msg
=
{
var
msg
=
{
curQId
:
QuestionId
,
curQId
:
QuestionId
,
targetQId
:
targetQId
targetQId
:
targetQId
}
}
UpdateQuestionSort
(
msg
).
then
(
res
=>
{
setQuestionSort
(
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据'
);
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
getQuestionList
();
this
.
getQuestionList
();
}
}
...
...
src/pages/course/questionlist.vue
View file @
d9074ba6
<
style
>
.page-content
p
{
margin
:
0
!important
;
}
.quetion_Title
{
background
:
transparent
!important
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
400px
;
}
</
style
>
<
template
>
<
template
>
<div>
<div
class=
"page-body"
>
<questionlist-form></questionlist-form>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
change=
"research"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.Title"
label=
"关键字"
@
clear=
"research"
maxlength=
"20"
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
题库列表
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
@
click=
"isShowQuestionBankForm=true"
label=
"创建新题库"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Title=
"props"
>
<td
style=
"width:400px;"
>
</td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
@
click=
"goQuestionList()"
label=
"管理题目"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
/></q-btn>
</q-td>
</
template
>
</q-table>
<questionbank-form
v-if=
"isShowQuestionBankForm"
@
close=
"closeQuestionBank"
@
success=
"refreshQuestion"
>
</questionbank-form>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
question
listForm
from
'../../components/question/questionlist
-form'
;
import
question
bankForm
from
'../../components/question/questionbank
-form'
;
export
default
{
export
default
{
meta
:
{
meta
:
{
title
:
"题库
列表
"
title
:
"题库
管理
"
},
},
components
:
{
components
:
{
question
list
Form
question
bank
Form
},
},
data
()
{
data
()
{
return
{
return
{
pageCount
:
0
,
msg
:{
pageIndex
:
1
,
Title
:
''
},
loading
:
false
,
isShowQuestionBankForm
:
false
,
columns
:
[{
name
:
'Number'
,
label
:
'序号'
,
field
:
'Number'
,
align
:
'left'
},
{
name
:
'CategoryName'
,
label
:
'题库名称'
,
field
:
'CategoryName'
,
align
:
'left'
,
},
{
name
:
'classification'
,
label
:
'分类'
,
field
:
'classification'
,
align
:
'left'
,
},
{
name
:
'creater'
,
label
:
'创建人'
,
field
:
'creater'
,
align
:
'left'
},
{
name
:
'topicNumber'
,
label
:
'题量'
,
field
:
'topicNumber'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'QuestionId'
}
],
data
:
[{
Number
:
'1'
,
CategoryName
:
'日语2'
,
classification
:
''
,
creater
:
'张三丰'
,
topicNumber
:
12
,
sodium
:
87
,
}],
}
}
},
},
created
()
{
created
()
{
},
},
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
research
(){
},
changePage
(){
},
//关闭弹窗
closeQuestionBank
(){
this
.
isShowQuestionBankForm
=
false
;
},
//刷新列表
refreshQuestion
(){
},
//跳转至questionlist
goQuestionList
(){
var
tempStr
=
'../course/question'
;
this
.
$router
.
push
({
path
:
tempStr
});
}
}
}
}
}
</
script
>
</
script
>
\ No newline at end of file
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
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