special_video添加信号源时只能添加视频和图片

This commit is contained in:
fangxiang 2022-08-03 20:02:25 +08:00
parent cbbb812212
commit 262b95ebdc
3 changed files with 39 additions and 29 deletions

View File

@ -3,9 +3,12 @@ export interface IScreenInfo {
screen_height: number;
unit_width: number;
unit_height: number;
wall_rows: number;
wall_cols: number;
screen_rows: number;
screen_cols: number;
desktop_col: number;
desktop_row: number;
desktop_width: number;
desktop_height: number;
}
export class SpecialVideoHelper {
@ -22,15 +25,17 @@ export class SpecialVideoHelper {
const unit_height = SpecialVideoHelper.kScreenHeight / desktp_row;
const screen_width = wall_cols * unit_width;
const screen_height = wall_rows * unit_height;
console.log(screen_width);
return {
screen_width,
screen_height,
unit_width,
unit_height,
wall_rows,
wall_cols,
screen_rows: wall_rows,
screen_cols: wall_cols,
desktop_col,
desktop_row: desktop_col,
desktop_width: SpecialVideoHelper.kScreenWidth,
desktop_height: SpecialVideoHelper.kScreenHeight,
};
}
}

View File

@ -392,10 +392,6 @@ export default defineComponent({
label: $t.t("multimedia file"),
value: "EwindowType::Multimedia",
},
{
label: $t.t("Web"),
value: "EwindowType::Web",
},
{
label: $t.t("image"),
value: "EwindowType::Image",
@ -404,6 +400,10 @@ export default defineComponent({
label: $t.t("rtsp"),
value: "EwindowType::Rtsp",
},
{
label: $t.t("Web"),
value: "EwindowType::Web",
},
{
label: $t.t("clock"),
value: "EwindowType::Clock",
@ -417,11 +417,13 @@ export default defineComponent({
const refresh_signal_source_options = () => {
signal_source_options.value = [];
if ($store.state.isLedPlayer()) {
for (const item of build_signal_source_options) {
signal_source_options.value.push(item);
}
if (
($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) ==
($store.state.device_attribute &
Protocol.EDeviceAttribute.CustomISV) ==
0
) {
signal_source_options.value.push({
@ -436,6 +438,10 @@ export default defineComponent({
signal_source_options.value.splice(index, 1);
}
}
} else if ($store.state.isSpecialVideo()) {
signal_source_options.value = [];
signal_source_options.value = build_signal_source_options.slice(0, 2);
}
};
refresh_signal_source_options();

View File

@ -352,9 +352,8 @@ export default defineComponent({
};
if (
window_rect.x + window_rect.width >
$store.state.device_screen_width ||
window_rect.y + window_rect.height > $store.state.device_screen_height
window_rect.x + window_rect.width > screen_width.value ||
window_rect.y + window_rect.height > screen_height.value
) {
$q.dialog({
title: $t.t("Warning"),