| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="单位转换" prop="unittransfactor"> |
| | | <el-input-number v-model="formData.unittransfactor" style="width: 100%" |
| | | :controls="false"/> |
| | | <el-input-number v-model="formData.unittransfactor" style="width: 100%" :controls="false"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | v-model="formData.sourceOption" |
| | | :options="sourceOptions" |
| | | filterable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="formData.pointType === 'MEASURE'"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="值类型" prop="valueType"> |
| | | <el-select |
| | | v-model="formData.measurePoint.valueType" |
| | | clearable |
| | | placeholder="请选择值类型" |
| | | > |
| | | <el-option |
| | | v-for="dict in getDictOptions(DICT_TYPE.VALUETYPE)" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="平滑尺度" prop="dimension"> |
| | | <el-input-number v-model="formData.measurePoint.dimension" style="width: 100%" :controls="false"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | import * as DaPoint from '@/api/data/da/point' |
| | | import * as TagApi from '@/api/data/channel/tag' |
| | | import {DICT_TYPE, getDictOptions, getIntDictOptions} from "@/utils/dict"; |
| | | import {getTagTree} from "@/api/data/channel/tag"; |
| | | |
| | | defineOptions({name: 'DataDaPointForm'}) |
| | | |
| | |
| | | sourceId: '', |
| | | tagNo: '', |
| | | dimension: '', |
| | | valueType: '', |
| | | } |
| | | }) |
| | | const formRules = reactive({ |
| | |
| | | remark: undefined, |
| | | isEnable: 1, |
| | | sourceOption: [], |
| | | mathPoint: {}, |
| | | measurePoint: {}, |
| | | mathPoint: { |
| | | id: '', |
| | | pointId: '', |
| | | expression: '' |
| | | }, |
| | | measurePoint: { |
| | | id: '', |
| | | pointId: '', |
| | | sourceType: '', |
| | | sourceId: '', |
| | | tagNo: '', |
| | | dimension: '1', |
| | | valueType: 'SIMULATE', |
| | | } |
| | | } |
| | | formRef.value?.resetFields() |
| | | } |