Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinzhedeai
GaoQuYingJiH5-ASD
Commits
ffa772bc
Commit
ffa772bc
authored
Aug 07, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:特种作业报备时,时间需选择当前和当前之后的时间
parent
c9ff1478
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
util.js
sdk/util.js
+14
-0
_tezhongzuoye_detail.js
src/_tezhongzuoye_detail.js
+1
-1
No files found.
sdk/util.js
View file @
ffa772bc
...
...
@@ -40,6 +40,20 @@ gemhoUtil.getTargetDateYMD = function (dayLength, type) {
tempDate
.
getDate
()
<
10
?
'
0
'
+
tempDate
.
getDate
()
:
tempDate
.
getDate
()
return
year
+
'
-
'
+
month
+
'
-
'
+
day
}
gemhoUtil
.
getTargetDateYMDHM
=
function
()
{
const
now
=
new
Date
();
const
year
=
now
.
getFullYear
();
// 获取年份
const
month
=
String
(
now
.
getMonth
()
+
1
).
padStart
(
2
,
'
0
'
);
// 获取月份(0-11),所以+1
const
day
=
String
(
now
.
getDate
()).
padStart
(
2
,
'
0
'
);
// 获取日期
const
hours
=
String
(
now
.
getHours
()).
padStart
(
2
,
'
0
'
);
// 获取小时
const
minutes
=
String
(
now
.
getMinutes
()).
padStart
(
2
,
'
0
'
);
// 获取分钟
// 返回格式为 "YYYY-MM-DD HH:MM"
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
`
;
}
gemhoUtil
.
getTargetDateYM
=
function
(
dayLength
,
type
)
{
var
dayLength
=
dayLength
||
0
var
tempDate
=
new
Date
()
...
...
src/_tezhongzuoye_detail.js
View file @
ffa772bc
...
...
@@ -18,7 +18,7 @@ window.addEventListener("load", function () {
showStartDatePicker
:
false
,
// 开始时间选择器显示控制
showEndDatePicker
:
false
,
// 结束时间选择器显示控制
showDatePicker
:
false
,
// 控制日期选择器显示
minDate
:
new
Date
(
gemhoUtil
.
getTargetDateYMD
()),
// 最小可选日期
minDate
:
new
Date
(
gemhoUtil
.
getTargetDateYMD
HM
()),
// 最小可选日期
maxDate
:
new
Date
(
2099
,
11
,
31
),
// 最大可选日期
tabList4lv2
:
[],
// 日期选择的最小范围,这里设置为当前日期的前 10 年
...
...
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