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
0fe9c8cd
Commit
0fe9c8cd
authored
Jan 28, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
1e48591f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
22 deletions
+35
-22
questionbank-form.vue
src/components/question/questionbank-form.vue
+12
-6
questionlist.vue
src/pages/course/questionlist.vue
+23
-16
No files found.
src/components/question/questionbank-form.vue
View file @
0fe9c8cd
...
...
@@ -5,8 +5,11 @@
<div
class=
"text-h6"
>
{{
(
questionBankObj
&&
questionBankObj
.
BankId
>
0
)?
"修改题库"
:
"创建题库"
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<q-input
filled
stack-label
:dense=
"false"
class=
"col-6 q-pb-lg"
ref=
"BankName"
v-model=
"msg.BankName"
label=
"请输入题库名称"
maxlength=
"20"
:rules=
"[val => !!val || '请输入题库名称']"
/>
<q-input
filled
stack-label
:dense=
"false"
class=
"col-6 q-pb-lg"
ref=
"BankNo"
v-model=
"msg.BankNo"
label=
"请输入题库序号"
maxlength=
"20"
:rules=
"[val => !!val || '请输入题库序号']"
/>
<q-input
filled
stack-label
:dense=
"false"
class=
"col-6 q-pb-lg"
ref=
"BankName"
v-model=
"msg.BankName"
label=
"请输入题库名称"
maxlength=
"20"
:rules=
"[val => !!val || '请输入题库名称']"
/>
</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"
/>
...
...
@@ -25,7 +28,7 @@
props
:
{
questionBankObj
:
{
type
:
Object
,
default
:
null
default
:
null
}
},
components
:
{
...
...
@@ -35,6 +38,7 @@
return
{
msg
:
{
BankId
:
0
,
BankNo
:
""
,
//题库序号
BankName
:
''
,
//题库名称
},
persistent
:
true
...
...
@@ -43,7 +47,7 @@
computed
:
{},
created
()
{},
mounted
()
{
this
.
initQuestionBank
();
this
.
initQuestionBank
();
},
methods
:
{
initQuestionBank
()
{
...
...
@@ -53,20 +57,22 @@
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
msg
.
BankId
=
res
.
Data
.
BankId
;
this
.
msg
.
BankNo
=
res
.
Data
.
BankNo
;
this
.
msg
.
BankName
=
res
.
Data
.
BankName
;
}
})
}
else
{
this
.
msg
.
BankId
=
0
;
this
.
msg
.
BankNo
=
""
;
this
.
msg
.
BankName
=
""
;
}
},
//创建
saveQuestion
()
{
this
.
$refs
.
BankName
.
validate
()
if
(
!
this
.
$refs
.
BankName
.
hasError
)
{
if
(
!
this
.
$refs
.
BankName
.
hasError
)
{
SetQuestionBank
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
$emit
(
'success'
);
this
.
closeQuestionForm
();
}
...
...
src/pages/course/questionlist.vue
View file @
0fe9c8cd
...
...
@@ -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>
...
...
@@ -30,8 +30,7 @@
<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=
"EditQuestion(null)"
label=
"创建新题库"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
@
click=
"EditQuestion(null)"
label=
"创建新题库"
/>
</div>
</
template
>
<
template
v-slot:body-cell-BankId=
"props"
>
...
...
@@ -56,15 +55,18 @@
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
style=
"width:200px;"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
@
click=
"EditQuestion(props.row)"
label=
"编辑"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
@
click=
"EditQuestion(props.row)"
label=
"编辑"
/>
<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"
@
click=
"deleteQuestionBank(props.row)"
label=
"删除"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"negative"
style=
"font-weight:400"
@
click=
"deleteQuestionBank(props.row)"
label=
"删除"
/>
</q-btn>
</q-td>
</
template
>
</q-table>
<questionbank-form
v-if=
"isShowQuestionBankForm"
:questionBankObj=
"questionBankObj"
@
close=
"closeQuestionBank"
@
success=
"refreshQuestion"
>
<questionbank-form
v-if=
"isShowQuestionBankForm"
:questionBankObj=
"questionBankObj"
@
close=
"closeQuestionBank"
@
success=
"refreshQuestion"
>
</questionbank-form>
</div>
</div>
...
...
@@ -93,20 +95,25 @@
},
loading
:
false
,
isShowQuestionBankForm
:
false
,
questionBankObj
:
null
,
//传入参数
questionBankObj
:
null
,
//传入参数
columns
:
[{
name
:
'
BankId
'
,
label
:
'
序
号'
,
field
:
'
BankId
'
,
name
:
'
RowNum
'
,
label
:
'
编
号'
,
field
:
'
RowNum
'
,
align
:
'left'
},
{
name
:
'BankNo'
,
label
:
'题库序号'
,
field
:
'BankNo'
,
align
:
'left'
,
},
{
name
:
'BankName'
,
label
:
'题库名称'
,
field
:
'BankName'
,
align
:
'left'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
...
...
@@ -159,13 +166,13 @@
this
.
getQuestionBankPage
();
},
//编辑题库
EditQuestion
(
obj
){
if
(
obj
)
{
EditQuestion
(
obj
)
{
if
(
obj
)
{
this
.
questionBankObj
=
obj
}
else
{
}
else
{
this
.
questionBankObj
=
null
}
this
.
isShowQuestionBankForm
=
true
this
.
isShowQuestionBankForm
=
true
},
//删除问题
deleteQuestionBank
(
item
)
{
...
...
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