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
ca1218f3
Commit
ca1218f3
authored
Aug 18, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
11103e1f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
paperEdit.vue
src/pages/exam/paperEdit.vue
+23
-14
No files found.
src/pages/exam/paperEdit.vue
View file @
ca1218f3
...
...
@@ -451,7 +451,7 @@
watch
:
{
'ChooseItem.Title'
:
{
handler
(
newValue
)
{
this
.
ChooseItem
.
ShowTitle
=
newValue
;
this
.
ChooseItem
.
ShowTitle
=
this
.
getRegItem
(
newValue
)
;
},
deep
:
true
},
...
...
@@ -800,9 +800,16 @@
this
.
ChooseItem
.
AnswerParse
=
questionItem
.
AnswerParse
;
this
.
$forceUpdate
();
},
//正则匹配替换
getRegItem
(
val
){
let
Item
=
val
.
replace
(
/<iframe
(([\s\S])
*
?)
<
\/
iframe>/ig
,
'[音频]'
).
replace
(
/<img.*
?(?:
>|
\/
>
)
/gi
,
'[图片]'
);
return
Item
},
//保存题目
SavePaper
()
{
if
(
this
.
validateType
())
{
console
.
log
(
'进入'
);
return
;
savePaperInfo
(
this
.
DataObj
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
...
...
@@ -848,10 +855,10 @@
}
}
}
//单选题
if
(
this
.
DataObj
.
GroupList
[
k
].
QuestionTypeKey
==
'single'
)
{
var
Num
=
0
;
//单选题 多选题
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
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
...
...
@@ -875,18 +882,20 @@
Num
++
}
}
}
if
(
Num
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请设置单选
题答案选项`
message
:
`请设置
${
this
.
DataObj
.
GroupList
[
k
].
GroupName
}
第
${
i
+
1
}
题答案选项`
})
result
=
false
;
return
;
}
}
}
//填空题
}
return
result
;
},
//js 判断重复
...
...
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