|
|
|
@ -152,9 +152,20 @@
|
|
|
|
|
<el-dropdown-item command="close">关闭GPS</el-dropdown-item>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</el-dropdown> -->
|
|
|
|
|
<el-button type="primary" @click.native.stop="handleWarn()"
|
|
|
|
|
>声光报警</el-button
|
|
|
|
|
<el-dropdown
|
|
|
|
|
class="dropgps"
|
|
|
|
|
trigger="click"
|
|
|
|
|
@command="handleCommandWarn"
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary">
|
|
|
|
|
声光报警<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-dropdown-menu slot="dropdown" class="gpsdropStyle">
|
|
|
|
|
<el-dropdown-item command="open">开启</el-dropdown-item>
|
|
|
|
|
<el-dropdown-item command="close">关闭</el-dropdown-item>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</el-dropdown>
|
|
|
|
|
|
|
|
|
|
<!-- <el-button type="primary" @click="handlehistoryPic"
|
|
|
|
|
>历史图片</el-button
|
|
|
|
|
> -->
|
|
|
|
@ -432,17 +443,35 @@ export default {
|
|
|
|
|
this.$refs.setschedule_ref.getSingleAccess(this.channelId, this.cmdid);
|
|
|
|
|
this.$refs.setschedule_ref.deviceList();
|
|
|
|
|
},
|
|
|
|
|
handleWarn() {
|
|
|
|
|
handleCommandWarn(command) {
|
|
|
|
|
switch (command) {
|
|
|
|
|
case "open": //开启
|
|
|
|
|
this.handleWarn(1);
|
|
|
|
|
break;
|
|
|
|
|
case "close": //关闭
|
|
|
|
|
this.handleWarn(0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//声光报警
|
|
|
|
|
handleWarn(val) {
|
|
|
|
|
console.log("声光报警");
|
|
|
|
|
console.log(this.cmdid);
|
|
|
|
|
alarmMarkJoggle({ cmdId: this.cmdid, ctrl: 1 })
|
|
|
|
|
alarmMarkJoggle({ cmdId: this.cmdid, ctrl: val })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "声光报警操作成功",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
if (val == 1) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "声光报警开启成功",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "声光报警关闭成功",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|