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
47a4312a
Commit
47a4312a
authored
Jan 20, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c0b66be5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
33 deletions
+67
-33
question-form.vue
src/components/question/question-form.vue
+5
-12
cloze.vue
src/components/questiontype/cloze.vue
+23
-1
sorting-problem.vue
src/components/questiontype/sorting-problem.vue
+39
-20
No files found.
src/components/question/question-form.vue
View file @
47a4312a
...
@@ -159,15 +159,15 @@
...
@@ -159,15 +159,15 @@
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
>
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
>
</entry-problem>
</entry-problem>
<!--连线题-->
<!--连线题-->
<matching
v-if=
"questionObj.Key=='matching'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
></matching>
<matching
v-if=
"questionObj.Key=='matching'"
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
></matching>
<!--排序题-->
<!--排序题-->
<sorting-problem
v-if=
"questionObj.Key=='sorting-problem'"
:questionData=
"AnswerList"
<sorting-problem
v-if=
"questionObj.Key=='sorting-problem'"
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
></sorting-problem>
@
getChild=
"getChildData"
></sorting-problem>
<!--完型填空-->
<!--完型填空-->
<cloze
v-if=
"questionObj.Key=='cloze'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
></cloze>
<cloze
v-if=
"questionObj.Key=='cloze'"
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
></cloze>
<!--阅读理解、听力题-->
<!--阅读理解、听力题-->
<reading-comprehensio
v-if=
"questionObj.Key=='reading-comprehensio'||questionObj.Key=='listening'"
<reading-comprehensio
v-if=
"questionObj.Key=='reading-comprehensio'||questionObj.Key=='listening'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
></reading-comprehensio>
:questionData=
"AnswerList"
:setOption=
"objOption"
@
getChild=
"getChildData"
></reading-comprehensio>
<!--共用选择题-->
<!--共用选择题-->
<sharing-choose
v-if=
"questionObj.Key=='sharing-choose'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
<sharing-choose
v-if=
"questionObj.Key=='sharing-choose'"
:questionData=
"AnswerList"
@
getChild=
"getChildData"
:setOption=
"objOption"
>
:setOption=
"objOption"
>
...
@@ -187,9 +187,6 @@
...
@@ -187,9 +187,6 @@
</option>
</option>
</
template
>
</
template
>
</select>
</select>
<!-- <q-select filled stack-label option-value="Id" option-label="Name" v-model="objOption.DifficultyType"
ref="DifficultyType" :options="questionDifficultyTypeList" label="难易程度" :dense="false"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options /> -->
</div>
</div>
<div
class=
"col-12"
style=
"margin-top:16px;"
>
<div
class=
"col-12"
style=
"margin-top:16px;"
>
<span
class=
"difficulty_Degree"
>
知识点:
</span>
<span
class=
"difficulty_Degree"
>
知识点:
</span>
...
@@ -200,10 +197,6 @@
...
@@ -200,10 +197,6 @@
{{x.PointName}}
{{x.PointName}}
<i
class=
"iconfont icon-shanchu1"
@
click=
"removePointTag(i)"
></i>
<i
class=
"iconfont icon-shanchu1"
@
click=
"removePointTag(i)"
></i>
</span>
</span>
<!-- <div class="col">
<q-chip v-for="(x, i) in choosePointArray" @remove="removePointTag(i)" :key="i" square color="red"
class="q-ma-none q-mr-md" icon="bookmark" text-color="white" :label="x.PointName" removable />
</div> -->
</div>
</div>
</div>
</div>
</q-card-section>
</q-card-section>
...
@@ -219,7 +212,6 @@
...
@@ -219,7 +212,6 @@
:multiple=
"true"
@
selected=
"getPointList"
>
:multiple=
"true"
@
selected=
"getPointList"
>
</questionpoint>
</questionpoint>
</q-dialog>
</q-dialog>
</template>
</template>
<
script
>
<
script
>
...
@@ -362,6 +354,7 @@
...
@@ -362,6 +354,7 @@
this
.
objOption
.
QuestionTypeKey
=
item
.
Key
;
this
.
objOption
.
QuestionTypeKey
=
item
.
Key
;
var
obj
=
CreateQuestion
(
item
.
Key
);
var
obj
=
CreateQuestion
(
item
.
Key
);
this
.
AnswerList
=
obj
;
this
.
AnswerList
=
obj
;
this
.
objOption
.
QuestionContent
=
JSON
.
stringify
(
obj
);
},
},
//获取题型列表
//获取题型列表
getQuestionType
()
{
getQuestionType
()
{
...
...
src/components/questiontype/cloze.vue
View file @
47a4312a
...
@@ -111,6 +111,9 @@
...
@@ -111,6 +111,9 @@
props
:
{
props
:
{
questionData
:
{
questionData
:
{
type
:
Array
,
type
:
Array
,
},
setOption
:
{
type
:
Object
,
}
}
},
},
components
:
{
components
:
{
...
@@ -174,7 +177,7 @@
...
@@ -174,7 +177,7 @@
}
}
}).
onOk
(()
=>
{
}).
onOk
(()
=>
{
item
.
splice
(
index
,
1
);
item
.
splice
(
index
,
1
);
this
.
childIndex
=
-
1
;
this
.
childIndex
=
-
1
;
this
.
calcOptionTitle
();
this
.
calcOptionTitle
();
});
});
},
},
...
@@ -213,8 +216,27 @@
...
@@ -213,8 +216,27 @@
},
},
//返回数据到父组件
//返回数据到父组件
returnDataToParent
()
{
returnDataToParent
()
{
this
.
getAnswer
();
this
.
$emit
(
'getChild'
,
this
.
data
);
this
.
$emit
(
'getChild'
,
this
.
data
);
},
},
//获取答案
getAnswer
()
{
this
.
setOption
.
Answer
=
""
;
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
var
answer
=
""
;
this
.
data
.
forEach
((
item
)
=>
{
item
.
forEach
((
subItem
)
=>
{
if
(
subItem
.
IsAnswer
)
{
answer
+=
","
+
subItem
.
Name
;
}
})
})
if
(
answer
!=
""
)
{
answer
=
answer
.
substring
(
1
);
}
this
.
setOption
.
Answer
=
answer
;
}
},
ChangeItem
(
item
,
subItem
)
{
ChangeItem
(
item
,
subItem
)
{
if
(
item
&&
item
.
length
>
0
)
{
if
(
item
&&
item
.
length
>
0
)
{
item
.
forEach
(
childItem
=>
{
item
.
forEach
(
childItem
=>
{
...
...
src/components/questiontype/sorting-problem.vue
View file @
47a4312a
<!--排序题-->
<!--排序题-->
<
style
>
<
style
>
.sortingProblemQuestion
{
.sortingProblemQuestion
{
width
:
100%
width
:
100%
}
}
.team_tit
{
.team_tit
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#A8A8B3
;
color
:
#A8A8B3
;
padding-bottom
:
20px
;
padding-bottom
:
20px
;
}
}
.selectBox
{
.selectBox
{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
top
;
vertical-align
:
top
;
text-align
:
left
;
text-align
:
left
;
...
@@ -24,10 +26,12 @@
...
@@ -24,10 +26,12 @@
color
:
#181E33
;
color
:
#181E33
;
margin
:
0
20px
14px
0
;
margin
:
0
20px
14px
0
;
}
}
.blue-border
{
.blue-border
{
border
:
1px
solid
#FFFFFF
;
border
:
1px
solid
#FFFFFF
;
box-shadow
:
0
0
7px
1px
#75BAFF
;
box-shadow
:
0
0
7px
1px
#75BAFF
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"sortingProblemQuestion"
>
<div
class=
"sortingProblemQuestion"
>
...
@@ -44,22 +48,19 @@
...
@@ -44,22 +48,19 @@
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(index)"
></i>
<i
class=
"iconfont icon-guanbi Tiku_DelIcon"
@
click=
"deleteOpion(index)"
></i>
</td>
</td>
</tr>
</tr>
<tfoot>
<tr>
<td
colspan=
"3"
>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加选项
</a>
</td>
</tr>
</tfoot>
</table>
</table>
<br
/>
<a
class=
"addTiMuList"
@
click=
"addOption()"
>
<i
class=
"iconfont icon-add"
></i>
添加更多
</a>
<br
/>
<div
class=
"team_tit"
>
答案:请在下方下拉框中对选项进行排序(顺序从左到右)
</div>
<div
class=
"team_tit"
>
答案:请在下方下拉框中对选项进行排序(顺序从左到右)
</div>
<table
v-if=
"data&&data.length>0"
>
<table
v-if=
"data&&data.length>0"
>
<tr>
<tr>
<td>
<td>
<template
v-for=
"(item,index) in data[1]"
>
<template
v-for=
"(item,index) in data[1]"
>
<select
v-model=
"item.Name"
class=
"selectBox"
:class=
"
{'blue-border':index==clickIndex}" @click="clickIndex=index">
<select
v-model=
"item.Name"
class=
"selectBox"
:class=
"
{'blue-border':index==clickIndex}"
@click="clickIndex=index">
<template
v-for=
"(cItem,cIndex) in data[0]"
>
<template
v-for=
"(cItem,cIndex) in data[0]"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Name"
>
<option
:key=
"cIndex"
:label=
"cItem.Name"
:value=
"cItem.Name"
>
</option>
</option>
...
@@ -81,6 +82,9 @@
...
@@ -81,6 +82,9 @@
questionData
:
{
questionData
:
{
type
:
Array
,
type
:
Array
,
},
},
setOption
:
{
type
:
Object
,
}
},
},
components
:
{
components
:
{
UeEditor
UeEditor
...
@@ -93,11 +97,11 @@
...
@@ -93,11 +97,11 @@
initialFrameHeight
:
80
,
initialFrameHeight
:
80
,
},
},
optionTitleList
:
[],
optionTitleList
:
[],
commonIndex
:
-
1
,
commonIndex
:
-
1
,
clickIndex
:
-
1
,
clickIndex
:
-
1
,
};
};
},
},
created
()
{
created
()
{
this
.
initConfig
();
this
.
initConfig
();
},
},
methods
:
{
methods
:
{
...
@@ -122,7 +126,7 @@
...
@@ -122,7 +126,7 @@
}).
onOk
(()
=>
{
}).
onOk
(()
=>
{
this
.
data
[
0
].
splice
(
index
,
1
);
this
.
data
[
0
].
splice
(
index
,
1
);
this
.
data
[
1
].
splice
(
index
,
1
);
this
.
data
[
1
].
splice
(
index
,
1
);
this
.
commonIndex
=
-
1
;
this
.
commonIndex
=
-
1
;
this
.
calcOptionTitle
();
this
.
calcOptionTitle
();
});
});
},
},
...
@@ -158,11 +162,26 @@
...
@@ -158,11 +162,26 @@
},
},
//返回数据到父组件
//返回数据到父组件
returnDataToParent
()
{
returnDataToParent
()
{
this
.
getAnswer
();
this
.
$emit
(
'getChild'
,
this
.
data
);
this
.
$emit
(
'getChild'
,
this
.
data
);
},
},
//获取正确答案
getAnswer
()
{
this
.
setOption
.
Answer
=
""
;
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
var
answer
=
""
;
this
.
data
[
1
].
forEach
(
item
=>
{
answer
+=
","
+
item
.
Name
;
})
if
(
answer
!=
""
)
{
answer
=
answer
.
substring
(
1
);
}
this
.
setOption
.
Answer
=
answer
;
}
},
//点击切换输入
//点击切换输入
changeEdit
(
index
){
changeEdit
(
index
)
{
this
.
commonIndex
=
index
;
this
.
commonIndex
=
index
;
},
},
},
},
mounted
()
{
mounted
()
{
...
...
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