Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
property-management
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
property-management
Commits
d4c8c650
Commit
d4c8c650
authored
May 25, 2022
by
416409548@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug优化,视频安防模块优化
parent
cb12baa3
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
239 additions
and
820 deletions
+239
-820
ant-design-vue-jeecg/src/views/pm/access-control-device/PmAccessControlDeviceOverview.vue
+2
-6
ant-design-vue-jeecg/src/views/pm/access-control-device/modules/PmAccessControlDeviceForm.vue
+16
-15
ant-design-vue-jeecg/src/views/pm/advertising_screen_announce/modules/AdvertisingScreenAnnounceForm.vue
+0
-0
ant-design-vue-jeecg/src/views/pm/event-center/PmEventInfoList.vue
+2
-2
ant-design-vue-jeecg/src/views/pm/monitoring-device/PmMonitoringDeviceList.vue
+66
-145
ant-design-vue-jeecg/src/views/pm/monitoring-device/PmMonitoringDeviceOverview.vue
+0
-170
ant-design-vue-jeecg/src/views/pm/monitoring-device/modules/PmMonitoringDeviceForm.vue
+61
-268
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/controller/PmAccessControlDeviceController.java
+1
-1
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/controller/PmAccessControlDeviceRecordController.java
+0
-4
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/controller/PmMonitoringDeviceController.java
+29
-34
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/entity/AlarmQuery.java
+0
-1
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/entity/PmAccessControlDeviceRecord.java
+1
-2
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/entity/PmMonitoringDevice.java
+56
-122
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/mapper/PmMonitoringDeviceMapper.java
+1
-1
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/service/IPmMonitoringDeviceService.java
+2
-4
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/service/impl/PmMonitoringDeviceServiceImpl.java
+2
-45
No files found.
ant-design-vue-jeecg/src/views/pm/access-control-device/PmAccessControlDeviceOverview.vue
View file @
d4c8c650
...
@@ -4,15 +4,14 @@
...
@@ -4,15 +4,14 @@
<div
class=
"table-page-search-wrapper"
>
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
@
keyup
.
enter
.
native=
"searchQuery"
>
<a-form
layout=
"inline"
@
keyup
.
enter
.
native=
"searchQuery"
>
<a-row
:gutter=
"24"
>
<a-row
:gutter=
"24"
>
<a-col
:
xl=
"4"
:lg=
"4"
:md=
"5"
:sm=
"24
"
>
<a-col
:
md=
"4"
:sm=
"8
"
>
<a-form-item
label=
"设备类型"
>
<a-form-item
label=
"设备类型"
>
<j-dict-select-tag
v-model=
"queryParam.type"
placeholder=
"请选择设备类型"
dict-code=
"alarm_query_equipmentType"
/>
<j-dict-select-tag
v-model=
"queryParam.type"
placeholder=
"请选择设备类型"
dict-code=
"alarm_query_equipmentType"
/>
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:
xl=
"4"
:lg=
"4"
:md=
"5"
:sm=
"24
"
>
<a-col
:
md=
"4"
:sm=
"8
"
>
<a-space
style=
"float: left"
>
<a-space
style=
"float: left"
>
<a-button
type=
"primary"
@
click=
"searchQuery"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"searchQuery"
>
查询
</a-button>
<a-button
type=
"default"
@
click=
"searchReset"
>
重置
</a-button>
</a-space>
</a-space>
</a-col>
</a-col>
</a-row>
</a-row>
...
@@ -141,9 +140,6 @@ export default {
...
@@ -141,9 +140,6 @@ export default {
})
})
});
});
},
},
searchReset
()
{
this
.
searchQuery
();
},
floorImgLoadComplete
()
{
floorImgLoadComplete
()
{
this
.
searchQuery
();
this
.
searchQuery
();
}
}
...
...
ant-design-vue-jeecg/src/views/pm/access-control-device/modules/PmAccessControlDeviceForm.vue
View file @
d4c8c650
...
@@ -143,19 +143,23 @@ export default {
...
@@ -143,19 +143,23 @@ export default {
},
},
confirmLoading
:
false
,
confirmLoading
:
false
,
validatorRules
:
{
validatorRules
:
{
code
:
[
code
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请输入设备编码'
,
message
:
'请输入设备编码'
,
trigger
:
'blur'
trigger
:
'blur'
}
},
{
min
:
0
,
max
:
50
,
message
:
'长度不超过50个字符'
,
trigger
:
'blur'
}
],
],
name
:
[
name
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请输入设备名称'
,
message
:
'请输入设备名称'
,
trigger
:
'blur'
trigger
:
'blur'
}
},
{
min
:
0
,
max
:
50
,
message
:
'长度不超过50个字符'
,
trigger
:
'blur'
}
],
],
ip
:
[
ip
:
[
{
{
...
@@ -164,24 +168,19 @@ export default {
...
@@ -164,24 +168,19 @@ export default {
trigger
:
'blur'
trigger
:
'blur'
}
}
],
],
type
:
[
place
:
[
{
required
:
true
,
message
:
'选择设备类型'
,
trigger
:
'change'
}
],
buildingName
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'选择
楼栋
'
,
message
:
'选择
设备位置
'
,
trigger
:
'change'
trigger
:
'change'
}
},
{
min
:
0
,
max
:
50
,
message
:
'长度不超过50个字符'
,
trigger
:
'blur'
}
],
],
floor
:
[
type
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'选择
楼层
'
,
message
:
'选择
设备类型
'
,
trigger
:
'change'
trigger
:
'change'
}
}
],
],
...
@@ -218,7 +217,9 @@ export default {
...
@@ -218,7 +217,9 @@ export default {
required
:
true
,
required
:
true
,
message
:
'请输入生产厂商'
,
message
:
'请输入生产厂商'
,
trigger
:
'blur'
trigger
:
'blur'
}
},
{
min
:
0
,
max
:
50
,
message
:
'长度不超过50个字符'
,
trigger
:
'blur'
}
],
],
warrantyPeriod
:
[
warrantyPeriod
:
[
{
{
...
...
ant-design-vue-jeecg/src/views/pm/advertising_screen_announce/modules/AdvertisingScreenAnnounceForm.vue
View file @
d4c8c650
ant-design-vue-jeecg/src/views/pm/event-center/PmEventInfoList.vue
View file @
d4c8c650
...
@@ -15,12 +15,12 @@
...
@@ -15,12 +15,12 @@
<a-col
:span=
"4"
>
<a-col
:span=
"4"
>
<a-form-model-item
label=
"开始时间"
prop=
"createTime"
>
<a-form-model-item
label=
"开始时间"
prop=
"createTime"
>
<j-date
v-model=
"queryParam.createTime"
:showTime=
"true"
dateFormat=
"YYYY-MM-DD HH:mm:ss"
/>
<j-date
v-model=
"queryParam.createTime"
placeholder=
"请选择开始时间"
:showTime=
"true"
dateFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"4"
>
<a-col
:span=
"4"
>
<a-form-model-item
label=
"结束时间"
prop=
"stopTime"
>
<a-form-model-item
label=
"结束时间"
prop=
"stopTime"
>
<j-date
v-model=
"queryParam.stopTime"
:showTime=
"true"
dateFormat=
"YYYY-MM-DD HH:mm:ss"
/>
<j-date
v-model=
"queryParam.stopTime"
placeholder=
"请选择结束时间"
:showTime=
"true"
dateFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
...
...
ant-design-vue-jeecg/src/views/pm/monitoring-device/PmMonitoringDeviceList.vue
View file @
d4c8c650
...
@@ -4,24 +4,21 @@
...
@@ -4,24 +4,21 @@
<div
class=
"table-page-search-wrapper"
>
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
@
keyup
.
enter
.
native=
"searchQuery"
>
<a-form
layout=
"inline"
@
keyup
.
enter
.
native=
"searchQuery"
>
<a-row
:gutter=
"24"
>
<a-row
:gutter=
"24"
>
<a-col
:xl=
"4"
:lg=
"4"
:md=
"5"
:sm=
"24"
>
<a-col
:md=
"4"
:sm=
"8"
>
<a-form-item
label=
"区域"
>
<a-form-item
label=
"设备名称"
>
<a-select
placeholder=
"选择区域"
v-model=
"queryParam.area"
@
change=
"buildingChange"
>
<j-input
placeholder=
"请输入设备名称"
v-model=
"queryParam.name"
></j-input>
<a-select-option
v-for=
"area in areas"
:key=
"area"
>
{{
area
}}
</a-select-option>
</a-select>
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:
xl=
"4"
:lg=
"4"
:md=
"5"
:sm=
"24
"
>
<a-col
:
md=
"4"
:sm=
"8
"
>
<a-space
style=
"float: left"
>
<a-space
style=
"float: left"
>
<a-button
type=
"primary"
@
click=
"searchQuery"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"searchQuery"
>
查询
</a-button>
<a-button
type=
"default"
@
click=
"searchReset"
>
重置
</a-button>
<a-button
type=
"default"
@
click=
"searchReset"
>
重置
</a-button>
</a-space>
</a-space>
</a-col>
</a-col>
<a-col
:
xl=
"4"
:lg=
"4"
:md=
"5"
:sm=
"24
"
>
<a-col
:
md=
"16"
:sm=
"8
"
>
<a-space
style=
"float: right"
>
<a-space
style=
"float: right"
>
<a-button
@
click=
"handleExportXls('pm_access_control_device')"
type=
"primary"
>
导出
</a-button>
<!--
<a-button
@
click=
"handleAdd"
type=
"primary"
>
新增
</a-button>
-->
<a-button
@
click=
"handleExportXls('视频安防导出')"
type=
"primary"
>
导出
</a-button>
</a-space>
</a-space>
</a-col>
</a-col>
</a-row>
</a-row>
...
@@ -30,36 +27,28 @@
...
@@ -30,36 +27,28 @@
<!-- 查询区域-END -->
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!-- 操作按钮区域 -->
<!--
<div
class=
"table-operator"
>
<!--
<div
class=
"table-operator"
>
<a-button
@
click=
"handleAdd"
type=
"primary"
icon=
"plus"
>
新增
</a-button>
<a-button
@
click=
"handleAdd"
type=
"primary"
icon=
"plus"
>
新增
</a-button>
<a-button
type=
"primary"
icon=
"download"
@
click=
"handleExportXls('pm_access_control_device')"
>
导出
</a-button>
<a-button
type=
"primary"
icon=
"download"
@
click=
"handleExportXls('pm_monitoring_device')"
>
导出
</a-button>
<a-upload
name=
"file"
:showUploadList=
"false"
:multiple=
"false"
:headers=
"tokenHeader"
:action=
"importExcelUrl"
<a-upload
name=
"file"
:showUploadList=
"false"
:multiple=
"false"
:headers=
"tokenHeader"
:action=
"importExcelUrl"
@
change=
"handleImportExcel"
>
@
change=
"handleImportExcel"
>
<a-button
type=
"primary"
icon=
"import"
>
导入
</a-button>
<a-button
type=
"primary"
icon=
"import"
>
导入
</a-button>
</a-upload>
</a-upload>
-->
<
!
–
高级查询区域
–>
<!-- 高级查询区域 -->
<j-super-query
:fieldList=
"superFieldList"
ref=
"superQueryModal"
<!--
<j-super-query
:fieldList=
"superFieldList"
ref=
"superQueryModal"
@
handleSuperQuery=
"handleSuperQuery"
></j-super-query>
@
handleSuperQuery=
"handleSuperQuery"
></j-super-query>
<a-dropdown
v-if=
"selectedRowKeys.length > 0"
>
<a-dropdown
v-if=
"selectedRowKeys.length > 0"
>
<a-menu
slot=
"overlay"
>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"1"
@
click=
"batchDel"
>
<a-menu-item
key=
"1"
@
click=
"batchDel"
><a-icon
type=
"delete"
/>
删除
</a-menu-item>
<a-icon
type=
"delete"
/>
删除
</a-menu-item>
</a-menu>
</a-menu>
<a-button
style=
"margin-left: 8px"
>
批量操作
<a-button
style=
"margin-left: 8px"
>
批量操作
<a-icon
type=
"down"
/></a-button>
<a-icon
type=
"down"
/>
</a-button>
</a-dropdown>
</a-dropdown>
</div>
-->
</div>
-->
<!-- table区域-begin -->
<!-- table区域-begin -->
<div>
<div>
<!--
<div
class=
"ant-alert ant-alert-info"
style=
"margin-bottom: 16px;"
>
<!--
<div
class=
"ant-alert ant-alert-info"
style=
"margin-bottom: 16px;"
>
<i
class=
"anticon anticon-info-circle ant-alert-icon"
></i>
已选择
<a
<i
class=
"anticon anticon-info-circle ant-alert-icon"
></i>
已选择
<a
style=
"font-weight: 600"
>
{{
selectedRowKeys
.
length
}}
</a>
项
style=
"font-weight: 600"
>
{{
selectedRowKeys
.
length
}}
</a>
项
<a
style=
"margin-left: 24px"
@
click=
"onClearSelected"
>
清空
</a>
<a
style=
"margin-left: 24px"
@
click=
"onClearSelected"
>
清空
</a>
</div>
-->
</div>
-->
<a-table
<a-table
ref=
"table"
ref=
"table"
...
@@ -80,8 +69,7 @@
...
@@ -80,8 +69,7 @@
</
template
>
</
template
>
<
template
slot=
"imgSlot"
slot-scope=
"text"
>
<
template
slot=
"imgSlot"
slot-scope=
"text"
>
<span
v-if=
"!text"
style=
"font-size: 12px;font-style: italic;"
>
无图片
</span>
<span
v-if=
"!text"
style=
"font-size: 12px;font-style: italic;"
>
无图片
</span>
<img
v-else
:src=
"getImgView(text)"
height=
"25px"
alt=
""
<img
v-else
:src=
"getImgView(text)"
height=
"25px"
alt=
""
style=
"max-width:80px;font-size: 12px;font-style: italic;"
/>
style=
"max-width:80px;font-size: 12px;font-style: italic;"
/>
</
template
>
</
template
>
<
template
slot=
"fileSlot"
slot-scope=
"text"
>
<
template
slot=
"fileSlot"
slot-scope=
"text"
>
<span
v-if=
"!text"
style=
"font-size: 12px;font-style: italic;"
>
无文件
</span>
<span
v-if=
"!text"
style=
"font-size: 12px;font-style: italic;"
>
无文件
</span>
...
@@ -97,18 +85,13 @@
...
@@ -97,18 +85,13 @@
</
template
>
</
template
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<a-space>
<a
href=
"/static/mpb/mpb.html"
target=
"_blank"
>
视频
</a>
<a
@
click=
"handleDetail(record)"
>
查看
</a>
<a
@
click=
"handleDetail(record)"
>
查看
</a>
<a
@
click=
"handleEdit(record)"
>
修改
</a>
<a-divider
type=
"vertical"
/>
<a-popconfirm
title=
"确定删除吗?"
@
confirm=
"() => handleDelete(record.id)"
>
<a
@
click=
"handleEdit(record)"
>
编辑
</a>
<a>
删除
</a>
<a-divider
type=
"vertical"
/>
</a-popconfirm>
<a
href=
"/static/mpb/mpb.html"
target=
"_blank"
>
视频
</a>
</a-space>
</span>
</span>
</a-table>
</a-table>
<!-- <iframe src="/static/spb/spb.html" frameborder="0" width="1000" height="1000"></iframe> -->
</div>
</div>
<pm-monitoring-device-modal
ref=
"modalForm"
@
ok=
"modalFormOk"
></pm-monitoring-device-modal>
<pm-monitoring-device-modal
ref=
"modalForm"
@
ok=
"modalFormOk"
></pm-monitoring-device-modal>
...
@@ -121,7 +104,6 @@
...
@@ -121,7 +104,6 @@
import
{
mixinDevice
}
from
'@/utils/mixin'
import
{
mixinDevice
}
from
'@/utils/mixin'
import
{
JeecgListMixin
}
from
'@/mixins/JeecgListMixin'
import
{
JeecgListMixin
}
from
'@/mixins/JeecgListMixin'
import
PmMonitoringDeviceModal
from
'./modules/PmMonitoringDeviceModal'
import
PmMonitoringDeviceModal
from
'./modules/PmMonitoringDeviceModal'
import
{
getAction
}
from
'@/api/manage'
export
default
{
export
default
{
name
:
'PmMonitoringDeviceList'
,
name
:
'PmMonitoringDeviceList'
,
...
@@ -145,14 +127,9 @@
...
@@ -145,14 +127,9 @@
}
}
},
},
{
{
title
:
'
设备编码
'
,
title
:
'
区域名称
'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'code'
dataIndex
:
'districtName'
},
{
title
:
'设备类型'
,
align
:
"center"
,
dataIndex
:
'type'
},
},
{
{
title
:
'设备名称'
,
title
:
'设备名称'
,
...
@@ -160,89 +137,49 @@
...
@@ -160,89 +137,49 @@
dataIndex
:
'name'
dataIndex
:
'name'
},
},
{
{
title
:
'设备ip'
,
title
:
'设备编码'
,
align
:
"center"
,
dataIndex
:
'ip'
},
{
title
:
'楼栋'
,
align
:
"center"
,
dataIndex
:
'buildingName'
},
{
title
:
'楼层'
,
align
:
"center"
,
dataIndex
:
'floor'
},
{
title
:
'设备位置'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'place'
dataIndex
:
'code'
},
{
title
:
'xy值'
,
align
:
"center"
,
dataIndex
:
'coordinate'
,
customRender
(
t
,
r
,
index
)
{
if
(
t
)
{
return
t
.
x
+
','
+
t
.
y
;
}
},
},
},
{
{
title
:
'
生产日期
'
,
title
:
'
设备类型
'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'dateOfProduction'
,
dataIndex
:
'type_dictText'
customRender
:
function
(
text
)
{
return
!
text
?
""
:(
text
.
length
>
10
?
text
.
substr
(
0
,
10
):
text
)
}
},
},
{
{
title
:
'
安装日期
'
,
title
:
'
设备ip
'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'installationDate'
,
dataIndex
:
'ip'
customRender
:
function
(
text
)
{
return
!
text
?
""
:(
text
.
length
>
10
?
text
.
substr
(
0
,
10
):
text
)
}
},
},
{
{
title
:
'
保修截止日期
'
,
title
:
'
所属设备
'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'warrantyPeriod'
,
dataIndex
:
'theirEquipment'
customRender
:
function
(
text
)
{
return
!
text
?
""
:(
text
.
length
>
10
?
text
.
substr
(
0
,
10
):
text
)
}
},
},
{
{
title
:
'
生产厂商
'
,
title
:
'
xy值
'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'manufacturer'
,
dataIndex
:
'coordinate'
customRender
:
function
(
text
)
{
return
!
text
?
""
:(
text
.
length
>
10
?
text
.
substr
(
0
,
10
):
text
)
}
},
},
{
{
title
:
'状态'
,
title
:
'
设备
状态'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'status'
dataIndex
:
'status
_dictText
'
},
},
{
{
title
:
'
创建人Id(sys_user)
'
,
title
:
'
端口
'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'
createUserId
'
dataIndex
:
'
port
'
},
},
{
{
title
:
'
修改人Id(sys_user)
'
,
title
:
'
通道号
'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'
modifyUserId
'
dataIndex
:
'
chanelNum
'
},
},
{
{
title
:
'
修改时间
'
,
title
:
'
创建人
'
,
align
:
"center"
,
align
:
"center"
,
dataIndex
:
'modifyTime'
,
dataIndex
:
'createUserId_dictText'
customRender
:
function
(
text
)
{
return
!
text
?
""
:(
text
.
length
>
10
?
text
.
substr
(
0
,
10
):
text
)
}
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
@@ -259,59 +196,43 @@
...
@@ -259,59 +196,43 @@
deleteBatch
:
"/pm/pmMonitoringDevice/deleteBatch"
,
deleteBatch
:
"/pm/pmMonitoringDevice/deleteBatch"
,
exportXlsUrl
:
"/pm/pmMonitoringDevice/exportXls"
,
exportXlsUrl
:
"/pm/pmMonitoringDevice/exportXls"
,
importExcelUrl
:
"pm/pmMonitoringDevice/importExcel"
,
importExcelUrl
:
"pm/pmMonitoringDevice/importExcel"
,
},
},
dictOptions
:{},
dictOptions
:{},
superFieldList
:
[],
superFieldList
:[],
buildingInfos
:
[],
targetFloorList
:
[],
types
:
[],
}
}
},
},
created
()
{
created
()
{
this
.
getSuperFieldList
();
this
.
getSuperFieldList
();
getAction
(
'/pm/pmBuildingInfo/list'
)
.
then
(
value
=>
this
.
buildingInfos
=
value
.
result
);
getAction
(
'/pm/pmAccessControlDevice/types'
)
.
then
(
value
=>
this
.
types
=
value
.
result
);
},
},
computed
:
{
computed
:
{
importExcelUrl
:
function
()
{
importExcelUrl
:
function
()
{
return
`
${
window
.
_CONFIG
[
'domianURL'
]}
/
${
this
.
url
.
importExcelUrl
}
`
;
return
`
${
window
.
_CONFIG
[
'domianURL'
]}
/
${
this
.
url
.
importExcelUrl
}
`
;
},
},
},
},
methods
:
{
methods
:
{
initDictConfig
()
{
initDictConfig
(){
},
},
getSuperFieldList
()
{
getSuperFieldList
(){
let
fieldList
=
[];
let
fieldList
=
[];
fieldList
.
push
({
type
:
'string'
,
value
:
'code'
,
text
:
'设备编码'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'districtName'
,
text
:
'区域名称'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'name'
,
text
:
'设备名称'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'name'
,
text
:
'设备名称'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'ip'
,
text
:
'设备ip'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'code'
,
text
:
'设备编码'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'buildingName'
,
text
:
'楼栋'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'type'
,
text
:
'设备类型'
})
fieldList
.
push
({
type
:
'int'
,
value
:
'floor'
,
text
:
'楼层'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'ip'
,
text
:
'设备ip'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'place'
,
text
:
'设备位置'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'theirEquipment'
,
text
:
'所属设备'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'coordinate'
,
text
:
'xy值'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'coordinate'
,
text
:
'xy值'
})
fieldList
.
push
({
type
:
'int'
,
value
:
'doorOpenTime'
,
text
:
'开门时间'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'status'
,
text
:
'状态 1:正常 2:离线 3:维修'
})
fieldList
.
push
({
type
:
'date'
,
value
:
'dateOfProduction'
,
text
:
'生产日期'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'port'
,
text
:
'端口'
})
fieldList
.
push
({
type
:
'date'
,
value
:
'installationDate'
,
text
:
'安装日期'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'chanelNum'
,
text
:
'通道号'
})
fieldList
.
push
({
type
:
'date'
,
value
:
'warrantyPeriod'
,
text
:
'保修截止日期'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'createUserId'
,
text
:
'创建人Id(sys_user)'
})
fieldList
.
push
({
type
:
'date'
,
value
:
'manufacturer'
,
text
:
'生产厂商'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'modifyUserId'
,
text
:
'修改人Id(sys_user)'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'status'
,
text
:
'状态'
})
fieldList
.
push
({
type
:
'date'
,
value
:
'modifyTime'
,
text
:
'修改时间'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'createUserId'
,
text
:
'创建人Id(sys_user)'
})
fieldList
.
push
({
type
:
'int'
,
value
:
'deleted'
,
text
:
'删除状态'
})
fieldList
.
push
({
type
:
'string'
,
value
:
'modifyUserId'
,
text
:
'修改人Id(sys_user)'
})
fieldList
.
push
({
type
:
'date'
,
value
:
'modifyTime'
,
text
:
'修改时间'
})
this
.
superFieldList
=
fieldList
this
.
superFieldList
=
fieldList
},
buildingChange
(
value
)
{
let
targetList
=
this
.
buildingInfos
.
filter
(
buildingInfo
=>
buildingInfo
.
name
===
value
);
if
(
targetList
!=
null
&&
targetList
.
length
>
0
)
{
this
.
targetFloorList
=
targetList
[
0
].
floorList
;
}
else
{
this
.
targetFloorList
=
[];
}
}
},
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
@import
'~@assets/less/common.less'
;
@import
'~@assets/less/common.less'
;
...
...
ant-design-vue-jeecg/src/views/pm/monitoring-device/PmMonitoringDeviceOverview.vue
deleted
100644 → 0
View file @
cb12baa3
<
template
>
<a-card
:bordered=
"false"
>
<!-- 查询区域 -->
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
@
keyup
.
enter
.
native=
"searchQuery"
>
<a-row
:gutter=
"24"
>
<a-col
:xl=
"4"
:lg=
"4"
:md=
"5"
:sm=
"24"
>
<a-form-item
label=
"选择楼栋"
>
<a-select
placeholder=
"选择楼栋"
v-model=
"queryParam.buildingName"
@
change=
"buildingChange"
>
<a-select-option
v-for=
"buildingInfo in buildingInfos"
:key=
"buildingInfo.name"
>
{{
buildingInfo
.
name
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:xl=
"4"
:lg=
"4"
:md=
"5"
:sm=
"24"
>
<a-form-item
label=
"选择楼层"
>
<a-select
placeholder=
"选择楼层"
v-model=
"queryParam.floor"
>
<a-select-option
v-for=
"floor in targetFloorList"
:key=
"floor"
>
{{
floor
}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:xl=
"4"
:lg=
"4"
:md=
"5"
:sm=
"24"
>
<a-space
style=
"float: left"
>
<a-button
type=
"primary"
@
click=
"searchQuery"
>
查询
</a-button>
<a-button
type=
"default"
@
click=
"searchReset"
>
重置
</a-button>
</a-space>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!--
<div
class=
"table-operator"
>
<a-button
@
click=
"handleAdd"
type=
"primary"
icon=
"plus"
>
新增
</a-button>
<a-button
type=
"primary"
icon=
"download"
@
click=
"handleExportXls('pm_access_control_device')"
>
导出
</a-button>
<a-upload
name=
"file"
:showUploadList=
"false"
:multiple=
"false"
:headers=
"tokenHeader"
:action=
"importExcelUrl"
@
change=
"handleImportExcel"
>
<a-button
type=
"primary"
icon=
"import"
>
导入
</a-button>
</a-upload>
<
!
–
高级查询区域
–>
<j-super-query
:fieldList=
"superFieldList"
ref=
"superQueryModal"
@
handleSuperQuery=
"handleSuperQuery"
></j-super-query>
<a-dropdown
v-if=
"selectedRowKeys.length > 0"
>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"1"
@
click=
"batchDel"
>
<a-icon
type=
"delete"
/>
删除
</a-menu-item>
</a-menu>
<a-button
style=
"margin-left: 8px"
>
批量操作
<a-icon
type=
"down"
/>
</a-button>
</a-dropdown>
</div>
-->
<!-- table区域-begin -->
<div>
<a-row>
<a-col
:span=
"24"
>
<div
style=
"position: relative"
>
<img
ref=
"floorImg"
src=
"@/assets/floor.png"
alt=
"floor"
width=
"100%"
height=
"100%"
@
load=
"floorImgLoadComplete()"
/>
<img
v-for=
"(item, index) in list"
ref=
"icon"
:src=
"item.status === 'NORMAL'
? statusList[0].imgPath
: (item.status === 'OFFLINE' ? statusList[1].imgPath : statusList[2].imgPath)"
:alt=
"item.name + ':' + item.ip"
/>
</div>
</a-col>
</a-row>
</div>
</a-card>
</
template
>
<
script
>
import
'@/assets/less/TableExpand.less'
import
{
getAction
}
from
'@/api/manage'
export
default
{
name
:
'PmMonitoringDeviceOverview'
,
components
:
{},
data
()
{
return
{
queryParam
:
{
deleted
:
false
},
description
:
'pm_monitoring_device管理页面'
,
url
:
{
list
:
"/pm/pmMonitoringDevice/list"
,
delete
:
"/pm/pmMonitoringDevice/delete"
,
deleteBatch
:
"/pm/pmMonitoringDevice/deleteBatch"
,
exportXlsUrl
:
"/pm/pmMonitoringDevice/exportXls"
,
importExcelUrl
:
"pm/pmMonitoringDevice/importExcel"
,
},
list
:
[],
dictOptions
:
{},
superFieldList
:
[],
buildingInfos
:
[],
targetFloorList
:
[],
types
:
[],
statusList
:
[
{
name
:
'正常'
,
value
:
'NORMAL'
,
imgPath
:
require
(
'@/assets/door-close.png'
)},
{
name
:
'离线'
,
value
:
'OFFLINE'
,
imgPath
:
require
(
'@/assets/door-offline.png'
)},
{
name
:
'损坏'
,
value
:
'BREAKDOWN'
,
imgPath
:
require
(
'@/assets/door-warning.png'
)}],
}
},
created
()
{
getAction
(
'/pm/pmBuildingInfo/list'
)
.
then
(
value
=>
this
.
buildingInfos
=
value
.
result
);
getAction
(
'/pm/pmAccessControlDevice/types'
)
.
then
(
value
=>
this
.
types
=
value
.
result
);
},
computed
:
{
importExcelUrl
:
function
()
{
return
`
${
window
.
_CONFIG
[
'domianURL'
]}
/
${
this
.
url
.
importExcelUrl
}
`
;
},
},
methods
:
{
initDictConfig
()
{
},
buildingChange
(
value
)
{
let
targetList
=
this
.
buildingInfos
.
filter
(
buildingInfo
=>
buildingInfo
.
name
===
value
);
if
(
targetList
!=
null
&&
targetList
.
length
>
0
)
{
this
.
targetFloorList
=
targetList
[
0
].
floorList
;
}
else
{
this
.
targetFloorList
=
[];
}
},
loadComplete
()
{
if
(
this
.
list
.
length
>
0
)
{
this
.
list
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
item
);
let
fixX
=
20
;
let
fixY
=
20
;
let
offsetWidth
=
this
.
$refs
.
floorImg
.
offsetWidth
;
let
offsetHeight
=
this
.
$refs
.
floorImg
.
offsetHeight
;
this
.
$refs
.
icon
[
index
].
style
.
position
=
'absolute'
;
this
.
$refs
.
icon
[
index
].
style
.
width
=
'40px'
;
this
.
$refs
.
icon
[
index
].
style
.
top
=
item
.
coordinate
.
y
*
offsetHeight
-
fixY
+
'px'
;
this
.
$refs
.
icon
[
index
].
style
.
left
=
item
.
coordinate
.
x
*
offsetWidth
-
fixX
+
'px'
;
});
}
},
searchQuery
()
{
getAction
(
this
.
url
.
list
,
this
.
queryParam
)
.
then
(
value
=>
{
this
.
list
=
value
.
result
.
records
;
this
.
$nextTick
(()
=>
{
this
.
loadComplete
();
})
});
},
searchReset
()
{
this
.
searchQuery
();
},
floorImgLoadComplete
()
{
this
.
searchQuery
();
}
}
}
</
script
>
<
style
scoped
>
@import
'~@assets/less/common.less'
;
</
style
>
\ No newline at end of file
ant-design-vue-jeecg/src/views/pm/monitoring-device/modules/PmMonitoringDeviceForm.vue
View file @
d4c8c650
...
@@ -4,102 +4,72 @@
...
@@ -4,102 +4,72 @@
<a-form-model
ref=
"form"
:model=
"model"
:rules=
"validatorRules"
slot=
"detail"
>
<a-form-model
ref=
"form"
:model=
"model"
:rules=
"validatorRules"
slot=
"detail"
>
<a-row>
<a-row>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"
设备编码"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"cod
e"
>
<a-form-model-item
label=
"
区域名称"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"districtNam
e"
>
<a-input
v-model=
"model.
code"
placeholder=
"请输入设备编码"
></a-input>
<a-input
v-model=
"model.
districtName"
placeholder=
"请输入区域名称"
></a-input>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"设备名称"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"name"
>
<a-form-model-item
label=
"设备名称"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"name"
>
<a-input
v-model=
"model.name"
placeholder=
"请输入设备名称"
></a-input>
<a-input
v-model=
"model.name"
placeholder=
"请输入设备名称"
></a-input>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"设备ip"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"ip"
>
<a-form-model-item
label=
"设备编码"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"code"
>
<a-input
v-model=
"model.ip"
placeholder=
"请输入设备ip"
></a-input>
<a-input
v-model=
"model.code"
placeholder=
"请输入设备编码"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"设备类型"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"ip"
>
<a-select
placeholder=
"选择设备类型"
v-model=
"model.type"
>
<a-select-option
v-for=
"type in types"
:key=
"type"
>
{{
type
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"
楼栋"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"buildingNam
e"
>
<a-form-model-item
label=
"
设备类型"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"typ
e"
>
<a-select
placeholder=
"
选择楼栋"
v-model=
"model.buildingName"
@
change=
"buildingChang
e"
>
<a-select
placeholder=
"
设备类型"
v-model=
"model.typ
e"
>
<a-select-option
v
-for=
"buildingInfo in buildingInfos"
:key=
"buildingInfo.name
"
>
<a-select-option
v
alue=
"1
"
>
{{
buildingInfo
.
name
}}
枪机
</a-select-option>
</a-select-option>
</a-select>
<a-select-option
value=
"2"
>
</a-form-model-item>
球形
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"楼层"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"floor"
>
<a-select
placeholder=
"选择楼层"
v-model=
"model.floor"
>
<a-select-option
v-for=
"floor in targetFloorList"
:key=
"floor"
>
{{
floor
}}
</a-select-option>
</a-select-option>
</a-select>
</a-select>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"开门时间"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"doorOpenTime"
>
<a-form-model-item
label=
"设备ip"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"ip"
>
<a-input-number
:min=
"0"
:formatter=
"value => `$
{value}s`"
<a-input
v-model=
"model.ip"
placeholder=
"请输入设备ip"
></a-input>
:parser="value => value.replace('s', '')" v-model="model.doorOpenTime"
placeholder="请输入开门时间" style="width: 100%" suffix="RMB"/>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"设备位置"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"place"
>
<a-input
v-model=
"model.place"
placeholder=
"请输入设备位置"
></a-input>
</a-form-model-item>
</a-col>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"出产日期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"dateOfProduction"
>
<j-date
placeholder=
"请选择生产日期"
v-model=
"model.dateOfProduction"
style=
"width: 100%"
/>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"
安装日期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"installationDate
"
>
<a-form-model-item
label=
"
所属设备"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"theirEquipment
"
>
<
j-date
placeholder=
"请选择安装日期"
v-model=
"model.installationDate"
style=
"width: 100%"
/
>
<
a-input
v-model=
"model.theirEquipment"
placeholder=
"请输入所属设备"
></a-input
>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"生产厂商"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"manufacturer"
>
<a-form-model-item
label=
"设备状态"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"status"
>
<a-input
v-model=
"model.manufacturer"
placeholder=
"请输入生产厂商"
></a-input>
<a-select
placeholder=
"设备状态"
v-model=
"model.status"
>
<a-select-option
value=
"1"
>
正常
</a-select-option>
<a-select-option
value=
"2"
>
离线
</a-select-option>
<a-select-option
value=
"3"
>
维修
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"
保修截止日期"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"warrantyPeriod
"
>
<a-form-model-item
label=
"
端口"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"port
"
>
<
j-date
placeholder=
"请选择保修截止日期"
v-model=
"model.warrantyPeriod"
style=
"width: 100%"
/
>
<
a-input
v-model=
"model.port"
placeholder=
"请输入端口"
></a-input
>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"状态"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"status"
>
<a-form-model-item
label=
"通道号"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"chanelNum"
>
<a-select
placeholder=
"选择状态"
v-model=
"model.status"
@
change=
"statusChange"
>
<a-input
v-model=
"model.chanelNum"
placeholder=
"请输入通道号"
></a-input>
<a-select-option
v-for=
"status in statusList"
:key=
"status.value"
>
{{
status
.
name
}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-model-item
label=
"xy值"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"coordinate
Tmp
"
>
<a-form-model-item
label=
"xy值"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
prop=
"coordinate"
>
<a-input
v-model=
"model.coordinate
Tmp"
disabled
></a-input>
<a-input
v-model=
"model.coordinate
"
placeholder=
"请输入xy值"
disabled
></a-input>
</a-form-model-item>
</a-form-model-item>
</a-col>
</a-col>
<a-col
:span=
"24"
>
<div
style=
"position: relative"
>
<img
src=
"@/assets/floor.png"
alt=
"floor"
width=
"100%"
height=
"100%"
@
click=
"imgClick($event)"
ref=
"imgBg"
@
load=
"floorImgLoadComplete($event)"
/>
<img
:src=
"doorIconPath"
alt=
"door"
:style=
"doorIconStyle"
v-show=
"doorIconPath"
/>
</div>
</a-col>
</a-row>
</a-row>
</a-form-model>
</a-form-model>
</j-form-container>
</j-form-container>
...
@@ -108,12 +78,13 @@
...
@@ -108,12 +78,13 @@
<
script
>
<
script
>
import
{
httpAction
,
getAction
}
from
'@/api/manage'
import
{
httpAction
,
getAction
}
from
'@/api/manage'
import
{
validateDuplicateValue
}
from
'@/utils/util'
import
{
validateDuplicateValue
}
from
'@/utils/util'
export
default
{
export
default
{
name
:
'PmAccessControlDeviceForm'
,
name
:
'PmMonitoringDeviceForm'
,
components
:
{},
components
:
{
},
props
:
{
props
:
{
//表单禁用
//表单禁用
disabled
:
{
disabled
:
{
...
@@ -122,164 +93,46 @@ export default {
...
@@ -122,164 +93,46 @@ export default {
required
:
false
required
:
false
}
}
},
},
data
()
{
data
()
{
return
{
return
{
model
:
{
model
:{
doorOpenTime
:
0
,
coordinateTmp
:
null
,
},
},
labelCol
:
{
labelCol
:
{
xs
:
{
span
:
24
},
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
sm
:
{
span
:
5
},
},
},
wrapperCol
:
{
wrapperCol
:
{
xs
:
{
span
:
24
},
xs
:
{
span
:
24
},
sm
:
{
span
:
16
},
sm
:
{
span
:
16
},
},
},
confirmLoading
:
false
,
confirmLoading
:
false
,
validatorRules
:
{
validatorRules
:
{
code
:
[
{
required
:
true
,
message
:
'请输入设备编码'
,
trigger
:
'blur'
}
],
name
:
[
{
required
:
true
,
message
:
'请输入设备名称'
,
trigger
:
'blur'
}
],
ip
:
[
{
required
:
true
,
message
:
'请输入设备ip'
,
trigger
:
'blur'
}
],
type
:
[
{
required
:
true
,
message
:
'选择设备类型'
,
trigger
:
'change'
}
],
buildingName
:
[
{
required
:
true
,
message
:
'选择楼栋'
,
trigger
:
'change'
}
],
floor
:
[
{
required
:
true
,
message
:
'选择楼层'
,
trigger
:
'change'
}
],
doorOpenTime
:
[
{
required
:
true
,
message
:
'请输入开门时间'
,
trigger
:
'blur'
}
],
place
:
[
{
required
:
true
,
message
:
'请输入设备位置'
,
trigger
:
'blur'
}
],
dateOfProduction
:
[
{
required
:
true
,
message
:
'请选择生产日期'
,
trigger
:
'change'
}
],
installationDate
:
[
{
required
:
true
,
message
:
'请选择安装日期'
,
trigger
:
'change'
}
],
manufacturer
:
[
{
required
:
true
,
message
:
'请输入生产厂商'
,
trigger
:
'blur'
}
],
warrantyPeriod
:
[
{
required
:
true
,
message
:
'请选择保修截止日期'
,
trigger
:
'change'
}
],
status
:
[
{
required
:
true
,
message
:
'选择状态'
,
trigger
:
'change'
}
],
coordinateTmp
:
[
{
required
:
true
,
message
:
'请点击平面图设置设备坐标'
,
trigger
:
[
'change'
,
'blur'
]
}
],
},
},
url
:
{
url
:
{
add
:
"/pm/pmAccessControlDevice/add"
,
add
:
"/pm/pmMonitoringDevice/add"
,
edit
:
"/pm/pmAccessControlDevice/edit"
,
edit
:
"/pm/pmMonitoringDevice/edit"
,
queryById
:
"/pm/pmAccessControlDevice/queryById"
queryById
:
"/pm/pmMonitoringDevice/queryById"
},
statusList
:
[
{
name
:
'正常'
,
value
:
'NORMAL'
,
imgPath
:
require
(
'@/assets/door-close.png'
)},
{
name
:
'离线'
,
value
:
'OFFLINE'
,
imgPath
:
require
(
'@/assets/door-offline.png'
)},
{
name
:
'损坏'
,
value
:
'BREAKDOWN'
,
imgPath
:
require
(
'@/assets/door-warning.png'
)}],
doorIconStyle
:
{
position
:
'absolute'
,
top
:
'0px'
,
left
:
'0px'
,
width
:
'40px'
},
},
doorIconPath
:
null
,
buildingInfos
:
[],
targetFloorList
:
[],
types
:
[],
}
}
},
},
computed
:
{
computed
:
{
formDisabled
()
{
formDisabled
()
{
return
this
.
disabled
return
this
.
disabled
},
},
},
},
created
()
{
created
()
{
//备份model原始值
//备份model原始值
this
.
modelDefault
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
model
));
this
.
modelDefault
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
model
));
getAction
(
'/pm/pmBuildingInfo/list'
)
.
then
(
value
=>
this
.
buildingInfos
=
value
.
result
);
getAction
(
'/pm/pmAccessControlDevice/types'
)
.
then
(
value
=>
this
.
types
=
value
.
result
);
},
},
methods
:
{
methods
:
{
add
()
{
add
()
{
this
.
edit
(
this
.
modelDefault
);
this
.
edit
(
this
.
modelDefault
);
},
},
edit
(
record
)
{
edit
(
record
)
{
this
.
model
=
Object
.
assign
({},
record
);
this
.
model
=
Object
.
assign
({},
record
);
this
.
visible
=
true
;
this
.
visible
=
true
;
},
},
submitForm
()
{
submitForm
()
{
const
that
=
this
;
const
that
=
this
;
// 触发表单验证
// 触发表单验证
this
.
$refs
.
form
.
validate
(
valid
=>
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
...
@@ -287,86 +140,27 @@ export default {
...
@@ -287,86 +140,27 @@ export default {
that
.
confirmLoading
=
true
;
that
.
confirmLoading
=
true
;
let
httpurl
=
''
;
let
httpurl
=
''
;
let
method
=
''
;
let
method
=
''
;
if
(
!
this
.
model
.
id
)
{
if
(
!
this
.
model
.
id
){
// 设置创建用户Id
httpurl
+=
this
.
url
.
add
;
this
.
model
.
createUserId
=
this
.
$store
.
getters
.
userInfo
.
id
;
httpurl
+=
this
.
url
.
add
;
method
=
'post'
;
method
=
'post'
;
}
else
{
}
else
{
httpurl
+=
this
.
url
.
edit
;
httpurl
+=
this
.
url
.
edit
;
method
=
'put'
;
method
=
'put'
;
}
}
httpAction
(
httpurl
,
this
.
model
,
method
).
then
((
res
)
=>
{
// 初始化坐标对象并赋值
if
(
res
.
success
){
let
coordinate
=
this
.
model
.
coordinateTmp
.
split
(
','
);
this
.
model
.
coordinate
=
{
x
:
coordinate
[
0
],
y
:
coordinate
[
1
]
}
// 设置修改用户Id
this
.
model
.
modifyUserId
=
this
.
$store
.
getters
.
userInfo
.
id
;
httpAction
(
httpurl
,
this
.
model
,
method
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
that
.
$message
.
success
(
res
.
message
);
that
.
$message
.
success
(
res
.
message
);
that
.
$emit
(
'ok'
);
that
.
$emit
(
'ok'
);
}
else
{
}
else
{
that
.
$message
.
warning
(
res
.
message
);
that
.
$message
.
warning
(
res
.
message
);
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
that
.
confirmLoading
=
false
;
that
.
confirmLoading
=
false
;
})
})
}
}
})
})
},
},
imgClick
(
e
)
{
// 获取点击目标的x,y坐标
// let target = e.target;
var
event
=
e
||
window
.
event
;
var
target
=
event
.
target
||
event
.
srcElement
;
console
.
log
(
target
.
pageX
);
let
fixX
=
this
.
$refs
.
imgBg
.
getBoundingClientRect
().
left
;
let
fixY
=
this
.
$refs
.
imgBg
.
getBoundingClientRect
().
top
;
// let fixX = target.x;
// let fixY = target.y;
console
.
log
(
fixX
,
fixY
);
// console.log(e.x, e.y);
let
offsetWidth
=
target
.
offsetWidth
;
let
offsetHeight
=
target
.
offsetHeight
;
let
offsetX
=
(
event
.
x
-
fixX
);
let
offsetY
=
(
event
.
y
-
fixY
);
this
.
doorIconStyle
.
top
=
offsetY
-
20
+
'px'
;
this
.
doorIconStyle
.
left
=
offsetX
-
20
+
'px'
;
let
x
=
((
event
.
x
-
fixX
)
/
offsetWidth
).
toFixed
(
4
);
let
y
=
((
event
.
y
-
fixY
)
/
offsetHeight
).
toFixed
(
4
);
this
.
model
.
coordinateTmp
=
x
+
","
+
y
;
this
.
$refs
.
form
.
validateField
(
'coordinateTmp'
);
},
statusChange
(
value
)
{
let
targetList
=
this
.
statusList
.
filter
(
status
=>
status
.
value
===
value
);
this
.
doorIconPath
=
targetList
.
length
>
0
?
targetList
[
0
].
imgPath
:
null
;
},
buildingChange
(
value
)
{
let
targetList
=
this
.
buildingInfos
.
filter
(
buildingInfo
=>
buildingInfo
.
name
===
value
);
if
(
targetList
!=
null
&&
targetList
.
length
>
0
)
{
this
.
targetFloorList
=
targetList
[
0
].
floorList
;
}
else
{
this
.
targetFloorList
=
[];
}
}
},
floorImgLoadComplete
(
e
)
{
if
(
this
.
model
.
coordinate
)
{
this
.
model
.
coordinateTmp
=
this
.
model
.
coordinate
.
x
+
','
+
this
.
model
.
coordinate
.
y
;
this
.
statusChange
(
this
.
model
.
status
);
let
target
=
e
.
target
;
let
fixX
=
20
;
let
fixY
=
20
;
let
offsetWidth
=
target
.
offsetWidth
;
let
offsetHeight
=
target
.
offsetHeight
;
this
.
doorIconStyle
.
top
=
this
.
model
.
coordinate
.
y
*
offsetHeight
-
fixY
+
'px'
this
.
doorIconStyle
.
left
=
this
.
model
.
coordinate
.
x
*
offsetWidth
-
fixX
+
'px'
;
}
},
}
}
}
</
script
>
</
script
>
\ No newline at end of file
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/controller/PmAccessControlDeviceController.java
View file @
d4c8c650
...
@@ -141,7 +141,7 @@ public class PmAccessControlDeviceController extends JeecgController<PmAccessCon
...
@@ -141,7 +141,7 @@ public class PmAccessControlDeviceController extends JeecgController<PmAccessCon
*/
*/
@RequestMapping
(
value
=
"/exportXls"
)
@RequestMapping
(
value
=
"/exportXls"
)
public
ModelAndView
exportXls
(
HttpServletRequest
request
,
PmAccessControlDevice
pmAccessControlDevice
)
{
public
ModelAndView
exportXls
(
HttpServletRequest
request
,
PmAccessControlDevice
pmAccessControlDevice
)
{
return
super
.
exportXls
(
request
,
pmAccessControlDevice
,
PmAccessControlDevice
.
class
,
"
pm_access_control_device
"
);
return
super
.
exportXls
(
request
,
pmAccessControlDevice
,
PmAccessControlDevice
.
class
,
"
门禁设备
"
);
}
}
/**
/**
...
...
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/controller/PmAccessControlDeviceRecordController.java
View file @
d4c8c650
package
org
.
jeecg
.
pm
.
controller
;
package
org
.
jeecg
.
pm
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -10,9 +8,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -10,9 +8,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.shiro.SecurityUtils
;
import
org.apache.shiro.SecurityUtils
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.common.constant.CommonConstant
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.common.system.vo.LoginUser
;
import
org.jeecg.common.system.vo.LoginUser
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.jeecg.pm.entity.PmAccessControlDeviceRecord
;
import
org.jeecg.pm.entity.PmAccessControlDeviceRecord
;
...
...
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/controller/PmMonitoringDeviceController.java
View file @
d4c8c650
package
org
.
jeecg
.
pm
.
controller
;
package
org
.
jeecg
.
pm
.
controller
;
import
java.util.Arrays
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.pm.entity.PmMonitoringDevice
;
import
org.jeecg.pm.entity.PmMonitoringDevice
;
import
org.jeecg.pm.service.IPmMonitoringDeviceService
;
import
org.jeecg.pm.service.IPmMonitoringDeviceService
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
javax.servlet.http.HttpServletRequest
;
/**
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* @Description: pm_monitoring_device
* @Description: pm_monitoring_device
* @Author: jeecg-boot
* @Author: jeecg-boot
* @Date:
2022-03-1
5
* @Date:
2022-05-2
5
* @Version: V1.0
* @Version: V1.0
*/
*/
@Api
(
tags
=
"pm_monitoring_device"
)
@Api
(
tags
=
"pm_monitoring_device"
)
@RestController
@RestController
@RequestMapping
(
"/pm/pmMonitoringDevice"
)
@RequestMapping
(
"/pm/pmMonitoringDevice"
)
@Slf4j
@Slf4j
...
@@ -45,11 +45,11 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
...
@@ -45,11 +45,11 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
* @return
* @return
*/
*/
//@AutoLog(value = "pm_monitoring_device-分页列表查询")
//@AutoLog(value = "pm_monitoring_device-分页列表查询")
@ApiOperation
(
value
=
"pm_monitoring_device-分页列表查询"
,
notes
=
"pm_monitoring_device-分页列表查询"
)
@ApiOperation
(
value
=
"pm_monitoring_device-分页列表查询"
,
notes
=
"pm_monitoring_device-分页列表查询"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
PmMonitoringDevice
>>
queryPageList
(
PmMonitoringDevice
pmMonitoringDevice
,
public
Result
<
IPage
<
PmMonitoringDevice
>>
queryPageList
(
PmMonitoringDevice
pmMonitoringDevice
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
HttpServletRequest
req
)
{
QueryWrapper
<
PmMonitoringDevice
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
pmMonitoringDevice
,
req
.
getParameterMap
());
QueryWrapper
<
PmMonitoringDevice
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
pmMonitoringDevice
,
req
.
getParameterMap
());
Page
<
PmMonitoringDevice
>
page
=
new
Page
<
PmMonitoringDevice
>(
pageNo
,
pageSize
);
Page
<
PmMonitoringDevice
>
page
=
new
Page
<
PmMonitoringDevice
>(
pageNo
,
pageSize
);
...
@@ -57,11 +57,6 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
...
@@ -57,11 +57,6 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
return
Result
.
OK
(
pageList
);
return
Result
.
OK
(
pageList
);
}
}
@GetMapping
(
"/listByFloorId"
)
public
Result
<
List
<
PmMonitoringDevice
>>
listByFloorId
(
Long
floorId
)
{
return
null
;
}
/**
/**
* 添加
* 添加
*
*
...
@@ -69,7 +64,7 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
...
@@ -69,7 +64,7 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
* @return
* @return
*/
*/
@AutoLog
(
value
=
"pm_monitoring_device-添加"
)
@AutoLog
(
value
=
"pm_monitoring_device-添加"
)
@ApiOperation
(
value
=
"pm_monitoring_device-添加"
,
notes
=
"pm_monitoring_device-添加"
)
@ApiOperation
(
value
=
"pm_monitoring_device-添加"
,
notes
=
"pm_monitoring_device-添加"
)
@PostMapping
(
value
=
"/add"
)
@PostMapping
(
value
=
"/add"
)
public
Result
<
String
>
add
(
@RequestBody
PmMonitoringDevice
pmMonitoringDevice
)
{
public
Result
<
String
>
add
(
@RequestBody
PmMonitoringDevice
pmMonitoringDevice
)
{
pmMonitoringDeviceService
.
save
(
pmMonitoringDevice
);
pmMonitoringDeviceService
.
save
(
pmMonitoringDevice
);
...
@@ -83,8 +78,8 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
...
@@ -83,8 +78,8 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
* @return
* @return
*/
*/
@AutoLog
(
value
=
"pm_monitoring_device-编辑"
)
@AutoLog
(
value
=
"pm_monitoring_device-编辑"
)
@ApiOperation
(
value
=
"pm_monitoring_device-编辑"
,
notes
=
"pm_monitoring_device-编辑"
)
@ApiOperation
(
value
=
"pm_monitoring_device-编辑"
,
notes
=
"pm_monitoring_device-编辑"
)
@RequestMapping
(
value
=
"/edit"
,
method
=
{
RequestMethod
.
PUT
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/edit"
,
method
=
{
RequestMethod
.
PUT
,
RequestMethod
.
POST
})
public
Result
<
String
>
edit
(
@RequestBody
PmMonitoringDevice
pmMonitoringDevice
)
{
public
Result
<
String
>
edit
(
@RequestBody
PmMonitoringDevice
pmMonitoringDevice
)
{
pmMonitoringDeviceService
.
updateById
(
pmMonitoringDevice
);
pmMonitoringDeviceService
.
updateById
(
pmMonitoringDevice
);
return
Result
.
OK
(
"编辑成功!"
);
return
Result
.
OK
(
"编辑成功!"
);
...
@@ -97,9 +92,9 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
...
@@ -97,9 +92,9 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
* @return
* @return
*/
*/
@AutoLog
(
value
=
"pm_monitoring_device-通过id删除"
)
@AutoLog
(
value
=
"pm_monitoring_device-通过id删除"
)
@ApiOperation
(
value
=
"pm_monitoring_device-通过id删除"
,
notes
=
"pm_monitoring_device-通过id删除"
)
@ApiOperation
(
value
=
"pm_monitoring_device-通过id删除"
,
notes
=
"pm_monitoring_device-通过id删除"
)
@DeleteMapping
(
value
=
"/delete"
)
@DeleteMapping
(
value
=
"/delete"
)
public
Result
<
String
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
public
Result
<
String
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
pmMonitoringDeviceService
.
removeById
(
id
);
pmMonitoringDeviceService
.
removeById
(
id
);
return
Result
.
OK
(
"删除成功!"
);
return
Result
.
OK
(
"删除成功!"
);
}
}
...
@@ -111,9 +106,9 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
...
@@ -111,9 +106,9 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
* @return
* @return
*/
*/
@AutoLog
(
value
=
"pm_monitoring_device-批量删除"
)
@AutoLog
(
value
=
"pm_monitoring_device-批量删除"
)
@ApiOperation
(
value
=
"pm_monitoring_device-批量删除"
,
notes
=
"pm_monitoring_device-批量删除"
)
@ApiOperation
(
value
=
"pm_monitoring_device-批量删除"
,
notes
=
"pm_monitoring_device-批量删除"
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
public
Result
<
String
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
public
Result
<
String
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
this
.
pmMonitoringDeviceService
.
removeByIds
(
Arrays
.
asList
(
ids
.
split
(
","
)));
this
.
pmMonitoringDeviceService
.
removeByIds
(
Arrays
.
asList
(
ids
.
split
(
","
)));
return
Result
.
OK
(
"批量删除成功!"
);
return
Result
.
OK
(
"批量删除成功!"
);
}
}
...
@@ -125,12 +120,12 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
...
@@ -125,12 +120,12 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
* @return
* @return
*/
*/
//@AutoLog(value = "pm_monitoring_device-通过id查询")
//@AutoLog(value = "pm_monitoring_device-通过id查询")
@ApiOperation
(
value
=
"pm_monitoring_device-通过id查询"
,
notes
=
"pm_monitoring_device-通过id查询"
)
@ApiOperation
(
value
=
"pm_monitoring_device-通过id查询"
,
notes
=
"pm_monitoring_device-通过id查询"
)
@GetMapping
(
value
=
"/queryById"
)
@GetMapping
(
value
=
"/queryById"
)
public
Result
<
PmMonitoringDevice
>
queryById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
public
Result
<
PmMonitoringDevice
>
queryById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
PmMonitoringDevice
pmMonitoringDevice
=
pmMonitoringDeviceService
.
getById
(
id
);
PmMonitoringDevice
pmMonitoringDevice
=
pmMonitoringDeviceService
.
getById
(
id
);
if
(
pmMonitoringDevice
==
null
)
{
if
(
pmMonitoringDevice
==
null
)
{
return
Result
.
error
(
"未找到对应数据"
,
null
);
return
Result
.
error
(
"未找到对应数据"
,
null
);
}
}
return
Result
.
OK
(
pmMonitoringDevice
);
return
Result
.
OK
(
pmMonitoringDevice
);
}
}
...
@@ -143,7 +138,7 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
...
@@ -143,7 +138,7 @@ public class PmMonitoringDeviceController extends JeecgController<PmMonitoringDe
*/
*/
@RequestMapping
(
value
=
"/exportXls"
)
@RequestMapping
(
value
=
"/exportXls"
)
public
ModelAndView
exportXls
(
HttpServletRequest
request
,
PmMonitoringDevice
pmMonitoringDevice
)
{
public
ModelAndView
exportXls
(
HttpServletRequest
request
,
PmMonitoringDevice
pmMonitoringDevice
)
{
return
super
.
exportXls
(
request
,
pmMonitoringDevice
,
PmMonitoringDevice
.
class
,
"
pm_monitoring_device
"
);
return
super
.
exportXls
(
request
,
pmMonitoringDevice
,
PmMonitoringDevice
.
class
,
"
视频安防
"
);
}
}
/**
/**
...
...
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/entity/AlarmQuery.java
View file @
d4c8c650
...
@@ -72,7 +72,6 @@ public class AlarmQuery implements Serializable {
...
@@ -72,7 +72,6 @@ public class AlarmQuery implements Serializable {
@ApiModelProperty
(
value
=
"修改时间"
)
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
modifyTime
;
private
Date
modifyTime
;
/**删除状态*/
/**删除状态*/
@Excel
(
name
=
"删除状态"
,
width
=
15
)
@ApiModelProperty
(
value
=
"删除状态"
)
@ApiModelProperty
(
value
=
"删除状态"
)
private
Boolean
deleted
;
private
Boolean
deleted
;
}
}
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/entity/PmAccessControlDeviceRecord.java
View file @
d4c8c650
...
@@ -39,7 +39,6 @@ public class PmAccessControlDeviceRecord implements Serializable {
...
@@ -39,7 +39,6 @@ public class PmAccessControlDeviceRecord implements Serializable {
/**
/**
* 门禁设备Id
* 门禁设备Id
*/
*/
@Excel
(
name
=
"门禁设备Id"
,
width
=
15
)
@ApiModelProperty
(
value
=
"门禁设备Id"
)
@ApiModelProperty
(
value
=
"门禁设备Id"
)
private
Long
pmAccessControlDeviceId
;
private
Long
pmAccessControlDeviceId
;
...
@@ -59,7 +58,7 @@ public class PmAccessControlDeviceRecord implements Serializable {
...
@@ -59,7 +58,7 @@ public class PmAccessControlDeviceRecord implements Serializable {
/**
/**
* 状态
* 状态
*/
*/
@Excel
(
name
=
"
状态
"
,
width
=
15
,
dicCode
=
"access_control_classify"
)
@Excel
(
name
=
"
员工归类
"
,
width
=
15
,
dicCode
=
"access_control_classify"
)
@Dict
(
dicCode
=
"access_control_classify"
)
@Dict
(
dicCode
=
"access_control_classify"
)
@ApiModelProperty
(
value
=
"员工归类 1:员工 2:访客 3:租户"
)
@ApiModelProperty
(
value
=
"员工归类 1:员工 2:访客 3:租户"
)
private
Integer
classify
;
private
Integer
classify
;
...
...
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/entity/PmMonitoringDevice.java
View file @
d4c8c650
package
org
.
jeecg
.
pm
.
entity
;
package
org
.
jeecg
.
pm
.
entity
;
import
java.io.Serializable
;
import
java.io.UnsupportedEncodingException
;
import
java.util.Date
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
import
org.jeecg.common.aspect.annotation.Dict
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
org.jeecg.common.aspect.annotation.Dict
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
* @Description: pm_monitoring_device
* @Description: pm_monitoring_device
* @Author: jeecg-boot
* @Author: jeecg-boot
* @Date:
2022-03-1
5
* @Date:
2022-05-2
5
* @Version: V1.0
* @Version: V1.0
*/
*/
@Data
@Data
@TableName
(
value
=
"pm_monitoring_device"
,
autoResultMap
=
true
)
@TableName
(
"pm_monitoring_device"
)
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"pm_monitoring_device对象"
,
description
=
"pm_monitoring_device"
)
@ApiModel
(
value
=
"pm_monitoring_device对象"
,
description
=
"pm_monitoring_device"
)
public
class
PmMonitoringDevice
implements
Serializable
{
public
class
PmMonitoringDevice
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**id*/
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ApiModelProperty
(
value
=
"id"
)
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
private
Long
id
;
/**
/**区域名称*/
* 设备编码
@Excel
(
name
=
"区域名称"
,
width
=
15
)
*/
@ApiModelProperty
(
value
=
"区域名称"
)
private
String
districtName
;
/**设备名称*/
@Excel
(
name
=
"设备名称"
,
width
=
15
)
@ApiModelProperty
(
value
=
"设备名称"
)
private
String
name
;
/**设备编码*/
@Excel
(
name
=
"设备编码"
,
width
=
15
)
@Excel
(
name
=
"设备编码"
,
width
=
15
)
@ApiModelProperty
(
value
=
"设备编码"
)
@ApiModelProperty
(
value
=
"设备编码"
)
private
String
code
;
private
String
code
;
/**
/**设备类型*/
* 设备类型
@Excel
(
name
=
"设备类型"
,
width
=
15
,
dicCode
=
"monitoring_type"
)
*/
@Excel
(
name
=
"设备类型"
,
width
=
15
)
@ApiModelProperty
(
value
=
"设备类型"
)
@ApiModelProperty
(
value
=
"设备类型"
)
@Dict
(
dicCode
=
"monitoring_type"
)
private
String
type
;
private
String
type
;
/**
/**设备ip*/
* 设备名称
*/
@Excel
(
name
=
"设备名称"
,
width
=
15
)
@ApiModelProperty
(
value
=
"设备名称"
)
private
String
name
;
/**
* 设备ip
*/
@Excel
(
name
=
"设备ip"
,
width
=
15
)
@Excel
(
name
=
"设备ip"
,
width
=
15
)
@ApiModelProperty
(
value
=
"设备ip"
)
@ApiModelProperty
(
value
=
"设备ip"
)
private
String
ip
;
private
String
ip
;
/**
/**所属设备*/
* 楼栋
@Excel
(
name
=
"所属设备"
,
width
=
15
)
*/
@ApiModelProperty
(
value
=
"所属设备"
)
@Excel
(
name
=
"楼栋"
,
width
=
15
)
private
String
theirEquipment
;
@ApiModelProperty
(
value
=
"楼栋"
)
/**xy值*/
private
String
buildingName
;
/**
* 楼层
*/
@Excel
(
name
=
"楼层"
,
width
=
15
)
@ApiModelProperty
(
value
=
"楼层"
)
private
String
floor
;
/**
* 设备位置
*/
@Excel
(
name
=
"设备位置"
,
width
=
15
)
@ApiModelProperty
(
value
=
"设备位置"
)
private
String
place
;
/**
* xy值
*/
@Excel
(
name
=
"xy值"
,
width
=
15
)
@Excel
(
name
=
"xy值"
,
width
=
15
)
@ApiModelProperty
(
value
=
"xy值"
)
@ApiModelProperty
(
value
=
"xy值"
)
@TableField
(
typeHandler
=
Coordinate
.
TypeHandler
.
class
)
private
String
coordinate
;
private
Coordinate
coordinate
;
/**状态 1:正常 2:离线 3:维修*/
/**
@Excel
(
name
=
"状态"
,
width
=
15
,
dicCode
=
"access_control_status"
)
* 生产日期
@ApiModelProperty
(
value
=
"状态 1:正常 2:离线 3:维修"
)
*/
@Dict
(
dicCode
=
"access_control_status"
)
@Excel
(
name
=
"生产日期"
,
width
=
15
,
format
=
"yyyy-MM-dd"
)
private
String
status
;
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
/**端口*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"端口"
,
width
=
15
)
@ApiModelProperty
(
value
=
"生产日期"
)
@ApiModelProperty
(
value
=
"端口"
)
private
Date
dateOfProduction
;
private
String
port
;
/**
/**通道号*/
* 安装日期
@Excel
(
name
=
"通道号"
,
width
=
15
)
*/
@ApiModelProperty
(
value
=
"通道号"
)
@Excel
(
name
=
"安装日期"
,
width
=
15
,
format
=
"yyyy-MM-dd"
)
private
String
chanelNum
;
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
/**创建人Id(sys_user)*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"创建人"
,
width
=
15
,
dictTable
=
"sys_user"
,
dicText
=
"realname"
,
dicCode
=
"id"
)
@ApiModelProperty
(
value
=
"安装日期"
)
private
Date
installationDate
;
/**
* 保修截止日期
*/
@Excel
(
name
=
"保修截止日期"
,
width
=
15
,
format
=
"yyyy-MM-dd"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
value
=
"保修截止日期"
)
private
Date
warrantyPeriod
;
/**
* 生产厂商
*/
@Excel
(
name
=
"生产厂商"
,
width
=
15
)
@ApiModelProperty
(
value
=
"生产厂商"
)
private
String
manufacturer
;
/**
* 状态
*/
@Excel
(
name
=
"状态"
,
width
=
15
)
@ApiModelProperty
(
value
=
"状态"
)
private
Status
status
;
/**
* 创建人Id(sys_user)
*/
@Excel
(
name
=
"创建人Id(sys_user)"
,
width
=
15
)
@ApiModelProperty
(
value
=
"创建人Id(sys_user)"
)
@ApiModelProperty
(
value
=
"创建人Id(sys_user)"
)
@Dict
(
dictTable
=
"sys_user"
,
dicText
=
"realname"
,
dicCode
=
"id"
)
@Dict
(
dictTable
=
"sys_user"
,
dicText
=
"realname"
,
dicCode
=
"id"
)
private
String
createUserId
;
private
String
createUserId
;
/**
/**修改人Id(sys_user)*/
* 修改人Id(sys_user)
*/
@Excel
(
name
=
"修改人Id(sys_user)"
,
width
=
15
)
@ApiModelProperty
(
value
=
"修改人Id(sys_user)"
)
@ApiModelProperty
(
value
=
"修改人Id(sys_user)"
)
@Dict
(
dictTable
=
"sys_user"
,
dicText
=
"realname"
,
dicCode
=
"id"
)
private
String
modifyUserId
;
private
String
modifyUserId
;
/**
/**创建时间*/
* 删除状态
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"删除状态"
,
width
=
15
)
@ApiModelProperty
(
value
=
"删除状态"
)
private
Boolean
deleted
;
/**
* 创建时间
*/
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd hh:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
private
Date
createTime
;
/**
/**修改时间*/
* 修改时间
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"修改时间"
,
width
=
15
,
format
=
"yyyy-MM-dd hh:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd hh:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
value
=
"修改时间"
)
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
modifyTime
;
private
Date
modifyTime
;
/**删除状态*/
public
enum
Status
{
@ApiModelProperty
(
value
=
"删除状态"
)
NORMAL
,
private
Boolean
deleted
;
OFFLINE
,
BREAKDOWN
}
}
}
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/mapper/PmMonitoringDeviceMapper.java
View file @
d4c8c650
...
@@ -6,7 +6,7 @@ import org.jeecg.pm.entity.PmMonitoringDevice;
...
@@ -6,7 +6,7 @@ import org.jeecg.pm.entity.PmMonitoringDevice;
/**
/**
* @Description: pm_monitoring_device
* @Description: pm_monitoring_device
* @Author: jeecg-boot
* @Author: jeecg-boot
* @Date:
2022-03-1
5
* @Date:
2022-05-2
5
* @Version: V1.0
* @Version: V1.0
*/
*/
public
interface
PmMonitoringDeviceMapper
extends
BaseMapper
<
PmMonitoringDevice
>
{
public
interface
PmMonitoringDeviceMapper
extends
BaseMapper
<
PmMonitoringDevice
>
{
...
...
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/service/IPmMonitoringDeviceService.java
View file @
d4c8c650
...
@@ -3,14 +3,12 @@ package org.jeecg.pm.service;
...
@@ -3,14 +3,12 @@ package org.jeecg.pm.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.pm.entity.PmMonitoringDevice
;
import
org.jeecg.pm.entity.PmMonitoringDevice
;
import
java.util.List
;
/**
/**
* @Description: pm_monitoring_device
* @Description: pm_monitoring_device
* @Author: jeecg-boot
* @Author: jeecg-boot
* @Date:
2022-03-1
5
* @Date:
2022-05-2
5
* @Version: V1.0
* @Version: V1.0
*/
*/
public
interface
IPmMonitoringDeviceService
extends
IService
<
PmMonitoringDevice
>
{
public
interface
IPmMonitoringDeviceService
extends
IService
<
PmMonitoringDevice
>
{
List
<
PmMonitoringDevice
>
listByFloorId
(
Long
floorId
);
}
}
jeecg-boot-parent/jeecg-boot-module-property/src/main/java/org/jeecg/pm/service/impl/PmMonitoringDeviceServiceImpl.java
View file @
d4c8c650
package
org
.
jeecg
.
pm
.
service
.
impl
;
package
org
.
jeecg
.
pm
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.pm.entity.PmMonitoringDevice
;
import
org.jeecg.pm.entity.PmMonitoringDevice
;
import
org.jeecg.pm.hikvision.sdk.client.HikvisionClient
;
import
org.jeecg.pm.mapper.PmMonitoringDeviceMapper
;
import
org.jeecg.pm.mapper.PmMonitoringDeviceMapper
;
import
org.jeecg.pm.service.IPmMonitoringDeviceService
;
import
org.jeecg.pm.service.IPmMonitoringDeviceService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @Description: pm_monitoring_device
* @Description: pm_monitoring_device
* @Author: jeecg-boot
* @Author: jeecg-boot
* @Date:
2022-03-1
5
* @Date:
2022-05-2
5
* @Version: V1.0
* @Version: V1.0
*/
*/
@Service
@Service
public
class
PmMonitoringDeviceServiceImpl
extends
ServiceImpl
<
PmMonitoringDeviceMapper
,
PmMonitoringDevice
>
implements
IPmMonitoringDeviceService
{
public
class
PmMonitoringDeviceServiceImpl
extends
ServiceImpl
<
PmMonitoringDeviceMapper
,
PmMonitoringDevice
>
implements
IPmMonitoringDeviceService
{
@Autowired
private
HikvisionClient
hikvisionClient
;
@Override
public
boolean
save
(
PmMonitoringDevice
entity
)
{
entity
.
setId
(
IdWorker
.
getId
())
.
setDeleted
(
false
)
.
setCreateTime
(
new
Date
())
.
setModifyTime
(
new
Date
());
return
super
.
save
(
entity
);
}
@Override
public
boolean
updateById
(
PmMonitoringDevice
entity
)
{
entity
.
setModifyTime
(
new
Date
());
return
super
.
updateById
(
entity
);
}
@Override
public
boolean
removeById
(
Serializable
id
)
{
return
update
(
new
UpdateWrapper
<
PmMonitoringDevice
>()
.
lambda
()
.
eq
(
PmMonitoringDevice:
:
getId
,
id
)
.
set
(
PmMonitoringDevice:
:
getDeleted
,
true
)
.
set
(
PmMonitoringDevice:
:
getModifyTime
,
new
Date
()));
}
@Override
public
List
<
PmMonitoringDevice
>
listByFloorId
(
Long
floorId
)
{
new
QueryWrapper
<
PmMonitoringDevice
>()
.
lambda
()
.
eq
(
PmMonitoringDevice:
:
getFloor
,
floorId
);
return
null
;
}
}
}
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