From 3e5f6c444a32a66a6111aacd3a4c5212c32bdf9e Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期三, 05 二月 2025 16:38:40 +0800
Subject: [PATCH] 测点当前值查询功能

---
 src/views/data/point/index.vue |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/views/data/point/index.vue b/src/views/data/point/index.vue
index fcb360d..1adf9d0 100644
--- a/src/views/data/point/index.vue
+++ b/src/views/data/point/index.vue
@@ -160,7 +160,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="操作" align="center" min-width="130" fixed="right" width="120">
+      <el-table-column label="操作"  align="center" min-width="130" fixed="right" width="140">
         <template #default="scope">
           <el-button
             link
@@ -171,7 +171,7 @@
           >
             编辑
           </el-button>
-          <el-button link size="mini" type="primary" @click="chartHandle(scope.row)">数据</el-button>
+          <el-button link size="mini" type="primary" @click="chartHandle(scope.row)">历史值</el-button>
           <el-button
             link
             size="mini"
@@ -181,6 +181,7 @@
           >
             删除
           </el-button>
+          <el-button link size="mini" type="primary" @click="pointValueHandle(scope.row)">当前值</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -196,9 +197,13 @@
   <!-- 表单弹窗:添加/修改 -->
   <DaPointForm ref="formRef" @success="getList" />
 
+  <!-- 历史值 -->
   <DaPointChart ref="chartView" />
 
-  <!-- 用户导入对话框 -->
+  <!-- 当前值 -->
+  <DaPointValue ref="pointValue" />
+
+  <!-- 测点导入对话框 -->
   <PointImportForm ref="importFormRef" @success="getList" />
 </template>
 <script lang="ts" setup>
@@ -208,7 +213,7 @@
 import {DICT_TYPE, getDictOptions, getIntDictOptions, getStrDictOptions} from "@/utils/dict";
 import DaPointForm from './DaPointForm.vue'
 import DaPointChart from './DaPointChart.vue'
-import * as UserApi from "@/api/system/user";
+import DaPointValue from './DaPointValue.vue'
 import PointImportForm from './PointImportForm.vue'
 
 defineOptions({name: 'DataPoint'})
@@ -248,12 +253,18 @@
     getList()
   }
 
-  /** 查看数据操作 */
+  /** 查看历史值操作 */
   const chartView  = ref()
   const chartHandle = (raw: object) => {
     chartView.value.open(raw)
   }
 
+/** 查看当前值操作 */
+const pointValue  = ref()
+const pointValueHandle = (raw: object) => {
+  pointValue.value.open(raw)
+}
+
   /** 重置按钮操作 */
   const resetQuery = () => {
     queryFormRef.value.resetFields()

--
Gitblit v1.9.3