Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-training-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-training-admin
Commits
45707497
提交
45707497
authored
7月 02, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
案例管理增加产品概况显示答案项,特征管理增加单多选控制
上级
16bfa31c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
54 行增加
和
7 行删除
+54
-7
index.vue
src/pages/v2/cases/index.vue
+14
-1
update.vue
src/pages/v2/cases/update.vue
+14
-4
index.vue
src/pages/v2/characteristics/index.vue
+14
-0
update.vue
src/pages/v2/characteristics/update.vue
+12
-2
没有找到文件。
src/pages/v2/cases/index.vue
浏览文件 @
45707497
...
...
@@ -168,6 +168,9 @@
<div>
<span><strong>
输入提示:
</strong></span><span>
{{ production.show_info }}
</span>
</div>
<div>
<span><strong>
显示答案:
</strong></span><span>
{{ production.show_answer }}
</span>
</div>
<div
class=
"bottom clearfix"
>
<span><strong>
关键词配置
</strong></span>
<div
v-if=
"production.keywords"
v-for=
"(keyword, i) in production.keywords"
:key=
"i"
>
...
...
@@ -323,6 +326,10 @@
<el-input
size=
"mini"
v-model=
"item.show_info"
placeholder=
"请输入内容"
style=
"width: 50%"
></el-input>
</span>
</div>
<div
style=
" margin-top: 2%; margin-right: 5%"
>
<span
style=
"display:inline-block;vertical-align: top;"
>
显示答案:
</span>
<el-input
size=
"mini"
v-model=
"item.show_answer"
placeholder=
"请输入答案"
type=
"textarea"
style=
"width: 80%"
></el-input>
</div>
<div
v-for=
"(keywrod, index1) in item.keywords"
:key=
"'production-'+index1"
style=
"margin-top: 2%"
>
<el-card>
<span>
...
...
@@ -466,6 +473,7 @@ const defaultForm = {
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
show_answer
:
''
,
keywords
:
[
{
name
:
''
,
...
...
@@ -675,6 +683,11 @@ export default {
},
handleDraftCreate
()
{
const
data
=
JSON
.
parse
(
this
.
formDraftStr
)
if
(
data
.
production_detail
[
0
].
show_answer
===
undefined
)
{
data
.
production_detail
.
forEach
(
item
=>
{
item
.
show_answer
=
''
})
}
this
.
addForm
=
data
this
.
drawer
=
true
},
...
...
@@ -836,7 +849,7 @@ export default {
addNames
(
detailName
,
index
)
{
switch
(
detailName
)
{
case
'production_detail'
:
this
.
addForm
.
production_detail
.
push
({
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
keywords
:
[{
name
:
''
,
score
:
0
}]
})
this
.
addForm
.
production_detail
.
push
({
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
show_answer
:
''
,
keywords
:
[{
name
:
''
,
score
:
0
}]
})
break
case
'fund_detail'
:
this
.
addForm
.
fund_detail
.
push
({
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
keywords
:
[{
name
:
''
,
score
:
0
}]
})
...
...
src/pages/v2/cases/update.vue
浏览文件 @
45707497
...
...
@@ -104,6 +104,10 @@
<el-input
size=
"mini"
v-model=
"item.show_info"
placeholder=
"请输入内容"
style=
"width: 80%"
></el-input>
</span>
</div>
<div
style=
" margin-top: 2%; margin-right: 5%"
>
<span
style=
"display:inline-block;vertical-align: top;"
>
显示答案:
</span>
<el-input
size=
"mini"
v-model=
"item.show_answer"
placeholder=
"请输入答案"
type=
"textarea"
style=
"width: 80%"
></el-input>
</div>
<div
v-for=
"(keywrod, index1) in item.keywords"
:key=
"'production-'+index1"
style=
"margin-top: 2%"
>
<el-card>
<span>
...
...
@@ -250,6 +254,7 @@ export default {
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
show_answer
:
''
,
keywords
:
[
{
name
:
''
,
...
...
@@ -345,6 +350,11 @@ export default {
this
.
updateForm
.
accessory
=
data
.
accessory
this
.
updateForm
.
url
=
data
.
url
if
(
data
.
production_detail
&&
data
.
production_detail
.
length
>
0
)
{
if
(
data
.
production_detail
[
0
].
show_answer
===
undefined
)
{
data
.
production_detail
.
forEach
(
item
=>
{
item
.
show_answer
=
''
})
}
this
.
updateForm
.
production_detail
=
data
.
production_detail
}
if
(
data
.
invest_detail
&&
data
.
invest_detail
.
length
>
0
)
{
...
...
@@ -464,7 +474,7 @@ export default {
addNames
(
detailName
,
index
)
{
switch
(
detailName
)
{
case
'production_detail'
:
this
.
updateForm
.
production_detail
.
push
({
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
keywords
:
[{
name
:
''
,
score
:
0
}]
})
this
.
updateForm
.
production_detail
.
push
({
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
show_answer
:
''
,
keywords
:
[{
name
:
''
,
score
:
0
}]
})
break
case
'fund_detail'
:
this
.
updateForm
.
fund_detail
.
push
({
name
:
''
,
show_type
:
'input'
,
show_info
:
''
,
keywords
:
[{
name
:
''
,
score
:
0
}]
})
...
...
@@ -477,17 +487,17 @@ export default {
removeNames
(
detailName
,
index
)
{
switch
(
detailName
)
{
case
'production_detail'
:
if
(
this
.
updateForm
.
production_detail
.
length
>
1
)
{
if
(
this
.
updateForm
.
production_detail
.
length
>
0
)
{
this
.
updateForm
.
production_detail
.
splice
(
index
,
1
)
}
break
case
'fund_detail'
:
if
(
this
.
updateForm
.
fund_detail
.
length
>
1
)
{
if
(
this
.
updateForm
.
fund_detail
.
length
>
0
)
{
this
.
updateForm
.
fund_detail
.
splice
(
index
,
1
)
}
break
case
'invest_detail'
:
if
(
this
.
updateForm
.
invest_detail
.
length
>
1
)
{
if
(
this
.
updateForm
.
invest_detail
.
length
>
0
)
{
this
.
updateForm
.
invest_detail
.
splice
(
index
,
1
)
}
break
...
...
src/pages/v2/characteristics/index.vue
浏览文件 @
45707497
...
...
@@ -143,6 +143,11 @@
<el-input
size=
"mini"
v-model=
"option.name"
placeholder=
"请输入选项名称"
style=
"width: 50%"
></el-input>
</span>
</div>
<div
style=
"margin-left: 5%; margin-top: 2%"
>
<strong>
是否单选:
</strong>
<el-radio
size=
"mini"
v-model
.
number=
"option.is_single_choice"
:label=
"0"
>
否
</el-radio>
<el-radio
size=
"mini"
v-model
.
number=
"option.is_single_choice"
:label=
"1"
>
是
</el-radio>
</div>
<div
style=
"margin-left: 5%; margin-top: 2%"
>
<span><strong>
选项配置:
</strong></span>
</div>
...
...
@@ -248,6 +253,9 @@
<div>
<span><strong>
特征选项名称:
</strong></span><span>
{{ option.name }}
</span>
</div>
<div>
<strong>
是否单选:
</strong>
{{option.is_single_choice ? '是' : '否'}}
</div>
<div
class=
"bottom clearfix"
>
<span><strong>
特征选项配置
</strong></span>
<div
v-for=
"(option1, optionIndex1) in option.options"
:key=
"'option1-' + optionIndex1"
>
...
...
@@ -350,6 +358,7 @@ const defaultForm = {
options
:
[
{
name
:
''
,
is_single_choice
:
0
,
options
:
[
{
option
:
'A'
,
...
...
@@ -549,6 +558,11 @@ export default {
},
handleDraftCreate
()
{
const
data
=
JSON
.
parse
(
this
.
formDraftStr
)
if
(
data
.
options
[
0
].
is_single_choice
===
undefined
)
{
data
.
options
.
forEach
(
item
=>
{
item
.
is_single_choice
=
0
})
}
this
.
addForm
=
data
this
.
drawer
=
true
},
...
...
src/pages/v2/characteristics/update.vue
浏览文件 @
45707497
...
...
@@ -24,13 +24,18 @@
<i
class=
"el-icon-circle-plus-outline"
@
click=
"addOptions(optionIndex)"
>
添加
</i>
<i
class=
"el-icon-remove-outline"
@
click=
"removeOptions(optionIndex)"
>
删除
</i>
</div>
<div
style=
"margin-left: 5%"
>
<div
style=
"margin-left: 5%
; margin-top: 2%
"
>
<span>
<strong>
选项名称:
</strong>
<el-input
size=
"mini"
v-model=
"option.name"
placeholder=
"请输入选项名称"
style=
"width: 50%"
></el-input>
</span>
</div>
<div
style=
"margin-left: 5%"
>
<div
style=
"margin-left: 5%; margin-top: 2%"
>
<strong>
是否单选:
</strong>
<el-radio
size=
"mini"
v-model
.
number=
"option.is_single_choice"
:label=
"0"
>
否
</el-radio>
<el-radio
size=
"mini"
v-model
.
number=
"option.is_single_choice"
:label=
"1"
>
是
</el-radio>
</div>
<div
style=
"margin-left: 5%; margin-top: 2%"
>
<span><strong>
选项配置:
</strong></span>
</div>
<div
style=
"margin-left: 5%; margin-right: 5%; margin-top: 2%"
v-for=
"(childOption, childOptionIndex) in option.options"
:key=
"'childOption-' + childOptionIndex"
>
...
...
@@ -220,6 +225,11 @@ export default {
this
.
updateForm
.
rules
=
characteristics
.
rules
}
if
(
characteristics
.
options
)
{
if
(
characteristics
.
options
[
0
].
is_single_choice
===
undefined
)
{
characteristics
.
options
.
forEach
(
item
=>
{
item
.
is_single_choice
=
0
})
}
this
.
updateForm
.
options
=
characteristics
.
options
}
return
true
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论