| | |
| | | <template> |
| | | <Dialog v-model="dialogVisible" :title="dialogTitle" width="50%"> |
| | | <Dialog v-model="dialogVisible" :title="dialogTitle" width="60%"> |
| | | <el-form |
| | | ref="formRef" |
| | | v-loading="formLoading" |
| | |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <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> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="formData.pointType === 'MEASURE'"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="测量值类型" prop="measurePoint.valueType"> |
| | | <el-select |
| | | v-model="formData.measurePoint.valueType" |
| | | clearable |
| | | placeholder="请选择值类型" |
| | | > |
| | | <el-option |
| | | v-for="dict in getDictOptions(DICT_TYPE.MEASURE_VALUE_TYPE)" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="平滑尺度(min)" prop="measurePoint.dimension"> |
| | | <el-input-number v-model="formData.measurePoint.dimension" style="width: 100%" |
| | | :min="0" :max="100" |
| | | :controls="false"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!--计算点--> |
| | | <el-row :gutter="20" v-if="formData.pointType === 'CALCULATE'"> |
| | | <el-col :span="24"> |
| | |
| | | :data="expressionList" |
| | | border |
| | | style="width: 100%"> |
| | | <!-- <el-table-column |
| | | <el-table-column |
| | | type="index" |
| | | align="center" |
| | | width="50" |
| | | label="序号"/>--> |
| | | width="60" |
| | | label="序号"/> |
| | | <el-table-column |
| | | prop="" |
| | | label="左括号" |
| | |
| | | <el-table-column |
| | | prop="" |
| | | label="测点" |
| | | min-width="160" |
| | | align="center"> |
| | | <template #default="scope"> |
| | | <el-select |
| | |
| | | <el-table-column |
| | | prop="" |
| | | label="运算值" |
| | | min-width="120" |
| | | align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | |
| | | <el-table-column |
| | | prop="" |
| | | label="运算符" |
| | | width="120" |
| | | width="100" |
| | | align="center"> |
| | | <template #default="scope"> |
| | | <el-select v-model="scope.row.operator" clearable> |
| | |
| | | <el-table-column |
| | | prop="" |
| | | label="操作" |
| | | width="140" |
| | | width="120" |
| | | align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | @click="addExpressionRow(scope.$index, expressionList)" |
| | | type="text" |
| | | size="small"> |
| | | size="mini"> |
| | | 添加 |
| | | </el-button> |
| | | <el-button |
| | | @click="deleteExpressionRow(scope.$index, expressionList)" |
| | | type="text" |
| | | size="small"> |
| | | size="mini"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | |
| | | pointNo: '' |
| | | }]) |
| | | const queryParams = reactive({ |
| | | pointType: "MEASURE" |
| | | pointTypes: "MEASURE,CONSTANT", |
| | | }) |
| | | const operatorList = ref(['+', '-', '*', '/', '&', '|', '!', '>', '<']) |
| | | const formData = ref({ |
| | |
| | | pointName: [{required: true, message: '测点名称不能为空', trigger: 'blur'}], |
| | | pointType: [{required: true, message: '测点类型不能为空', trigger: 'blur'}], |
| | | dataType: [{required: true, message: '数据类型不能为空', trigger: 'blur'}], |
| | | minfreqid: [{required: true, message: '采集频率不能为空', trigger: 'blur'}], |
| | | "measurePoint.valueType": [{required: true, message: '采集频率不能为空', trigger: 'blur'}], |
| | | "measurePoint.dimension": [{required: true, message: '采集频率不能为空', trigger: 'blur'}], |
| | | }) |
| | | const formRef = ref() // 表单 Ref |
| | | |
| | |
| | | storeType: undefined, |
| | | unit: undefined, |
| | | unittransfactor: 1, |
| | | defaultValue: 10, |
| | | maxValue: 10000000, |
| | | defaultValue: 0, |
| | | maxValue: 100000000, |
| | | minValue: 0, |
| | | minfreqid: undefined, |
| | | remark: undefined, |
| | | isEnable: 1, |
| | | sourceOption: [], |
| | | mathPoint: {}, |
| | | measurePoint: {}, |
| | | mathPoint: { |
| | | id: '', |
| | | pointId: '', |
| | | expression: '' |
| | | }, |
| | | measurePoint: { |
| | | id: '', |
| | | pointId: '', |
| | | sourceType: '', |
| | | sourceId: '', |
| | | tagNo: '', |
| | | dimension: '1', |
| | | valueType: 'SIMULATE', |
| | | } |
| | | } |
| | | formRef.value?.resetFields() |
| | | } |