diff --git a/src/components/Audit.vue b/src/components/Audit.vue index d5f8c6f..27fc4a7 100644 --- a/src/components/Audit.vue +++ b/src/components/Audit.vue @@ -6,12 +6,22 @@

操作时间

-
-
Admin
-
修改注射泵速率
-
2023-06-29 13:59
+
+
{{ item?.uid }}
+
{{ item?.behaviorZH }}
+
+ {{ moment(item?.date).format('YYYY-MM-DD HH:mm:ss') }} +

排液

- +
设置

- + { + return { + auditInfoList: [], + } + }, + // actions + actions: { + updateAuditList(auditInfoList) { + this.auditInfoList = auditInfoList + }, + }, +}) diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js index c806edd..5078cf3 100644 --- a/src/store/modules/websocket.js +++ b/src/store/modules/websocket.js @@ -6,6 +6,7 @@ import { useUserStore } from './user' import { useOperatorStore } from './operator' import { useDeviceStore } from './device' import { useTestStore } from './test' +import { useAuditStore } from './audit' import { useEchartsStore } from './echarts' import { showSuccessToast, showFailToast } from 'vant' import { saveEchartsDataToLocal } from '@/utils' @@ -32,6 +33,7 @@ export const useWebSocketStore = defineStore({ const deviceStore = useDeviceStore() const operatorStore = useOperatorStore() const echartsStore = useEchartsStore() + const auditStore = useAuditStore() init.connect() init.ws.onmessage = function (ev) { const { ackcode, messageId, timeStamp } = JSON.parse(ev.data) @@ -171,12 +173,17 @@ export const useWebSocketStore = defineStore({ break case 'stopDisinfection': break - case 'exportUserBehaviorRecordJSON': + case 'exportUserBehaviorRecord': settingStore.updateExportLoading(false) break - case 'exportDisinfectionRecordJSON': + case 'exportDisinfectionRecord': settingStore.updateExportLoading(false) break + case 'getUserBehaviorRecordDescJson': + const { records } = JSON.parse(ev.data) || {} + const { iterms } = records || {} + auditStore.updateAuditList(iterms || []) + break case 'login': if (ackcode == 0) { window.location.href = 'http://127.0.0.1/'