Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
c176eca2
提交
c176eca2
authored
12月 10, 2024
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
f306aada
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
76 行增加
和
46 行删除
+76
-46
CopyDialog.vue
src/modules/admin/lab/experiment/components/CopyDialog.vue
+8
-8
DMLFormDialog.vue
...modules/admin/lab/experiment/components/DMLFormDialog.vue
+67
-37
FormDialog.vue
src/modules/admin/lab/experiment/components/FormDialog.vue
+1
-1
没有找到文件。
src/modules/admin/lab/experiment/components/CopyDialog.vue
浏览文件 @
c176eca2
...
@@ -3,7 +3,7 @@ import type { FormInstance } from 'element-plus'
...
@@ -3,7 +3,7 @@ import type { FormInstance } from 'element-plus'
import
type
{
ExperimentItem
}
from
'../types'
import
type
{
ExperimentItem
}
from
'../types'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
copyExperiment
}
from
'../api'
import
{
copyExperiment
}
from
'../api'
import
{
useGetProjectList
}
from
'@/composables/useGetProjectList'
//
import { useGetProjectList } from '@/composables/useGetProjectList'
import
{
useGetTeacherList
}
from
'../composables/useGetTeacherList'
import
{
useGetTeacherList
}
from
'../composables/useGetTeacherList'
import
{
pickBy
}
from
'lodash-es'
import
{
pickBy
}
from
'lodash-es'
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
...
@@ -31,7 +31,7 @@ onMounted(() => {
...
@@ -31,7 +31,7 @@ onMounted(() => {
})
})
// 机构列表
// 机构列表
const
{
organizations
}
=
useGetProjectList
()
//
const { organizations } = useGetProjectList()
// 指导教师列表
// 指导教师列表
const
{
teachers
,
updateTeachers
}
=
useGetTeacherList
()
const
{
teachers
,
updateTeachers
}
=
useGetTeacherList
()
...
@@ -42,9 +42,9 @@ watch(
...
@@ -42,9 +42,9 @@ watch(
}
}
)
)
function
handleOrgChange
()
{
//
function handleOrgChange() {
form
.
sso_id
=
''
//
form.sso_id = ''
}
//
}
async
function
handleSubmit
()
{
async
function
handleSubmit
()
{
formRef
.
value
?.
validate
().
then
(
async
()
=>
{
formRef
.
value
?.
validate
().
then
(
async
()
=>
{
...
@@ -63,13 +63,13 @@ async function handleSubmit() {
...
@@ -63,13 +63,13 @@ async function handleSubmit() {
<el-form-item
label=
"实验名称"
prop=
"experiment_name"
>
<el-form-item
label=
"实验名称"
prop=
"experiment_name"
>
<el-input
v-model=
"form.experiment_name"
/>
<el-input
v-model=
"form.experiment_name"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"实验所属部门/学校"
prop=
"organ_id"
>
<
!--
<
el-form-item
label=
"实验所属部门/学校"
prop=
"organ_id"
>
<el-select
v-model=
"form.organ_id"
style=
"width: 100%"
@
change=
"handleOrgChange"
clearable
>
<el-select
v-model=
"form.organ_id"
style=
"width: 100%"
@
change=
"handleOrgChange"
clearable
>
<el-option
v-for=
"item in organizations"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in organizations"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"指导老师"
prop=
"sso_id"
>
<el-form-item
label=
"指导老师"
prop=
"sso_id"
>
<el-select
v-model=
"form.sso_id"
style=
"width: 100%"
clearable
>
<el-select
filterable
v-model=
"form.sso_id"
style=
"width: 100%"
clearable
>
<el-option
v-for=
"item in teachers"
:key=
"item.id"
:label=
"item.name"
:value=
"item.sso_id"
></el-option>
<el-option
v-for=
"item in teachers"
:key=
"item.id"
:label=
"item.name"
:value=
"item.sso_id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
...
src/modules/admin/lab/experiment/components/DMLFormDialog.vue
浏览文件 @
c176eca2
...
@@ -33,84 +33,84 @@ const experimentConfig: any = [
...
@@ -33,84 +33,84 @@ const experimentConfig: any = [
{
{
id
:
1
,
id
:
1
,
name
:
'基础配置'
,
name
:
'基础配置'
,
is_checked
:
tru
e
,
is_checked
:
fals
e
,
pid
:
0
,
pid
:
0
,
children
:
[
children
:
[
{
id
:
2
,
name
:
'连接管理'
,
is_checked
:
tru
e
,
pid
:
1
,
children
:
[]
},
{
id
:
2
,
name
:
'连接管理'
,
is_checked
:
fals
e
,
pid
:
1
,
children
:
[]
},
{
id
:
3
,
name
:
'用户属性管理'
,
is_checked
:
tru
e
,
pid
:
1
,
children
:
[]
},
{
id
:
3
,
name
:
'用户属性管理'
,
is_checked
:
fals
e
,
pid
:
1
,
children
:
[]
},
{
id
:
4
,
name
:
'事件属性管理'
,
is_checked
:
tru
e
,
pid
:
1
,
children
:
[]
}
{
id
:
4
,
name
:
'事件属性管理'
,
is_checked
:
fals
e
,
pid
:
1
,
children
:
[]
}
]
]
},
},
{
{
id
:
5
,
id
:
5
,
name
:
'营销策划'
,
name
:
'营销策划'
,
is_checked
:
tru
e
,
is_checked
:
fals
e
,
pid
:
0
,
pid
:
0
,
children
:
[]
children
:
[]
},
},
{
{
id
:
6
,
id
:
6
,
name
:
'用户画像'
,
name
:
'用户画像'
,
is_checked
:
tru
e
,
is_checked
:
fals
e
,
pid
:
0
,
pid
:
0
,
children
:
[]
children
:
[]
},
},
{
{
id
:
7
,
id
:
7
,
name
:
'用户识别'
,
name
:
'用户识别'
,
is_checked
:
tru
e
,
is_checked
:
fals
e
,
pid
:
0
,
pid
:
0
,
children
:
[
children
:
[
{
id
:
8
,
name
:
'标签管理'
,
is_checked
:
tru
e
,
pid
:
7
,
children
:
[]
},
{
id
:
8
,
name
:
'标签管理'
,
is_checked
:
fals
e
,
pid
:
7
,
children
:
[]
},
{
id
:
9
,
name
:
'群组管理'
,
is_checked
:
tru
e
,
pid
:
7
,
children
:
[]
}
{
id
:
9
,
name
:
'群组管理'
,
is_checked
:
fals
e
,
pid
:
7
,
children
:
[]
}
]
]
},
},
{
{
id
:
10
,
id
:
10
,
name
:
'营销内容设计'
,
name
:
'营销内容设计'
,
is_checked
:
tru
e
,
is_checked
:
fals
e
,
pid
:
0
,
pid
:
0
,
children
:
[
children
:
[
{
id
:
11
,
name
:
'文本资料管理'
,
is_checked
:
tru
e
,
pid
:
10
,
children
:
[]
},
{
id
:
11
,
name
:
'文本资料管理'
,
is_checked
:
fals
e
,
pid
:
10
,
children
:
[]
},
{
id
:
12
,
name
:
'图片资料管理'
,
is_checked
:
tru
e
,
pid
:
10
,
children
:
[]
},
{
id
:
12
,
name
:
'图片资料管理'
,
is_checked
:
fals
e
,
pid
:
10
,
children
:
[]
},
{
id
:
13
,
name
:
'卡券资料管理'
,
is_checked
:
tru
e
,
pid
:
10
,
children
:
[]
},
{
id
:
13
,
name
:
'卡券资料管理'
,
is_checked
:
fals
e
,
pid
:
10
,
children
:
[]
},
{
id
:
14
,
name
:
'视频资料管理'
,
is_checked
:
tru
e
,
pid
:
10
,
children
:
[]
},
{
id
:
14
,
name
:
'视频资料管理'
,
is_checked
:
fals
e
,
pid
:
10
,
children
:
[]
},
{
id
:
15
,
name
:
'H5资料管理'
,
is_checked
:
tru
e
,
pid
:
10
,
children
:
[]
},
{
id
:
15
,
name
:
'H5资料管理'
,
is_checked
:
fals
e
,
pid
:
10
,
children
:
[]
},
{
id
:
16
,
name
:
'二维码资料管理'
,
is_checked
:
tru
e
,
pid
:
10
,
children
:
[]
},
{
id
:
16
,
name
:
'二维码资料管理'
,
is_checked
:
fals
e
,
pid
:
10
,
children
:
[]
},
{
id
:
17
,
name
:
'语言资料管理'
,
is_checked
:
tru
e
,
pid
:
10
,
children
:
[]
},
{
id
:
17
,
name
:
'语言资料管理'
,
is_checked
:
fals
e
,
pid
:
10
,
children
:
[]
},
{
id
:
18
,
name
:
'小程序资料管理'
,
is_checked
:
tru
e
,
pid
:
10
,
children
:
[]
}
{
id
:
18
,
name
:
'小程序资料管理'
,
is_checked
:
fals
e
,
pid
:
10
,
children
:
[]
}
]
]
},
},
{
{
id
:
19
,
id
:
19
,
name
:
'自动化营销'
,
name
:
'自动化营销'
,
is_checked
:
tru
e
,
is_checked
:
fals
e
,
pid
:
0
,
pid
:
0
,
children
:
[]
children
:
[]
},
},
{
{
id
:
20
,
id
:
20
,
name
:
'直播带货'
,
name
:
'直播带货'
,
is_checked
:
tru
e
,
is_checked
:
fals
e
,
pid
:
0
,
pid
:
0
,
children
:
[
children
:
[
{
id
:
21
,
name
:
'商品品类管理'
,
is_checked
:
tru
e
,
pid
:
20
,
children
:
[]
},
{
id
:
21
,
name
:
'商品品类管理'
,
is_checked
:
fals
e
,
pid
:
20
,
children
:
[]
},
{
id
:
22
,
name
:
'商品属性管理'
,
is_checked
:
tru
e
,
pid
:
20
,
children
:
[]
},
{
id
:
22
,
name
:
'商品属性管理'
,
is_checked
:
fals
e
,
pid
:
20
,
children
:
[]
},
{
id
:
23
,
name
:
'商品管理'
,
is_checked
:
tru
e
,
pid
:
20
,
children
:
[]
},
{
id
:
23
,
name
:
'商品管理'
,
is_checked
:
fals
e
,
pid
:
20
,
children
:
[]
},
{
id
:
24
,
name
:
'直播练习'
,
is_checked
:
tru
e
,
pid
:
20
,
children
:
[]
},
{
id
:
24
,
name
:
'直播练习'
,
is_checked
:
fals
e
,
pid
:
20
,
children
:
[]
},
{
id
:
25
,
name
:
'直播话术管理'
,
is_checked
:
tru
e
,
pid
:
20
,
children
:
[]
}
{
id
:
25
,
name
:
'直播话术管理'
,
is_checked
:
fals
e
,
pid
:
20
,
children
:
[]
}
]
]
},
},
{
{
id
:
26
,
id
:
26
,
name
:
'数据分析'
,
name
:
'数据分析'
,
is_checked
:
tru
e
,
is_checked
:
fals
e
,
pid
:
0
,
pid
:
0
,
children
:
[
children
:
[
{
id
:
27
,
name
:
'用户分析'
,
is_checked
:
tru
e
,
pid
:
26
,
children
:
[]
},
{
id
:
27
,
name
:
'用户分析'
,
is_checked
:
fals
e
,
pid
:
26
,
children
:
[]
},
{
id
:
28
,
name
:
'标签群组分析'
,
is_checked
:
tru
e
,
pid
:
26
,
children
:
[]
},
{
id
:
28
,
name
:
'标签群组分析'
,
is_checked
:
fals
e
,
pid
:
26
,
children
:
[]
},
{
id
:
29
,
name
:
'事件分析'
,
is_checked
:
tru
e
,
pid
:
26
,
children
:
[]
},
{
id
:
29
,
name
:
'事件分析'
,
is_checked
:
fals
e
,
pid
:
26
,
children
:
[]
},
{
id
:
30
,
name
:
'营销分析'
,
is_checked
:
tru
e
,
pid
:
26
,
children
:
[]
}
{
id
:
30
,
name
:
'营销分析'
,
is_checked
:
fals
e
,
pid
:
26
,
children
:
[]
}
]
]
}
}
]
]
...
@@ -138,6 +138,8 @@ const form = reactive({
...
@@ -138,6 +138,8 @@ const form = reactive({
// 模板列表
// 模板列表
let
templateList
=
$ref
<
{
id
:
string
;
name
:
string
}[]
>
([])
let
templateList
=
$ref
<
{
id
:
string
;
name
:
string
}[]
>
([])
const
checked
=
ref
(
false
)
function
fetchInfo
()
{
function
fetchInfo
()
{
getTripConfig
({
experiment_id
:
props
.
data
.
id
}).
then
(
res
=>
{
getTripConfig
({
experiment_id
:
props
.
data
.
id
}).
then
(
res
=>
{
const
data
=
res
.
data
const
data
=
res
.
data
...
@@ -179,6 +181,10 @@ function fetchInfo() {
...
@@ -179,6 +181,10 @@ function fetchInfo() {
},
[]),
},
[]),
is_use_common_live_commodities
:
data
.
is_use_common_live_commodities
is_use_common_live_commodities
:
data
.
is_use_common_live_commodities
})
})
// checked
if
(
data
.
auth_config
.
length
)
{
checked
.
value
=
data
.
auth_config
.
find
((
item
:
any
)
=>
item
.
is_checked
===
false
)
?
false
:
true
}
// form.auth_config = data.auth_config.length > 0 ? data.auth_config : experimentConfig
// form.auth_config = data.auth_config.length > 0 ? data.auth_config : experimentConfig
})
})
}
}
...
@@ -235,10 +241,9 @@ const handleH2Check = (item: any) => {
...
@@ -235,10 +241,9 @@ const handleH2Check = (item: any) => {
return
d
return
d
})
})
}
}
// item.children.map((d: any) => {
setTimeout
(()
=>
{
// d.is_checked = !item.is_checked
checked
.
value
=
form
.
auth_config
.
find
((
item
:
any
)
=>
item
.
is_checked
===
false
)
?
false
:
true
// return d
},
100
)
// })
}
}
const
handleItemCheck
=
(
item
:
any
)
=>
{
const
handleItemCheck
=
(
item
:
any
)
=>
{
...
@@ -248,7 +253,21 @@ const handleItemCheck = (item: any) => {
...
@@ -248,7 +253,21 @@ const handleItemCheck = (item: any) => {
}
else
{
}
else
{
item
.
is_checked
=
true
item
.
is_checked
=
true
}
}
// isCheck === -1 ? (item.is_checked = true) : (item.is_checked = false)
setTimeout
(()
=>
{
checked
.
value
=
isChe
()
},
100
)
function
isChe
()
{
for
(
let
i
=
0
;
i
<
form
.
auth_config
.
length
;
i
++
)
{
if
(
form
.
auth_config
[
i
].
is_checked
===
false
)
{
return
false
}
const
c
=
form
.
auth_config
[
i
].
children
.
findIndex
((
cItem
:
any
)
=>
cItem
.
is_checked
===
false
)
if
(
c
!==
-
1
)
{
return
false
}
}
return
true
}
}
}
// 直播商品列表
// 直播商品列表
...
@@ -256,6 +275,16 @@ const liveList: any = ref([])
...
@@ -256,6 +275,16 @@ const liveList: any = ref([])
getLiveCommodity
({
experiment_id
:
props
.
data
.
id
}).
then
((
res
:
any
)
=>
{
getLiveCommodity
({
experiment_id
:
props
.
data
.
id
}).
then
((
res
:
any
)
=>
{
liveList
.
value
=
res
.
data
?.
items
||
[]
liveList
.
value
=
res
.
data
?.
items
||
[]
})
})
// 功能全选按钮
const
handleSelectAll
=
()
=>
{
form
.
auth_config
.
map
((
item
:
any
)
=>
{
item
.
is_checked
=
!
checked
.
value
item
.
children
.
map
((
cItem
:
any
)
=>
{
cItem
.
is_checked
=
!
checked
.
value
})
})
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -273,6 +302,7 @@ getLiveCommodity({ experiment_id: props.data.id }).then((res: any) => {
...
@@ -273,6 +302,7 @@ getLiveCommodity({ experiment_id: props.data.id }).then((res: any) => {
</el-row>
</el-row>
<el-tabs
v-model=
"step"
tab-position=
"left"
>
<el-tabs
v-model=
"step"
tab-position=
"left"
>
<el-tab-pane
label=
"功能"
:name=
"-1"
>
<el-tab-pane
label=
"功能"
:name=
"-1"
>
<el-checkbox
@
click=
"handleSelectAll"
v-model=
"checked"
label=
"全选"
size=
"large"
/>
<div
class=
"check-ul"
>
<div
class=
"check-ul"
>
<div
class=
"li"
v-for=
"item in form?.auth_config"
:key=
"item?.id"
>
<div
class=
"li"
v-for=
"item in form?.auth_config"
:key=
"item?.id"
>
<div
class=
"check-h2"
>
<div
class=
"check-h2"
>
...
@@ -453,8 +483,8 @@ getLiveCommodity({ experiment_id: props.data.id }).then((res: any) => {
...
@@ -453,8 +483,8 @@ getLiveCommodity({ experiment_id: props.data.id }).then((res: any) => {
>
关闭
</el-button
>
关闭
</el-button
>
>
<el-button
round
auto-insert-space
@
click=
"handlePrev"
v-else
>
上一步
</el-button>
<el-button
round
auto-insert-space
@
click=
"handlePrev"
v-else
>
上一步
</el-button>
<el-button
type=
"primary"
round
auto-insert-space
@
click=
"handleNext"
v-if=
"step
<
2
"
>
下一步
</el-button>
<el-button
type=
"primary"
round
auto-insert-space
@
click=
"handleNext"
v-if=
"step
<
6
"
>
下一步
</el-button>
<el-button
type=
"primary"
round
auto-insert-space
@
click=
"handleSubmit"
v-else
>
保存
</el-button>
<el-button
type=
"primary"
round
auto-insert-space
@
click=
"handleSubmit"
>
保存
</el-button>
</el-row>
</el-row>
</
template
>
</
template
>
</el-dialog>
</el-dialog>
...
...
src/modules/admin/lab/experiment/components/FormDialog.vue
浏览文件 @
c176eca2
...
@@ -138,7 +138,7 @@ function handleUpdate(params: ExperimentCreateItem) {
...
@@ -138,7 +138,7 @@ function handleUpdate(params: ExperimentCreateItem) {
<el-input-number
v-model=
"form.length"
:min=
"1"
:max=
"20"
step-strictly
style=
"width: 100%"
/>
<el-input-number
v-model=
"form.length"
:min=
"1"
:max=
"20"
step-strictly
style=
"width: 100%"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"指导教师"
prop=
"teachers_ids"
>
<el-form-item
label=
"指导教师"
prop=
"teachers_ids"
>
<el-select
v-model=
"form.teachers_ids"
multiple
style=
"width: 100%"
>
<el-select
filterable
v-model=
"form.teachers_ids"
multiple
style=
"width: 100%"
>
<el-option
v-for=
"item in teachers"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in teachers"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论