Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
9c2f47a9
提交
9c2f47a9
authored
2月 28, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
551a1c39
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
313 行增加
和
35 行删除
+313
-35
types.ts
src/components/flow/types.ts
+43
-0
useAllData.ts
src/composables/useAllData.ts
+2
-1
ViewDialog.vue
src/modules/group/components/ViewDialog.vue
+1
-1
api.ts
src/modules/trip/my/api.ts
+11
-0
index.ts
src/modules/trip/my/index.ts
+5
-5
Index.vue
src/modules/trip/my/views/Index.vue
+25
-1
Review.vue
src/modules/trip/my/views/Review.vue
+32
-0
Score.vue
src/modules/trip/my/views/Score.vue
+32
-0
index.ts
src/modules/trip/template/index.ts
+4
-0
Setting.vue
src/modules/trip/template/views/Setting.vue
+1
-1
menu.ts
src/stores/menu.ts
+153
-22
axios.ts
src/utils/axios.ts
+4
-4
没有找到文件。
src/components/flow/types.ts
0 → 100644
浏览文件 @
9c2f47a9
// 组件基础数据
export
interface
ComponentBaseData
{
name
:
string
type
:
string
score
?:
number
answer_analysis
?:
string
}
// 立即触发
export
interface
RealTimeTriggerData
extends
ComponentBaseData
{
trigger_type
:
string
time
:
string
time_rule
?:
string
time_rule_value
?:
string
time_range
?:
[
string
,
string
]
}
// 加入群组
export
interface
JoinGroupData
extends
ComponentBaseData
{
group_id
:
string
}
// 移除群组
export
type
LeaveGroupData
=
JoinGroupData
// 变更属性
export
interface
ChangePropsData
extends
ComponentBaseData
{
attr_id
:
string
operate
:
string
value
:
string
}
// 公众号
export
interface
OffiaccountData
extends
ComponentBaseData
{
operate
:
string
account
:
string
message
:
string
}
// 内部通知
export
interface
NoticeData
extends
ComponentBaseData
{
message
:
string
}
src/composables/useAllData.ts
浏览文件 @
9c2f47a9
...
...
@@ -81,7 +81,8 @@ export function useConnection() {
function
fetchConnectionList
()
{
getConnectionList
().
then
((
res
:
any
)
=>
{
connectionList
.
value
=
res
.
data
.
items
.
map
((
item
:
any
)
=>
{
const
attrs
=
JSON
.
parse
(
item
.
config_attributes
)
const
attrs
=
typeof
item
.
config_attributes
===
'string'
?
JSON
.
parse
(
item
.
config_attributes
)
:
item
.
config_attributes
const
name
=
Array
.
isArray
(
attrs
)
?
attrs
.
find
((
item
:
any
)
=>
item
.
prop
===
'name'
)?.
value
:
attrs
.
name
return
{
...
item
,
config_attributes
:
attrs
,
name
}
})
...
...
src/modules/group/components/ViewDialog.vue
浏览文件 @
9c2f47a9
...
...
@@ -128,7 +128,7 @@ function handleRefresh() {
<dl>
<dt>
更新状态
</dt>
<dd>
<span
style=
"margin-right: 10px"
>
{{
getNameByValue
(
detail
.
status
,
updateStatusList
)
}}
</span>
<span
style=
"margin-right: 10px"
>
{{
getNameByValue
(
detail
.
status
.
toString
()
,
updateStatusList
)
}}
</span>
<el-button
type=
"primary"
plain
@
click=
"handleUpdate"
size=
"small"
>
立即更新
</el-button>
</dd>
</dl>
...
...
src/modules/trip/my/api.ts
0 → 100644
浏览文件 @
9c2f47a9
import
httpRequest
from
'@/utils/axios'
// 获取实验详情
export
function
getExperiment
()
{
return
httpRequest
.
get
(
'/api/lab/v1/student/experiment/detail'
)
}
// 学生获取旅程
export
function
getStudentTrip
()
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/itinerary/student-get-itinerary'
)
}
src/modules/trip/my/index.ts
浏览文件 @
9c2f47a9
...
...
@@ -2,14 +2,14 @@ import type { RouteRecordRaw } from 'vue-router'
import
Layout
from
'@/components/layout/Index.vue'
const
routes
:
RouteRecordRaw
[]
=
[
{
path
:
'/trip'
,
redirect
:
'/trip/my'
},
{
path
:
'/trip/my'
,
component
:
Layout
,
children
:
[{
path
:
''
,
component
:
()
=>
import
(
'./views/Index.vue'
)
}]
children
:
[
{
path
:
''
,
component
:
()
=>
import
(
'./views/Index.vue'
)
},
{
path
:
'score'
,
component
:
()
=>
import
(
'./views/Score.vue'
)
},
{
path
:
'review'
,
component
:
()
=>
import
(
'./views/Review.vue'
)
}
]
}
]
...
...
src/modules/trip/my/views/Index.vue
浏览文件 @
9c2f47a9
<
script
setup
lang=
"ts"
>
import
TripFlow
from
'@/components/flow/Index.vue'
import
{
getExperiment
,
getStudentTrip
}
from
'../api'
const
experiment
=
ref
<
any
>
()
function
fetchExperiment
()
{
getExperiment
().
then
(
res
=>
{
experiment
.
value
=
res
.
data
.
detail
})
}
onMounted
(()
=>
fetchExperiment
())
// 获取旅程信息
const
detail
=
ref
<
any
>
()
function
fetchInfo
()
{
getStudentTrip
().
then
(
res
=>
{
detail
.
value
=
res
.
data
.
detail
})
}
onMounted
(()
=>
fetchInfo
())
const
elements
=
ref
([
{
...
...
@@ -20,7 +38,13 @@ function handleSubmit() {}
</
script
>
<
template
>
<AppCard
title=
"自由旅程"
>
<el-card
shadow=
"never"
style=
"margin-bottom: 20px"
></el-card>
<el-card
shadow=
"never"
style=
"margin-bottom: 20px"
v-if=
"experiment"
>
<el-descriptions
label-suffix=
":"
>
<el-descriptions-item
label=
"课程名称:"
>
{{
experiment
.
course
.
name
}}
</el-descriptions-item>
<el-descriptions-item
label=
"实验名称:"
>
{{
experiment
.
name
}}
</el-descriptions-item>
<el-descriptions-item
label=
"旅程类型:"
>
自由旅程
</el-descriptions-item>
</el-descriptions>
</el-card>
<TripFlow
v-model=
"elements"
action=
"edit"
role=
"student"
style=
"height: 80vh"
>
<template
#
footer
>
<el-row
justify=
"center"
>
...
...
src/modules/trip/my/views/Review.vue
0 → 100644
浏览文件 @
9c2f47a9
<!-- 批改用户旅程 -->
<
script
setup
lang=
"ts"
>
import
TripFlow
from
'@/components/flow/Index.vue'
const
elements
=
ref
([
{
id
:
'1'
,
type
:
'custom'
,
label
:
'实时触发'
,
position
:
{
x
:
0
,
y
:
0
},
data
:
{
name
:
'实时触发'
,
type
:
'触发条件'
,
score
:
10
,
componentName
:
'TriggeringConditions6'
}
}
])
watchEffect
(()
=>
{
console
.
log
(
elements
)
})
// 保存
function
handleSubmit
()
{}
</
script
>
<
template
>
<AppCard>
<TripFlow
v-model=
"elements"
action=
"view"
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>
src/modules/trip/my/views/Score.vue
0 → 100644
浏览文件 @
9c2f47a9
<!-- 学生查看用户旅程成绩 -->
<
script
setup
lang=
"ts"
>
import
TripFlow
from
'@/components/flow/Index.vue'
const
elements
=
ref
([
{
id
:
'1'
,
type
:
'custom'
,
label
:
'实时触发'
,
position
:
{
x
:
0
,
y
:
0
},
data
:
{
name
:
'实时触发'
,
type
:
'触发条件'
,
score
:
10
,
componentName
:
'TriggeringConditions6'
}
}
])
watchEffect
(()
=>
{
console
.
log
(
elements
)
})
// 保存
function
handleSubmit
()
{}
</
script
>
<
template
>
<AppCard>
<TripFlow
v-model=
"elements"
action=
"view"
role=
"student"
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>
src/modules/trip/template/index.ts
浏览文件 @
9c2f47a9
...
...
@@ -2,6 +2,10 @@ import type { RouteRecordRaw } from 'vue-router'
import
Layout
from
'@/components/layout/Index.vue'
const
routes
:
RouteRecordRaw
[]
=
[
{
path
:
'/trip'
,
redirect
:
'/trip/template'
},
{
path
:
'/trip/template'
,
component
:
Layout
,
...
...
src/modules/trip/template/views/Setting.vue
浏览文件 @
9c2f47a9
...
...
@@ -24,7 +24,7 @@ const elements = ref([])
function
fetchDemo
()
{
getTripTemplateDemo
({
itinerary_id
:
props
.
id
}).
then
(
res
=>
{
try
{
elements
.
value
=
JSON
.
parse
(
res
.
data
.
graph
)
elements
.
value
=
res
.
data
.
graph
?
JSON
.
parse
(
res
.
data
.
graph
)
:
[]
}
catch
(
error
)
{
console
.
log
(
error
)
}
...
...
src/stores/menu.ts
浏览文件 @
9c2f47a9
import
type
{
IMenuItem
}
from
'@/types'
import
{
defineStore
}
from
'pinia'
import
{
useUserStore
}
from
'@/stores/user'
import
IconMetadata
from
'@/components/icon/IconMetadata.vue'
import
IconConnect
from
'@/components/icon/IconConnect.vue'
import
IconUser
from
'@/components/icon/IconUser.vue'
...
...
@@ -18,63 +20,181 @@ import IconMiniProgram from '@/components/icon/IconMiniProgram.vue'
import
IconCard
from
'@/components/icon/IconCard.vue'
interface
State
{
menus
:
IMenuItem
[]
studentMenus
:
IMenuItem
[]
adminMenus
:
IMenuItem
[]
}
// 学生菜单
const
menus
:
IMenuItem
[]
=
[
const
studentMenus
:
IMenuItem
[]
=
[
{
name
:
'用户管理'
,
path
:
'/user'
,
icon
:
markRaw
(
IconUser
),
tag
:
'v1-experiment-member'
},
{
name
:
'标签管理'
,
path
:
'/label'
,
icon
:
markRaw
(
IconLabel
),
tag
:
'experiment_tags'
},
{
name
:
'群组管理'
,
path
:
'/group'
,
icon
:
markRaw
(
IconGroup
),
tag
:
'experiment_groups'
},
{
name
:
'营销资料管理'
,
path
:
'/material'
,
icon
:
markRaw
(
IconMaterial
),
tag
:
'v1-experiment-marketing-material'
,
children
:
[
{
name
:
'文本资料管理'
,
path
:
'/material/text'
,
icon
:
markRaw
(
IconText
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'图片资料管理'
,
path
:
'/material/image'
,
icon
:
markRaw
(
IconImage
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'语音资料管理'
,
path
:
'/material/audio'
,
icon
:
markRaw
(
IconAudio
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'视频资料管理'
,
path
:
'/material/video'
,
icon
:
markRaw
(
IconVideo
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'H5资料管理'
,
path
:
'/material/h5'
,
icon
:
markRaw
(
IconH5
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'二维码资料管理'
,
path
:
'/material/qrcode'
,
icon
:
markRaw
(
IconQrcode
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'小程序资料管理'
,
path
:
'/material/mini'
,
icon
:
markRaw
(
IconMiniProgram
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'卡券资料管理'
,
path
:
'/material/card'
,
icon
:
markRaw
(
IconCard
),
tag
:
'v1-experiment-marketing-material-list'
}
]
},
{
name
:
'用户旅程'
,
path
:
'/trip/my'
,
icon
:
markRaw
(
IconTrip
),
tag
:
'experiment_itinerary'
}
]
const
adminMenus
:
IMenuItem
[]
=
[
{
name
:
'元数据管理'
,
path
:
'/metadata'
,
icon
:
markRaw
(
IconMetadata
),
tag
:
'v1-experiment-meta'
,
children
:
[
{
name
:
'用户属性管理'
,
path
:
'/metadata/user'
},
{
name
:
'事件属性管理'
,
path
:
'/metadata/event'
}
{
name
:
'用户属性管理'
,
path
:
'/metadata/user'
,
tag
:
'v1-experiment-meta-member'
},
{
name
:
'事件属性管理'
,
path
:
'/metadata/event'
,
tag
:
'v1-experiment-meta-event'
}
]
},
{
name
:
'连接管理'
,
path
:
'/connect'
,
icon
:
markRaw
(
IconConnect
)
icon
:
markRaw
(
IconConnect
),
tag
:
'v1-experiment-connection'
},
{
name
:
'用户管理'
,
path
:
'/user'
,
icon
:
markRaw
(
IconUser
)
icon
:
markRaw
(
IconUser
),
tag
:
'v1-experiment-member'
},
{
name
:
'标签管理'
,
path
:
'/label'
,
icon
:
markRaw
(
IconLabel
)
icon
:
markRaw
(
IconLabel
),
tag
:
'experiment_tags'
},
{
name
:
'群组管理'
,
path
:
'/group'
,
icon
:
markRaw
(
IconGroup
)
icon
:
markRaw
(
IconGroup
),
tag
:
'experiment_groups'
},
{
name
:
'营销资料管理'
,
path
:
'/material'
,
icon
:
markRaw
(
IconMaterial
),
tag
:
'v1-experiment-marketing-material'
,
children
:
[
{
name
:
'文本资料管理'
,
path
:
'/material/text'
,
icon
:
markRaw
(
IconText
)
},
{
name
:
'图片资料管理'
,
path
:
'/material/image'
,
icon
:
markRaw
(
IconImage
)
},
{
name
:
'语音资料管理'
,
path
:
'/material/audio'
,
icon
:
markRaw
(
IconAudio
)
},
{
name
:
'视频资料管理'
,
path
:
'/material/video'
,
icon
:
markRaw
(
IconVideo
)
},
{
name
:
'H5资料管理'
,
path
:
'/material/h5'
,
icon
:
markRaw
(
IconH5
)
},
{
name
:
'二维码资料管理'
,
path
:
'/material/qrcode'
,
icon
:
markRaw
(
IconQrcode
)
},
{
name
:
'小程序资料管理'
,
path
:
'/material/mini'
,
icon
:
markRaw
(
IconMiniProgram
)
},
{
name
:
'卡券资料管理'
,
path
:
'/material/card'
,
icon
:
markRaw
(
IconCard
)
}
{
name
:
'文本资料管理'
,
path
:
'/material/text'
,
icon
:
markRaw
(
IconText
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'图片资料管理'
,
path
:
'/material/image'
,
icon
:
markRaw
(
IconImage
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'语音资料管理'
,
path
:
'/material/audio'
,
icon
:
markRaw
(
IconAudio
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'视频资料管理'
,
path
:
'/material/video'
,
icon
:
markRaw
(
IconVideo
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'H5资料管理'
,
path
:
'/material/h5'
,
icon
:
markRaw
(
IconH5
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'二维码资料管理'
,
path
:
'/material/qrcode'
,
icon
:
markRaw
(
IconQrcode
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'小程序资料管理'
,
path
:
'/material/mini'
,
icon
:
markRaw
(
IconMiniProgram
),
tag
:
'v1-experiment-marketing-material-list'
},
{
name
:
'卡券资料管理'
,
path
:
'/material/card'
,
icon
:
markRaw
(
IconCard
),
tag
:
'v1-experiment-marketing-material-list'
}
]
},
{
name
:
'用户旅程'
,
path
:
'/trip'
,
icon
:
markRaw
(
IconTrip
),
children
:
[
{
name
:
'我的用户旅程'
,
path
:
'/trip/my'
},
{
name
:
'旅程模板管理'
,
path
:
'/trip/template'
}
]
tag
:
'experiment_itinerary'
,
children
:
[{
name
:
'旅程模板管理'
,
path
:
'/trip/template'
,
tag
:
'experiment_itinerary_list'
}]
},
{
name
:
'报表分析'
,
...
...
@@ -86,6 +206,17 @@ const menus: IMenuItem[] = [
export
const
useMenuStore
=
defineStore
({
id
:
'menu'
,
state
:
():
State
=>
({
menus
})
studentMenus
,
adminMenus
}),
getters
:
{
menus
:
state
=>
{
const
userStore
=
useUserStore
()
if
(
userStore
.
role
?.
id
===
1
)
{
return
state
.
studentMenus
}
else
{
return
state
.
adminMenus
}
}
}
})
src/utils/axios.ts
浏览文件 @
9c2f47a9
import
axios
from
'axios'
import
{
ElMessage
}
from
'element-plus'
import
router
from
'@/router'
//
import router from '@/router'
const
httpRequest
=
axios
.
create
({
timeout
:
60000
,
...
...
@@ -49,9 +49,9 @@ httpRequest.interceptors.response.use(
// 未登录
if
(
status
===
403
)
{
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
href
)}
`
}
else
if
(
status
===
401
||
status
===
402
)
{
// 未授权
router
.
push
(
'/401'
)
//
} else if (status === 401 || status === 402) {
//
//
未授权
//
router.push('/401')
}
else
{
ElMessage
.
error
(
message
)
console
.
error
(
`
${
status
}
:
${
message
}
`
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论