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 e483aa90
authored
May 18, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
f5dfa518
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
41 deletions
src/views/home/components/Marketing/ChatGPT.vue
src/views/home/components/Marketing/GPTAnalysis.vue
src/views/home/components/Marketing/MarketingLeft.vue
src/views/home/components/Marketing/selectGiftDialog.vue
src/views/home/components/Marketing/selectGoodsDialog.vue
src/views/home/components/Marketing/ChatGPT.vue
View file @
e483aa9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-16 10:20:01
* @Date: 2023-05-16 10:20:01
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-18 1
1:41:48
* @LastEditTime: 2023-05-18 1
4:44:16
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\ChatGPT.vue
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\ChatGPT.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -61,7 +61,7 @@ export default {
...
@@ -61,7 +61,7 @@ export default {
isError
:
false
,
isError
:
false
,
phrasesShow
:
false
,
phrasesShow
:
false
,
query
:
{},
query
:
{},
contentHtml
:
''
,
contentHtml
:
'
我需要制定一套<span>续保</span>营销方案,活动时间为<span>5月份</span>。
'
,
phrases
:
[
'创建一个<span>端午节</span>的营销活动,活动时间为<span>6月份</span>'
,
'我需要一个<span>立夏</span>的节日关怀营销活动'
,
'建立一个<span>父亲节</span>的节日关怀活动'
],
phrases
:
[
'创建一个<span>端午节</span>的营销活动,活动时间为<span>6月份</span>'
,
'我需要一个<span>立夏</span>的节日关怀营销活动'
,
'建立一个<span>父亲节</span>的节日关怀活动'
],
chatItem
:
[
chatItem
:
[
{
{
...
...
src/views/home/components/Marketing/GPTAnalysis.vue
View file @
e483aa9
...
@@ -19,6 +19,14 @@
...
@@ -19,6 +19,14 @@
</span>
</span>
</div>
</div>
<glsx-combi-form
class=
"edit-form-container"
:isBlock=
"true"
ref=
"editFormRef"
formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container"
:isBlock=
"true"
ref=
"editFormRef"
formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<div
slot=
"marketingTitle"
class=
"input-slot"
>
<el-input
placeholder=
"请输入营销主题"
v-model=
"editForm.marketingTitle"
style=
"width:400px"
maxlength=
"12"
show-word-limit
></el-input>
<label>
ChatGPT重新生成
</label>
</div>
<div
slot=
"marketingSubtitle"
class=
"input-slot"
>
<el-input
placeholder=
"请输入副主题"
v-model=
"editForm.marketingSubtitle"
style=
"width:400px"
maxlength=
"20"
show-word-limit
></el-input>
<label>
ChatGPT重新生成
</label>
</div>
<template
slot=
"activityTimeHtml"
>
<template
slot=
"activityTimeHtml"
>
<div
class=
"activity-time-container"
:style=
"
{ 'margin-left': defaultLabelWidth }">
<div
class=
"activity-time-container"
:style=
"
{ 'margin-left': defaultLabelWidth }">
<el-date-picker
v-model=
"editForm.activityTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy/MM/dd HH:mm:ss"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"e => handleTimeChange(e, scope.scope)"
></el-date-picker>
<el-date-picker
v-model=
"editForm.activityTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy/MM/dd HH:mm:ss"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"e => handleTimeChange(e, scope.scope)"
></el-date-picker>
...
@@ -178,6 +186,7 @@ import selectGiftDialog from './selectGiftDialog'
...
@@ -178,6 +186,7 @@ import selectGiftDialog from './selectGiftDialog'
import
selectGoodsDialog
from
'./selectGoodsDialog'
import
selectGoodsDialog
from
'./selectGoodsDialog'
import
selectEquityDialog
from
'./selectEquityDialog'
import
selectEquityDialog
from
'./selectEquityDialog'
import
Drawing
from
'@/utils/drawing'
import
Drawing
from
'@/utils/drawing'
import
{
mapState
,
mapActions
}
from
'vuex'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -206,12 +215,14 @@ export default {
...
@@ -206,12 +215,14 @@ export default {
{
{
label
:
'营销标题'
,
label
:
'营销标题'
,
name
:
'marketingTitle'
,
name
:
'marketingTitle'
,
addHtml
:
'marketingTitle'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
12
maxlength
:
12
},
},
{
{
label
:
'营销副标题'
,
label
:
'营销副标题'
,
name
:
'marketingSubtitle'
,
name
:
'marketingSubtitle'
,
addHtml
:
'marketingSubtitle'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
20
maxlength
:
20
},
},
...
@@ -377,6 +388,7 @@ export default {
...
@@ -377,6 +388,7 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
...
mapState
(
'marketing'
,
[
'activityInfo'
]),
mergeStr
()
{
mergeStr
()
{
const
{
backgroundImage
,
detailImage
,
merchantLog
}
=
this
.
editForm
const
{
backgroundImage
,
detailImage
,
merchantLog
}
=
this
.
editForm
if
(
!
backgroundImage
||
!
detailImage
||
!
merchantLog
)
return
if
(
!
backgroundImage
||
!
detailImage
||
!
merchantLog
)
return
...
@@ -384,6 +396,9 @@ export default {
...
@@ -384,6 +396,9 @@ export default {
}
}
},
},
watch
:
{
watch
:
{
activityInfo
(
val
)
{
val
&&
this
.
confirmMsg
()
},
mergeStr
(
val
)
{
mergeStr
(
val
)
{
if
(
val
)
{
if
(
val
)
{
this
.
getMergeImgs
()
this
.
getMergeImgs
()
...
@@ -398,6 +413,7 @@ export default {
...
@@ -398,6 +413,7 @@ export default {
selectEquityDialog
selectEquityDialog
},
},
methods
:
{
methods
:
{
...
mapActions
(
'marketing'
,
[
'setActivityInfo'
]),
//获取优惠券模板
//获取优惠券模板
couponTemplate
()
{
couponTemplate
()
{
this
.
$apis
.
giftBag
.
couponTemplate
({
pageSize
:
10000
,
pageNum
:
1
}).
then
(
res
=>
{
this
.
$apis
.
giftBag
.
couponTemplate
({
pageSize
:
10000
,
pageNum
:
1
}).
then
(
res
=>
{
...
@@ -671,27 +687,25 @@ export default {
...
@@ -671,27 +687,25 @@ export default {
},
},
getInfo
()
{
getInfo
()
{
this
.
loading
=
true
this
.
loading
=
true
this
.
reportFlag
=
'1'
const
{
id
}
=
this
.
activityInfo
this
.
$apis
.
activity
this
.
$apis
.
activity
.
getActivityDetailApi
({
id
:
this
.
routeInfo
.
id
})
.
findActivityInfo
({
activityId
:
id
})
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
setActivityInfo
()
var
info
=
res
var
info
=
res
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
activityInfo
=
info
this
.
activityInfo
=
info
if
(
info
.
start
T
ime
)
{
if
(
info
.
start
t
ime
)
{
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
start
Time
,
info
.
endT
ime
])
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
start
time
,
info
.
endt
ime
])
}
}
// this.routeInfo.addOrEdit == 'edit' && this.getGoodInfo(info.goodsId)
// this.routeInfo.addOrEdit == 'edit' && this.getGoodInfo(info.goodsId)
// if (info.activityPrice != null && info.goodsStock != null) {
// if (info.activityPrice != null && info.goodsStock != null) {
// this.editForm.activityPrice = (info.activityPrice / 100).toFixed(2)
// this.editForm.activityPrice = (info.activityPrice / 100).toFixed(2)
// this.editForm.goodsStock = info.goodsStock + ''
// this.editForm.goodsStock = info.goodsStock + ''
// }
// }
if
(
info
.
crowdFundingPrice
!=
null
)
{
this
.
editForm
.
crowdFundingPrice
=
(
info
.
crowdFundingPrice
/
100
).
toFixed
(
2
)
}
// 地图
// 地图
if
(
info
.
activityAddressProvinceName
||
info
.
activityAddressCityName
)
{
if
(
info
.
activityAddressProvinceName
||
info
.
activityAddressCityName
)
{
this
.
$refs
.
configE
ditFormRef
.
$refs
.
provinceForm
[
0
].
init
(
info
.
activityAddressProvinceName
,
info
.
activityAddressCityName
)
this
.
$refs
.
e
ditFormRef
.
$refs
.
provinceForm
[
0
].
init
(
info
.
activityAddressProvinceName
,
info
.
activityAddressCityName
)
}
}
if
(
info
.
activityPrice
)
{
if
(
info
.
activityPrice
)
{
this
.
editForm
.
activityPrice
=
info
.
activityPrice
/
100
this
.
editForm
.
activityPrice
=
info
.
activityPrice
/
100
...
@@ -699,7 +713,6 @@ export default {
...
@@ -699,7 +713,6 @@ export default {
if
(
this
.
editForm
.
superMarketingCouponRelRequestList
&&
this
.
editForm
.
superMarketingCouponRelRequestList
.
length
)
{
if
(
this
.
editForm
.
superMarketingCouponRelRequestList
&&
this
.
editForm
.
superMarketingCouponRelRequestList
.
length
)
{
this
.
editForm
.
superMarketingCouponRelRequestList
.
forEach
(
item
=>
{
this
.
editForm
.
superMarketingCouponRelRequestList
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
item
.
id
=
item
.
couponId
item
.
anticipatedCost
=
item
.
couponAnticipatedCost
item
.
denomination
=
item
.
couponAnticipatedCost
item
.
denomination
=
item
.
couponAnticipatedCost
})
})
this
.
selectedGoodsList
=
this
.
editForm
.
superMarketingCouponRelRequestList
.
filter
(
i
=>
i
.
discountType
==
8
)
this
.
selectedGoodsList
=
this
.
editForm
.
superMarketingCouponRelRequestList
.
filter
(
i
=>
i
.
discountType
==
8
)
...
@@ -724,7 +737,9 @@ export default {
...
@@ -724,7 +737,9 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
getInfo
()
this
.
getInfo
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
this
.
setActivityInfo
()
})
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -781,6 +796,13 @@ export default {
...
@@ -781,6 +796,13 @@ export default {
}
}
.edit-form-container
{
.edit-form-container
{
padding
:
8px
50px
;
padding
:
8px
50px
;
.input-slot
{
label
{
color
:
#5850ff
;
font-size
:
14px
;
margin-left
:
10px
;
}
}
}
}
.gift-panel
{
.gift-panel
{
.gift-block
{
.gift-block
{
...
...
src/views/home/components/Marketing/MarketingLeft.vue
View file @
e483aa9
<!--
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:01
* @Date: 2023-05-15 15:08:01
* @LastEditors:
前端 qianduan01
@didihu.com.cn
* @LastEditors:
yangming yangming
@didihu.com.cn
* @LastEditTime: 2023-05-1
5 15:13:18
* @LastEditTime: 2023-05-1
8 15:33:07
* @FilePath: \scrm-micro-home\src\views\home\components\marketing\MarketingLeft.vue
* @FilePath: \scrm-micro-home\src\views\home\components\marketing\MarketingLeft.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
<
template
>
<
template
>
<div
class=
"left-wrap"
>
<div
class=
"left-wrap"
>
<div
class=
"store-wrap"
>
<div
class=
"store-wrap"
>
<div
class=
"mrglr text-16 scrm-c3 weight-6"
>
D+安徽合肥凯越园区店
</div>
<div
class=
"mrglr text-16 scrm-c3 weight-6"
>
{{
merchantInfo
.
merchantName
}}
</div>
<div
class=
"merchantId scrm-c3 scrm-f14"
>
商户号:
1343234242242
</div>
<div
class=
"merchantId scrm-c3 scrm-f14"
>
商户号:
{{
merchantInfo
.
merchantId
}}
</div>
<el-button
class=
"mrglr"
icon=
"el-icon-plus"
type=
"primary"
>
新建
</el-button>
<el-button
class=
"mrglr"
icon=
"el-icon-plus"
type=
"primary"
>
新建
</el-button>
</div>
</div>
<!-- 营销方案 -->
<!-- 营销方案 -->
...
@@ -19,10 +19,10 @@
...
@@ -19,10 +19,10 @@
<div
class=
"scheme-list"
>
<div
class=
"scheme-list"
>
<template
v-for=
"(item, index) in schemeList"
>
<template
v-for=
"(item, index) in schemeList"
>
<div
class=
"scheme-line scrm-c3 scrm-f14 flex"
:class=
"
{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div
class=
"scheme-line scrm-c3 scrm-f14 flex"
:class=
"
{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div
class=
"scheme-text one-line-ellipsis"
>
{{
item
.
text
}}
</div>
<div
class=
"scheme-text one-line-ellipsis"
>
{{
item
.
activityName
}}
</div>
<div
class=
"flex txt-blue"
v-show=
"item.hovering"
>
<div
class=
"flex txt-blue"
v-show=
"item.hovering"
>
<span>
预览
</span>
<span>
预览
</span>
<span
class=
"scrm-ml6"
>
引用
</span>
<span
class=
"scrm-ml6"
@
click=
"setActivity(item)"
>
引用
</span>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -51,34 +51,14 @@
...
@@ -51,34 +51,14 @@
</template>
</template>
<
script
>
<
script
>
import
GlsxCalendar
from
'./components/GlsxCalendar'
import
GlsxCalendar
from
'./components/GlsxCalendar'
import
{
mapActions
}
from
'vuex'
export
default
{
export
default
{
components
:
{
components
:
{
GlsxCalendar
GlsxCalendar
},
},
data
()
{
data
()
{
return
{
return
{
schemeList
:
[
schemeList
:
[],
{
text
:
'端午营销方案'
,
hovering
:
true
},
{
text
:
'定保招揽营销方案'
,
hovering
:
false
},
{
text
:
'续保招揽第三季度营销方案'
,
hovering
:
false
},
{
text
:
'定保招揽营销方案'
,
hovering
:
false
},
{
text
:
'续保招揽第三季度营销方案'
,
hovering
:
false
}
],
themeList
:
[
themeList
:
[
{
{
text
:
'5月定保营销种草'
,
text
:
'5月定保营销种草'
,
...
@@ -92,8 +72,34 @@ export default {
...
@@ -92,8 +72,34 @@ export default {
text
:
'店庆7周年'
,
text
:
'店庆7周年'
,
hovering
:
false
hovering
:
false
}
}
]
],
merchantInfo
:
this
.
$globalState
.
session
}
}
},
methods
:
{
...
mapActions
(
'marketing'
,
[
'setActivityInfo'
]),
getSchemeList
()
{
const
{
merchantId
}
=
this
.
merchantInfo
this
.
$apis
.
activity
.
listByPage
({
merchantId
:
44211227
,
pageSize
:
5
,
currentPage
:
1
}).
then
(
res
=>
{
const
schemeList
=
res
.
list
||
[]
this
.
schemeList
=
schemeList
.
map
(
item
=>
{
return
{
hovering
:
false
,
activityName
:
item
.
activityName
,
id
:
item
.
id
,
subscribe
:
item
.
subscribe
,
type
:
'programme'
//方案
}
})
})
},
//设置活动详情
setActivity
(
item
)
{
this
.
setActivityInfo
(
item
)
}
},
mounted
()
{
this
.
getSchemeList
()
}
}
}
}
</
script
>
</
script
>
...
...
src/views/home/components/Marketing/selectGiftDialog.vue
View file @
e483aa9
...
@@ -96,6 +96,7 @@ export default {
...
@@ -96,6 +96,7 @@ export default {
name
:
'selectGiftDialog'
,
name
:
'selectGiftDialog'
,
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
// 表格组件
// 表格组件
activeName
:
'service'
,
activeName
:
'service'
,
userInfo
:
{},
userInfo
:
{},
...
@@ -403,6 +404,10 @@ export default {
...
@@ -403,6 +404,10 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.muti-gift
img
{
width
:
auto
;
height
:
auto
;
}
.muti-gift
.el-tabs__active-bar
{
.muti-gift
.el-tabs__active-bar
{
display
:
block
;
display
:
block
;
}
}
...
@@ -411,6 +416,16 @@ export default {
...
@@ -411,6 +416,16 @@ export default {
border-bottom
:
1px
solid
#eeeeee
;
border-bottom
:
1px
solid
#eeeeee
;
}
}
.muti-gift
.el-tabs__item
{
.muti-gift
.el-tabs__item
{
width
:
120px
;
padding
:
0
20px
;
text-align
:
center
;
font-weight
:
400
;
font-size
:
16px
;
color
:
#717171
;
height
:
36px
!important
;
line-height
:
36px
!important
;
}
.muti-gift
.el-tabs__item
{
font-weight
:
400
;
font-weight
:
400
;
font-size
:
16px
;
font-size
:
16px
;
color
:
#717171
;
color
:
#717171
;
...
...
src/views/home/components/Marketing/selectGoodsDialog.vue
View file @
e483aa9
...
@@ -72,6 +72,7 @@ export default {
...
@@ -72,6 +72,7 @@ export default {
name
:
'selectGoodsDialog'
,
name
:
'selectGoodsDialog'
,
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
// 表格组件
// 表格组件
isMount
:
false
,
isMount
:
false
,
activeName
:
'card'
,
activeName
:
'card'
,
...
@@ -407,6 +408,16 @@ export default {
...
@@ -407,6 +408,16 @@ export default {
.muti-gift
.el-tabs__active-bar
{
.muti-gift
.el-tabs__active-bar
{
display
:
block
;
display
:
block
;
}
}
.muti-gift
.el-tabs__item
{
width
:
120px
;
padding
:
0
20px
;
text-align
:
center
;
font-weight
:
400
;
font-size
:
16px
;
color
:
#717171
;
height
:
36px
!important
;
line-height
:
36px
!important
;
}
.muti-gift
.el-tabs__nav-scroll
{
.muti-gift
.el-tabs__nav-scroll
{
display
:
block
;
display
:
block
;
border-bottom
:
1px
solid
#eeeeee
;
border-bottom
:
1px
solid
#eeeeee
;
...
...
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