| | |
| | | import DeviceEvent from '@/views/SignMachineNest/MachineRight/MachineTableDetails/DeviceEvent.vue' |
| | | import DeviceJob from '@/views/SignMachineNest/MachineRight/MachineTableDetails/DeviceJob/DeviceJob.vue' |
| | | import { pxToRem } from '@/utils/rem'; |
| | | import { useStore } from 'vuex' |
| | | |
| | | const isShowDetails = defineModel('show') |
| | | |
| | | const infoList = ref([ |
| | | { name: '机巢名称', value: 'xxx' }, |
| | | { name: '机巢所属地区', value: 'xxx' }, |
| | | { name: '机巢状态', value: 'xxx' }, |
| | | { name: '任务成功', value: 'xxx' }, |
| | | { name: '机巢位置', value: 'xxx' }, |
| | | { name: '机巢名称', value: '',field:'nickname' }, |
| | | { name: '机巢所属地区', value: '',field:'device_area' }, |
| | | { name: '机巢状态', value: '',field:'status' }, |
| | | { name: '任务成功', value: '',field:'result_num' }, |
| | | { name: '机巢位置', value: '',field:'address' }, |
| | | ]) |
| | | |
| | | onMounted(() => {}) |
| | | const store = useStore(); |
| | | // state必须带上.home |
| | | const singleTotal = computed(() => store.state.home.singleTotal); |
| | | watch(singleTotal, (val) => { |
| | | if (val?.device_info){ |
| | | infoList.value.forEach(item => { |
| | | item.value = val.device_info?.[item.field] || '' |
| | | }) |
| | | } |
| | | }) |
| | | onMounted(() => { |
| | | }) |
| | | </script> |
| | | |
| | | <style lang="scss"> |