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
4411640c
Commit
4411640c
authored
Aug 10, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
120d4220
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
226 additions
and
3 deletions
+226
-3
question-form.vue
src/components/exam/question-form.vue
+194
-0
examEdit.vue
src/pages/exam/examEdit.vue
+32
-3
No files found.
src/components/exam/question-form.vue
0 → 100644
View file @
4411640c
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 850px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
问题列表
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<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.Title"
label=
"关键字"
@
clear=
"research"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"research"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.QCategoryId"
:options=
"questionCategoryList"
emit-value
map-options
label=
"分类"
multiple
clearable
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"research"
standout=
"bg-primary text-white"
option-value=
"QId"
option-label=
"Name"
v-model=
"msg.QuestionTypeId"
:options=
"questionTypeList"
emit-value
map-options
label=
"题型"
multiple
clearable
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"research"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"Name"
v-model=
"msg.DifficultyType"
:options=
"questionDifficultyTypeList"
emit-value
map-options
label=
"难度"
multiple
clearable
/>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table sticky-right-column-table"
separator=
"none"
:data=
"dataList"
:columns=
"columns"
row-key=
"QuestionId"
selection=
"multiple"
:selected
.
sync=
"selectedQuestion"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
问题列表
</div>
<q-space
/>
</
template
>
<
template
v-slot:body-cell-Title=
"props"
>
<td
style=
"width:400px;"
>
<div
@
click=
"goDetail(props.row)"
v-html=
"props.row.Title"
class=
"quetion_Title"
>
</div>
</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
>
</q-table>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"确认选择"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"saveCategory"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
queryQuestionCategory
,
queryQuestionTypeList
,
queryDifficultyType
,
queryQuestionPageList
,
}
from
'../../api/question/question'
;
export
default
{
data
()
{
return
{
persistent
:
true
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
CourseId
:
0
,
BankId
:
0
,
Title
:
""
,
PointName
:
""
,
//知识点
QuestionTypeId
:
[],
//题型
DifficultyType
:
[],
//难易程度
QCategoryId
:
[],
//分类
},
questionCategoryList
:
[],
questionTypeList
:
[],
//问题类型列表
questionDifficultyTypeList
:
[],
columns
:
[{
name
:
'Number'
,
label
:
'编号'
,
field
:
'Number'
,
align
:
'left'
},
{
name
:
'Title'
,
label
:
'题目'
,
field
:
'Title'
,
align
:
'left'
},
{
name
:
'CategoryName'
,
label
:
'分类'
,
field
:
'CategoryName'
,
align
:
'left'
,
},
{
name
:
'QuestionTypeName'
,
label
:
'题型'
,
field
:
'QuestionTypeName'
,
align
:
'left'
,
},
{
name
:
'DifficultyTypeName'
,
label
:
'难易'
,
field
:
'DifficultyTypeName'
,
align
:
'left'
},
{
name
:
'LevelTypeName'
,
label
:
'考级程度'
,
field
:
'LevelTypeName'
,
align
:
'left'
}
],
dataList
:[],
pageCount
:
0
,
selectedQuestion
:[],
loading
:
false
,
saveLoading
:
false
}
},
mounted
()
{
this
.
getQuestionCategory
()
this
.
getQuestionType
();
this
.
getDifficultyType
();
this
.
getQuestionList
();
},
methods
:
{
//获取问题大类
getQuestionCategory
()
{
queryQuestionCategory
().
then
(
res
=>
{
this
.
questionCategoryList
=
res
.
Data
;
})
},
//获取题型列表
getQuestionType
()
{
queryQuestionTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
questionTypeList
=
res
.
Data
;
}
});
},
//获取问题难易程度列表
getDifficultyType
()
{
queryDifficultyType
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
tempArray
=
res
.
Data
;
tempArray
.
splice
(
0
,
1
);
this
.
questionDifficultyTypeList
=
tempArray
;
}
});
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getQuestionList
()
},
research
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getQuestionList
();
},
//获取问题分页列表
getQuestionList
()
{
this
.
loading
=
true
;
queryQuestionPageList
(
this
.
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'res'
);
this
.
loading
=
false
;
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
saveCategory
(){
},
},
}
</
script
>
src/pages/exam/examEdit.vue
View file @
4411640c
...
...
@@ -37,7 +37,6 @@
width
:
880px
;
min-height
:
795px
;
background
:
#fff
;
padding
:
0px
20px
0
0px
;
border-radius
:
3px
;
overflow-y
:
auto
;
border
:
1px
solid
#d9d9d9
;
...
...
@@ -100,6 +99,15 @@
padding-top
:
8px
;
z-index
:
1000
;
}
.Left-btn
{
height
:
58px
;
padding
:
20px
0
20px
20px
;
width
:
100%
;
border-bottom
:
1px
solid
#d9d9d9
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
</
style
>
<
template
>
<div
class=
"examPaper"
>
...
...
@@ -139,19 +147,29 @@
</div>
</div>
<div
class=
"Exam-right f1"
>
<span></span>
<div
class=
"Left-btn"
>
<div></div>
<div>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"isShowQuestion=true"
class=
"q-mr-md"
label=
"题库选题"
/>
</div>
</div>
</div>
</div>
<questionForm
v-if=
"isShowQuestion"
@
close=
"closeQuestForm"
@
success=
"refreshPage"
></questionForm>
</div>
</
template
>
<
script
>
import
{
GetPaper
}
from
'../../api/teacher/index'
;
import
questionForm
from
'../../components/exam/question-form'
export
default
{
meta
:
{
title
:
"考试"
},
components
:
{
questionForm
},
data
()
{
return
{
easyList
:
[{
...
...
@@ -166,7 +184,8 @@
}],
msg
:
{
PaperId
:
1
}
},
isShowQuestion
:
false
,
}
},
created
()
{
...
...
@@ -181,6 +200,16 @@
GetPaper
(
this
.
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据'
);
})
},
//选题
choiceTi
(){
},
closeQuestForm
(){
this
.
isShowQuestion
=
false
;
},
refreshPage
(){
}
}
}
...
...
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