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
bd006a7f
Commit
bd006a7f
authored
Jan 05, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
题库下载
parent
27568a76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
187 additions
and
164 deletions
+187
-164
question.js
src/api/question/question.js
+23
-13
questionlist.vue
src/pages/course/questionlist.vue
+164
-151
No files found.
src/api/question/question.js
View file @
bd006a7f
...
...
@@ -149,11 +149,11 @@ export function queryQuestionCategory() {
* 获取问题考级程度
*/
export
function
queryQuestionLevelType
()
{
return
request
({
url
:
'/Question/GetQuestionLevelType'
,
method
:
'post'
,
})
}
return
request
({
url
:
'/Question/GetQuestionLevelType'
,
method
:
'post'
,
})
}
/**
* 题目上移下移
...
...
@@ -246,12 +246,12 @@ export function RemoveQuestionBank(data) {
* @param {*} data
*/
export
function
saveBatchQuestionLevel
(
data
)
{
return
request
({
url
:
'/Question/SetBatchQuestionLevel'
,
method
:
'post'
,
data
})
}
return
request
({
url
:
'/Question/SetBatchQuestionLevel'
,
method
:
'post'
,
data
})
}
/**
* 根据题库编号获取题库题型列表(单选题、多选题、等)【试卷组卷使用】
...
...
@@ -276,7 +276,7 @@ export function queryQuestionCategoryStaticList(data) {
data
})
}
/**
* 获取试卷组卷模板
...
...
@@ -314,4 +314,14 @@ export function DeletePaperDetails(data) {
data
})
}
/**
* 题库下载
* @param {*} data
*/
export
function
DownLoadBank
(
data
)
{
return
request
({
url
:
'/Question/DownLoadBank'
,
method
:
'post'
,
data
})
}
src/pages/course/questionlist.vue
View file @
bd006a7f
<
style
>
.page-content
p
{
margin
:
0
!important
;
}
.page-content
p
{
margin
:
0
!important
;
}
.quetion_Title
{
background
:
transparent
!important
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
400px
;
.quetion_Title
{
background
:
transparent
!important
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
400px
;
}
}
</
style
>
<
template
>
<div
class=
"page-body"
>
...
...
@@ -34,17 +34,17 @@
</
template
>
<
template
v-slot:body-cell-BankId=
"props"
>
<q-td
:props=
"props"
style=
"width:150px;"
>
{{
props
.
row
.
BankId
}}
{{
props
.
row
.
BankId
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-BankName=
"props"
>
<q-td
:props=
"props"
style=
"width:400px;"
>
{{
props
.
row
.
BankName
}}
{{
props
.
row
.
BankName
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-QuestionCount=
"props"
>
<q-td
:props=
"props"
style=
"width:200px;"
>
{{
props
.
row
.
QuestionCount
}}
{{
props
.
row
.
QuestionCount
}}
</q-td>
</
template
>
...
...
@@ -54,6 +54,8 @@
</
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=
"downloads(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)"
...
...
@@ -71,155 +73,166 @@
</div>
</template>
<
script
>
import
{
queryQuestionBankPage
,
RemoveQuestionBank
}
from
'../../api/question/question'
;
import
questionbankForm
from
'../../components/question/questionbank-form'
;
export
default
{
meta
:
{
title
:
"题库管理"
import
{
queryQuestionBankPage
,
RemoveQuestionBank
,
DownLoadBank
}
from
'../../api/question/question'
;
import
questionbankForm
from
'../../components/question/questionbank-form'
;
export
default
{
meta
:
{
title
:
"题库管理"
},
components
:
{
questionbankForm
},
data
()
{
return
{
pageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
BankName
:
''
},
loading
:
false
,
isShowQuestionBankForm
:
false
,
questionBankObj
:
null
,
//传入参数
columns
:
[{
name
:
'RowNum'
,
label
:
'编号'
,
field
:
'RowNum'
,
align
:
'left'
},
{
name
:
'BankNo'
,
label
:
'题库序号'
,
field
:
'BankNo'
,
align
:
'left'
,
},
{
name
:
'BankName'
,
label
:
'题库名称'
,
field
:
'BankName'
,
align
:
'left'
,
},
{
name
:
'BankTypeName'
,
label
:
'等级'
,
field
:
'BankTypeName'
,
align
:
'left'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
field
:
'CreateByName'
,
align
:
'left'
},
{
name
:
'QuestionCount'
,
label
:
'题量'
,
field
:
'QuestionCount'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'QuestionId'
}
],
data
:
[],
}
},
created
()
{
},
mounted
()
{
this
.
getQuestionBankPage
();
},
methods
:
{
//下载
downloads
(
item
)
{
let
msg
=
{
BankId
:
item
.
BankId
,
}
DownLoadBank
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
}
})
},
components
:
{
questionbankForm
research
()
{
this
.
getQuestionBankPage
();
},
data
()
{
return
{
pageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
BankName
:
''
},
loading
:
false
,
isShowQuestionBankForm
:
false
,
questionBankObj
:
null
,
//传入参数
columns
:
[{
name
:
'RowNum'
,
label
:
'编号'
,
field
:
'RowNum'
,
align
:
'left'
},
{
name
:
'BankNo'
,
label
:
'题库序号'
,
field
:
'BankNo'
,
align
:
'left'
,
},
{
name
:
'BankName'
,
label
:
'题库名称'
,
field
:
'BankName'
,
align
:
'left'
,
},
{
name
:
'BankTypeName'
,
label
:
'等级'
,
field
:
'BankTypeName'
,
align
:
'left'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
field
:
'CreateByName'
,
align
:
'left'
},
{
name
:
'QuestionCount'
,
label
:
'题量'
,
field
:
'QuestionCount'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'QuestionId'
}
],
data
:
[],
}
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getQuestionBankPage
()
},
created
()
{},
mounted
()
{
//关闭弹窗
closeQuestionBank
()
{
this
.
isShowQuestionBankForm
=
false
;
},
//获取题库分页列表
getQuestionBankPage
()
{
this
.
loading
=
true
;
queryQuestionBankPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}
})
},
//刷新列表
refreshQuestion
()
{
this
.
getQuestionBankPage
();
},
methods
:
{
research
()
{
this
.
getQuestionBankPage
();
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getQuestionBankPage
()
},
//关闭弹窗
closeQuestionBank
()
{
this
.
isShowQuestionBankForm
=
false
;
},
//获取题库分页列表
getQuestionBankPage
()
{
this
.
loading
=
true
;
queryQuestionBankPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
//编辑题库
EditQuestion
(
obj
)
{
if
(
obj
)
{
this
.
questionBankObj
=
obj
}
else
{
this
.
questionBankObj
=
null
}
this
.
isShowQuestionBankForm
=
true
},
//删除问题
deleteQuestionBank
(
item
)
{
let
delMsg
=
{
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
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getQuestionBankPage
();
}
})
},
//刷新列表
refreshQuestion
()
{
this
.
getQuestionBankPage
();
},
//编辑题库
EditQuestion
(
obj
)
{
if
(
obj
)
{
this
.
questionBankObj
=
obj
}
else
{
this
.
questionBankObj
=
null
}
this
.
isShowQuestionBankForm
=
true
},
//删除问题
deleteQuestionBank
(
item
)
{
let
delMsg
=
{
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
(()
=>
{
}).
onCancel
(()
=>
{
});
},
//跳转至questionlist
goQuestionList
(
item
)
{
var
tempStr
=
'../course/question?BankId='
+
item
.
BankId
;
this
.
$router
.
push
({
path
:
tempStr
});
}
});
},
//跳转至questionlist
goQuestionList
(
item
)
{
var
tempStr
=
'../course/question?BankId='
+
item
.
BankId
;
this
.
$router
.
push
({
path
:
tempStr
});
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
...
...
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