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
b8328781
Commit
b8328781
authored
Apr 06, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
534f7a8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
73 deletions
+17
-73
v-cloze.vue
src/components/questiontype/v-cloze.vue
+2
-16
questionInfo.vue
src/pages/course/questionInfo.vue
+15
-57
No files found.
src/components/questiontype/v-cloze.vue
View file @
b8328781
...
...
@@ -71,17 +71,15 @@
<tbody
class=
"contant"
v-if=
"(commonIndex==index)&&!isShow"
>
<tr
v-for=
"(subItem,subIndex) in item"
>
<td
style=
"width:40px;text-align:center;"
>
<div
class=
"Answer_List"
@
click=
"ChangeItem(item,subItem)"
:class=
"
{'Is_Answer':subItem.IsAnswer}">
<div
class=
"Answer_List"
:class=
"
{'Is_Answer':subItem.IsAnswer}">
{{
subItem
.
Name
}}
</div>
</td>
<td>
<div
class=
"InpDIV"
v-html=
"subItem.Content"
v-if=
"childIndex!=subIndex"
@
click=
"changeEdit(subIndex)
"
>
<div
class=
"InpDIV"
style=
"border:0;"
v-html=
"subItem.Content
"
>
</div>
<UeEditor
v-model=
"subItem.Content"
:config=
"config"
v-else
></UeEditor>
</td>
<td
style=
"width:40px;text-align:center;"
>
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(item,subIndex)"
></i>
</td>
</tr>
</tbody>
...
...
@@ -237,14 +235,6 @@
this
.
setOption
.
Answer
=
answer
;
}
},
ChangeItem
(
item
,
subItem
)
{
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
(
childItem
=>
{
childItem
.
IsAnswer
=
false
;
})
}
subItem
.
IsAnswer
=
true
;
},
//点击展开收起
showNav
(
index
)
{
if
(
this
.
commonIndex2
==
index
)
{
...
...
@@ -256,10 +246,6 @@
this
.
commonIndex2
=
index
;
}
},
//点击切换输入
changeEdit
(
index
)
{
this
.
childIndex
=
index
;
}
},
mounted
()
{
...
...
src/pages/course/questionInfo.vue
View file @
b8328781
...
...
@@ -162,8 +162,8 @@
<sorting-problem
v-if=
"questionObj.Key=='sorting-problem'"
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
></sorting-problem>
<!--完型填空-->
<cloze
v-if=
"questionObj.Key=='cloze'"
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
></cloze>
<
v-
cloze
v-if=
"questionObj.Key=='cloze'"
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
></
v-
cloze>
<!--阅读理解、听力题-->
<reading-comprehensio
v-if=
"questionObj.Key=='reading-comprehensio'||questionObj.Key=='listening'"
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
></reading-comprehensio>
...
...
@@ -181,41 +181,21 @@
<br
/>
<span
class=
"difficulty_Degree"
>
难度
</span>
<span>
{{objOption.DifficultyTypeStr}}
</span>
<!-- <select v-model="objOption.DifficultyType" class="selectBox blue-border">
<template v-for="(cItem,cIndex) in questionDifficultyTypeList">
<option :key="cIndex" :label="cItem.Name" :value="cItem.Id">
</option>
</template>
</select> -->
</div>
<div
class=
"col-12"
>
<br
/>
<span
class=
"difficulty_Degree"
>
所属大类
</span>
<select
v-model=
"objOption.Category"
class=
"selectBox blue-border"
>
<
template
v-for=
"(cItem,cIndex) in questionCategoryList"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Id"
>
</option>
</
template
>
</select>
<span>
{{objOption.CategoryName}}
</span>
</div>
<div
class=
"col-12"
>
<br
/>
<span
class=
"difficulty_Degree"
>
考级程度
</span>
<select
v-model=
"objOption.LevelType"
class=
"selectBox blue-border"
>
<
template
v-for=
"(cItem,cIndex) in questionLevalTypeList"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Id"
>
</option>
</
template
>
</select>
<span>
{{objOption.LevelTypeName}}
</span>
</div>
<div
class=
"col-12"
style=
"margin-top:16px;"
>
<span
class=
"difficulty_Degree"
>
知识点:
</span>
<a
class=
"addKnowledge"
@
click=
"isShowPoint=true"
>
<i
class=
"iconfont icon-add"
style=
"position:relative;top:1px;"
></i>
选择知识点
</a>
<span
class=
"knowledge_List"
v-for=
"(x, i) in choosePointArray"
:key=
"i"
>
{{x.PointName}}
<i
class=
"iconfont icon-shanchu1"
@
click=
"removePointTag(i)"
></i>
</span>
</div>
</div>
...
...
@@ -235,11 +215,8 @@
<
script
>
import
{
queryQuestionTypeList
,
queryDifficultyType
,
saveQuestion
,
queryQuestionInfo
,
queryQuestionCategory
,
queryQuestionLevelType
queryQuestionInfo
}
from
'../../api/question/question'
import
{
CreateQuestion
,
//生成问题
...
...
@@ -256,7 +233,7 @@
import
entryProblem
from
'../../components/questiontype/entry-problem'
import
matching
from
'../../components/questiontype/matching'
import
sortingProblem
from
'../../components/questiontype/sorting-problem'
import
cloze
from
'../../components/questiontype/
cloze'
import
vCloze
from
'../../components/questiontype/v-
cloze'
import
readingComprehensio
from
'../../components/questiontype/reading-comprehensio'
import
sharingChoose
from
'../../components/questiontype/sharing-choose'
export
default
{
...
...
@@ -271,7 +248,7 @@
entryProblem
,
//分录题
matching
,
//连线题
sortingProblem
,
//排序题
c
loze
,
//完型填空
vC
loze
,
//完型填空
readingComprehensio
,
//阅读理解
sharingChoose
,
//共用选择题
},
...
...
@@ -312,17 +289,18 @@
IsMutex
:
0
,
//填空题(答案顺序打乱也判正确)
Category
:
0
,
//大类
LevelType
:
0
,
//考级程度
DifficultyTypeStr
:
''
,
CategoryName
:
''
,
LevelTypeName
:
''
,
},
AnswerList
:
[],
optionTitle
:
""
,
questionObj
:
{},
//题目类型对象
firstTypeList
:
[],
//前5个数组
secondTypeList
:
[],
//后面的题型
questionDifficultyTypeList
:
[],
//问题难易程度列表
isShowPoint
:
false
,
//是否显示知识点弹窗
choosePointArray
:
[],
//知识点列表
questionCategoryList
:
[],
//问题大类
questionLevalTypeList
:
[],
}
},
computed
:
{
...
...
@@ -344,26 +322,11 @@
},
created
()
{
this
.
getQuestionType
();
this
.
getDifficultyType
();
this
.
getQuestionCategory
();
this
.
getQuestionLevelType
();
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
//获取问题大类
getQuestionCategory
()
{
queryQuestionCategory
().
then
(
res
=>
{
this
.
questionCategoryList
=
res
.
Data
;
})
},
//获取问题考级程度
getQuestionLevelType
()
{
queryQuestionLevelType
().
then
(
res
=>
{
this
.
questionLevalTypeList
=
res
.
Data
;
})
},
//移除知识点
removePointTag
(
index
)
{
this
.
choosePointArray
.
splice
(
index
,
1
);
...
...
@@ -412,14 +375,6 @@
}
});
},
//获取问题难易程度列表
getDifficultyType
()
{
queryDifficultyType
().
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
questionDifficultyTypeList
=
res
.
Data
;
}
});
},
//初始化表单
initObj
()
{
var
qId
=
0
;
...
...
@@ -444,6 +399,10 @@
this
.
questionObj
.
QId
=
res
.
Data
.
QuestionTypeId
;
this
.
objOption
.
Category
=
res
.
Data
.
Category
;
this
.
objOption
.
LevelType
=
res
.
Data
.
LevelType
;
this
.
objOption
.
DifficultyTypeStr
=
res
.
Data
.
DifficultyTypeStr
;
this
.
objOption
.
CategoryName
=
res
.
Data
.
CategoryName
;
this
.
objOption
.
LevelTypeName
=
res
.
Data
.
LevelTypeName
;
if
(
res
.
Data
.
QuestionContentObj
)
{
this
.
AnswerList
=
res
.
Data
.
QuestionContentObj
;
this
.
objOption
.
QuestionContent
=
JSON
.
stringify
(
res
.
Data
.
QuestionContentObj
);
...
...
@@ -454,7 +413,6 @@
this
.
choosePointArray
=
res
.
Data
.
QuestionPointList
;
}
})
this
.
optionTitle
=
"修改问题信息"
}
},
//关闭弹窗
...
...
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