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
c07399bf
Commit
c07399bf
authored
Sep 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
efc6234b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
322 additions
and
136 deletions
+322
-136
question.js
src/api/question/question.js
+15
-3
exampaperlist.vue
src/components/exam/exampaperlist.vue
+3
-3
exampublishlist.vue
src/components/exam/exampublishlist.vue
+2
-1
paperCreate.vue
src/pages/exam/paperCreate.vue
+209
-108
paperEdit.vue
src/pages/exam/paperEdit.vue
+93
-21
No files found.
src/api/question/question.js
View file @
c07399bf
...
...
@@ -243,12 +243,24 @@ export function saveBatchQuestionLevel(data) {
}
/**
* 根据题库编号获取题库题型
分类列表
【试卷组卷使用】
* 根据题库编号获取题库题型
列表(单选题、多选题、等)
【试卷组卷使用】
* @param {*} data
*/
export
function
queryQuestion
Category
List
(
data
)
{
export
function
queryQuestion
TypeStatic
List
(
data
)
{
return
request
({
url
:
'/Question/GetQuestionCategoryList'
,
url
:
'/Question/GetQuestionTypeStaticList'
,
method
:
'post'
,
data
})
}
/**
* 根据题库编号获取题库题型分类列表(读音选择题、汉字选择题等)【试卷组卷使用】
* @param {*} data
*/
export
function
queryQuestionCategoryStaticList
(
data
)
{
return
request
({
url
:
'/Question/GetQuestionCategoryStaticList'
,
method
:
'post'
,
data
})
...
...
src/components/exam/exampaperlist.vue
View file @
c07399bf
...
...
@@ -314,9 +314,9 @@
methods
:
{
//是否可修改
isEdit
(
item
)
{
//
if (this.currentUserInfo.Id == 1) {
//
return true;
//
}
if
(
this
.
currentUserInfo
.
Id
==
1
)
{
return
true
;
}
return
this
.
currentUserInfo
.
Id
==
item
.
CreateBy
&&
(
item
.
ExamineStatus
==
0
||
item
.
ExamineStatus
==
3
||
item
.
ExamineStatus
==
4
)
},
...
...
src/components/exam/exampublishlist.vue
View file @
c07399bf
...
...
@@ -20,7 +20,8 @@
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
v-if=
"props.row.IsEdit==1"
color=
"accent"
style=
"font-weight: 400"
label=
"修改"
@
click=
"publishExam(props.row)"
/>
<!--v-if="props.row.IsEdit==1"-->
<q-btn
flat
size=
"xs"
color=
"accent"
style=
"font-weight: 400"
label=
"修改"
@
click=
"publishExam(props.row)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left: 10px"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"submitExamAudit(props.row)"
...
...
src/pages/exam/paperCreate.vue
View file @
c07399bf
This diff is collapsed.
Click to expand it.
src/pages/exam/paperEdit.vue
View file @
c07399bf
...
...
@@ -280,6 +280,11 @@
<q-radio
v-model=
"DataObj.IsOpen"
:val=
"1"
label=
"私有"
/>
<q-radio
v-model=
"DataObj.IsOpen"
:val=
"2"
label=
"公开"
/>
</div>
<div
style=
"margin:8px 0 0 20px"
>
组卷类型:
<q-radio
v-model=
"DataObj.GroupType"
:val=
"1"
label=
"问题类型"
/>
<q-radio
v-model=
"DataObj.GroupType"
:val=
"2"
label=
"题目大类"
/>
</div>
</div>
<div
style=
"width:20%;text-align:right;"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"预览"
style=
"display:none;"
/>
...
...
@@ -292,6 +297,16 @@
<p
class=
"Left-ptitel"
>
<span>
题量:
<i>
{{
examNum
}}
</i></span>
<span>
总分:
<i>
{{
examScore
.
toFixed
(
2
)
}}
</i></span>
<q-btn-dropdown
color=
"primary"
label=
"添加分类"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"onCategoryItemClick(item)"
v-for=
"(item,index) in newQuestionCategoryList"
:key=
"index"
>
<q-item-section>
<q-item-label>
{{
item
.
Name
}}
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</p>
<div
class=
"Left-list"
>
<template
v-if=
"DataObj&&DataObj.GroupList&&DataObj.GroupList.length>0"
>
...
...
@@ -299,9 +314,11 @@
<div
class=
"List-bt"
>
<div
class=
"paperEdit_Top"
>
<template
v-if=
"!gItem.isShowEdit"
>
<div>
{{
gIndex
+
1
}}
</div>
<div
class=
"paper_GroupName"
:title=
"gItem.GroupName"
>
{{
gItem
.
GroupName
}}
</div>
<div>
(共
{{
gItem
.
DetailsList
?
gItem
.
DetailsList
.
length
:
0
}}
题,
{{
gItem
.
GScore
}}
分)
</div>
<div
@
click=
"GetGroupItem(gItem)"
>
<div>
{{
gIndex
+
1
}}
</div>
<div
class=
"paper_GroupName"
:title=
"gItem.GroupName"
>
{{
gItem
.
GroupName
}}
</div>
<div>
(共
{{
gItem
.
DetailsList
?
gItem
.
DetailsList
.
length
:
0
}}
题,
{{
gItem
.
GScore
}}
分)
</div>
</div>
</
template
>
<
template
v-else
>
<el-input
v-model=
"gItem.GroupName"
size=
"small"
maxlength=
"50"
...
...
@@ -575,7 +592,9 @@
PaperType
:
2
,
//试卷类型(1-文件夹,2-试卷)
ParentId
:
0
,
//父节点编号,
GroupList
:
[],
//试卷答题分类
IsOpen
:
1
//(1-私有,2-开放)
IsOpen
:
1
,
//(1-私有,2-开放)
GroupType
:
1
,
//组卷类型
PaperScore
:
0
,
//试卷总分数
},
//点击问题对象
ChooseItem
:
null
,
...
...
@@ -594,6 +613,25 @@
ComCheckIndex
:
-
1
,
savePaperLoading
:
false
,
isShowPoint
:
false
,
//选择知识点
clickGroupItem
:
null
,
//选择的分组
}
},
computed
:
{
//获取计算后的问题分类(读音选择题、汉字选择题等)
newQuestionCategoryList
()
{
let
newArray
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
questionCategoryList
));
if
(
newArray
&&
newArray
.
length
>
0
)
{
if
(
this
.
DataObj
.
GroupList
&&
this
.
DataObj
.
GroupList
.
length
>
0
)
{
this
.
DataObj
.
GroupList
.
forEach
(
x
=>
{
newArray
.
forEach
((
qItem
,
index
)
=>
{
if
(
x
.
QuestionTypeId
==
qItem
.
Id
)
{
newArray
.
splice
(
index
,
1
);
}
})
})
}
}
return
newArray
;
}
},
created
()
{
...
...
@@ -619,6 +657,22 @@
}
},
methods
:
{
GetGroupItem
(
gItem
)
{
this
.
clickGroupItem
=
gItem
;
},
//添加分类
onCategoryItemClick
(
qObj
)
{
this
.
DataObj
.
GroupList
.
push
({
GId
:
0
,
//大题分组编号
PaperId
:
0
,
//试卷编号
GroupName
:
qObj
.
Name
,
QuestionTypeId
:
qObj
.
Id
,
QuestionTypeKey
:
""
,
GSortNum
:
0
,
GScore
:
0
,
//分数
DetailsList
:
[],
//问题列表
});
},
//关闭知识点弹窗
closeQuestionPoint
()
{
this
.
isShowPoint
=
false
;
...
...
@@ -840,26 +894,42 @@
}
if
(
qArray
&&
qArray
.
length
>
0
)
{
qArray
.
forEach
(
qItem
=>
{
if
(
!
this
.
checkGroupExists
(
qItem
.
QuestionTypeId
))
{
this
.
DataObj
.
GroupList
.
push
({
GId
:
0
,
//大题分组编号
PaperId
:
0
,
//试卷编号
GroupName
:
qItem
.
GroupName
,
QuestionTypeId
:
qItem
.
QuestionTypeId
,
QuestionTypeKey
:
qItem
.
QuestionTypeKey
,
GSortNum
:
0
,
GScore
:
0
,
//分数
DetailsList
:
[],
//问题列表
});
var
gObj
=
{
GId
:
0
,
//大题分组编号
PaperId
:
0
,
//试卷编号
GroupName
:
qItem
.
GroupName
,
QuestionTypeId
:
qItem
.
QuestionTypeId
,
QuestionTypeKey
:
qItem
.
QuestionTypeKey
,
GSortNum
:
0
,
GScore
:
0
,
//分数
DetailsList
:
[],
//问题列表
}
this
.
DataObj
.
GroupList
.
forEach
((
gItem
,
gIndex
)
=>
{
if
(
gItem
.
QuestionTypeId
==
qItem
.
QuestionTypeId
)
{
if
(
!
gItem
.
DetailsList
)
{
gItem
.
DetailsList
=
[];
//题目类型
if
(
!
this
.
checkGroupExists
(
qItem
.
QuestionTypeId
)
&&
this
.
DataObj
.
GroupType
==
1
)
{
this
.
DataObj
.
GroupList
.
push
(
gObj
);
}
if
(
this
.
DataObj
.
GroupType
==
1
)
{
this
.
DataObj
.
GroupList
.
forEach
((
gItem
,
gIndex
)
=>
{
if
(
gItem
.
QuestionTypeId
==
qItem
.
QuestionTypeId
)
{
if
(
!
gItem
.
DetailsList
)
{
gItem
.
DetailsList
=
[];
}
gItem
.
DetailsList
.
push
(
qItem
);
}
gItem
.
DetailsList
.
push
(
qItem
);
})
}
//题目分类
else
if
(
this
.
DataObj
.
GroupType
==
2
)
{
if
(
!
this
.
clickGroupItem
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择左侧分类!`
})
}
else
{
this
.
clickGroupItem
.
DetailsList
.
push
(
qItem
);
}
}
)
}
})
}
}
...
...
@@ -940,6 +1010,7 @@
this
.
DataObj
.
PaperType
=
tempData
.
PaperType
;
this
.
DataObj
.
ParentId
=
tempData
.
ParentId
;
this
.
DataObj
.
IsOpen
=
tempData
.
IsOpen
;
this
.
DataObj
.
GroupType
=
tempData
.
GroupType
;
if
(
tempData
.
GroupList
&&
tempData
.
GroupList
.
length
>
0
)
{
this
.
DataObj
.
GroupList
=
tempData
.
GroupList
;
}
...
...
@@ -1025,6 +1096,7 @@
//保存题目
SavePaper
()
{
if
(
this
.
validateType
())
{
this
.
DataObj
.
PaperScore
=
this
.
examScore
;
this
.
savePaperLoading
=
true
;
savePaperInfo
(
this
.
DataObj
).
then
(
res
=>
{
this
.
savePaperLoading
=
false
;
...
...
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