Ben Lin
2024-08-01 efcc2e97beb8c3b05f422fe7efafa059447473de
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!--
 * @Description: 右侧属性面板控件 表单属性面板
-->
<template>
  <div>
    <Form label-align="left" layout="vertical">
      <FormItem label="工艺路线编码" name="工艺路线编码">
        <Input
          :style="{ width: '100%' }"
          v-model:value="mesRoute.ROT_CODE"
          :min="0"
          :step="1"
          :readonly="true"
        />
      </FormItem>
      <FormItem label="工艺路线名称" name="工艺路线名称">
        <Input
          :style="{ width: '100%' }"
          v-model:value="mesRoute.ROT_NAME"
          :min="0"
          :step="1"
          :readonly="true"
        />
      </FormItem>
      <FormItem label="工艺路线类型" name="工艺路线类型">
        <Select
          ref="select"
          v-model:value="mesRoute.ROT_TYPE"
          style="width: 120px"
          :options="options2"
          :readonly="true"
        />
      </FormItem>
      <FormItem label="工艺路线版本" name="工艺路线版本">
        <InputNumber
          :style="{ width: '100%' }"
          v-model:value="mesRoute.ROT_VER"
          :min="0"
          :step="1"
          :readonly="true"
        />
      </FormItem>
      <FormItem label="是否启用" name="是否启用">
        <Select
          ref="select"
          v-model:value="mesRoute.IS_ACTIVE"
          style="width: 120px"
          :options="options1"
          :readonly="true"
        />
      </FormItem>
    </Form>
  </div>
</template>
<script lang="ts" setup name="FormProps">
  import { Select, Input, InputNumber, Form, FormItem } from 'ant-design-vue';
  import { useRouteDesignState } from '../hooks/useRouteDesignState';
  import { ref } from 'vue';
  import { GetEnum } from '/@/api/tigerapi/system';
 
  const { mesRoute } = useRouteDesignState();
  const options1 = ref<any>([
    {
      value: 'Y',
      label: '启用',
    },
    {
      value: 'N',
      label: '不启用',
    },
  ]);
  const options2 = ref<any>([]);
  GetEnum({ name: 'MES_ROUTE+ROT_TYPEs' }).then((res) => {
    console.log(res);
    res.Data.forEach((d) => {
      options2.value.push({
        value: d.Value,
        label: d.Desc,
      });
    });
  });
</script>