| | |
| | | <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" |
| | |
| | | import * as ModBusTagApi from '@/api/data/channel/modbus/tag' |
| | | import { CommonEnabled } from '@/utils/constants' |
| | | import {isPositiveInteger} from '@/utils/validate' |
| | | import { DICT_TYPE, getStrDictOptions, getBoolDictOptions } from '@/utils/dict' |
| | | import { DICT_TYPE, getStrDictOptions, getIntDictOptions } from '@/utils/dict' |
| | | |
| | | defineOptions({name: 'ModBusTagForm'}) |
| | | |
| | |
| | | dataType: undefined, |
| | | enabled: CommonEnabled.ENABLE, |
| | | format: undefined, |
| | | device: '1', |
| | | device: '', |
| | | address: '', |
| | | samplingRate: undefined, |
| | | tagDesc: '', |
| | |
| | | formLoading.value = true |
| | | try { |
| | | formData.value = await ModBusTagApi.getModBusTag(id) |
| | | formData.device = device |
| | | } finally { |
| | | formLoading.value = false |
| | | } |