Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
83855742
Commit
83855742
authored
Jul 26, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图详细显示
parent
c7b90700
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
67 additions
and
40 deletions
+67
-40
device-manager-ui/admin/src/assets/utils/globalComponents.js
device-manager-ui/admin/src/assets/utils/globalComponents.js
+2
-2
device-manager-ui/admin/src/components/Map.vue
device-manager-ui/admin/src/components/Map.vue
+8
-4
device-manager-ui/admin/src/main.js
device-manager-ui/admin/src/main.js
+1
-1
device-manager-ui/admin/src/router.js
device-manager-ui/admin/src/router.js
+3
-1
device-manager-ui/admin/src/views/device/list.vue
device-manager-ui/admin/src/views/device/list.vue
+14
-1
device-manager-ui/admin/src/views/sitestat/list.vue
device-manager-ui/admin/src/views/sitestat/list.vue
+3
-3
device-manager-ui/admin/src/views/sitestat/maplist.vue
device-manager-ui/admin/src/views/sitestat/maplist.vue
+24
-26
device-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
...java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
+5
-0
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+5
-0
device-manager/src/main/java/com/mortals/xhx/module/sitestat/web/SitestatController.java
...m/mortals/xhx/module/sitestat/web/SitestatController.java
+1
-1
device-manager/src/main/resources/config/mybatis-sqlmap-config.xml
...nager/src/main/resources/config/mybatis-sqlmap-config.xml
+1
-1
No files found.
device-manager-ui/admin/src/assets/utils/globalComponents.js
View file @
83855742
...
...
@@ -14,7 +14,7 @@ import ImagePreview from '@/components/ImagePreview';
import
FileUpload
from
'
@/components/FileUpload
'
;
import
Editor
from
'
@/components/Editor
'
;
import
Map
from
'
@/components/Map
'
;
import
AMap
from
'
@/components/AMap
'
;
import
MapDetail
from
'
@/components/MapDetail
'
;
const
Prototype
=
function
()
{};
...
...
@@ -34,7 +34,7 @@ Prototype.install = (Vue, options) => {
Vue
.
component
(
'
FileUpload
'
,
FileUpload
)
// 文件上传
Vue
.
component
(
'
Editor
'
,
Editor
)
// 富文本
Vue
.
component
(
'
Map
'
,
Map
)
// 地图
Vue
.
component
(
'
AMap
'
,
AMap
)
// 地图
Vue
.
component
(
'
MapDetail
'
,
MapDetail
)
// 地图
}
export
default
Prototype
;
device-manager-ui/admin/src/components/Map.vue
View file @
83855742
...
...
@@ -114,6 +114,7 @@ import { AMapManager, lazyAMapApiLoaderInstance } from "vue-amap";
let
amapManager
=
new
AMapManager
();
export
default
{
name
:
"
MapList
"
,
props
:
{
value
:
{
type
:
Boolean
,
...
...
@@ -148,6 +149,12 @@ export default {
//获取设备列表
console
.
log
(
"
device siteId
"
,
this
.
info
.
siteId
)
this
.
$emit
(
"
choose
"
,
this
.
info
,
(
val
)
=>
{
//data = val;
console
.
log
(
"
callback:
"
+
val
);
});
},
refresh
(
data
)
{
console
.
log
(
"
刷新数据
"
,
data
);
...
...
@@ -167,9 +174,6 @@ export default {
setMarker
(
item
)
{
if
(
!
item
.
lng
&&
!
item
.
lat
)
return
;
//console.log("data",formatterDate(item.createTime))
let
markerLabel
=
{
label
:
{
content
:
item
.
siteName
,
offset
:
[
30
,
70
]
},
position
:
[
item
.
lng
,
item
.
lat
],
...
...
@@ -368,7 +372,7 @@ export default {
};
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.tuli{
width: 300px;
top: 20px;
...
...
device-manager-ui/admin/src/main.js
View file @
83855742
...
...
@@ -25,7 +25,7 @@ VueAMap.initAMapApiLoader({
key
:
'
f45cca59553214543a5a77e50a7e04df
'
,
plugin
:
[
'
AMap.Scale
'
,
'
AMap.OverView
'
,
'
AMap.ToolBar
'
,
'
AMap.MapType
'
,
'
AMap.PlaceSearch
'
,
'
AMap.Geolocation
'
,
'
AMap.Geocoder
'
],
v
:
'
1.4.4
'
,
uiVersion
:
'
1.0
'
uiVersion
:
'
1.0
'
,
})
Vue
.
prototype
.
Global
=
Global
;
new
Vue
({
...
...
device-manager-ui/admin/src/router.js
View file @
83855742
...
...
@@ -39,7 +39,9 @@ const router = new Router({
...
restBuilder
(
'
sitestat
'
,
'
sitestat
'
),
//站点设备管理
builder
(
'
sitestat/maplist
'
,
'
sitestat/maplist
'
),
//站点
builder
(
'
sitestat/maplist
'
,
'
sitestat/maplist
'
),
//地图站点
builder
(
'
sitestat/mapDetail
'
,
'
sitestat/mapDetail
'
),
//地图设备
...
restBuilder
(
'
platform
'
,
'
platform
'
),
//平台
...
...
device-manager-ui/admin/src/views/device/list.vue
View file @
83855742
...
...
@@ -9,7 +9,7 @@
>
站点编码:
{{
siteCode
}}
)
</span
>
<el-link
style=
"margin-left: 10px"
type=
"primary"
:underline=
"false"
<el-link
style=
"margin-left: 10px"
type=
"primary"
@
click=
"switchMap"
:underline=
"false"
>
地图模式
</el-link
>
<el-button
...
...
@@ -181,6 +181,10 @@ export default {
console
.
log
(
this
.
$route
);
this
.
siteId
=
this
.
$route
.
query
.
siteId
;
this
.
info
=
this
.
$route
.
query
this
.
query
=
{
siteId
:
this
.
siteId
}
this
.
$get
(
"
/sitestat/siteInfo
"
,
{
siteId
:
this
.
siteId
,
})
...
...
@@ -193,8 +197,16 @@ export default {
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
this
.
$router
.
push
({
query
:
{
}
});
},
methods
:
{
switchMap
(){
this
.
$router
.
push
({
path
:
"
/sitestat/mapDetail
"
,
query
:
this
.
info
,
});
},
/** 导入 */
handleImport
()
{
this
.
upload
.
title
=
"
设备导入
"
;
...
...
@@ -385,6 +397,7 @@ export default {
// 上传的地址
url
:
"
/m/device/importData
"
,
},
info
:{},
// 站点树
tree
:
{
// 是否显示弹出层(设备导入)
...
...
device-manager-ui/admin/src/views/sitestat/list.vue
View file @
83855742
...
...
@@ -119,12 +119,12 @@ export default {
},
/** 重写查看方法 */
toView
(
row
)
{
console
.
log
(
row
)
//进入设备列表页面
this
.
$router
.
push
({
path
:
"
/device/list
"
,
query
:
{
siteId
:
row
.
siteId
,
},
query
:
row
,
});
},
...
...
device-manager-ui/admin/src/views/sitestat/maplist.vue
View file @
83855742
<
template
>
<div>
<Map
ref=
"map"
:markersData=
"originData"
@
choose=
"getDetailData"
>
<el-row
:gutter=
"20"
slot=
"leftTop"
>
<Map
ref=
"map"
:markersData=
"originData"
@
choose=
"getDetailData"
>
<el-row
:gutter=
"20"
slot=
"leftTop"
>
<el-card>
<div
slot=
"header"
>
<span><b
class=
"cardTitle"
>
站点分布
</b></span>
<span><b
class=
"cardTitle"
>
站点分布
</b></span>
<el-button
style=
"float: right;"
@
click=
"switchStat"
type=
"text"
<el-button
style=
"float: right"
@
click=
"switchStat"
type=
"text"
>
切换为列表模式
</el-button
>
</div>
...
...
@@ -34,9 +28,8 @@
>
</el-tree>
</el-scrollbar>
</el-card>
</el-row></Map>
</el-card>
</el-row
></Map>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
</div>
...
...
@@ -47,10 +40,9 @@
import
dialogShow
from
"
./dialogshow
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
tree
from
"
@/assets/mixins/tree
"
;
import
Map
from
"
@/components/Map
"
;
export
default
{
name
:
"
Sitestat
"
,
components
:
{
dialogShow
,
Map
},
components
:
{
dialogShow
},
mixins
:
[
table
,
tree
],
mounted
()
{
console
.
log
(
this
.
pageInfo
);
...
...
@@ -62,7 +54,7 @@ export default {
created
()
{
this
.
pageInfo
.
list
=
"
/sitestat/list
"
;
this
.
$get
(
"
/sitestat/maplist
"
,
{}).
then
(({
data
})
=>
{
this
.
originData
=
data
this
.
originData
=
data
;
// this.originData = data.data.map((i) => {
// let obj = {};
// obj.lng = i.longitude;
...
...
@@ -71,6 +63,7 @@ export default {
// obj.siteId = i.id;
// return obj;
// });
//console.log(data)
this
.
$refs
.
map
.
refresh
(
this
.
originData
);
});
...
...
@@ -106,20 +99,25 @@ export default {
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
},
},
getDetailData
(
info
,
callback
)
{
console
.
log
(
"
info:
"
,
info
);
getDetailData
(
siteId
,
callback
)
{
console
.
log
(
"
siteId:
"
,
siteId
);
this
.
$router
.
push
({
path
:
"
/sitestat/mapDetail
"
,
query
:
info
,
// query: {id:info.id},
});
this
.
$get
(
"
/sitestat/siteInfo
"
,
{
siteId
,
siteId
}).
then
((
res
)
=>
{
//
this.$get("/sitestat/siteInfo", { siteId, siteId }).then((res) => {
console
.
log
(
"
res
"
,
res
)
//
console.log("res",res)
// if (res.code == 1 && res.data.data.length > 0) {
// callback(res.data.data[0]);
// }
});
//
// if (res.code == 1 && res.data.data.length > 0) {
//
// callback(res.data.data[0]);
//
// }
//
});
//关闭弹窗
// this.$refs.popoverRef.doClose()
...
...
@@ -239,7 +237,7 @@ export default {
font-size
:
16px
;
color
:
rgb
(
20
,
134
,
248
);
list-style-type
:
none
;
border-bottom
:
3px
solid
rgb
(
20
,
134
,
248
);
border-bottom
:
3px
solid
rgb
(
20
,
134
,
248
);
padding-bottom
:
2px
;
}
.
mytree
:
:
v-deep
{
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
View file @
83855742
...
...
@@ -51,5 +51,10 @@ public class DeviceVo extends BaseEntityLong {
/** 主键ID,主键,自增长列表 */
private
List
<
Long
>
idList
;
/**
* 产品列表
*/
private
List
<
Long
>
productIdList
;
}
\ No newline at end of file
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
83855742
...
...
@@ -87,6 +87,11 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
this
.
addDict
(
model
,
"enabled"
,
paramService
.
getParamBySecondOrganize
(
"Device"
,
"enabled"
));
this
.
addDict
(
model
,
"source"
,
DeviceSourceEnum
.
getEnumMap
());
//返回产品列表及其样式
//productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())).
super
.
init
(
model
,
context
);
}
...
...
device-manager/src/main/java/com/mortals/xhx/module/sitestat/web/SitestatController.java
View file @
83855742
...
...
@@ -138,7 +138,7 @@ public class SitestatController extends BaseCRUDJsonBodyMappingController<Sitest
}
return
null
;
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
return
Rest
.
ok
(
"获取成功"
,
collect
);
return
Rest
.
ok
(
"获取成功"
,
collect
);
}
catch
(
Exception
e
)
{
log
.
error
(
"获取异常"
,
e
);
return
Rest
.
fail
(
"获取异常!"
);
...
...
device-manager/src/main/resources/config/mybatis-sqlmap-config.xml
View file @
83855742
...
...
@@ -9,7 +9,7 @@
<setting
name=
"useGeneratedKeys"
value=
"false"
/>
<setting
name=
"defaultExecutorType"
value=
"REUSE"
/>
<!-- 是否开始sql日志控制台打印 -->
<!--
<setting name="logImpl" value="STDOUT_LOGGING" />-->
<!-- <setting name="logImpl" value="STDOUT_LOGGING" />-->
</settings>
<plugins>
<plugin
interceptor=
"com.mortals.framework.thirty.mybatis.MortalsPagePlugin"
>
...
...
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