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
ed121a97
Commit
ed121a97
authored
Aug 17, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
31e8dd5f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
135 additions
and
17 deletions
+135
-17
class.js
src/api/course/class.js
+12
-0
classstutree-form.vue
src/components/exam/classstutree-form.vue
+76
-0
examPaper.vue
src/pages/exam/examPaper.vue
+4
-3
paperCreate.vue
src/pages/exam/paperCreate.vue
+0
-0
paperEdit.vue
src/pages/exam/paperEdit.vue
+0
-0
paperPublish.vue
src/pages/exam/paperPublish.vue
+35
-6
routes.js
src/router/routes.js
+8
-8
No files found.
src/api/course/class.js
View file @
ed121a97
...
...
@@ -439,4 +439,16 @@ export function delLessonComment(data) {
method
:
'post'
,
data
})
}
/**
* 获取班级学员树形列表
* @param {JSON参数} data
*/
export
function
queryClassStudentTree
(
data
)
{
return
request
({
url
:
'/Class/GetClassStudentTree'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/exam/classstutree-form.vue
0 → 100644
View file @
ed121a97
<
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"
>
<el-tree
:data=
"dataList"
show-checkbox
node-key=
"GuestId"
ref=
"classStuTree"
highlight-current
:props=
"defaultProps"
>
</el-tree>
</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
{
queryClassStudentTree
,
}
from
'../../api/course/class'
;
export
default
{
data
()
{
return
{
persistent
:
true
,
defaultProps
:
{
children
:
'SubList'
,
label
:
'Name'
},
msg
:
{},
//查询参数
loading
:
false
,
//表格加载进度条
dataList
:
[],
//数据列表
}
},
mounted
()
{
this
.
getClassStudentTree
();
},
methods
:
{
//获取题库分页列表
getClassStudentTree
()
{
queryClassStudentTree
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
}
})
},
//关闭弹窗
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
//确认选择
sureQuestionBank
()
{
this
.
persistent
=
false
;
var
tempArray
=
[];
var
checkArray
=
this
.
$refs
.
classStuTree
.
getCheckedNodes
();
if
(
checkArray
&&
checkArray
.
length
>
0
)
{
checkArray
.
forEach
(
item
=>
{
if
(
item
.
SubList
&&
item
.
SubList
.
length
>
0
)
{
}
else
{
tempArray
.
push
(
item
);
}
})
}
this
.
$emit
(
'success'
,
tempArray
);
},
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/exam/exam
Management
.vue
→
src/pages/exam/exam
Paper
.vue
View file @
ed121a97
...
...
@@ -38,6 +38,7 @@
}
</
style
>
<!--试卷库管理-->
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
...
...
@@ -189,7 +190,7 @@
},
//创建试卷
CreatePaper
()
{
this
.
OpenNewUrl
(
'/exam/
exam
Create'
,
{})
this
.
OpenNewUrl
(
'/exam/
paper
Create'
,
{})
},
//翻页
changePage
(
val
)
{
...
...
@@ -218,7 +219,7 @@
if
(
item
)
{
PaperId
=
item
.
PaperId
}
this
.
OpenNewUrl
(
'/exam/
exam
Edit'
,
{
this
.
OpenNewUrl
(
'/exam/
paper
Edit'
,
{
Id
:
PaperId
})
},
...
...
@@ -237,7 +238,7 @@
if
(
item
)
{
PaperId
=
item
.
PaperId
}
this
.
OpenNewUrl
(
'/exam/
exam
Publish'
,
{
this
.
OpenNewUrl
(
'/exam/
paper
Publish'
,
{
PaperId
:
PaperId
})
}
...
...
src/pages/exam/
exam
Create.vue
→
src/pages/exam/
paper
Create.vue
View file @
ed121a97
File moved
src/pages/exam/
exam
Edit.vue
→
src/pages/exam/
paper
Edit.vue
View file @
ed121a97
File moved
src/pages/exam/
exam
Publish.vue
→
src/pages/exam/
paper
Publish.vue
View file @
ed121a97
...
...
@@ -23,14 +23,18 @@
<
template
>
<div
class=
"page-body"
>
发布考试
<div
class=
"row"
>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"showClassStu"
class=
"q-mr-md"
label=
"选择学员"
/><br
/>
<template
v-if=
"postMsg.StudentList&&postMsg.StudentList.length>0"
>
<span
v-for=
"(item,index) in postMsg.StudentList"
:key=
"index"
style=
"padding-left:5px;"
>
{{
item
.
GuestName
}}
</span>
</
template
>
</div>
<div
class=
"row"
>
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"postMsg.ExamStartTime"
class=
"col-6 q-pb-lg q-pr-lg"
label=
"开始时间"
/>
<q-input
filled
stack-label
maxlength=
"30"
:dense=
"false"
v-model=
"postMsg.ExamEndTime"
class=
"col-6 q-pb-lg"
label=
"结束时间"
/>
</div>
<div
class=
"row"
>
<q-input
filled
bottom-slots
maxlength=
"10"
v-model=
"postMsg.ExamTimes"
label=
"考试限时"
class=
"col-6 q-pb-lg q-pr-lg"
:dense=
"false"
>
...
...
@@ -115,17 +119,19 @@
<div
class=
"row"
>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"setPublishExam"
class=
"q-mr-md"
label=
"发布考试"
/>
</div>
<classstutreeForm
v-if=
"isShowClassStu"
@
close=
"closeClassStuForm"
@
success=
"getClassStuList"
>
</classstutreeForm>
</div>
</template>
<
script
>
'../../api/question/question
'
import
classstutreeForm
from
'../../components/exam/classstutree-form
'
import
{
savePublishExam
,
}
from
'../../api/teacher/index'
;
export
default
{
components
:
{
classstutreeForm
},
meta
:
{
title
:
"发布考试"
...
...
@@ -154,7 +160,9 @@
FillInIsSubject
:
0
,
//填空类型的题目设为主观题(1-是)
FillInIsIgnore
:
0
,
//填空题答案不区分大小写(1-是)
IsHalfScore
:
1
,
//多选题未选全给一半分(1-是)
StudentList
:
[],
},
isShowClassStu
:
false
,
//是否显示学员弹窗
}
},
created
()
{
...
...
@@ -166,7 +174,28 @@
},
methods
:
{
//显示班级学员弹窗
showClassStu
()
{
this
.
isShowClassStu
=
true
;
},
//关闭班级学员弹窗
closeClassStuForm
()
{
this
.
isShowClassStu
=
false
;
},
//获取选中的需要列表
getClassStuList
(
array
)
{
if
(
array
&&
array
.
length
>
0
)
{
array
.
forEach
(
item
=>
{
this
.
postMsg
.
StudentList
.
push
({
GuestId
:
item
.
GuestId
,
ClassId
:
item
.
ClassId
,
OrderId
:
item
.
OrderId
,
CourseId
:
item
.
CourseId
,
GuestName
:
item
.
Name
,
});
})
}
},
//发布考试
setPublishExam
()
{
savePublishExam
(
this
.
postMsg
).
then
(
res
=>
{
...
...
@@ -179,7 +208,7 @@
position
:
'top'
})
this
.
$router
.
push
({
path
:
'/exam/exam
Management
'
,
path
:
'/exam/exam
Paper
'
,
query
:
{}
});
}
else
{
...
...
src/router/routes.js
View file @
ed121a97
...
...
@@ -1039,24 +1039,24 @@ const routes = [{
import
(
"pages/teacher/myClass"
)
},
{
path
:
"/exam/exam
Management
"
,
//试卷管理
path
:
"/exam/exam
Paper
"
,
//试卷管理
component
:
()
=>
import
(
"pages/exam/exam
Management
"
)
import
(
"pages/exam/exam
Paper
"
)
},
{
path
:
"/exam/
exam
Edit"
,
//考试编辑
path
:
"/exam/
paper
Edit"
,
//考试编辑
component
:
()
=>
import
(
"pages/exam/
exam
Edit"
)
import
(
"pages/exam/
paper
Edit"
)
},
{
path
:
"/exam/
exam
Create"
,
//考试组卷
path
:
"/exam/
paper
Create"
,
//考试组卷
component
:
()
=>
import
(
"pages/exam/
exam
Create"
)
import
(
"pages/exam/
paper
Create"
)
},
{
path
:
"/exam/
exam
Publish"
,
//发布考试
path
:
"/exam/
paper
Publish"
,
//发布考试
component
:
()
=>
import
(
"pages/exam/
exam
Publish"
)
import
(
"pages/exam/
paper
Publish"
)
},
{
path
:
"/teacher/testdatabase"
,
//题库查询
...
...
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