Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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-progress
Commits
eda076c9
Commit
eda076c9
authored
Feb 26, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
29d7926b
2c4baccf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
477 additions
and
37 deletions
+477
-37
DeviceA.vue
gassafetyprogress-web/src/components/bigWindow/DeviceA.vue
+8
-6
User.vue
gassafetyprogress-web/src/components/bigWindow/User.vue
+4
-5
UserCenter.vue
...afetyprogress-web/src/components/bigWindow/UserCenter.vue
+408
-0
map.js
gassafetyprogress-web/src/utils/mapClass/map.js
+57
-26
No files found.
gassafetyprogress-web/src/components/bigWindow/DeviceA.vue
View file @
eda076c9
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-02-2
5 18:34:00
* @LastEditTime: 2022-02-2
6 14:16:23
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
...
@@ -63,19 +63,19 @@
...
@@ -63,19 +63,19 @@
<div
class=
"tbody flex"
>
<div
class=
"tbody flex"
>
<div
class=
"first zzz"
>
{{
"流量计与压力表"
}}
</div>
<div
class=
"first zzz"
>
{{
"流量计与压力表"
}}
</div>
<div
class=
""
>
{{
deviceData
.
pressureFlows
.
length
}}
</div>
<div
class=
""
>
{{
deviceData
.
pressureFlows
.
length
}}
</div>
<div
class=
""
>
<div
v-unValue
class=
""
>
{{
(
Math
.
random
()
*
deviceData
.
pressureFlows
.
length
)
>>
1
}}
{{
(
Math
.
random
()
*
deviceData
.
pressureFlows
.
length
)
>>
1
}}
</div>
</div>
<div
class=
""
>
<div
v-unValue
class=
""
>
{{
(
Math
.
random
()
*
deviceData
.
pressureFlows
.
length
)
>>
1
}}
{{
(
Math
.
random
()
*
deviceData
.
pressureFlows
.
length
)
>>
1
}}
</div>
</div>
<div
class=
""
>
<div
v-unValue
class=
""
>
{{
(
Math
.
random
()
*
deviceData
.
pressureFlows
.
length
)
>>
1
}}
{{
(
Math
.
random
()
*
deviceData
.
pressureFlows
.
length
)
>>
1
}}
</div>
</div>
<div
class=
""
>
<div
v-unValue
class=
""
>
{{
(
Math
.
random
()
*
deviceData
.
pressureFlows
.
length
)
>>
1
}}
{{
(
Math
.
random
()
*
deviceData
.
pressureFlows
.
length
)
>>
1
}}
</div>
</div>
<div
class=
"last zzz"
>
<div
v-unValue
class=
"last zzz"
>
{{
{{
deviceData
.
pressureFlows
.
filter
((
item
)
=>
{
deviceData
.
pressureFlows
.
filter
((
item
)
=>
{
return
item
.
deviceState
==
2
;
return
item
.
deviceState
==
2
;
...
@@ -118,6 +118,8 @@ export default {
...
@@ -118,6 +118,8 @@ export default {
this
.
companyType
[
item
.
conpanyId
]
=
item
.
companyName
;
this
.
companyType
[
item
.
conpanyId
]
=
item
.
companyName
;
}
);
}
);
}
}
console
.
log
(
this
.
deviceData
)
}
,
}
,
methods
:
{
methods
:
{
close
()
{
close
()
{
...
...
gassafetyprogress-web/src/components/bigWindow/User.vue
View file @
eda076c9
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2022-01-27 14:25:45
* @Date: 2022-01-27 14:25:45
* @LastEditTime: 2022-02-
17 10:12:02
* @LastEditTime: 2022-02-
26 14:16:16
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /hello-world/src/views/components/User.vue
* @FilePath: /hello-world/src/views/components/User.vue
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<div
class=
"group flex"
>
<div
class=
"group flex"
>
<div
class=
"left"
>
联系方式:
</div>
<div
class=
"left"
>
联系方式:
</div>
<div
class=
"right"
>
{{
deviceData
.
phone
}}
</div>
<div
v-unValue
class=
"right"
>
{{
deviceData
.
phone
}}
</div>
</div>
</div>
<div
class=
"group flex"
>
<div
class=
"group flex"
>
...
@@ -32,16 +32,15 @@
...
@@ -32,16 +32,15 @@
</div>
</div>
</div>
</div>
<div
class=
"group flex"
>
<
!--
<
div
class=
"group flex"
>
<div
class=
"left"
>
所属公司:
</div>
<div
class=
"left"
>
所属公司:
</div>
<div
class=
"right"
>
{{
companyType
[
deviceData
.
companyType
]
}}
</div>
<div
class=
"right"
>
{{
companyType
[
deviceData
.
companyType
]
}}
</div>
</div>
</div>
-->
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
companyType
}
from
"@/utils/mapClass/config.js"
;
import
{
companyType
}
from
"@/utils/mapClass/config.js"
;
import
{
mapGetters
}
from
"vuex"
;
export
default
{
export
default
{
data
()
{
data
()
{
...
...
gassafetyprogress-web/src/components/bigWindow/UserCenter.vue
0 → 100644
View file @
eda076c9
This diff is collapsed.
Click to expand it.
gassafetyprogress-web/src/utils/mapClass/map.js
View file @
eda076c9
/*
/*
* @Author: your name
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-02-26
09:55:44
* @LastEditTime: 2022-02-26
13:59:03
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js
* @FilePath: /test/hello-world/src/utils/mapClass.js
...
@@ -444,19 +444,38 @@ export class EditorMap {
...
@@ -444,19 +444,38 @@ export class EditorMap {
if
(
!
this
.
infowindow
)
return
;
if
(
!
this
.
infowindow
)
return
;
this
.
infowindow
.
close
();
this
.
infowindow
.
close
();
}
}
allilter
(
companyArr
,
typeArr
)
{
for
(
let
pipeItem
in
this
.
pipeArr
)
{
this
.
pipeArr
[
pipeItem
].
forEach
((
pipe
)
=>
{
const
data
=
pipe
.
getExtData
();
if
(
companyArr
.
indexOf
(
data
.
companyType
+
""
)
>=
0
)
{
pipe
.
show
();
}
else
{
pipe
.
hide
();
}
});
}
for
(
let
deviceItem
in
this
.
allDevice
)
{
this
.
allDevice
[
deviceItem
].
forEach
((
device
)
=>
{
const
data
=
device
.
getExtData
();
// 设备过滤受到bigwindow页面的的两种制约,companyArr, typeArr 两个数组制约显示隐藏
// 燃气没有公司,所以没有device.companyType不收到公司的控制
const
companyHas
=
companyArr
.
indexOf
(
data
.
companyType
+
""
)
>=
0
;
// 设备存在
const
deviceHas
=
typeArr
.
indexOf
(
data
.
iconType
+
""
)
>=
0
;
// 必须设备存在数组里,才会显示设备 !data.companyType代表用户不受公司制约
if
(
deviceHas
&&
(
companyHas
||
!
data
.
companyType
))
{
device
.
show
();
}
else
{
device
.
hide
();
}
});
}
}
// 根据公司过滤是否显示 公司由一个数组传过来
// 根据公司过滤是否显示 公司由一个数组传过来
companyFilter
(
companyArr
)
{
companyFilter
(
companyArr
)
{
for
(
let
pipeItem
in
this
.
pipeArr
)
{
for
(
let
pipeItem
in
this
.
pipeArr
)
{
// 如果item属于数组说明要显示,凑则就是隐藏
// if (companyArr.indexOf(+pipeItem+'') >= 0) {
// this.pipeArr[pipeItem].forEach((pipe) => {
// pipe.show();
// });
// } else {
// this.pipeArr[pipeItem].forEach((pipe) => {
// pipe.hide();
// });
// }
this
.
pipeArr
[
pipeItem
].
forEach
((
pipe
)
=>
{
this
.
pipeArr
[
pipeItem
].
forEach
((
pipe
)
=>
{
const
data
=
pipe
.
getExtData
();
const
data
=
pipe
.
getExtData
();
if
(
companyArr
.
indexOf
(
data
.
companyType
+
""
)
>=
0
)
{
if
(
companyArr
.
indexOf
(
data
.
companyType
+
""
)
>=
0
)
{
...
@@ -467,25 +486,27 @@ export class EditorMap {
...
@@ -467,25 +486,27 @@ export class EditorMap {
});
});
}
}
for
(
let
deviceItem
in
this
.
allDevice
)
{
for
(
let
deviceItem
in
this
.
allDevice
)
{
// if (companyArr.indexOf(+deviceItem+'') >= 0) {
// this.allDevice[deviceItem].forEach((device) => {
// device.show();
// });
// } else {
// this.allDevice[deviceItem].forEach((device) => {
// device.hide();
// });
// }
console
.
log
(
this
.
allDevice
);
this
.
allDevice
[
deviceItem
].
forEach
((
device
)
=>
{
this
.
allDevice
[
deviceItem
].
forEach
((
device
)
=>
{
const
data
=
device
.
getExtData
();
const
data
=
device
.
getExtData
();
// 燃气没有公司,所以没有device.companyType不收到公司的控制
// 燃气没有公司,所以没有device.companyType不收到公司的控制
const
companyHas
=
companyArr
.
indexOf
(
data
.
companyType
+
""
)
>=
0
;
// 必须设备存在数组里,才会显示设备 !data.companyType代表用户不受公司制约
if
(
companyHas
||
!
data
.
companyType
)
{
device
.
show
();
}
else
{
device
.
hide
();
}
});
}
}
if
(
// 根据设备类型隐藏展示
companyArr
.
indexOf
(
data
.
companyType
+
""
)
>=
0
||
iconTypeFilter
(
typeArr
)
{
!
data
.
companyType
for
(
let
deviceItem
in
this
.
allDevice
)
{
)
{
this
.
allDevice
[
deviceItem
].
forEach
((
device
)
=>
{
if
(
typeArr
.
indexOf
(
deviceItem
+
""
)
>=
0
)
{
device
.
show
();
device
.
show
();
}
else
{
}
else
{
device
.
hide
();
device
.
hide
();
...
@@ -493,10 +514,20 @@ export class EditorMap {
...
@@ -493,10 +514,20 @@ export class EditorMap {
});
});
}
}
}
}
// 公司改变,先调用设备方法,在调用公司方法
companyChange
(
companyArr
,
typeArr
)
{
this
.
iconTypeFilter
(
typeArr
);
this
.
companyFilter
(
companyArr
);
}
// 设备选择,先调用公司方法,在调用设备方法覆盖
deviceChange
(
companyArr
,
typeArr
)
{
this
.
companyFilter
(
companyArr
);
this
.
iconTypeFilter
(
typeArr
);
}
// 卫星图切换
// 卫星图切换
satellite
=
null
;
satellite
=
null
;
changeMap
(
bool
)
{
changeMap
(
bool
)
{
// 卫星
图
// 卫星
,
if
(
!
bool
)
{
if
(
!
bool
)
{
if
(
this
.
satellite
)
return
;
if
(
this
.
satellite
)
return
;
this
.
satellite
=
new
AMap
.
TileLayer
.
Satellite
();
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