Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zentao-view
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
zentao
zentao-view
Commits
c41cc552
Commit
c41cc552
authored
Mar 07, 2021
by
王鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(节假日): 弹窗修复
parent
4a35a886
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
22 deletions
+14
-22
HolidaysDetail.vue
src/views/holidays/HolidaysDetail.vue
+14
-22
No files found.
src/views/holidays/HolidaysDetail.vue
View file @
c41cc552
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
:title=
"modalTitle"
:title=
"modalTitle"
v-model=
"visible"
v-model=
"visible"
@
ok=
"handleOk"
@
ok=
"handleOk"
@
cancel=
"clearData"
:maskClosable=
"false"
:maskClosable=
"false"
:width=
"modalWidth"
:width=
"modalWidth"
class=
"cust-modal"
class=
"cust-modal"
...
@@ -29,13 +28,11 @@
...
@@ -29,13 +28,11 @@
<a-row>
<a-row>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-item
v-if=
"durationInput"
label=
'假期时间'
:labelCol=
"
{ span: 5 }" :wrapperCol="{ span: 17 }">
<a-form-item
v-if=
"durationInput"
label=
'假期时间'
:labelCol=
"
{ span: 5 }" :wrapperCol="{ span: 17 }">
<a-date-picker
:disabled-date=
"disabledDate"
v-decorator=
"['day',
{ initialValue: dateTime,rules: [{ required: true, message: '请选择假期时间' }]}]" style="width: 100%" @change="onChange" />
<a-date-picker
v-decorator=
"['dateTime',
{ initialValue: dateTime,rules: [{ required: true, message: '请选择假期时间' }]}]" style="width: 100%" :disabled-date="disabledDate" @change="onChange" />
<!--
<a-date-picker
:disabled-date=
"disabledDate"
v-else
style=
"width: 100%"
/>
-->
</a-form-item>
</a-form-item>
<a-form-item
v-else
label=
'假期范围'
:labelCol=
"
{ span: 5 }" :wrapperCol="{ span: 17 }">
<a-form-item
v-else
label=
'假期范围'
:labelCol=
"
{ span: 5 }" :wrapperCol="{ span: 17 }">
<a-range-picker
v-decorator=
"['dayRange',
{ initialValue: dateRange,rules: [{ required: true, message: '请选择假期范围' }]}]" :disabled-date="disabledDate" @change="onChange" />
<a-range-picker
v-decorator=
"['dayRange',
{ initialValue: dateRange,rules: [{ required: true, message: '请选择假期范围' }]}]" :disabled-date="disabledDate" @change="onChange" />
<!--
<a-range-picker
v-decorator=
"['dayRange',
{rules: [{ required: true, message: '请选择假期范围' }]}]" :disabled-date="disabledDate" v-else @change="onChange" />-->
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
...
@@ -65,21 +62,22 @@ export default {
...
@@ -65,21 +62,22 @@ export default {
modalWidth
:
800
,
modalWidth
:
800
,
durationInput
:
this
.
detailData
.
dayCode
===
SYS_CONST
.
HOLIDAY_TYPE
.
WEEKEND
,
durationInput
:
this
.
detailData
.
dayCode
===
SYS_CONST
.
HOLIDAY_TYPE
.
WEEKEND
,
detailInfo
:
this
.
detailData
,
detailInfo
:
this
.
detailData
,
dateRange
:
[
moment
(
this
.
detailData
.
startDate
),
moment
(
this
.
detailData
.
endDate
)
],
dateRange
:
this
.
isEdit
?[
moment
(
this
.
detailData
.
startDate
),
moment
(
this
.
detailData
.
endDate
)]
:
[
],
dateTime
:
moment
(
this
.
detailData
.
startDate
)
,
dateTime
:
this
.
isEdit
?
moment
(
this
.
detailData
.
startDate
):
null
,
form
:
this
.
$form
.
createForm
(
this
)
form
:
this
.
$form
.
createForm
(
this
)
,
}
}
},
},
watch
:{
watch
:{
detailData
(){
detailData
(){
this
.
form
.
setFieldsValue
({
this
.
form
.
setFieldsValue
({
name
:
this
.
detailData
.
name
,
name
:
this
.
detailData
.
name
,
dayRange
:
[
moment
(
this
.
detailData
.
startDate
),
moment
(
this
.
detailData
.
endDate
)],
dayRange
:
this
.
isEdit
?
[
moment
(
this
.
detailData
.
startDate
),
moment
(
this
.
detailData
.
endDate
)]
:
[],
day
:
moment
(
this
.
detailData
.
startDate
)
dateTime
:
this
.
isEdit
?
moment
(
this
.
detailData
.
startDate
)
:
null
})
})
this
.
detailInfo
=
this
.
detailData
this
.
detailInfo
=
this
.
detailData
this
.
durationInput
=
this
.
detailData
.
dayCode
===
SYS_CONST
.
HOLIDAY_TYPE
.
WEEKEND
this
.
durationInput
=
this
.
detailData
.
dayCode
===
SYS_CONST
.
HOLIDAY_TYPE
.
WEEKEND
}
}
},
},
methods
:
{
methods
:
{
handleOk
()
{
handleOk
()
{
...
@@ -88,7 +86,7 @@ export default {
...
@@ -88,7 +86,7 @@ export default {
addHoliday
(
this
.
detailInfo
).
then
(
response
=>
{
addHoliday
(
this
.
detailInfo
).
then
(
response
=>
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
if
(
response
&&
response
.
code
==
SYS_CONST
.
REQUEST
.
SUCCEED
)
{
this
.
visible
=
false
;
this
.
visible
=
false
;
this
.
clearData
()
//
this.clearData()
this
.
$emit
(
'flushData'
)
this
.
$emit
(
'flushData'
)
}
}
})
})
...
@@ -120,12 +118,6 @@ export default {
...
@@ -120,12 +118,6 @@ export default {
disabledDate
(
current
){
disabledDate
(
current
){
return
(
current
.
year
()
!==
this
.
detailData
.
year
)
return
(
current
.
year
()
!==
this
.
detailData
.
year
)
},
},
clearData
(){
this
.
form
.
setFieldsValue
({
name
:
''
,
dayRange
:
[]
})
}
},
},
}
}
</
script
>
</
script
>
\ No newline at end of file
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