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
5fbd3981
Commit
5fbd3981
authored
Jan 26, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
71ea1b15
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
17 deletions
+56
-17
questionbank-form.vue
src/components/question/questionbank-form.vue
+6
-2
questionlist.vue
src/pages/course/questionlist.vue
+50
-15
No files found.
src/components/question/questionbank-form.vue
View file @
5fbd3981
...
...
@@ -5,7 +5,8 @@
<div
class=
"text-h6"
>
题库管理 / 创建题库
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<q-input
clearable
standout=
"bg-primary text-white"
v-model=
"msg.BankName"
label=
"请输入题库名称"
maxlength=
"20"
/>
<q-input
filled
stack-label
:dense=
"false"
class=
"col-6 q-pb-lg"
v-model=
"msg.BankName"
label=
"请输入题库名称"
maxlength=
"20"
/>
</q-card-section>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeQuestionForm"
/>
...
...
@@ -62,7 +63,10 @@
//创建
saveQuestion
()
{
SetQuestionBank
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$emit
(
'success'
);
this
.
closeQuestionForm
();
}
});
},
//取消
...
...
src/pages/course/questionlist.vue
View file @
5fbd3981
...
...
@@ -18,8 +18,8 @@
<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.BankName"
label=
"关键字"
@
clear=
"research"
maxlength=
"20"
/>
<q-input
@
change=
"research"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.BankName"
label=
"输入题库名称、创建人查找"
@
clear=
"research"
maxlength=
"20"
/>
</div>
</div>
</div>
...
...
@@ -34,20 +34,32 @@
label=
"创建新题库"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Title=
"props"
>
<td
style=
"width:400px;"
>
</td>
<
template
v-slot:body-cell-BankId=
"props"
>
<q-td
:props=
"props"
style=
"width:150px;"
>
{{
props
.
row
.
BankId
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-BankName=
"props"
>
<q-td
:props=
"props"
style=
"width:400px;"
>
{{
props
.
row
.
BankName
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-QuestionCount=
"props"
>
<q-td
:props=
"props"
style=
"width:200px;"
>
{{
props
.
row
.
QuestionCount
}}
</q-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-td
:props=
"props"
style=
"width:200px;"
>
<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(props.row
s
)"
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
@
click=
"goQuestionList(props.row)"
label=
"管理题目"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"negative"
style=
"font-weight:400"
label=
"删除"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"negative"
style=
"font-weight:400"
@
click=
"deleteQuestionBank(props.row)"
label=
"删除"
/>
</q-btn>
</q-td>
</
template
>
...
...
@@ -121,10 +133,12 @@
},
methods
:
{
research
()
{
this
.
getQuestionBankPage
();
},
changePage
()
{
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getQuestionBankPage
()
},
//关闭弹窗
closeQuestionBank
()
{
...
...
@@ -141,7 +155,7 @@
},
//刷新列表
refreshQuestion
()
{
this
.
getQuestionBankPage
();
},
//删除问题
deleteQuestionBank
(
item
)
{
...
...
@@ -149,13 +163,34 @@
bankId
:
item
.
BankId
,
status
:
1
};
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除该题库?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
RemoveQuestionBank
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getQuestionBankPage
();
}
})
}).
onCancel
(()
=>
{
});
},
//跳转至questionlist
goQuestionList
(
item
)
{
var
tempStr
=
'../course/question?bankId='
+
item
.
BankId
;
var
tempStr
=
'../course/question?bankId='
+
item
.
BankId
;
this
.
$router
.
push
({
path
:
tempStr
});
...
...
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