parent
4f9359875c
commit
f097afcf1f
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "media_player_client",
|
||||
"version": "1.4.15",
|
||||
"version": "1.4.16",
|
||||
"description": "A Quasar Framework app",
|
||||
"productName": "MediaPlayerClient",
|
||||
"author": "fangxiang <fangxiang@cloudview.work>",
|
||||
|
|
|
@ -574,13 +574,39 @@ export default class RemoteDataExangeProcesser {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case Protocol.Commands.kSetDeviceAttribute:
|
||||
case Protocol.Commands.kSetDeviceAttribute: {
|
||||
const temp = JSON.parse(
|
||||
notify.data
|
||||
) as Protocol.SetDeviceAttributeNotifyEntity;
|
||||
if (temp) {
|
||||
$store.commit("setDeviceAttribute", temp.attribute);
|
||||
}
|
||||
}
|
||||
case Protocol.Commands.kWindowPropertyValueChanged:
|
||||
{
|
||||
const temp = JSON.parse(
|
||||
notify.data
|
||||
) as Protocol.SetDeviceAttributeNotifyEntity;
|
||||
) as Protocol.WindowPropertyValueChangeNotifyEntity;
|
||||
if (temp) {
|
||||
$store.commit("setDeviceAttribute", temp.attribute);
|
||||
const window = $store.state.windows.find(
|
||||
(element) => element && element.window_id == temp.window_id
|
||||
);
|
||||
if (window) {
|
||||
if (temp.name == "polling_uuid") {
|
||||
$store.commit("setWindowProperty", {
|
||||
window,
|
||||
property_name: temp.name,
|
||||
value: temp.value,
|
||||
});
|
||||
} else {
|
||||
console.error(
|
||||
"kWindowPropertyValueChanged: name:" +
|
||||
temp.name +
|
||||
" .not support, value:" +
|
||||
temp.value
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -207,13 +207,31 @@
|
|||
</div>
|
||||
<div v-else-if="props.col.name == 'delay'">
|
||||
{{ props.value }}{{ $t("s") }}
|
||||
<q-popup-edit v-model="props.row.delay">
|
||||
<q-popup-edit
|
||||
v-model="props.row.delay"
|
||||
:validate="
|
||||
(val) => !isNaN(parseInt(val)) && parseInt(val) > 9
|
||||
"
|
||||
auto-save
|
||||
v-slot="scope"
|
||||
>
|
||||
<q-input
|
||||
type="number"
|
||||
v-model="props.row.delay"
|
||||
v-model="scope.value"
|
||||
:min="min_delay"
|
||||
dense
|
||||
autofocus
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val != null &&
|
||||
val != undefined &&
|
||||
val.toString().length > 0) ||
|
||||
$t('Please type something'),
|
||||
(val) =>
|
||||
parseInt(val) >= 10 ||
|
||||
$t('number must be greater than or equal to ') +
|
||||
'10',
|
||||
]"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<span>{{ $t("s") }}</span>
|
||||
|
|
|
@ -139,13 +139,31 @@
|
|||
</div>
|
||||
<div v-else-if="props.col.name == 'delay'">
|
||||
{{ props.value }}{{ $t("s") }}
|
||||
<q-popup-edit v-model="props.row.delay">
|
||||
<q-popup-edit
|
||||
v-model="props.row.delay"
|
||||
:validate="
|
||||
(val) => !isNaN(parseInt(val)) && parseInt(val) > 9
|
||||
"
|
||||
auto-save
|
||||
v-slot="scope"
|
||||
>
|
||||
<q-input
|
||||
v-model="scope.value"
|
||||
type="number"
|
||||
v-model="props.row.delay"
|
||||
:min="min_delay"
|
||||
dense
|
||||
autofocus
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val != null &&
|
||||
val != undefined &&
|
||||
val.toString().length > 0) ||
|
||||
$t('Please type something'),
|
||||
(val) =>
|
||||
parseInt(val) >= 10 ||
|
||||
$t('number must be greater than or equal to ') +
|
||||
'10',
|
||||
]"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<span>{{ $t("s") }}</span>
|
||||
|
|
|
@ -90,6 +90,10 @@ export namespace Protocol {
|
|||
return Commands.PROTOCOL_PREFIX + "WindowOtherStateChanged";
|
||||
}
|
||||
|
||||
public static get kWindowPropertyValueChanged() {
|
||||
return Commands.PROTOCOL_PREFIX + "WindowPropertyValueChanged";
|
||||
}
|
||||
|
||||
public static get kTopWindow() {
|
||||
return Commands.PROTOCOL_PREFIX + "TopWindow";
|
||||
}
|
||||
|
@ -325,7 +329,6 @@ export namespace Protocol {
|
|||
public static get kPollingStateChanged() {
|
||||
return Commands.PROTOCOL_PREFIX + "PollingStateChanged";
|
||||
}
|
||||
|
||||
public static get kDesktopResolutionChangedNotify() {
|
||||
return Commands.PROTOCOL_PREFIX + "DesktopResolutionChangedNotify";
|
||||
}
|
||||
|
@ -459,6 +462,7 @@ export namespace Protocol {
|
|||
Commands.kTopWindow,
|
||||
Commands.kLowerWindow,
|
||||
Commands.kWindowOtherStateChanged,
|
||||
Commands.kWindowPropertyValueChanged,
|
||||
Commands.kRpcAddSignalSourceGroup,
|
||||
Commands.kRpcDeleteSignalSourceGroup,
|
||||
Commands.kRpcEditSignalSourceGroup,
|
||||
|
@ -1995,7 +1999,6 @@ export namespace Protocol {
|
|||
export class SetWindowPollingDataResponseEntity extends Protocol.PacketEntity {
|
||||
success = false;
|
||||
polling = false;
|
||||
new_polling_uuid = "";
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -2064,6 +2067,17 @@ export namespace Protocol {
|
|||
}
|
||||
}
|
||||
|
||||
export class WindowPropertyValueChangeNotifyEntity extends PacketEntity {
|
||||
window_id = 0;
|
||||
name = "";
|
||||
value = "";
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.command = Commands.kWindowPropertyValueChanged;
|
||||
}
|
||||
}
|
||||
|
||||
export class DesktopDisconnectNotifyEntity extends PacketEntity {
|
||||
timestamp: number = 0;
|
||||
|
||||
|
|
|
@ -585,4 +585,5 @@ export default {
|
|||
"load file error": "文件加载错误",
|
||||
"time format error": "时间格式错误",
|
||||
"input new file name": "输入新文件名",
|
||||
"number must be greater than or equal to ": "数字必须大于等于 ",
|
||||
};
|
||||
|
|
|
@ -1055,8 +1055,6 @@ export default defineComponent({
|
|||
const polling = GlobalData.getInstance().pollings.find(
|
||||
(element) => element && element.uuid == window.polling_uuid
|
||||
);
|
||||
console.log(GlobalData.getInstance().pollings);
|
||||
console.log(window.polling_uuid);
|
||||
const signal_source = GlobalData.getInstance().signal_source.find(
|
||||
(element) =>
|
||||
element && element.uuid == window.signal_source_table_uuid
|
||||
|
@ -1072,30 +1070,22 @@ export default defineComponent({
|
|||
const resposne = await GlobalData.getInstance()
|
||||
.getCurrentClient()
|
||||
?.setWindowPollingData(window_id, name, datas);
|
||||
if (resposne) {
|
||||
if (resposne.success) {
|
||||
$store.commit("setWindowProperty", {
|
||||
window,
|
||||
property_name: "polling_uuid",
|
||||
value: resposne.new_polling_uuid,
|
||||
});
|
||||
window.polling_uuid = resposne.new_polling_uuid;
|
||||
$q.notify({
|
||||
color: "positive",
|
||||
icon: "done",
|
||||
message: $t.t("set polling data") + $t.t("success") + "!",
|
||||
position: "top",
|
||||
timeout: 1500,
|
||||
});
|
||||
} else {
|
||||
$q.notify({
|
||||
color: "negative",
|
||||
icon: "warning",
|
||||
message: $t.t("set polling data") + $t.t("failed") + "!",
|
||||
position: "top",
|
||||
timeout: 1500,
|
||||
});
|
||||
}
|
||||
if (resposne && resposne.success) {
|
||||
$q.notify({
|
||||
color: "positive",
|
||||
icon: "done",
|
||||
message: $t.t("set polling data") + $t.t("success") + "!",
|
||||
position: "top",
|
||||
timeout: 1500,
|
||||
});
|
||||
} else {
|
||||
$q.notify({
|
||||
color: "negative",
|
||||
icon: "warning",
|
||||
message: $t.t("set polling data") + $t.t("failed") + "!",
|
||||
position: "top",
|
||||
timeout: 1500,
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
|
Loading…
Reference in New Issue