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
2a9bf097
Commit
2a9bf097
authored
Dec 12, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增试题管理
parent
5f4456dd
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
217 additions
and
298 deletions
+217
-298
index.js
src/router/index.js
+13
-13
edit.vue
src/views/train/questionManage/edit.vue
+152
-147
index.vue
src/views/train/testPaper/index.vue
+40
-134
subject.vue
src/views/train/testPaper/subject.vue
+12
-4
No files found.
src/router/index.js
View file @
2a9bf097
...
...
@@ -860,19 +860,19 @@ export const powerRoutes=[
name
:
'questionManage'
,
path
:
"questionManage"
},
//
{
//
component:'train/testPaper/index',
//
hidden:false,
//
meta:{
//
"title": "考试试卷",
//
"icon": "",
//
"noCache": false,
//
"link": null,
//
"mkid":'test',
//
},
//
name:'testPaper',
//
path:"testPaper"
//
},
{
component
:
'train/testPaper/index'
,
hidden
:
false
,
meta
:{
"title"
:
"考试试卷"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
'test'
,
},
name
:
'testPaper'
,
path
:
"testPaper"
},
/*,
...
...
src/views/train/questionManage/edit.vue
View file @
2a9bf097
This diff is collapsed.
Click to expand it.
src/views/train/testPaper/index.vue
View file @
2a9bf097
...
...
@@ -25,8 +25,47 @@
<
/div
>
<
/template
>
<
script
>
import
{
/* 测试*/
doQuery
,
doAdd
,
doUpdate
,
doDelete
,
pxxmQuery
,
excelimport
}
from
'@/api/train/questionManage'
;
import
Subject
from
'./subject'
export
default
{
created
(){
let
type
=
{
'S'
:
'DXT'
,
'F'
:
'TKT'
,
'J'
:
'PDT'
,
'M'
:
'DXTS'
}
doQuery
().
then
(
res
=>
{
let
oList
=
res
.
data
.
records
||
[]
/* 构建subjectList*/
this
.
subjectList
=
oList
.
map
(
item
=>
{
let
newobj
=
Object
.
create
({
}
)
newobj
.
id
=
item
.
id
newobj
.
score
=
item
.
score
||
'暂无分值'
newobj
.
type
=
type
[
item
.
type
]
newobj
.
subject
=
item
.
cont
||
'未设置问题'
newobj
.
options
=
Object
.
create
({
}
)
item
[
'opta'
]
&&
(
newobj
.
options
.
A
=
item
.
opta
)
item
[
'optb'
]
&&
(
newobj
.
options
.
B
=
item
.
optb
)
item
[
'optc'
]
&&
(
newobj
.
options
.
C
=
item
.
optc
)
item
[
'optd'
]
&&
(
newobj
.
options
.
D
=
item
.
optd
)
item
[
'opte'
]
&&
(
newobj
.
options
.
E
=
item
.
opte
)
item
[
'optf'
]
&&
(
newobj
.
options
.
F
=
item
.
optf
)
return
newobj
}
)
}
)
}
,
mounted
()
{
this
.
getRemain
()
...
...
@@ -81,140 +120,7 @@
remaining
:
''
,
title
:
'专八仪表考试测试1128(在线考试)'
,
that
:
this
,
subjectList
:[
{
id
:
'AE89'
,
subject
:
'下列营养物质中在人体不能产生能量的为'
,
score
:
'2'
,
type
:
'DXTS'
,
options
:{
A
:
'蔗糖'
,
B
:
'果糖'
,
C
:
'木质素'
,
D
:
'酪蛋白'
}
}
,
{
id
:
'AE891'
,
subject
:
'从业人员在职业活动中,以公平、对等的态度对待领导、同事和顾客等人的行为是()'
,
score
:
'5'
,
type
:
'TKT'
,
options
:{
}
}
,
{
id
:
'AE8914'
,
subject
:
'对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
,
score
:
'2'
,
type
:
'DXT'
,
options
:{
A
:
'1个'
,
B
:
'2个'
,
C
:
'3个'
,
D
:
'4个'
,
E
:
'5个'
}
}
,
{
id
:
'AE89'
,
subject
:
'下列营养物质中在人体不能产生能量的为'
,
score
:
'2'
,
type
:
'DXT'
,
options
:{
A
:
'蔗糖'
,
B
:
'果糖'
,
C
:
'木质素'
,
D
:
'酪蛋白'
}
}
,
{
id
:
'AE891'
,
subject
:
'从业人员在职业活动中,以公平、对等的态度对待领导、同事和顾客等人的行为是()'
,
score
:
'5'
,
type
:
'TKT'
,
options
:{
}
}
,
{
id
:
'AE8914'
,
subject
:
'对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
,
score
:
'2'
,
type
:
'DXTS'
,
options
:{
A
:
'1个'
,
B
:
'2个'
,
C
:
'3个'
,
D
:
'4个'
,
E
:
'5个'
}
}
,
{
id
:
'AE89'
,
subject
:
'下列营养物质中在人体不能产生能量的为'
,
score
:
'2'
,
type
:
'DXT'
,
options
:{
A
:
'蔗糖'
,
B
:
'果糖'
,
C
:
'木质素'
,
D
:
'酪蛋白'
}
}
,
{
id
:
'AE891'
,
subject
:
'众所周知,()是世界上最帅的人。'
,
score
:
'5'
,
type
:
'TKT'
,
options
:{
}
}
,
{
id
:
'AE8914'
,
subject
:
'对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
,
score
:
'2'
,
type
:
'DXTS'
,
options
:{
A
:
'1个'
,
B
:
'2个'
,
C
:
'3个'
,
D
:
'4个'
,
E
:
'5个'
}
}
,
{
id
:
'AE89'
,
subject
:
'下列营养物质中在人体不能产生能量的为'
,
score
:
'2'
,
type
:
'DXT'
,
options
:{
A
:
'蔗糖'
,
B
:
'果糖'
,
C
:
'木质素'
,
D
:
'酪蛋白'
}
}
,
{
id
:
'AE891'
,
subject
:
'从业人员在职业活动中,以公平、对等的态度对待领导、同事和顾客等人的行为是()'
,
score
:
'5'
,
type
:
'TKT'
,
options
:{
}
}
,
{
id
:
'AE8914'
,
subject
:
'对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
,
score
:
'2'
,
type
:
'DXT'
,
options
:{
A
:
'1个'
,
B
:
'2个'
,
C
:
'3个'
,
D
:
'4个'
,
E
:
'5个'
}
}
]
subjectList
:[]
}
}
}
...
...
src/views/train/testPaper/subject.vue
View file @
2a9bf097
<
template
>
<div
class=
"examMain"
:title=
"subject"
>
<div
class=
"examMain"
>
<!-- 试题题目-->
<template
v-if=
"type!='TKT'"
>
<span>
{{
`${index
}
.`
}}
<
/span
>
...
...
@@ -28,7 +28,12 @@
<
/el-checkbox-group
>
<
/div
>
<
/div
>
<!--
判断题
-->
<
div
v
-
if
=
"type=='PDT'"
class
=
"options"
>
<
div
class
=
"item"
:
key
=
"index"
v
-
for
=
"(item,index) in options"
>
<
el
-
radio
v
-
model
=
"value"
:
label
=
"index"
>
{{
`${index
}
.${item
}
`
}}
<
/el-radio
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
...
...
@@ -90,8 +95,10 @@
}
,
methods
:{
transTKT
(
val
,
fn
){
let
nval
let
template
=
`<input type='text' name='tktinput' class='tktinput'>`
let
nval
=
val
.
replace
(
'()'
,
template
)
/* 判断有无()*/
val
.
indexOf
(
'()'
)
==-
1
?(
nval
=
val
+
template
):(
nval
=
val
.
replace
(
'()'
,
template
))
return
nval
}
}
,
...
...
@@ -100,7 +107,8 @@
let
typeArry
=
{
'DXT'
:
'(单选题)'
,
'DXTS'
:
'(多选题)'
,
'TKT'
:
'(填空题)'
'TKT'
:
'(填空题)'
,
'PDT'
:
'(判断题)'
}
let
nval
=
typeArry
[
val
]
return
nval
||
'其他'
...
...
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