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
2ba98eae
Commit
2ba98eae
authored
Mar 07, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ef614c72
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
9 deletions
+41
-9
question.js
src/api/question/question.js
+11
-0
questionbank-form.vue
src/components/question/questionbank-form.vue
+21
-3
questionlist.vue
src/pages/course/questionlist.vue
+9
-6
No files found.
src/api/question/question.js
View file @
2ba98eae
...
...
@@ -204,6 +204,17 @@ export function getQuestionBankInfo(data) {
})
}
/**
* 获取题库等级列表
* @param {*} data
*/
export
function
queryBankTypeList
(
data
)
{
return
request
({
url
:
'/Question/GetBankTypeList'
,
method
:
'post'
,
data
})
}
/**
* 新增修改题库
...
...
src/components/question/questionbank-form.vue
View file @
2ba98eae
...
...
@@ -10,6 +10,10 @@
<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-select
stack-label
color=
"primary"
filled
clearable
label=
"等级"
option-value=
"Id"
option-label=
"Name"
:options=
"BankTypeList"
v-model=
"msg.BankType"
ref=
"ActivityType"
emit-value
map-options
: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"
/>
...
...
@@ -23,6 +27,7 @@
import
{
getQuestionBankInfo
,
//获取题库详情
SetQuestionBank
,
//保存图库
queryBankTypeList
}
from
'../../api/question/question'
export
default
{
props
:
{
...
...
@@ -40,16 +45,28 @@
BankId
:
0
,
BankNo
:
""
,
//题库序号
BankName
:
''
,
//题库名称
BankType
:
""
,
//题库类型
},
BankTypeList
:
[],
//题库等级列表
persistent
:
true
}
},
computed
:
{},
created
()
{},
created
()
{
this
.
getBankTypeList
();
},
mounted
()
{
this
.
initQuestionBank
();
},
methods
:
{
//获取题库等级列表
getBankTypeList
()
{
queryBankTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
BankTypeList
=
res
.
Data
;
}
})
},
initQuestionBank
()
{
if
(
this
.
questionBankObj
&&
this
.
questionBankObj
.
BankId
>
0
)
{
getQuestionBankInfo
({
...
...
@@ -59,12 +76,14 @@
this
.
msg
.
BankId
=
res
.
Data
.
BankId
;
this
.
msg
.
BankNo
=
res
.
Data
.
BankNo
;
this
.
msg
.
BankName
=
res
.
Data
.
BankName
;
this
.
msg
.
BankType
=
res
.
Data
.
BankType
;
}
})
}
else
{
this
.
msg
.
BankId
=
0
;
this
.
msg
.
BankNo
=
""
;
this
.
msg
.
BankName
=
""
;
this
.
msg
.
BankType
=
""
;
}
},
//创建
...
...
@@ -86,5 +105,4 @@
}
},
}
</
script
>
</
script
>
\ No newline at end of file
src/pages/course/questionlist.vue
View file @
2ba98eae
...
...
@@ -11,7 +11,6 @@
width
:
400px
;
}
</
style
>
<
template
>
<div
class=
"page-body"
>
...
...
@@ -114,6 +113,12 @@
field
:
'BankName'
,
align
:
'left'
,
},
{
name
:
'BankTypeName'
,
label
:
'等级'
,
field
:
'BankTypeName'
,
align
:
'left'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
...
...
@@ -154,9 +159,9 @@
},
//获取题库分页列表
getQuestionBankPage
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
queryQuestionBankPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
...
...
@@ -215,9 +220,7 @@
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
</
style
>
\ No newline at end of file
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