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
ef8a368f
Commit
ef8a368f
authored
Aug 20, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ed2afdca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
401 deletions
+57
-401
examPaper.vue
src/pages/exam/examPaper.vue
+56
-18
examPaper_V2.vue
src/pages/exam/examPaper_V2.vue
+0
-382
routes.js
src/router/routes.js
+1
-1
No files found.
src/pages/exam/examPaper.vue
View file @
ef8a368f
...
...
@@ -27,19 +27,29 @@
.Exam_PaperName
{
width
:
300px
;
display
:
inline
-block
;
display
:
inline
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
margin-left
:
3px
;
}
.Exam_PaperName
i
{
font-size
:
18px
;
}
.examPaper
.el-table__expand-icon
{
position
:
relative
;
top
:
-6px
;
.examPaper
.el-table
th
{
background-color
:
#F5F6F7
;
}
.examPNav
{
margin
:
10px
0
;
color
:
#3A8BFF
;
}
.examPNav
span
{
cursor
:
pointer
;
}
.lastExam
{
color
:
#6B89B3
;
cursor
:
default
!important
;
pointer-events
:
none
;
}
</
style
>
<!--试卷库管理-->
...
...
@@ -71,16 +81,33 @@
</div>
</div>
<div
class=
"page-content examPaper"
>
<el-table
:data=
"dataList"
v-loading=
"loading"
:expand-row-keys=
"expandKeys"
:default-expand-all=
"true"
class=
"tree-tab-chapter"
style=
"width: 100%;margin-bottom: 20px;"
row-key=
"PaperId"
ref=
"examPaperTab"
@
row-click=
"rowsClick"
:tree-props=
"
{ children: 'ChildList', hasChildren: 'hasChildren' }">
<div
v-if=
"navList&&navList.length>0"
class=
"examPNav"
>
<span
@
click=
"getPaperChild(0)"
>
全部
</span>
>
<template
v-for=
"(item,index) in navList"
>
<span
@
click=
"getPaperChild(item.PaperId)"
:class=
"
{'lastExam':index==navList.length-1}" :key="index">
{{
item
.
PaperName
}}
</span>
<span
v-if=
"index!=navList.length-1"
:key=
"index"
>
>
</span>
</
template
>
</div>
<el-table
:data=
"dataList"
v-loading=
"loading"
>
<el-table-column
prop=
"PaperName"
label=
"文件夹/试卷"
width=
"400"
>
<
template
slot-scope=
"scope"
>
<i
v-if=
"scope.row.PaperType==1"
title=
"文件夹"
class=
"iconfont icon-weibiaoti5"
style=
"color:#85CDFD;position:relative;top:-5px;"
></i>
<i
v-if=
"scope.row.PaperType==2"
title=
"试卷"
class=
"iconfont icon-icon-test1"
style=
"color:#85CDFD;position:relative;top:-5px;"
></i>
<div
class=
"Exam_PaperName"
>
{{
scope
.
row
.
PaperName
}}
<q-tooltip
v-if=
"scope.row.PaperName.length>10"
:offset=
"[10, 10]"
>
{{
scope
.
row
.
PaperName
}}
</q-tooltip>
<i
v-if=
"scope.row.PaperType==1"
title=
"文件夹"
class=
"iconfont icon-weibiaoti5"
style=
"color:#85CDFD;"
></i>
<i
v-if=
"scope.row.PaperType==2"
title=
"试卷"
class=
"iconfont icon-icon-test1"
style=
"color:#85CDFD;"
></i>
<div
class=
"Exam_PaperName"
>
<template
v-if=
"scope.row.PaperType==1"
>
<span
style=
"cursor:pointer;"
@
click=
"getPaperChild(scope.row.PaperId)"
>
{{
scope
.
row
.
PaperName
}}
</span>
</
template
>
<
template
v-else
>
{{
scope
.
row
.
PaperName
}}
<q-tooltip
v-if=
"scope.row.PaperName.length>10"
:offset=
"[10, 10]"
>
{{
scope
.
row
.
PaperName
}}
</q-tooltip>
</
template
>
</div>
</div>
</template>
</el-table-column>
...
...
@@ -131,7 +158,7 @@
label=
"重命名"
/>
</
template
>
<
template
v-if=
"scope.row.PaperType==2"
>
<q-btn
flat
size=
"xs"
color=
"primary"
style=
"font-weight:400
;width:68px;
"
@
click=
"goExameEdit(scope.row)"
<q-btn
flat
size=
"xs"
color=
"primary"
style=
"font-weight:400"
@
click=
"goExameEdit(scope.row)"
label=
"编辑"
/>
</
template
>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left: 10px"
>
...
...
@@ -199,18 +226,21 @@
pageIndex
:
1
,
pageSize
:
10
,
rowsPerPage
:
10
,
PaperName
:
''
//题库名
PaperName
:
''
,
//题库名
ParentId
:
0
,
},
pageCount
:
0
,
loading
:
false
,
dataList
:
[],
expandKeys
:
[],
isShowExamFolder
:
false
,
//是否显示新增文件夹
isShowMoveFolder
:
false
,
//是否显示
examObj
:
{},
//弹窗对象
navList
:
[],
//导航列表
}
},
created
()
{},
created
()
{
},
mounted
()
{
this
.
getList
();
},
...
...
@@ -227,14 +257,22 @@
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
getPaperChild
(
Id
)
{
this
.
msg
.
ParentId
=
Id
;
this
.
refreshPage
();
},
//获取菜单分页列表
getList
()
{
this
.
loading
=
true
;
this
.
dataList
=
[];
GetPaperPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
this
.
dataList
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
.
pageModel
.
PageData
;
this
.
pageCount
=
res
.
Data
.
pageModel
.
PageCount
;
this
.
navList
=
res
.
Data
.
navList
;
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
...
...
src/pages/exam/examPaper_V2.vue
deleted
100644 → 0
View file @
ed2afdca
<
style
>
.OtherCourseNum
{
display
:
inline-block
;
width
:
25px
;
height
:
25px
;
text-align
:
center
;
line-height
:
25px
;
border
:
1px
solid
#2961FE
;
border-radius
:
50%
;
cursor
:
pointer
;
color
:
#2961FE
;
}
.OCourseTable
{
width
:
400px
;
text-align
:
center
;
}
.OCourseTable
tr
td
{
height
:
40px
;
}
.OCourseTable
tr
th
{
height
:
40px
;
background-color
:
rgb
(
238
,
238
,
239
);
}
.Exam_PaperName
{
width
:
300px
;
display
:
inline
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.Exam_PaperName
i
{
font-size
:
18px
;
}
</
style
>
<!--试卷库管理-->
<
template
>
<div
class=
"page-body"
>
<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=
"getList"
clearable
filled
v-model=
"msg.PaperName"
@
clear=
"getList"
maxlength=
"20"
label=
"输入试卷名称、组卷人查找"
/>
</div>
</div>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"新增文件夹"
@
click=
"showExamFolder(null)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"新增试卷"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"CreatePaper()"
>
<q-item-section>
<q-item-label>
智能组卷
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"goExameEdit(null)"
>
<q-item-section>
<q-item-label>
手动组卷
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
</div>
<div
class=
"page-content"
>
<div
v-if=
"navList&&navList.length>0"
>
<div
@
click=
"getPaperChild(0)"
>
全部
</div>
>>
<template
v-for=
"(item,index) in navList"
>
<div
@
click=
"getPaperChild(item.PaperId)"
>
{{
item
.
PaperName
}}
</div>
</
template
>
</div>
<el-table
:data=
"dataList"
v-loading=
"loading"
>
<el-table-column
prop=
"PaperName"
label=
"文件夹/试卷"
width=
"400"
>
<
template
slot-scope=
"scope"
>
<div
class=
"Exam_PaperName"
>
<i
v-if=
"scope.row.PaperType==1"
title=
"文件夹"
class=
"iconfont icon-weibiaoti5"
style=
"color:#85CDFD;position:relative;top:-5px;"
></i>
<i
v-if=
"scope.row.PaperType==2"
title=
"试卷"
class=
"iconfont icon-icon-test1"
style=
"color:#85CDFD;position:relative;top:-5px;"
></i>
<div
class=
"Exam_PaperName"
>
<template
v-if=
"scope.row.PaperType==1"
>
<span
style=
"cursor:pointer;"
@
click=
"getPaperChild(scope.row.PaperId)"
>
{{
scope
.
row
.
PaperName
}}
</span>
</
template
>
<
template
v-else
>
{{
scope
.
row
.
PaperName
}}
<q-tooltip
v-if=
"scope.row.PaperName.length>10"
:offset=
"[10, 10]"
>
{{
scope
.
row
.
PaperName
}}
</q-tooltip>
</
template
>
</div>
</div>
</template>
</el-table-column>
<el-table-column
prop=
"QuestionCount"
label=
"题量"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.PaperType==1"
>
---
</
template
>
<
template
v-if=
"scope.row.PaperType==2"
>
{{
scope
.
row
.
QuestionCount
}}
</
template
>
</template>
</el-table-column>
<el-table-column
prop=
"DifficultyTypeName"
label=
"难度"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.PaperType==1"
>
---
</
template
>
<
template
v-if=
"scope.row.PaperType==2"
>
{{
scope
.
row
.
DifficultyTypeName
}}
</
template
>
</template>
</el-table-column>
<el-table-column
prop=
"PublishCount"
label=
"发布考试次数"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.PaperType==1"
>
---
</
template
>
<
template
v-if=
"scope.row.PaperType==2"
>
{{
scope
.
row
.
PublishCount
}}
</
template
>
</template>
</el-table-column>
<el-table-column
prop=
"CreateByName"
label=
"创建人"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
CreateByName
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"CreateTimeStr"
label=
"创建时间"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
CreateTimeStr
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.PaperType==1"
>
<q-btn
flat
size=
"xs"
color=
"primary"
style=
"font-weight:400"
@
click=
"showExamFolder(scope.row)"
label=
"重命名"
/>
</
template
>
<
template
v-if=
"scope.row.PaperType==2"
>
<q-btn
flat
size=
"xs"
color=
"primary"
style=
"font-weight:400"
@
click=
"goExameEdit(scope.row)"
label=
"编辑"
/>
</
template
>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left: 10px"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"publishExam(scope.row)"
v-if=
"scope.row.PaperType==2"
>
<q-item-section>
<q-item-label>
发布考试
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"showPaperInfo(scope.row)"
v-if=
"scope.row.PaperType==2"
>
<q-item-section>
<q-item-label>
详情
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"movePaperInfo(scope.row)"
>
<q-item-section>
<q-item-label>
移动到
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"copyPaperInfo(scope.row)"
v-if=
"scope.row.PaperType==2"
>
<q-item-section>
<q-item-label>
复制
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"deletePaperInfo(scope.row)"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</template>
</el-table-column>
</el-table>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</div>
<paperfolderForm
v-if=
"isShowExamFolder"
:saveObj=
"examObj"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
</paperfolderForm>
<movefolderForm
v-if=
"isShowMoveFolder"
:saveObj=
"examObj"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
</movefolderForm>
</div>
</template>
<
script
>
import
paperfolderForm
from
'../../components/exam/paperfolder-form'
import
movefolderForm
from
'../../components/exam/movefolder-form'
import
{
GetPaperPage
,
deletePaperInfo
,
copyPaperInfo
}
from
'../../api/teacher/index'
;
//获取校区列表
export
default
{
components
:
{
paperfolderForm
,
movefolderForm
,
},
meta
:
{
title
:
"考试管理"
},
data
()
{
return
{
data
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
rowsPerPage
:
10
,
PaperName
:
''
,
//题库名
ParentId
:
0
,
},
pageCount
:
0
,
loading
:
false
,
dataList
:
[],
isShowExamFolder
:
false
,
//是否显示新增文件夹
isShowMoveFolder
:
false
,
//是否显示
examObj
:
{},
//弹窗对象
navList
:
[],
//导航列表
}
},
created
()
{
},
mounted
()
{
this
.
getList
();
},
methods
:
{
rowsClick
(
row
,
column
,
event
)
{
this
.
$refs
.
examPaperTab
.
toggleRowExpansion
(
row
);
},
//创建试卷
CreatePaper
()
{
this
.
OpenNewUrl
(
'/exam/paperCreate'
,
{})
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
getPaperChild
(
Id
)
{
this
.
msg
.
ParentId
=
Id
;
this
.
refreshPage
();
},
//获取菜单分页列表
getList
()
{
this
.
loading
=
true
;
this
.
dataList
=
[];
GetPaperPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
.
pageModel
.
PageData
;
this
.
pageCount
=
res
.
Data
.
pageModel
.
PageCount
;
this
.
navList
=
res
.
Data
.
navList
;
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
//刷新页面
refreshPage
()
{
this
.
getList
();
},
//点击编辑 跳转
goExameEdit
(
item
)
{
let
PaperId
=
0
;
if
(
item
)
{
PaperId
=
item
.
PaperId
}
this
.
OpenNewUrl
(
'/exam/paperEdit'
,
{
Id
:
PaperId
})
},
//新增修改文件夹
showExamFolder
(
obj
)
{
this
.
examObj
=
obj
;
this
.
isShowExamFolder
=
true
;
},
//关闭弹窗
closeExamForm
()
{
this
.
isShowExamFolder
=
false
;
this
.
isShowMoveFolder
=
false
;
},
//发布考试
publishExam
(
item
)
{
let
PaperId
=
0
;
if
(
item
)
{
PaperId
=
item
.
PaperId
}
this
.
OpenNewUrl
(
'/exam/paperPublish'
,
{
PaperId
:
PaperId
})
},
//试卷详情
showPaperInfo
(
item
)
{
let
PaperId
=
0
;
if
(
item
)
{
PaperId
=
item
.
PaperId
}
this
.
OpenNewUrl
(
'/exam/paperInfo'
,
{
Id
:
PaperId
})
},
//移动到文件夹
movePaperInfo
(
item
)
{
this
.
examObj
=
item
;
this
.
isShowMoveFolder
=
true
;
},
//复制试卷
copyPaperInfo
(
item
)
{
var
msg
=
{
PaperId
:
item
.
PaperId
}
var
message
=
"是否要复制【"
+
item
.
PaperName
+
"】试卷?"
;
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
copyPaperInfo
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功!'
,
position
:
'top'
})
this
.
refreshPage
();
}
});
})
},
//删除
deletePaperInfo
(
item
)
{
var
msg
=
{
PaperId
:
item
.
PaperId
}
var
message
=
""
;
if
(
item
.
PaperType
==
1
)
{
message
=
"是否要删除【"
+
item
.
PaperName
+
"】及下面的内容?"
;
}
else
{
message
=
"是否要删除【"
+
item
.
PaperName
+
"】试卷?"
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deletePaperInfo
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功!'
,
position
:
'top'
})
this
.
refreshPage
();
}
});
})
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/router/routes.js
View file @
ef8a368f
...
...
@@ -1045,7 +1045,7 @@ const routes = [{
{
path
:
"/exam/examPaper"
,
//试卷管理
component
:
()
=>
import
(
"pages/exam/examPaper
_V2
"
)
import
(
"pages/exam/examPaper"
)
},
{
path
:
"/exam/examlist"
,
//考试管理
...
...
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