From 0ccd9ca4b3a0ac1474c8cb9445d8b669654c7a81 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 28 十月 2024 17:37:59 +0800
Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat-ui-vue3

---
 src/views/data/point/DaPointForm.vue |   56 +++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 45 insertions(+), 11 deletions(-)

diff --git a/src/views/data/point/DaPointForm.vue b/src/views/data/point/DaPointForm.vue
index e467d76..85758ec 100644
--- a/src/views/data/point/DaPointForm.vue
+++ b/src/views/data/point/DaPointForm.vue
@@ -10,7 +10,7 @@
       <el-row>
         <el-col :span="12">
           <el-form-item label="测点编码" prop="pointNo">
-            <el-input v-model="formData.pointNo" placeholder="请输入测点编码" disabled/>
+            <el-input v-model="formData.pointNo" disabled/>
           </el-form-item>
         </el-col>
         <el-col :span="12">
@@ -28,7 +28,7 @@
               placeholder="请选择测点类型"
             >
               <el-option
-                v-for="dict in getDictOptions(DICT_TYPE.POINT_TYPE)"
+                v-for="dict in getDictOptions(DICT_TYPE.DATA_POINT_TYPE)"
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
@@ -44,7 +44,7 @@
               placeholder="请选择数据类型"
             >
               <el-option
-                v-for="dict in getDictOptions(DICT_TYPE.DATA_TYPE)"
+                v-for="dict in getDictOptions(DICT_TYPE.POINT_DATA_TYPE)"
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
@@ -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>
@@ -110,7 +109,7 @@
               placeholder="请选择是否启用"
             >
               <el-option
-                v-for="dict in getIntDictOptions(DICT_TYPE.IS_ENABLED)"
+                v-for="dict in getIntDictOptions(DICT_TYPE.COM_IS_INT)"
                 :key="dict.value"
                 :label="dict.label"
                 :value="dict.value"
@@ -126,13 +125,36 @@
       </el-row>
       <!--计量点-->
       <el-row v-if="formData.pointType === 'MEASURE'">
-        <el-col :span="12">
+        <el-col :span="24">
           <el-form-item prop="sourceOption" label="数据源">
             <el-cascader
               style="width: 100%;"
               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({
@@ -417,14 +439,26 @@
     unit: undefined,
     unittransfactor: 1,
     defaultValue: 10,
-    maxValue: 1000000,
+    maxValue: 10000000,
     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()
 }

--
Gitblit v1.9.3