|
@@ -66,16 +66,26 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 设备状态按钮 -->
|
|
<!-- 设备状态按钮 -->
|
|
|
<div
|
|
<div
|
|
|
- v-if="showDeviceStatus"
|
|
|
|
|
- class="header-bar__menu-item"
|
|
|
|
|
- @click="openDeviceStatus"
|
|
|
|
|
- title="设备状态"
|
|
|
|
|
|
|
+ v-if="showDeviceStatus"
|
|
|
|
|
+ class="header-bar__menu-item"
|
|
|
|
|
+ @click="openDeviceStatus"
|
|
|
|
|
+ title="设备状态"
|
|
|
>
|
|
>
|
|
|
<div class="header-bar__menu-item-content flex">
|
|
<div class="header-bar__menu-item-content flex">
|
|
|
- <img :src="deviceStatusIcon" class="header-bar__menu-icon" />
|
|
|
|
|
<span class="header-bar__menu-name">设备状态</span>
|
|
<span class="header-bar__menu-name">设备状态</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 设备状态按钮 -->
|
|
|
|
|
+<!-- <div
|
|
|
|
|
+ v-if="showDeviceStatus"
|
|
|
|
|
+ class="header-bar__menu-item"
|
|
|
|
|
+ @click="OneClickRelease"
|
|
|
|
|
+ title="一键释放"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="header-bar__menu-item-content flex">
|
|
|
|
|
+ <span class="header-bar__menu-name">一键释放</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>-->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="header-bar__title">
|
|
<div class="header-bar__title">
|
|
|
<span class="header-bar__text">
|
|
<span class="header-bar__text">
|
|
@@ -131,6 +141,8 @@ import packageJson from '@/../../package.json';
|
|
|
import { getCameraMachineDoc } from '@/apis/other';
|
|
import { getCameraMachineDoc } from '@/apis/other';
|
|
|
import useDeviceStatusStore from '@/stores/modules/deviceStatus';
|
|
import useDeviceStatusStore from '@/stores/modules/deviceStatus';
|
|
|
import DeviceStatusDialog from '@/components/device-status-dialog/index.vue';
|
|
import DeviceStatusDialog from '@/components/device-status-dialog/index.vue';
|
|
|
|
|
+import socket from "@/stores/modules/socket";
|
|
|
|
|
+import { ElMessageBox } from 'element-plus'
|
|
|
|
|
|
|
|
// 设备状态 store
|
|
// 设备状态 store
|
|
|
const deviceStatusStore = useDeviceStatusStore();
|
|
const deviceStatusStore = useDeviceStatusStore();
|
|
@@ -143,6 +155,7 @@ const deviceStatusIcon = ref(iconsz);
|
|
|
|
|
|
|
|
const clientStore = client()
|
|
const clientStore = client()
|
|
|
const useUserInfoStore = useUserInfo()
|
|
const useUserInfoStore = useUserInfo()
|
|
|
|
|
+const socketStore = socket()
|
|
|
|
|
|
|
|
const currentVersion = ref(packageJson.version);
|
|
const currentVersion = ref(packageJson.version);
|
|
|
// 定义 menu 项的类型
|
|
// 定义 menu 项的类型
|
|
@@ -199,6 +212,10 @@ const menuType = reactive({
|
|
|
icon: iconykq,
|
|
icon: iconykq,
|
|
|
click: openRemoteControl
|
|
click: openRemoteControl
|
|
|
},
|
|
},
|
|
|
|
|
+ OneClickRelease: {
|
|
|
|
|
+ name: '一键释放',
|
|
|
|
|
+ click: OneClickRelease
|
|
|
|
|
+ },
|
|
|
developer: {
|
|
developer: {
|
|
|
name: '初始设备调频设置',
|
|
name: '初始设备调频设置',
|
|
|
icon: iconsz,
|
|
icon: iconsz,
|
|
@@ -337,6 +354,24 @@ function openDeviceStatus() {
|
|
|
deviceStatusStore.openDialog();
|
|
deviceStatusStore.openDialog();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+//一键释放
|
|
|
|
|
+async function OneClickRelease(){
|
|
|
|
|
+
|
|
|
|
|
+ await ElMessageBox.confirm(
|
|
|
|
|
+ `确定要一键释放设备吗?`,
|
|
|
|
|
+ '提示',
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ },
|
|
|
|
|
+ )
|
|
|
|
|
+ socketStore.sendMessage({
|
|
|
|
|
+ type: 'oneclick_release',
|
|
|
|
|
+ data:"oneclick_release"
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
document.addEventListener('click', handleOutsideClick);
|
|
document.addEventListener('click', handleOutsideClick);
|
|
|
// 初始化设备状态监听
|
|
// 初始化设备状态监听
|