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
2d2f1725
Commit
2d2f1725
authored
Jan 19, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
67893533
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
7 deletions
+98
-7
question-form.vue
src/components/question/question-form.vue
+98
-7
No files found.
src/components/question/question-form.vue
View file @
2d2f1725
...
...
@@ -139,8 +139,8 @@
</div>
<br
/>
<!--单选题-->
<single
v-if=
"questionObj.Key=='single'||questionObj.Key=='single-number'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"objOption"
></single>
<single
v-if=
"questionObj.Key=='single'||questionObj.Key=='single-number'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"objOption"
></single>
<!--多选题-->
<multiple
v-if=
"questionObj.Key=='multiple'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"objOption"
></multiple>
...
...
@@ -405,7 +405,7 @@
this
.
questionObj
.
QId
=
res
.
Data
.
QuestionTypeId
;
if
(
res
.
Data
.
QuestionContentObj
)
{
this
.
AnswerList
=
res
.
Data
.
QuestionContentObj
;
this
.
objOption
.
QuestionContent
=
JSON
.
stringify
(
res
.
Data
.
QuestionContent
);
this
.
objOption
.
QuestionContent
=
JSON
.
stringify
(
res
.
Data
.
QuestionContent
Obj
);
}
else
{
this
.
onItemClick
(
this
.
questionObj
);
}
...
...
@@ -649,10 +649,101 @@
result
=
false
;
return
;
}
if
(
this
.
objOption
.
QuestionContent
){
var
myArr
=
JSON
.
parse
(
this
.
objOption
.
QuestionContent
);
// console.log(myArr,'myArr');
// return;
if
(
this
.
objOption
.
QuestionContent
)
{
var
myArr
=
JSON
.
parse
(
this
.
objOption
.
QuestionContent
);
console
.
log
(
myArr
,
'myArr'
);
for
(
var
i
=
0
;
i
<
myArr
[
0
].
length
;
i
++
)
{
if
(
myArr
[
0
].
Content
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入试题选项`
})
result
=
false
;
return
;
}
if
(
this
.
isRepeat
(
myArr
[
0
],
3
))
{
result
=
this
.
isRepeat
(
myArr
[
0
],
3
);
}
else
{
return
;
}
}
}
}
//资料提 分录题 多选题
if
(
this
.
objOption
.
QuestionTypeKey
==
'data-question'
||
this
.
objOption
.
QuestionTypeKey
==
'entry-problem'
||
this
.
objOption
.
QuestionTypeKey
==
'multiple'
||
this
.
objOption
.
QuestionTypeKey
==
'single'
)
{
if
(
this
.
objOption
.
Title
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入题干!`
})
result
=
false
;
return
;
}
if
(
this
.
objOption
.
QuestionContent
)
{
var
myArr
=
JSON
.
parse
(
this
.
objOption
.
QuestionContent
);
console
.
log
(
myArr
,
'myArrrrrr'
);
for
(
var
i
=
0
;
i
<
myArr
.
length
;
i
++
)
{
console
.
log
(
myArr
[
i
].
Content
);
if
(
myArr
[
i
].
Content
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入第
${
i
+
1
}
的选项!`
})
result
=
false
;
return
;
}
if
(
this
.
isRepeat
(
myArr
,
3
))
{
result
=
this
.
isRepeat
(
myArr
,
3
);
}
else
{
return
;
}
}
}
}
//计算题
if
(
this
.
objOption
.
QuestionTypeKey
==
'calculation'
||
this
.
objOption
.
QuestionTypeKey
==
'essay-question'
||
this
.
objOption
.
QuestionTypeKey
==
'noun-explanation'
)
{
if
(
this
.
objOption
.
Title
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入题干!`
})
result
=
false
;
return
;
}
if
(
this
.
objOption
.
Answer
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入回答!`
})
result
=
false
;
return
;
}
}
//判断题
if
(
this
.
objOption
.
QuestionTypeKey
==
'judge'
){
if
(
this
.
objOption
.
Title
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入题干!`
})
result
=
false
;
return
;
}
if
(
this
.
objOption
.
AnswerParse
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入答案解析!`
})
result
=
false
;
return
;
}
}
return
result
;
...
...
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