From ebc552900444d25b1158bf53d07f24c9ee36cc75 Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期一, 20 一月 2025 14:40:57 +0800
Subject: [PATCH] 预警配置

---
 src/views/model/pre/item/index.vue |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/src/views/model/pre/item/index.vue b/src/views/model/pre/item/index.vue
index e0e8861..2158644 100644
--- a/src/views/model/pre/item/index.vue
+++ b/src/views/model/pre/item/index.vue
@@ -51,18 +51,18 @@
   <!-- 列表 -->
   <ContentWrap>
     <el-table v-loading="loading" :data="list">
-      <el-table-column label="编号" align="center" prop="itemno"/>
+      <el-table-column label="编号" align="center" min-width="150" prop="itemno"/>
       <el-table-column label="预测项名" header-align="center" align="left" min-width="200" prop="itemname"/>
-      <el-table-column label="类型名称" align="center" prop="itemtypename">
+      <el-table-column label="类型名称" align="center" min-width="120" prop="itemtypename">
         <template #default="scope">
           <el-tag v-if="scope.row.itemtypename === 'NormalItem'" size="small" type="success">{{scope.row.itemtypename}}</el-tag>
           <el-tag v-else size="small" type="primary">{{scope.row.itemtypename}}</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="预测长度" align="center" prop="predictlength"/>
+      <el-table-column label="预测长度(min)" align="center" prop="predictlength"/>
       <el-table-column label="粒度" align="center" prop="granularity">
         <template #default="scope">
-          <dict-tag :type="DICT_TYPE.TIME_GRANULARITY" :value="scope.row.granularity" />
+          <dict-tag :type="DICT_TYPE.PRED_GRANULARITY" :value="scope.row.granularity" />
         </template>
       </el-table-column>
       <el-table-column label="是否融合" align="center" prop="isfuse">
@@ -80,21 +80,29 @@
           <dict-tag :type="DICT_TYPE.COM_IS_INT" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column label="数据点名称" align="center" prop="tagname"/>
-      <el-table-column label="存放表" align="center" prop="tablename"/>
-      <el-table-column label="操作" align="center" min-width="110" fixed="right">
+      <el-table-column label="运行时间" min-width="150" align="center" prop="lastTime"/>
+      <el-table-column label="运行状态" align="center" prop="runStatus">
+        <template #default="scope">
+          <dict-tag :type="DICT_TYPE.ITEM_RUN_STATUS" :value="scope.row.runStatus" />
+        </template>
+      </el-table-column>
+      <el-table-column label="运行耗时(ms)" align="center" prop="duration"/>
+      <el-table-column label="操作" align="center" min-width="120" fixed="right">
         <template #default="scope">
           <el-button
             link
             type="primary"
+            size="mini"
             @click="openForm('update', scope.row.id, scope.row.itemtypename)"
             v-hasPermi="['model:pre-item:update']"
           >
             编辑
           </el-button>
+          <el-button link size="mini" type="primary" @click="chartHandle(scope.row)">数据</el-button>
           <el-button
             link
             type="danger"
+            size="mini"
             @click="handleDelete(scope.row.id)"
             v-hasPermi="['model:pre-item:delete']"
           >
@@ -115,10 +123,14 @@
   <!-- 表单弹窗:添加/修改 -->
   <MmPredictItemForm ref="formRef" @success="getList"/>
 
+  <!-- 表单弹窗:数据 -->
+  <MmPredictItemChart ref="chartView" @success="getList"/>
+
 </template>
 <script lang="ts" setup>
 import MmPredictItemForm from './MmPredictItemForm.vue'
-import * as MmPredictItem from '@/api/model/pre/predict'
+import MmPredictItemChart from './MmPredictItemChart.vue'
+import * as MmPredictItem from '@/api/model/pre/item'
 import {DICT_TYPE} from "@/utils/dict";
 
 defineOptions({name: 'DataMmPredictItem'})
@@ -171,6 +183,12 @@
   handleQuery()
 }
 
+/** 查看数据操作 */
+const chartView  = ref()
+const chartHandle = (raw: object) => {
+  chartView.value.open(raw)
+}
+
 /** 添加/修改操作 */
 const formRef = ref()
 const openForm = (type: string, id?: number, itemtypename?: string) => {

--
Gitblit v1.9.3