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
38f8fe2b
Commit
38f8fe2b
authored
Feb 26, 2022
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传master
parent
a5be4eff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
79 deletions
+145
-79
DeviceA.vue
gassafetyprogress-web/src/components/bigWindow/DeviceA.vue
+3
-2
rightBar.vue
gassafetyprogress-web/src/components/bigWindow/rightBar.vue
+1
-1
map.js
gassafetyprogress-web/src/utils/mapClass/map.js
+4
-3
index.vue
gassafetyprogress-web/src/views/bigWindow/index.vue
+137
-73
No files found.
gassafetyprogress-web/src/components/bigWindow/DeviceA.vue
View file @
38f8fe2b
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-02-26
14:16:23
* @LastEditTime: 2022-02-26
23:06:21
* @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
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<div
class=
"group"
>
<div
class=
"group"
>
<div
class=
"left"
>
设备类型:
</div>
<div
class=
"left"
>
设备类型:
</div>
<div
class=
"right zzz"
>
<div
class=
"right zzz"
>
{{
deviceType
[
deviceData
.
t
ype
]
}}
{{
deviceType
[
deviceData
.
iconT
ype
]
}}
</div>
</div>
</div>
</div>
<div
class=
"group"
>
<div
class=
"group"
>
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
>
>
{{
deviceData
.
stationAddr
||
"-"
}}
{{
deviceData
.
stationAddr
||
"-"
}}
</div>
</div>
<div
v-else
>
-
</div>
</div>
</div>
</div>
</div>
...
...
gassafetyprogress-web/src/components/bigWindow/rightBar.vue
View file @
38f8fe2b
...
@@ -450,7 +450,7 @@
...
@@ -450,7 +450,7 @@
this
.
timerAni
();
this
.
timerAni
();
},
},
timerAni
()
{
timerAni
()
{
console
.
log
(
"zhix"
)
const
selectWrap
=
this
.
$refs
.
table
.
$el
.
querySelector
(
const
selectWrap
=
this
.
$refs
.
table
.
$el
.
querySelector
(
".el-table__body-wrapper"
".el-table__body-wrapper"
);
);
...
...
gassafetyprogress-web/src/utils/mapClass/map.js
View file @
38f8fe2b
/*
/*
* @Author: your name
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-02-26
13:59:03
* @LastEditTime: 2022-02-26
23:23:01
* @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
...
@@ -445,7 +445,7 @@ export class EditorMap {
...
@@ -445,7 +445,7 @@ export class EditorMap {
this
.
infowindow
.
close
();
this
.
infowindow
.
close
();
}
}
allilter
(
companyArr
,
typeArr
)
{
all
f
ilter
(
companyArr
,
typeArr
)
{
for
(
let
pipeItem
in
this
.
pipeArr
)
{
for
(
let
pipeItem
in
this
.
pipeArr
)
{
this
.
pipeArr
[
pipeItem
].
forEach
((
pipe
)
=>
{
this
.
pipeArr
[
pipeItem
].
forEach
((
pipe
)
=>
{
const
data
=
pipe
.
getExtData
();
const
data
=
pipe
.
getExtData
();
...
@@ -463,7 +463,8 @@ export class EditorMap {
...
@@ -463,7 +463,8 @@ export class EditorMap {
// 燃气没有公司,所以没有device.companyType不收到公司的控制
// 燃气没有公司,所以没有device.companyType不收到公司的控制
const
companyHas
=
companyArr
.
indexOf
(
data
.
companyType
+
""
)
>=
0
;
const
companyHas
=
companyArr
.
indexOf
(
data
.
companyType
+
""
)
>=
0
;
// 设备存在
// 设备存在
const
deviceHas
=
typeArr
.
indexOf
(
data
.
iconType
+
""
)
>=
0
;
const
deviceHas
=
typeArr
.
indexOf
(
+
data
.
iconType
)
>=
0
;
console
.
log
(
deviceHas
)
// 必须设备存在数组里,才会显示设备 !data.companyType代表用户不受公司制约
// 必须设备存在数组里,才会显示设备 !data.companyType代表用户不受公司制约
if
(
deviceHas
&&
(
companyHas
||
!
data
.
companyType
))
{
if
(
deviceHas
&&
(
companyHas
||
!
data
.
companyType
))
{
device
.
show
();
device
.
show
();
...
...
gassafetyprogress-web/src/views/bigWindow/index.vue
View file @
38f8fe2b
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2022-01-11 13:44:17
* @Date: 2022-01-11 13:44:17
* @LastEditTime: 2022-02-26 2
2:54:46
* @LastEditTime: 2022-02-26 2
3:31:14
* @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/views/Home.vue
* @FilePath: /test/hello-world/src/views/Home.vue
...
@@ -11,6 +11,15 @@
...
@@ -11,6 +11,15 @@
<div
class=
"goSystem"
@
click=
"$router.push('/index')"
>
进入管理系统
</div>
<div
class=
"goSystem"
@
click=
"$router.push('/index')"
>
进入管理系统
</div>
<div
id=
"map"
></div>
<div
id=
"map"
></div>
<Center
:show=
"show"
:centerData=
"centerData"
/>
<Center
:show=
"show"
:centerData=
"centerData"
/>
<UserCenter
:title=
"centerTitle"
:show=
"centerShow"
ref=
"userCenter"
:detcetorList=
"detcetorList"
:userId=
"centerUserId"
:total=
"centerTotal"
:pageSize=
"20"
/>
<PipeColor
/>
<PipeColor
/>
<!-- 底部按钮 -->
<!-- 底部按钮 -->
<div
class=
"home-div"
>
<div
class=
"home-div"
>
...
@@ -36,12 +45,21 @@
...
@@ -36,12 +45,21 @@
</div>
</div>
<!-- 设备按钮 -->
<!-- 设备按钮 -->
<div
class=
"typelist-div"
>
<div
class=
"typelist-div"
>
<div
class=
"list"
v-for=
"(item,index) in arr"
:key=
"index"
:class=
"item.ischeck==true?'active':''"
@
click=
"sel1(index,item)"
>
<div
<img
:src=
"item.imgurl"
style=
"margin-top: 2px;float: left;margin-right: 3px;"
/>
{{
item
.
name
}}
class=
"list"
</div>
v-for=
"(item, index) in arr"
:key=
"index"
:class=
"selarr1.indexOf(item.val) >= 0 ? 'active' : ''"
@
click=
"sel1(index, item)"
>
<img
:src=
"item.imgurl"
style=
"margin-top: 2px; float: left; margin-right: 3px"
/>
{{
item
.
name
}}
</div>
</div>
</div>
<!-- 弹框 -->
<!-- 弹框 -->
<div
<div
...
@@ -104,10 +122,10 @@
...
@@ -104,10 +122,10 @@
z-index: 999;
z-index: 999;
width: 200px;
width: 200px;
height: 50px;
height: 50px;
color: #339
CC
9;
color: #339
cc
9;
"
"
>
>
<div
style=
"height: 20px; width: 100%; float: right; font-size: 14px
;
"
>
<div
style=
"height: 20px; width: 100%; float: right; font-size: 14px"
>
{{
nowDate
}}
{{
nowtime
}}
{{
nowweek
}}
{{
nowDate
}}
{{
nowtime
}}
{{
nowweek
}}
</div>
</div>
</div>
</div>
...
@@ -118,6 +136,8 @@
...
@@ -118,6 +136,8 @@
// @ is an alias to /src
// @ is an alias to /src
import
{
EditorMap
}
from
"@/utils/mapClass/map"
;
import
{
EditorMap
}
from
"@/utils/mapClass/map"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
{
listDetectorInfo
}
from
"@/api/detector/detectorInfo"
;
import
{
detectorUserList
}
from
"@/api/detector/detectorUser"
;
import
{
import
{
pipeData
,
pipeData
,
tiaoyaxiang
,
tiaoyaxiang
,
...
@@ -139,6 +159,7 @@ import VideoView from "@/components/bigWindow/VideoView.vue";
...
@@ -139,6 +159,7 @@ import VideoView from "@/components/bigWindow/VideoView.vue";
import
DeviceA
from
"@/components/bigWindow/DeviceA.vue"
;
import
DeviceA
from
"@/components/bigWindow/DeviceA.vue"
;
import
User
from
"@/components/bigWindow/User.vue"
;
import
User
from
"@/components/bigWindow/User.vue"
;
import
Center
from
"@/components/bigWindow/Center.vue"
;
import
Center
from
"@/components/bigWindow/Center.vue"
;
import
UserCenter
from
"@/components/bigWindow/UserCenter.vue"
;
import
PipeColor
from
"@/components/bigWindow/PipeColor.vue"
;
import
PipeColor
from
"@/components/bigWindow/PipeColor.vue"
;
// import markerInfoWindow from './components/markerInfoWindow.vue'
// import markerInfoWindow from './components/markerInfoWindow.vue'
...
@@ -150,6 +171,7 @@ export default {
...
@@ -150,6 +171,7 @@ export default {
leftBar
,
leftBar
,
rightBar
,
rightBar
,
Center
,
Center
,
UserCenter
,
PipeColor
,
PipeColor
,
},
},
data
()
{
data
()
{
...
@@ -179,41 +201,52 @@ export default {
...
@@ -179,41 +201,52 @@ export default {
name
:
"中燃韵科"
,
name
:
"中燃韵科"
,
},
},
],
],
arr
:[
// 2:"调压箱",
// 3:"阀门",
// 4:"厂站",
// 5:"监控",
// 6:"用户",
arr
:
[
{
{
val
:
1
,
val
:
2
,
ischeck
:
false
,
ischeck
:
false
,
imgurl
:
require
(
'@/assets/image/tyxsub.svg'
),
imgurl
:
require
(
"@/assets/image/tyxsub.svg"
),
name
:
"调压箱"
name
:
"调压箱"
,
},
},
{
{
val
:
2
,
val
:
3
,
ischeck
:
false
,
ischeck
:
false
,
imgurl
:
require
(
'@/assets/image/fmjsub.svg'
),
imgurl
:
require
(
"@/assets/image/fmjsub.svg"
),
name
:
"阀门井"
name
:
"阀门井"
,
},
},
{
{
val
:
3
,
val
:
4
,
ischeck
:
false
,
ischeck
:
false
,
imgurl
:
require
(
'@/assets/image/czsub.svg'
),
imgurl
:
require
(
"@/assets/image/czsub.svg"
),
name
:
"
场 站"
name
:
"
厂 站"
,
},
},
{
{
val
:
4
,
val
:
6
,
ischeck
:
false
,
ischeck
:
false
,
imgurl
:
require
(
'@/assets/image/usersub.svg'
),
imgurl
:
require
(
"@/assets/image/usersub.svg"
),
name
:
"用 户"
name
:
"用 户"
,
},
},
{
{
val
:
5
,
val
:
5
,
ischeck
:
false
,
ischeck
:
false
,
imgurl
:
require
(
'@/assets/image/jksub.svg'
),
imgurl
:
require
(
"@/assets/image/jksub.svg"
),
name
:
"监 控"
name
:
"监 控"
,
}
}
,
],
],
selarr1
:[],
selarr1
:
[],
};
// 用户的center数据
},
detcetorList
:
[],
centerUserId
:
null
,
centerTotal
:
null
,
centerShow
:
false
,
centerTitle
:
""
,
};
},
computed
:
{
computed
:
{
...
mapGetters
([
"company"
,
"systemSetting"
]),
...
mapGetters
([
"company"
,
"systemSetting"
]),
...
@@ -224,8 +257,8 @@ export default {
...
@@ -224,8 +257,8 @@ export default {
watch
:
{
watch
:
{
selarr
(
newValue
)
{
selarr
(
newValue
)
{
if
(
newValue
.
length
==
this
.
companyLength
)
{
if
(
newValue
.
length
==
this
.
companyLength
)
{
this
.
$refs
.
mychild
.
choice
(
0
);
//
this.$refs.mychild.choice(0);
this
.
$refs
.
mychild2
.
choice
(
0
);
//
this.$refs.mychild2.choice(0);
}
}
},
},
},
},
...
@@ -264,6 +297,9 @@ export default {
...
@@ -264,6 +297,9 @@ export default {
name
:
item
.
companyName
,
name
:
item
.
companyName
,
}));
}));
this
.
selarr
=
this
.
company
.
map
((
item
)
=>
item
.
conpanyId
);
this
.
selarr
=
this
.
company
.
map
((
item
)
=>
item
.
conpanyId
);
this
.
selarr1
=
this
.
arr
.
map
((
item
)
=>
item
.
val
);
this
.
arr
.
forEach
((
item
)
=>
(
item
.
ischeck
=
true
));
// getPipe() getTyx() getFm() getCz() getVideo() getUser()
// getPipe() getTyx() getFm() getCz() getVideo() getUser()
this
.
goMap
(
getPipe
,
this
.
addPipeLine
,
Line
);
this
.
goMap
(
getPipe
,
this
.
addPipeLine
,
Line
);
this
.
goMap
(
getTyx
,
this
.
addDevice
,
DeviceA
);
this
.
goMap
(
getTyx
,
this
.
addDevice
,
DeviceA
);
...
@@ -277,8 +313,8 @@ export default {
...
@@ -277,8 +313,8 @@ export default {
}
}
this
.
currentTime
();
this
.
currentTime
();
this
.
$refs
.
mychild
.
choice
(
0
);
//
this.$refs.mychild.choice(0);
this
.
$refs
.
mychild2
.
choice
(
0
);
//
this.$refs.mychild2.choice(0);
},
},
methods
:
{
methods
:
{
...
mapActions
({
...
mapActions
({
...
@@ -302,15 +338,29 @@ export default {
...
@@ -302,15 +338,29 @@ export default {
},
},
goMap
(
httpFunc
,
addFunc
,
component
)
{
goMap
(
httpFunc
,
addFunc
,
component
)
{
httpFunc
().
then
((
res
)
=>
{
httpFunc
().
then
((
res
)
=>
{
if
(
res
.
data
&&!
res
.
data
[
0
].
iconType
){
// 给用户加icontype
res
.
data
.
forEach
(
item
=>
{
item
.
iconType
=
6
;
if
(
res
.
data
&&
!
res
.
data
[
0
].
iconType
)
{
})
res
.
data
.
forEach
((
item
)
=>
{
item
.
iconType
=
6
;
});
}
}
// if (res.data && !res.data[0].iconType) {
// res.data.forEach((item) => {
// item.iconType = 6;
// });
// }
// 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
// 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
let
config
=
{};
let
config
=
{};
if
(
Array
.
isArray
(
res
))
{
if
(
Array
.
isArray
(
res
))
{
config
=
{
data
:
res
};
config
=
{
data
:
res
};
// 给视频设备的conpanyType变成null
if
(
res
[
0
].
iconType
==
5
){
res
.
forEach
(
item
=>
{
item
.
companyType
=
null
;
})
}
}
else
{
}
else
{
config
=
{
data
:
res
.
data
};
config
=
{
data
:
res
.
data
};
}
}
...
@@ -318,7 +368,7 @@ export default {
...
@@ -318,7 +368,7 @@ export default {
});
});
},
},
c
enterShow
(
boolean
)
{
myC
enterShow
(
boolean
)
{
this
.
show
=
boolean
;
this
.
show
=
boolean
;
},
},
centerDataFunc
(
centerData
)
{
centerDataFunc
(
centerData
)
{
...
@@ -345,36 +395,49 @@ export default {
...
@@ -345,36 +395,49 @@ export default {
if
(
ind
>=
0
)
{
if
(
ind
>=
0
)
{
this
.
selarr
.
splice
(
ind
,
1
);
this
.
selarr
.
splice
(
ind
,
1
);
if
(
item
.
val
==
3
)
{
if
(
item
.
val
==
3
)
{
this
.
$refs
.
mychild
.
choice
(
1
);
//
this.$refs.mychild.choice(1);
this
.
$refs
.
mychild2
.
choice
(
1
);
//
this.$refs.mychild2.choice(1);
}
else
{
}
else
{
this
.
$refs
.
mychild
.
choice
(
item
.
val
+
1
);
//
this.$refs.mychild.choice(item.val + 1);
this
.
$refs
.
mychild2
.
choice
(
item
.
val
+
1
);
//
this.$refs.mychild2.choice(item.val + 1);
}
}
}
else
{
}
else
{
this
.
selarr
.
push
(
item
.
val
);
this
.
selarr
.
push
(
item
.
val
);
this
.
$refs
.
mychild
.
choice
(
item
.
val
);
//
this.$refs.mychild.choice(item.val);
this
.
$refs
.
mychild2
.
choice
(
item
.
val
);
//
this.$refs.mychild2.choice(item.val);
}
}
this
.
map
.
companyFilter
(
this
.
selarr
);
// this.map.companyFilter(this.selarr);
this
.
map
.
allfilter
(
this
.
selarr
,
this
.
selarr1
);
},
},
sel1
(
index
,
item
){
sel1
(
index
,
item
)
{
let
arr
=
[...
this
.
arr
];
const
ind
=
this
.
selarr1
.
indexOf
(
item
.
val
);
let
selarr1
=
[...
this
.
selarr1
];
if
(
ind
>=
0
)
{
if
(
arr
[
index
].
ischeck
==
false
){
this
.
selarr1
.
splice
(
ind
,
1
);
arr
[
index
].
ischeck
=
true
;
}
else
{
selarr1
.
push
(
item
)
this
.
selarr1
.
push
(
item
.
val
);
}
else
{
arr
[
index
].
ischeck
=
false
;
var
index11
=
selarr1
.
indexOf
(
index
)
selarr1
.
splice
(
index11
,
1
)
}
}
this
.
arr
=
arr
;
this
.
map
.
allfilter
(
this
.
selarr
,
this
.
selarr1
);
this
.
selarr1
=
selarr1
;
},
},
//用户的设备center
getDetectorInfoList
(
queryParams
,
title
)
{
console
.
log
(
queryParams
);
return
listDetectorInfo
(
queryParams
).
then
((
res
)
=>
{
console
.
log
(
"queryParams"
,
res
);
if
(
res
.
code
==
200
)
{
this
.
detcetorList
=
res
.
rows
;
this
.
centerUserId
=
queryParams
.
userId
;
// 总数据
this
.
centerTotal
=
res
.
total
;
// this.$refs.userCenter.fade = "fade";
this
.
centerShow
=
true
;
this
.
centerTitle
=
title
;
// 传递回去
return
res
.
code
;
}
});
},
currentTime
()
{
currentTime
()
{
setInterval
(()
=>
{
setInterval
(()
=>
{
this
.
formatDate
();
this
.
formatDate
();
...
@@ -428,11 +491,11 @@ export default {
...
@@ -428,11 +491,11 @@ export default {
color
:
#18baff
;
color
:
#18baff
;
cursor
:
pointer
;
cursor
:
pointer
;
padding
:
3px
5px
;
padding
:
3px
5px
;
border
:
1px
solid
#339
CC
9
;
border
:
1px
solid
#339
cc
9
;
color
:
#339
CC
9
;
color
:
#339
cc
9
;
&
:hover
{
&
:hover
{
background-color
:
#053
B6A
;
background-color
:
#053
b6a
;
color
:
#2
CD5DB
;
color
:
#2
cd5db
;
}
}
}
}
#map
{
#map
{
...
@@ -549,7 +612,7 @@ export default {
...
@@ -549,7 +612,7 @@ export default {
-webkit-background-clip
:
text
;
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
-webkit-text-fill-color
:
transparent
;
}
}
.typelist-div
{
.typelist-div
{
width
:
450px
;
width
:
450px
;
height
:
50px
;
height
:
50px
;
z-index
:
9999
;
z-index
:
9999
;
...
@@ -558,7 +621,7 @@ export default {
...
@@ -558,7 +621,7 @@ export default {
margin-top
:
120px
;
margin-top
:
120px
;
right
:
450px
;
right
:
450px
;
}
}
.list
{
.list
{
z-index
:
9999
;
z-index
:
9999
;
float
:
left
;
float
:
left
;
margin-left
:
15px
;
margin-left
:
15px
;
...
@@ -566,14 +629,15 @@ export default {
...
@@ -566,14 +629,15 @@ export default {
line-height
:
auto
;
line-height
:
auto
;
text-align
:
center
;
text-align
:
center
;
background
:
linear-gradient
(
86deg
,
#112238
0%
,
#086187
62%
,
#112238
100%
);
background
:
linear-gradient
(
86deg
,
#112238
0%
,
#086187
62%
,
#112238
100%
);
box-shadow
:
inset
0px
1px
2px
1px
#125
C9B
;
box-shadow
:
inset
0px
1px
2px
1px
#125
c9b
;
font-size
:
14px
;
font-size
:
14px
;
padding
:
5px
7px
;
padding
:
5px
7px
;
cursor
:
pointer
;
}
}
.list.active
{
.list.active
{
background
:
linear-gradient
(
86deg
,
#112238
0%
,
#32
A3D
3
62%
,
#112238
100%
);
background
:
linear-gradient
(
86deg
,
#112238
0%
,
#32
a3d
3
62%
,
#112238
100%
);
box-shadow
:
inset
0px
1px
2px
1px
#125
C9B
;
box-shadow
:
inset
0px
1px
2px
1px
#125
c9b
;
color
:
#2ee7e7
;
color
:
#2ee7e7
;
font-size
:
14px
;
font-size
:
14px
;
}
}
...
...
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