feat: debug mode
This commit is contained in:
@@ -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