Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-home
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 62f2fe23
authored
Sep 05, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit:添加欢迎语
1 parent
eee15d58
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
142 additions
and
20 deletions
src/views/home/aiCard.vue
src/views/home/aiCard.vue
View file @
62f2fe2
<
template
>
<
template
>
<div
class=
"ai-main"
>
<div
class=
"ai-main"
>
<div
class=
"ai-main-header"
>
<div
class=
"ai-main-header"
>
<div
class=
"ai-main-title"
>
<div
class=
"ai-main-title"
>
离店客户加企微
</div>
离店客户加企微
</div>
<div
class=
"ai-main-desc"
>
系统将通过AI机器人,使用门店的福利官企微号自动添加客户,并自动发放客户福利权益。
</div>
<div
class=
"ai-main-desc"
>
系统将通过AI机器人,使用门店的福利官企微号自动添加客户,并自动发放客户福利权益。
</div>
</div>
</div>
<div
class=
"ai-main-guidance scrm-box-f"
>
<div
class=
"ai-main-guidance scrm-box-f"
>
...
@@ -41,11 +39,11 @@
...
@@ -41,11 +39,11 @@
<el-tab-pane
label=
"任务记录"
:name=
"2"
></el-tab-pane>
<el-tab-pane
label=
"任务记录"
:name=
"2"
></el-tab-pane>
</el-tabs>
</el-tabs>
<ai-tabel
:activeIndex=
"activeIndex"
ref=
"AiForm"
></ai-tabel>
<ai-tabel
:activeIndex=
"activeIndex"
ref=
"AiForm"
></ai-tabel>
<GLDialog
title=
"创建任务"
okText=
"创建"
class=
"gl-form-page gl-form-min"
v-loading=
"loading"
@
onOk=
"handleSure"
@
onCancel=
"dialogVisible = false"
:visible
.
sync=
"dialogVisible"
>
<GLDialog
title=
"创建任务"
destroy-on-close=
"true"
okText=
"创建"
class=
"gl-form-page gl-form-min"
v-loading=
"loading"
@
onOk=
"handleSure"
@
onCancel=
"dialogVisible = false"
:visible
.
sync=
"dialogVisible"
>
<el-form
ref=
"addForm"
class=
"code-body-form"
label-width=
"1
20
px"
>
<el-form
ref=
"addForm"
class=
"code-body-form"
label-width=
"1
54
px"
>
<div
class=
"el-form-item is-required el-form-item--small"
>
<div
class=
"el-form-item is-required el-form-item--small"
>
<label
for=
"remark"
class=
"el-form-item__label"
style=
"width: 1
20px;
"
>
任务名称:
</label>
<label
for=
"remark"
class=
"el-form-item__label"
style=
"width: 1
54px
"
>
任务名称:
</label>
<div
class=
"el-form-item__content"
style=
"margin-left: 1
20px;
"
>
<div
class=
"el-form-item__content"
style=
"margin-left: 1
54px
"
>
<div
class=
"el-input el-input--small"
>
<div
class=
"el-input el-input--small"
>
<input
type=
"text"
@
blur=
"checkTask"
v-model
.
trim=
"taskName"
autocomplete=
"off"
placeholder=
"请输入任务名称"
maxlength=
"10"
class=
"el-input__inner"
/>
<input
type=
"text"
@
blur=
"checkTask"
v-model
.
trim=
"taskName"
autocomplete=
"off"
placeholder=
"请输入任务名称"
maxlength=
"10"
class=
"el-input__inner"
/>
</div>
</div>
...
@@ -53,8 +51,8 @@
...
@@ -53,8 +51,8 @@
</div>
</div>
</div>
</div>
<div
class=
"el-form-item is-required el-form-item--small"
>
<div
class=
"el-form-item is-required el-form-item--small"
>
<label
for=
"remark"
class=
"el-form-item__label"
style=
"width: 1
20px;
"
>
导入手机号:
</label>
<label
for=
"remark"
class=
"el-form-item__label"
style=
"width: 1
54px
"
>
导入手机号:
</label>
<div
class=
"el-form-item__content"
style=
"margin-left: 1
20px;
"
>
<div
class=
"el-form-item__content"
style=
"margin-left: 1
54px
"
>
<div
class=
"import-link"
>
<div
class=
"import-link"
>
<div
class=
"upload-btn"
>
<div
class=
"upload-btn"
>
<el-button
size=
"small"
>
<el-button
size=
"small"
>
...
@@ -83,8 +81,8 @@
...
@@ -83,8 +81,8 @@
</div>
</div>
</div>
</div>
<div
class=
"el-form-item is-required el-form-item--small"
>
<div
class=
"el-form-item is-required el-form-item--small"
>
<label
for=
"remark"
class=
"el-form-item__label"
style=
"width: 1
20px;
"
>
选择专员:
</label>
<label
for=
"remark"
class=
"el-form-item__label"
style=
"width: 1
54px
"
>
选择专员:
</label>
<div
class=
"el-form-item__content"
style=
"margin-left: 1
20px;
"
>
<div
class=
"el-form-item__content"
style=
"margin-left: 1
54px
"
>
<div
class=
"market-content"
>
<div
class=
"market-content"
>
<el-button
size=
"small"
@
click=
"handleAddEmp"
>
<el-button
size=
"small"
@
click=
"handleAddEmp"
>
<i
class=
"el-icon-plus"
></i>
<i
class=
"el-icon-plus"
></i>
...
@@ -98,6 +96,16 @@
...
@@ -98,6 +96,16 @@
<!--
<div
class=
"tips-error"
v-if=
"staffStatus"
>
请选择专员
</div>
-->
<!--
<div
class=
"tips-error"
v-if=
"staffStatus"
>
请选择专员
</div>
-->
</div>
</div>
</div>
</div>
<div
class=
"el-form-item el-form-item--small"
>
<label
for=
"remark"
class=
"el-form-item__label"
style=
"width: 154px"
>
自动发送欢迎语:
</label>
<div
class=
"el-form-item__content"
style=
"margin-left: 154px"
>
<el-switch
v-model=
"autoSend"
active-color=
"#5850FF"
inactive-color=
"#F2F3F5"
></el-switch>
</div>
</div>
<div
style=
"margin-left: 154px; margin-top: -8px"
v-if=
"autoSend"
>
<GLEditor
:boxHeight=
"240"
ref=
"welcome"
:btnList=
"btnList"
></GLEditor>
</div>
</el-form>
</el-form>
</GLDialog>
</GLDialog>
<GLDialog
title=
"导入数据失败"
:hasFooter=
"true"
mode=
"small"
:visible
.
sync=
"importVisible"
>
<GLDialog
title=
"导入数据失败"
:hasFooter=
"true"
mode=
"small"
:visible
.
sync=
"importVisible"
>
...
@@ -114,9 +122,7 @@
...
@@ -114,9 +122,7 @@
</div>
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"importVisible = false"
>
<el-button
size=
"small"
@
click=
"importVisible = false"
>
取消
</el-button>
取消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleImport"
>
导出错误数据
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleImport"
>
导出错误数据
</el-button>
</span>
</span>
</GLDialog>
</GLDialog>
...
@@ -125,7 +131,7 @@
...
@@ -125,7 +131,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
selectEmp
from
'@/components/selectEmp
/emp
'
import
selectEmp
from
'@/components/selectEmp'
import
aiTabel
from
'./components/ai-tabel.vue'
import
aiTabel
from
'./components/ai-tabel.vue'
import
util
from
'@/utils/util'
import
util
from
'@/utils/util'
export
default
{
export
default
{
...
@@ -144,11 +150,105 @@ export default {
...
@@ -144,11 +150,105 @@ export default {
dialogVisible
:
false
,
dialogVisible
:
false
,
importVisible
:
false
,
importVisible
:
false
,
dialogVisibleDel
:
false
,
dialogVisibleDel
:
false
,
autoSend
:
true
,
staffInfo
:
[],
staffInfo
:
[],
ImportResult
:
{},
ImportResult
:
{},
taskName
:
''
,
taskName
:
''
,
url
:
''
,
url
:
''
,
fileName
:
''
fileName
:
''
,
btnList
:
[
{
name
:
'表情'
,
funcName
:
''
,
type
:
'expression'
,
limitSize
:
10
},
{
name
:
'图片'
,
funcName
:
''
,
type
:
'img'
,
uploadApi
:
this
.
$apis
.
common
.
pictureUpload
},
{
name
:
'昵称'
,
type
:
'nickname'
,
funName
:
'nickname'
},
{
name
:
'活动'
,
type
:
'activity'
,
funName
:
'activity'
,
funParams
:
[
{
itemName
:
'权益卡试用'
,
itemValue
:
3
,
itemType
:
'card'
,
getInterfaceApi
:
this
.
$apis
.
welcomeword
.
getCard
,
params
:
{
tryAble
:
1
,
merchantId
:
this
.
$globalState
.
session
.
merchantId
}
},
{
itemName
:
'权益套餐'
,
itemValue
:
4
,
itemType
:
'package'
,
getInterfaceApi
:
this
.
$apis
.
welcomeword
.
getPackage
,
params
:
{}
},
{
itemName
:
'商城券'
,
itemValue
:
2
,
itemType
:
'coupon'
,
getInterfaceApi
:
this
.
$apis
.
welcomeword
.
getMerchant
,
params
:
{
discountTypes
:
[
2
,
3
,
4
],
directionalFlag
:
1
,
// 1所有人可用2定向礼包专用3关联优惠券
validType
:
'valid'
}
},
{
itemName
:
'秒杀活动'
,
itemValue
:
5
,
itemType
:
'activity'
,
getInterfaceApi
:
this
.
$apis
.
welcomeword
.
getActivity
,
params
:
{
activityStatus
:
2
,
currentPage
:
1
}
},
{
itemName
:
'无忧服务'
,
itemValue
:
6
,
itemType
:
'merchant'
,
getInterfaceApi
:
this
.
$apis
.
welcomeword
.
merchant
,
merchantOpen
:
{
merchantOpenApi
:
this
.
$apis
.
welcomeword
.
merchantOpen
,
params
:
{
merchantId
:
this
.
$globalState
.
session
.
merchantId
}
},
params
:
{
merchantId
:
this
.
$globalState
.
session
.
merchantId
}
}
]
},
{
name
:
'素材'
,
type
:
'material'
,
funName
:
'material'
,
groupListApi
:
this
.
$apis
.
welcomeword
.
getGroupListApi
,
materialListApi
:
this
.
$apis
.
welcomeword
.
getMaterialListApi
// videoNo: true
// pdfNo: true
},
{
name
:
'兑换码'
,
type
:
'code'
,
funName
:
'code'
}
]
}
}
},
},
methods
:
{
methods
:
{
...
@@ -162,6 +262,8 @@ export default {
...
@@ -162,6 +262,8 @@ export default {
this
.
fileName
=
''
this
.
fileName
=
''
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
this
.
taskStatus
=
false
this
.
taskStatus
=
false
this
.
autoSend
=
true
this
.
$refs
.
welcome
.
previewList
=
[]
},
},
selectTable
(
item
)
{
selectTable
(
item
)
{
this
.
staffInfo
=
item
.
map
(
item
=>
{
this
.
staffInfo
=
item
.
map
(
item
=>
{
...
@@ -227,8 +329,9 @@ export default {
...
@@ -227,8 +329,9 @@ export default {
})
})
},
},
handleSure
()
{
handleSure
()
{
const
staffInfo
=
this
.
staffInfo
.
map
(
item
=>
item
.
staffId
)
console
.
log
(
this
.
$refs
.
welcome
.
previewList
)
const
staffId
=
staffInfo
.
join
(
','
)
const
staffIds
=
this
.
staffInfo
.
map
(
item
=>
item
.
staffId
)
// const staffId = staffInfo.join(',')
const
{
url
,
fileName
,
taskName
}
=
this
const
{
url
,
fileName
,
taskName
}
=
this
if
(
!
taskName
)
{
if
(
!
taskName
)
{
this
.
$message
.
error
(
'请输入任务名称'
)
this
.
$message
.
error
(
'请输入任务名称'
)
...
@@ -242,12 +345,23 @@ export default {
...
@@ -242,12 +345,23 @@ export default {
this
.
$message
.
error
(
'请上传手机号'
)
this
.
$message
.
error
(
'请上传手机号'
)
return
return
}
}
if
(
staffI
nfo
.
length
==
0
)
{
if
(
staffI
ds
.
length
==
0
)
{
this
.
$message
.
error
(
'请选择专员'
)
this
.
$message
.
error
(
'请选择专员'
)
return
return
}
}
const
previewList
=
this
.
$refs
.
welcome
.
previewList
?
this
.
$common
.
utils
.
deepClone
(
this
.
$refs
.
welcome
.
previewList
)
:
[]
const
attachmentList
=
previewList
.
map
(
item
=>
{
if
(
item
.
attType
==
1
)
{
item
.
attContent
=
item
.
attContent
.
replaceAll
(
'[@昵称]'
,
'@昵称'
)
item
.
attContent
=
item
.
attContent
.
replaceAll
(
'@昵称'
,
'[@昵称]'
)
}
else
if
(
item
.
attType
==
7
)
{
item
.
attContent
=
JSON
.
stringify
(
item
.
attContent
)
}
return
item
})
const
autoSend
=
this
.
autoSend
?
1
:
0
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
aiCard
.
createTask
({
url
,
fileName
,
taskName
,
staffId
}).
then
(
res
=>
{
this
.
$apis
.
aiCard
.
createTask
({
url
,
fileName
,
taskName
,
staffId
s
,
attachmentList
,
autoSend
}).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
this
.
$refs
.
AiForm
.
handleSeach
()
this
.
$refs
.
AiForm
.
handleSeach
()
...
@@ -469,4 +583,12 @@ export default {
...
@@ -469,4 +583,12 @@ export default {
}
}
}
}
}
}
.market-content
/
deep
/
{
.full-container
{
margin-bottom
:
5px
;
}
}
.gl-form-min
/
deep
/
.el-form
.welcome-box
{
width
:
100%
!important
;
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment