Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
4ad890e2
提交
4ad890e2
authored
7月 04, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 连接增加卷王平台
上级
a307abe9
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
176 行增加
和
15 行删除
+176
-15
api.ts
src/modules/connect/api.ts
+19
-4
StepOne.vue
src/modules/connect/components/StepOne.vue
+2
-1
StepTwo.vue
src/modules/connect/components/StepTwo.vue
+5
-5
SurveyKingField.vue
src/modules/connect/components/SurveyKingField.vue
+51
-0
index.ts
src/modules/connect/index.ts
+2
-1
SurveyKing.vue
src/modules/connect/views/SurveyKing.vue
+66
-0
View.vue
src/modules/connect/views/View.vue
+31
-4
没有找到文件。
src/modules/connect/api.ts
浏览文件 @
4ad890e2
...
@@ -6,21 +6,36 @@ export function getConnectionList(params: { created_operator?: string; type?: st
...
@@ -6,21 +6,36 @@ export function getConnectionList(params: { created_operator?: string; type?: st
}
}
// 创建链接
// 创建链接
export
function
createConnection
(
data
:
{
type
:
string
;
config_attributes
:
string
;
})
{
export
function
createConnection
(
data
:
{
type
:
string
;
config_attributes
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/connection/create'
,
data
)
return
httpRequest
.
post
(
'/api/lab/v1/experiment/connection/create'
,
data
)
}
}
// 链接详情
// 链接详情
export
function
getConnectionDetails
(
params
:
{
id
?:
string
;
})
{
export
function
getConnectionDetails
(
params
:
{
id
?:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/connection/view'
,
{
params
})
return
httpRequest
.
get
(
'/api/lab/v1/experiment/connection/view'
,
{
params
})
}
}
// 更新链接
// 更新链接
export
function
updateConnection
(
data
:
{
id
:
string
;
config_attributes
:
string
;
})
{
export
function
updateConnection
(
data
:
{
id
:
string
;
config_attributes
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/connection/update'
,
data
)
return
httpRequest
.
post
(
'/api/lab/v1/experiment/connection/update'
,
data
)
}
}
// 删除链接
// 删除链接
export
function
deleteConnection
(
data
:
{
id
:
string
;
})
{
export
function
deleteConnection
(
data
:
{
id
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/connection/delete'
,
data
)
return
httpRequest
.
post
(
'/api/lab/v1/experiment/connection/delete'
,
data
)
}
}
// 卷王获取表单列表
export
function
getSurveyFormList
(
params
:
{
id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/connection/survey-form-list'
,
{
params
})
}
// 卷王获取表单详情
export
function
getSurveyForm
(
params
:
{
form_id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/connection/survey-form-view'
,
{
params
})
}
// 卷王字段映射保存
export
function
submitSurveyForm
(
data
:
{
id
:
string
;
form_id
:
string
;
form
:
string
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/connection/save-survey-form-view'
,
data
)
}
src/modules/connect/components/StepOne.vue
浏览文件 @
4ad890e2
...
@@ -15,7 +15,8 @@ const iconItems = $ref<IconProp[]>([
...
@@ -15,7 +15,8 @@ const iconItems = $ref<IconProp[]>([
{
label
:
'邮箱'
,
name
:
'9'
,
checkbox
:
false
},
{
label
:
'邮箱'
,
name
:
'9'
,
checkbox
:
false
},
{
label
:
'短信'
,
name
:
'10'
,
checkbox
:
false
},
{
label
:
'短信'
,
name
:
'10'
,
checkbox
:
false
},
{
label
:
'内部消息'
,
name
:
'11'
,
checkbox
:
false
},
{
label
:
'内部消息'
,
name
:
'11'
,
checkbox
:
false
},
{
label
:
'自定义'
,
name
:
'12'
,
checkbox
:
false
}
{
label
:
'自定义'
,
name
:
'12'
,
checkbox
:
false
},
{
label
:
'卷王'
,
name
:
'13'
,
checkbox
:
false
}
])
])
let
typeValue
=
ref
<
IconProp
>
({
label
:
'公众号'
,
name
:
'1'
,
checkbox
:
true
})
let
typeValue
=
ref
<
IconProp
>
({
label
:
'公众号'
,
name
:
'1'
,
checkbox
:
true
})
...
...
src/modules/connect/components/StepTwo.vue
浏览文件 @
4ad890e2
...
@@ -117,6 +117,10 @@ const formAll = ref([
...
@@ -117,6 +117,10 @@ const formAll = ref([
{
label
:
'APP类型'
,
prop
:
'appType'
,
value
:
''
},
{
label
:
'APP类型'
,
prop
:
'appType'
,
value
:
''
},
{
label
:
'AppId'
,
prop
:
'appId'
,
value
:
''
}
{
label
:
'AppId'
,
prop
:
'appId'
,
value
:
''
}
]
]
},
{
type
:
'13'
,
form
:
[{
label
:
'名称'
,
prop
:
'name'
,
value
:
''
}]
}
}
])
])
...
@@ -139,11 +143,7 @@ defineExpose({ formItem })
...
@@ -139,11 +143,7 @@ defineExpose({ formItem })
<div
class=
"content-left"
>
<div
class=
"content-left"
>
<h2>
用户需知
</h2>
<h2>
用户需知
</h2>
<p>
亲爱的系统用户,您即将进入链接页面,链接前请您认真阅读一下说明:
</p>
<p>
亲爱的系统用户,您即将进入链接页面,链接前请您认真阅读一下说明:
</p>
<p>
<p>
1、您即将链接的系统属于第三方平台,关于此系统的一切内容以及疑问,本公司无法代表此系统提供官方的准确回复,建议您
<strong>
及时联系此系统的官方客服人员;
</strong></p>
1、您即将链接的系统属于第三方平台,关于此系统的一切内容以及疑问,本公司无法代表此系统提供官方的准确回复,建议您
<strong
>
及时联系此系统的官方客服人员;
</strong
>
</p>
<p>
<p>
2、本系统是一个客户数据平台,通过链接全局客户数据,帮助企业构建第一方客户池,数据源为各个与本系统链接的第三方平台,如链接的系统出现数据异常,本公司没有权限进入该系统排查,烦请
<strong
2、本系统是一个客户数据平台,通过链接全局客户数据,帮助企业构建第一方客户池,数据源为各个与本系统链接的第三方平台,如链接的系统出现数据异常,本公司没有权限进入该系统排查,烦请
<strong
>
及时联系该系统相关技术人员协助处理。
</strong
>
及时联系该系统相关技术人员协助处理。
</strong
...
...
src/modules/connect/components/SurveyKingField.vue
0 → 100644
浏览文件 @
4ad890e2
<
script
setup
lang=
"ts"
>
import
{
ElMessage
}
from
'element-plus'
import
{
getSurveyForm
,
submitSurveyForm
}
from
'../api'
interface
FormItem
{
title
:
string
survey_field_id
:
string
field_id
:
string
}
interface
FieldItem
{
id
:
string
name
:
string
}
const
props
=
defineProps
<
{
id
:
string
;
formId
:
string
}
>
()
const
emit
=
defineEmits
<
{
'update:modelValue'
:
[
visible
:
boolean
]
update
:
[]
}
>
()
const
fields
=
ref
<
FieldItem
[]
>
([])
const
form
=
ref
<
FormItem
[]
>
([])
async
function
fetchInfo
()
{
const
res
=
await
getSurveyForm
({
form_id
:
props
.
formId
})
fields
.
value
=
res
.
data
.
fields
||
[]
form
.
value
=
res
.
data
.
form
||
[]
}
watchEffect
(
fetchInfo
)
async
function
handleSubmit
()
{
await
submitSurveyForm
({
id
:
props
.
id
,
form_id
:
props
.
formId
,
form
:
JSON
.
stringify
(
form
.
value
)
})
emit
(
'update'
)
emit
(
'update:modelValue'
,
false
)
ElMessage
.
success
(
'保存成功'
)
}
</
script
>
<
template
>
<el-dialog
title=
"字段映射"
width=
"500"
@
update:modelValue=
"$emit('update:modelValue')"
>
<el-form
labelWidth=
"240"
labelPosition=
"left"
>
<el-form-item
v-for=
"item in form"
:key=
"item.survey_field_id"
:label=
"item.title"
>
<el-select
v-model=
"item.field_id"
style=
"width: 220px"
>
<el-option
v-for=
"item in fields"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<template
#
footer
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
确定
</el-button>
</
template
>
</el-dialog>
</template>
src/modules/connect/index.ts
浏览文件 @
4ad890e2
...
@@ -7,7 +7,8 @@ const routes: RouteRecordRaw[] = [
...
@@ -7,7 +7,8 @@ const routes: RouteRecordRaw[] = [
component
:
Layout
,
component
:
Layout
,
children
:
[
children
:
[
{
path
:
''
,
component
:
()
=>
import
(
'./views/Index.vue'
)
},
{
path
:
''
,
component
:
()
=>
import
(
'./views/Index.vue'
)
},
{
path
:
'view'
,
component
:
()
=>
import
(
'./views/View.vue'
)
}
{
path
:
'view'
,
component
:
()
=>
import
(
'./views/View.vue'
)
},
{
path
:
'view/surveyking'
,
component
:
()
=>
import
(
'./views/SurveyKing.vue'
)
}
]
]
}
}
]
]
...
...
src/modules/connect/views/SurveyKing.vue
0 → 100644
浏览文件 @
4ad890e2
<
script
setup
lang=
"ts"
>
import
AppList
from
'@/components/base/AppList.vue'
import
{
getSurveyFormList
}
from
'../api'
interface
SurveyKingListItem
{
id
:
string
name
:
string
has_map
:
boolean
}
const
SurveyKingField
=
defineAsyncComponent
(()
=>
import
(
'../components/SurveyKingField.vue'
))
const
route
=
useRoute
()
// 连接ID
const
connectId
=
route
.
query
.
id
as
string
const
appList
=
ref
<
InstanceType
<
typeof
AppList
>
|
null
>
(
null
)
// 列表配置
const
listOptions
=
computed
(()
=>
{
return
{
remote
:
{
httpRequest
:
getSurveyFormList
,
params
:
{
id
:
connectId
},
callback
(
data
:
SurveyKingListItem
)
{
return
{
list
:
data
}
}
},
columns
:
[
{
label
:
'表单ID'
,
prop
:
'id'
},
{
label
:
'表单名称'
,
prop
:
'name'
},
{
label
:
'是否做过字段映射'
,
prop
:
'has_map'
,
computed
({
row
}:
{
row
:
SurveyKingListItem
})
{
return
row
.
has_map
?
'已映射'
:
''
}
},
{
label
:
'操作'
,
slots
:
'table-x'
,
width
:
100
}
]
}
})
// 刷新
function
handleRefresh
()
{
appList
.
value
?.
refetch
()
}
const
dialogVisible
=
ref
(
false
)
const
currentRow
=
ref
<
SurveyKingListItem
>
()
function
handleClick
(
row
:
SurveyKingListItem
)
{
currentRow
.
value
=
row
dialogVisible
.
value
=
true
}
</
script
>
<
template
>
<AppCard
title=
"卷王表单映射"
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
table-x=
"
{ row }: { row: SurveyKingListItem }">
<el-button
type=
"primary"
@
click=
"handleClick(row)"
>
查看
</el-button>
</
template
>
</AppList>
</AppCard>
<SurveyKingField
v-model=
"dialogVisible"
:id=
"connectId"
:formId=
"currentRow.id"
@
update=
"handleRefresh"
v-if=
"dialogVisible && currentRow"
></SurveyKingField>
</template>
src/modules/connect/views/View.vue
浏览文件 @
4ad890e2
...
@@ -3,6 +3,7 @@ import Icon from '@/components/ConnectionIcon.vue'
...
@@ -3,6 +3,7 @@ import Icon from '@/components/ConnectionIcon.vue'
// import { ElMessageBox } from 'element-plus'
// import { ElMessageBox } from 'element-plus'
import
{
getConnectionDetails
}
from
'../api'
import
{
getConnectionDetails
}
from
'../api'
const
router
=
useRouter
()
const
route
=
useRoute
()
const
route
=
useRoute
()
// 点击标签弹出详情文案(产品还没提供)
// 点击标签弹出详情文案(产品还没提供)
...
@@ -19,7 +20,7 @@ onMounted(() => {
...
@@ -19,7 +20,7 @@ onMounted(() => {
})
})
})
})
const
ability
=
ref
(
[
const
ability
=
[
{
{
type
:
1
,
type
:
1
,
data
:
[
data
:
[
...
@@ -439,13 +440,39 @@ const ability = ref([
...
@@ -439,13 +440,39 @@ const ability = ref([
child
:
[]
child
:
[]
}
}
]
]
},
{
type
:
13
,
data
:
[
{
title
:
''
,
child
:
[
{
title
:
'访问卷王表单网站'
,
onClick
()
{
window
.
open
(
'https://surveyking.ezijing.com/'
)
}
},
{
title
:
'管理表单自动映射'
,
onClick
()
{
router
.
push
({
path
:
'view/surveyking'
,
query
:
route
.
query
})
}
}
]
}
}
])
]
}
]
const
abilityItem
=
computed
(()
=>
{
const
abilityItem
=
computed
(()
=>
{
const
[
data
]
=
ability
.
value
.
filter
(
item
=>
item
.
type
===
parseInt
(
dataDetail
?.
type
))
const
[
data
]
=
ability
.
filter
(
item
=>
item
.
type
===
parseInt
(
dataDetail
?.
type
))
return
data
?.
data
return
data
?.
data
})
})
function
handleClick
(
item
:
any
)
{
item
.
onClick
&&
item
.
onClick
()
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -467,7 +494,7 @@ const abilityItem = computed(() => {
...
@@ -467,7 +494,7 @@ const abilityItem = computed(() => {
<el-tabs
class=
"tabs-box"
v-for=
"(item, index) in abilityItem"
:key=
"index"
>
<el-tabs
class=
"tabs-box"
v-for=
"(item, index) in abilityItem"
:key=
"index"
>
<el-tab-pane
:label=
"item.title"
>
<el-tab-pane
:label=
"item.title"
>
<div
class=
"tag-box"
v-if=
"item.child.length"
>
<div
class=
"tag-box"
v-if=
"item.child.length"
>
<div
class=
"tag"
v-for=
"cItem in item.child"
:key=
"cItem.title"
>
{{
cItem
.
title
}}
</div>
<div
class=
"tag"
v-for=
"cItem in item.child"
:key=
"cItem.title"
@
click=
"handleClick(cItem)"
>
{{
cItem
.
title
}}
</div>
</div>
</div>
<div
class=
"tag-null"
v-else
>
无数据
</div>
<div
class=
"tag-null"
v-else
>
无数据
</div>
</el-tab-pane>
</el-tab-pane>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论