Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
becb8546
提交
becb8546
authored
2月 23, 2023
作者:
lihuihui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitlab-pro.ezijing.com/ezijing-web/saas-dml
上级
3112c6ea
83538c98
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
176 行增加
和
45 行删除
+176
-45
index.html
index.html
+1
-0
base.ts
src/api/base.ts
+12
-7
Aside.vue
src/components/layout/Aside.vue
+50
-32
EventRule.vue
src/components/rule/EventRule.vue
+0
-0
useAllData.ts
src/composables/useAllData.ts
+3
-3
api.ts
src/modules/trip/template/api.ts
+15
-0
index.ts
src/modules/trip/template/index.ts
+4
-1
Index.vue
src/modules/trip/template/views/Index.vue
+8
-2
Setting.vue
src/modules/trip/template/views/Setting.vue
+83
-0
没有找到文件。
index.html
浏览文件 @
becb8546
...
...
@@ -5,6 +5,7 @@
<link
rel=
"icon"
href=
"https://zws-imgs-pub.ezijing.com/pc/base/favicon.ico"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
数字营销实验室DML
</title>
<script
src=
"https://webapp-pub.ezijing.com/screenshot.js"
async
></script>
</head>
<body>
<div
id=
"app"
></div>
...
...
src/api/base.ts
浏览文件 @
becb8546
...
...
@@ -45,12 +45,12 @@ export function updateUploadVideoAuth(data: { source_id: string }) {
}
// 获取实验下的所有用户属性
export
function
getMetaUserAttrList
()
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/meta-member/all'
)
export
function
getMetaUserAttrList
(
params
?:
{
check_role
?:
boolean
}
)
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/meta-member/all'
,
{
params
}
)
}
// 获取实验下的所有事件
export
function
getMetaEventList
()
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/meta-event/all'
)
export
function
getMetaEventList
(
params
?:
{
check_role
?:
boolean
}
)
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/meta-event/all'
,
{
params
}
)
}
// 获取实验下的所有标签
...
...
@@ -79,11 +79,17 @@ export function updateMaterial(data: { name: string; content: string; status: st
}
// 资料列表
export
function
getMaterialList
(
params
?:
{
name
:
string
;
type
:
string
;
id
:
string
;
status
:
string
;
updated_operator
:
string
})
{
export
function
getMaterialList
(
params
?:
{
name
:
string
type
:
string
id
:
string
status
:
string
updated_operator
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/marketing-material/list'
,
{
params
})
}
// 删除资料
export
function
deleteMaterial
(
data
:
{
id
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/marketing-material/delete'
,
data
)
}
\ No newline at end of file
}
src/components/layout/Aside.vue
浏览文件 @
becb8546
...
...
@@ -39,25 +39,32 @@ function findMenu(path: string, menus: IMenuItem[]) {
<nav
class=
"menu"
>
<ul>
<li
v-for=
"item in menus"
:key=
"item.path"
:class=
"
{ 'is-active': item.path === currentMenu?.path }">
<el-tooltip
:content=
"item.name"
placement=
"right"
>
<RouterLink
:to=
"item.path"
>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
</RouterLink>
</el-tooltip>
</li>
</ul>
</nav>
<nav
class=
"submenu"
v-if=
"currentMenu?.children?.length"
>
<h1
class=
"submenu-title"
>
{{
currentMenu
.
name
}}
</h1>
<ul>
<li
v-for=
"item in currentMenu.children"
:key=
"item.path"
:class=
"
{ 'is-active': item.path === currentSubmenu?.path }">
<RouterLink
:to=
"item.path"
>
<component
:is=
"item.icon"
class=
"submenu-icon"
v-if=
"item.icon"
></component>
{{
item
.
name
}}
</RouterLink>
<div
class=
"menu-item"
>
<template
v-if=
"item.children"
>
<RouterLink
:to=
"item.path"
>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
</RouterLink>
</
template
>
<el-tooltip
:content=
"item.name"
placement=
"right"
v-else
>
<RouterLink
:to=
"item.path"
>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
</RouterLink>
</el-tooltip>
</div>
<nav
class=
"submenu"
v-if=
"item.children"
>
<h1
class=
"submenu-title"
>
{{ item.name }}
</h1>
<ul>
<li
v-for=
"submenu in item.children"
:key=
"submenu.path"
:class=
"{ 'is-active': submenu.path === currentSubmenu?.path }"
>
<RouterLink
:to=
"submenu.path"
>
<component
:is=
"submenu.icon"
class=
"submenu-icon"
v-if=
"submenu.icon"
></component>
{{ submenu.name }}
</RouterLink>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
...
...
@@ -70,18 +77,16 @@ function findMenu(path: string, menus: IMenuItem[]) {
top
:
0
;
display
:
flex
;
height
:
100vh
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
//
overflow-x: hidden;
//
overflow-y: auto;
box-sizing
:
content-box
;
z-index
:
2001
;
.menu
{
width
:
60px
;
height
:
100%
;
background
:
#fff
;
box-sizing
:
border-box
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
li
{
margin
:
8px
;
.menu-item
{
height
:
44px
;
text-align
:
center
;
border-radius
:
4px
;
...
...
@@ -90,20 +95,33 @@ function findMenu(path: string, menus: IMenuItem[]) {
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
svg
{
fill
:
var
(
--
main-color
);
}
}
svg
{
fill
:
var
(
--
main-color
);
}
}
>
ul
>
li
{
padding
:
8px
;
&
.is-active
{
background-color
:
var
(
--
main-color
);
svg
{
fill
:
#fff
;
.menu-item
{
background-color
:
var
(
--
main-color
);
svg
{
fill
:
#fff
;
}
}
}
&
:hover
{
.submenu
{
display
:
block
;
}
}
}
}
.submenu
{
display
:
none
;
position
:
absolute
;
left
:
100%
;
top
:
0
;
width
:
200px
;
height
:
100vh
;
background
:
#efefef
;
...
...
src/components/rule/EventRule.vue
浏览文件 @
becb8546
差异被折叠。
点击展开。
src/composables/useAllData.ts
浏览文件 @
becb8546
...
...
@@ -37,7 +37,7 @@ export interface ConnectionType {
const
userAttrList
=
ref
<
AttrType
[]
>
([])
export
function
useUserAttr
()
{
function
fetchUserAttrList
()
{
getMetaUserAttrList
().
then
((
res
:
any
)
=>
{
getMetaUserAttrList
(
{
check_role
:
true
}
).
then
((
res
:
any
)
=>
{
userAttrList
.
value
=
res
.
data
.
items
})
}
...
...
@@ -51,7 +51,7 @@ export function useUserAttr() {
const
metaEventList
=
ref
<
MetaEventType
[]
>
([])
export
function
useMetaEvent
()
{
function
fetchMetaEventList
()
{
getMetaEventList
().
then
((
res
:
any
)
=>
{
getMetaEventList
(
{
check_role
:
true
}
).
then
((
res
:
any
)
=>
{
metaEventList
.
value
=
res
.
data
.
items
})
}
...
...
@@ -75,7 +75,7 @@ export function useTag() {
return
{
fetchTagList
,
tagList
}
}
// 所有
标签
// 所有
连接
const
connectionList
=
ref
<
ConnectionType
[]
>
([])
export
function
useConnection
()
{
function
fetchConnectionList
()
{
...
...
src/modules/trip/template/api.ts
浏览文件 @
becb8546
...
...
@@ -25,3 +25,18 @@ export function getTripConnections(params: { itinerary_id: string }) {
export
function
bindTripConnections
(
data
:
{
itinerary_id
:
string
;
connection_ids
:
string
[]
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/itinerary/bind-connections'
,
data
)
}
// 获取旅程模板详情
export
function
getTripTemplate
(
params
:
{
id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/itinerary/detail'
,
{
params
})
}
// 获取旅程模板demo
export
function
getTripTemplateDemo
(
params
:
{
itinerary_id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/itinerary/get-itinerary-demo'
,
{
params
})
}
// 更新旅程模板demo
export
function
updateTripTemplateDemo
(
data
:
{
itinerary_id
:
string
;
graph
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/itinerary/save-itinerary-demo'
,
data
)
}
src/modules/trip/template/index.ts
浏览文件 @
becb8546
...
...
@@ -5,7 +5,10 @@ const routes: RouteRecordRaw[] = [
{
path
:
'/trip/template'
,
component
:
Layout
,
children
:
[{
path
:
''
,
component
:
()
=>
import
(
'./views/Index.vue'
)
}]
children
:
[
{
path
:
''
,
component
:
()
=>
import
(
'./views/Index.vue'
)
},
{
path
:
':id'
,
component
:
()
=>
import
(
'./views/Setting.vue'
),
props
:
true
}
]
}
]
...
...
src/modules/trip/template/views/Index.vue
浏览文件 @
becb8546
...
...
@@ -85,9 +85,15 @@ function handleView(row: TripTemplate) {
// 配置
let
configVisible
=
$ref
(
false
)
const
router
=
useRouter
()
function
handleConfig
(
row
:
TripTemplate
)
{
currentRow
=
row
configVisible
=
true
// 自由旅程
if
(
row
.
type
===
'2'
)
{
router
.
push
(
`/trip/template/
${
row
.
id
}
`
)
}
else
{
currentRow
=
row
configVisible
=
true
}
}
</
script
>
...
...
src/modules/trip/template/views/Setting.vue
0 → 100644
浏览文件 @
becb8546
<
script
setup
lang=
"ts"
>
import
type
{
TripTemplate
}
from
'../types'
import
{
ElMessage
}
from
'element-plus'
import
TripFlow
from
'@/components/flow/Index.vue'
import
{
getTripTemplate
,
getTripTemplateDemo
,
updateTripTemplateDemo
}
from
'../api'
import
{
useMapStore
}
from
'@/stores/map'
import
{
getNameByValue
,
tripTemplateTypeList
}
from
'@/utils/dictionary'
const
props
=
defineProps
<
{
id
:
string
}
>
()
const
statusList
=
useMapStore
().
getMapValuesByKey
(
'system_status'
)
const
detail
=
ref
<
TripTemplate
>
()
function
fetchInfo
()
{
getTripTemplate
({
id
:
props
.
id
}).
then
(
res
=>
{
detail
.
value
=
res
.
data
.
detail
})
}
onMounted
(()
=>
fetchInfo
())
const
elements
=
ref
([])
// 获取模板配置数据
function
fetchDemo
()
{
getTripTemplateDemo
({
itinerary_id
:
props
.
id
}).
then
(
res
=>
{
try
{
elements
.
value
=
JSON
.
parse
(
res
.
data
.
graph
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
})
}
onMounted
(()
=>
fetchDemo
())
// 保存
function
handleSubmit
()
{
const
params
=
{
itinerary_id
:
props
.
id
,
graph
:
JSON
.
stringify
(
elements
.
value
)
}
updateTripTemplateDemo
(
params
).
then
(()
=>
{
ElMessage
.
success
(
'保存成功'
)
})
}
</
script
>
<
template
>
<AppCard
title=
"固定旅程模版配置"
>
<el-card
shadow=
"never"
style=
"margin-bottom: 20px"
v-if=
"detail"
>
<el-form
label-suffix=
":"
>
<el-row
justify=
"space-between"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"旅程模版名称"
>
{{
detail
.
name
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"模板类型"
>
{{
getNameByValue
(
detail
.
type
,
tripTemplateTypeList
)
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"分值"
>
{{
detail
.
score
}}
</el-form-item>
</el-col>
</el-row>
<el-row
justify=
"space-between"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"更新人"
>
{{
detail
.
updated_operator
.
real_name
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"更新时间"
>
{{
detail
.
updated_time
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"状态"
>
<el-tag
:type=
"detail.status === '1' ? 'success' : 'danger'"
>
{{
getNameByValue
(
detail
.
status
,
statusList
)
}}
</el-tag>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<TripFlow
v-model=
"elements"
action=
"edit"
role=
"teacher"
style=
"height: 80vh"
>
<template
#
footer
>
<el-row
justify=
"center"
>
<el-button
type=
"primary"
auto-insert-space
@
click=
"handleSubmit"
>
保存
</el-button>
</el-row>
</
template
>
</TripFlow>
</AppCard>
</template>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论