Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-qa
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-qa
Commits
2e3003dc
提交
2e3003dc
authored
3月 01, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
56887b98
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
21 行增加
和
19 行删除
+21
-19
AddChidren.vue
src/modules/question/components/AddChidren.vue
+5
-3
QTypeCheckbox.vue
src/modules/question/components/QTypeCheckbox.vue
+14
-14
QTypeSituation.vue
src/modules/question/components/QTypeSituation.vue
+1
-1
QuestionsChidren.vue
src/modules/question/components/QuestionsChidren.vue
+1
-1
没有找到文件。
src/modules/question/components/AddChidren.vue
浏览文件 @
2e3003dc
...
@@ -142,7 +142,8 @@ export default {
...
@@ -142,7 +142,8 @@ export default {
return
data
.
data
.
reduce
((
a
,
b
,
index
)
=>
{
return
data
.
data
.
reduce
((
a
,
b
,
index
)
=>
{
const
type
=
b
.
question_type
const
type
=
b
.
question_type
b
.
order
=
index
+
1
b
.
order
=
index
+
1
b
.
question_type
=
questionType
[
b
.
question_type
]
// b.question_type = questionType[b.question_type]
b
.
questionTypeName
=
questionType
[
b
.
question_type
]
b
.
question_difficulty
=
questionDifficulty
[
b
.
question_difficulty
]
b
.
question_difficulty
=
questionDifficulty
[
b
.
question_difficulty
]
if
(
type
!==
5
&&
type
!==
7
&&
type
!==
8
)
a
.
push
(
b
)
if
(
type
!==
5
&&
type
!==
7
&&
type
!==
8
)
a
.
push
(
b
)
return
a
return
a
...
@@ -152,7 +153,7 @@ export default {
...
@@ -152,7 +153,7 @@ export default {
columns
:
[
columns
:
[
{
type
:
'selection'
,
minWidth
:
'50px'
,
fixed
:
'left'
},
{
type
:
'selection'
,
minWidth
:
'50px'
,
fixed
:
'left'
},
{
label
:
'序号'
,
prop
:
'order'
},
{
label
:
'序号'
,
prop
:
'order'
},
{
label
:
'题目类型'
,
prop
:
'question
_typ
e'
},
{
label
:
'题目类型'
,
prop
:
'question
TypeNam
e'
},
{
label
:
'试题分类'
,
prop
:
'question_category.category_name'
},
{
label
:
'试题分类'
,
prop
:
'question_category.category_name'
},
{
label
:
'题目标题'
,
prop
:
'question_title'
},
{
label
:
'题目标题'
,
prop
:
'question_title'
},
{
label
:
'知识点'
,
prop
:
'knowledge_point.title'
},
{
label
:
'知识点'
,
prop
:
'knowledge_point.title'
},
...
@@ -169,10 +170,11 @@ export default {
...
@@ -169,10 +170,11 @@ export default {
},
},
methods
:
{
methods
:
{
handleSelectionChange
(
data
)
{
handleSelectionChange
(
data
)
{
console
.
log
(
data
,
'datas'
)
this
.
checkedList
=
data
.
reduce
((
a
,
b
)
=>
{
this
.
checkedList
=
data
.
reduce
((
a
,
b
)
=>
{
const
data
=
{}
const
data
=
{}
data
.
question_title
=
b
.
question_title
data
.
question_title
=
b
.
question_title
data
.
child_question_type
=
b
.
child_
question_type
||
1
data
.
child_question_type
=
b
.
question_type
||
1
data
.
question_content
=
b
.
question_content
data
.
question_content
=
b
.
question_content
data
.
question_analysis
=
b
.
question_analysis
data
.
question_analysis
=
b
.
question_analysis
if
(
this
.
type
!==
3
)
data
.
question_options
=
b
.
question_options
if
(
this
.
type
!==
3
)
data
.
question_options
=
b
.
question_options
...
...
src/modules/question/components/QTypeCheckbox.vue
浏览文件 @
2e3003dc
<
template
>
<
template
>
<div
class=
"radio-box"
>
<div
class=
"radio-box"
>
<template
v-for=
"(item, index) in
datas
"
>
<template
v-for=
"(item, index) in
option
"
>
<div
class=
"opt"
:key=
"index"
>
<div
class=
"opt"
:key=
"index"
>
<el-checkbox
v-model=
"checkboxValue"
:label=
"index"
@
change=
"checkboxChange"
>
<el-checkbox
v-model=
"checkboxValue"
:label=
"index"
@
change=
"checkboxChange"
>
<el-tag>
{{
A_Z
()[
index
]
}}
</el-tag>
<el-tag>
{{
A_Z
()[
index
]
}}
</el-tag>
<el-input
v-model=
"item.option"
maxlength=
"80"
show-word-limit
></el-input>
<el-input
v-model=
"item.option"
maxlength=
"80"
show-word-limit
></el-input>
</el-checkbox>
</el-checkbox>
<i
class=
"el-icon-remove-outline icon-style"
v-if=
"index !=
datas
.length - 1"
@
click=
"remove(index)"
></i>
<i
class=
"el-icon-remove-outline icon-style"
v-if=
"index !=
option
.length - 1"
@
click=
"remove(index)"
></i>
<i
class=
"el-icon-circle-plus-outline icon-style"
v-else
@
click=
"add"
></i>
<i
class=
"el-icon-circle-plus-outline icon-style"
v-else
@
click=
"add"
></i>
</div>
</div>
</
template
>
</
template
>
...
@@ -44,20 +44,20 @@ export default {
...
@@ -44,20 +44,20 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
option
)
{
//
if (this.option) {
this
.
datas
=
this
.
option
//
this.datas = this.option
this
.
checkboxValue
=
[
0
]
this
.
checkboxValue
=
[
0
]
this
.
datas
.
forEach
((
item
,
index
)
=>
{
this
.
option
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
checked
)
this
.
checkboxValue
.
push
(
index
)
if
(
item
.
checked
)
this
.
checkboxValue
.
push
(
index
)
})
})
}
//
}
},
},
methods
:
{
methods
:
{
add
()
{
add
()
{
this
.
datas
.
push
({
option
:
''
,
checked
:
false
})
this
.
option
.
push
({
option
:
''
,
checked
:
false
})
},
},
remove
(
index
)
{
remove
(
index
)
{
this
.
datas
.
splice
(
index
,
1
)
this
.
option
.
splice
(
index
,
1
)
},
},
A_Z
()
{
A_Z
()
{
const
result
=
[]
const
result
=
[]
...
@@ -67,14 +67,14 @@ export default {
...
@@ -67,14 +67,14 @@ export default {
return
result
return
result
},
},
checkboxChange
()
{
checkboxChange
()
{
this
.
datas
.
map
(
item
=>
{
this
.
option
.
map
(
item
=>
{
item
.
checked
=
false
item
.
checked
=
false
return
item
return
item
})
})
this
.
checkboxValue
.
forEach
(
item
=>
{
this
.
checkboxValue
.
forEach
(
item
=>
{
this
.
datas
[
item
].
checked
=
true
this
.
option
[
item
].
checked
=
true
})
})
console
.
log
(
this
.
datas
)
console
.
log
(
this
.
option
)
}
}
}
}
}
}
...
...
src/modules/question/components/QTypeSituation.vue
浏览文件 @
2e3003dc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<div
class=
"tool-btn"
v-if=
"!!!($route.query.type === 'view')"
>
<div
class=
"tool-btn"
v-if=
"!!!($route.query.type === 'view')"
>
<el-button
type=
"primary"
@
click=
"drawer = true"
>
添加子题目
</el-button>
<el-button
type=
"primary"
@
click=
"drawer = true"
>
添加子题目
</el-button>
<el-button
type=
"primary"
@
click=
"cacheQuestion"
>
保存主题目
</el-button>
<el-button
type=
"primary"
v-if=
"!!!($route.query.type === 'edit')"
@
click=
"cacheQuestion"
>
保存主题目
</el-button>
</div>
</div>
<el-form
:disabled=
"!!($route.query.type === 'view')"
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form
:disabled=
"!!($route.query.type === 'view')"
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"题库范围"
prop=
"permission"
>
<el-form-item
label=
"题库范围"
prop=
"permission"
>
...
...
src/modules/question/components/QuestionsChidren.vue
浏览文件 @
2e3003dc
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
v-for=
"(ruleForm, index) in dataList"
:key=
"index"
>
<div
v-for=
"(ruleForm, index) in dataList"
:key=
"index"
>
<el-divider
content-position=
"center"
class=
"divider"
>
子题目
{{
index
+
1
}}
</el-divider>
<el-divider
content-position=
"center"
class=
"divider"
>
子题目
{{
index
+
1
}}
</el-divider>
<el-form-item
style=
"text-align: right;"
v-if=
"!!!($route.query.type === 'view')"
>
<el-form-item
style=
"text-align: right;"
v-if=
"!!!($route.query.type === 'view')"
>
<el-button
type=
"primary"
@
click=
"$emit('cacheChidren')"
>
保存子题目
</el-button>
<el-button
type=
"primary"
v-if=
"!!!($route.query.type === 'edit')"
@
click=
"$emit('cacheChidren')"
>
保存子题目
</el-button>
<el-button
type=
"primary"
@
click=
"removeChidren(index)"
>
删除子题目
</el-button>
<el-button
type=
"primary"
@
click=
"removeChidren(index)"
>
删除子题目
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"子题目类型"
prop=
"child_question_type"
>
<el-form-item
label=
"子题目类型"
prop=
"child_question_type"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论