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
64b29bb3
Commit
64b29bb3
authored
Jan 26, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
603f8ee3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
23 deletions
+137
-23
question.js
src/api/question/question.js
+0
-10
questionlist-form.vue
src/components/question/questionlist-form.vue
+2
-5
questionlist.vue
src/pages/course/questionlist.vue
+135
-8
No files found.
src/api/question/question.js
View file @
64b29bb3
...
...
@@ -145,13 +145,3 @@ export function queryQuestionCategory() {
})
}
/**
* 题目上移下移
*/
export
function
UpdateQuestionSort
(
data
)
{
return
request
({
url
:
'/Question/UpdateQuestionSort'
,
method
:
'post'
,
})
}
src/components/question/questionlist-form.vue
View file @
64b29bb3
...
...
@@ -107,7 +107,7 @@
deleteQuestion
,
queryDifficultyType
,
queryQuestionCategory
,
Update
QuestionSort
set
QuestionSort
}
from
'../../api/question/question'
;
import
questionForm
from
'../question/question-form'
;
import
questionUpload
from
'../question/question-upload'
;
...
...
@@ -322,7 +322,6 @@
},
//上移
getUpStatus
(
item
,
num
){
console
.
log
(
item
,
'数据'
);
var
QuestionId
=
item
.
QuestionId
;
var
index
=
-
1
;
for
(
var
i
=
0
;
i
<
this
.
data
.
length
;
i
++
){
...
...
@@ -337,13 +336,11 @@
if
(
num
==
2
){
//下移
var
targetQId
=
this
.
data
[
index
+
1
].
QuestionId
;
}
console
.
log
(
targetQId
,
'targetQId'
);
var
msg
=
{
curQId
:
QuestionId
,
targetQId
:
targetQId
}
UpdateQuestionSort
(
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据'
);
setQuestionSort
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
getQuestionList
();
}
...
...
src/pages/course/questionlist.vue
View file @
64b29bb3
<
style
>
.page-content
p
{
margin
:
0
!important
;
}
.quetion_Title
{
background
:
transparent
!important
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
400px
;
}
</
style
>
<
template
>
<div>
<questionlist-form></questionlist-form>
<div
class=
"page-body"
>
<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>
</template>
<
script
>
import
question
listForm
from
'../../components/question/questionlist
-form'
;
import
question
bankForm
from
'../../components/question/questionbank
-form'
;
export
default
{
meta
:
{
title
:
"题库
列表
"
title
:
"题库
管理
"
},
components
:
{
question
list
Form
question
bank
Form
},
data
()
{
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
()
{
},
mounted
()
{
},
methods
:
{
research
(){
},
changePage
(){
},
//关闭弹窗
closeQuestionBank
(){
this
.
isShowQuestionBankForm
=
false
;
},
//刷新列表
refreshQuestion
(){
},
//跳转至questionlist
goQuestionList
(){
var
tempStr
=
'../course/question'
;
this
.
$router
.
push
({
path
:
tempStr
});
}
}
}
</
script
>
\ No newline at end of file
</
script
>
<
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