From bcb8d1e446e0292bf551073ed66c76997b9bdb18 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期五, 03 十一月 2023 15:10:11 +0800 Subject: [PATCH] feat: 对接物料数据 --- src/views/dashboard/components/DeviceNumberInfo.vue | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/views/dashboard/components/DeviceNumberInfo.vue b/src/views/dashboard/components/DeviceNumberInfo.vue index 989f9f2..82086ed 100644 --- a/src/views/dashboard/components/DeviceNumberInfo.vue +++ b/src/views/dashboard/components/DeviceNumberInfo.vue @@ -4,31 +4,26 @@ <div class="device-t">鏈満璁惧缂栫爜</div> <div class="device-b"> <div class="device-info"> - {{ deviceCurrent }} + {{ deviceInfo?.systemDeviceID }} </div> </div> </div> <div class="device-r"> <div class="device-t">浜戠璁惧缂栫爜</div> <div class="device-b"> - <div v-for="(item, index) in deviceList" :key="index" class="device-info"> - {{ item.value }} + <div v-for="(item, index) in deviceInfo?.deviceIDList" :key="index" class="device-info"> + {{ item }} </div> </div> </div> </div> </template> <script setup lang="ts"> -import { toRefs } from 'vue' -const deviceList = [ - { - value: '123454' - }, - { - value: '54321' - } -] -const deviceCurrent = '456789' +import { useDevicesStore } from '@/stores/devices' +import { storeToRefs } from 'pinia' + +const deviceStore = useDevicesStore() +const { deviceInfo } = storeToRefs(deviceStore) </script> <style scoped lang="scss"> -- Gitblit v1.8.0