Forráskód Böngészése

项目整体页面字段顺序调整、接口联调、BUG修复

Koishi 1 éve
szülő
commit
16bb81f693

+ 3 - 1
README.md

@@ -15,6 +15,8 @@
     - 数据查询
         - 新增页面中间部分筛选框。
 - 可靠性分析
+    - 预警分析
+        - 新增预警分析模块与接口联调。
     - 原始报警分析
         - 替换了部分字段、修改了部分BUG,表格新增列排序功能,点击对应的列将会以次数为基准进行升序或者降序排序。
 - 报警配置
@@ -23,7 +25,7 @@
     - 报警配置
         - 风机报警页面新增与修改报警弹窗模块重构
     - 规则修改日志
-        - 
+        - 接口联调替换错误字段、页面BUG修复。
 - 数据模型配置
     - 设备模型
         - 替换页面内部分接口。

+ 9 - 1
src/api/api.js

@@ -1,6 +1,6 @@
 import request from "./axios.js";
 export const baseURL = "http://10.81.3.154:6015/";
-// export const baseURL = "http://192.168.1.101:6015/";
+// export const baseURL = "http://192.168.1.106:6015/";
 import JSONBIG from "json-bigint";
 
 // 获取场站数据
@@ -896,4 +896,12 @@ export const getStopQueryTableData = (params) => {
         url: "shutdownevent2/queryshutdowneventlist",
         params,
     });
+};
+
+export const getWarningCountList = (params) => {
+    return request({
+        url: `alarm/history/findCtFeatureStat?m=${params.timeType}&begin=${params.begin}&end=${params.end}&stationid=${params.stationid}&components=${params.components.toString()}&modelId=${params.modelId}&alarmIds=${params.alarmIds}&deviceType=${params.deviceType}`,
+        baseURL,
+        method: "get",
+    });
 };

+ 32 - 19
src/pages/alarmConfig/Logs.vue

@@ -2,7 +2,12 @@
   <div>
     <div class="container">
       <div class="sleBox">
-        <el-select v-model="value" style="margin-right:10px"  clearable placeholder="类型">
+        <el-select
+          v-model="value"
+          style="margin-right: 10px"
+          clearable
+          placeholder="类型"
+        >
           <el-option
             v-for="item in options"
             :key="item.value"
@@ -11,15 +16,20 @@
             :disabled="item.disabled"
           />
         </el-select>
-        <el-input v-model="input" clearable placeholder="名称检索" style="width:200px;margin-right:10px"/>
+        <el-input
+          v-model="input"
+          clearable
+          placeholder="名称检索"
+          style="width: 200px; margin-right: 10px"
+        />
         <el-button type="primary" @click="search">确定</el-button>
       </div>
       <el-table :data="tableData" height="700" stripe style="width: 100%">
-        <el-table-column prop="ruleName" label="规则名称"> </el-table-column>
-        <el-table-column prop="ruleType" label="规则类型"> </el-table-column>
-        <el-table-column prop="stationName" label="场站名称"> </el-table-column>
-        <el-table-column prop="model" label="风机型号"> </el-table-column>
-        <el-table-column label="更改内容" width="600">
+        <el-table-column prop="ruleName" label="规则名称"  width="220"/>
+        <el-table-column prop="ruleType" label="规则类型" width="120" />
+        <el-table-column prop="stationName" label="场站名称" width="140" />
+        <el-table-column prop="modelId" label="风机型号" width="160" />
+        <el-table-column label="更改内容">
           <template #default="scope">
             <div v-for="item in scope.row.infoList" :key="item">
               {{ item.fieldName }} :更改前: {{ item.beforValue }}
@@ -28,9 +38,9 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="updateTime" label="操作时间"> </el-table-column>
-        <el-table-column prop="updateType" label="操作类型"> </el-table-column>
-        <el-table-column prop="updateUser" label="操作人"> </el-table-column>
+        <el-table-column prop="updateTimeName" label="操作时间" width="150" />
+        <el-table-column prop="updateType" label="操作类型" width="100" />
+        <el-table-column prop="updateUser" label="操作人" width="100" />
       </el-table>
       <div class="pagination">
         <el-pagination
@@ -78,12 +88,19 @@ let options = ref([
   },
 ]);
 //
-const search = () =>{
-  logsList()
-}
+const search = () => {
+  logsList();
+};
 const logsList = async () => {
-  const { data } = await fetchruleventLogs(query.page, query.limit,input.value,value.value);
-  console.warn(data);
+  const { data } = await fetchruleventLogs(
+    query.page,
+    query.limit,
+    input.value,
+    value.value
+  );
+  data.records.forEach((ele) => {
+    ele.updateTimeName = dayjs(ele.updateTime).format("YYYY-MM-DD:HH:mm:ss");
+  });
   query.pageTotal = data.total;
   tableData.value = data.records;
 };
@@ -92,10 +109,6 @@ const handlePageChange = (val) => {
   query.page = val;
   logsList();
 };
-// 时间格式化
-const createdtime = (val) => {
-  return dayjs(val).format("YYYY-MM-DD:HH:mm:ss");
-};
 </script>
 <style lang="scss" scoped>
 .container {

+ 2 - 2
src/pages/alarmConfig/bj_windturbine/windturbine.vue

@@ -276,10 +276,10 @@ const state = reactive({
     { title: "机型", code: "modelId" },
     { title: "报警描述", code: "description", width: "150" },
     { title: "设备部件", code: "componentsName" },
-    { title: "级别", code: "rankName" },
     { title: "特性", code: "characteristic" },
     { title: "设备类型", code: "deviceType" },
     { title: "报警类型", code: "alarmType" },
+    { title: "级别", code: "rankName" },
     { title: "是否启用", code: "enable" },
     { title: "是否可复位", code: "resetTableName" },
   ],
@@ -289,8 +289,8 @@ const state = reactive({
     { title: "规则名称", code: "name" },
     { title: "表达式", code: "expression" },
     { title: "描述", code: "description" },
-    { title: "级别", code: "rank" },
     { title: "类型", code: "alarmType" },
+    { title: "级别", code: "rank" },
     { title: "是否启用", code: "enable" },
   ],
 });

+ 5 - 4
src/pages/baseData/FanDataStatisticTable.vue

@@ -355,10 +355,11 @@ function getAlarmId() {
     wpId: state.changZhan,
   }).then(({ data }) => {
     state.alarmIdList = data;
-    state.alarmIds =
-      data.length <= 5
-        ? data.map((item) => item.alarmId)
-        : data.slice(0, 5).map((item) => item.alarmId);
+    state.alarmIds = [];
+    // state.alarmIds =
+    //   data.length <= 5
+    //     ? data.map((item) => item.alarmId)
+    //     : data.slice(0, 5).map((item) => item.alarmId);
     getTableList();
   });
 }

+ 0 - 5
src/pages/baseData/device.vue

@@ -33,20 +33,15 @@
         <el-tab-pane label="遥信点">
           <yxpoint />
         </el-tab-pane>
-
-
         <el-tab-pane label="设备报警">
           <windturbine />
         </el-tab-pane>
         <el-tab-pane label="故障预警">
           <custom />
         </el-tab-pane>
-
-
         <el-tab-pane label="故障原因">
           <faultmode />
         </el-tab-pane>
-
         <el-tab-pane label="基本信息">
           <message />
         </el-tab-pane>

+ 4 - 1
src/pages/baseData/fan_components/windturbine.vue

@@ -101,7 +101,7 @@
     <el-table-column label="描述" align="left" prop="description" width="180" />
     <el-table-column label="停机类型" align="center" prop="characteristic" />
     <el-table-column label="风机型号" align="center" prop="modelId" />
-    <el-table-column label="报警类型" align="center" prop="alarmType" />
+    <el-table-column label="报警类型" align="center" prop="alarmTypeName" />
     <el-table-column label="故障编码" align="center" prop="nemCode" />
     <el-table-column label="报警级别" align="center">
       <template #default="scope">{{ levelIdConvert(scope.row.rank) }}</template>
@@ -205,6 +205,9 @@ const dialogclose = () => {
 };
 const getData = async () => {
   const { data } = await windturbinebj_fetchTableData(query);
+  data.records.forEach((ele) => {
+    ele.alarmTypeName = warningClassIfyIdConvert(ele.alarmType);
+  });
   state.tableData = data.records;
   total.value = data.total;
 };

+ 2 - 2
src/pages/customWarning/index.vue

@@ -301,7 +301,7 @@ const state = reactive({
     { title: "时间", code: "ts", width: "150" },
     { title: "场站", code: "stationname", width: "150" },
     { title: "机组", code: "devicename", width: "150" },
-    { title: "报警信息", code: "description", width: "180" },
+    { title: "报警信息", code: "description", width: "250" },
     { title: "故障原因", code: "faultCause" },
     // { title: "故障编码", code: "nemCode", width: "100" },
     // { title: "故障解决方法", code: "resolvent" },
@@ -318,7 +318,7 @@ const state = reactive({
   tableHeader1: [
     { title: "时间", code: "ts", width: "150" },
     { title: "升压站", code: "stationname", width: "150" },
-    { title: "报警信息", code: "description" },
+    { title: "报警信息", code: "description", width: "250" },
     { title: "级别", code: "rank", width: "80" },
     {
       title: "状态",

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 448 - 572
src/pages/faultDiagnosis/warning.vue


+ 1 - 1
src/pages/safe/historywaring.vue

@@ -308,9 +308,9 @@ const state = reactive({
     { title: "机组", code: "devicename", width: "150" },
     { title: "报警信息", code: "description", width: "180" },
     { title: "故障原因", code: "faultCause" },
+    { title: "级别", code: "rank", width: "80" },
     { title: "故障编码", code: "nemCode", width: "100" },
     // { title: "故障解决方法", code: "resolvent" },
-    { title: "级别", code: "rank", width: "80" },
     {
       title: "状态",
       code: "isCloseName",

+ 13 - 13
src/router/index.js

@@ -147,19 +147,19 @@ const routes = [
           //             '../pages/faultDiagnosis/record.vue'
           //         ),
           // },
-          //   {
-          //     icon: "el-icon-s-home",
-          //     path: "/faultDiagnosis/warning",
-          //     name: "faultDiagnosiswarning",
-          //     meta: {
-          //       title: "预警分析",
-          //     },
-          //     component: () =>
-          //       import(
-          //         /* webpackChunkName: "form" */
-          //         "../pages/faultDiagnosis/warning.vue"
-          //       ),
-          //   },
+          {
+            icon: "el-icon-s-home",
+            path: "/faultDiagnosis/warning",
+            name: "faultDiagnosiswarning",
+            meta: {
+              title: "预警分析",
+            },
+            component: () =>
+              import(
+                /* webpackChunkName: "form" */
+                "../pages/faultDiagnosis/warning.vue"
+              ),
+          },
           //   {
           //     icon: "el-icon-s-home",
           //     path: "/faultDiagnosis/statistics",

+ 1 - 1
vite.config.js

@@ -31,7 +31,7 @@ export default defineConfig({
             "^/sharding": {
                 // target: 'http://wanghs.nat300.top',
                 target: "http://10.81.3.154:6015",
-                // target: "http://192.168.1.101:6015",
+                // target: "http://192.168.1.106:6015",
                 changeOrigin: true, //开启代理
                 rewrite: (path) => path.replace(/^\/sharding/, ""),
             },