Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mqttsnet
thinglinks
提交
b5be6748
thinglinks
项目概览
mqttsnet
/
thinglinks
通知
1
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
thinglinks
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b5be6748
编写于
1月 04, 2022
作者:
xiaonannet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化设备管理页面
上级
f1e9cb40
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
368 addition
and
80 deletion
+368
-80
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/controller/device/DeviceController.java
...t/thinglinks/link/controller/device/DeviceController.java
+17
-12
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/mapper/device/DeviceMapper.java
.../mqttsnet/thinglinks/link/mapper/device/DeviceMapper.java
+42
-2
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/DeviceService.java
...qttsnet/thinglinks/link/service/device/DeviceService.java
+43
-1
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/impl/DeviceServiceImpl.java
...hinglinks/link/service/device/impl/DeviceServiceImpl.java
+69
-5
thinglinks-modules/thinglinks-modules-link/src/main/resources/mapper/link/device/DeviceMapper.xml
...nk/src/main/resources/mapper/link/device/DeviceMapper.xml
+137
-0
thinglinks-ui/package.json
thinglinks-ui/package.json
+2
-0
thinglinks-ui/public/index.html
thinglinks-ui/public/index.html
+2
-2
thinglinks-ui/src/views/link/device/index.vue
thinglinks-ui/src/views/link/device/index.vue
+55
-58
thinglinks-visual/thinglinks-visual-monitor/src/main/java/com/mqttsnet/thinglinks/monitor/ThingLinksMonitorApplication.java
...snet/thinglinks/monitor/ThingLinksMonitorApplication.java
+1
-0
未找到文件。
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/controller/device/DeviceController.java
浏览文件 @
b5be6748
...
...
@@ -34,9 +34,10 @@ public class DeviceController extends BaseController {
*/
@PreAuthorize
(
hasPermi
=
"link:device:list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
Device
device
)
{
public
TableDataInfo
list
(
Device
device
)
{
startPage
();
List
<
Device
>
list
=
deviceService
.
findByAll
(
device
);
List
<
Device
>
list
=
deviceService
.
selectDeviceList
(
device
);
return
getDataTable
(
list
);
}
...
...
@@ -46,8 +47,9 @@ public class DeviceController extends BaseController {
@PreAuthorize
(
hasPermi
=
"link:device:export"
)
@Log
(
title
=
"设备管理"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
Device
device
)
throws
IOException
{
List
<
Device
>
list
=
deviceService
.
findByAll
(
device
);
public
void
export
(
HttpServletResponse
response
,
Device
device
)
throws
IOException
{
List
<
Device
>
list
=
deviceService
.
selectDeviceList
(
device
);
ExcelUtil
<
Device
>
util
=
new
ExcelUtil
<
Device
>(
Device
.
class
);
util
.
exportExcel
(
response
,
list
,
"设备管理数据"
);
}
...
...
@@ -57,8 +59,9 @@ public class DeviceController extends BaseController {
*/
@PreAuthorize
(
hasPermi
=
"link:device:query"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
deviceService
.
findOneById
(
id
));
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
deviceService
.
selectDeviceById
(
id
));
}
/**
...
...
@@ -67,8 +70,9 @@ public class DeviceController extends BaseController {
@PreAuthorize
(
hasPermi
=
"link:device:add"
)
@Log
(
title
=
"设备管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
Device
device
)
{
return
toAjax
(
deviceService
.
insert
(
device
));
public
AjaxResult
add
(
@RequestBody
Device
device
)
{
return
toAjax
(
deviceService
.
insertDevice
(
device
));
}
/**
...
...
@@ -77,8 +81,9 @@ public class DeviceController extends BaseController {
@PreAuthorize
(
hasPermi
=
"link:device:edit"
)
@Log
(
title
=
"设备管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
Device
device
)
{
return
toAjax
(
deviceService
.
updateByPrimaryKey
(
device
));
public
AjaxResult
edit
(
@RequestBody
Device
device
)
{
return
toAjax
(
deviceService
.
updateDevice
(
device
));
}
/**
...
...
@@ -87,7 +92,8 @@ public class DeviceController extends BaseController {
@PreAuthorize
(
hasPermi
=
"link:device:remove"
)
@Log
(
title
=
"设备管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
deviceService
.
deleteDeviceByIds
(
ids
));
}
...
...
@@ -95,7 +101,6 @@ public class DeviceController extends BaseController {
* 更新设备在线状态
*/
@Log
(
title
=
"设备管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/updateConnectStatusByClientId"
)
public
R
updateConnectStatusByClientId
(
@RequestBody
Device
device
)
{
return
R
.
ok
(
deviceService
.
updateConnectStatusByClientId
(
device
.
getConnectStatus
(),
device
.
getClientId
()));
}
...
...
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/mapper/device/DeviceMapper.java
浏览文件 @
b5be6748
package
com.mqttsnet.thinglinks.link.mapper.device
;
import
com.mqttsnet.thinglinks.link.api.domain.device.entity.Device
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
...
...
@@ -95,6 +96,46 @@ public interface DeviceMapper {
Device
findOneById
(
@Param
(
"id"
)
Long
id
);
/**
* 查询设备管理
*
* @param id 设备管理主键
* @return 设备管理
*/
public
Device
selectDeviceById
(
Long
id
);
/**
* 查询设备管理列表
*
* @param device 设备管理
* @return 设备管理集合
*/
public
List
<
Device
>
selectDeviceList
(
Device
device
);
/**
* 新增设备管理
*
* @param device 设备管理
* @return 结果
*/
public
int
insertDevice
(
Device
device
);
/**
* 修改设备管理
*
* @param device 设备管理
* @return 结果
*/
public
int
updateDevice
(
Device
device
);
/**
* 删除设备管理
*
* @param id 设备管理主键
* @return 结果
*/
public
int
deleteDeviceById
(
Long
id
);
/**
* 批量删除设备管理
*
...
...
@@ -102,5 +143,4 @@ public interface DeviceMapper {
* @return 结果
*/
public
int
deleteDeviceByIds
(
Long
[]
ids
);
}
\ No newline at end of file
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/DeviceService.java
浏览文件 @
b5be6748
package
com.mqttsnet.thinglinks.link.service.device
;
import
java.util.List
;
import
com.mqttsnet.thinglinks.link.api.domain.device.entity.Device
;
import
java.util.List
;
/**
* @Description: java类作用描述
* @Author: ShiHuan Sun
...
...
@@ -47,6 +48,39 @@ public interface DeviceService {
Device
findOneById
(
Long
id
);
/**
* 查询设备管理
*
* @param id 设备管理主键
* @return 设备管理
*/
public
Device
selectDeviceById
(
Long
id
);
/**
* 查询设备管理列表
*
* @param device 设备管理
* @return 设备管理集合
*/
public
List
<
Device
>
selectDeviceList
(
Device
device
);
/**
* 新增设备管理
*
* @param device 设备管理
* @return 结果
*/
public
int
insertDevice
(
Device
device
);
/**
* 修改设备管理
*
* @param device 设备管理
* @return 结果
*/
public
int
updateDevice
(
Device
device
);
/**
* 批量删除设备管理
*
...
...
@@ -55,5 +89,13 @@ public interface DeviceService {
*/
public
int
deleteDeviceByIds
(
Long
[]
ids
);
/**
* 删除设备管理信息
*
* @param id 设备管理主键
* @return 结果
*/
public
int
deleteDeviceById
(
Long
id
);
}
thinglinks-modules/thinglinks-modules-link/src/main/java/com/mqttsnet/thinglinks/link/service/device/impl/DeviceServiceImpl.java
浏览文件 @
b5be6748
package
com.mqttsnet.thinglinks.link.service.device.impl
;
import
com.mqttsnet.thinglinks.common.core.utils.DateUtils
;
import
com.mqttsnet.thinglinks.link.api.domain.device.entity.Device
;
import
com.mqttsnet.thinglinks.link.mapper.device.DeviceMapper
;
import
com.mqttsnet.thinglinks.link.service.device.DeviceService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
com.mqttsnet.thinglinks.link.mapper.device.DeviceMapper
;
import
java.util.List
;
import
com.mqttsnet.thinglinks.link.api.domain.device.entity.Device
;
import
com.mqttsnet.thinglinks.link.service.device.DeviceService
;
/**
* @Description: java类作用描述
...
...
@@ -100,17 +102,79 @@ public class DeviceServiceImpl implements DeviceService {
return
deviceMapper
.
findOneById
(
id
);
}
/**
* 查询设备管理
*
* @param id 设备管理主键
* @return 设备管理
*/
@Override
public
Device
selectDeviceById
(
Long
id
)
{
return
deviceMapper
.
selectDeviceById
(
id
);
}
/**
* 查询设备管理列表
*
* @param device 设备管理
* @return 设备管理
*/
@Override
public
List
<
Device
>
selectDeviceList
(
Device
device
)
{
return
deviceMapper
.
selectDeviceList
(
device
);
}
/**
* 新增设备管理
*
* @param device 设备管理
* @return 结果
*/
@Override
public
int
insertDevice
(
Device
device
)
{
device
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
deviceMapper
.
insertDevice
(
device
);
}
/**
* 修改设备管理
*
* @param device 设备管理
* @return 结果
*/
@Override
public
int
updateDevice
(
Device
device
)
{
device
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
deviceMapper
.
updateDevice
(
device
);
}
/**
* 批量删除设备管理
*
* @param ids 需要删除的设备管理主键
集合
* @param ids 需要删除的设备管理主键
* @return 结果
*/
@Override
public
int
deleteDeviceByIds
(
Long
[]
ids
)
{
public
int
deleteDeviceByIds
(
Long
[]
ids
)
{
return
deviceMapper
.
deleteDeviceByIds
(
ids
);
}
/**
* 删除设备管理信息
*
* @param id 设备管理主键
* @return 结果
*/
@Override
public
int
deleteDeviceById
(
Long
id
)
{
return
deviceMapper
.
deleteDeviceById
(
id
);
}
}
thinglinks-modules/thinglinks-modules-link/src/main/resources/mapper/link/device/DeviceMapper.xml
浏览文件 @
b5be6748
...
...
@@ -28,6 +28,31 @@
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
</resultMap>
<resultMap
type=
"com.mqttsnet.thinglinks.link.api.domain.device.entity.Device"
id=
"DeviceResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"clientId"
column=
"client_id"
/>
<result
property=
"userName"
column=
"user_name"
/>
<result
property=
"password"
column=
"password"
/>
<result
property=
"appId"
column=
"app_id"
/>
<result
property=
"authMode"
column=
"auth_mode"
/>
<result
property=
"deviceIdentification"
column=
"device_identification"
/>
<result
property=
"deviceName"
column=
"device_name"
/>
<result
property=
"connector"
column=
"connector"
/>
<result
property=
"deviceDescription"
column=
"device_description"
/>
<result
property=
"deviceStatus"
column=
"device_status"
/>
<result
property=
"connectStatus"
column=
"connect_status"
/>
<result
property=
"isWill"
column=
"is_will"
/>
<result
property=
"deviceTags"
column=
"device_tags"
/>
<result
property=
"productId"
column=
"product_id"
/>
<result
property=
"manufacturerId"
column=
"manufacturer_id"
/>
<result
property=
"protocolType"
column=
"protocol_type"
/>
<result
property=
"deviceType"
column=
"device_type"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, client_id, user_name, `password`, app_id, auth_mode, device_identification, device_name,
...
...
@@ -1083,6 +1108,118 @@
</if>
</where>
</select>
<sql
id=
"selectDeviceVo"
>
select id, client_id, user_name, password, app_id, auth_mode, device_identification, device_name, connector, device_description, device_status, connect_status, is_will, device_tags, product_id, manufacturer_id, protocol_type, device_type, create_by, create_time, update_by, update_time, remark from device
</sql>
<select
id=
"selectDeviceList"
parameterType=
"Device"
resultMap=
"DeviceResult"
>
<include
refid=
"selectDeviceVo"
/>
<where>
<if
test=
"clientId != null and clientId != ''"
>
and client_id like concat('%', #{clientId}, '%')
</if>
<if
test=
"deviceIdentification != null and deviceIdentification != ''"
>
and device_identification like concat('%', #{deviceIdentification}, '%')
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
and device_name like concat('%', #{deviceName}, '%')
</if>
<if
test=
"connector != null and connector != ''"
>
and connector = #{connector}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
<if
test=
"connectStatus != null and connectStatus != ''"
>
and connect_status = #{connectStatus}
</if>
<if
test=
"isWill != null and isWill != ''"
>
and is_will = #{isWill}
</if>
<if
test=
"deviceTags != null and deviceTags != ''"
>
and device_tags = #{deviceTags}
</if>
<if
test=
"productId != null and productId != ''"
>
and product_id = #{productId}
</if>
<if
test=
"manufacturerId != null and manufacturerId != ''"
>
and manufacturer_id = #{manufacturerId}
</if>
<if
test=
"protocolType != null and protocolType != ''"
>
and protocol_type = #{protocolType}
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
and device_type = #{deviceType}
</if>
<if
test=
"createTime != null "
>
and create_time = #{createTime}
</if>
</where>
</select>
<select
id=
"selectDeviceById"
parameterType=
"Long"
resultMap=
"DeviceResult"
>
<include
refid=
"selectDeviceVo"
/>
where id = #{id}
</select>
<insert
id=
"insertDevice"
parameterType=
"Device"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into device
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"clientId != null and clientId != ''"
>
client_id,
</if>
<if
test=
"userName != null and userName != ''"
>
user_name,
</if>
<if
test=
"password != null and password != ''"
>
password,
</if>
<if
test=
"appId != null and appId != ''"
>
app_id,
</if>
<if
test=
"authMode != null and authMode != ''"
>
auth_mode,
</if>
<if
test=
"deviceIdentification != null and deviceIdentification != ''"
>
device_identification,
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
device_name,
</if>
<if
test=
"connector != null and connector != ''"
>
connector,
</if>
<if
test=
"deviceDescription != null"
>
device_description,
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
device_status,
</if>
<if
test=
"connectStatus != null and connectStatus != ''"
>
connect_status,
</if>
<if
test=
"isWill != null"
>
is_will,
</if>
<if
test=
"deviceTags != null and deviceTags != ''"
>
device_tags,
</if>
<if
test=
"productId != null and productId != ''"
>
product_id,
</if>
<if
test=
"manufacturerId != null and manufacturerId != ''"
>
manufacturer_id,
</if>
<if
test=
"protocolType != null and protocolType != ''"
>
protocol_type,
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
device_type,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"clientId != null and clientId != ''"
>
#{clientId},
</if>
<if
test=
"userName != null and userName != ''"
>
#{userName},
</if>
<if
test=
"password != null and password != ''"
>
#{password},
</if>
<if
test=
"appId != null and appId != ''"
>
#{appId},
</if>
<if
test=
"authMode != null and authMode != ''"
>
#{authMode},
</if>
<if
test=
"deviceIdentification != null and deviceIdentification != ''"
>
#{deviceIdentification},
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
#{deviceName},
</if>
<if
test=
"connector != null and connector != ''"
>
#{connector},
</if>
<if
test=
"deviceDescription != null"
>
#{deviceDescription},
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
#{deviceStatus},
</if>
<if
test=
"connectStatus != null and connectStatus != ''"
>
#{connectStatus},
</if>
<if
test=
"isWill != null"
>
#{isWill},
</if>
<if
test=
"deviceTags != null and deviceTags != ''"
>
#{deviceTags},
</if>
<if
test=
"productId != null and productId != ''"
>
#{productId},
</if>
<if
test=
"manufacturerId != null and manufacturerId != ''"
>
#{manufacturerId},
</if>
<if
test=
"protocolType != null and protocolType != ''"
>
#{protocolType},
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
#{deviceType},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updateDevice"
parameterType=
"Device"
>
update device
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"clientId != null and clientId != ''"
>
client_id = #{clientId},
</if>
<if
test=
"userName != null and userName != ''"
>
user_name = #{userName},
</if>
<if
test=
"password != null and password != ''"
>
password = #{password},
</if>
<if
test=
"appId != null and appId != ''"
>
app_id = #{appId},
</if>
<if
test=
"authMode != null and authMode != ''"
>
auth_mode = #{authMode},
</if>
<if
test=
"deviceIdentification != null and deviceIdentification != ''"
>
device_identification = #{deviceIdentification},
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
device_name = #{deviceName},
</if>
<if
test=
"connector != null and connector != ''"
>
connector = #{connector},
</if>
<if
test=
"deviceDescription != null"
>
device_description = #{deviceDescription},
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
device_status = #{deviceStatus},
</if>
<if
test=
"connectStatus != null and connectStatus != ''"
>
connect_status = #{connectStatus},
</if>
<if
test=
"isWill != null"
>
is_will = #{isWill},
</if>
<if
test=
"deviceTags != null and deviceTags != ''"
>
device_tags = #{deviceTags},
</if>
<if
test=
"productId != null and productId != ''"
>
product_id = #{productId},
</if>
<if
test=
"manufacturerId != null and manufacturerId != ''"
>
manufacturer_id = #{manufacturerId},
</if>
<if
test=
"protocolType != null and protocolType != ''"
>
protocol_type = #{protocolType},
</if>
<if
test=
"deviceType != null and deviceType != ''"
>
device_type = #{deviceType},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteDeviceById"
parameterType=
"Long"
>
delete from device where id = #{id}
</delete>
<delete
id=
"deleteDeviceByIds"
parameterType=
"String"
>
delete from device where id in
...
...
thinglinks-ui/package.json
浏览文件 @
b5be6748
...
...
@@ -61,6 +61,8 @@
"vue-meta"
:
"^2.4.0"
,
"vue-router"
:
"3.4.9"
,
"vuedraggable"
:
"2.24.3"
,
"lodash"
:
"^4.17.21"
,
"vue-codemirror"
:
"^4.0.6"
,
"vuex"
:
"3.6.0"
},
"devDependencies"
:
{
...
...
thinglinks-ui/public/index.html
浏览文件 @
b5be6748
...
...
@@ -8,7 +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]-->
<style>
<style
lang=
"scss"
>
html
,
body
,
#app
{
...
...
@@ -201,7 +201,7 @@
<div
id=
"loader"
></div>
<div
class=
"loader-section section-left"
></div>
<div
class=
"loader-section section-right"
></div>
<div
class=
"load_title"
>
正在加载系统资源,请耐心等待
</div>
<div
class=
"load_title"
>
正在加载
ThingLinks
系统资源,请耐心等待
</div>
</div>
</div>
</body>
...
...
thinglinks-ui/src/views/link/device/index.vue
浏览文件 @
b5be6748
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
68
px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
100
px"
>
<el-form-item
label=
"客户端标识"
prop=
"clientId"
>
<el-input
v-model=
"queryParams.clientId"
...
...
@@ -58,6 +58,16 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"是否遗言"
prop=
"isWill"
>
<el-select
v-model=
"queryParams.isWill"
placeholder=
"请选择是否遗言"
clearable
size=
"small"
>
<el-option
v-for=
"dict in dict.type.link_device_is_will"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"设备标签"
prop=
"deviceTags"
>
<el-input
v-model=
"queryParams.deviceTags"
...
...
@@ -161,6 +171,8 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"id"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"客户端标识"
align=
"center"
prop=
"clientId"
/>
<el-table-column
label=
"用户名"
align=
"center"
prop=
"userName"
/>
<el-table-column
label=
"密码"
align=
"center"
prop=
"password"
/>
<el-table-column
label=
"认证方式"
align=
"center"
prop=
"authMode"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.link_device_auth_mode"
:value=
"scope.row.authMode"
/>
...
...
@@ -243,8 +255,8 @@
@
pagination
=
"
getList
"
/>
<!--
添加或修改设备
管理
对话框
-->
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open
"
width
=
"
800px
"
append
-
to
-
body
>
<!--
添加或修改设备
档案
对话框
-->
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open
"
width
=
"
40%
"
append
-
to
-
body
>
<
el
-
form
ref
=
"
form
"
:
model
=
"
form
"
:
rules
=
"
rules
"
label
-
width
=
"
120px
"
>
<
el
-
row
>
<
el
-
col
:
span
=
"
11
"
>
...
...
@@ -280,11 +292,32 @@
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"
11
"
>
<
el
-
form
-
item
label
=
"
设备名称
"
prop
=
"
deviceIdentification
"
>
<
el
-
input
v
-
model
=
"
form.deviceName
"
placeholder
=
"
请输入设备名称
"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
11
"
>
<
el
-
form
-
item
label
=
"
设备标识
"
prop
=
"
deviceIdentification
"
>
<
el
-
input
v
-
model
=
"
form.deviceIdentification
"
placeholder
=
"
请输入设备标识
"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"
11
"
>
<
el
-
form
-
item
label
=
"
集成应用
"
prop
=
"
appId
"
>
<
el
-
select
v
-
model
=
"
form.appId
"
placeholder
=
"
请选择集成应用
"
>
<
el
-
option
v
-
for
=
"
dict in dict.type.link_application_type
"
:
key
=
"
dict.value
"
:
label
=
"
dict.label
"
:
value
=
"
dict.value
"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
11
"
>
<
el
-
form
-
item
label
=
"
连接实例
"
prop
=
"
connector
"
>
<
el
-
select
v
-
model
=
"
form.connector
"
placeholder
=
"
请选择连接实例
"
>
...
...
@@ -298,7 +331,6 @@
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"
22
"
>
<
mapView
...
...
@@ -342,33 +374,6 @@
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"
11
"
>
<
el
-
form
-
item
label
=
"
连接状态
"
prop
=
"
connectStatus
"
>
<
el
-
select
v
-
model
=
"
form.connectStatus
"
placeholder
=
"
请选择连接状态
"
>
<
el
-
option
v
-
for
=
"
dict in dict.type.link_device_connect_status
"
:
key
=
"
dict.value
"
:
label
=
"
dict.label
"
:
value
=
"
dict.value
"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
11
"
>
<
el
-
form
-
item
label
=
"
是否遗言
"
prop
=
"
isWill
"
>
<
el
-
select
v
-
model
=
"
form.isWill
"
placeholder
=
"
请选择是否遗言
"
>
<
el
-
option
v
-
for
=
"
dict in dict.type.link_device_is_will
"
:
key
=
"
dict.value
"
:
label
=
"
dict.label
"
:
value
=
"
dict.value
"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"
11
"
>
<
el
-
form
-
item
label
=
"
产品型号
"
prop
=
"
productId
"
>
...
...
@@ -408,9 +413,15 @@
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"
20
"
>
<
el
-
col
:
span
=
"
22
"
>
<
el
-
form
-
item
label
=
"
设备标签
"
prop
=
"
deviceTags
"
>
<
el
-
input
v
-
model
=
"
form.deviceTags
"
placeholder
=
"
请输入设备标签
"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"
22
"
>
<
el
-
form
-
item
label
=
"
备注
"
prop
=
"
remark
"
>
<
el
-
input
v
-
model
=
"
form.remark
"
type
=
"
textarea
"
placeholder
=
"
请输入内容
"
/>
<
/el-form-item
>
...
...
@@ -436,7 +447,7 @@ export default {
mapView
}
,
name
:
"
Device
"
,
dicts
:
[
'
link_device_
auth_mode
'
,
'
link_device_connector
'
,
'
link_device_status
'
,
'
link_device_connect_status
'
,
'
link_device_is_will
'
,
'
link_device_protocol_type
'
,
'
link_device_device
_type
'
],
dicts
:
[
'
link_device_
status
'
,
'
link_device_connect_status
'
,
'
link_device_protocol_type
'
,
'
link_device_device_type
'
,
'
link_device_auth_mode
'
,
'
link_device_connector
'
,
'
link_device_is_will
'
,
'
link_application
_type
'
],
data
()
{
return
{
// 遮罩层
...
...
@@ -451,7 +462,7 @@ export default {
showSearch
:
true
,
// 总条数
total
:
0
,
// 设备
管理
表格数据
// 设备
档案
表格数据
deviceList
:
[],
// 弹出层标题
title
:
""
,
...
...
@@ -467,20 +478,17 @@ export default {
connector
:
null
,
deviceStatus
:
null
,
connectStatus
:
null
,
isWill
:
null
,
deviceTags
:
null
,
productId
:
null
,
manufacturerId
:
null
,
protocolType
:
null
,
deviceType
:
null
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
id
:
[
{
required
:
true
,
message
:
"
id不能为空
"
,
trigger
:
"
blur
"
}
],
clientId
:
[
{
required
:
true
,
message
:
"
客户端标识不能为空
"
,
trigger
:
"
blur
"
}
],
...
...
@@ -490,6 +498,9 @@ export default {
password
:
[
{
required
:
true
,
message
:
"
密码不能为空
"
,
trigger
:
"
blur
"
}
],
appId
:
[
{
required
:
true
,
message
:
"
应用ID不能为空
"
,
trigger
:
"
blur
"
}
],
authMode
:
[
{
required
:
true
,
message
:
"
认证方式不能为空
"
,
trigger
:
"
change
"
}
],
...
...
@@ -511,9 +522,6 @@ export default {
deviceStatus
:
[
{
required
:
true
,
message
:
"
设备状态不能为空
"
,
trigger
:
"
change
"
}
],
connectStatus
:
[
{
required
:
true
,
message
:
"
连接状态不能为空
"
,
trigger
:
"
change
"
}
],
productId
:
[
{
required
:
true
,
message
:
"
产品型号不能为空
"
,
trigger
:
"
blur
"
}
],
...
...
@@ -526,18 +534,6 @@ export default {
deviceType
:
[
{
required
:
true
,
message
:
"
设备类型不能为空
"
,
trigger
:
"
change
"
}
],
createBy
:
[
{
required
:
true
,
message
:
"
创建者不能为空
"
,
trigger
:
"
blur
"
}
],
createTime
:
[
{
required
:
true
,
message
:
"
创建时间不能为空
"
,
trigger
:
"
blur
"
}
],
updateBy
:
[
{
required
:
true
,
message
:
"
更新者不能为空
"
,
trigger
:
"
blur
"
}
],
updateTime
:
[
{
required
:
true
,
message
:
"
更新时间不能为空
"
,
trigger
:
"
blur
"
}
],
}
}
;
}
,
...
...
@@ -557,7 +553,7 @@ export default {
duration
:
1500
,
}
);
}
,
/** 查询设备
管理
列表 */
/** 查询设备
档案
列表 */
getList
()
{
this
.
loading
=
true
;
listDevice
(
this
.
queryParams
).
then
(
response
=>
{
...
...
@@ -578,6 +574,7 @@ export default {
clientId
:
null
,
userName
:
null
,
password
:
null
,
appId
:
null
,
authMode
:
null
,
deviceIdentification
:
null
,
deviceName
:
null
,
...
...
@@ -621,7 +618,7 @@ export default {
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加设备
管理
"
;
this
.
title
=
"
添加设备
档案
"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
...
...
@@ -630,7 +627,7 @@ export default {
getDevice
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改设备
管理
"
;
this
.
title
=
"
修改设备
档案
"
;
}
);
}
,
/** 提交按钮 */
...
...
@@ -656,7 +653,7 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'
是否确认删除设备
管理
编号为"
'
+
ids
+
'
"的数据项?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'
是否确认删除设备
档案
编号为"
'
+
ids
+
'
"的数据项?
'
).
then
(
function
()
{
return
delDevice
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
...
...
thinglinks-visual/thinglinks-visual-monitor/src/main/java/com/mqttsnet/thinglinks/monitor/ThingLinksMonitorApplication.java
浏览文件 @
b5be6748
...
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.CrossOrigin;
public
class
ThingLinksMonitorApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ThingLinksMonitorApplication
.
class
,
args
);
System
.
out
.
println
(
"(♥◠‿◠)ノ゙ 监控中心服务启动成功 ლ(´ڡ`ლ)゙ "
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录