Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
ca9e6bc6
提交
ca9e6bc6
authored
3月 23, 2023
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
6d3b4f84
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
201 行增加
和
10 行删除
+201
-10
.eslintrc-auto-import.json
.eslintrc-auto-import.json
+0
-1
auto-imports.d.ts
auto-imports.d.ts
+2
-6
api.ts
src/modules/home/api.ts
+17
-0
Index.vue
src/modules/home/views/Index.vue
+181
-2
Setting.vue
src/modules/trip/template/views/Setting.vue
+1
-1
没有找到文件。
.eslintrc-auto-import.json
浏览文件 @
ca9e6bc6
...
@@ -115,7 +115,6 @@
...
@@ -115,7 +115,6 @@
"useArrayFilter"
:
true
,
"useArrayFilter"
:
true
,
"useArrayFind"
:
true
,
"useArrayFind"
:
true
,
"useArrayFindIndex"
:
true
,
"useArrayFindIndex"
:
true
,
"useArrayFindLast"
:
true
,
"useArrayJoin"
:
true
,
"useArrayJoin"
:
true
,
"useArrayMap"
:
true
,
"useArrayMap"
:
true
,
"useArrayReduce"
:
true
,
"useArrayReduce"
:
true
,
...
...
auto-imports.d.ts
浏览文件 @
ca9e6bc6
/* eslint-disable */
// Generated by 'unplugin-auto-import'
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-auto-import
export
{}
export
{}
declare
global
{
declare
global
{
const
$$
:
typeof
import
(
'vue/macros'
)[
'$$'
]
const
$$
:
typeof
import
(
'vue/macros'
)[
'$$'
]
...
@@ -112,7 +109,6 @@ declare global {
...
@@ -112,7 +109,6 @@ declare global {
const
useArrayFilter
:
typeof
import
(
'@vueuse/core'
)[
'useArrayFilter'
]
const
useArrayFilter
:
typeof
import
(
'@vueuse/core'
)[
'useArrayFilter'
]
const
useArrayFind
:
typeof
import
(
'@vueuse/core'
)[
'useArrayFind'
]
const
useArrayFind
:
typeof
import
(
'@vueuse/core'
)[
'useArrayFind'
]
const
useArrayFindIndex
:
typeof
import
(
'@vueuse/core'
)[
'useArrayFindIndex'
]
const
useArrayFindIndex
:
typeof
import
(
'@vueuse/core'
)[
'useArrayFindIndex'
]
const
useArrayFindLast
:
typeof
import
(
'@vueuse/core'
)[
'useArrayFindLast'
]
const
useArrayJoin
:
typeof
import
(
'@vueuse/core'
)[
'useArrayJoin'
]
const
useArrayJoin
:
typeof
import
(
'@vueuse/core'
)[
'useArrayJoin'
]
const
useArrayMap
:
typeof
import
(
'@vueuse/core'
)[
'useArrayMap'
]
const
useArrayMap
:
typeof
import
(
'@vueuse/core'
)[
'useArrayMap'
]
const
useArrayReduce
:
typeof
import
(
'@vueuse/core'
)[
'useArrayReduce'
]
const
useArrayReduce
:
typeof
import
(
'@vueuse/core'
)[
'useArrayReduce'
]
...
@@ -280,5 +276,5 @@ declare global {
...
@@ -280,5 +276,5 @@ declare global {
// for type re-export
// for type re-export
declare
global
{
declare
global
{
// @ts-ignore
// @ts-ignore
export
type
{
Component
,
ComponentPublicInstance
,
ComputedRef
,
InjectionKey
,
PropType
,
Ref
,
VNode
}
from
'vue'
export
type
{
Component
,
ComponentPublicInstance
,
ComputedRef
,
InjectionKey
,
PropType
,
Ref
,
VNode
}
from
'vue'
}
}
src/modules/home/api.ts
0 → 100644
浏览文件 @
ca9e6bc6
import
httpRequest
from
'@/utils/axios'
// 左侧实验数据
export
function
getExperimentData
()
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/index/index'
)
}
// 用户
export
function
getMembersList
()
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/index/members'
)
}
// 事件
export
function
getEventList
(
params
:
{
member_id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/index/events'
,
{
params
})
}
\ No newline at end of file
src/modules/home/views/Index.vue
浏览文件 @
ca9e6bc6
<
script
setup
lang=
"ts"
></
script
>
<
script
setup
lang=
"ts"
>
import
{
getExperimentData
,
getMembersList
,
getEventList
}
from
'../api'
let
leftData
=
$ref
<
{
members
:
string
tags
:
string
groups
:
string
files
:
string
itineraries
:
string
connections
:
string
}
>
()
getExperimentData
().
then
(
res
=>
{
leftData
=
res
.
data
})
let
userList
=
$ref
<
{
name
:
string
;
id
:
string
;
isActive
:
boolean
}[]
>
()
getMembersList
().
then
(
res
=>
{
userList
=
res
.
data
.
map
((
element
:
any
,
index
:
number
)
=>
{
element
.
isActive
=
index
===
0
return
element
})
if
(
userList
)
getEvent
(
userList
[
0
]?.
id
)
})
let
eventData
=
$ref
<
{
list
:
any
}
>
()
const
handleUser
=
(
item
:
any
)
=>
{
userList
?.
map
(
item
=>
(
item
.
isActive
=
false
&&
item
))
item
.
isActive
=
true
getEvent
(
item
.
id
)
}
const
getEvent
=
function
(
id
:
string
)
{
getEventList
({
member_id
:
id
}).
then
(
res
=>
{
eventData
=
res
.
data
})
}
// 获取上下午
const
getDate
=
function
(
date
:
string
)
{
return
parseInt
(
date
.
slice
(
date
.
indexOf
(
' '
),
date
.
indexOf
(
' '
)
+
3
))
>
12
?
'下午'
:
'上午'
}
</
script
>
<
template
>
<
template
>
<div></div>
<div
class=
"home"
>
<div
class=
"home-left_content"
>
<div
class=
"content-card"
>
<AppCard
class=
"card"
title=
"我的客户:"
><p>
{{
leftData
?.
members
}}
</p></AppCard
>
<AppCard
class=
"card"
style=
"margin: 0 10px"
title=
"我的标签:"
><p>
{{
leftData
?.
tags
}}
</p></AppCard
>
<AppCard
class=
"card"
title=
"我的群组:"
><p>
{{
leftData
?.
groups
}}
</p></AppCard
>
</div>
<div
class=
"content-card"
>
<AppCard
class=
"card"
title=
"我的营销资料:"
><p>
{{
leftData
?.
files
}}
</p></AppCard
>
<AppCard
class=
"card"
style=
"margin: 0 10px"
title=
"我的旅程:"
><p>
{{
leftData
?.
itineraries
}}
</p></AppCard
>
<AppCard
class=
"card"
title=
"我的链接:"
><p>
{{
leftData
?.
connections
}}
</p></AppCard
>
</div>
<AppCard
title=
"当前用户旅程模板数量:"
><el-empty
:image-size=
"120"
/></AppCard>
<AppCard
title=
"旅程转化目标分析:"
><el-empty
:image-size=
"120"
/></AppCard>
</div>
<div
class=
"home-right_content"
>
<AppCard
class=
"card"
title=
"最近活跃用户跟踪"
>
<div
class=
"content-user"
>
<div
:class=
"item.isActive ? 'content-user_item active' : 'content-user_item'"
v-for=
"item in userList"
@
click=
"handleUser(item)"
>
<img
src=
"https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/dml_boy.png"
/>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
</div>
</div>
<el-empty
v-if=
"!eventData?.list || !eventData?.list.length"
description=
"暂无数据"
:image-size=
"80"
/>
<div
class=
"event-box"
v-for=
"item in eventData?.list"
v-else
>
<div
class=
"date"
>
{{
item
.
updated_time
?.
slice
(
0
,
item
.
updated_time
.
indexOf
(
' '
))
}}
</div>
<div
class=
"event-content"
>
<div
class=
"time"
>
{{
item
.
updated_time
?.
slice
(
item
.
updated_time
.
indexOf
(
' '
),
item
.
updated_time
.
length
-
3
)
}}
{{
getDate
(
item
.
updated_time
)
}}
</div>
<Icon
class=
"icon"
:name=
"item.connection_type"
w=
"30"
h=
"30"
></Icon>
<div
class=
"event"
>
在
<span>
"
{{
item
.
connection_name
}}
"
</span>
上
<span>
"
{{
item
.
event_name
}}
"
</span>
</div>
</div>
</div>
</AppCard>
</div>
</div>
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
>
.home
{
display
:
flex
;
.home-left_content
{
flex
:
1
;
.content-card
{
display
:
flex
;
margin-bottom
:
10px
;
.card
{
flex
:
1
;
margin
:
0
;
p
{
line-height
:
100px
;
text-align
:
center
;
font-size
:
28px
;
color
:
#aa1941
;
}
}
}
}
.home-right_content
{
width
:
40%
;
margin-left
:
10px
;
.card
{
height
:
100%
;
.content-user
{
background
:
#efefef
;
padding
:
20px
;
border-radius
:
5px
;
display
:
flex
;
flex-wrap
:
wrap
;
.content-user_item
{
width
:
60px
;
// background-color: #fff;
padding
:
10px
;
border-radius
:
10px
;
margin-right
:
12px
;
cursor
:
pointer
;
&
.active
{
background-color
:
#fff
;
}
}
img
{
width
:
50px
;
height
:
50px
;
margin
:
0
auto
;
display
:
block
;
}
.name
{
text-align
:
center
;
font-size
:
14px
;
margin-top
:
10px
;
}
}
}
}
}
.event-box
{
border-bottom
:
1px
solid
#ccc
;
padding
:
20px
0
5px
;
.date
{
font-size
:
14px
;
}
}
.event-content
{
display
:
flex
;
font-size
:
12px
;
align-items
:
center
;
// margin-bottom: 20px;
flex-wrap
:
wrap
;
.time
{
color
:
#ccc
;
}
.icon
{
margin
:
0
5px
;
}
span
{
color
:
#ba143e
;
font-weight
:
bold
;
}
}
</
style
>
src/modules/trip/template/views/Setting.vue
浏览文件 @
ca9e6bc6
...
@@ -96,7 +96,7 @@ function handleConfig() {
...
@@ -96,7 +96,7 @@ function handleConfig() {
</el-row>
</el-row>
</el-form>
</el-form>
</el-card>
</el-card>
<TripFlow
v-model=
"elements"
action=
"
edit
"
role=
"teacher"
:templateType=
"detail?.type"
:score=
"score"
>
<TripFlow
v-model=
"elements"
action=
"
view
"
role=
"teacher"
:templateType=
"detail?.type"
:score=
"score"
>
<template
#
left-panel
>
<template
#
left-panel
>
<TripFlowSidebar
:connectionIds=
"connectionIds"
/>
<TripFlowSidebar
:connectionIds=
"connectionIds"
/>
</
template
>
</
template
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论