|
|
@@ -281,9 +281,7 @@
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="handleControl('standby/true')">设备亮屏</el-button>
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="handleControl('standby/false')">设备息屏</el-button>
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="handleVoice">音量调节</el-button>
|
|
|
-<!--
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="handleBrightness">亮度调节</el-button>
|
|
|
--->
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="报警信息" name="alarm">
|
|
|
<div class="table-content">
|
|
|
@@ -341,6 +339,16 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <!--亮度调节弹窗-->
|
|
|
+ <el-dialog v-model="brightDialog.visible" :title="brightDialog.title" width="600px" append-to-body>
|
|
|
+ <el-slider style="margin: 20px" v-model="brightnessValue" :min="0" :max="100" :step="10" show-stops />
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="brightSubmit">确 定</el-button>
|
|
|
+ <el-button @click="brightCancel">关 闭</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -358,7 +366,7 @@ import {
|
|
|
standby,
|
|
|
startStream,
|
|
|
stopStream,
|
|
|
- updateDevice, volumeSet
|
|
|
+ updateDevice, volumeSet,brightSet
|
|
|
} from '@/api/smsb/device/device';
|
|
|
import { DeviceForm, DeviceQuery, DeviceStatisticsVo, DeviceVO } from '@/api/smsb/device/device_type';
|
|
|
import { ProductVO } from '@/api/smsb/device/product_types';
|
|
|
@@ -401,6 +409,7 @@ const offlineNum = ref(0);
|
|
|
const streamDeviceId = ref<string | number>();
|
|
|
const initNum = ref(0);
|
|
|
const volumeValue = ref(0);
|
|
|
+const brightnessValue = ref(0);
|
|
|
const deviceRunInfo = reactive<DeviceRunInfoVO>({
|
|
|
deviceBase: undefined,
|
|
|
id: undefined,
|
|
|
@@ -433,6 +442,10 @@ const voiceDialog = reactive<DialogOption>({
|
|
|
visible: false,
|
|
|
title: ''
|
|
|
});
|
|
|
+const brightDialog = reactive<DialogOption>({
|
|
|
+ visible: false,
|
|
|
+ title: ''
|
|
|
+});
|
|
|
// 播放器实例引用
|
|
|
const flvPlayer = ref<flvjs.Player | null>(null);
|
|
|
const flvPlayerRef = ref<HTMLVideoElement | null>(null);
|
|
|
@@ -530,21 +543,39 @@ const getDeviceStatistics = async () => {
|
|
|
const volumeSubmit = async () => {
|
|
|
buttonLoading.value = true;
|
|
|
const deviceId = deviceRunInfo.deviceId;
|
|
|
- await volumeSet(deviceId,volumeValue.value);
|
|
|
+ await volumeSet(deviceId,volumeValue.value).finally(() => buttonLoading.value = false);
|
|
|
buttonLoading.value = false;
|
|
|
proxy?.$modal.msgSuccess('音量设置成功');
|
|
|
voiceDialog.visible = false;
|
|
|
}
|
|
|
+const brightSubmit = async () => {
|
|
|
+ buttonLoading.value = true;
|
|
|
+ const deviceId = deviceRunInfo.deviceId;
|
|
|
+ await brightSet(deviceId,brightnessValue.value).finally(() => buttonLoading.value = false);
|
|
|
+ buttonLoading.value = false;
|
|
|
+ proxy?.$modal.msgSuccess('亮度设置成功');
|
|
|
+ brightDialog.visible = false;
|
|
|
+}
|
|
|
const volumeCancel = () => {
|
|
|
voiceDialog.visible = false;
|
|
|
buttonLoading.value = false;
|
|
|
}
|
|
|
+const brightCancel = () => {
|
|
|
+ voiceDialog.visible = false;
|
|
|
+ buttonLoading.value = false;
|
|
|
+}
|
|
|
const handleVoice = () => {
|
|
|
// console.log("volume num = " + deviceRunInfo.volume)
|
|
|
voiceDialog.visible = true;
|
|
|
voiceDialog.title = '音量设置';
|
|
|
volumeValue.value = deviceRunInfo.volume;
|
|
|
}
|
|
|
+const handleBrightness = () => {
|
|
|
+ // console.log("volume num = " + deviceRunInfo.volume)
|
|
|
+ brightDialog.visible = true;
|
|
|
+ brightDialog.title = '亮度设置';
|
|
|
+ brightnessValue.value = deviceRunInfo.bright;
|
|
|
+}
|
|
|
const getManufacturerList = async () => {
|
|
|
const queryParams = {
|
|
|
pageNum: 1,
|
|
|
@@ -674,17 +705,17 @@ const handleInfo = async (row?: DeviceVO) => {
|
|
|
const handleControl = async (type: string) => {
|
|
|
buttonLoading.value = true;
|
|
|
if (type === 'reboot') {
|
|
|
- const res = await reboot(deviceId.value);
|
|
|
+ const res = await reboot(deviceId.value).finally(() => buttonLoading.value = false);
|
|
|
} else if (type === 'restartApp') {
|
|
|
- const res = await restartApp(deviceId.value);
|
|
|
+ const res = await restartApp(deviceId.value).finally(() => buttonLoading.value = false);
|
|
|
} else if (type === 'shutdown') {
|
|
|
- const res = await shutdown(deviceId.value);
|
|
|
+ const res = await shutdown(deviceId.value).finally(() => buttonLoading.value = false);
|
|
|
} else if (type === 'standby/true') {
|
|
|
const action = true;
|
|
|
- const res = await standby(deviceId.value,action);
|
|
|
+ const res = await standby(deviceId.value,action).finally(() => buttonLoading.value = false);
|
|
|
}else {
|
|
|
const action = false;
|
|
|
- const res = await standby(deviceId.value,action);
|
|
|
+ const res = await standby(deviceId.value,action).finally(() => buttonLoading.value = false);
|
|
|
}
|
|
|
buttonLoading.value = false;
|
|
|
proxy?.$modal.msgSuccess('指令下发成功');
|