| | |
| | | <el-form-item label="是否启用" prop="enabled"> |
| | | <el-select v-model="formData.enabled" placeholder="请选择"> |
| | | <el-option |
| | | v-for="dict in getBoolDictOptions(DICT_TYPE.IS_ENABLED)" |
| | | v-for="dict in getIntDictOptions(DICT_TYPE.COM_IS_INT)" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import * as OpcdaTagApi from '@/api/data/channel/opcda/tag' |
| | | import { CommonEnabledBool } from '@/utils/constants' |
| | | import { DICT_TYPE, getStrDictOptions, getBoolDictOptions } from '@/utils/dict' |
| | | import {CommonEnabled} from '@/utils/constants' |
| | | import { DICT_TYPE, getStrDictOptions, getIntDictOptions } from '@/utils/dict' |
| | | |
| | | defineOptions({name: 'OpcdaTagForm'}) |
| | | |
| | |
| | | serverId: undefined, |
| | | tagName: undefined, |
| | | dataType: undefined, |
| | | enabled: CommonEnabledBool.ENABLE, |
| | | enabled: CommonEnabled.ENABLE, |
| | | itemId: undefined |
| | | }) |
| | | const formRules = reactive({ |
| | |
| | | serverId: undefined, |
| | | tagName: undefined, |
| | | dataType: undefined, |
| | | enabled: CommonEnabledBool.ENABLE, |
| | | enabled: CommonEnabled.ENABLE, |
| | | itemId: undefined |
| | | } |
| | | formRef.value?.resetFields() |