| | |
| | | * @Description: 右侧属性面板控件 表单属性面板 |
| | | --> |
| | | <template> |
| | | <div class="properties-content"> |
| | | <Form class="properties-body" label-align="left" layout="vertical"> |
| | | <!-- <e-upload v-model="fileList"></e-upload>--> |
| | | |
| | | <FormItem label="表单布局"> |
| | | <RadioGroup button-style="solid" v-model:value="formConfig.layout"> |
| | | <RadioButton value="horizontal">水平</RadioButton> |
| | | <RadioButton value="vertical" :disabled="formConfig.labelLayout === 'Grid'"> |
| | | 垂直 |
| | | </RadioButton> |
| | | <RadioButton value="inline" :disabled="formConfig.labelLayout === 'Grid'"> |
| | | 行内 |
| | | </RadioButton> |
| | | </RadioGroup> |
| | | <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> |
| | | |
| | | <!-- <Row> --> |
| | | <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> |
| | | import { Radio, Form, FormItem } from 'ant-design-vue'; |
| | | <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 RadioGroup = Radio.Group; |
| | | const RadioButton = Radio.Button; |
| | | |
| | | const formConfig = ref({ |
| | | colon: true, |
| | | disabled: false, |
| | | hideRequiredMark: true, |
| | | layout: 'horizontal', |
| | | size: 120, |
| | | labelLayout: 'Grid', |
| | | labelWidth: '120', |
| | | labelCol: 24, |
| | | labelAlign: 'Left', |
| | | 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> |