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
96837427
Commit
96837427
authored
Aug 11, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7eaf3c3f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
300 additions
and
54 deletions
+300
-54
question-form.vue
src/components/exam/question-form.vue
+0
-1
questionbank-form.vue
src/components/exam/questionbank-form.vue
+140
-0
examCreate.vue
src/pages/exam/examCreate.vue
+101
-0
examEdit.vue
src/pages/exam/examEdit.vue
+46
-51
examManagement.vue
src/pages/exam/examManagement.vue
+8
-2
routes.js
src/router/routes.js
+5
-0
No files found.
src/components/exam/question-form.vue
View file @
96837427
...
...
@@ -172,7 +172,6 @@
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
;
...
...
src/components/exam/questionbank-form.vue
0 → 100644
View file @
96837427
<
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-12"
>
<q-input
@
input=
"research"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.BankName"
label=
"关键字"
@
clear=
"research"
maxlength=
"20"
/>
</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=
"BankId"
selection=
"multiple"
:selected
.
sync=
"selectedQuestionBank"
>
<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"
@
click=
"sureQuestionBank"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
queryQuestionBankPage
,
}
from
'../../api/question/question'
;
export
default
{
data
()
{
return
{
persistent
:
true
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
BankName
:
''
},
pageCount
:
0
,
//总页数
loading
:
false
,
//表格加载进度条
columns
:
[{
name
:
'RowNum'
,
label
:
'编号'
,
field
:
'RowNum'
,
align
:
'left'
},
{
name
:
'BankNo'
,
label
:
'题库序号'
,
field
:
'BankNo'
,
align
:
'left'
,
},
{
name
:
'BankName'
,
label
:
'题库名称'
,
field
:
'BankName'
,
align
:
'left'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
field
:
'CreateByName'
,
align
:
'left'
},
{
name
:
'QuestionCount'
,
label
:
'题量'
,
field
:
'QuestionCount'
,
align
:
'left'
},
],
dataList
:
[],
//数据列表
selectedQuestionBank
:
[],
//选择的题库
}
},
mounted
()
{
this
.
getQuestionBankPage
();
},
methods
:
{
//获取题库分页列表
getQuestionBankPage
()
{
queryQuestionBankPage
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}
})
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getQuestionBankPage
()
},
research
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getQuestionBankPage
();
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
//确认选择
sureQuestionBank
()
{
this
.
persistent
=
false
;
var
tempArray
=
[];
if
(
this
.
selectedQuestionBank
&&
this
.
selectedQuestionBank
.
length
>
0
)
{
this
.
selectedQuestionBank
.
forEach
(
item
=>
{
tempArray
.
push
({
BankId
:
item
.
BankId
,
BankName
:
item
.
BankName
,
})
})
}
this
.
$emit
(
'success'
,
tempArray
);
},
},
}
</
script
>
src/pages/exam/examCreate.vue
0 → 100644
View file @
96837427
<!--组卷-->
<
style
>
.examCreate
{
margin-left
:
100px
;
}
</
style
>
<
template
>
<div
class=
"examCreate"
>
<br
/>
组卷题库(*):
{{
ShowBankName
}}
<a
style=
"cursor:pointer;color:blue"
@
click=
"showQuestionBank"
>
选择题库
</a>
<br
/>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"postMsg.GenerateType==1"
class=
"q-mr-md"
label=
"智能组卷"
/>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"postMsg.GenerateType==2,setExamPaper"
class=
"q-mr-md"
label=
"手动组卷"
/>
<br
/>
<br
/>
<template
v-if=
"postMsg.GenerateType==1"
>
</
template
>
<
template
v-if=
"postMsg.GenerateType==2"
>
</
template
>
<questionbankForm
v-if=
"isShowQuestionBank"
@
close=
"closeQuestionBankForm"
@
success=
"getBankData"
>
</questionbankForm>
</div>
</template>
<
script
>
import
questionbankForm
from
'../../components/exam/questionbank-form'
import
{
queryQuestionTypeList
,
queryDifficultyType
,
queryQuestionCategory
,
queryQuestionLevelType
}
from
'../../api/question/question'
import
{
savePaperInfo
,
}
from
'../../api/teacher/index'
;
export
default
{
components
:
{
questionbankForm
},
meta
:
{
title
:
"组卷"
},
data
()
{
return
{
isShowQuestionBank
:
false
,
//是否显示题库列表
postMsg
:
{
PaperId
:
0
,
//试卷编号
PaperName
:
"新建试卷"
,
//试卷名称
QuestionBandIds
:
""
,
//题库编号【多个逗号分割】
DifficultyType
:
1
,
//难易程度
GenerateType
:
0
,
//组卷类型(1-智能组卷,2-手动组卷,3-智能导入)
},
ShowBankName
:
""
,
//显示题库名称
}
},
created
()
{
},
mounted
()
{
},
methods
:
{
//显示题库
showQuestionBank
()
{
this
.
isShowQuestionBank
=
true
;
},
//关闭题库
closeQuestionBankForm
()
{
this
.
isShowQuestionBank
=
false
;
},
//获取选择的题库
getBankData
(
bankArray
)
{
this
.
isShowQuestionBank
=
false
;
var
qBankIds
=
""
;
var
sBankName
=
""
;
if
(
bankArray
&&
bankArray
.
length
>
0
)
{
bankArray
.
forEach
(
item
=>
{
qBankIds
+=
","
+
item
.
BankId
;
sBankName
+=
","
+
item
.
BankName
;
});
}
if
(
qBankIds
.
substr
(
0
,
1
)
==
','
)
{
qBankIds
=
qBankIds
.
substr
(
1
);
}
if
(
sBankName
.
substr
(
0
,
1
)
==
','
)
{
sBankName
=
sBankName
.
substr
(
1
);
}
this
.
postMsg
.
QuestionBandIds
=
qBankIds
;
this
.
ShowBankName
=
sBankName
;
},
//保存试卷信息
setExamPaper
()
{
savePaperInfo
(
this
.
postMsg
).
then
(
res
=>
{
});
}
}
}
</
script
>
src/pages/exam/examEdit.vue
View file @
96837427
...
...
@@ -82,7 +82,7 @@
width
:
328px
;
}
.List-ul
li
{
.List-ul
li
{
display
:
block
;
padding-left
:
25px
;
line-height
:
33px
;
...
...
@@ -93,7 +93,7 @@
text-decoration
:
none
;
min-width
:
250px
;
overflow
:
hidden
;
padding-right
:
20px
;
padding-right
:
20px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
}
...
...
@@ -119,42 +119,49 @@
justify-content
:
space-between
;
align-items
:
center
;
}
.List-bt
{
width
:
318px
;
height
:
27px
;
background
:
#fdfdfd
;
font-size
:
14px
;
line-height
:
27px
;
padding-left
:
10px
;
width
:
318px
;
height
:
27px
;
background
:
#fdfdfd
;
font-size
:
14px
;
line-height
:
27px
;
padding-left
:
10px
;
}
.List-ul
li
:hover
{
.List-ul
li
:hover
{
background
:
#a6a6a6
;
color
:
#333
;
}
.left-btn-list
{
padding
:
5px
10px
;
.left-btn-list
{
padding
:
5px
10px
;
display
:
inline-block
;
color
:
#555
;
border-radius
:
3px
;
font-size
:
14px
;
border
:
1px
solid
#999
;
margin-right
:
10px
;
font-size
:
14px
;
border
:
1px
solid
#999
;
margin-right
:
10px
;
cursor
:
pointer
;
}
#btn1
{
background
:
#26a69a
!important
;
#btn1
{
background
:
#26a69a
!important
;
}
.difficulty_Degree
{
.difficulty_Degree
{
display
:
inline-block
;
width
:
80px
;
width
:
80px
;
text-align
:
right
;
line-height
:
56px
;
}
.commonDalei
{
.commonDalei
{
display
:
flex
;
align-content
:
center
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
</
style
>
<
template
>
<div
class=
"examPaper"
>
...
...
@@ -164,8 +171,8 @@
<q-input
filled
label=
"标题"
v-model=
"DataObj.PaperName"
/>
</div>
<div
style=
"width:20%;"
>
<q-select
filled
option-value=
"Id"
option-label=
"Name"
:options=
"
easyList"
emit-value
map-options
label=
"难度"
use-input
clearable
v-model=
"DataObj.DifficultyType"
/>
<q-select
filled
option-value=
"Id"
option-label=
"Name"
:options=
"
questionDifficultyTypeList"
emit-value
map-options
label=
"难度"
use-input
clearable
v-model=
"DataObj.DifficultyType"
/>
</div>
</div>
<div
style=
"width:20%;text-align:right;"
>
...
...
@@ -200,13 +207,10 @@
</div>
<div
class=
"Exam-right f1"
>
<div
class=
"Left-btn"
>
<div>
<!-- <template v-for="(fItem,fIndex) in firstTypeList">
<span class="left-btn-list" :key="fIndex" @click="onItemClick(fItem)">{{fItem.Name}}</span>
</template> -->
<div>
<
template
v-for=
"(fItem,fIndex) in firstTypeList"
>
<q-btn
:key=
"fIndex"
color=
"accent"
:id=
"commonIndex==fIndex?'btn1':''"
size=
"sm"
:label=
"fItem.Name"
style=
"margin-left:5px;"
@
click=
"onItemClick(fItem,fIndex)"
/>
<q-btn
:key=
"fIndex"
color=
"accent"
:id=
"commonIndex==fIndex?'btn1':''"
size=
"sm"
:label=
"fItem.Name"
style=
"margin-left:5px;"
@
click=
"onItemClick(fItem,fIndex)"
/>
</
template
>
<q-btn-dropdown
color=
"accent"
size=
"sm"
label=
"更多"
style=
"margin-left:5px;"
>
<q-list>
...
...
@@ -219,9 +223,10 @@
</q-list>
</q-btn-dropdown>
</div>
<div>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"isShowQuestion=true"
class=
"q-mr-md"
label=
"题库选题"
/>
</div>
<div>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"isShowQuestion=true"
class=
"q-mr-md"
label=
"题库选题"
/>
</div>
</div>
<div
class=
"row wrap"
v-if=
"ChooseItem"
style=
"padding:20px;"
>
<div
class=
"edit_stem"
>
...
...
@@ -282,19 +287,19 @@
<div
class=
"col-12 commonDalei"
style=
"margin-top:20px;"
>
<span
class=
"difficulty_Degree"
>
难度:
</span>
<q-select
filled
option-value=
"Id"
size=
"sm"
style=
"display:inline-block;width:300px;"
option-label=
"Name"
v-model=
"ChooseItem.DifficultyType"
:options=
"questionDifficultyTypeList"
emit-value
map-options
/>
v-model=
"ChooseItem.DifficultyType"
:options=
"questionDifficultyTypeList"
emit-value
map-options
/>
</div>
<div
class=
"col-12 commonDalei"
>
<br
/>
<span
class=
"difficulty_Degree"
>
所属大类:
</span>
<q-select
filled
option-value=
"Id"
size=
"sm"
style=
"display:inline-block;width:300px;"
option-label=
"Name"
v-model=
"ChooseItem.Category"
:options=
"questionCategoryList"
emit-value
map-options
/>
v-model=
"ChooseItem.Category"
:options=
"questionCategoryList"
emit-value
map-options
/>
</div>
<div
class=
"col-12 commonDalei"
>
<br
/>
<span
class=
"difficulty_Degree"
>
考级程度:
</span>
<q-select
filled
option-value=
"Id"
size=
"sm"
style=
"display:inline-block;width:300px;"
option-label=
"Name"
v-model=
"ChooseItem.LevelType"
:options=
"questionLevalTypeList"
emit-value
map-options
/>
v-model=
"ChooseItem.LevelType"
:options=
"questionLevalTypeList"
emit-value
map-options
/>
</div>
<div
class=
"col-12"
>
<span
class=
"difficulty_Degree"
>
知识点:
</span>
...
...
@@ -328,7 +333,7 @@
import
cloze
from
'../../components/questiontype/cloze'
import
readingComprehensio
from
'../../components/questiontype/reading-comprehensio'
import
sharingChoose
from
'../../components/questiontype/sharing-choose'
import
questionForm
from
'../../components/exam/question-form'
import
questionForm
from
'../../components/exam/question-form'
import
{
GetPaper
,
savePaperInfo
,
...
...
@@ -365,16 +370,6 @@
initialFrameWidth
:
null
,
initialFrameHeight
:
80
,
},
easyList
:
[{
Id
:
1
,
Name
:
'难'
},
{
Id
:
2
,
Name
:
'中'
},
{
Id
:
3
,
Name
:
'易'
}],
msg
:
{
PaperId
:
0
},
...
...
@@ -388,8 +383,8 @@
choosePointArray
:
[],
//选择知识点
firstTypeList
:
[],
//第一类题型
secondTypeList
:
[],
//第二类题型
isShowQuestion
:
false
,
commonIndex
:
-
1
isShowQuestion
:
false
,
commonIndex
:
-
1
}
},
created
()
{
...
...
@@ -418,7 +413,7 @@
});
},
//题型点击
onItemClick
(
item
,
index
)
{
onItemClick
(
item
,
index
)
{
// this.AnswerList = [];
// this.questionObj = item;
// this.objOption.QuestionTypeId = item.QId;
...
...
@@ -428,7 +423,7 @@
// if (obj) {
// this.objOption.QuestionContent = JSON.stringify(obj);
// }
this
.
commonIndex
=
index
this
.
commonIndex
=
index
},
//获取问题大类
getQuestionCategory
()
{
...
...
@@ -470,10 +465,10 @@
console
.
log
(
"res"
,
res
);
})
},
closeQuestForm
(){
closeQuestForm
()
{
this
.
isShowQuestion
=
false
;
},
refreshPage
(){
refreshPage
()
{
}
}
...
...
src/pages/exam/examManagement.vue
View file @
96837427
...
...
@@ -47,7 +47,7 @@
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
试卷管理
</div>
<q-space
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"组卷"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"组卷"
@
click=
"CreatePaper()"
/>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
...
...
@@ -139,6 +139,11 @@
this
.
getList
();
},
methods
:
{
//创建试卷
CreatePaper
()
{
this
.
OpenNewUrl
(
'/exam/examCreate'
,
{
})
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
...
...
@@ -162,13 +167,14 @@
},
//点击编辑 跳转
goExameEdit
(
item
)
{
console
.
log
(
"item"
,
item
);
console
.
log
(
"item"
,
item
);
this
.
OpenNewUrl
(
'/exam/examEdit'
,
{
Id
:
item
.
PaperId
})
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
...
...
src/router/routes.js
View file @
96837427
...
...
@@ -1048,6 +1048,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/exam/examEdit"
)
},
{
path
:
"/exam/examCreate"
,
//考试组卷
component
:
()
=>
import
(
"pages/exam/examCreate"
)
},
{
path
:
"/teacher/testdatabase"
,
//题库查询
component
:
()
=>
...
...
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