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 572bfcbe
authored
May 18, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.11.0' of
http://192.168.3.233:8090/saas/scrm-micro-home
into v3.11.0
2 parents
c70c525d
7160e59c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
125 additions
and
63 deletions
package-lock.json
src/api/modules/activity.js
src/store/modules/marketing.js
src/views/home/components/Marketing/MarketingLeft.vue
src/views/home/components/Marketing/components/GlsxCalendar/index.vue
src/views/home/components/Marketing/components/ScheduleCalendar/index.vue
src/views/home/marketing.vue
package-lock.json
View file @
572bfcb
...
...
@@ -12347,6 +12347,11 @@
"vue-style-loader"
:
"^4.1.0"
}
},
"vue-router"
:
{
"version"
:
"3.6.5"
,
"resolved"
:
"https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz"
,
"integrity"
:
"sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ=="
},
"vue-style-loader"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz"
,
...
...
@@ -12824,6 +12829,24 @@
"integrity"
:
"sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
,
"dev"
:
true
},
"work-calendar"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"https://registry.npmjs.org/work-calendar/-/work-calendar-1.0.0.tgz"
,
"integrity"
:
"sha512-Sc0S+nmQN5QXiJEQJBRqZAKoQGi0cqEJeCIZq3zssy5Hn2FggdhOEJLHjOMrTXXXi6/ssTNfSOt741E+z6AHaA=="
,
"requires"
:
{
"core-js"
:
"^3.6.5"
,
"dayjs"
:
"^1.10.4"
,
"vue"
:
"^2.6.11"
,
"vue-router"
:
"^3.5.1"
},
"dependencies"
:
{
"core-js"
:
{
"version"
:
"3.30.2"
,
"resolved"
:
"https://registry.npmjs.org/core-js/-/core-js-3.30.2.tgz"
,
"integrity"
:
"sha512-uBJiDmwqsbJCWHAwjrx3cvjbMXP7xD72Dmsn5LOJpiRmE3WbBbN5rCqQ2Qh6Ek6/eOrjlWngEynBWo4VxerQhg=="
}
}
},
"worker-farm"
:
{
"version"
:
"1.7.0"
,
"resolved"
:
"https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz"
,
...
...
src/api/modules/activity.js
View file @
572bfcb
...
...
@@ -58,10 +58,10 @@ const exportCustomer = params => {
})
}
// 营销日历列表
const
getCalendarList
Data
=
params
=>
{
const
getCalendarList
=
params
=>
{
params
.
method
=
'marketing.api.calendar.list'
return
http
({
url
:
'/rop-scrm-marketing/router'
,
url
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
...
...
@@ -75,6 +75,6 @@ export default {
createSuperMarketing
,
exportCustomer
,
listByPage
,
getCalendarListData
,
activityDetail
activityDetail
,
getCalendarList
}
src/store/modules/marketing.js
View file @
572bfcb
...
...
@@ -61,9 +61,10 @@ export default {
commit
(
'SET_ACTIVITY_PEOJECT'
,
data
)
},
//营销日历列表
getCalendarList
(
conText
,
payload
)
{
apis
.
calendar
.
getCalendarListData
(
payload
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
getCalendarListData
(
conText
,
payload
){
apis
.
activity
.
getCalendarList
(
payload
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
0
){
conText
.
commit
(
'SET_CALENDAR_DATA'
,
{
calendarData
:
res
.
data
})
}
})
...
...
src/views/home/components/Marketing/MarketingLeft.vue
View file @
572bfcb
...
...
@@ -39,9 +39,9 @@
<div
class=
"theme-list"
>
<
template
v-for=
"(item, index) in themeList"
>
<div
class=
"theme-line scrm-c3 scrm-f12 flex"
:class=
"
{ select: item.hovering }" :key="index" @mouseenter="item.hovering = true" @mouseleave="item.hovering = false">
<div
class=
"scheme-text"
>
{{
index
+
1
}}
、
{{
item
.
t
ext
}}
</div>
<div
class=
"scheme-text"
>
{{
index
+
1
}}
、
{{
item
.
t
itle
}}
</div>
<div
class=
"flex txt-blue"
v-show=
"item.hovering"
>
<span
class=
"scrm-ml6"
>
引用
</span>
<span
class=
"scrm-ml6"
@
click=
"setActivity(item)"
>
引用
</span>
</div>
</div>
</
template
>
...
...
@@ -51,7 +51,7 @@
</template>
<
script
>
import
GlsxCalendar
from
'./components/GlsxCalendar'
import
{
mapActions
}
from
'vuex'
import
{
map
State
,
map
Actions
}
from
'vuex'
export
default
{
components
:
{
GlsxCalendar
...
...
@@ -76,6 +76,19 @@ export default {
merchantInfo
:
this
.
$globalState
.
session
}
},
computed
:
{
...
mapState
({
calendarData
:
state
=>
state
.
marketing
.
calendarData
})
},
watch
:
{
calendarData
(
newVal
)
{
this
.
getThemeData
(
newVal
)
}
},
mounted
()
{
this
.
getSchemeList
()
},
methods
:
{
...
mapActions
(
'marketing'
,
[
'setActivityInfo'
]),
getSchemeList
()
{
...
...
@@ -96,10 +109,17 @@ export default {
//设置活动详情
setActivity
(
item
)
{
this
.
setActivityInfo
(
item
)
},
getThemeData
(
data
)
{
this
.
themeList
=
data
.
map
(
item
=>
{
return
{
title
:
item
.
title
,
id
:
item
.
id
,
hovering
:
false
,
type
:
'calendar'
//方案
}
})
}
},
mounted
()
{
this
.
getSchemeList
()
}
}
</
script
>
...
...
src/views/home/components/Marketing/components/GlsxCalendar/index.vue
View file @
572bfcb
...
...
@@ -20,7 +20,7 @@
<ul
class=
"ul-day"
@
click=
"handleShowCalendar"
>
<li
class=
"li-day"
v-for=
"(item, index) in days"
:key=
"index"
:isThisMonth=
"item.isThisMonth"
>
{{
item
.
date
}}
<img
class=
"star-icon"
src=
"@/assets/star.png"
/>
<img
v-if=
"item.isStar"
class=
"star-icon"
src=
"@/assets/star.png"
/>
</li>
</ul>
</div>
...
...
@@ -28,6 +28,7 @@
</
template
>
<
script
>
import
{
mapState
}
from
'vuex'
export
default
{
name
:
'SimpleCalendar'
,
data
()
{
...
...
@@ -44,18 +45,37 @@ export default {
},
curretIndex
:
30
,
week
:
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
],
days
:
[]
days
:
[],
starList
:
[]
}
},
computed
:
{
...
mapState
({
calendarData
:
state
=>
state
.
marketing
.
calendarData
})
},
watch
:
{
calendarData
(
newVal
)
{
console
.
log
(
newVal
)
this
.
handleSelectCalendar
(
newVal
)
}
},
methods
:
{
handleShowCalendar
(){
handleSelectCalendar
(
data
)
{
this
.
starList
=
data
.
map
(
item
=>
{
let
dateArray
=
item
.
startTime
.
split
(
'/'
)
return
{
date
:
+
dateArray
[
2
],
month
:
dateArray
[
1
]
-
1
,
year
:
+
dateArray
[
0
]
}
})
this
.
createCalendar
(
this
.
current
.
year
,
this
.
current
.
month
)
},
handleShowCalendar
()
{
console
.
log
(
111
)
this
.
$parent
.
$parent
.
handleShowCalendar
()
},
handleClick
:
function
(
index
)
{
// console.log(item.year + '-' + item.month + '-' + item.date)
this
.
curretIndex
=
index
},
plusMonth
:
function
()
{
if
(
this
.
date
.
month
==
11
)
{
this
.
date
.
month
=
0
...
...
@@ -101,8 +121,8 @@ export default {
d
.
setDate
(
1
)
let
dayOfFirstDay
=
d
.
getDay
()
this
.
days
=
[]
for
(
let
i
=
0
;
i
<
42
;
i
++
)
{
let
i
=
0
for
(;
i
<
42
;
i
++
)
{
d
.
setDate
(
1
)
d
.
setMonth
(
month
)
d
.
setDate
(
i
-
dayOfFirstDay
+
1
)
...
...
@@ -132,7 +152,17 @@ export default {
}
this
.
days
.
push
(
date
)
// console.log(this.days)
}
}
if
(
i
==
42
)
this
.
selectStar
()
},
selectStar
()
{
let
{
days
,
starList
}
=
this
for
(
let
i
=
0
;
i
<
starList
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
days
.
length
;
j
++
)
{
if
(
starList
[
i
].
date
==
days
[
j
].
date
&&
starList
[
i
].
year
==
days
[
j
].
year
&&
starList
[
i
].
month
==
days
[
j
].
month
)
{
days
[
j
].
isStar
=
true
}
}
}
}
...
...
@@ -146,8 +176,6 @@ export default {
this
.
current
.
year
=
d
.
getFullYear
()
this
.
current
.
month
=
d
.
getMonth
()
this
.
current
.
date
=
d
.
getDate
()
this
.
createCalendar
(
this
.
current
.
year
,
this
.
current
.
month
)
}
}
</
script
>
...
...
@@ -265,6 +293,6 @@ export default {
position
:
absolute
;
top
:
17px
;
left
:
8px
;
height
:
8px
;
height
:
8px
;
}
</
style
>
src/views/home/components/Marketing/components/ScheduleCalendar/index.vue
View file @
572bfcb
...
...
@@ -13,6 +13,7 @@
<
script
>
import
Calendar
from
'@toast-ui/calendar'
import
*
as
dayjs
from
'dayjs'
import
{
mapState
}
from
'vuex'
export
default
{
data
()
{
return
{
...
...
@@ -21,49 +22,40 @@ export default {
options
:
{
defaultView
:
'month'
,
calendars
:
[]
}
},
eventList
:
[]
}
},
computed
:
{
...
mapState
({
calendarData
:
state
=>
state
.
marketing
.
calendarData
})
},
mounted
()
{
let
container
=
this
.
$refs
.
calendar
this
.
calendar
=
new
Calendar
(
container
,
this
.
options
)
this
.
calendar
.
on
(
'clickEvent'
,
e
=>
{
console
.
log
(
e
)
//
console.log(e)
})
this
.
getCalendarData
()
this
.
getCalendarData
()
},
methods
:
{
getCalendarData
()
{
this
.
calendar
.
createEvents
([
{
id
:
'event1'
,
calendarId
:
'cal2'
,
title
:
'Weekly meeting'
,
start
:
'2023-05-07'
,
end
:
'2023-05-07'
},
{
id
:
'event2'
,
calendarId
:
'cal1'
,
title
:
'Lunch appointment'
,
start
:
'2023-05-08'
,
end
:
'2023-05-09'
},
{
id
:
'event3'
,
calendarId
:
'cal2'
,
title
:
'Vacation'
,
start
:
'2023-05-08'
,
end
:
'2023-05-10'
,
isAllday
:
true
,
category
:
'allday'
let
{
eventList
,
calendarData
,
calendar
,
currentDate
}
=
this
eventList
=
calendarData
.
map
(
item
=>
{
return
{
id
:
item
.
id
,
calendarId
:
item
.
id
,
title
:
item
.
title
,
start
:
item
.
startTime
.
replace
(
'/'
,
'-'
),
end
:
item
.
endTime
}
])
})
calendar
.
createEvents
(
eventList
)
this
.
currentDate
=
dayjs
(
this
.
calendar
.
getDate
()).
format
(
'YYYY年MM'
)
},
handlePrev
(
type
)
{
this
.
calendar
[
type
]()
this
.
getCalendarData
()
}
}
}
...
...
src/views/home/marketing.vue
View file @
572bfcb
...
...
@@ -30,7 +30,7 @@
<marketing-right></marketing-right>
</div>
</div>
<div
v-
show
=
"showCalendar"
class=
"calendar-panel"
>
<div
v-
if
=
"showCalendar"
class=
"calendar-panel"
>
<schedule-calendar
ref=
"calendar"
></schedule-calendar>
</div>
</div>
...
...
@@ -41,6 +41,7 @@ import ScheduleCalendar from './components/Marketing/components/ScheduleCalendar
import
MarketingLeft
from
'./components/Marketing/MarketingLeft'
import
MarketingMiddle
from
'./components/Marketing/MarketingMiddle'
import
MarketingRight
from
'./components/Marketing/MarketingRight'
import
{
mapActions
}
from
'vuex'
export
default
{
components
:
{
MarketingLeft
,
...
...
@@ -54,17 +55,14 @@ export default {
}
},
mounted
()
{
let
dom
=
this
.
$refs
.
calendar
.
$refs
.
full
console
.
log
(
dom
)
this
.
getCalendarListData
({})
},
methods
:
{
...
mapActions
({
getCalendarListData
:
'marketing/getCalendarListData'
}),
handleShowCalendar
()
{
this
.
showCalendar
=
!
this
.
showCalendar
console
.
log
(
this
.
$refs
.
calendar
.
$refs
.
full
.
calendar
)
let
calendar
=
this
.
$refs
.
calendar
.
$refs
.
full
.
calendar
.
render
console
.
log
(
calendar
)
calendar
()
this
.
showCalendar
=
true
},
goBack
()
{
this
.
$router
.
push
(
'/home/index'
)
...
...
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