Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
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
李苏
sgaqgl-vue
Commits
a40007f4
Commit
a40007f4
authored
Dec 14, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
构建试卷
parent
0546a628
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1000 additions
and
311 deletions
+1000
-311
index.js
src/router/index.js
+27
-15
index.vue
src/views/train/onlinExamination/index.vue
+4
-2
edit.vue
src/views/train/paperManagement/bac/edit.vue
+117
-0
index.vue
src/views/train/paperManagement/bac/index.vue
+221
-0
step.vue
src/views/train/paperManagement/bac/step.vue
+0
-0
dtl.vue
src/views/train/paperManagement/dtl.vue
+108
-0
index.vue
src/views/train/paperManagement/dtl/index.vue
+6
-6
dtlEdit.vue
src/views/train/paperManagement/dtlEdit.vue
+78
-0
edit.vue
src/views/train/paperManagement/edit.vue
+275
-103
index.vue
src/views/train/paperManagement/index.vue
+91
-163
index.vue
src/views/train/testPaper/index.vue
+47
-16
subject.vue
src/views/train/testPaper/subject.vue
+26
-6
No files found.
src/router/index.js
View file @
a40007f4
...
...
@@ -873,37 +873,36 @@ export const powerRoutes=[
name
:
'testPaper'
,
path
:
"testPaper"
},
/*,
{
commonComponent:'paperManagement',
component:() => import( "@/views/train/paperManagement/index"),
component
:
'train/onlinExamination/index'
,
hidden
:
false
,
meta
:{
"title": "
试卷
管理",
"title"
:
"
在线考试
管理"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid":
1010013009
,
"mkid"
:
'test'
,
},
name:'
paperManagement
',
path:"
paperManagement
"
name
:
'
onlinExamination
'
,
path
:
"
onlinExamination
"
},
{
commonComponent:'onlinExamination',
component:() => import( "@/views/train/onlinExamination/index"),
component
:
'train/paperManagement/index'
,
hidden
:
false
,
meta
:{
"title": "
在线考试
管理",
"title"
:
"
试卷
管理"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid":
1010013009
,
"mkid"
:
906001000
,
},
name:'
onlinExamination
',
path:"
onlinExamination
"
name
:
'
paperManagement
'
,
path
:
"
paperManagement
"
},
/*,
{
commonComponent:'marking',
component:() => import( "@/views/train/marking/index"),
...
...
@@ -936,6 +935,19 @@ export const powerRoutes=[
]
},
{
path
:
"/paper/:id"
,
component
:
'train/testPaper/index'
,
hidden
:
true
,
meta
:{
"title"
:
"考试试卷"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
'test'
,
},
name
:
'paper'
,
},
/* 查询统计 */
{
path
:
'/statistics'
,
...
...
src/views/train/onlinExamination/index.vue
View file @
a40007f4
...
...
@@ -81,7 +81,7 @@
<el-button
class=
"butRight"
plain
type=
"primary"
size=
"mini"
style=
"width: 120px;"
>
检查答题情况
</el-button>
</el-col>
<el-col
:span=
"12"
>
<el-button
class=
"butRight"
plain
type=
"primary"
size=
"mini"
style=
"width: 120px;"
>
交卷
</el-button>
<el-button
@
click=
'test()'
class=
"butRight"
plain
type=
"primary"
size=
"mini"
style=
"width: 120px;"
>
交卷
</el-button>
</el-col>
</el-row>
</div>
...
...
@@ -136,7 +136,9 @@
}
},
methods
:
{
test
(){
this
.
$router
.
push
({
path
:
'/paper/ID123467'
})
},
/* 基础查询*/
query
:
doQuery
,
/* 基础增*/
...
...
src/views/train/paperManagement/bac/edit.vue
0 → 100644
View file @
a40007f4
<
template
>
<RelDialog
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"计划年份"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"计划月份"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"培训项目"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"培训对象"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"培训人数"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"培训目标"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"培训方式"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"培训时间"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"培训课时"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"授课人"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"培训单位"
ref=
"roleid"
prop=
"roleid"
>
<el-input
:readonly=
"readonly"
v-model=
"form.roleid"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 按钮重写, -->
<!--
<div
slot=
"reFooter"
>
<span
slot=
"footer"
>
重写按钮写在这里,根据需要重写 slot(reFooter,foorer) 节点样式 重写方法需要在此页重新定义
</span>
</div>
-->
</RelDialog>
</
template
>
<
script
>
import
{
editMixin
}
from
'common'
export
default
{
mixins
:
[
editMixin
],
/* 存放index页面传递的额外参数*/
mounted
()
{
},
/* 组件名称*/
name
:
'roleManagementEdit'
,
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data
()
{
return
{
/* 额外初始化,根据需求*/
systemType
:
[],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form
:
{
roleid
:
''
,
rolename
:
''
,
bz
:
""
,
},
/* form提交时的规则,具体规则参考官网*/
rules
:
{
roleid
:
[{
required
:
true
,
trigger
:
'blur'
},
],
rolename
:
[{
required
:
true
,
trigger
:
'blur'
},
]
}
}
},
methods
:
{
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
src/views/train/paperManagement/bac/index.vue
0 → 100644
View file @
a40007f4
<
template
>
<div
class=
"min_full"
>
<Step
:app=
'app'
v-if=
"showDialog"
></Step>
<!-- 查询条件-->
<div
class=
"search"
v-condition
>
<SearchButton
:app=
'app'
></SearchButton>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
专业:
</span>
<el-date-picker></el-date-picker>
</div>
</el-col>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
岗位:
</span>
<el-input></el-input>
</div>
</el-col>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
类型:
</span>
<el-input></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row
class=
"tool-bar"
>
<PrintButton
:app=
'app'
></PrintButton>
<ViewButton
ref=
"view"
:app=
'app'
></ViewButton>
<AddButton
ref=
"add"
:app=
'app'
></AddButton>
<CopyButton
ref=
"copy"
:app=
'app'
></CopyButton>
<EditButton
ref=
"edit"
:app=
'app'
></EditButton>
<AttachFileButton
:app=
'app'
></AttachFileButton>
<FieldButton
:app=
'app'
></FieldButton>
<ExcelButton
:app=
'app'
></ExcelButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
<el-button
size=
'mini'
@
click
.
native=
"test()"
class=
"margin-right-10"
type=
"primary"
>
step
</el-button>
<!-- 权限-->
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<TablePager
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
<template
slot=
"tabCustom"
>
<el-table-column
label=
"启用/停用"
width=
"90"
header-align=
"center"
>
<template
slot-scope=
"scope"
>
<el-switch
@
click
.
native=
"setEnable(scope.row.id)"
:value=
'tybz(scope)'
style=
"width: 80px;justify-content: center;"
active-color=
"#13ce66"
inactive-color=
"#eee"
>
</el-switch>
</
template
>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</template>
<
script
>
/* 引入需要的接口*/
import
{
QueryKzzxRole
,
QueryApptype
,
AddKzzxRole
,
DeleteKzzxRole
,
UpdateKzzxRole
,
QtKzzxRole
}
from
"common/src/api/system/dmgSystem.js"
;
/* edit页面*/
import
Edit
from
'./edit'
import
Step
from
'./step'
import
{
tableMixin
}
from
'common'
export
default
{
mixins
:
[
tableMixin
],
name
:
'appVersion'
,
/* 初始额外赋值*/
async
mounted
()
{
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
data
()
{
return
{
DialogTitle
:
'自动组卷'
,
/*需要的额外参数 */
showDialog
:
false
,
DialogName
:
''
,
type
:
''
,
/* 基础url*/
baseUrl
:
'kzzx/role'
,
/* 查询参数*/
queryParams
:
{
ksrq
:
''
,
jsrq
:
''
},
/* 表格标题对应参数*/
tableTitle
:
[
{
prop
:
'whsj'
,
label
:
'可用'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'试卷名称'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'机型'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'专业'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'岗位'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'单选题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'多选题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'判断题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'填空题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'简答题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'论述题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'实操题'
,
...
this
.
$common
(
'ftDateTime'
)
}
]
}
},
methods
:
{
test
(){
this
.
showDialog
=
true
},
tybz
(
a
)
{
let
nTy
=
false
nTy
=
(
a
.
row
.
tybz
==
'N'
?
true
:
false
)
return
nTy
},
/* 基础查询*/
query
:
QueryKzzxRole
,
/* 基础增*/
apiAdd
:
AddKzzxRole
,
/* 基础更新*/
apiUpdate
:
UpdateKzzxRole
,
/* 删除操作*/
apiDelete
:
DeleteKzzxRole
,
/* 初始化赋值操作*/
init
()
{
},
/* 启用停用*/
setEnable
(
id
)
{
this
.
$confirm
(
'是否启用/停用该角色, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
params
=
{
id
:
id
}
QtKzzxRole
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$success
(
'操作成功'
)
this
.
app
.
$refs
[
'TablePager'
].
reLoad
()
}
else
{
this
.
$error
(
res
.
message
||
'操作失败'
)
}
})
})
}
},
components
:
{
Edit
,
Step
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/train/paperManagement/step.vue
→
src/views/train/paperManagement/
bac/
step.vue
View file @
a40007f4
File moved
src/views/train/paperManagement/dtl.vue
0 → 100644
View file @
a40007f4
<
template
>
<DefaultDialog
:app=
'app'
>
<div
class=
"min_full"
slot=
'form'
style=
"height: 80vh;border: 0px;"
>
<!-- 查询条件-->
<div
class=
"search"
v-condition
>
<SearchButton
:app=
'this'
></SearchButton>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"12"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
名称:
</span>
<el-input
v-model=
"queryParams.info"
></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row
class=
"tool-bar"
>
<ViewButton
ref=
"view"
:app=
'this'
></ViewButton>
<AddButton
ref=
"add"
:app=
'this'
></AddButton>
<CopyButton
ref=
"copy"
:app=
'this'
></CopyButton>
<EditButton
ref=
"edit"
:app=
'this'
></EditButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<TablePager
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'this'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
</TablePager>
</div>
</div>
</DefaultDialog>
</
template
>
<
script
>
/* 引入需要的接口*/
import
{
doDtlQuery
,
doDtlAdd
,
doDtlUpdate
,
doDtlDelete
}
from
'@/api/train/examination.js'
;
/* edit页面*/
import
Edit
from
'./dtlEdit.vue'
import
{
tableMixin_noapp
}
from
'common'
export
default
{
props
:[
'app'
],
mixins
:
[
tableMixin_noapp
],
name
:
'aqgl.pxglPxsjmx'
,
/* 初始额外赋值*/
async
mounted
()
{
this
.
queryParams
.
mid
=
this
.
app
.
singleItem
.
id
this
.
queryParams
.
xmid
=
this
.
app
.
singleItem
.
xmid
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
data
()
{
return
{
/*需要的额外参数 */
showDialog
:
false
,
DialogName
:
''
,
type
:
''
,
DialogTitle
:
''
,
/* 基础url*/
baseUrl
:
'/aqgl/pxgl/pxsjmx'
,
/* 查询参数*/
queryParams
:
{
info
:
''
},
/* 表格标题对应参数*/
tableTitle
:
[
// {label: "试卷ID", prop: "mid", fieldType: "ftString",width:192},
{
label
:
"试题"
,
prop
:
"stid"
,
fieldType
:
"ftString"
,
width
:
192
},
{
label
:
"序号"
,
prop
:
"xh"
,
fieldType
:
"int"
},
]
}
},
methods
:
{
/* 基础查询*/
query
:
doDtlQuery
,
/* 基础增*/
apiAdd
:
doDtlAdd
,
/* 基础更新*/
apiUpdate
:
doDtlUpdate
,
/* 删除操作*/
apiDelete
:
doDtlDelete
,
/* 初始化赋值操作*/
init
()
{
}
},
components
:
{
Edit
,
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/train/paperManagement/dtl/index.vue
View file @
a40007f4
...
...
@@ -17,11 +17,9 @@
<PrintButton
:app=
'app'
></PrintButton>
<ViewButton
ref=
"view"
:app=
'app'
></ViewButton>
<AddButton
ref=
"add"
:app=
'app'
></AddButton>
<CopyButton
ref=
"copy"
:app=
'app'
></CopyButton>
<EditButton
ref=
"edit"
:app=
'app'
></EditButton>
<AttachFileButton
:app=
'app'
></AttachFileButton>
<FieldButton
:app=
'app'
></FieldButton>
<ExcelButton
:app=
'app'
></ExcelButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
...
...
@@ -57,6 +55,7 @@
/* 初始额外赋值*/
async
mounted
()
{
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
data
()
{
...
...
@@ -64,13 +63,15 @@
/*需要的额外参数 */
showDialog
:
false
,
DialogName
:
''
,
DialogWidth
:
'80%'
,
type
:
''
,
DialogTitle
:
''
,
/* 基础url*/
baseUrl
:
'/aqgl/pxgl/pxsjmx'
,
/* 查询参数*/
queryParams
:
{
info
:
''
info
:
''
,
mid
:
''
},
/* 表格标题对应参数*/
tableTitle
:
[
...
...
@@ -106,4 +107,3 @@
<
style
scoped
>
</
style
>
src/views/train/paperManagement/dtlEdit.vue
0 → 100644
View file @
a40007f4
<
template
>
<RelDialog
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"类型"
>
<RelSelect
style=
"width: 100%;"
src=
'aqgl/pxgl/pxsj/init/stlx'
:match=
"
{value:'id',label:'name'}" v-model='type_copy' >
</RelSelect>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"试题"
ref=
"stid"
prop=
"stid"
>
<RelSelect
linkage
:linkParams=
"
{type:type_copy}" style="width: 100%;" src='aqgl/pxgl/pxst/query' :match="{value:'id',label:'cont'}" v-model='form.stid' >
</RelSelect>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"序号"
ref=
"xh"
prop=
"xh"
>
<el-input
:readonly=
"readonly"
v-model=
"form.xh"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</
template
>
<
script
>
import
{
editMixin
}
from
'common'
export
default
{
mixins
:
[
editMixin
],
/* 存放index页面传递的额外参数*/
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
form
.
mid
=
this
.
app
.
queryParams
.
mid
})
},
/* 组件名称*/
name
:
"aqgl.pxglPxsjmxEdit"
,
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data
()
{
return
{
type_copy
:
'S'
,
xmid
:
''
,
/* 额外初始化,根据需求*/
systemType
:
[],
bmList
:
[],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form
:
{
//ID
id
:
''
,
//试卷ID
mid
:
''
,
//试题ID
stid
:
''
,
//序号
xh
:
''
,
},
/* form提交时的规则,具体规则参考官网*/
rules
:
{
}
}
},
methods
:
{
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
src/views/train/paperManagement/edit.vue
View file @
a40007f4
This diff is collapsed.
Click to expand it.
src/views/train/paperManagement/index.vue
View file @
a40007f4
<
template
>
<div
class=
"min_full"
>
<Step
:app=
'app'
v-if=
"showDialog"
></Step
>
<Dtl
:app=
'this'
v-if=
'showDialog'
></Dtl
>
<!-- 查询条件-->
<div
class=
"search"
v-condition
>
<SearchButton
:app=
'app'
></SearchButton>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"
8
"
class=
"search-col"
>
<el-col
:span=
"
12
"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
专业:
</span>
<el-date-picker></el-date-picker>
</div>
</el-col>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
岗位:
</span>
<el-input></el-input>
</div>
</el-col>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
类型:
</span>
<el-input></el-input>
<span
class=
"search-span"
>
名称:
</span>
<el-input
v-model=
"queryParams.info"
></el-input>
</div>
</el-col>
</el-row>
...
...
@@ -32,52 +20,42 @@
<AddButton
ref=
"add"
:app=
'app'
></AddButton>
<CopyButton
ref=
"copy"
:app=
'app'
></CopyButton>
<EditButton
ref=
"edit"
:app=
'app'
></EditButton>
<AttachFileButton
:app=
'app'
></AttachFileButton>
<FieldButton
:app=
'app'
></FieldButton>
<ExcelButton
:app=
'app'
></ExcelButton>
<el-button
@
click=
"zdst"
size=
'mini'
style=
"margin-left: 0px;"
type=
"primary"
>
指定试题
</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
<el-button
size=
'mini'
@
click
.
native=
"test()"
class=
"margin-right-10"
type=
"primary"
>
step
</el-button>
<!-- 权限-->
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<TablePager
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
<template
slot=
"tabCustom"
>
<el-table-column
label=
"启用/停用"
width=
"90"
header-align=
"center"
>
<template
slot-scope=
"scope"
>
<el-switch
@
click
.
native=
"setEnable(scope.row.id)"
:value=
'tybz(scope)'
style=
"width: 80px;justify-content: center;"
active-color=
"#13ce66"
inactive-color=
"#eee"
>
</el-switch>
</
template
>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</
template
>
<
script
>
/* 引入需要的接口*/
import
{
QueryKzzxRole
,
QueryApptype
,
AddKzzxRole
,
DeleteKzzxRole
,
UpdateKzzxRole
,
QtKzzxRole
}
from
"common/src/api/system/dmgSystem.js"
;
doQuery
,
doAdd
,
doUpdate
,
doDelete
}
from
'@/api/train/examination.js'
;
/* edit页面*/
import
Edit
from
'./edit'
import
Step
from
'./step
'
import
Dtl
from
'./dtl
'
import
{
tableMixin
}
from
'common'
export
default
{
mixins
:
[
tableMixin
],
name
:
'
appVersion
'
,
name
:
'
pxglPxsj
'
,
/* 初始额外赋值*/
async
mounted
()
{
...
...
@@ -85,131 +63,81 @@
},
data
()
{
return
{
DialogTitle
:
'自动组卷'
,
/*需要的额外参数 */
showDialog
:
false
,
DialogWidth
:
'80%'
,
DialogName
:
''
,
type
:
''
,
DialogTitle
:
''
,
/* 基础url*/
baseUrl
:
'kzzx/role
'
,
baseUrl
:
'/aqgl/pxgl/pxsj
'
,
/* 查询参数*/
queryParams
:
{
ksrq
:
''
,
jsrq
:
''
info
:
''
},
/* 表格标题对应参数*/
tableTitle
:
[
{
prop
:
'whsj'
,
label
:
'可用'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'试卷名称'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'机型'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'专业'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'岗位'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'单选题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'多选题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'判断题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'填空题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'简答题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'论述题'
,
...
this
.
$common
(
'ftDateTime'
)
},
{
prop
:
'whsj'
,
label
:
'实操题'
,
...
this
.
$common
(
'ftDateTime'
)
}
{
label
:
"考试主题"
,
prop
:
"name"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"培训ID"
,
prop
:
"pxid"
,
fieldType
:
"ftString"
,
width
:
192
},
{
label
:
"题库"
,
prop
:
"xmid"
,
fieldType
:
"ftString"
,
width
:
192
,
transform
:{
url
:
'aqgl/pxgl/pxxm/query'
,
label
:
'name'
,
value
:
'id'
}},
{
label
:
"总分"
,
prop
:
"score"
,
fieldType
:
"float"
,
width
:
192
},
{
label
:
"单选题量"
,
prop
:
"scount"
,
fieldType
:
"int"
,
width
:
192
},
{
label
:
"单选题分值"
,
prop
:
"sscore"
,
fieldType
:
"float"
,
width
:
192
},
{
label
:
"多选题量"
,
prop
:
"mcount"
,
fieldType
:
"int"
,
width
:
192
},
{
label
:
"多选题分值"
,
prop
:
"mscore"
,
fieldType
:
"float"
,
width
:
192
},
{
label
:
"判断题量"
,
prop
:
"jcount"
,
fieldType
:
"int"
,
width
:
192
},
{
label
:
"判断题分值"
,
prop
:
"jscore"
,
fieldType
:
"float"
,
width
:
192
},
{
label
:
"填空题量"
,
prop
:
"fcount"
,
fieldType
:
"int"
,
width
:
192
},
{
label
:
"填空题分值"
,
prop
:
"fscore"
,
fieldType
:
"float"
,
width
:
192
},
{
label
:
"考试时长"
,
prop
:
"kssc"
,
fieldType
:
"float"
,
width
:
192
},
{
label
:
"选题模式"
,
prop
:
"xtms"
,
fieldType
:
"ftString"
,
width
:
160
,
transform
:{
url
:
'/aqgl/pxgl/pxsj/init/xtms'
,
label
:
'name'
,
value
:
'id'
}},
{
label
:
"备注"
,
prop
:
"bz"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"维护人"
,
prop
:
"whr"
,
fieldType
:
"ftString"
,
width
:
192
},
{
label
:
"维护时间"
,
prop
:
"whsj"
,
fieldType
:
"ftDateTime"
,
width
:
192
},
{
label
:
"创建人"
,
prop
:
"cjr"
,
fieldType
:
"ftString"
,
width
:
192
},
{
label
:
"创建时间"
,
prop
:
"cjsj"
,
fieldType
:
"ftDateTime"
},
{
label
:
"状态"
,
prop
:
"zt"
,
fieldType
:
"ftString"
,
width
:
100
,
transform
:{
url
:
'/aqgl/pxgl/pxsj/init/zt'
,
label
:
'name'
,
value
:
'id'
}},
{
label
:
"开始时间"
,
prop
:
"kssj"
,
fieldType
:
"ftDateTime"
},
{
label
:
"结束时间"
,
prop
:
"jssj"
,
fieldType
:
"ftDateTime"
},
]
}
},
methods
:
{
test
(){
zdst
(){
if
(
this
.
app
.
selectOne
||
this
.
app
.
clickOne
)
{
if
(
this
.
singleItem
.
xtms
==
'F'
){
this
.
DialogTitle
=
this
.
singleItem
.
name
this
.
showDialog
=
true
},
tybz
(
a
)
{
let
nTy
=
false
nTy
=
(
a
.
row
.
tybz
==
'N'
?
true
:
false
)
return
nTy
}
else
{
this
.
$warning
(
'只能选择固定卷进行修改'
);
}
}
else
{
this
.
$warning
(
'请选中一行操作'
);
}
},
/* 基础查询*/
query
:
QueryKzzxRole
,
query
:
doQuery
,
/* 基础增*/
apiAdd
:
AddKzzxRole
,
apiAdd
:
doAdd
,
/* 基础更新*/
apiUpdate
:
UpdateKzzxRol
e
,
apiUpdate
:
doUpdat
e
,
/* 删除操作*/
apiDelete
:
DeleteKzzxRol
e
,
apiDelete
:
doDelet
e
,
/* 初始化赋值操作*/
init
()
{
},
/* 启用停用*/
setEnable
(
id
)
{
this
.
$confirm
(
'是否启用/停用该角色, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
params
=
{
id
:
id
}
QtKzzxRole
(
params
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$success
(
'操作成功'
)
this
.
app
.
$refs
[
'TablePager'
].
reLoad
()
}
else
{
this
.
$error
(
res
.
message
||
'操作失败'
)
}
})
})
}
},
components
:
{
Edit
,
Step
Edit
,
Dtl
}
...
...
src/views/train/testPaper/index.vue
View file @
a40007f4
<
template
>
<div
class=
"testpaper"
>
<div
ref=
"title"
class=
"title"
>
{{
title
}}
<!-- 批阅水印 -->
<div
class=
"readover"
>
<div
class=
"yyj"
>
已阅卷
</div>
<div
class=
"df"
>
100分
</div>
</div>
<div
ref=
"title"
class=
"title"
>
{{
title
+
id
}}
<span
style=
"position: absolute;right: 36px;;font-size: 13px;font-weight: 300;"
>
{{
`剩余时间:${parseInt(remaining/(60*1000))
}
分钟${parseInt((remaining%(60*1000))/1000)
}
秒`
}}
<
/span
>
<
/div
>
<
div
class
=
"info"
>
...
...
@@ -18,7 +27,7 @@
<
/div
>
<
/div
>
<
Subject
:
app
=
'that'
v
-
for
=
'(item,index) in subjectList'
:
key
=
"index"
:
index
=
'index+1'
:
subject
=
'item.subject'
:
score
=
'item.score'
:
type
=
'item.type'
:
options
=
'item.options'
><
/Subject
>
<
div
style
=
"height:
5
0px;"
>
<
div
style
=
"height:
200px;padding-top: 12
0px;"
>
<
el
-
button
@
click
=
"submit"
size
=
"mini"
type
=
"primary"
style
=
"float: right;width: 100px;"
>
提交
<
/el-button
>
<
/div
>
...
...
@@ -37,6 +46,7 @@
import
Subject
from
'./subject'
export
default
{
created
(){
this
.
id
=
this
.
$route
.
params
.
id
let
type
=
{
'S'
:
'DXT'
,
'F'
:
'TKT'
,
...
...
@@ -87,6 +97,8 @@
}
,
1000
)
}
,
submit
(){
/* 路由调回去*/
this
.
subjectList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
value
&&
item
.
value
.
length
>
0
){
...
...
@@ -101,19 +113,8 @@
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
// this.$message(
{
// type: 'success',
// message: '试卷提交成功!'
//
}
);
/* 计算*/
let
sjdf
=
0
console
.
log
(
this
.
subjectList
)
this
.
subjectList
.
forEach
(
item
=>
{
/* 单选题*/
sjdf
++
}
)
this
.
$warning
(
`您获得了${sjdf
}
分!`
)
this
.
$success
(
'提交成功,您可以在考试记录中查看分数'
)
this
.
$router
.
replace
({
path
:
'/train/onlinExamination'
}
)
}
).
catch
(()
=>
{
}
);
...
...
@@ -121,10 +122,11 @@
}
,
data
(){
return
{
id
:
''
,
startTime
:
new
Date
().
getTime
(),
endTime
:
new
Date
().
getTime
()
+
1000
*
120
*
60
,
remaining
:
''
,
title
:
'专八仪表考试测试
1128(在线考试)
'
,
title
:
'专八仪表考试测试
ID:
'
,
that
:
this
,
subjectList
:[]
}
...
...
@@ -133,6 +135,34 @@
<
/script
>
<
style
lang
=
"scss"
>
.
readover
{
opacity
:
.
5
;
transform
:
rotate
(
30
deg
);
border
:
3.2
px
solid
;
color
:
chartreuse
;
height
:
170
px
;
width
:
170
px
;
position
:
absolute
;
right
:
50
px
;
border
-
radius
:
50
%
;
.
yyj
{
height
:
85
px
;
font
-
weight
:
800
;
font
-
size
:
26
px
;
line
-
height
:
85
px
;
width
:
100
%
;
text
-
align
:
center
;
}
.
df
{
height
:
85
px
;
font
-
weight
:
800
;
font
-
size
:
20
px
;
// line-height: 85px;
width
:
100
%
;
text
-
align
:
center
;
}
}
$f
:
flex
;
$mini
:
800
px
;
%
normarflex
{
...
...
@@ -153,6 +183,7 @@
font
-
size
:
$fontsize
}
.
testpaper
{
padding
-
top
:
30
px
;
.
info
{
@
extend
%
normarflex
;
@
include
normaltext
(
80
px
,
center
,
700
,
13
px
);
...
...
src/views/train/testPaper/subject.vue
View file @
a40007f4
...
...
@@ -35,12 +35,17 @@
<
/div
>
<
/div
>
<!--
答案显示
-->
<!--
<
br
>
<
span
>
结果
:
错误
<
/span
>
<
div
class
=
"ans"
>
<
br
>
<
span
>
本题答案是
:
A
,
B
,
C
<
/span
>
<
span
>
结果
:
<
span
class
=
"error"
>
错误
<
/span>
</
span
>
<
br
>
<
span
>
答案解析
:
钝角
<
/span> --
>
<
span
>
本题答案是
:
<
span
class
=
"dajx"
>
A
,
B
,
C
<
/span></
span
>
<
br
>
<
span
>
您的答案是
:
<
span
class
=
"dajx"
>
A
<
/span></
span
>
<
br
>
<
span
>
答案解析
:
<
span
class
=
"dajx"
>
对于线性表(
7
,
34
,
55
,
25
,
64
,
46
,
20
,
10
)进行散列存储时,若选用
H
(
K
)
=
K
%
9
作为散列函数,则散列地址为
1
的元素有
()
个。
<
/span></
span
>
<
/div
>
<
/div
>
<
/template
>
...
...
@@ -144,6 +149,21 @@
<
/script
>
<
style
lang
=
"scss"
scope
>
.
ans
{
color
:
#
666
;
font
-
size
:
13
px
;
float
:
right
;
width
:
35
%
;
.
error
{
color
:
red
;
}
.
right
{
color
:
#
66
FF00
;
}
.
dajx
{
color
:
#
000
;
}
}
.
el
-
radio__label
{
font
-
size
:
13
px
;
color
:
rgb
(
119
,
119
,
119
);
...
...
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