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
a8e60d28
Commit
a8e60d28
authored
Jan 26, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
517731d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
44 deletions
+85
-44
questionbank-form.vue
src/components/question/questionbank-form.vue
+29
-2
questionlist.vue
src/pages/course/questionlist.vue
+56
-42
No files found.
src/components/question/questionbank-form.vue
View file @
a8e60d28
...
...
@@ -5,7 +5,7 @@
<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.
Titl
e"
label=
"请输入题库名称"
maxlength=
"20"
/>
<q-input
clearable
standout=
"bg-primary text-white"
v-model=
"msg.
BankNam
e"
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"
/>
...
...
@@ -16,14 +16,24 @@
</
template
>
<
script
>
import
{
getQuestionBankInfo
,
//获取题库详情
SetQuestionBank
,
//保存图库
}
from
'../../api/question/question'
export
default
{
props
:
{
questionBankObj
:
{
type
:
Object
,
}
},
components
:
{
},
data
()
{
return
{
msg
:
{
Title
:
''
BankId
:
0
,
BankName
:
''
,
//题库名称
},
persistent
:
true
}
...
...
@@ -34,9 +44,26 @@
},
methods
:
{
initQuestionBank
()
{
if
(
this
.
questionBankObj
&&
this
.
questionBankObj
.
BankId
>
0
)
{
getQuestionBankInfo
({
BankId
:
this
.
questionBankObj
.
BankId
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
msg
.
BankId
=
res
.
Data
.
BankId
;
this
.
msg
.
BankName
=
res
.
Data
.
BankName
;
}
})
}
else
{
this
.
msg
.
BankId
=
0
;
this
.
msg
.
BankName
=
""
;
}
},
//创建
saveQuestion
()
{
SetQuestionBank
(
this
.
msg
).
then
(
res
=>
{
});
},
//取消
closeQuestionForm
()
{
...
...
src/pages/course/questionlist.vue
View file @
a8e60d28
...
...
@@ -18,7 +18,7 @@
<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.
Titl
e"
label=
"关键字"
<q-input
@
change=
"research"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.
BankNam
e"
label=
"关键字"
@
clear=
"research"
maxlength=
"20"
/>
</div>
</div>
...
...
@@ -30,7 +30,8 @@
<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=
"创建新题库"
/>
<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"
>
...
...
@@ -44,18 +45,23 @@
<
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-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
v-if=
"isShowQuestionBankForm"
@
close=
"closeQuestionBank"
@
success=
"refreshQuestion"
>
</questionbank-form>
</div>
</div>
</template>
<
script
>
import
{
queryQuestionBankPage
,
RemoveQuestionBank
}
from
'../../api/question/question'
;
import
questionbankForm
from
'../../components/question/questionbank-form'
;
export
default
{
meta
:
{
...
...
@@ -66,41 +72,38 @@
},
data
()
{
return
{
pageCount
:
0
,
msg
:{
pageIndex
:
1
,
Title
:
''
pageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
BankName
:
''
},
loading
:
false
,
isShowQuestionBankForm
:
false
,
isShowQuestionBankForm
:
false
,
columns
:
[{
name
:
'
Number
'
,
name
:
'
BankId
'
,
label
:
'序号'
,
field
:
'
Number
'
,
field
:
'
BankId
'
,
align
:
'left'
},
{
name
:
'
Category
Name'
,
name
:
'
Bank
Name'
,
label
:
'题库名称'
,
field
:
'CategoryName'
,
align
:
'left'
,
},
{
name
:
'classification'
,
label
:
'分类'
,
field
:
'classification'
,
field
:
'BankName'
,
align
:
'left'
,
},
{
name
:
'
creater
'
,
name
:
'
CreateByName
'
,
label
:
'创建人'
,
field
:
'
creater
'
,
field
:
'
CreateByName
'
,
align
:
'left'
},
{
name
:
'
topicNumber
'
,
name
:
'
QuestionCount
'
,
label
:
'题量'
,
field
:
'
topicNumber
'
,
field
:
'
QuestionCount
'
,
align
:
'left'
},
{
...
...
@@ -109,38 +112,49 @@
field
:
'QuestionId'
}
],
data
:
[{
Number
:
'1'
,
CategoryName
:
'日语2'
,
classification
:
''
,
creater
:
'张三丰'
,
topicNumber
:
12
,
sodium
:
87
,
}],
data
:
[],
}
},
created
()
{
},
created
()
{},
mounted
()
{
this
.
getQuestionBankPage
();
},
methods
:
{
research
(){
research
()
{
},
changePage
(){
changePage
()
{
},
//关闭弹窗
closeQuestionBank
(){
this
.
isShowQuestionBankForm
=
false
;
closeQuestionBank
()
{
this
.
isShowQuestionBankForm
=
false
;
},
//获取题库分页列表
getQuestionBankPage
()
{
queryQuestionBankPage
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}
})
},
//刷新列表
refreshQuestion
(){
refreshQuestion
()
{
},
//删除问题
deleteQuestionBank
(
item
)
{
let
delMsg
=
{
bankId
:
item
.
BankId
,
status
:
1
};
RemoveQuestionBank
(
delMsg
).
then
(
res
=>
{
})
},
//跳转至questionlist
goQuestionList
(){
goQuestionList
()
{
var
tempStr
=
'../course/question'
;
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