Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
杨硕
template_vue
Commits
20b88ee1
Commit
20b88ee1
authored
Oct 09, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领用
parent
e5cc4531
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
8 deletions
+57
-8
draw.vue
src/views/equipment/draw.vue
+27
-1
draw.vue
src/views/processManagement/draw.vue
+30
-7
No files found.
src/views/equipment/draw.vue
View file @
20b88ee1
...
...
@@ -520,6 +520,16 @@ export default {
this
.
getCodeDict
()
}
,
methods
:
{
// 判断是否跟列表中的第一个是否相同
isSameMonths
(
dateArray
,
data
)
{
for
(
let
i
=
0
;
i
<
dateArray
.
length
;
i
++
)
{
if
(
dateArray
[
i
].
getMonth
()
!==
data
.
getMonth
())
{
console
.
log
(
'111'
)
return
false
}
}
return
true
}
,
// 判断日期是否相同
isSameMonthDates
(
datesArray
)
{
console
.
log
(
'datesArray'
,
datesArray
)
...
...
@@ -531,7 +541,11 @@ export default {
const
firstMonth
=
datesArray
[
0
].
getMonth
()
// 遍历数组中的日期,检查月份是否都相同
for
(
let
i
=
1
;
i
<
datesArray
.
length
;
i
++
)
{
console
.
log
(
'222'
)
console
.
log
(
'getMonth'
,
datesArray
[
i
].
getMonth
())
console
.
log
(
'firstMonth'
,
firstMonth
)
if
(
datesArray
[
i
].
getMonth
()
!==
firstMonth
)
{
console
.
log
(
'111'
)
return
false
}
}
...
...
@@ -557,6 +571,18 @@ export default {
}
)
console
.
log
(
'i'
,
i
)
console
.
log
(
'number'
,
number
)
// 如果选中一个的话,校验是否跟列表中的第一个时间是否相同
if
(
number
===
1
)
{
var
oneCheckTimeList
=
[]
list1
.
forEach
(
item
=>
{
oneCheckTimeList
.
push
(
new
Date
(
item
.
rkDate
))
}
)
if
(
this
.
isSameMonths
(
oneCheckTimeList
,
new
Date
(
list2
[
0
].
createDate
)))
{
return
false
}
else
{
return
true
}
}
if
(
i
===
number
)
{
console
.
log
(
'1false'
)
return
false
...
...
@@ -564,7 +590,7 @@ export default {
list1
.
forEach
(
item
=>
{
checkTimeList
.
push
(
new
Date
(
item
.
rkDate
))
}
)
if
(
this
.
isSameMonth
Dates
(
checkTimeList
))
{
if
(
this
.
isSameMonth
s
(
checkTimeList
,
new
Date
(
list2
[
0
].
createDate
)
))
{
console
.
log
(
'2false'
)
return
false
}
else
{
...
...
src/views/processManagement/draw.vue
View file @
20b88ee1
...
...
@@ -564,6 +564,16 @@ export default {
this
.
getList
()
}
,
methods
:
{
// 判断是否跟列表中的第一个是否相同
isSameMonths
(
dateArray
,
data
)
{
for
(
let
i
=
0
;
i
<
dateArray
.
length
;
i
++
)
{
if
(
dateArray
[
i
].
getMonth
()
!==
data
.
getMonth
())
{
console
.
log
(
'111'
)
return
false
}
}
return
true
}
,
// 判断日期是否相同
isSameMonthDates
(
datesArray
)
{
console
.
log
(
'datesArray'
,
datesArray
)
...
...
@@ -583,7 +593,7 @@ export default {
return
true
}
,
// 符合弹出权限菜单时返回 true,不符合false
condition
(
list1
,
list2
,
number
)
{
condition
(
list1
,
list2
,
number
,
time
)
{
// 所有数据的id的集合
var
idList
=
[]
// 前选中的数量id的集合
...
...
@@ -600,17 +610,24 @@ export default {
}
}
)
}
)
console
.
log
(
'list1'
,
list1
)
console
.
log
(
'checkIdList'
,
checkIdList
)
console
.
log
(
'i'
,
i
)
console
.
log
(
'number'
,
number
)
if
(
number
===
1
)
{
var
oneCheckTimeList
=
[]
list1
.
forEach
(
item
=>
{
oneCheckTimeList
.
push
(
new
Date
(
item
.
rkDate
))
}
)
if
(
this
.
isSameMonths
(
oneCheckTimeList
,
new
Date
(
time
)))
{
return
false
}
else
{
return
true
}
}
if
(
i
===
number
)
{
return
false
}
else
{
list1
.
forEach
(
item
=>
{
checkTimeList
.
push
(
new
Date
(
item
.
rkDate
))
}
)
if
(
this
.
isSameMonth
Dates
(
checkTimeList
))
{
if
(
this
.
isSameMonth
s
(
checkTimeList
,
new
Date
(
time
)
))
{
return
false
}
else
{
return
true
...
...
@@ -804,8 +821,14 @@ export default {
this
.
openHandle
=
true
return
this
.
$message
.
warning
(
'您选择的设备数据不符合您申请设备的数量'
)
}
let
checkTime
=
''
if
(
this
.
radio1
===
'2'
){
checkTime
=
this
.
detailApplyList
[
0
].
recycleDate
}
else
if
(
this
.
radio1
===
'1'
)
{
checkTime
=
this
.
detailApplyList
[
0
].
createDate
}
// 判断是否弹出权限菜单,true是符合条件,false是不符合条件
if
(
this
.
condition
(
this
.
canceList
,
this
.
detailApplyList
,
this
.
singleDetails
.
pnumber
))
{
if
(
this
.
condition
(
this
.
canceList
,
this
.
detailApplyList
,
this
.
singleDetails
.
pnumber
,
checkTime
))
{
this
.
monthDate
=
true
this
.
openHandle
=
false
}
...
...
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