车间能级提升-智能设备管理系统
朱桂飞
2025-01-15 d5dff36d38fc7a211b34916796bbc37f17e7a2d0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<script setup lang="ts">
import type { Recordable } from '@vben/types';
 
import { useVbenDrawer } from '@vben/common-ui';
 
import { Description, useDescription } from '#/components/description';
 
import { descSchema } from './data';
 
const [BasicDrawer, drawerApi] = useVbenDrawer({
  onOpenChange: handleOpenChange,
});
 
const [registerDescription, { setDescProps }] = useDescription({
  column: 1,
  schema: descSchema,
});
 
function handleOpenChange(open: boolean) {
  if (!open) {
    return null;
  }
  const { record } = drawerApi.getData() as { record: Recordable<any> };
  setDescProps({ data: record }, true);
}
</script>
 
<template>
  <BasicDrawer :footer="false" class="w-[600px]" title="试产记录明细">
    <Description @register="registerDescription" />
  </BasicDrawer>
</template>