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
6eee41f0
Commit
6eee41f0
authored
Jan 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
2800ff3d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
4 deletions
+33
-4
question.js
src/api/question/question.js
+10
-0
question-form.vue
src/components/question/question-form.vue
+23
-4
No files found.
src/api/question/question.js
View file @
6eee41f0
...
@@ -134,3 +134,13 @@ export function saveQuestionBeatch(data) {
...
@@ -134,3 +134,13 @@ export function saveQuestionBeatch(data) {
data
data
})
})
}
}
/**
* 获取问题大类
*/
export
function
queryQuestionCategory
()
{
return
request
({
url
:
'/Question/GetQuestionCategory'
,
method
:
'post'
,
})
}
src/components/question/question-form.vue
View file @
6eee41f0
...
@@ -189,6 +189,16 @@
...
@@ -189,6 +189,16 @@
</
template
>
</
template
>
</select>
</select>
</div>
</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>
</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>
<a
class=
"addKnowledge"
@
click=
"isShowPoint=true"
>
<a
class=
"addKnowledge"
@
click=
"isShowPoint=true"
>
...
@@ -220,7 +230,8 @@
...
@@ -220,7 +230,8 @@
queryQuestionTypeList
,
queryQuestionTypeList
,
queryDifficultyType
,
queryDifficultyType
,
saveQuestion
,
saveQuestion
,
queryQuestionInfo
queryQuestionInfo
,
queryQuestionCategory
}
from
'../../api/question/question'
}
from
'../../api/question/question'
import
{
import
{
CreateQuestion
,
//生成问题
CreateQuestion
,
//生成问题
...
@@ -286,7 +297,7 @@
...
@@ -286,7 +297,7 @@
SortNum
:
0
,
//排序
SortNum
:
0
,
//排序
Answer
:
""
,
//问题JSON
Answer
:
""
,
//问题JSON
IsMutex
:
0
,
//填空题(答案顺序打乱也判正确)
IsMutex
:
0
,
//填空题(答案顺序打乱也判正确)
Category
:
0
,
//大类
Category
:
0
,
//大类
},
},
AnswerList
:
[],
AnswerList
:
[],
optionTitle
:
""
,
optionTitle
:
""
,
...
@@ -297,6 +308,7 @@
...
@@ -297,6 +308,7 @@
saveCourseLoading
:
false
,
saveCourseLoading
:
false
,
isShowPoint
:
false
,
//是否显示知识点弹窗
isShowPoint
:
false
,
//是否显示知识点弹窗
choosePointArray
:
[],
//知识点列表
choosePointArray
:
[],
//知识点列表
questionCategoryList
:
[],
//问题大类
}
}
},
},
computed
:
{
computed
:
{
...
@@ -319,11 +331,18 @@
...
@@ -319,11 +331,18 @@
created
()
{
created
()
{
this
.
getQuestionType
();
this
.
getQuestionType
();
this
.
getDifficultyType
();
this
.
getDifficultyType
();
this
.
getQuestionCategory
();
},
},
mounted
()
{
mounted
()
{
this
.
initObj
()
this
.
initObj
()
},
},
methods
:
{
methods
:
{
//获取问题大类
getQuestionCategory
()
{
queryQuestionCategory
().
then
(
res
=>
{
this
.
questionCategoryList
=
res
.
Data
;
})
},
//移除知识点
//移除知识点
removePointTag
(
index
)
{
removePointTag
(
index
)
{
this
.
choosePointArray
.
splice
(
index
,
1
);
this
.
choosePointArray
.
splice
(
index
,
1
);
...
@@ -400,7 +419,7 @@
...
@@ -400,7 +419,7 @@
this
.
objOption
.
IsMutex
=
res
.
Data
.
IsMutex
;
this
.
objOption
.
IsMutex
=
res
.
Data
.
IsMutex
;
this
.
questionObj
.
Key
=
res
.
Data
.
QuestionTypeKey
;
this
.
questionObj
.
Key
=
res
.
Data
.
QuestionTypeKey
;
this
.
questionObj
.
QId
=
res
.
Data
.
QuestionTypeId
;
this
.
questionObj
.
QId
=
res
.
Data
.
QuestionTypeId
;
this
.
objOption
.
Category
=
res
.
Data
.
Category
;
this
.
objOption
.
Category
=
res
.
Data
.
Category
;
if
(
res
.
Data
.
QuestionContentObj
)
{
if
(
res
.
Data
.
QuestionContentObj
)
{
this
.
AnswerList
=
res
.
Data
.
QuestionContentObj
;
this
.
AnswerList
=
res
.
Data
.
QuestionContentObj
;
this
.
objOption
.
QuestionContent
=
JSON
.
stringify
(
res
.
Data
.
QuestionContentObj
);
this
.
objOption
.
QuestionContent
=
JSON
.
stringify
(
res
.
Data
.
QuestionContentObj
);
...
@@ -425,7 +444,7 @@
...
@@ -425,7 +444,7 @@
this
.
objOption
.
SortNum
=
0
;
this
.
objOption
.
SortNum
=
0
;
this
.
objOption
.
Answer
=
''
;
this
.
objOption
.
Answer
=
''
;
this
.
objOption
.
IsMutex
=
0
;
this
.
objOption
.
IsMutex
=
0
;
this
.
objOption
.
Category
=
0
;
this
.
objOption
.
Category
=
0
;
}
}
},
},
//关闭弹窗
//关闭弹窗
...
...
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