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
b1f0d019
Commit
b1f0d019
authored
Jan 20, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组件修改
parent
d060f439
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
59 deletions
+49
-59
job-form.vue
src/components/course/job-form.vue
+0
-1
UeEditor.vue
src/components/editor/UeEditor.vue
+0
-1
question-form.vue
src/components/question/question-form.vue
+7
-24
entry-problem.vue
src/components/questiontype/entry-problem.vue
+26
-26
judge.vue
src/components/questiontype/judge.vue
+15
-4
single.vue
src/components/questiontype/single.vue
+1
-3
No files found.
src/components/course/job-form.vue
View file @
b1f0d019
...
...
@@ -102,7 +102,6 @@
}
},
created
()
{
console
.
log
(
"this.saveObj"
,
this
.
saveObj
);
this
.
GetTeacherList
();
this
.
getSaleplat
();
},
...
...
src/components/editor/UeEditor.vue
View file @
b1f0d019
...
...
@@ -97,7 +97,6 @@
html
+=
'<img src="'
+
e
[
i
].
fileUrl
+
'" style="max-width: 100%;">'
;
}
}
console
.
log
(
e
,
'文件'
);
if
(
this
.
uploadType
==
2
)
{
for
(
let
i
in
e
)
{
var
type
=
e
[
i
].
fileName
.
split
(
'.'
)[
1
];
...
...
src/components/question/question-form.vue
View file @
b1f0d019
...
...
@@ -156,7 +156,7 @@
"
:setOption=
"objOption"
>
</short-answer>
<!--分录题、资料题-->
<entry-problem
v-if=
"questionObj.Key=='entry-problem'|| questionObj.Key=='data-question'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
>
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
>
</entry-problem>
<!--连线题-->
<matching
v-if=
"questionObj.Key=='matching'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
></matching>
...
...
@@ -437,7 +437,6 @@
//保存问题
setQuestion
()
{
//验证方法
console
.
log
(
this
.
objOption
,
'objOption'
);
if
(
this
.
validateType
())
{
var
pointIds
=
""
;
if
(
this
.
choosePointArray
&&
this
.
choosePointArray
.
length
>
0
)
{
...
...
@@ -474,7 +473,6 @@
if
(
this
.
objOption
.
QuestionTypeKey
==
'matching'
)
{
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
][
i
].
Content
==
''
)
{
this
.
$q
.
notify
({
...
...
@@ -513,7 +511,6 @@
if
(
this
.
objOption
.
QuestionTypeKey
==
'sharing-choose'
)
{
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
][
i
].
Content
==
''
)
{
this
.
$q
.
notify
({
...
...
@@ -564,7 +561,6 @@
if
(
this
.
objOption
.
QuestionTypeKey
==
'listening'
||
this
.
objOption
.
QuestionTypeKey
==
'reading-comprehensio'
)
{
if
(
this
.
objOption
.
QuestionContent
)
{
var
myArr
=
JSON
.
parse
(
this
.
objOption
.
QuestionContent
);
console
.
log
(
myArr
,
'myArr'
);
for
(
var
i
=
0
;
i
<
myArr
.
length
;
i
++
)
{
if
(
myArr
[
i
].
SubTitle
==
''
)
{
this
.
$q
.
notify
({
...
...
@@ -651,7 +647,6 @@
}
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
({
...
...
@@ -671,8 +666,9 @@
}
}
//资料提 分录题 多选题
if
(
this
.
objOption
.
QuestionTypeKey
==
'data-question'
||
this
.
objOption
.
QuestionTypeKey
==
'entry-problem'
||
this
.
objOption
.
QuestionTypeKey
==
'multiple'
||
this
.
objOption
.
QuestionTypeKey
==
'single'
)
{
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'
,
...
...
@@ -684,9 +680,7 @@
}
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'
,
...
...
@@ -705,7 +699,8 @@
}
}
//计算题
if
(
this
.
objOption
.
QuestionTypeKey
==
'calculation'
||
this
.
objOption
.
QuestionTypeKey
==
'essay-question'
||
this
.
objOption
.
QuestionTypeKey
==
'noun-explanation'
)
{
if
(
this
.
objOption
.
QuestionTypeKey
==
'calculation'
||
this
.
objOption
.
QuestionTypeKey
==
'essay-question'
||
this
.
objOption
.
QuestionTypeKey
==
'noun-explanation'
)
{
if
(
this
.
objOption
.
Title
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
...
...
@@ -726,7 +721,7 @@
}
}
//判断题
if
(
this
.
objOption
.
QuestionTypeKey
==
'judge'
)
{
if
(
this
.
objOption
.
QuestionTypeKey
==
'judge'
)
{
if
(
this
.
objOption
.
Title
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
...
...
@@ -736,15 +731,6 @@
result
=
false
;
return
;
}
if
(
this
.
objOption
.
AnswerParse
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请输入答案解析!`
})
result
=
false
;
return
;
}
}
return
result
;
},
...
...
@@ -768,7 +754,6 @@
break
;
default
:
}
console
.
log
(
Arr
,
'arrrr'
);
let
num
=
0
;
for
(
var
i
=
0
;
i
<
Arr
.
length
-
1
;
i
++
)
{
for
(
var
j
=
i
+
1
;
j
<
Arr
.
length
;
j
++
)
{
...
...
@@ -782,13 +767,11 @@
}
}
}
console
.
log
(
num
,
'numberrer'
);
if
(
num
>
0
)
{
result
=
false
;
}
else
{
result
=
true
;
}
console
.
log
(
result
,
'返回'
);
return
result
;
}
},
...
...
src/components/questiontype/entry-problem.vue
View file @
b1f0d019
<!--分录题-->
<
style
>
.entryProblemQuestion
{
width
:
100%
;
.entryProblemQuestion
{
width
:
100%
;
}
.entrytk_info
{
.entrytk_info
{
color
:
#A8A8B3
;
font-size
:
12px
;
line-height
:
24px
;
cursor
:
default
;
}
</
style
>
<
template
>
<div
class=
"entryProblemQuestion"
>
...
...
@@ -23,29 +25,24 @@
</td>
<td
style=
"width:40px;text-align:center;"
>
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(index)"
></i>
<!--
<a
style=
"cursor:pointer;"
@
click=
"deleteOpion(index)"
>
删除
</a>
-->
</td>
</tr>
<tfoot>
<tr>
<td
colspan=
"3"
>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加选项
</a>
<!--
<a
style=
"cursor:pointer;"
@
click=
"addOption()"
>
添加选项
</a>
-->
</td>
</tr>
<tr>
<td
colspan=
"3"
>
<div
class=
"entrytk_info"
>
1. 一个空有多种答案时请用";"隔开。如:水;H2O
<br
/>
2. 若试题答案是数字,可设置范围,两个数字之间用"-"。如:1-9,学生填写1到9之间的数字都算正确(包括1和9)
</div>
</td>
</tr>
</tfoot>
</table>
<br
/>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加更多
</a>
<br
/>
<br
/>
<el-checkbox
v-model=
"setOption.IsMutex"
:true-label=
"1"
:false-label=
"0"
><span
style=
"font-size:12px;"
>
答案顺序打乱也判正确
</span></el-checkbox>
<br
/>
<br
/>
<div
class=
"entrytk_info"
>
1. 一个空有多种答案时请用";"隔开。如:水;H2O
<br
/>
2. 若试题答案是数字,可设置范围,两个数字之间用"-"。如:1-9,学生填写1到9之间的数字都算正确(包括1和9)
</div>
</div>
</
template
>
<
script
>
...
...
@@ -55,6 +52,9 @@
questionData
:
{
type
:
Array
,
},
setOption
:
{
type
:
Object
,
}
},
components
:
{
UeEditor
...
...
@@ -66,7 +66,7 @@
initialFrameWidth
:
null
,
initialFrameHeight
:
80
,
},
commonIndex
:
-
1
,
commonIndex
:
-
1
,
};
},
created
()
{},
...
...
@@ -88,7 +88,7 @@
}
}).
onOk
(()
=>
{
this
.
data
.
splice
(
index
,
1
);
this
.
commonIndex
=
-
1
;
this
.
commonIndex
=
-
1
;
});
},
//新增选项
...
...
@@ -101,7 +101,7 @@
returnDataToParent
()
{
this
.
$emit
(
'getChild'
,
this
.
data
);
},
changeEdit
(
index
){
changeEdit
(
index
)
{
this
.
commonIndex
=
index
;
}
},
...
...
src/components/questiontype/judge.vue
View file @
b1f0d019
<!--判断题-->
<
style
>
.judgeQuestion
{
width
:
100%
;
.judgeQuestion
{
width
:
100%
;
}
</
style
>
<
template
>
<div
class=
"judgeQuestion"
>
...
...
@@ -16,7 +17,6 @@
<td
style=
"vertical-align:middle;"
>
<span
v-if=
"index==0"
>
对
</span>
<span
v-if=
"index==1"
>
错
</span>
<!--
<UeEditor
v-model=
"item.Content"
:config=
"config"
></UeEditor>
-->
</td>
</tr>
</table>
...
...
@@ -49,6 +49,7 @@
methods
:
{
//返回数据到父组件
returnDataToParent
()
{
this
.
getAnswer
();
this
.
$emit
(
'getChild'
,
this
.
data
);
},
ChangeItem
(
item
)
{
...
...
@@ -58,7 +59,17 @@
})
}
item
.
IsAnswer
=
true
;
this
.
setOption
.
Answer
=
item
.
Name
;
},
//获取正确答案
getAnswer
()
{
this
.
setOption
.
Answer
=
""
;
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
this
.
data
.
forEach
(
item
=>
{
if
(
item
.
IsAnswer
)
{
this
.
setOption
.
Answer
=
item
.
Name
;
}
})
}
},
},
mounted
()
{
...
...
src/components/questiontype/single.vue
View file @
b1f0d019
...
...
@@ -77,7 +77,6 @@
this
.
data
.
splice
(
index
,
1
);
this
.
commonIndex
=
-
1
;
this
.
calcOptionTitle
();
this
.
getAnswer
();
}).
onCancel
(()
=>
{
});
...
...
@@ -91,7 +90,6 @@
IsAnswer
:
false
});
this
.
calcOptionTitle
()
this
.
getAnswer
();
}
else
{
this
.
$q
.
notify
({
type
:
'warning'
,
...
...
@@ -116,6 +114,7 @@
},
//返回数据到父组件
returnDataToParent
()
{
this
.
getAnswer
();
this
.
$emit
(
'getChild'
,
this
.
data
);
},
ChangeItem
(
item
)
{
...
...
@@ -125,7 +124,6 @@
})
}
item
.
IsAnswer
=
true
;
this
.
getAnswer
();
},
//获取正确答案
getAnswer
()
{
...
...
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