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
ca57150b
Commit
ca57150b
authored
Aug 11, 2021
by
yaqizhang
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
d9d60473
b0f0ffea
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
720 additions
and
250 deletions
+720
-250
.env.development
gassafety-web/.env.development
+1
-0
pressureGage.vue
gassafety-web/src/components/PopWindow/pressureGage.vue
+40
-19
lineInfoWindowWarn.vue
...ty-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
+59
-20
markerInfoWindowWarn.vue
...-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
+60
-10
index.vue
gassafety-web/src/components/TopNav/index.vue
+9
-3
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+2
-1
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+32
-9
index.vue
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
+131
-76
CreateWork.vue
...eb/src/views/enterprise/mapView/components/CreateWork.vue
+148
-0
RightBototmData.vue
...c/views/enterprise/mapView/components/RightBototmData.vue
+1
-1
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+161
-44
login.vue
gassafety-web/src/views/login.vue
+1
-1
vue.config.js
gassafety-web/vue.config.js
+75
-66
No files found.
gassafety-web/.env.development
View file @
ca57150b
...
...
@@ -4,5 +4,6 @@ ENV = 'development'
# 燃气安全管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
gassafety-web/src/components/PopWindow/pressureGage.vue
View file @
ca57150b
...
...
@@ -2,8 +2,7 @@
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
>
:before-close=
"handleClose"
>
<el-row>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"135px"
>
<el-row>
...
...
@@ -25,19 +24,13 @@
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备名称"
prop=
"deviceName"
>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
<el-input
v-model=
"form.deviceName"
placeholder=
"请输入设备名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"设备型号"
prop=
"deviceModel"
>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
/>
<el-input
v-model=
"form.deviceModel"
placeholder=
"请输入设备型号"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -56,7 +49,7 @@
<el-col
:span=
"22"
>
<el-form-item
label=
"经纬度坐标"
prop=
""
>
<el-card
shadow=
"newver"
class=
"box-card"
>
<el-card
class=
"box-card"
>
<div
v-text=
"`[[$
{form.longitude},${form.latitude}]]`">
</div>
</el-card>
</el-form-item>
...
...
@@ -146,7 +139,35 @@ export default {
dialogVisible
:
false
,
fileList
:
[],
// 表单校验
rules
:
{},
rules
:
{
pipeCode
:
[
{
required
:
true
,
message
:
"请选择所属管道"
,
trigger
:
"blur"
},
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
deviceName
:
[
{
required
:
true
,
message
:
"请输入设备名称"
,
trigger
:
"blur"
},
],
deviceModel
:
[
{
required
:
true
,
message
:
"请输入设备型号"
,
trigger
:
"blur"
},
],
deviceAddr
:
[
{
required
:
true
,
message
:
"请输入所在地址"
,
trigger
:
"blur"
},
],
iotNo
:
[
{
required
:
true
,
message
:
"请输入物联网编号"
,
trigger
:
"blur"
},
],
linkman
:
[{
required
:
true
,
message
:
"请输入联系人"
,
trigger
:
"blur"
}],
phone
:
[{
required
:
true
,
message
:
"请输入联系电话"
,
trigger
:
"blur"
}],
iconUrl
:
[{
required
:
true
,
message
:
"请上传图片"
,
trigger
:
"change"
}],
installationTime
:
[
{
// type: "date",
required
:
true
,
message
:
"请选择日期"
,
trigger
:
"change"
,
},
],
},
map
:
null
,
obj
:
null
,
gaoMap
:
null
,
...
...
@@ -202,19 +223,19 @@ export default {
this
.
form
.
url
=
""
;
this
.
fileArr
=
[];
},
getPipeInfos
(){
getPipeInfos
()
{
pipeAllInfoList
({}).
then
((
response
)
=>
{
this
.
pipeList
=
response
.
data
;
});
}
},
watch
:{
dialogVisible
(
val
){
if
(
val
){
},
watch
:
{
dialogVisible
(
val
)
{
if
(
val
)
{
this
.
getPipeInfos
();
}
}
}
}
,
}
,
};
</
script
>
...
...
gassafety-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
View file @
ca57150b
...
...
@@ -77,12 +77,20 @@
<!--
报警状态
-->
<
div
class
=
"warn-wrapper"
v
-
if
=
"true"
>
<
div
class
=
"warn-content"
>
<
div
>
报警状态:
<
span
>
报警
({{
alarmType
}}
)
<
/span></
div
>
<
div
>
详细信息:
<
span
>
{{
alarmValue
?
alarmValue
:
"-"
}}
<
/span></
div
>
<
div
>
报警状态:
<
span
>
报警
({{
alarmType
}}
)
<
/span
>
<
/div
>
<
div
>
详细信息:
<
span
>
{{
alarmValue
?
alarmValue
:
"-"
}}
<
/span
>
<
/div
>
<
div
class
=
"btn"
>
<
/div
>
<
div
@
click
.
stop
=
"stopPropatation"
class
=
"btn"
>
<
span
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<
/span
>
<
span
v
-
if
=
"orderId"
@
mousedown
.
stop
=
"createWork"
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button
>
<
/span
>
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -95,10 +103,8 @@ export default {
props
:
{
obj
:
{
typs
:
Object
}
,
}
,
data
(){
return
{
}
data
()
{
return
{
}
;
}
,
created
()
{
console
.
log
(
"created"
,
this
.
obj
);
...
...
@@ -108,17 +114,21 @@ export default {
bigImageArr
()
{
return
[
this
.
obj
.
iconUrl
];
}
,
alarmType
(){
alarmType
()
{
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmType
;
}
,
alarmValue
(){
alarmValue
()
{
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmValue
;
}
}
,
orderId
()
{
// 如果已经生成过工单,就不能再次生成了
return
this
.
obj
.
polyline
.
getExtData
().
lineData
.
orderId
?
false
:
true
;
}
,
}
,
methods
:
{
moment
,
mousedown
(
e
)
{
console
.
log
(
"??"
)
console
.
log
(
"??"
)
;
return
;
// console.log(this.$refs.previewImg)
this
.
$refs
.
previewImg
.
showViewer
=
true
;
...
...
@@ -134,9 +144,33 @@ export default {
}
);
}
);
}
,
createWork
()
{
// 控制外层弹框 可能有点长
this
.
obj
.
polyline
.
getExtData
().
lineData
.
view
.
$refs
.
CreateWork
.
alarmId
=
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmId
;
this
.
obj
.
polyline
.
getExtData
().
lineData
.
view
.
$refs
.
CreateWork
.
open
=
true
;
// 改变外层回调
this
.
obj
.
polyline
.
getExtData
().
lineData
.
view
.
CreateWorkCallBack
=
this
.
CreateWorkCallBack
;
}
,
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
}
,
CreateWorkCallBack
()
{
console
.
log
(
"polylineCallBack"
);
const
polyline
=
this
.
obj
.
polyline
.
getExtData
().
lineData
.
view
.
gaoMap
.
polyLines
.
filter
(
(
item
)
=>
{
return
item
.
getExtData
().
lineData
.
alarmId
==
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmId
;
}
)[
0
];
console
.
log
(
"polyline.getExtData()"
,
polyline
.
getExtData
().
lineData
);
let
options
=
polyline
.
getExtData
();
// 暂时传值,到时候回重新刷新
options
.
lineData
.
orderId
=
"1"
;
polyline
.
setExtData
(
options
);
}
,
}
,
}
;
<
/script
>
...
...
@@ -152,7 +186,7 @@ export default {
.
top
{
width
:
100
%
;
height
:
51
px
;
background
-
color
:
#
FF5A
67
;
background
-
color
:
#
ff5a
67
;
.
text
{
font
-
weight
:
600
;
font
-
size
:
16
px
;
...
...
@@ -241,7 +275,7 @@ export default {
box
-
sizing
:
border
-
box
;
padding
:
10
px
0
2
px
22
px
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
color
:
#
FE
5966
;
color
:
#
fe
5966
;
&
>
div
{
font
-
size
:
14
px
;
font
-
weight
:
400
;
...
...
@@ -251,11 +285,16 @@ export default {
.
btn
{
padding
:
16
px
0
;
text
-
align
:
center
;
span
{
display
:
inline
-
block
;
padding
:
0
10
px
;
.
elbtn
{
background
-
color
:
#
053
b6a
;
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
width
:
95
px
;
height
:
33
px
;
border
:
none
;
}
}
}
}
...
...
gassafety-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
View file @
ca57150b
...
...
@@ -64,12 +64,25 @@
<!-- 报警状态 -->
<div
class=
"warn-wrapper"
v-if=
"true"
>
<div
class=
"warn-content"
>
<div>
报警状态:
<span>
报警(
{{
data
.
alarmType
}}
)
</span></div>
<div>
详细信息:
<span>
{{
data
.
alarmValue
?
data
.
alarmValue
:
"-"
}}
</span></div>
<div>
报警状态:
<span>
报警(
{{
data
.
alarmType
}}
)
</span>
</div>
<div>
详细信息:
<span>
{{
data
.
alarmValue
?
data
.
alarmValue
:
"-"
}}
</span>
</div>
</div>
<div
class=
"btn"
>
<span>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
<el-button
v-if=
"title=='压力表'|| title=='流量计' "
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button>
</span>
<span
v-if=
"orderId"
@
mousedown
.
stop=
"createWork"
>
<el-button
v-if=
"title == '压力表' || title == '流量计'"
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button
>
</span>
</div>
</div>
</div>
...
...
@@ -85,8 +98,40 @@ export default {
data
:
{},
map
:
null
,
},
computed
:
{
orderId
()
{
// 如果已经生成过工单,就不能再次生成了
// return this.data.orderId ? false : true;
return
this
.
data
.
orderId
?
false
:
true
;
},
},
methods
:
{
moment
,
createWork
()
{
// 控制外层弹框
// console.log(this.data.view.$refs.CreateWork);
this
.
data
.
view
.
$refs
.
CreateWork
.
alarmId
=
this
.
data
.
alarmId
;
this
.
data
.
view
.
$refs
.
CreateWork
.
open
=
true
;
this
.
data
.
view
.
$refs
.
CreateWork
.
gaoMap
=
this
.
data
.
view
.
gaoMap
;
// 改变外层回调
this
.
data
.
view
.
CreateWorkCallBack
=
this
.
CreateWorkCallBack
;
},
CreateWorkCallBack
()
{
// console.log("markerCallBack")
const
marker
=
this
.
data
.
view
.
gaoMap
.
markers
.
filter
((
item
)
=>
{
return
item
.
getExtData
().
alarmId
==
this
.
data
.
alarmId
;
})[
0
];
// console.log("marer.getExtData()", marker.getExtData());
let
options
=
marker
.
getExtData
();
// 暂时传值,到时候回重新刷新
options
.
orderId
=
"1"
;
marker
.
setExtData
(
options
);
},
},
beforeDestroy
()
{
// this.data.view.createWorkOpen = false;
},
};
</
script
>
...
...
@@ -102,7 +147,7 @@ export default {
.top
{
width
:
100%
;
height
:
51px
;
background-color
:
#
FF5A
67
;
background-color
:
#
ff5a
67
;
.text
{
font-weight
:
600
;
font-size
:
16px
;
...
...
@@ -201,11 +246,16 @@ export default {
.btn
{
padding
:
16px
0
;
text-align
:
center
;
span
{
display
:
inline-block
;
padding
:
0
10px
;
.elbtn
{
background-color
:
#053b6a
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
width
:
95px
;
height
:
33px
;
border
:
none
;
}
}
}
}
...
...
gassafety-web/src/components/TopNav/index.vue
View file @
ca57150b
...
...
@@ -135,8 +135,6 @@ export default {
},
// 菜单选择事件
handleSelect
(
key
,
keyPath
)
{
console
.
log
(
"key"
,
key
);
console
.
log
(
"keypath"
,
keyPath
);
let
path
;
this
.
currentIndex
=
key
;
if
(
this
.
ishttp
(
key
))
{
...
...
@@ -148,8 +146,15 @@ export default {
}
else
{
// 显示左侧联动菜单
path
=
this
.
activeRoutes
(
key
);
console
.
log
(
path
)
console
.
log
(
this
.
$route
.
path
)
if
(
this
.
$route
.
path
!=
path
[
0
].
path
)
{
if
(
path
[
0
].
path
){
this
.
$router
.
push
(
path
[
0
].
path
);
}
else
{
if
(
path
[
0
].
path
==
""
&&
this
.
$route
.
path
==
"/index"
)
return
;
this
.
$router
.
push
(
"/index"
);
}
}
// if (key == "/enterprise") {
...
...
@@ -163,6 +168,7 @@ export default {
},
// 当前激活的路由
activeRoutes
(
key
)
{
// if(this.$route.path=="/index") return;
var
routes
=
[];
if
(
this
.
childrenMenus
&&
this
.
childrenMenus
.
length
>
0
)
{
this
.
childrenMenus
.
map
((
item
)
=>
{
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
ca57150b
...
...
@@ -2,6 +2,7 @@
import
regulatorBox
from
"../components/PopWindow/regulatorBox.vue"
;
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
pressureGage
from
"../components/PopWindow/pressureGage.vue"
;
import
pipelineView
from
"../components/PopWindow/pipelineView.vue"
;
import
lineInfoWindow
from
"../components/PopWindow/lineInfoWindow.vue"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
...
...
@@ -816,7 +817,7 @@ class gaodeMap {
});
}
case
DEVICE_TYPE
.
PRESSUREGAGE
:
{
return
createPop
(
flowMeter
,
{
return
createPop
(
pressureGage
,
{
title
:
val
+
"压力表"
});
}
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
ca57150b
...
...
@@ -328,7 +328,12 @@ class gaodeMap {
function
infoOpen
(
e
)
{
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
that
.
markerType
=
e
.
target
.
getExtData
().
deviceType
;
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
that
.
markerType
=
"7"
;
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
that
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
}
console
.
log
(
"that.markerType"
,
that
.
markerType
);
// 警告状态这样就要换infowindow
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
getExtData
(),
...
...
@@ -336,11 +341,17 @@ class gaodeMap {
);
}
else
{
// 初始化为1的时候是没有的,所以需要判断一下
that
.
markerType
=
e
.
target
.
getExtData
().
deviceType
+
""
==
1
?
"2"
:
e
.
target
.
getExtData
().
deviceType
+
""
;
console
.
log
(
typeof
e
.
target
.
getExtData
().
deviceType
);
// that.markerType =
// e.target.getExtData().deviceType + "" == 1
// ? "2"
// : e.target.getExtData().deviceType + "";
// 上图状态跟后台状态不统一,所以需要判断一下
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
that
.
markerType
=
"7"
;
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
that
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
}
console
.
log
(
"that.markerType"
);
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
getExtData
(),
markerInfoWindow
...
...
@@ -474,6 +485,7 @@ class gaodeMap {
* @param marker
*/
setMarkerIcon
(
marker
)
{
console
.
log
(
this
.
markerType
);
switch
(
this
.
markerType
)
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
let
icon
=
new
AMap
.
Icon
({
...
...
@@ -542,7 +554,7 @@ class gaodeMap {
}
}
}
changeMarkIcon
(
marker
,
iconUrl
)
{
changeMarkIcon
(
marker
,
iconUrl
)
{
let
icon
=
new
AMap
.
Icon
({
opacity
:
0.1
,
image
:
iconUrl
...
...
@@ -753,16 +765,17 @@ class gaodeMap {
}
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
{
polyline
.
setOptions
({
strokeColor
:
"#ff0000"
});
}
else
{
}
else
{
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
}
console
.
log
(
polyline
.
getOptions
()
);
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
this
.
boxCollision
(
infoWindow
.
dom
);
this
.
showInfoWindow
=
infoWindow
;
// const
});
polyline
.
on
(
"mouseout"
,
e
=>
{
// console.log("polyline.getExtData().lineData.alarmState",polyline.getExtData().lineData.alarmState)
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
return
;
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
// infoWindow.close();
...
...
@@ -977,10 +990,20 @@ class gaodeMap {
item
.
moveMarker
&&
item
.
moveMarker
.
show
();
item
.
polyline
&&
item
.
polyline
.
show
();
item
.
passedPolyline
&&
item
.
passedPolyline
.
show
();
if
(
item
.
pointArr
?.
length
>
0
)
{
item
.
pointArr
.
forEach
(
item
=>
{
item
.
show
();
});
}
}
else
{
item
.
moveMarker
&&
item
.
moveMarker
.
hide
();
item
.
polyline
&&
item
.
polyline
.
hide
();
item
.
passedPolyline
&&
item
.
passedPolyline
.
hide
();
if
(
item
.
pointArr
?.
length
>
0
)
{
item
.
pointArr
.
forEach
(
item
=>
{
item
.
hide
();
});
}
}
}
bool
?
item
.
show
()
:
item
.
hide
();
...
...
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
View file @
ca57150b
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
68px
"
>
<
!--
<
el-form-item
label=
"设备编号"
prop=
"deviceCode"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
100
"
>
<el-form-item
label=
"设备编号"
prop=
"deviceCode"
>
<el-input
v-model=
"queryParams.deviceCode"
placeholder=
"请输入设备编号"
...
...
@@ -10,6 +10,15 @@
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"管道编号"
prop=
"pipeCode"
>
<el-input
v-model=
"queryParams.pipeCode"
placeholder=
"请输入管道编号"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"报警类型"
prop=
"alarmType"
>
<el-select
v-model=
"queryParams.alarmType"
placeholder=
"请选择报警类型"
clearable
size=
"small"
>
<el-option
...
...
@@ -20,10 +29,31 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"报警开始时间"
prop=
"startTime1"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.startTime1"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
placeholder=
"请选择起始时间"
align=
"right"
>
</el-date-picker>
<font
color=
"#C0C4CC"
>
至
</font>
</el-form-item>
<el-form-item
label=
""
prop=
"endTime1"
>
<el-date-picker
clearable
size=
"small"
v-model=
"queryParams.endTime1"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
placeholder=
"请选择截止时间"
align=
"right"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
-->
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"deviceAlarmList"
@
selection-change=
"handleSelectionChange"
>
...
...
@@ -56,7 +86,7 @@
</el-table-column>
<el-table-column
label=
"处理状态"
align=
"center"
prop=
"dealStatus"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.orderId == null || scope.row.orderId == ''"
>
未
下发
</span>
<span
v-if=
"scope.row.orderId == null || scope.row.orderId == ''"
>
未
生成工单
</span>
<span
v-if=
"(scope.row.dealStatus == null || scope.row.dealStatus == '')
&& scope.row.orderId != null && scope.row.orderId != ''"
>
未处理
</span>
<span
v-if=
"scope.row.dealStatus == 1"
>
不需处理
</span>
...
...
@@ -115,7 +145,7 @@
import
{
addBasicsInfo
}
from
"@/api/workOrder/basicsInfo"
;
import
{
inspectorList
}
from
"@/api/system/user"
;
export
default
{
export
default
{
name
:
"DeviceAlarm"
,
components
:
{
},
...
...
@@ -160,16 +190,15 @@
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceId
:
null
,
deviceCode
:
null
,
orderId
:
null
,
alarmType
:
null
,
alarmValue
:
null
,
startTime
:
null
,
endTime
:
null
,
startTime1
:
null
,
endTime1
:
null
,
dealStatus
:
null
},
// 表单参数
form
:
{
},
form
:
{
},
// 表单校验
rules
:
{
orderName
:
[
...
...
@@ -195,17 +224,17 @@
this
.
deviceAlarmList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
console
.
log
(
"this.deviceAlarmList"
,
this
.
deviceAlarmList
)
console
.
log
(
"this.deviceAlarmList"
,
this
.
deviceAlarmList
)
});
},
getInspectorList
()
{
getInspectorList
()
{
this
.
loading
=
true
;
inspectorList
().
then
(
response
=>
{
this
.
inspector
=
response
.
data
;
this
.
loading
=
false
;
});
},
setUserId
(
val
)
{
setUserId
(
val
)
{
this
.
form
.
appointInspector
=
val
;
},
// 取消按钮
...
...
@@ -213,49 +242,75 @@
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 报警信息表格数据
deviceAlarmList
:
[],
// 报警类型字典
typeOptions
:
[],
// 设备级联
options
:
[],
props
:
{
multiple
:
true
,
value
:
"id"
,
label
:
"name"
,
level
:
"level"
,
children
:
"childList"
,
},
devices
:
null
,
// 巡检员列表
inspector
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceId
:
null
,
orderId
:
null
,
orderType
:
null
,
orderName
:
null
,
orderStatus
:
"0"
,
createTime
:
null
,
appointInspector
:
null
,
allotTime
:
null
,
actualInspector
:
null
,
actualTime
:
null
,
remarks
:
null
alarmType
:
null
,
alarmValue
:
null
,
startTime
:
null
,
endTime
:
null
,
dealStatus
:
null
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
orderName
:
[
{
required
:
true
,
message
:
"工单名称不能为空"
,
trigger
:
"blur"
}
],
appointInspector
:
[
{
required
:
true
,
message
:
"请选择巡检人员"
,
trigger
:
"blur"
}
],
}
};
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
created
()
{
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
alarmId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 下发按钮操作 */
handleIssue
(
row
)
{
this
.
reset
();
this
.
getInspectorList
();
const
alarmId
=
row
.
alarmId
||
this
.
ids
getDeviceAlarm
(
alarmId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"填写工单信息"
;
this
.
getDicts
(
"t_alarm_type"
).
then
(
response
=>
{
this
.
typeOptions
=
response
.
data
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
...
...
gassafety-web/src/views/enterprise/mapView/components/CreateWork.vue
0 → 100644
View file @
ca57150b
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
:close=
"close"
width=
"800px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"130px"
>
<el-form-item
label=
"报警设备"
prop=
"deviceName"
>
<font>
{{
form
.
deviceName
}}
</font>
</el-form-item>
<el-form-item
label=
"报警类型"
prop=
"alarmType"
>
<font>
{{
form
.
alarmType
}}
</font>
</el-form-item>
<el-form-item
label=
"报警值"
prop=
"alarmValue"
>
<font>
{{
form
.
alarmValue
}}
</font>
</el-form-item>
<el-form-item
label=
"工单名称"
prop=
"orderName"
>
<el-input
v-model=
"form.orderName"
placeholder=
"请输入工单名称"
/>
</el-form-item>
<el-form-item
label=
"指定执行人员"
prop=
"appointInspector"
>
<el-select
v-model=
"form.appointInspector"
placeholder=
"请选择执行人员"
clearable
size=
"small"
@
change=
"setUserId"
>
<el-option
v-for=
"item in inspector"
:key=
"item.userId"
:label=
"item.nickName"
:value=
"item.userId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"工单描述"
prop=
"remarks"
>
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入工单描述"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
:loading=
"loading"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button
>
<!--
<el-button
@
click=
"cancel"
>
取 消
</el-button>
-->
<el-button>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
inspectorList
}
from
"@/api/system/user"
;
import
{
addBasicsInfo
}
from
"@/api/workOrder/basicsInfo"
;
import
{
getDeviceAlarm
}
from
"@/api/dataMonitoring/deviceAlarm"
;
export
default
{
props
:
{
// 传进来一些内容
content
:
{
type
:
Object
,
},
},
data
()
{
return
{
form
:
{
deviceName
:
""
,
alarmType
:
""
,
alarmValue
:
""
,
orderName
:
""
,
appointInspector
:
""
,
remarks
:
""
,
},
gaoMap
:
""
,
open
:
false
,
title
:
""
,
inspector
:
[],
loading
:
false
,
alarmId
:
""
,
rules
:
{
orderName
:
[
{
required
:
true
,
message
:
"工单名称不能为空"
,
trigger
:
"blur"
},
],
appointInspector
:
[
{
required
:
true
,
message
:
"请选择巡检人员"
,
trigger
:
"blur"
},
],
},
};
},
created
()
{
// this.alarmId && this.handleIssue(this.alarmId);
},
watch
:
{
open
(
value
,
oldValue
)
{
if
(
value
)
{
console
.
log
(
this
.
alarmId
);
this
.
handleIssue
(
this
.
alarmId
)
}
},
},
methods
:
{
handleIssue
(
alarmId
)
{
this
.
getInspectorList
();
getDeviceAlarm
(
alarmId
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"填写工单信息"
;
});
},
getInspectorList
()
{
this
.
loading
=
true
;
inspectorList
().
then
((
response
)
=>
{
this
.
inspector
=
response
.
data
;
this
.
loading
=
false
;
});
},
setUserId
(
val
)
{
this
.
form
.
appointInspector
=
val
;
},
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
form
.
resourceId
=
this
.
form
.
alarmId
;
this
.
form
.
orderType
=
"3"
;
addBasicsInfo
(
this
.
form
).
then
((
response
)
=>
{
this
.
msgSuccess
(
"生成工单成功"
);
this
.
open
=
false
;
this
.
$emit
(
"callback"
);
});
}
});
},
close
()
{
this
.
open
=
false
;
},
},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
gassafety-web/src/views/enterprise/mapView/components/RightBototmData.vue
View file @
ca57150b
...
...
@@ -53,7 +53,7 @@
<div
class=
"text"
>
<div
class=
"top"
>
{{
typeName
[
item
.
type
]
}}
</div>
<div
class=
"bottom"
>
{{
item
.
number
}}{{
item
.
type
==
99
?
"
K
M"
:
"个"
}}
{{
item
.
number
}}{{
item
.
type
==
99
?
"M"
:
"个"
}}
</div>
</div>
</div>
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
ca57150b
This diff is collapsed.
Click to expand it.
gassafety-web/src/views/login.vue
View file @
ca57150b
...
...
@@ -81,7 +81,7 @@ export default {
code
:
[{
required
:
true
,
trigger
:
"change"
,
message
:
"验证码不能为空"
}]
},
loading
:
false
,
redirect
:
undefined
redirect
:
"/index"
};
},
watch
:
{
...
...
gassafety-web/vue.config.js
View file @
ca57150b
'use strict'
const
path
=
require
(
'path'
)
const
defaultSettings
=
require
(
'./src/settings.js'
)
"use strict"
;
const
path
=
require
(
"path"
);
const
defaultSettings
=
require
(
"./src/settings.js"
);
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
dir
)
return
path
.
join
(
__dirname
,
dir
)
;
}
const
name
=
defaultSettings
.
title
||
'燃气安全管理系统'
// 标题
const
name
=
defaultSettings
.
title
||
"燃气安全管理系统"
;
// 标题
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
80
// 端口
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
80
;
// 端口
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
...
...
@@ -18,104 +18,113 @@ module.exports = {
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
publicPath
:
process
.
env
.
NODE_ENV
===
"production"
?
"/"
:
"/"
,
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir
:
'dist'
,
outputDir
:
"dist"
,
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir
:
'static'
,
assetsDir
:
"static"
,
// 是否开启eslint保存检测,有效值:ture | false | 'error'
lintOnSave
:
process
.
env
.
NODE_ENV
===
'development'
,
lintOnSave
:
process
.
env
.
NODE_ENV
===
"development"
,
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
productionSourceMap
:
false
,
// webpack-dev-server 相关配置
devServer
:
{
host
:
'0.0.0.0'
,
host
:
"0.0.0.0"
,
port
:
port
,
open
:
true
,
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
// target: `http://36.148.23.59:8901/gassafety`,
target
:
`http://36.148.23.59:8901/gassafety`
,
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
}
[
"^"
+
process
.
env
.
VUE_APP_BASE_API
]:
""
}
},
// "/websocket": {
// target: "ws://192.168.2.23:8903/gassafety/websocketServer",
// ws: true,
// changeOrigin: true,
// logLevel: "debug",
// secure: false,
// pathRewrite: {
// "^/websocket": ""
// }
// }
},
disableHostCheck
:
true
},
configureWebpack
:
{
name
:
name
,
resolve
:
{
alias
:
{
'@'
:
resolve
(
'src'
),
'utils'
:
resolve
(
'src/utils'
)
"@"
:
resolve
(
"src"
),
utils
:
resolve
(
"src/utils"
)
}
},
externals
:
{
'AMap'
:
'AMap'
AMap
:
"AMap"
}
},
chainWebpack
(
config
)
{
config
.
plugins
.
delete
(
'preload'
)
// TODO: need test
config
.
plugins
.
delete
(
'prefetch'
)
// TODO: need test
config
.
plugins
.
delete
(
"preload"
);
// TODO: need test
config
.
plugins
.
delete
(
"prefetch"
);
// TODO: need test
// set svg-sprite-loader
config
.
module
.
rule
(
'svg'
)
.
exclude
.
add
(
resolve
(
'src/assets/icons'
))
.
end
()
.
rule
(
"svg"
)
.
exclude
.
add
(
resolve
(
"src/assets/icons"
))
.
end
()
;
config
.
module
.
rule
(
'icons'
)
.
rule
(
"icons"
)
.
test
(
/
\.
svg$/
)
.
include
.
add
(
resolve
(
'src/assets/icons'
))
.
include
.
add
(
resolve
(
"src/assets/icons"
))
.
end
()
.
use
(
'svg-sprite-loader'
)
.
loader
(
'svg-sprite-loader'
)
.
use
(
"svg-sprite-loader"
)
.
loader
(
"svg-sprite-loader"
)
.
options
({
symbolId
:
'icon-[name]'
symbolId
:
"icon-[name]"
})
.
end
()
.
end
()
;
config
.
when
(
process
.
env
.
NODE_ENV
!==
"development"
,
config
=>
{
config
.
when
(
process
.
env
.
NODE_ENV
!==
'development'
,
config
=>
{
config
.
plugin
(
'ScriptExtHtmlWebpackPlugin'
)
.
after
(
'html'
)
.
use
(
'script-ext-html-webpack-plugin'
,
[{
.
plugin
(
"ScriptExtHtmlWebpackPlugin"
)
.
after
(
"html"
)
.
use
(
"script-ext-html-webpack-plugin"
,
[
{
// `runtime` must same as runtimeChunk name. default is `runtime`
inline
:
/runtime
\.
.*
\.
js$/
}])
.
end
(
)
config
.
optimization
.
splitChunks
({
chunks
:
'all'
,
}
]
)
.
end
();
config
.
optimization
.
splitChunks
({
chunks
:
"all"
,
cacheGroups
:
{
libs
:
{
name
:
'chunk-libs'
,
name
:
"chunk-libs"
,
test
:
/
[\\/]
node_modules
[\\/]
/
,
priority
:
10
,
chunks
:
'initial'
// only package third parties that are initially dependent
chunks
:
"initial"
// only package third parties that are initially dependent
},
elementUI
:
{
name
:
'chunk-elementUI'
,
// split elementUI into a single package
name
:
"chunk-elementUI"
,
// split elementUI into a single package
priority
:
20
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
test
:
/
[\\/]
node_modules
[\\/]
_
?
element-ui
(
.*
)
/
// in order to adapt to cnpm
},
commons
:
{
name
:
'chunk-commons'
,
test
:
resolve
(
'src/components'
),
// can customize your rules
name
:
"chunk-commons"
,
test
:
resolve
(
"src/components"
),
// can customize your rules
minChunks
:
3
,
// minimum common number
priority
:
5
,
reuseExistingChunk
:
true
}
}
})
config
.
optimization
.
runtimeChunk
(
'single'
),
});
config
.
optimization
.
runtimeChunk
(
"single"
),
{
from
:
path
.
resolve
(
__dirname
,
'./public/robots.txt'
),
//防爬虫文件
to
:
'./'
,
//到根目录下
from
:
path
.
resolve
(
__dirname
,
"./public/robots.txt"
),
//防爬虫文件
to
:
"./"
//到根目录下
};
});
}
}
)
}
}
};
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