车间能级提升-智能设备管理系统
zhuguifei
2025-03-04 d4e5744f3df7c90b44a900d1f61f5850b199b47d
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
33
<script setup lang="ts">
import { useVbenDrawer } from '@vben/common-ui';
 
import { getRepairFb } from '#/api/eims/repair-fb';
import { Description, useDescription } from '#/components/description';
import { descSchema } from '#/views/eims/repair-fb/data';
 
const [BasicDrawer, drawerApi] = useVbenDrawer({
  onOpenChange: handleOpenChange
});
 
const [registerDescription, { setDescProps }] = useDescription({
  column: 1,
  schema: descSchema
});
 
async function handleOpenChange(open: boolean) {
  if (!open) {
    return null;
  }
  const { id } = drawerApi.getData() as { id?: number | string };
  if (id) {
    const record = await getRepairFb(id);
    setDescProps({ data: record }, true);
  }
}
</script>
 
<template>
  <BasicDrawer :footer="false" class="w-[600px]" title="评价明细">
    <Description @register="registerDescription" />
  </BasicDrawer>
</template>