Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
84f37b52
提交
84f37b52
authored
11月 19, 2024
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
7b1d6b14
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
87 行增加
和
86 行删除
+87
-86
ViewExamFormDialog.vue
...es/admin/lab/experiment/components/ViewExamFormDialog.vue
+87
-86
没有找到文件。
src/modules/admin/lab/experiment/components/ViewExamFormDialog.vue
浏览文件 @
84f37b52
const experimentConfig: any = [
<
script
setup
lang=
"ts"
>
{
import
type
{
FormInstance
,
FormRules
}
from
'element-plus'
id: 1,
import
{
ElMessage
}
from
'element-plus'
name: '基础配置',
import
{
pick
}
from
'lodash-es'
is_checked: true,
import
{
updateExam
,
getAllExamList
}
from
'../api'
pid: 0,
children: [
interface
Props
{
{ id: 2, name: '连接管理', is_checked: true, pid: 1, children: [] },
id
:
string
{ id: 3, name: '用户属性管理', is_checked: true, pid: 1, children: [] },
data
?:
any
{ id: 4, name: '事件属性管理', is_checked: true, pid: 1, children: [] }
type
:
string
]
}
},
const
props
=
defineProps
<
Props
>
()
{
id: 5,
const
emit
=
defineEmits
<
{
name: '营销策划',
(
e
:
'update'
):
void
is_checked: true,
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
pid: 0,
}
>
()
children: []
},
const
formRef
=
ref
<
FormInstance
>
()
{
const
form
=
reactive
<
any
>
({
id: 6,
experiment_id
:
props
.
id
,
name: '用户画像',
exam_id
:
''
is_checked: true,
})
pid: 0,
watchEffect
(()
=>
{
children: []
if
(
!
props
.
data
)
return
},
Object
.
assign
(
form
,
props
.
data
)
{
})
id: 7,
name: '用户识别',
const
rules
=
ref
<
FormRules
>
({
is_checked: true,
exam_id
:
[{
required
:
true
,
message
:
'请选择考试'
,
trigger
:
'change'
}]
pid: 0,
})
children: [
const
isUpdate
=
$computed
(()
=>
{
{ id: 8, name: '标签管理', is_checked: true, pid: 7, children: [] },
return
!!
props
.
data
?.
id
{ id: 9, name: '群组管理', is_checked: true, pid: 7, children: [] }
})
]
const
title
=
computed
(()
=>
{
},
return
isUpdate
?
'编辑理论考试'
:
'新增理论考试'
{
})
id: 10,
name: '营销内容设计',
const
examList
=
ref
<
Record
<
string
,
any
>
[]
>
([])
is_checked: true,
// 获取关联考试列表
pid: 0,
function
fetchExamList
()
{
children: [
getAllExamList
({
project
:
'x1'
,
'per-page'
:
1000
}).
then
(
res
=>
{
{ id: 11, name: '文本资料管理', is_checked: true, pid: 10, children: [] },
examList
.
value
=
res
.
data
.
list
||
[]
{ id: 12, name: '图片资料管理', is_checked: true, pid: 10, children: [] },
})
{ id: 13, name: '卡券资料管理', is_checked: true, pid: 10, children: [] },
}
{ id: 14, name: '视频资料管理', is_checked: true, pid: 10, children: [] },
onMounted
(()
=>
{
{ id: 15, name: 'H5资料管理', is_checked: true, pid: 10, children: [] },
fetchExamList
()
{ id: 16, name: '二维码资料管理', is_checked: true, pid: 10, children: [] },
})
{ id: 17, name: '语言资料管理', is_checked: true, pid: 10, children: [] },
// 提交
{ id: 18, name: '小程序资料管理', is_checked: true, pid: 10, children: [] }
function
handleSubmit
()
{
]
formRef
.
value
?.
validate
().
then
(()
=>
{
},
const
params
=
Object
.
assign
({
type
:
props
.
type
},
pick
(
form
,
[
'experiment_id'
,
'exam_id'
]))
{
isUpdate
?
handleUpdate
(
params
)
:
handleUpdate
(
params
)
id: 19,
})
name: '自动化营销',
}
is_checked: true,
pid: 0,
// 修改
children: []
function
handleUpdate
(
params
:
any
)
{
},
params
.
id
=
props
.
data
?.
id
{
updateExam
(
params
).
then
(()
=>
{
id: 20,
ElMessage
({
message
:
'修改成功'
,
type
:
'success'
})
name: '直播带货',
emit
(
'update'
)
is_checked: true,
emit
(
'update:modelValue'
,
false
)
pid: 0,
})
children: [
}
{ id: 21, name: '商品品类管理', is_checked: true, pid: 20, children: [] },
</
script
>
{ id: 22, name: '商品属性管理', is_checked: true, pid: 20, children: [] },
{ id: 23, name: '商品管理', is_checked: true, pid: 20, children: [] },
<
template
>
{ id: 24, name: '直播练习', is_checked: true, pid: 20, children: [] },
<el-dialog
{ id: 25, name: '直播话术管理', is_checked: true, pid: 20, children: [] }
:title=
"title"
]
:close-on-click-modal=
"false"
},
width=
"600px"
{
@
update:modelValue=
"value => $emit('update:modelValue', value)"
id: 26,
>
name: '数据分析',
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-width=
"90px"
>
is_checked: true,
<el-form-item
label=
"考试名称"
prop=
"exam_id"
>
pid: 0,
<el-select
v-model=
"form.exam_id"
filterable
style=
"width: 100%"
>
children: [
<el-option
v-for=
"item in examList"
:key=
"item.exam_id"
:label=
"item.name"
:value=
"item.exam_id"
></el-option>
{ id: 27, name: '用户分析', is_checked: true, pid: 26, children: [] },
</el-select>
{ id: 28, name: '标签群组分析', is_checked: true, pid: 26, children: [] },
</el-form-item>
{ id: 29, name: '事件分析', is_checked: true, pid: 26, children: [] },
<el-row
justify=
"center"
>
{ id: 30, name: '营销分析', is_checked: true, pid: 26, children: [] }
<el-button
type=
"primary"
round
auto-insert-space
@
click=
"handleSubmit"
>
保存
</el-button>
]
<el-button
round
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
取消
</el-button>
}
</el-row>
]
</el-form>
\ No newline at end of file
</el-dialog>
</
template
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论