Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
3fbafc18
Commit
3fbafc18
authored
Oct 21, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab.33.cn:CassiniatSaturn/fns_backend into dev
parents
c6ad3e25
c28b039a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
13 deletions
+37
-13
transfer.ts
src/utils/time/transfer.ts
+21
-0
index.vue
src/views/Root/OutletManagement/index.vue
+16
-13
No files found.
src/utils/time/transfer.ts
View file @
3fbafc18
...
@@ -20,6 +20,27 @@ export function transfterStrToDate(str: string) {
...
@@ -20,6 +20,27 @@ export function transfterStrToDate(str: string) {
end
=
`
${
d
.
getFullYear
()}
${
d
.
getMonth
()
+
1
}
${
d
.
getDate
()}
${
end
}
`
end
=
`
${
d
.
getFullYear
()}
${
d
.
getMonth
()
+
1
}
${
d
.
getDate
()}
${
end
}
`
const
startDate
=
new
Date
(
start
)
const
startDate
=
new
Date
(
start
)
const
endDate
=
new
Date
(
end
)
const
endDate
=
new
Date
(
end
)
console
.
log
(
start
,
'start'
);
return
[
startDate
,
endDate
]
}
else
{
return
undefined
}
}
// 早上9:00 下午17:00
export
function
transfterStrToDateSafari
(
str
:
string
)
{
const
arr
=
str
.
split
(
' '
)
if
(
arr
.
length
===
2
)
{
let
[
start
,
end
]
=
arr
start
=
start
.
replace
(
':'
,
':'
).
replace
(
'早上'
,
''
).
replace
(
'下午'
,
''
)
end
=
end
.
replace
(
':'
,
':'
).
replace
(
'早上'
,
''
).
replace
(
'下午'
,
''
)
const
d
=
new
Date
()
start
=
`
${
d
.
getFullYear
()}
/
${
d
.
getMonth
()
+
1
}
/
${
d
.
getDate
()}
${
start
}
`
end
=
`
${
d
.
getFullYear
()}
/
${
d
.
getMonth
()
+
1
}
/
${
d
.
getDate
()}
${
end
}
`
const
startDate
=
new
Date
(
start
)
const
endDate
=
new
Date
(
end
)
console
.
log
(
start
,
'start'
);
console
.
log
(
end
,
'end'
);
return
[
startDate
,
endDate
]
return
[
startDate
,
endDate
]
}
else
{
}
else
{
return
undefined
return
undefined
...
...
src/views/Root/OutletManagement/index.vue
View file @
3fbafc18
...
@@ -470,6 +470,7 @@ import transferTimeStampToMoment, {
...
@@ -470,6 +470,7 @@ import transferTimeStampToMoment, {
getOpeningHoursFromMoment
,
getOpeningHoursFromMoment
,
getWeekendStatusFromArr
,
getWeekendStatusFromArr
,
transfterStrToDate
,
transfterStrToDate
,
transfterStrToDateSafari
}
from
"@/utils/time/transfer"
;
}
from
"@/utils/time/transfer"
;
import
{
getSelfOutLet
}
from
"@/utils/outlet/index"
;
import
{
getSelfOutLet
}
from
"@/utils/outlet/index"
;
import
{
getUserMsg
}
from
"@/utils/userMsg/userMsg"
;
import
{
getUserMsg
}
from
"@/utils/userMsg/userMsg"
;
...
@@ -619,7 +620,6 @@ export default Vue.extend({
...
@@ -619,7 +620,6 @@ export default Vue.extend({
modalType
:
undefined
as
undefined
|
eModalType
,
modalType
:
undefined
as
undefined
|
eModalType
,
dataSource
:
[]
as
any
[],
dataSource
:
[]
as
any
[],
start
:
''
,
start
:
''
,
end
:
''
,
};
};
},
},
async
mounted
()
{
async
mounted
()
{
...
@@ -781,7 +781,11 @@ export default Vue.extend({
...
@@ -781,7 +781,11 @@ export default Vue.extend({
this
.
formData
.
openDays
.
push
(
"6"
);
this
.
formData
.
openDays
.
push
(
"6"
);
this
.
formData
.
openDays
.
push
(
"7"
);
this
.
formData
.
openDays
.
push
(
"7"
);
}
}
const
arr2
=
transfterStrToDate
(
record
.
opening_hours
);
// const arr2 = transfterStrToDate(record.opening_hours);
const
arr2
=
transfterStrToDateSafari
(
record
.
opening_hours
);
console
.
log
(
transfterStrToDate
(
record
.
opening_hours
),
'transfterStrToDate'
);
console
.
log
(
arr2
,
'arr2'
);
if
(
arr2
?.
length
===
2
)
{
if
(
arr2
?.
length
===
2
)
{
const
[
startDate
,
endDate
]
=
arr2
;
const
[
startDate
,
endDate
]
=
arr2
;
...
@@ -794,18 +798,17 @@ export default Vue.extend({
...
@@ -794,18 +798,17 @@ export default Vue.extend({
const
endm
=
endDate
.
getMinutes
()
<
10
?
'0'
+
endDate
.
getMinutes
():
endDate
.
getMinutes
()
+
''
const
endm
=
endDate
.
getMinutes
()
<
10
?
'0'
+
endDate
.
getMinutes
():
endDate
.
getMinutes
()
+
''
const
start
=
starh
+
':'
+
starm
const
start
=
starh
+
':'
+
starm
const
end
=
endh
+
':'
+
endm
const
end
=
endh
+
':'
+
endm
this
.
start
=
start
this
.
formData
.
startTime
=
moment
(
start
,
"HH:mm"
)
this
.
end
=
end
this
.
formData
.
endTime
=
moment
(
end
,
"HH:mm"
)
this
.
formData
.
startTime
=
moment
(
this
.
start
,
"HH:mm"
)
console
.
log
(
typeof
start
,
'start'
);
this
.
formData
.
endTime
=
moment
(
this
.
end
,
"HH:mm"
)
console
.
log
(
end
,
'end'
);
console
.
log
(
this
.
formData
.
startTime
,
'this.formData.startTime'
);
console
.
log
(
this
.
start
,
'this.start'
);
console
.
log
(
startDate
,
'startDate'
);
const
riqi
=
moment
(
startDate
,
"HH:mm"
)
console
.
log
(
riqi
,
'riqi'
);
console
.
log
(
startDate
,
'startDate'
);
console
.
log
(
starh
,
'starh'
);
console
.
log
(
arr2
,
'arr2'
);
console
.
log
(
arr2
[
0
],
'0'
);
}
}
const
ret
=
await
AddressService
.
getInstance
().
note
(
record
.
id
);
const
ret
=
await
AddressService
.
getInstance
().
note
(
record
.
id
);
...
...
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