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 a53aad5d
authored
May 18, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
fixed
2 parents
fe2a815b
688b29ab
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
57 deletions
package.json
src/assets/arrow.png
src/main.js
src/views/home/components/Marketing/components/ScheduleCalendar/index.vue
src/views/home/marketing.vue
package.json
View file @
a53aad5
...
@@ -8,13 +8,15 @@
...
@@ -8,13 +8,15 @@
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@toast-ui/calendar"
:
"^2.1.3"
,
"axios"
:
"^0.21.1"
,
"axios"
:
"^0.21.1"
,
"babel-polyfill"
:
"^6.26.0"
,
"babel-polyfill"
:
"^6.26.0"
,
"core-js"
:
"^3.4.4"
,
"core-js"
:
"^3.4.4"
,
"el-tree-transfer"
:
"^2.2.6"
,
"el-tree-transfer"
:
"^2.2.6"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-components"
:
"^1.5.2"
,
"glsx-components"
:
"^1.5.2"
,
"glsx-table"
:
"^1.0.9"
"glsx-table"
:
"^1.0.9"
,
"work-calendar"
:
"^1.0.0"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^4.1.0"
,
"@vue/cli-plugin-babel"
:
"^4.1.0"
,
...
...
src/assets/arrow.png
0 → 100644
View file @
a53aad5
391 Bytes
src/main.js
View file @
a53aad5
...
@@ -13,6 +13,7 @@ import './public-path'
...
@@ -13,6 +13,7 @@ import './public-path'
// import 'glsx-components/dist/glsx-components.css'
// import 'glsx-components/dist/glsx-components.css'
import
'@/components'
import
'@/components'
import
{
start
}
from
'@/setup'
import
{
start
}
from
'@/setup'
import
'@toast-ui/calendar/dist/toastui-calendar.min.css'
;
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$apis
=
apis
Vue
.
prototype
.
$apis
=
apis
start
()
start
()
...
...
src/views/home/components/Marketing/components/ScheduleCalendar/index.vue
View file @
a53aad5
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 18:53:17
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-16 18:54:01
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\components\ScheduleCalendar\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<
template
>
<div>
<div
class=
"calendar-wrap"
>
<WorkCalendar
ref=
"workCalendarTemplate"
:options=
"calendarOptions"
/>
<div
class=
"header"
>
<div
class=
"header-rounded"
@
click=
"handlePrev('prev')"
>
<img
src=
"@/assets/arrow.png"
/>
</div>
<span
class=
"range"
>
{{
currentDate
}}
</span>
<div
class=
"header-rounded next"
@
click=
"handlePrev('next')"
><img
src=
"@/assets/arrow.png"
/></div>
</div>
<div
ref=
"calendar"
class=
"calendar"
></div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
// import WorkCalendar from 'work-calendar';
import
Calendar
from
'@toast-ui/calendar'
import
*
as
dayjs
from
'dayjs'
export
default
{
export
default
{
// components: {
// WorkCalendar
// },
data
()
{
data
()
{
return
{
return
{
calendarOptions
:
{
calendar
:
''
,
TaskData
:
[
currentDate
:
''
,
[
options
:
{
defaultView
:
'month'
,
calendars
:
[]
}
}
},
mounted
()
{
let
container
=
this
.
$refs
.
calendar
this
.
calendar
=
new
Calendar
(
container
,
this
.
options
)
this
.
calendar
.
on
(
'clickEvent'
,
e
=>
{
console
.
log
(
e
)
})
this
.
getCalendarData
()
},
methods
:
{
getCalendarData
()
{
this
.
calendar
.
createEvents
([
{
{
title
:
'第一组:任务标题
1'
,
id
:
'event
1'
,
startTime
:
new
Date
()
,
calendarId
:
'cal2'
,
duration
:
20
,
title
:
'Weekly meeting'
,
endTime
:
new
Date
()
,
start
:
'2023-05-07'
,
class
:
'custom-class-name
'
end
:
'2023-05-07
'
},
},
{
{
title
:
'第一组:任务标题2'
,
id
:
'event2'
,
startTime
:
new
Date
(),
calendarId
:
'cal1'
,
duration
:
20
,
title
:
'Lunch appointment'
,
endTime
:
new
Date
(),
start
:
'2023-05-08'
,
class
:
'custom-class-name'
end
:
'2023-05-09'
}
},
],
[
{
{
title
:
'第二组:任务标题1'
,
id
:
'event3'
,
startTime
:
new
Date
(),
calendarId
:
'cal2'
,
duration
:
20
,
title
:
'Vacation'
,
endTime
:
new
Date
(),
start
:
'2023-05-08'
,
class
:
'custom-class-name'
end
:
'2023-05-10'
,
}
isAllday
:
true
,
]
category
:
'allday'
],
Holiday
:
[
{
date
:
'2021/4/3'
,
name
:
'清明节'
},
{
date
:
'2021/4/4'
,
name
:
'清明节'
},
{
date
:
'2021/4/5'
,
name
:
'清明节'
}
],
Workday
:
[
{
date
:
'2021/4/25'
,
name
:
'补劳动节的班'
},
{
date
:
'2021/5/8'
,
name
:
'补劳动节的班'
}
]
}
}
])
this
.
currentDate
=
dayjs
(
this
.
calendar
.
getDate
()).
format
(
'YYYY年MM'
)
},
handlePrev
(
type
)
{
this
.
calendar
[
type
]()
this
.
getCalendarData
()
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.calendar-wrap
{
width
:
100%
;
height
:
100%
;
margin-bottom
:
20px
;
}
.header
{
display
:
flex
;
margin
:
11px
0
;
align-items
:
center
;
margin-left
:
-76px
;
position
:
relative
;
left
:
50%
;
.range
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#333333
;
text-align
:
center
;
margin
:
0
8px
;
}
.next
{
img
{
transform
:
rotate
(
270deg
);
}
}
}
.calendar
{
width
:
100%
;
height
:
100%
;
}
.header-rounded
{
width
:
28px
;
height
:
28px
;
background
:
#ffffff
;
border
:
1px
solid
#e8e8ea
;
border-radius
:
2px
;
display
:
flex
;
img
{
width
:
11px
;
height
:
9px
;
margin
:
auto
;
transform
:
rotate
(
90deg
);
}
}
</
style
>
src/views/home/marketing.vue
View file @
a53aad5
...
@@ -48,19 +48,18 @@ export default {
...
@@ -48,19 +48,18 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
isFull
:
true
isFull
:
true
}
}
},
},
mounted
(){
mounted
()
{
let
dom
=
this
.
$refs
.
calendar
.
$refs
.
full
let
dom
=
this
.
$refs
.
calendar
.
$refs
.
full
console
.
log
(
dom
)
console
.
log
(
dom
)
},
},
methods
:
{
methods
:
{
handleShowCalendar
(){
handleShowCalendar
()
{
this
.
isFull
=
!
this
.
isFull
this
.
isFull
=
!
this
.
isFull
console
.
log
(
this
.
$refs
.
calendar
.
$refs
.
full
.
calendar
)
console
.
log
(
this
.
$refs
.
calendar
.
$refs
.
full
.
calendar
)
let
calendar
=
this
.
$refs
.
calendar
.
$refs
.
full
.
calendar
.
render
let
calendar
=
this
.
$refs
.
calendar
.
$refs
.
full
.
calendar
.
render
console
.
log
(
calendar
)
console
.
log
(
calendar
)
calendar
()
calendar
()
...
@@ -92,6 +91,9 @@ export default {
...
@@ -92,6 +91,9 @@ export default {
.market-bottom
{
.market-bottom
{
display
:
flex
;
display
:
flex
;
margin-right
:
10px
;
height
:
calc
(
100%
-
210px
);
.market-middle
{
.market-middle
{
flex
:
1
;
flex
:
1
;
}
}
...
...
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