feat:新增下发查询设备控制功能按钮
This commit is contained in:
parent
dd2e64efd7
commit
e253a0a873
|
@ -133,6 +133,15 @@ export function setSwitchControl(data) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 开关控制 最新接口
|
||||||
|
export function searchDevControl(data) {
|
||||||
|
return request({
|
||||||
|
url: "/iot/dev/opt/search",
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 断路器上报间隔设置
|
// 断路器上报间隔设置
|
||||||
export function setLivetimeControl(data) {
|
export function setLivetimeControl(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -45,6 +45,16 @@
|
||||||
>
|
>
|
||||||
一键分闸
|
一键分闸
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
:class="
|
||||||
|
tableSelectList && tableSelectList.length > 0
|
||||||
|
? 'operate-onekey-on'
|
||||||
|
: 'operate-onekey-on but-disable'
|
||||||
|
"
|
||||||
|
@click="handleDevSearch()"
|
||||||
|
>
|
||||||
|
查找设备
|
||||||
|
</div>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.prodKey"
|
v-model="queryParams.prodKey"
|
||||||
style="margin-left: 5xp; width: 130px"
|
style="margin-left: 5xp; width: 130px"
|
||||||
|
@ -128,7 +138,7 @@ import {
|
||||||
listProjectModel,
|
listProjectModel,
|
||||||
listProjectTableFilter,
|
listProjectTableFilter,
|
||||||
} from "@/api/iot/project_new";
|
} from "@/api/iot/project_new";
|
||||||
import { setSwitchControl } from "@/api/iot/device";
|
import { setSwitchControl,searchDevControl } from "@/api/iot/device";
|
||||||
import { webSocketProjectGatewayUrl } from "@/config/env";
|
import { webSocketProjectGatewayUrl } from "@/config/env";
|
||||||
export default {
|
export default {
|
||||||
name: "EDeviceChildren",
|
name: "EDeviceChildren",
|
||||||
|
@ -296,6 +306,11 @@ export default {
|
||||||
this.handleSendSwitchDirect(type, this.tableSelectList.toString());
|
this.handleSendSwitchDirect(type, this.tableSelectList.toString());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleDevSearch() {
|
||||||
|
if (this.tableSelectList && this.tableSelectList.length > 0) {
|
||||||
|
this.handleSearchDevDirect( this.tableSelectList.toString());
|
||||||
|
}
|
||||||
|
},
|
||||||
// 点击子设备 线路开关
|
// 点击子设备 线路开关
|
||||||
handleSendSwitchDirect(type, ids) {
|
handleSendSwitchDirect(type, ids) {
|
||||||
this.$prompt("请输入登录密码", "提示", {
|
this.$prompt("请输入登录密码", "提示", {
|
||||||
|
@ -333,6 +348,29 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//查找设备(设备亮灯)
|
||||||
|
handleSearchDevDirect( ids) {
|
||||||
|
this.$prompt("请输入登录密码", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
inputPattern: /^[a-z A-z 0-9 $.]+/,
|
||||||
|
inputType: "password",
|
||||||
|
inputErrorMessage: "登录密码不能为空",
|
||||||
|
}).then(({ value }) => {
|
||||||
|
let params = {
|
||||||
|
data: {
|
||||||
|
params: {
|
||||||
|
},
|
||||||
|
},
|
||||||
|
deviceId: ids,
|
||||||
|
verifyKey: value,
|
||||||
|
};
|
||||||
|
|
||||||
|
searchDevControl(params).then((res) => {
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
handleRefresh() {
|
handleRefresh() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getChildrenDeviceList();
|
this.getChildrenDeviceList();
|
||||||
|
|
|
@ -109,6 +109,25 @@
|
||||||
一键分闸
|
一键分闸
|
||||||
</div></el-button
|
</div></el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
type="info"
|
||||||
|
:disabled="tSelectLabelList.length <= 0"
|
||||||
|
@click="handleDevSearch()"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<icon class="iconfont el-icon-search but-icon" />
|
||||||
|
查找设备
|
||||||
|
</div>
|
||||||
|
</el-button>
|
||||||
<el-button plain size="mini" type="info" @click="handleAllSelect()">
|
<el-button plain size="mini" type="info" @click="handleAllSelect()">
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
|
@ -328,7 +347,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listChildrenDevice, setSwitchControl, setLivetimeControl } from "@/api/iot/device";
|
import { listChildrenDevice, setSwitchControl, setLivetimeControl, searchDevControl } from "@/api/iot/device";
|
||||||
import {
|
import {
|
||||||
devLiveWebSocketBaseUrl,
|
devLiveWebSocketBaseUrl,
|
||||||
webSocketProjectGatewayUrl,
|
webSocketProjectGatewayUrl,
|
||||||
|
@ -462,7 +481,28 @@ export default {
|
||||||
this.handleChildStatus(type);
|
this.handleChildStatus(type);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleDevSearch(){
|
||||||
|
this.$prompt("请输入登录密码", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
inputPattern: /^[a-z A-z 0-9 $.]+/,
|
||||||
|
inputType: "password",
|
||||||
|
inputErrorMessage: "登录密码不能为空",
|
||||||
|
}).then(({ value }) => {
|
||||||
|
let params = {
|
||||||
|
data: {
|
||||||
|
params: {
|
||||||
|
},
|
||||||
|
},
|
||||||
|
deviceId: this.tSelectList.toString(),
|
||||||
|
verifyKey: value,
|
||||||
|
};
|
||||||
|
|
||||||
|
searchDevControl(params).then((res) => {
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
handleAllSelect() {
|
handleAllSelect() {
|
||||||
if (this.childDeviceList.length > 0) {
|
if (this.childDeviceList.length > 0) {
|
||||||
if (this.tSelectList.length >= this.childDeviceList.length) {
|
if (this.tSelectList.length >= this.childDeviceList.length) {
|
||||||
|
|
Loading…
Reference in New Issue