Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mqttsnet
thinglinks
提交
265845eb
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 搜索 >>
提交
265845eb
编写于
3月 08, 2022
作者:
xiaonannet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增设备断开功能
上级
7776f97d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
1 deletion
+30
-1
thinglinks-ui/src/api/link/device.js
thinglinks-ui/src/api/link/device.js
+8
-0
thinglinks-ui/src/views/link/device/index.vue
thinglinks-ui/src/views/link/device/index.vue
+22
-1
未找到文件。
thinglinks-ui/src/api/link/device.js
浏览文件 @
265845eb
...
@@ -42,3 +42,11 @@ export function delDevice(id) {
...
@@ -42,3 +42,11 @@ export function delDevice(id) {
method
:
'
delete
'
method
:
'
delete
'
})
})
}
}
// 断开设备连接
export
function
disconnectDevice
(
id
)
{
return
request
({
url
:
'
/link/device/disconnect/
'
+
id
,
method
:
'
post
'
})
}
thinglinks-ui/src/views/link/device/index.vue
浏览文件 @
265845eb
...
@@ -154,6 +154,17 @@
...
@@ -154,6 +154,17 @@
v-hasPermi=
"['link:device:remove']"
v-hasPermi=
"['link:device:remove']"
>
删除
</el-button>
>
删除
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-loading"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDisconnect"
v-hasPermi=
"['link:device:disconnect']"
>
断开连接
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"warning"
type=
"warning"
...
@@ -438,7 +449,7 @@
...
@@ -438,7 +449,7 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
listDevice
,
getDevice
,
delDevice
,
addDevice
,
updateDevice
}
from
"
@/api/link/device
"
;
import
{
listDevice
,
getDevice
,
delDevice
,
addDevice
,
updateDevice
,
disconnectDevice
}
from
"
@/api/link/device
"
;
import
mapView
from
"
./mapView
"
;
import
mapView
from
"
./mapView
"
;
...
@@ -660,6 +671,16 @@ export default {
...
@@ -660,6 +671,16 @@ export default {
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}
).
catch
(()
=>
{
}
);
}
).
catch
(()
=>
{
}
);
}
,
}
,
/** 断开连接按钮操作 */
handleDisconnect
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'
是否确认断开连接设备档案编号为"
'
+
ids
+
'
"的数据项?
'
).
then
(
function
()
{
return
disconnectDevice
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
操作成功
"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
this
.
download
(
'
link/device/export
'
,
{
this
.
download
(
'
link/device/export
'
,
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录