diff --git a/src/App.vue b/src/App.vue index 28251f3..b7c4e1a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -58,14 +58,23 @@ export default defineComponent({ console.log(e); } - { - const user_search = (window).user_search || {}; - if (typeof user_search == "object") { - $store.commit( - "setAvancedDebug", - typeof user_search["debug"] != "undefined" - ); + try { + { + const user_search = (window).user_search || {}; + if (typeof user_search == "object") { + $store.commit( + "setAvancedDebug", + typeof user_search["debug"] != "undefined" + ); + + $store.commit( + "setFactoryMode", + typeof user_search["factory"] != "undefined" + ); + } } + } catch (e) { + console.log(e); } window.onresize = (evt: any) => diff --git a/src/components/AdvancedIpAddressDialog.vue b/src/components/AdvancedIpAddressDialog.vue index f18e3c5..cc5a637 100644 --- a/src/components/AdvancedIpAddressDialog.vue +++ b/src/components/AdvancedIpAddressDialog.vue @@ -127,10 +127,17 @@ - + $store.state.signal_source_tree, set: (val) => {}, diff --git a/src/components/SystenSettingAdvancedNetworkDialog.vue b/src/components/SystenSettingAdvancedNetworkDialog.vue index 96171b6..d18add6 100644 --- a/src/components/SystenSettingAdvancedNetworkDialog.vue +++ b/src/components/SystenSettingAdvancedNetworkDialog.vue @@ -97,6 +97,7 @@
{{ type == 1 ? $t("add") : type == 2 ? $t("edit") : $t("view") - }}{{ $t("timing task") }} + }}{{ $t(" ") }}{{ $t("timing task") }}
diff --git a/src/components/WeatherSignalSourceDialog.vue b/src/components/WeatherSignalSourceDialog.vue index abd625f..3145665 100644 --- a/src/components/WeatherSignalSourceDialog.vue +++ b/src/components/WeatherSignalSourceDialog.vue @@ -192,6 +192,7 @@ - + @@ -249,6 +254,7 @@ import SystemSettingDialog from "src/components/SystemSettingDialog.vue"; import GlobalData from "src/common/GlobalData"; import { Protocol } from "src/entities/WSProtocol"; +import { component } from "v-viewer"; export default defineComponent({ name: "PadTopToolbarPage", @@ -278,17 +284,24 @@ export default defineComponent({ 0 ); + const is_custon_isv = ref( + ($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) != 0 + ); + watch( () => $store.state.device_attribute, (value) => { function_center_control.value = (value & Protocol.EDeviceAttribute.CenterControl) != 0; + is_custon_isv.value = + (value & Protocol.EDeviceAttribute.CustomISV) != 0; } ); return { plan_running, function_center_control, + is_custon_isv, window_rect_edit_dialog, toogleFullScreen() { diff --git a/src/pages/Login.vue b/src/pages/Login.vue index dc6283d..0361d8c 100644 --- a/src/pages/Login.vue +++ b/src/pages/Login.vue @@ -175,6 +175,7 @@ class="full-width text-h6" :loading="data.loading" :label="$t('login')" + no-caps style=" background: #273de4; box-shadow: 0 4px 6px 0px rgb(39 60 228 / 40%); diff --git a/src/pages/TopToolBar.vue b/src/pages/TopToolBar.vue index 3d43573..85c5369 100644 --- a/src/pages/TopToolBar.vue +++ b/src/pages/TopToolBar.vue @@ -300,7 +300,12 @@ {{ $t("upgrade") }} - + @@ -313,6 +318,7 @@ clickable v-close-popup @click="$refs.register_dialog.showDialog()" + v-if="$store.state.factory_mode" > @@ -455,6 +461,10 @@ export default defineComponent({ 0 ); + const is_custon_isv = ref( + ($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) != 0 + ); + const window_rect_edit_dialog: Ref = ref(null); const plan_running = computed( @@ -525,6 +535,8 @@ export default defineComponent({ (value) => { function_center_control.value = (value & Protocol.EDeviceAttribute.CenterControl) != 0; + is_custon_isv.value = + (value & Protocol.EDeviceAttribute.CustomISV) != 0; } ); @@ -534,6 +546,7 @@ export default defineComponent({ edge_blending_dialog, register_dialog, function_center_control, + is_custon_isv, window_rect_edit_dialog, async backupDB() { diff --git a/src/store/index.ts b/src/store/index.ts index 32733c3..b95dfb3 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -36,6 +36,7 @@ export interface StateInterface { // Declared as unknown to avoid linting issue. Best to strongly type as per the line above. initialized: boolean; advanced_debug: boolean; + factory_mode: boolean; signal_source_tree: SignalSourceTreeItemEntity[]; polling_tree: PollingTreeItemEntity[]; mode_tree: ModeTreeItemEntity[]; @@ -285,6 +286,7 @@ export default store(function (/* { ssrContext } */) { // state initialized: false, advanced_debug: false, + factory_mode: false, signal_source_tree: [], polling_tree: [], mode_tree: [], @@ -338,6 +340,13 @@ export default store(function (/* { ssrContext } */) { } state.advanced_debug = playload; }, + setFactoryMode(state: StateInterface, playload?: any) { + if (playload || playload == "true") { + console.log("factory", playload); + state.advanced_debug = playload; + } + state.factory_mode = playload; + }, setArrayValue(state: StateInterface, playload?: any) { if (Array.isArray(playload.value)) { const arr: Array = (state)[playload.name];