Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
eb614a7e
Commit
eb614a7e
authored
Mar 23, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
45d93adf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
211 additions
and
20 deletions
+211
-20
aiApi.js
src/service/api/aiApi.js
+5
-0
birthActiveTime.vue
src/views/ai/birthActiveTime.vue
+10
-1
detail.vue
src/views/ai/detail.vue
+0
-0
form.vue
src/views/ai/form.vue
+0
-0
holidayActiveTime.vue
src/views/ai/holidayActiveTime.vue
+55
-8
holidayPop.vue
src/views/ai/holidayPop.vue
+125
-0
lib-message.vue
src/views/ecm/marketing-event/components/lib-message.vue
+13
-8
lib-qfxx.vue
src/views/ecm/marketing-event/components/lib-qfxx.vue
+1
-1
index.vue
src/views/ecm/marketing-event/index.vue
+2
-2
No files found.
src/service/api/aiApi.js
View file @
eb614a7e
...
...
@@ -26,5 +26,10 @@ export const startActivityPlan = params => requests(PREFIX + 'start-activity-pla
//查看计划详情
export
const
getActivityDetail
=
params
=>
requests
(
PREFIX
+
'get-activity-detail'
,
params
,
true
,
false
,
'get'
);
export
const
tempPageStatistics
=
params
=>
requests
(
'/api-marketing/template/page-statistics'
,
params
,
true
,
false
,
'post'
);
export
const
tempDetail
=
params
=>
requests
(
'/api-marketing/template/query'
,
params
,
true
,
false
,
'get'
);
//节日分类信息
export
const
listAllHolidays
=
params
=>
requests
(
'/api-marketing/list-all-holidays'
,
params
,
true
,
false
,
'get'
);
src/views/ai/birthActiveTime.vue
View file @
eb614a7e
...
...
@@ -116,6 +116,7 @@ export default {
},
watch
:
{
data
(
val
)
{
console
.
log
(
'--->data'
);
if
(
val
)
{
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
}
...
...
@@ -190,4 +191,12 @@ export default {
};
</
script
>
<
style
></
style
>
<
style
scoped
>
.tips
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
17px
;
margin-left
:
20px
;
}
</
style
>
src/views/ai/detail.vue
deleted
100644 → 0
View file @
45d93adf
src/views/ai/form.vue
View file @
eb614a7e
This diff is collapsed.
Click to expand it.
src/views/ai/holidayActiveTime.vue
View file @
eb614a7e
<
template
>
<el-form
:model=
"form"
ref=
"form"
label-width=
"100px"
:rules=
"rules"
>
<el-form-item
label=
"节日名称"
prop=
"holiday_type"
required
>
<el-radio
v-model=
"form.holiday_type"
:label=
"1"
>
推荐节日
</el-radio>
<el-radio
v-model=
"form.holiday_type"
:label=
"2"
>
自定义节日
</el-radio>
<span
class=
"tips"
>
为保证触达率,节日活动需要提前创建,不支持创建节日日期为活动创建日的活动
</span>
<div>
<el-tag
type=
"mini"
>
{{
form
.
holiday_name
}}
</el-tag>
<el-button
type=
"text"
v-show=
"form.holiday_type == 1"
@
click=
"visible = true"
>
选择节日
</el-button>
</div>
</el-form-item>
<el-form-item
label=
"节日日期"
prop=
"holiday_date"
required
>
<span
class=
"tips"
v-if=
"!form.holiday_date"
>
未选择节日
</span>
<span
v-else
>
{{
form
.
holiday_date
}}
</span>
</el-form-item>
<el-form-item
label=
"外呼时间"
prop=
"holiday_day"
required
>
节日前
<el-input-number
class=
"w100"
style=
"margin:0 5px;"
v-model=
"form.holiday_day"
controls-position=
"right"
:max=
"30"
:min=
"1"
size=
"small"
/>
...
...
@@ -18,23 +31,29 @@
<span
v-if=
"!activeTime"
class=
"tips"
style=
"font-size: 14px;margin:0"
>
设置【节日日期】和【外呼时间】后自动生成
</span>
<span
v-else
>
{{
activeTime
}}
</span>
</el-form-item>
<holiday-pop
:show
.
sync=
"visible"
@
sendItem=
"handleSendItem"
/>
</el-form>
</
template
>
<
script
>
import
defineTime
from
'./defineTime.vue'
;
import
{
formatDateTimeByType
}
from
'@/utils/index'
;
import
{
formatDateTimeByType
,
getTimesByReq
}
from
'@/utils/index'
;
import
holidayPop
from
'./holidayPop.vue'
;
export
default
{
data
()
{
return
{
formatDateTimeByType
,
getTimesByReq
,
form
:
{
holiday_day
:
''
,
// 节日时间
holiday_type
:
1
,
// 节日活动场景特有值 节日类型 1推荐 2自定义
holiday_name
:
'妇女节'
,
// 节日活动场景特有值 节日名称
holiday_date
:
'2022-03-08'
,
//节日活动场景特有值 节日日期
holiday_day
:
''
,
// 外呼时间
callFlag
:
0
,
//外呼时段 0 默认 1 自定义
callTime
:
[{}]
// 自定义时段
},
rules
:
{}
rules
:
{},
visible
:
false
};
},
props
:
{
...
...
@@ -47,19 +66,33 @@ export default {
data
(
val
)
{
if
(
val
)
{
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
this
.
handleHolidayDay
();
}
}
},
computed
:
{
activeTime
()
{
let
str
=
''
;
if
(
this
.
form
.
holiday_date
&&
this
.
form
.
holiday_day
)
{
let
startTimestamp
=
getTimesByReq
(
this
.
form
.
holiday_date
)
-
this
.
form
.
holiday_day
*
24
*
60
*
60
*
1000
;
let
endTimestamp
=
getTimesByReq
(
this
.
form
.
holiday_date
)
-
24
*
60
*
60
*
1000
;
str
=
formatDateTimeByType
(
startTimestamp
,
'yyyy-MM-dd'
)
+
' 至 '
+
formatDateTimeByType
(
endTimestamp
,
'yyyy-MM-dd'
);
}
return
str
;
}
},
components
:
{
defineTime
defineTime
,
holidayPop
},
methods
:
{
handleHolidayDay
()
{
// 回显时 根据活动有效期和节日日期 算出外呼时间
this
.
form
.
holiday_day
=
((
getTimesByReq
(
this
.
form
.
holiday_date
)
-
this
.
form
.
startDate
)
/
24
)
*
60
*
60
*
1000
;
},
handleSendItem
(
item
)
{
console
.
log
(
item
);
},
submit
()
{
return
new
Promise
(
async
resolve
=>
{
const
res
=
await
this
.
$refs
.
defineTime
.
submit
();
...
...
@@ -72,11 +105,17 @@ export default {
});
this
.
$refs
.
form
.
validate
(
val
=>
{
if
(
val
)
{
const
{
callFlag
,
callTime
}
=
this
.
form
;
const
{
callFlag
,
callTime
,
holiday_date
,
holiday_type
,
holiday_name
,
holiday_day
}
=
this
.
form
;
const
obj
=
{
startDate
:
getTimesByReq
(
holiday_date
)
-
holiday_day
*
24
*
60
*
60
*
1000
,
endDate
:
getTimesByReq
(
holiday_date
)
-
24
*
60
*
60
*
1000
,
callFlag
,
callTime
callTime
,
holiday_date
,
holiday_type
,
holiday_name
};
console
.
log
(
obj
);
if
(
arr
.
length
)
{
obj
.
callTime
=
arr
;
}
...
...
@@ -91,4 +130,12 @@ export default {
};
</
script
>
<
style
></
style
>
<
style
scoped
>
.tips
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
17px
;
margin-left
:
20px
;
}
</
style
>
src/views/ai/holidayPop.vue
0 → 100644
View file @
eb614a7e
<
template
>
<el-dialog
title=
"选择节日"
:visible
.
sync=
"show"
width=
"700px"
:before-close=
"close"
>
<div
class=
"tips"
>
仅支持选择节日日期为最近1-60天内的节日
</div>
<div
class=
"holiday"
v-for=
"item in holidayData"
:key=
"item.id"
>
<dm-sub-title>
{{
item
.
id
}}
级
</dm-sub-title>
<div
class=
"section"
>
<el-radio
v-model=
"selectedData"
:label=
"val"
v-for=
"val in item.holidaysList"
:key=
"val.id"
>
{{
val
.
name
}}
</el-radio>
</div>
</div>
<span
slot=
"footer"
>
<el-button
@
click=
"close"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"addItem"
>
确定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
listAllHolidays
}
from
'@/service/api/aiApi.js'
;
export
default
{
props
:
{
show
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
holidayData
:
[
{
id
:
'S'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'1'
,
// 节日配置ID
name
:
'妇女节'
,
//节日配置名称
date
:
'2020-03-08'
//节日配置日期
},
{
id
:
'2'
,
// 节日配置ID
name
:
'618'
,
//节日配置名称
date
:
'2020-06-18'
//节日配置日期
},
{
id
:
'3'
,
// 节日配置ID
name
:
'端午节端午节端午'
,
//节日配置名称
date
:
'2020-10-01'
//节日配置日期
}
]
},
{
id
:
'A'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'4'
,
// 节日配置ID
name
:
'端午节'
,
//节日配置名称
date
:
'2020-05-05'
//节日配置日期
},
{
id
:
'5'
,
// 节日配置ID
name
:
'中秋节'
,
//节日配置名称
date
:
'2020-07-15'
//节日配置日期
},
{
id
:
'6'
,
// 节日配置ID
name
:
'愚人节'
,
//节日配置名称
date
:
'2020-04-01'
//节日配置日期
}
]
},
{
id
:
'B'
,
//节日分类ID
name
:
''
,
//节日分类名称
holidaysList
:
[
{
id
:
'7'
,
// 节日配置ID
name
:
'元宵节'
,
//节日配置名称
date
:
'2020-01-01'
//节日配置日期
}
]
}
],
selectedData
:
{}
};
},
mounted
()
{
this
.
getListAllHolidays
();
},
methods
:
{
async
getListAllHolidays
()
{
const
{
result
}
=
await
listAllHolidays
();
console
.
log
(
result
);
if
(
result
)
{
// this.holidayData = result;
}
},
addItem
()
{
this
.
$emit
(
'sendItem'
,
this
.
selectedData
);
},
close
()
{
this
.
$emit
(
'update:show'
,
false
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.section
{
padding
:
12px
0
24px
0
;
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
15px
;
.tips
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#606266
;
line-height
:
17px
;
margin-bottom
:
20px
;
}
.el-radio
{
margin
:
0
;
}
}
</
style
>
src/views/ecm/marketing-event/components/lib-message.vue
View file @
eb614a7e
<
template
>
<el-dialog
title=
""
:visible
.
sync=
"show"
width=
"
8
00px"
:before-close=
"close"
>
<el-dialog
title=
""
:visible
.
sync=
"show"
width=
"
9
00px"
:before-close=
"close"
>
<span
slot=
"title"
>
<span
class=
"el-dialog__title"
>
选择短信
</span>
<span
class=
"pl10 fz13 gray"
><i
class=
"el-icon-info pr10"
></i>
短信运营商限制:为避免骚扰用户,营销短信只允许在8点到22点发送
</span>
<span
class=
"pl10 fz13 gray"
v-if=
"useByEcm"
><i
class=
"el-icon-info pr10"
></i>
短信运营商限制:为避免骚扰用户,营销短信只允许在8点到22点发送
</span>
<span
class=
"pl10 fz13 gray"
v-else
>
仅展示审核通过的短信模板
</span>
</span>
<div
class=
"pb22 clearfix"
>
<div
class=
"fl"
>
<span
class=
"pr10"
>
共
{{
total
}}
条
</span><el-input
clearable
v-model=
"listParams.search"
class=
"w200"
placeholder=
"请输入标题/作者"
@
change=
"refresh"
><i
slot=
"prefix"
class=
"el-input__icon el-icon-search"
></i></el-input>
</div>
<div
class=
"fr"
>
<div
class=
"fr"
v-if=
"useByEcm"
>
<el-button
type=
"primary"
@
click=
"add"
>
新建短信
</el-button>
<el-button
@
click=
"refresh"
>
刷新列表
</el-button>
</div>
</div>
<el-table
tooltipEffect=
"light"
:data=
"smsTempList"
height=
"4
0
0"
style=
"width: 100%"
row-class-name=
"cursor-pointer"
v-loading=
"loading"
@
row-click=
"rowClick"
>
<el-table
tooltipEffect=
"light"
:data=
"smsTempList"
height=
"4
2
0"
style=
"width: 100%"
row-class-name=
"cursor-pointer"
v-loading=
"loading"
@
row-click=
"rowClick"
>
<el-table-column
:show-overflow-tooltip=
"false"
:width=
"60"
align=
"center"
prop=
"smsTemplateId"
>
<template
slot-scope=
"scope"
>
<div
class=
"label-hidden"
>
...
...
@@ -21,19 +22,19 @@
</div>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"false"
:width=
"
200"
:min-width=
"20
0"
align=
"left"
prop=
"title"
label=
"模板名称"
></el-table-column>
<el-table-column
:show-overflow-tooltip=
"false"
:width=
"
200"
:min-width=
"20
0"
align=
"left"
prop=
"content"
label=
"模板类型"
>
<el-table-column
:show-overflow-tooltip=
"false"
:width=
"
18
0"
align=
"left"
prop=
"title"
label=
"模板名称"
></el-table-column>
<el-table-column
:show-overflow-tooltip=
"false"
:width=
"
12
0"
align=
"left"
prop=
"content"
label=
"模板类型"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
type
===
0
?
'普通短信'
:
scope
.
row
.
type
===
1
?
'营销短信'
:
'验证码'
}}
</div>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"false"
:min-width=
"200"
align=
"left"
prop=
"content"
label=
"模板内容"
>
<
template
slot-scope=
"scope"
>
<div
class=
"ellipsis-l
3
"
>
{{
scope
.
row
.
content
}}
</div>
<div
class=
"ellipsis-l
2
"
>
{{
scope
.
row
.
content
}}
</div>
</
template
>
</el-table-column>
</el-table>
<dm-pagination
v-show=
"smsTempList.length"
class=
"dm-pagination"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"prev, pager, next"
:total=
"total"
></dm-pagination>
<dm-pagination
v-show=
"smsTempList.length"
class=
"dm-pagination"
style=
"margin-top: 12px"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"prev, pager, next"
:total=
"total"
></dm-pagination>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"close"
>
关 闭
</el-button>
<el-button
type=
"primary"
@
click=
"addItem"
>
确 定
</el-button>
...
...
@@ -49,6 +50,10 @@ export default {
show
:
{
type
:
Boolean
,
default
:
false
},
useByEcm
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
...
...
src/views/ecm/marketing-event/components/lib-qfxx.vue
View file @
eb614a7e
...
...
@@ -121,7 +121,7 @@
<
script
>
import
{
getEntepriseList
}
from
'../assets/api'
;
import
MaterialItem
from
'./material-item.vue'
;
import
LibMessage
from
'./lib-
M
essage.vue'
;
import
LibMessage
from
'./lib-
m
essage.vue'
;
import
LibTeltask
from
'./lib-teltask.vue'
;
export
default
{
...
...
src/views/ecm/marketing-event/index.vue
View file @
eb614a7e
...
...
@@ -50,7 +50,7 @@ import itemWxa from './components/item-wxa.vue';
import
itemCard
from
'./components/item-card.vue'
;
import
itemText
from
'./components/item-text.vue'
;
import
itemImage
from
'./components/item-image.vue'
;
import
itemMessage
from
'./components/item-
M
essage.vue'
;
import
itemMessage
from
'./components/item-
m
essage.vue'
;
import
itemTeltask
from
'./components/item-teltask.vue'
;
import
itemIntegral
from
'./components/item-integral.vue'
;
import
itemGrade
from
'./components/item-grade'
;
...
...
@@ -58,7 +58,7 @@ import itemQywx from './components/item-qywx';
import
itemQfxx
from
'./components/item-qfxx'
;
//弹窗组件
import
libTeletext
from
'./components/lib-teletext.vue'
;
import
libMessage
from
'./components/lib-
M
essage.vue'
;
import
libMessage
from
'./components/lib-
m
essage.vue'
;
import
libCard
from
'./components/lib-card.vue'
;
import
libText
from
'./components/lib-text.vue'
;
import
libWxa
from
'./components/lib-wxa.vue'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment