| | |
| | | <!--累计点--> |
| | | <el-row :gutter="20" v-if="formData.pointType === 'CUMULATE'"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="瞬时测点" prop="cumulatePoint.pointNo"> |
| | | <el-form-item label="瞬时测点" prop="cumulatePoint.momentPoint"> |
| | | <el-select |
| | | v-model="formData.cumulatePoint.pointNo" |
| | | v-model="formData.cumulatePoint.momentPoint" |
| | | filterable |
| | | placeholder="请选择"> |
| | | <el-option |
| | | v-for="(item, index) in pointList" |
| | | v-for="(item, index) in pointList2" |
| | | :key="index" |
| | | :label="item.pointName" |
| | | :value="item.pointNo"/> |
| | |
| | | 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 {getPointSimpleList} from "@/api/data/da/point"; |
| | | |
| | | defineOptions({name: 'DataDaPointForm'}) |
| | | |
| | |
| | | }]) |
| | | const queryParams = reactive({ |
| | | pointTypes: "MEASURE,CONSTANT", |
| | | }) |
| | | const pointList2 = ref([{ |
| | | pointName: '', |
| | | pointNo: '' |
| | | }]) |
| | | const queryParams2 = reactive({ |
| | | pointTypes: "MEASURE,CONSTANT,CALCULATE", |
| | | }) |
| | | const operatorList = ref(['+', '-', '*', '/', '&', '|', '!', '>', '<']) |
| | | const formData = ref({ |
| | |
| | | cumulatePoint: { |
| | | id: '', |
| | | pointId: '', |
| | | pointNo: '', |
| | | momentPoint: '', |
| | | length: '', |
| | | divisor: '' |
| | | } |
| | |
| | | minfreqid: [{required: true, message: '采集频率不能为空', trigger: 'blur'}], |
| | | "measurePoint.valueType": [{required: true, message: '值类型不能为空', trigger: 'blur'}], |
| | | "measurePoint.dimension": [{required: true, message: '平滑尺度不能为空', trigger: 'blur'}], |
| | | "cumulatePoint.pointNo": [{required: true, message: '累计测点不能为空', trigger: 'blur'}], |
| | | "cumulatePoint.momentPoint": [{required: true, message: '累计测点不能为空', trigger: 'blur'}], |
| | | "cumulatePoint.length": [{required: true, message: '累计长度不能为空', trigger: 'blur'}], |
| | | "cumulatePoint.divisor": [{required: true, message: '除数不能为空', trigger: 'blur'}], |
| | | }) |
| | |
| | | resetForm() |
| | | getSourceOption() |
| | | getPointList() |
| | | getPointList2() |
| | | // 修改时,设置数据 |
| | | if (id) { |
| | | formLoading.value = true |
| | |
| | | cumulatePoint: { |
| | | id: '', |
| | | pointId: '', |
| | | pointNo: '', |
| | | momentPoint: '', |
| | | length: 60, |
| | | divisor: 60 |
| | | } |
| | |
| | | } |
| | | |
| | | const getPointList = async () => { |
| | | pointList.value = await DaPoint.getPointList(queryParams) |
| | | pointList.value = await DaPoint.getPointSimpleList(queryParams) |
| | | } |
| | | |
| | | const getPointList2 = async () => { |
| | | pointList2.value = await DaPoint.getPointSimpleList(queryParams2) |
| | | } |
| | | |
| | | const getInfo = async (id) => { |