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
c643f185
Commit
c643f185
authored
Feb 12, 2022
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拾取坐标、隐患级别
parent
16e35194
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
539 additions
and
45 deletions
+539
-45
index.html
gassafetyprogress-web/public/index.html
+1
-0
yalibiao.svg
gassafetyprogress-web/src/assets/mapImages/yalibiao.svg
+8
-0
index.scss
gassafetyprogress-web/src/assets/styles/index.scss
+4
-0
index.vue
gassafetyprogress-web/src/components/GetPos/index.vue
+141
-0
getPath.js
...afetyprogress-web/src/components/GetPos/untils/getPath.js
+335
-0
index.vue
...afetyprogress-web/src/views/standingBook/hidden/index.vue
+30
-27
index.vue
...rogress-web/src/views/standingBook/hiddenDetail/index.vue
+4
-2
index.vue
...fetyprogress-web/src/views/standingBook/trouble/index.vue
+16
-16
No files found.
gassafetyprogress-web/public/index.html
View file @
c643f185
...
...
@@ -8,6 +8,7 @@
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title><
%=
webpackConfig
.
name
%
></title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<script
src=
"https://webapi.amap.com/maps?v=2.0&key=eed7ca3167f765467aa377fa78e61ece&plugin=Map3D,AMap.DistrictSearch,AMap.Scale,AMap.OverView,AMap.ToolBar,AMap.MouseTool,AMap.ControlBar,AMap.CircleEditor,AMap.PolyEditor"
></script>
<style>
html
,
body
,
...
...
gassafetyprogress-web/src/assets/mapImages/yalibiao.svg
0 → 100644
View file @
c643f185
<svg
id=
"组_2449"
data-name=
"组 2449"
xmlns=
"http://www.w3.org/2000/svg"
width=
"23"
height=
"33.9"
viewBox=
"0 0 23 33.9"
>
<g
id=
"路径_186"
data-name=
"路径 186"
fill=
"none"
>
<path
d=
"M11.5,0A11.5,11.5,0,0,1,23,11.5c0,6.351-11.6,18.226-11.5,18.3S0,17.851,0,11.5A11.5,11.5,0,0,1,11.5,0Z"
stroke=
"none"
/>
<path
d=
"M 11.5 0.9999942779541016 C 5.71027946472168 0.9999942779541016 1 5.710294723510742 1 11.50003433227539 C 1 15.44047451019287 6.295700073242188 22.62868881225586 11.47670364379883 28.30246925354004 C 12.68497562408447 26.95181846618652 15.33078575134277 23.97880172729492 17.65543937683105 20.72857475280762 C 19.63740921020508 17.95747375488281 22 14.10698509216309 22 11.50003433227539 C 22 5.710294723510742 17.28972053527832 0.9999942779541016 11.5 0.9999942779541016 M 11.5 -5.7220458984375e-06 C 17.85127067565918 -5.7220458984375e-06 23 5.148744583129883 23 11.50003433227539 C 23 17.82767868041992 11.48916530609131 29.63789367675781 11.49940204620361 29.80171203613281 C 11.36462783813477 29.63816833496094 0 17.78736114501953 0 11.50003433227539 C 0 5.148744583129883 5.14872932434082 -5.7220458984375e-06 11.5 -5.7220458984375e-06 Z M 11.49940204620361 29.80171203613281 C 11.50076866149902 29.80337142944336 11.50098419189453 29.80383491516113 11.5 29.80305480957031 C 11.49963855743408 29.80276870727539 11.49944019317627 29.80232429504395 11.49940204620361 29.80171203613281 Z"
stroke=
"none"
fill=
"#7bf8f4"
/>
</g>
<path
id=
"多边形_33"
data-name=
"多边形 33"
d=
"M4.471,0,8.941,5.961H0Z"
transform=
"translate(16.094 29.804) rotate(180)"
fill=
"#7bf8f4"
/>
<path
id=
"路径_966"
data-name=
"路径 966"
d=
"M99.476,156.616a6.028,6.028,0,0,1-1.622,2.267.9.9,0,0,1-.583.252.8.8,0,0,1-.567-.236.765.765,0,0,1-.236-.535.705.705,0,0,1,.236-.535,6.035,6.035,0,0,0,1.748-4.377A5.726,5.726,0,0,0,96.7,149.2a6.645,6.645,0,0,0-9.085.016,5.836,5.836,0,0,0-1.763,4.283,6.134,6.134,0,0,0,1.952,4.346.765.765,0,0,1,.236.535.705.705,0,0,1-.236.535.748.748,0,0,1-.567.236.8.8,0,0,1-.567-.236,7.414,7.414,0,0,1-2.047-2.724,7.528,7.528,0,0,1,1.748-8.266,7.836,7.836,0,0,1,2.629-1.685,9.392,9.392,0,0,1,6.361-.063,6.113,6.113,0,0,1,2.141,1.26c2.866,2.425,3.023,5.9,2.047,8.943Zm-7.337-7.684a4.366,4.366,0,0,0-4.377,4.267.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,5.254,5.254,0,0,1,1.575-3.684,5.533,5.533,0,0,1,7.7,0,5.208,5.208,0,0,1,1.606,3.732.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,4.382,4.382,0,0,0-4.424-4.314Zm.913,5.4a1.113,1.113,0,0,1-1.559-.047,1.054,1.054,0,0,1-.268-1.149l-1.212-1.2a.418.418,0,0,1,0-.6.479.479,0,0,1,.63,0l1.228,1.2a1.162,1.162,0,0,1,1.2.268,1.024,1.024,0,0,1,.331.771A1.093,1.093,0,0,1,93.052,154.333Zm.016-.016"
transform=
"translate(-80.582 -142.727)"
fill=
"#7bf8f4"
/>
</svg>
gassafetyprogress-web/src/assets/styles/index.scss
View file @
c643f185
...
...
@@ -189,3 +189,7 @@ aside {
.multiselect--active
{
z-index
:
1000
!
important
;
}
.amap-sug-result
{
z-index
:
999999
;
}
gassafetyprogress-web/src/components/GetPos/index.vue
0 → 100644
View file @
c643f185
<!--
* @Author: your name
* @Date: 2022-02-12 11:07:10
* @LastEditTime: 2022-02-12 15:13:41
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/components/GetPos.vue/index.vue
-->
<
template
>
<el-dialog
class=
"getpos"
title=
"定位"
:visible
.
sync=
"dialogVisible"
width=
"60%"
:before-close=
"handleClose"
>
<div
class=
"search-wrapper pos"
>
<el-input
v-model=
"searchinput"
class=
"searchinput"
placeholder=
"请输入内容"
size=
"mini"
style=
"width: 150px"
ref=
"input"
></el-input>
</div>
<div
@
click=
"pos"
class=
"positionBtn pos"
>
<el-button
type=
"primary"
size=
"mini"
icon=
"el-icon-position"
>
定位
</el-button
>
</div>
<div
id=
"getposmap"
></div>
</el-dialog>
</
template
>
<
script
>
import
{
EditorMap
}
from
"./untils/getPath.js"
;
export
default
{
props
:
{
//管道路径,二维数组
pipePath
:
{
type
:
Array
,
default
:
()
=>
[],
},
// marker位置,数组
devicePos
:
{
type
:
Array
,
default
:
()
=>
[],
},
// 设备类型,管道传pipe,marker就不用传值
device
:
{
type
:
String
,
default
:
""
,
},
// 显示隐藏
dialogVisible
:{
type
:
Boolean
,
default
:
false
,
}
},
data
()
{
return
{
// dialogVisible: false,
map
:
null
,
searchinput
:
""
,
};
},
watch
:
{
dialogVisible
(
newValue
)
{
if
(
newValue
)
{
this
.
init
();
}
else
{
this
.
map
.
destroy
();
}
this
.
$nextTick
(()
=>
{
const
input
=
this
.
$refs
.
input
.
$refs
.
input
;
this
.
map
.
positionSearch
(
input
);
});
},
},
mounted
()
{
},
methods
:
{
init
()
{
this
.
$nextTick
(()
=>
{
this
.
map
=
new
EditorMap
(
"getposmap"
,
{},
this
);
// 如果不传值就是设备,传pipe就是管道
if
(
this
.
device
==
""
)
{
// 如果传了路径就创建一个marker,如果没传就直接激活手动创建
if
(
this
.
devicePos
.
length
>
0
)
{
this
.
map
.
addDevice
({
path
:
this
.
devicePos
});
}
else
{
this
.
map
.
mouseAddMarker
();
}
}
else
{
if
(
this
.
pipePath
.
length
>
0
)
{
this
.
map
.
addPipeLine
({
path
:
this
.
pipePath
});
}
else
{
this
.
mouseAddPipeline
();
}
}
});
},
handleClose
()
{
this
.
$emit
(
"close"
)
},
open
()
{
this
.
dialogVisible
=
true
;
},
// 返回坐标
pos
()
{
this
.
path
=
this
.
map
.
getPath
();
this
.
$emit
(
"getPath"
,
this
.
path
);
console
.
log
(
this
.
path
)
if
(
this
.
path
?.
length
>
0
)
{
this
.
$emit
(
"update:dialogVisible"
,
false
);
}
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.search-wrapper
{
left
:
30px
;
}
.positionBtn
{
right
:
30px
;
}
.pos
{
position
:
absolute
;
top
:
90px
;
z-index
:
20
;
}
#getposmap
{
width
:
100%
;
height
:
500px
;
}
</
style
>
gassafetyprogress-web/src/components/GetPos/untils/getPath.js
0 → 100644
View file @
c643f185
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-02-12 15:13:52
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/untils/mapClass.js
*/
// 编辑类
// 在地图上新增的设备可以直接编辑,
// 已经保存完成的设备需要点编辑才可以编辑
export
class
EditorMap
{
// 地图的对象实例
map
=
null
;
// 父vue的实例
vue
=
null
;
// 操作 新建,编辑,删除,编辑跟删除只对已经在图上的设备有效 默认值:0, 新建:1,编辑:2, 删除: 3。
// 新建的时候会把未保存的线条清空
control
=
0
;
// 鼠标事件对象,用来将点跟线上图
mousetool
=
null
;
// 当前正在手动绘制的对象
nowMouseTarget
=
null
;
// 当线mousetool线被按下的时候的flag 当线被按下的时候为true,就不询问是否删除了
mosueToolPolineDownFlag
=
false
;
// 绘制marer的时候的配置,在绘制完挂载事件的时候需要使用
mouseToolMarkerOptions
=
null
;
// 绘制poline的时候的配置,在绘制完挂载事件的时候需要使用
mouseToolPolineOptions
=
null
;
constructor
(
contaienr
,
config
=
{},
vue
)
{
this
.
map
=
new
AMap
.
Map
(
contaienr
,
{
viewMode
:
"3D"
,
center
:
[
116.397083
,
39.874531
],
layers
:
[
AMap
.
createDefaultLayer
()],
// layers 字段为空或者不赋值将会自动创建默认底图。
zoom
:
12
,
...
config
,
});
this
.
vue
=
vue
;
this
.
init
();
}
init
()
{
// 地图事件
this
.
mapEvent
();
// 手动点线上图准备,编辑模式
this
.
mouseAddDevice
();
window
.
func
=
()
=>
{
this
.
getPath
();
};
// this.mouseAddMarker();
// this.mouseAddPipeline();
}
// map的事件监听
mapEvent
()
{
this
.
map
.
on
(
"click"
,
()
=>
{
// mousetool对象画出的对象的操作
// 如果有手动绘制对象,要手动清楚一下,因为画线的时候不好清除旧线,这其实是用来清楚旧线的
// 当画出来的线被mousedown,不删除,但是mouseToolPipeLineFlag要归位,在移出线的时候统一归位
// 如果对象是marker,直接删除
if
(
this
.
nowMouseTarget
?.
type
==
"AMap.Marker"
)
{
console
.
log
(
"???"
);
this
.
mouseToolDrawClear
();
}
else
{
// 当地图上已经画了线,并且没有点在线上,询问是否删除
if
(
this
.
nowMouseTarget
&&
!
this
.
mosueToolPolineDownFlag
)
{
this
.
confirm
(
"是否重新绘制管道"
,
{
type
:
"warning"
})
.
then
(()
=>
{
// 删除原来的线
this
.
mouseToolDrawClear
();
// 鼠标事件开启,并且赋值原来的属性,this.mouseToolMarkerOptions是开启绘制的时候记录的
this
.
mousetool
.
polyline
(
this
.
mouseToolPolineOptions
);
})
.
catch
(()
=>
{});
}
}
});
this
.
map
.
on
(
"moveend"
,
()
=>
{
console
.
log
(
"地图停止移动"
);
if
(
this
.
flag
)
{
console
.
log
(
"弹框"
);
this
.
flag
=
false
;
}
});
window
.
panTo
=
()
=>
{
this
.
flag
=
true
;
this
.
map
.
panTo
([
116.428285
,
39.886129
]);
};
}
// 弹框工具
confirm
(
message
,
obj
)
{
return
this
.
vue
.
$confirm
(
message
,
obj
);
}
// 改变操作状态
changeControl
(
num
)
{
this
.
control
=
num
;
}
// 点线编辑上图准备
mouseAddDevice
()
{
this
.
map
.
plugin
([
"AMap.MouseTool"
],
()
=>
{
this
.
mousetool
=
new
AMap
.
MouseTool
(
this
.
map
);
});
// 挂载绘制结束的事件
this
.
mouseDrawEvent
();
}
// 点或者线上图结束后触发的事件
mouseDrawEvent
()
{
this
.
mousetool
.
on
(
"draw"
,
(
e
)
=>
{
const
target
=
e
.
obj
;
// console.log([target._position.lng, target._position.lat]);
const
{
type
:
targetType
}
=
target
;
// 当这个点是marker的时候
if
(
targetType
==
"AMap.Marker"
)
{
this
.
mouseToolMarkerEvent
(
target
);
}
else
{
// 如果是线,挂上编辑
this
.
lineEditor
(
target
);
this
.
mousetool
.
close
();
this
.
mouseToolPolineEvent
(
target
);
console
.
log
(
targetType
,
"当前对象是管道"
);
}
this
.
nowMouseTarget
=
target
;
});
}
// 绘制marker结束后,在marker身上添加的事件
mouseToolMarkerEvent
(
target
)
{
// 由于画出来的marker点击会换位置,所以当移入的时候删除绘制事件,移出去在增加绘制事件
target
.
on
(
"mouseover"
,
(
e
)
=>
{
// 鼠标事件关闭
this
.
mousetool
.
close
(
false
);
});
target
.
on
(
"mouseout"
,
(
e
)
=>
{
// 这里不方便获取原来的属性,因为position不好解决,还是设置一个值吧
// 鼠标事件开启,并且赋值原来的属性,this.mouseToolMarkerOptions是开启绘制的时候记录的
this
.
mousetool
.
marker
(
this
.
mouseToolMarkerOptions
);
});
// 点
target
.
on
(
"click"
,
(
e
)
=>
{
// 弹框
});
}
// 挂上线以及线的事件
lineEditor
(
line
)
{
// line.editor && line.editor.close();
// 当前点击次数,1次为编辑,2次为弹框
line
.
editorNum
=
0
;
line
.
editor
=
new
AMap
.
PolyEditor
(
this
.
map
,
line
);
}
// 绘制管道的时候,挂载的事件
mouseToolPolineEvent
(
target
)
{
// 线按下的时候会变成编辑,mousetool事件会清空 移出线的时候 在把polyline事件加上
target
.
on
(
"mouseover"
,
(
e
)
=>
{
// 鼠标事件关闭
// this.mousetool.close(false);
});
target
.
on
(
"mouseout"
,
(
e
)
=>
{
// 有时候按在线上移动地图,map点击事件中mosueToolPolineDownFlag无法归位,在这里归位
this
.
mosueToolPolineDownFlag
=
false
;
// 鼠标事件开启,并且赋值原来的属性,this.mouseToolMarkerOptions是开启绘制的时候记录的
// this.mousetool.polyline(this.mouseToolPolineOptions);
});
// 线
target
.
on
(
"mousedown"
,
(
e
)
=>
{
const
line
=
e
.
target
;
// mosueTool按下的flag,按在线上,不询问是否删除
this
.
mosueToolPolineDownFlag
=
true
;
// 按下的时候要关闭事件
this
.
mousetool
.
close
(
false
);
// 如果当前状态不是编辑,则进入编辑状态
if
(
line
.
editorNum
<
1
)
{
// 打开并且++
line
.
editor
.
open
();
line
.
editorNum
++
;
}
else
{
// 这里就要弹框了
console
.
log
(
line
.
getPath
());
}
});
}
// 设备点击上图开启
mouseAddMarker
(
markerObj
=
{})
{
// 清空已经绘制完的对象
this
.
mousetoolClose
(
true
);
// 记录一下配置项,在挂载点击的时候,需要使用
this
.
mouseToolMarkerOptions
=
{
draggable
:
true
,
...
markerObj
,
};
this
.
mousetool
.
marker
(
this
.
mouseToolMarkerOptions
);
}
// 管线点击上图开启
mouseAddPipeline
(
pipeObj
=
{})
{
this
.
mousetoolClose
(
true
);
// 开始画线
this
.
mosuetoolPolineFlag
=
true
;
this
.
mouseToolPolineOptions
=
{
strokeWeight
:
5
,
...
pipeObj
,
};
this
.
mousetool
.
polyline
(
this
.
mouseToolPolineOptions
);
}
// 手动清除map上绘制的对象
mouseToolDrawClear
()
{
if
(
this
.
nowMouseTarget
)
{
this
.
map
.
remove
(
this
.
nowMouseTarget
);
// 如果有editor,则关闭
this
.
nowMouseTarget
.
editor
&&
this
.
nowMouseTarget
.
editor
.
close
();
this
.
nowMouseTarget
=
null
;
}
}
// 关闭点击上图事件 true清除之前绘制的图像,false 仅关闭上图事件
mousetoolClose
(
boolean
)
{
// 清空地图上的绘制对象的同时,也要清楚这个nowMouseTarget控制对象
if
(
this
.
nowMouseTarget
)
{
// 如果有editor,则关闭
this
.
nowMouseTarget
.
editor
&&
this
.
nowMouseTarget
.
editor
.
close
();
this
.
nowMouseTarget
=
null
;
}
this
.
mousetool
.
close
(
boolean
);
}
/**
*
*
*
*
*
*
* 地图上add设备
*
*
* @description:
* @param {*} deviceData marker的数据
* @param {*} compontent marker点击弹出的infowindow的组件
* @return {*}
*/
addDevice
(
deviceData
)
{
const
{
path
}
=
deviceData
;
let
device
=
this
.
createMarker
({
map
:
this
.
map
,
anchor
:
"bottom-center"
,
icon
:
require
(
"@/assets/mapImages/yalibiao.svg"
),
position
:
path
,
extData
:
deviceData
,
});
// 当前设备
this
.
mouseAddMarker
();
this
.
nowMouseTarget
=
device
;
this
.
setCenter
(
path
);
// 设备的事件函数
// this.deviceEvent(device, compontent);
}
deviceEvent
(
device
,
compontent
)
{
device
.
on
(
"click"
,
(
e
)
=>
{
const
target
=
e
.
target
;
// 如果control==0就是默认值,没有使用123功能,就显示infowindow
if
(
this
.
control
==
0
)
{
// this.markerClick(target, compontent);
}
else
if
(
this
.
control
==
2
)
{
// 2是已经上图的设备拥有的编辑功能
}
else
if
(
this
.
control
==
3
)
{
// 3是删除操作
}
});
}
// 创建marker
createMarker
(
MarkerOptions
)
{
return
new
AMap
.
Marker
(
MarkerOptions
);
}
// 地图上add管道
addPipeLine
(
objData
)
{
const
{
path
}
=
objData
;
const
pipe
=
this
.
createPipeLine
({
path
,
strokeWeight
:
4
,
strokeColor
:
"#000"
,
extData
:
objData
,
cursor
:
"pointer"
,
});
this
.
map
.
add
(
pipe
);
this
.
setCenter
(
path
[
0
]);
// 当前设备
this
.
nowMouseTarget
=
pipe
;
}
createPipeLine
(
pipeLineOptions
)
{
return
new
AMap
.
Polyline
(
pipeLineOptions
);
}
setCenter
(
path
)
{
this
.
map
.
setCenter
(
path
,
true
);
}
// 获取路径
getPath
()
{
if
(
!
this
.
nowMouseTarget
)
return
;
if
(
this
.
nowMouseTarget
.
type
==
"AMap.Marker"
)
{
const
{
lng
,
lat
}
=
this
.
nowMouseTarget
.
getPosition
();
return
[
lng
,
lat
];
}
else
{
return
this
.
nowMouseTarget
?.
getPath
().
map
((
item
)
=>
[
item
.
lng
,
item
.
lat
]);
}
}
// 搜索位置
positionSearch
(
id
)
{
// id 为搜索框id
var
autoOptions
=
{
input
:
id
,
};
AMap
.
plugin
([
"AMap.PlaceSearch"
,
"AMap.AutoComplete"
],
()
=>
{
var
auto
=
new
AMap
.
AutoComplete
(
autoOptions
);
var
placeSearch
=
new
AMap
.
PlaceSearch
({
map
:
this
.
map
,
});
//构造地点查询类
auto
.
on
(
"select"
,
select
);
//注册监听,当选中某条记录时会触发
function
select
(
e
)
{
console
.
log
(
e
)
placeSearch
.
setCity
(
e
.
poi
.
adcode
);
placeSearch
.
search
(
e
.
poi
.
name
);
//关键字查询查询
}
});
}
// 销毁map
destroy
(){
this
.
map
.
destroy
();
}
}
gassafetyprogress-web/src/views/standingBook/hidden/index.vue
View file @
c643f185
...
...
@@ -67,16 +67,17 @@
<el-table
v-loading=
"loading"
:data=
"hiddenList"
>
<el-table-column
label=
"隐患名称"
align=
"center"
prop=
"hiddenTitle"
width=
"200px"
/>
<el-table-column
label=
"隐患
类型"
align=
"center"
prop=
"hiddenType"
width=
"18
0px"
>
<el-table-column
label=
"隐患
等级"
align=
"center"
prop=
"hiddenType"
width=
"16
0px"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.hiddenType == '1'"
></span>
<span
v-if=
"scope.row.hiddenType == '2'"
></span>
<span
v-if=
"scope.row.hiddenType == '1'"
>
一级隐患
</span>
<span
v-if=
"scope.row.hiddenType == '2'"
>
二级隐患
</span>
<span
v-if=
"scope.row.hiddenType == '3'"
>
三级隐患
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"隐患位置"
align=
"center"
prop=
"hiddenLocation"
width=
"300px"
/>
<el-table-column
label=
"隐患发现人员"
align=
"center"
prop=
"hiddenFindPeople"
width=
"150px"
/>
<el-table-column
label=
"发现时间"
align=
"center"
prop=
"hiddenFindDate"
width=
"1
8
0px"
/>
<el-table-column
label=
"处理方案"
align=
"center"
prop=
"dealPlanUrl"
width=
"1
2
0px"
>
<el-table-column
label=
"发现时间"
align=
"center"
prop=
"hiddenFindDate"
width=
"1
6
0px"
/>
<el-table-column
label=
"处理方案"
align=
"center"
prop=
"dealPlanUrl"
width=
"1
5
0px"
>
<
template
slot-scope=
"scope"
>
<span
class=
"dbtn"
...
...
@@ -139,8 +140,8 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"隐患
类型
"
prop=
"hiddenType"
>
<el-select
v-model=
"form.hiddenType"
placeholder=
"请选择隐患
类型
"
style=
"width: 100%"
>
<el-form-item
label=
"隐患
等级
"
prop=
"hiddenType"
>
<el-select
v-model=
"form.hiddenType"
placeholder=
"请选择隐患
等级
"
style=
"width: 100%"
>
<el-option
v-for=
"dict in typeOptions"
:key=
"dict.dictValue"
...
...
@@ -234,14 +235,13 @@
</div>
</el-dialog>
<Mapdialog
v-if=
"loadmap"
:dialogTableVisible=
"dialogTableVisible"
@
dialogcancelFun=
"dialogcancelFun"
:slat=
"form.latitude"
:slng=
"form.longitude"
@
confirmFun=
"confirmFun($event)"
></Mapdialog>
<GetPos
:dialogVisible
.
sync=
"dialogTableVisible"
device=
""
:devicePos=
"devicePos"
@
close=
"dialogcancelFun"
@
getPath=
"getPath"
/>
</div>
</template>
...
...
@@ -250,13 +250,15 @@
import
{
listHidden
,
getHidden
,
delHidden
,
addHidden
,
updateHidden
,
exportHidden
}
from
"@/api/standingBook/hidden"
;
import
Editor
from
'@/components/Editor'
;
import
FileUpload
from
'@/components/FileUpload'
;
import
GetPos
from
'@/components/GetPos'
;
let
uploadfile
=
require
(
"@/assets/uploadfile.png"
);
export
default
{
name
:
"Hidden"
,
components
:
{
Editor
,
FileUpload
FileUpload
,
GetPos
},
data
()
{
return
{
...
...
@@ -285,8 +287,8 @@ export default {
// 上传文件列表
fileList
:
[],
// 地图
loadmap
:
false
,
dialogTableVisible
:
false
,
devicePos
:
[],
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -303,9 +305,9 @@ export default {
hiddenTitle
:
[
{
required
:
true
,
message
:
"请输入隐患名称"
,
trigger
:
"blur"
},
],
/*
hiddenType: [
{ required: true, message: "请选择隐患
类型
", trigger: "blur" },
],
*/
hiddenType
:
[
{
required
:
true
,
message
:
"请选择隐患
等级
"
,
trigger
:
"blur"
},
],
hiddenContent
:
[
{
required
:
true
,
message
:
"请输入隐患内容"
,
trigger
:
"blur"
},
],
...
...
@@ -399,6 +401,7 @@ export default {
url
:
uploadfile
,
});
}
this
.
devicePos
=
[
this
.
form
.
longitude
,
this
.
form
.
latitude
];
this
.
open
=
true
;
this
.
title
=
"修改隐患整治台账"
;
});
...
...
@@ -477,19 +480,19 @@ export default {
this
.
form
.
dealPlan
=
""
;
this
.
fileList
=
[];
},
confirmFun
(
res
)
{
//确认选择经纬度
this
.
form
.
longitude
=
res
.
lng
;
this
.
form
.
latitude
=
res
.
lat
;
},
MapdialogFun
()
{
this
.
loadmap
=
true
;
this
.
dialogTableVisible
=
true
;
// this.devicePos = [this.form.longitude, this.form.latitude];
console
.
log
(
"devicePos"
,
this
.
devicePos
)
},
dialogcancelFun
()
{
this
.
loadmap
=
false
;
this
.
dialogTableVisible
=
false
;
},
getPath
(
res
){
//确认选择经纬度
this
.
form
.
longitude
=
res
[
0
];
this
.
form
.
latitude
=
res
[
1
];
}
}
};
</
script
>
...
...
gassafetyprogress-web/src/views/standingBook/hiddenDetail/index.vue
View file @
c643f185
...
...
@@ -30,8 +30,10 @@
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"隐患类型:"
prop=
"hiddenType"
>
<font>
{{
form
.
hiddenType
}}
</font>
<el-form-item
label=
"隐患等级:"
prop=
"hiddenType"
>
<font
v-if=
"form.hiddenType == '1'"
>
一级隐患
</font>
<font
v-if=
"form.hiddenType == '2'"
>
二级隐患
</font>
<font
v-if=
"form.hiddenType == '3'"
>
三级隐患
</font>
</el-form-item>
<el-form-item
label=
"发现时间:"
prop=
"hiddenFindDate"
>
<font>
{{
form
.
hiddenFindDate
}}
</font>
...
...
gassafetyprogress-web/src/views/standingBook/trouble/index.vue
View file @
c643f185
...
...
@@ -232,24 +232,25 @@
</div>
</el-dialog>
<Mapdialog
v-if=
"loadmap"
:dialogTableVisible=
"dialogTableVisible"
@
dialogcancelFun=
"dialogcancelFun"
:slat=
"form.latitude"
:slng=
"form.longitude"
@
confirmFun=
"confirmFun($event)"
></Mapdialog>
<GetPos
:dialogVisible
.
sync=
"dialogTableVisible"
device=
""
:devicePos=
"devicePos"
@
close=
"dialogcancelFun"
@
getPath=
"getPath"
/>
</div>
</template>
<
script
>
import
{
listTrouble
,
getTrouble
,
delTrouble
,
addTrouble
,
updateTrouble
,
exportTrouble
}
from
"@/api/standingBook/trouble"
;
import
GetPos
from
'@/components/GetPos'
;
export
default
{
name
:
"Trouble"
,
components
:
{
GetPos
},
data
()
{
return
{
...
...
@@ -273,8 +274,8 @@ export default {
troubleTypeOptions
:
[],
isDealOptions
:
[],
// 地图
loadmap
:
false
,
dialogTableVisible
:
false
,
devicePos
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
...
...
@@ -385,6 +386,7 @@ export default {
const
troubleId
=
row
.
troubleId
||
this
.
ids
getTrouble
(
troubleId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
devicePos
=
[
this
.
form
.
longitude
,
this
.
form
.
latitude
];
this
.
open
=
true
;
this
.
title
=
"修改事故台账"
;
});
...
...
@@ -448,19 +450,17 @@ export default {
}
})
},
confirmFun
(
res
)
{
//确认选择经纬度
this
.
form
.
longitude
=
res
.
lng
;
this
.
form
.
latitude
=
res
.
lat
;
},
MapdialogFun
()
{
this
.
loadmap
=
true
;
this
.
dialogTableVisible
=
true
;
},
dialogcancelFun
()
{
this
.
loadmap
=
false
;
this
.
dialogTableVisible
=
false
;
},
getPath
(
res
){
//确认选择经纬度
this
.
form
.
longitude
=
res
[
0
];
this
.
form
.
latitude
=
res
[
1
];
}
}
};
</
script
>
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