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
e5d9a183
Commit
e5d9a183
authored
Aug 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d6781064
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
62 deletions
+67
-62
paperEdit.vue
src/pages/exam/paperEdit.vue
+67
-62
No files found.
src/pages/exam/paperEdit.vue
View file @
e5d9a183
...
...
@@ -581,30 +581,58 @@
},
//删除题目
delExam
(
gitem
,
item
,
index
)
{
if
(
item
.
Id
==
0
)
{
gitem
.
splice
(
index
,
1
);
}
else
{
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
var
that
=
this
;
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
if
(
item
.
Id
==
0
)
{
gitem
.
splice
(
index
,
1
);
that
.
calcPaper
();
}
else
{
let
msg
=
{
Id
:
item
.
Id
,
}
DeletePaperDetails
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
GetPaperInfo
();
gitem
.
splice
(
index
,
1
);
that
.
calcPaper
();
}
})
}).
onCancel
(()
=>
{
});
}
this
.
calcPaper
();
}
})
},
//删除分组及问题
removeFather
(
item
,
index
)
{
var
that
=
this
;
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否删除此分组?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
if
(
item
.
GId
==
0
)
{
that
.
DataObj
.
GroupList
.
splice
(
index
,
1
);
that
.
calcPaper
();
}
else
{
let
msg
=
{
GId
:
item
.
GId
,
QuestionTypeId
:
item
.
QuestionTypeId
}
DeletePaperGroup
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
that
.
DataObj
.
GroupList
.
splice
(
index
,
1
);
that
.
calcPaper
();
}
})
}
})
},
//点击修改标题名字和分数
getNameEdit
(
item
,
index
)
{
...
...
@@ -775,17 +803,17 @@
this
.
examNum
=
0
;
if
(
this
.
DataObj
&&
this
.
DataObj
.
GroupList
)
{
this
.
DataObj
.
GroupList
.
forEach
(
x
=>
{
var
tempGScore
=
0
;
var
tempGScore
=
0
;
if
(
x
.
DetailsList
&&
x
.
DetailsList
.
length
>
0
)
{
this
.
examNum
+=
x
.
DetailsList
.
length
;
x
.
DetailsList
.
forEach
(
y
=>
{
if
(
y
.
Score
)
{
tempGScore
+=
Number
(
y
.
Score
)
tempGScore
+=
Number
(
y
.
Score
)
this
.
examScore
+=
Number
(
y
.
Score
);
}
})
}
x
.
GScore
=
tempGScore
;
x
.
GScore
=
tempGScore
;
})
}
},
...
...
@@ -822,10 +850,11 @@
message
:
'操作成功!'
,
position
:
'top'
})
this
.
$router
.
push
({
path
:
'/exam/examPaper'
,
query
:
{}
});
// this.$router.push({
// path: '/exam/examPaper',
// query: {}
// });
this
.
GetPaperInfo
();
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
...
...
@@ -868,8 +897,9 @@
}
}
//单选题 多选题
if
(
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'single'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'multiple'
)
{
if
(
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'single'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'multiple'
)
{
for
(
let
i
=
0
;
i
<
this
.
DataObj
.
GroupList
[
k
].
DetailsList
.
length
;
i
++
)
{
var
Num
=
0
;
if
(
this
.
DataObj
.
GroupList
[
k
].
DetailsList
[
i
].
Title
==
''
)
{
...
...
@@ -932,10 +962,11 @@
}
}
//判断题
if
(
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'judge'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'reading-comprehensio'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'spoken'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'other'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'noun-explanation'
)
{
if
(
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'judge'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'reading-comprehensio'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'spoken'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'other'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'noun-explanation'
)
{
for
(
let
i
=
0
;
i
<
this
.
DataObj
.
GroupList
[
k
].
DetailsList
.
length
;
i
++
)
{
if
(
this
.
DataObj
.
GroupList
[
k
].
DetailsList
[
i
].
Title
==
''
)
{
this
.
$q
.
notify
({
...
...
@@ -949,10 +980,12 @@
}
}
//简答题 论述题
if
(
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'short-answer'
||
this
.
DataObj
.
GroupList
[
k
]
.
QuestionTypeKey
==
'essay-question'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'calculation'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'entry-problem'
)
{
if
(
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'short-answer'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'essay-question'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'calculation'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'entry-problem'
||
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'data-question'
)
{
for
(
let
i
=
0
;
i
<
this
.
DataObj
.
GroupList
[
k
].
DetailsList
.
length
;
i
++
)
{
if
(
this
.
DataObj
.
GroupList
[
k
].
DetailsList
[
i
].
Title
==
''
)
{
this
.
$q
.
notify
({
...
...
@@ -974,7 +1007,6 @@
}
}
}
}
return
result
;
},
...
...
@@ -1016,34 +1048,7 @@
this
.
AddQuestion
(
tempArray
);
this
.
isShowQuestion
=
false
;
},
//删除分组及问题
removeFather
(
item
,
index
)
{
if
(
item
.
GId
==
0
)
{
this
.
DataObj
.
GroupList
.
splice
(
index
,
1
);
}
else
{
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
let
msg
=
{
GId
:
item
.
GId
,
QuestionTypeId
:
item
.
QuestionTypeId
}
DeletePaperGroup
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
GetPaperInfo
();
}
})
}).
onCancel
(()
=>
{
});
}
this
.
calcPaper
();
}
}
}
...
...
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