feat: debug mode
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmCameraResultVO } from '@/apis/models';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { useDebugModeStore } from '@/stores/debug-mode';
|
||||
import { destr } from 'destr';
|
||||
import { NCard, NFlex, NTabPane, NTabs } from 'naive-ui';
|
||||
import { computed, ref, toRefs } from 'vue';
|
||||
@@ -14,7 +14,7 @@ const props = defineProps<{
|
||||
ndmCamera: NdmCameraResultVO;
|
||||
}>();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const debugModeStore = useDebugModeStore();
|
||||
|
||||
const { stationCode, ndmCamera } = toRefs(props);
|
||||
|
||||
@@ -76,7 +76,7 @@ const selectedTab = ref('设备状态');
|
||||
<CameraHistoryDiagCard :station-code="stationCode" :ndm-camera="ndmCamera" :key="ndmCamera.id" />
|
||||
</NTabPane>
|
||||
<!-- <NTabPane name="设备配置" tab="设备配置"></NTabPane> -->
|
||||
<NTabPane v-if="userStore.isSuperAdmin" name="原始数据" tab="原始数据">
|
||||
<NTabPane v-if="debugModeStore.debugEnabled" name="原始数据" tab="原始数据">
|
||||
<pre class="raw-data">{{ { ...ndmCamera, lastDiagInfo } }}</pre>
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmDecoderDiagInfo } from '@/apis/domains';
|
||||
import type { NdmDecoderResultVO } from '@/apis/models';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { useDebugModeStore } from '@/stores/debug-mode';
|
||||
import { destr } from 'destr';
|
||||
import { NCard, NFlex, NTabPane, NTabs } from 'naive-ui';
|
||||
import { computed, ref, toRefs } from 'vue';
|
||||
@@ -16,7 +16,7 @@ const props = defineProps<{
|
||||
ndmDecoder: NdmDecoderResultVO;
|
||||
}>();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const debugModeStore = useDebugModeStore();
|
||||
|
||||
const { stationCode, ndmDecoder } = toRefs(props);
|
||||
|
||||
@@ -58,7 +58,7 @@ const selectedTab = ref('设备状态');
|
||||
<DecoderHistoryDiagCard :station-code="stationCode" :ndm-decoder="ndmDecoder" :key="ndmDecoder.id" />
|
||||
</NTabPane>
|
||||
<!-- <NTabPane name="设备配置" tab="设备配置"></NTabPane> -->
|
||||
<NTabPane v-if="userStore.isSuperAdmin" name="原始数据" tab="原始数据">
|
||||
<NTabPane v-if="debugModeStore.debugEnabled" name="原始数据" tab="原始数据">
|
||||
<pre class="raw-data">{{ { ...ndmDecoder, lastDiagInfo } }}</pre>
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmKeyboardResultVO } from '@/apis/models';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { useDebugModeStore } from '@/stores/debug-mode';
|
||||
import { NCard, NFlex, NTabPane, NTabs } from 'naive-ui';
|
||||
import { ref, toRefs } from 'vue';
|
||||
|
||||
@@ -12,7 +12,7 @@ const props = defineProps<{
|
||||
ndmKeyboard: NdmKeyboardResultVO;
|
||||
}>();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const debugModeStore = useDebugModeStore();
|
||||
|
||||
const { stationCode, ndmKeyboard } = toRefs(props);
|
||||
|
||||
@@ -32,7 +32,7 @@ const selectedTab = ref('设备状态');
|
||||
<KeyboardHistoryDiagCard :station-code="stationCode" :ndm-keyboard="ndmKeyboard" :key="ndmKeyboard.id" />
|
||||
</NTabPane>
|
||||
<!-- <NTabPane name="设备配置" tab="设备配置"></NTabPane> -->
|
||||
<NTabPane v-if="userStore.isSuperAdmin" name="原始数据" tab="原始数据">
|
||||
<NTabPane v-if="debugModeStore.debugEnabled" name="原始数据" tab="原始数据">
|
||||
<pre class="raw-data">{{ { ...ndmKeyboard } }}</pre>
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmNvrDiagInfo } from '@/apis/domains';
|
||||
import type { NdmNvrResultVO } from '@/apis/models';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { useDebugModeStore } from '@/stores/debug-mode';
|
||||
import { destr } from 'destr';
|
||||
import { NCard, NFlex, NTabPane, NTabs } from 'naive-ui';
|
||||
import { computed, ref, toRefs } from 'vue';
|
||||
@@ -18,7 +18,7 @@ const props = defineProps<{
|
||||
ndmNvr: NdmNvrResultVO;
|
||||
}>();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const debugModeStore = useDebugModeStore();
|
||||
|
||||
const { stationCode, ndmNvr } = toRefs(props);
|
||||
|
||||
@@ -73,7 +73,7 @@ const selectedTab = ref('设备状态');
|
||||
<NvrHistoryDiagCard :station-code="stationCode" :ndm-nvr="ndmNvr" :key="ndmNvr.id" />
|
||||
</NTabPane>
|
||||
<!-- <NTabPane name="设备配置" tab="设备配置"></NTabPane> -->
|
||||
<NTabPane v-if="userStore.isSuperAdmin" name="原始数据" tab="原始数据">
|
||||
<NTabPane v-if="debugModeStore.debugEnabled" name="原始数据" tab="原始数据">
|
||||
<pre class="raw-data">{{ { ...ndmNvr, lastDiagInfo } }}</pre>
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmSecurityBoxDiagInfo } from '@/apis/domains';
|
||||
import type { NdmSecurityBoxResultVO } from '@/apis/models';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { useDebugModeStore } from '@/stores/debug-mode';
|
||||
import { destr } from 'destr';
|
||||
import { NCard, NFlex, NTabPane, NTabs } from 'naive-ui';
|
||||
import { computed, ref, toRefs } from 'vue';
|
||||
@@ -18,7 +18,7 @@ const props = defineProps<{
|
||||
ndmSecurityBox: NdmSecurityBoxResultVO;
|
||||
}>();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const debugModeStore = useDebugModeStore();
|
||||
|
||||
const { stationCode, ndmSecurityBox } = toRefs(props);
|
||||
|
||||
@@ -69,7 +69,7 @@ const selectedTab = ref('设备状态');
|
||||
<SecurityBoxHistoryDiagCard :station-code="stationCode" :ndm-security-box="ndmSecurityBox" :key="ndmSecurityBox.id" />
|
||||
</NTabPane>
|
||||
<!-- <NTabPane name="设备配置" tab="设备配置"></NTabPane> -->
|
||||
<NTabPane v-if="userStore.isSuperAdmin" name="原始数据" tab="原始数据">
|
||||
<NTabPane v-if="debugModeStore.debugEnabled" name="原始数据" tab="原始数据">
|
||||
<pre class="raw-data">{{ { ...ndmSecurityBox, lastDiagInfo } }}</pre>
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmServerDiagInfo } from '@/apis/domains';
|
||||
import type { NdmServerResultVO } from '@/apis/models';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { useDebugModeStore } from '@/stores/debug-mode';
|
||||
import { destr } from 'destr';
|
||||
import { NCard, NFlex, NTabPane, NTabs } from 'naive-ui';
|
||||
import { computed, ref, toRefs } from 'vue';
|
||||
@@ -15,7 +15,7 @@ const props = defineProps<{
|
||||
ndmServer: NdmServerResultVO;
|
||||
}>();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const debugModeStore = useDebugModeStore();
|
||||
|
||||
const { stationCode, ndmServer } = toRefs(props);
|
||||
|
||||
@@ -48,7 +48,7 @@ const selectedTab = ref('设备状态');
|
||||
<ServerHistoryDiagCard :station-code="stationCode" :ndm-server="ndmServer" :key="ndmServer.id" />
|
||||
</NTabPane>
|
||||
<!-- <NTabPane name="设备配置" tab="设备配置"></NTabPane> -->
|
||||
<NTabPane v-if="userStore.isSuperAdmin" name="原始数据" tab="原始数据">
|
||||
<NTabPane v-if="debugModeStore.debugEnabled" name="原始数据" tab="原始数据">
|
||||
<pre class="raw-data">{{ { ...ndmServer, lastDiagInfo } }}</pre>
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmSwitchDiagInfo } from '@/apis/domains';
|
||||
import type { NdmSwitchResultVO } from '@/apis/models';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { useDebugModeStore } from '@/stores/debug-mode';
|
||||
import { destr } from 'destr';
|
||||
import { NCard, NFlex, NTabPane, NTabs } from 'naive-ui';
|
||||
import { computed, ref, toRefs } from 'vue';
|
||||
@@ -16,7 +16,7 @@ const props = defineProps<{
|
||||
ndmSwitch: NdmSwitchResultVO;
|
||||
}>();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const debugModeStore = useDebugModeStore();
|
||||
|
||||
const { stationCode, ndmSwitch } = toRefs(props);
|
||||
|
||||
@@ -50,7 +50,7 @@ const selectedTab = ref('设备状态');
|
||||
<SwitchHistoryDiagCard :station-code="stationCode" :ndm-switch="ndmSwitch" :key="ndmSwitch.id" />
|
||||
</NTabPane>
|
||||
<!-- <NTabPane name="设备配置" tab="设备配置"></NTabPane> -->
|
||||
<NTabPane v-if="userStore.isSuperAdmin" name="原始数据" tab="原始数据">
|
||||
<NTabPane v-if="debugModeStore.debugEnabled" name="原始数据" tab="原始数据">
|
||||
<pre class="raw-data">{{ { ...ndmSwitch, lastDiagInfo } }}</pre>
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
|
||||
Reference in New Issue
Block a user