Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
4362cd33
Commit
4362cd33
authored
Sep 15, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
值班人员移动轨迹时间点选择修改
parent
f2372b27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
23 deletions
+54
-23
workerManView.vue
gassafety-web/src/components/PopWindowGis/workerManView.vue
+53
-22
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+1
-1
No files found.
gassafety-web/src/components/PopWindowGis/workerManView.vue
View file @
4362cd33
...
...
@@ -5,16 +5,6 @@
:before-close=
"handleClose"
>
<el-form
:model=
"formData"
ref=
"formData"
:rules=
"rules"
>
<!--
<el-form-item
label=
"选择时间段:"
prop=
""
>
-->
<!--
<el-date-picker
v-model=
"dateValue"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
-->
<!--
</el-form-item>
-->
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"选择值班人员:"
prop=
"userId"
>
...
...
@@ -38,6 +28,18 @@
</el-row>
<el-row>
<el-col>
<el-form-item
label=
"请选择时间段"
prop=
"changeTime"
>
<el-radio-group
v-model=
"formData.changeTime"
@
change=
"radioChange"
>
<el-radio
:label=
"1"
>
最近2小时
</el-radio>
<el-radio
:label=
"2"
>
最近24小时
</el-radio>
<el-radio
:label=
"3"
>
自定义时间段
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row
v-show=
"formData.changeTime==3"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"选择开始时间:"
prop=
"beginTime"
>
<el-date-picker
...
...
@@ -97,13 +99,24 @@ export default {
okLoading
:
false
,
formData
:
{
userId
:
null
,
changeTime
:
1
,
beginTime
:
""
,
endTime
:
""
,
},
changeTime
:
null
,
workerManArr
:
[],
rules
:
{
userId
:
[
{
required
:
true
,
message
:
"请选择值班人员"
,
trigger
:
"blur"
},
],
changeTime
:
[
{
required
:
true
,
message
:
"选择查询时间"
,
trigger
:
[
"blur"
,
"change"
],
},
],
beginTime
:
[
{
required
:
true
,
message
:
"请输入开始时间"
,
trigger
:
"blur"
},
],
...
...
@@ -120,6 +133,8 @@ export default {
label
:
item
.
nickName
,
value
:
item
.
userId
,
}));
this
.
formData
.
beginTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
endTime
=
moment
().
add
(
2
,
"h"
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
},
methods
:
{
...
...
@@ -128,6 +143,22 @@ export default {
console
.
log
(
e
);
this
.
formData
.
userId
=
e
;
},
radioChange
(
e
)
{
if
(
e
==
1
)
{
this
.
formData
.
beginTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
endTime
=
moment
()
.
add
(
2
,
"h"
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
else
if
(
e
==
2
)
{
this
.
formData
.
beginTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
endTime
=
moment
()
.
add
(
1
,
"d"
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
else
{
this
.
formData
.
beginTime
=
""
;
this
.
formData
.
endTime
=
""
;
}
},
ok
()
{
this
.
$refs
.
formData
.
validate
((
valid
)
=>
{
if
(
valid
)
{
...
...
@@ -135,24 +166,24 @@ export default {
moment
(
this
.
formData
.
beginTime
).
valueOf
()
>
moment
(
this
.
formData
.
endTime
).
valueOf
()
)
{
this
.
msgError
(
"开始时间不能大于结束时间"
);
this
.
msgError
(
"开始时间不能大于结束时间"
);
this
.
formData
.
endTime
=
""
;
return
;
}
this
.
okLoading
=
true
;
this
.
formData
.
beginTime
=
moment
(
this
.
formData
.
beginTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
endTime
=
moment
(
this
.
formData
.
endTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
console
.
log
(
this
.
formData
);
if
(
this
.
formData
.
changeTime
!=
3
)
{
this
.
radioChange
(
this
.
formData
.
changeTime
);
}
else
{
this
.
formData
.
beginTime
=
moment
(
this
.
formData
.
beginTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
formData
.
endTime
=
moment
(
this
.
formData
.
endTime
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
// console.log(this.formData);
// 找到哪个值班人员
const
target
=
this
.
gaodeMap
.
workerManMarkArr
.
filter
((
item
)
=>
{
// console.log("userId",item.getExtData().userId)
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
4362cd33
...
...
@@ -98,6 +98,7 @@ class gaodeMap {
// 地图开始缩放删除infowindow
this
.
myMap
.
on
(
"zoomstart"
,
()
=>
{
this
.
closeInfoWindow
();
this
.
polyLinesColorClear
();
});
this
.
myMap
.
on
(
"moveend"
,
()
=>
{
if
(
this
.
handleInfoWindowOpenFunc
)
{
...
...
@@ -130,7 +131,6 @@ class gaodeMap {
changeMap
(
bool
)
{
// 卫星图
if
(
!
bool
)
{
if
(
this
.
satellite
)
return
;
this
.
satellite
=
new
AMap
.
TileLayer
.
Satellite
();
...
...
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