增加轮询窗口任意开窗
This commit is contained in:
parent
36c1b0b4a3
commit
07a0e5fe92
|
@ -131,7 +131,10 @@
|
|||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-input
|
||||
:disable="clock_entity.type == 2"
|
||||
:disable="
|
||||
clock_entity.type == 2 ||
|
||||
clock_entity.background_transparent
|
||||
"
|
||||
v-model="clock_entity.background_color"
|
||||
:rules="['anyColor']"
|
||||
>
|
||||
|
|
|
@ -16,6 +16,20 @@
|
|||
(evt) =>
|
||||
false && !prop.node.is_group && runPlan(prop.node.item_data)
|
||||
"
|
||||
@click="
|
||||
$store.commit(
|
||||
'setSelectedPolling',
|
||||
prop.node.is_group
|
||||
? $store.state.selected_polling
|
||||
: prop.node.uuid
|
||||
)
|
||||
"
|
||||
:style="{
|
||||
border:
|
||||
$store.state.selected_polling == prop.node.uuid
|
||||
? '1px solid #aacceec2'
|
||||
: 'none',
|
||||
}"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { defineComponent, ref, watch } from "vue";
|
||||
import { useStore } from "src/store";
|
||||
import SignalSourceTree from "src/components/SignalSourceTree.vue";
|
||||
import PollingTree from "src/components/PollingTree.vue";
|
||||
|
||||
|
@ -38,8 +39,19 @@ export default defineComponent({
|
|||
components: { SignalSourceTree, PollingTree },
|
||||
|
||||
setup() {
|
||||
const $store = useStore();
|
||||
|
||||
const tab_value = ref("signal_source");
|
||||
|
||||
$store.commit("setCurrentLeftTab", tab_value.value);
|
||||
|
||||
watch(
|
||||
() => tab_value.value,
|
||||
(n, o) => {
|
||||
$store.commit("setCurrentLeftTab", n);
|
||||
}
|
||||
);
|
||||
|
||||
return { tab_value };
|
||||
},
|
||||
});
|
||||
|
|
|
@ -186,7 +186,7 @@ import Window from "src/components/Window.vue";
|
|||
import WindowRectEditDialog from "src/components/WindowRectEditDialog.vue";
|
||||
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useStore } from "src/store";
|
||||
import { NullSignalSource, useStore } from "src/store";
|
||||
import EventBus, { EventNamesDefine } from "src/common/EventBus";
|
||||
import { WindowOpenNotifyEntity } from "src/entities/MultimediaWindowEntity";
|
||||
import WindowOtherStateChangeNotifyEntity from "src/entities/WindowOtherStateChangeNotifyEntity";
|
||||
|
@ -363,17 +363,35 @@ export default defineComponent({
|
|||
area_open_window_rect.value.start_y
|
||||
);
|
||||
|
||||
GlobalData.getInstance()
|
||||
.getCurrentClient()
|
||||
?.openWindow(
|
||||
new Protocol.OpenWindowRequestEntity(
|
||||
$store.state.selected_signal_source,
|
||||
start_x / wall.value.offsetWidth,
|
||||
start_y / wall.value.offsetHeight,
|
||||
end_x / wall.value.offsetWidth,
|
||||
end_y / wall.value.offsetHeight
|
||||
)
|
||||
);
|
||||
if ($store.state.current_left_tab == "signal_source") {
|
||||
if ($store.state.selected_signal_source != NullSignalSource) {
|
||||
GlobalData.getInstance()
|
||||
.getCurrentClient()
|
||||
?.openWindow(
|
||||
new Protocol.OpenWindowRequestEntity(
|
||||
$store.state.selected_signal_source,
|
||||
start_x / wall.value.offsetWidth,
|
||||
start_y / wall.value.offsetHeight,
|
||||
end_x / wall.value.offsetWidth,
|
||||
end_y / wall.value.offsetHeight
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if ($store.state.selected_polling != NullSignalSource) {
|
||||
GlobalData.getInstance()
|
||||
.getCurrentClient()
|
||||
?.openPolling(
|
||||
new Protocol.OpenPollingRequestEntity(
|
||||
$store.state.selected_polling,
|
||||
start_x / wall.value.offsetWidth,
|
||||
start_y / wall.value.offsetHeight,
|
||||
end_x / wall.value.offsetWidth,
|
||||
end_y / wall.value.offsetHeight
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
area_open_window_flag.value = false;
|
||||
|
|
|
@ -53,7 +53,9 @@ export interface StateInterface {
|
|||
power_on_plan: string;
|
||||
fan_temp: number;
|
||||
selected_window: string;
|
||||
current_left_tab: string;
|
||||
selected_signal_source: string;
|
||||
selected_polling: string;
|
||||
current_running_plan: string;
|
||||
connect_list: ConnectTableEntity[];
|
||||
|
||||
|
@ -279,7 +281,7 @@ export const storeKey: InjectionKey<VuexStore<StateInterface>> =
|
|||
Symbol("vuex-key");
|
||||
|
||||
import window_color_list from "./window_color_list.js";
|
||||
const NullSignalSource =
|
||||
export const NullSignalSource =
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
|
||||
|
||||
export default store(function (/* { ssrContext } */) {
|
||||
|
@ -308,8 +310,9 @@ export default store(function (/* { ssrContext } */) {
|
|||
power_on_plan: "",
|
||||
fan_temp: 0,
|
||||
selected_window: "",
|
||||
selected_signal_source:
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
|
||||
current_left_tab: "signal_source",
|
||||
selected_signal_source: NullSignalSource,
|
||||
selected_polling: NullSignalSource,
|
||||
current_running_plan: "",
|
||||
connect_list: [],
|
||||
modes: [],
|
||||
|
@ -422,9 +425,12 @@ export default store(function (/* { ssrContext } */) {
|
|||
},
|
||||
pushWindow(state: StateInterface, playload?: WindowOpenNotifyEntity) {
|
||||
if (playload) {
|
||||
if (state.windows.find((e) => e && e.uuid == playload.uuid)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
playload.client_color = window_color_list.splice(
|
||||
Math.round(Math.random() * window_color_list.length),
|
||||
Math.round(Math.random() * window_color_list.length - 1),
|
||||
1
|
||||
)[0];
|
||||
} catch {}
|
||||
|
@ -896,6 +902,11 @@ export default store(function (/* { ssrContext } */) {
|
|||
setSelectedWindow(state: StateInterface, playload?: any) {
|
||||
state.selected_window = playload;
|
||||
},
|
||||
setCurrentLeftTab(state: StateInterface, playload?: any) {
|
||||
if (typeof playload == "string") {
|
||||
state.current_left_tab = playload;
|
||||
}
|
||||
},
|
||||
setSelectedSignalSource(state: StateInterface, playload?: any) {
|
||||
if (state.selected_signal_source == playload) {
|
||||
state.selected_signal_source = NullSignalSource;
|
||||
|
@ -903,6 +914,13 @@ export default store(function (/* { ssrContext } */) {
|
|||
state.selected_signal_source = playload;
|
||||
}
|
||||
},
|
||||
setSelectedPolling(state: StateInterface, playload?: any) {
|
||||
if (state.selected_polling == playload) {
|
||||
state.selected_polling = NullSignalSource;
|
||||
} else {
|
||||
state.selected_polling = playload;
|
||||
}
|
||||
},
|
||||
setCurrentRunningPlan(state: StateInterface, playload?: any) {
|
||||
state.current_running_plan = playload;
|
||||
},
|
||||
|
|
|
@ -63,4 +63,68 @@ export default [
|
|||
"#1E603FAF",
|
||||
"#3EF529AF",
|
||||
"#CB7177AF",
|
||||
"#C21817AF",
|
||||
"#72D345AF",
|
||||
"#1EA033AF",
|
||||
"#6382F3AF",
|
||||
"#735F83AF",
|
||||
"#2AAF9BAF",
|
||||
"#E4491EAF",
|
||||
"#D769D9AF",
|
||||
"#BDADE3AF",
|
||||
"#24DE81AF",
|
||||
"#DA454EAF",
|
||||
"#4CED56AF",
|
||||
"#91688DAF",
|
||||
"#BBF360AF",
|
||||
"#08BB79AF",
|
||||
"#6F3E0BAF",
|
||||
"#26BCBDAF",
|
||||
"#ECA437AF",
|
||||
"#94BE23AF",
|
||||
"#FED7C7AF",
|
||||
"#E2BF1CAF",
|
||||
"#FDF2F1AF",
|
||||
"#4C6CDBAF",
|
||||
"#5E8B3CAF",
|
||||
"#E09A78AF",
|
||||
"#3FCD0EAF",
|
||||
"#99C6BBAF",
|
||||
"#D80921AF",
|
||||
"#27072DAF",
|
||||
"#213531AF",
|
||||
"#7B01C9AF",
|
||||
"#304AE5AF",
|
||||
"#5CA05BAF",
|
||||
"#F012B3AF",
|
||||
"#BF7E0AAF",
|
||||
"#FE4DB2AF",
|
||||
"#B9416DAF",
|
||||
"#2C015FAF",
|
||||
"#01FD9BAF",
|
||||
"#EB5CAEAF",
|
||||
"#DA47BEAF",
|
||||
"#DBEE46AF",
|
||||
"#FBA68AAF",
|
||||
"#58358DAF",
|
||||
"#461298AF",
|
||||
"#764860AF",
|
||||
"#659F87AF",
|
||||
"#3821AFAF",
|
||||
"#8CACF9AF",
|
||||
"#65E6B3AF",
|
||||
"#78EE52AF",
|
||||
"#4E5D30AF",
|
||||
"#885361AF",
|
||||
"#5CB17CAF",
|
||||
"#5856C3AF",
|
||||
"#C17EF9AF",
|
||||
"#48921DAF",
|
||||
"#543987AF",
|
||||
"#4A3CFDAF",
|
||||
"#294DE2AF",
|
||||
"#A9A494AF",
|
||||
"#1E603FAF",
|
||||
"#3EF529AF",
|
||||
"#CB7177AF",
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue