ソースを参照

temp:添加告警码分析部分代码

jerry 9 ヶ月 前
親
コミット
4adbbb5605

+ 35 - 0
src/assets/data/alarmCode.ts

@@ -0,0 +1,35 @@
+const alarmCode: Record<string,{name:string}> = {
+    '1001': {
+      name: "电网继电器常闭故障"
+    },
+    '1002': {
+      name: "电网继电器常开故障"
+    },
+    '1003': {
+      name: "油机继电器常闭故障"
+    },
+    '1004': {
+      name: "油机继电器常开故障"
+    },
+    '1005': {
+      name: "EPO紧急停机"
+    },
+    '1006': {
+      name: "油机故障"
+    },
+    '1007': {
+      name: "备电故障"
+    },
+    '1008': {
+      name: "FHP总功率故障"
+    },
+    '1009': {
+      name: "DSP与ARM双向通信故障"
+    },
+    '100A': {
+      name: "光伏电表通信故障"
+    },
+    '100B': {
+      name: ""
+    }
+} as const

+ 5 - 0
src/router/record.ts

@@ -340,6 +340,11 @@ export const routeRecordRaw: MergeMenuMixedOptions[] = [
         name: 'codeDiagnosis',
         icon: 'i-ph:pipe-wrench',
         label: '故障诊断',
+        meta: {
+          componentName: 'codeDiagnosis',
+          showTab: true,
+        },
+        component: 'local-utils/code-diagnosis/index',
       },
       {
         path: 'log-357-parser',

+ 3 - 0
src/views/local-utils/code-diagnosis/func/codeAnalysis.ts

@@ -0,0 +1,3 @@
+export function codeAnalysis(codes: string[]) {
+  
+}

+ 33 - 0
src/views/local-utils/code-diagnosis/index.vue

@@ -0,0 +1,33 @@
+<template>
+  <NDynamicTags v-model:value="alarmCodes" :render-tag="renderAlarmCode">
+    <template #input="{ submit, deactivate }">
+      <NAutoComplete :options="computedAlarmCode" size="small" placeholder="告警码"
+        @select="(value) => submit(value)" @blur="deactivate" />
+    </template>
+  </NDynamicTags>
+  <NSteps vertical :current="current as number" :status="currentStatus">
+    <NStep
+      title="I Me Mine"
+      description="All through the day, I me mine I me mine, I me mine"
+    />
+    <NStep
+      title="Let It Be"
+      description="When I find myself in times of trouble Mother Mary comes to me"
+    />
+    <NStep title="Break" />
+    <NStep
+      title="Come Together"
+      description="Here come old flat top He come grooving up slowly"
+    />
+    <NStep
+      title="Something"
+      description="Something in the way she moves Attracts me like no other lover"
+    />
+  </NSteps>
+</template>
+
+<script setup lang="ts">
+import { NDynamicTags, NSteps, NStep } from "naive-ui"
+
+
+</script>