Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
work-log
Project
Project
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
高宇
work-log
Commits
c0d448fa
Commit
c0d448fa
authored
Apr 30, 2019
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成日程管理;
parent
00f2d362
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
20 deletions
+56
-20
addCalendar.vue
src/components/calendar/calendar/addCalendar.vue
+3
-3
editCalendar.vue
src/components/calendar/calendar/editCalendar.vue
+3
-3
operationCalendar.vue
src/components/calendar/calendar/operationCalendar.vue
+13
-6
fullCalendarGrid.vue
src/components/calendar/fullCalendarGrid.vue
+1
-1
fullCalendarLine.vue
src/components/calendar/fullCalendarLine.vue
+1
-1
list.vue
src/components/calendar/list.vue
+28
-5
singleItemMixin.js
src/lib/singleItemMixin.js
+7
-1
No files found.
src/components/calendar/calendar/addCalendar.vue
View file @
c0d448fa
...
...
@@ -43,13 +43,13 @@
message
:
'保存成功!'
,
type
:
'success'
})
this
.
close
(
true
)
this
.
close
(
true
,
from
.
Calendars
)
this
.
errorData
=
{}
this
.
$refs
.
operationCalendar
.
resetForm
()
},
error
=>
{
error
.
msg
.
forEach
(
item
=>
{
this
.
$set
(
this
.
errorData
,
item
.
name
,
item
.
error
)
})
}).
finally
(()
=>
{
this
.
close
(
true
,
from
.
Calendars
)
})
},
close
(
getList
)
{
...
...
src/components/calendar/calendar/editCalendar.vue
View file @
c0d448fa
...
...
@@ -68,13 +68,13 @@
message
:
'保存成功!'
,
type
:
'success'
})
this
.
close
(
true
)
this
.
close
(
true
,
from
.
Calendars
)
this
.
errorData
=
{}
this
.
$refs
.
operationCalendar
.
resetForm
()
},
error
=>
{
error
.
msg
.
forEach
(
item
=>
{
this
.
$set
(
this
.
errorData
,
item
.
name
,
item
.
error
)
})
}).
finally
(()
=>
{
this
.
close
(
true
,
from
.
Calendars
)
})
},
close
(
getList
)
{
...
...
src/components/calendar/calendar/operationCalendar.vue
View file @
c0d448fa
...
...
@@ -161,6 +161,7 @@
},
initAdd
(
info
,
type
)
{
// this.Calendars.start_at = ''
if
(
info
)
{
if
(
type
===
'dayGridMonth'
)
{
this
.
Calendars
.
start_at
=
info
.
startStr
+
' 00:00:00'
this
.
Calendars
.
end_at
=
dateFormatter
(
new
Date
(
info
.
endStr
).
getTime
()
-
1000
*
60
*
60
*
24
)
+
' 23:59:59'
...
...
@@ -168,6 +169,7 @@
this
.
Calendars
.
start_at
=
info
.
startStr
this
.
Calendars
.
end_at
=
info
.
endStr
}
}
requestAPI
(
api
.
getCalendarNewOptions
).
then
(
res
=>
{
Object
.
keys
(
this
.
options
).
forEach
(
item
=>
{
this
.
options
[
item
]
=
res
.
options
[
item
]
...
...
@@ -190,6 +192,11 @@
this
.
options
[
item
]
=
res
.
options
[
item
]
})
})
},
resetForm
()
{
Object
.
keys
(
this
.
Calendars
).
forEach
(
item
=>
{
this
.
Calendars
[
item
]
=
''
})
}
},
props
:
[
'errorData'
]
...
...
src/components/calendar/fullCalendarGrid.vue
View file @
c0d448fa
...
...
@@ -176,7 +176,7 @@
}
</
script
>
<
style
scoped
lang=
"sass"
>
<
style
lang=
"sass"
>
@import
'~@fullcalendar/core/main.css';
@
import
'~@fullcalendar/daygrid/main.css'
;
@import
'~@fullcalendar/timegrid/main.css';
...
...
src/components/calendar/fullCalendarLine.vue
View file @
c0d448fa
...
...
@@ -177,7 +177,7 @@
</
script
>
<
style
scoped
lang=
"sass"
>
<
style
lang=
"sass"
>
@import
'~@fullcalendar/core/main.css';
@
import
'~@fullcalendar/daygrid/main.css'
;
@import
'~@fullcalendar/timegrid/main.css';
...
...
src/components/calendar/list.vue
View file @
c0d448fa
...
...
@@ -82,6 +82,7 @@
requestAPI
,
api
}
from
'@/lib/commonMixin'
import
$
from
'jquery'
export
default
{
name
:
''
,
...
...
@@ -244,7 +245,29 @@
}).
finally
(
_
=>
{
this
.
loading
=
false
})
},
handleBodyClick
(
e
)
{
if
(
e
.
target
.
contains
(
document
.
getElementsByClassName
(
'portal-content'
)[
0
]))
{
// console.log('包含')
this
.
popupClose
()
}
else
{
if
(
$
(
e
.
target
).
parents
(
'.portal-content'
).
length
===
0
)
{
if
(
$
(
e
.
target
).
parents
(
'.fc-view-container'
).
length
>
0
)
{
return
}
this
.
popupClose
()
}
// console.log('不包含')
}
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
document
.
querySelector
(
'body'
).
addEventListener
(
'click'
,
this
.
handleBodyClick
)
})
},
beforeDestroy
()
{
document
.
querySelector
(
'body'
).
removeEventListener
(
'click'
,
this
.
handleBodyClick
)
},
created
()
{
this
.
getFilter
()
...
...
src/lib/singleItemMixin.js
View file @
c0d448fa
...
...
@@ -120,7 +120,13 @@ export default {
deep
:
true
},
'timeItem'
(
val
)
{
this
.
$emit
(
'update:item'
,
val
)
let
times
=
''
if
(
val
.
indexOf
(
'T'
))
{
times
=
val
.
split
(
'+'
)[
0
].
split
(
'T'
).
join
(
' '
)
}
else
{
times
=
val
}
this
.
$emit
(
'update:item'
,
times
)
},
'inputSelectItem'
(
val
)
{
this
.
$emit
(
'update:inputSelect'
,
val
)
...
...
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