From d916dfba2efa2d9359f5b432350a15e5ed1a0af4 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期五, 18 十月 2024 13:58:31 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/data/point/index.vue | 9 +++- src/utils/dict.ts | 1 src/views/data/ind/item/DerIndDefineForm.vue | 5 +- src/views/data/ind/item/AtomIndDefineForm.vue | 4 +- src/views/data/point/DaPointForm.vue | 44 +++++++++++++++++++-- 5 files changed, 52 insertions(+), 11 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index eef6249..dab3868 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -256,4 +256,5 @@ COM_IS_INT = 'com_is_int', DATA_POINT_TYPE = 'data_point_type', MINFREQID = 'minfreqid', + VALUETYPE = 'value_type', } diff --git a/src/views/data/ind/item/AtomIndDefineForm.vue b/src/views/data/ind/item/AtomIndDefineForm.vue index 2d25139..00ab2f5 100644 --- a/src/views/data/ind/item/AtomIndDefineForm.vue +++ b/src/views/data/ind/item/AtomIndDefineForm.vue @@ -80,14 +80,14 @@ v-for="item in dataSetFieldList" :key="item.id" :label="item.fieldCode" - :value="item.id + ''" + :value="item.fieldCode" /> </el-select> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="统计方式" prop="statFunc"> - <el-select v-model="formData.atomItem.statFunc" placeholder="请选择"> + <el-select v-model="formData.atomItem.statFunc" clearable placeholder="请选择"> <el-option v-for="dict in getStrDictOptions(DICT_TYPE.DATA_STAT_FUNC)" :key="dict.value" diff --git a/src/views/data/ind/item/DerIndDefineForm.vue b/src/views/data/ind/item/DerIndDefineForm.vue index f5b4235..3822e86 100644 --- a/src/views/data/ind/item/DerIndDefineForm.vue +++ b/src/views/data/ind/item/DerIndDefineForm.vue @@ -88,7 +88,7 @@ v-for="item in dataSetFieldList" :key="item.id" :label="item.fieldCode" - :value="item.id + ''" + :value="item.fieldCode" /> </el-select> </el-form-item> @@ -135,7 +135,7 @@ v-for="item in dataSetFieldList" :key="item.id" :label="item.fieldCode" - :value="item.id + ''" + :value="item.fieldCode" /> </el-select> </el-form-item> @@ -243,6 +243,7 @@ }else { formData.value.derItem.dimension = "" } + showTimeChange.value = formData.value.derItem.timeLimit === 'CUSTOM' await handleChange(formData.value.derItem.atomItemId) } finally { formLoading.value = false diff --git a/src/views/data/point/DaPointForm.vue b/src/views/data/point/DaPointForm.vue index 883361d..85758ec 100644 --- a/src/views/data/point/DaPointForm.vue +++ b/src/views/data/point/DaPointForm.vue @@ -61,8 +61,7 @@ </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> @@ -133,6 +132,29 @@ 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> @@ -268,7 +290,6 @@ 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'}) @@ -317,6 +338,7 @@ sourceId: '', tagNo: '', dimension: '', + valueType: '', } }) const formRules = reactive({ @@ -423,8 +445,20 @@ remark: undefined, isEnable: 1, sourceOption: [], - mathPoint: {}, - measurePoint: {}, + mathPoint: { + id: '', + pointId: '', + expression: '' + }, + measurePoint: { + id: '', + pointId: '', + sourceType: '', + sourceId: '', + tagNo: '', + dimension: '1', + valueType: 'SIMULATE', + } } formRef.value?.resetFields() } diff --git a/src/views/data/point/index.vue b/src/views/data/point/index.vue index 5934665..a7e20cf 100644 --- a/src/views/data/point/index.vue +++ b/src/views/data/point/index.vue @@ -60,7 +60,7 @@ <!-- 列表 --> <ContentWrap> <el-table border stripe v-loading="loading" :data="list"> - <el-table-column fixed label="测点编码" header-align="center" align="left" min-width="100" prop="pointNo" /> + <el-table-column fixed label="测点编码" header-align="center" align="left" min-width="110" prop="pointNo" /> <el-table-column label="测点名称" header-align="center" align="left" min-width="200" prop="pointName" /> <el-table-column label="测点类型" align="center" prop="pointType" width="100"> <template #default="scope"> @@ -70,6 +70,11 @@ <el-table-column label="数据类型" align="center" prop="dataType" width="100"> <template #default="scope"> <dict-tag :type="DICT_TYPE.POINT_DATA_TYPE" :value="scope.row.dataType" /> + </template> + </el-table-column> + <el-table-column label="值类型" align="center" prop="valueType" width="120"> + <template #default="scope"> + <dict-tag :type="DICT_TYPE.VALUETYPE" :value="scope.row.valueType" /> </template> </el-table-column> <el-table-column label="测量单位" align="center" prop="unit" width="100"/> @@ -123,7 +128,7 @@ <script lang="ts" setup> import DaPointForm from './DaPointForm.vue' import * as DaPoint from '@/api/data/da/point' -import {DICT_TYPE, getDictOptions} from "@/utils/dict"; +import {DICT_TYPE} from "@/utils/dict"; defineOptions({name: 'DataPoint'}) -- Gitblit v1.9.3