1
0

2 Commits 52168c3f88 ... f305937ba8

Autor SHA1 Nachricht Datum
  rui.jiang f305937ba8 部件参数 合并 vor 2 Monaten
  rui.jiang 1b8700179e 部件参数 vor 2 Monaten

+ 0 - 1
src/api/ledger.js

@@ -597,4 +597,3 @@ export function upload(data) {
 }
 
 
-

+ 13 - 1
src/api/maintain.js

@@ -152,4 +152,16 @@ export function getUnitVo(data) {
     method: "get",
     data,
   });
-}
+}
+
+
+// 部件参数
+export function updateUnitDictBrandModelParameter(data) {
+  return request({
+    url: "/energy-manage-service/api/unit/dict/updateUnitDictBrandModelParameter",
+    method: "post",
+    data,
+  });
+}
+
+

+ 1 - 1
src/views/admin/cockpitManage/Index.vue

@@ -20,7 +20,7 @@
         <p>
           <span class="SpText">已接入风场数:</span>
           {{ totalList?.fieldSumNumber ? totalList.fieldSumNumber : 0 }}
-        
+        
         </p>
         <!-- <p>
           <span class="SpText">已完成分析风场:</span>

+ 123 - 130
src/views/admin/cockpitManage/component/leftdata.vue

@@ -179,13 +179,13 @@
           <div class="windbox">
             <div
               class="windlist"
-              v-for="(item, index) in windList"
+              v-for="(item, index) in filteredWindList"
               :key="index"
             >
-              <h3>{{ item.fieldName }}</h3>
-              <p>数据类型:{{ item.dataType }}</p>
-              <p>采集次数:{{ item.collectCount }} 次</p>
-              <p>接入时间:{{ item.createTime }}</p>
+              <h3>{{ item.windFarmName }}</h3>
+              <p>数据类型:{{ item.typeName }}</p>
+              <p>采集次数:{{ item.count }} 次</p>
+              <p>采集时间:{{ item.latestDataTime }}</p>
             </div>
           </div>
         </el-aside>
@@ -196,40 +196,41 @@
               <el-select v-model="windvalue" placeholder="请选择" size="small">
                 <el-option
                   v-for="item in windoptions"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+                  :key="item.fieldCode"
+                  :label="item.fieldName"
+                  :value="item.fieldCode"
                 >
                 </el-option>
               </el-select>
             </p>
             <p>
-              转换类型:
+              类型:
               <el-select v-model="typevalue" placeholder="请选择" size="small">
                 <el-option
                   v-for="item in typeoptions"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+                  :key="item.paramKey"
+                  :label="item.paramValue"
+                  :value="item.paramKey"
                 >
                 </el-option>
               </el-select>
             </p>
             <p>
-              时间范围
+              选择日期
               <el-date-picker
                 size="small"
-                v-model="value1"
+                v-model="timeval"
                 type="daterange"
                 range-separator="至"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
+                @change="onDateChange"
               >
               </el-date-picker>
             </p>
             <div>
-              <el-button size="small">查询</el-button>
-              <el-button size="small">重置</el-button>
+              <el-button size="small" @click="conditions">查询</el-button>
+              <el-button size="small" @click="reset">重置</el-button>
             </div>
           </div>
 
@@ -237,29 +238,33 @@
             :data="ListtableData"
             style="width: 100%"
             class="custom-table"
+            height="550"
           >
-            <el-table-column prop="name" label="风场名称"> </el-table-column>
-            <el-table-column prop="type" label="类型" align="center">
+            <el-table-column prop="windFarmName" label="风场名称">
+            </el-table-column>
+            <el-table-column prop="typeName" label="类型" align="center">
             </el-table-column>
             <el-table-column
-              prop="address"
+              prop="totalDays"
               label="采集总天数"
               align="center"
               width="150"
             >
             </el-table-column>
             <el-table-column
-              prop="count"
+              prop="totalDataCount"
               label="采集总条数"
               align="center"
               width="180"
             >
             </el-table-column>
-            <el-table-column prop="daytime" label="最近采集时间" align="center">
+            <el-table-column
+              prop="latestDataTime"
+              label="最近采集时间"
+              align="center"
+            >
             </el-table-column>
           </el-table>
-          <el-pagination class="fenye" layout="prev, pager, next" :total="50">
-          </el-pagination>
         </el-main>
       </el-container>
     </el-dialog>
@@ -309,6 +314,7 @@ import {
   getAnalysisResultStateList,
   getAnalysisResultErrStateList,
   analysisResultList,
+  getWindFieldNames,
 } from "@/api/ledger.js";
 import axios from "axios";
 import Tabroll from "./tabroll.vue";
@@ -344,139 +350,77 @@ export default {
       gridData: [],
       shujuloading: false,
       searchvalue: "",
-      value1: "",
+      timeval: [],
       windvalue: "",
       typevalue: "",
       windoptions: [],
-      typeoptions: [],
-      windList: [
-        {
-          fieldName: "招远风电场",
-          dataType: "SCADA秒级",
-          collectCount: "采集次数:600 次",
-          createTime: "接入时间:2025-11-11 11:11:11",
-        },
+      typeoptions: [
         {
-          fieldName: "招远风电场",
-          dataType: "SCADA秒级",
-          collectCount: "采集次数:600 次",
-          createTime: "接入时间:2025-11-11 11:11:11",
+          id: 1,
+          type: "trans_type",
+          typeName: "转化类型",
+          paramKey: "second",
+          paramValue: "SCADA秒级",
+          status: 1,
         },
         {
-          fieldName: "招远风电场",
-          dataType: "SCADA秒级",
-          collectCount: "采集次数:600 次",
-          createTime: "接入时间:2025-11-11 11:11:11",
+          id: 2,
+          type: "trans_type",
+          typeName: "转化类型",
+          paramKey: "minute",
+          paramValue: "SCADA分钟级",
+          status: 1,
         },
         {
-          fieldName: "招远风电场",
-          dataType: "SCADA秒级",
-          collectCount: "采集次数:600 次",
-          createTime: "接入时间:2025-11-11 11:11:11",
+          id: 3,
+          type: "trans_type",
+          typeName: "转化类型",
+          paramKey: "fault",
+          paramValue: "SCADA故障",
+          status: 1,
         },
         {
-          fieldName: "招远风电场",
-          dataType: "SCADA秒级",
-          collectCount: "采集次数:600 次",
-          createTime: "接入时间:2025-11-11 11:11:11",
+          id: 4,
+          type: "trans_type",
+          typeName: "转化类型",
+          paramKey: "warn",
+          paramValue: "SCADA报警",
+          status: 1,
         },
         {
-          fieldName: "招远风电场",
-          dataType: "SCADA秒级",
-          collectCount: "采集次数:600 次",
-          createTime: "接入时间:2025-11-11 11:11:11",
-        },
-        {
-          fieldName: "招远风电场",
-          dataType: "SCADA秒级",
-          collectCount: "采集次数:600 次",
-          createTime: "接入时间:2025-11-11 11:11:11",
+          id: 5,
+          type: "trans_type",
+          typeName: "转化类型",
+          paramKey: "wave",
+          paramValue: "振动",
+          status: 1,
         },
       ],
+      windList: [],
       YCtableColumns: [{ prop: "windFarmName" }, { prop: "createTime" }],
       YCcolumnWidths: {
         windFarmName: 130,
         createTime: 150,
       },
 
-      ListtableData: [
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-        {
-          name: "招远风电场",
-          type: "SCADA分钟级",
-          address: "985",
-          count: "10000",
-          daytime: "2025-11-11 11:11:11",
-        },
-      ],
+      ListtableData: [],
+      startDate: "",
+      endDate: "",
     };
   },
   created() {
     this.getbacklog();
     this.ruku();
   },
+  computed: {
+    filteredWindList() {
+      return this.searchvalue
+        ? this.windList.filter((item) =>
+            item.windFarmName.includes(this.searchvalue)
+          )
+        : this.windList;
+    },
+  },
   mounted() {},
   methods: {
     getbacklog() {
@@ -627,10 +571,59 @@ export default {
     },
     // 在线数据
     onlinedata() {
+      this.windsite();
       this.lineShow = true;
+      // 获取在线数据
+      axios.post(`/transDataWeb/windFarmDayCount/getTodayData`).then((res) => {
+        this.windList = res.data.datas;
+      });
+      this.conditions();
+    },
+
+    conditions() {
+      // 获取历史数据
+      axios
+        .post(`/transDataWeb/windFarmDayCount/getHistoryDataSummary`, {
+          beginDate: this.startDate,
+          endDate: this.endDate,
+          type: this.typevalue,
+          windFarmCode: this.windvalue,
+        })
+        .then((res) => {
+          this.ListtableData = res.data.datas;
+        });
+    },
+    reset() {
+      this.startDate = "";
+      this.endDate = "";
+      this.typevalue = "";
+      this.windvalue = "";
+      this.timeval = [];
+    },
+    async windsite() {
+      try {
+        const res = await getWindFieldNames();
+        this.windoptions = res.data;
+      } catch (error) {
+        console.error("Error fetching data:", error);
+      }
+    },
+
+    onDateChange(date) {
+      if (Array.isArray(date)) {
+        this.startDate = this.$formatDate(date[0]);
+        this.endDate = this.$formatDate(date[1]);
+        if (this.endDate < this.startDate) {
+          this.endDate = this.startDate;
+        }
+      } else {
+        this.startDate = null;
+        this.endDate = null;
+      }
     },
     handleClose() {
       this.lineShow = false;
+      this.reset();
     },
   },
 };

+ 118 - 61
src/views/ledger/maintain.vue

@@ -124,7 +124,7 @@
     <el-drawer
       title="新增"
       :visible.sync="drawer"
-      size="23%"
+      size="30%"
       :with-header="true"
       @close="handleClose"
       class="drawers"
@@ -152,7 +152,7 @@
         <el-table :data="relevanceData" border style="width: 100%">
           <el-table-column prop="manufacture" label="品牌"> </el-table-column>
           <el-table-column prop="modelNumber" label="型号"> </el-table-column>
-          <el-table-column fixed="right" label="操作" width="100">
+          <el-table-column fixed="right" label="操作" width="150">
             <template slot-scope="scope">
               <el-button
                 @click="handleClick(scope.row)"
@@ -160,6 +160,12 @@
                 size="small"
                 >编辑</el-button
               >
+              <el-button
+                type="text"
+                @click="ONparameter(scope.row)"
+                size="small"
+                >参数配置</el-button
+              >
               <el-button type="text" @click="DELpingpai(scope.row)" size="small"
                 >删除</el-button
               >
@@ -184,66 +190,21 @@
     <el-dialog
       title="新增部件"
       :visible.sync="relevanceVisible"
-      width="400px"
+      width="310px"
       :before-close="handleClose"
     >
       <p class="maintain">
-        <span class="two"> 品牌:</span>
+        <span> 品牌:</span>
         <span class="one"
           ><el-input v-model="brand" size="small"></el-input
         ></span>
       </p>
       <p class="maintain">
-        <span class="two"> 型号:</span
+        <span> 型号:</span
         ><span class="one"
           ><el-input v-model="guige" size="small"></el-input
         ></span>
       </p>
-      <h3 style="font-weight: 600; margin-bottom: 10px;">轴承参数信息</h3>
-      <p class="maintain">
-        <span class="two"> 滚动体数量:</span>
-        <span class="one">
-          <el-input
-            :disabled="zcShow != 1"
-            v-model="quantity"
-            size="small"
-            @input="validateDecimal('quantity')"
-          ></el-input>
-        </span>
-      </p>
-      <p class="maintain">
-        <span class="two"> 滚动体直径/mm:</span>
-        <span class="one">
-          <el-input
-            :disabled="zcShow != 1"
-            v-model="diameter"
-            size="small"
-            @input="validateDecimal('diameter')"
-          ></el-input>
-        </span>
-      </p>
-      <p class="maintain">
-        <span class="two">节圆直径/mm:</span>
-        <span class="one">
-          <el-input
-            :disabled="zcShow != 1"
-            v-model="section"
-            size="small"
-            @input="validateDecimal('section')"
-          ></el-input>
-        </span>
-      </p>
-      <p class="maintain">
-        <span class="two"> 接触角°:</span>
-        <span class="one">
-          <el-input
-            :disabled="zcShow != 1"
-            v-model="contact"
-            size="small"
-            @input="validateDecimal('contact')"
-          ></el-input>
-        </span>
-      </p>
 
       <div class="button-container">
         <el-button class="but" size="small" type="primary" @click="Glsubmit">
@@ -299,6 +260,67 @@
         >
       </p>
     </el-dialog>
+
+    <el-dialog
+      title="部件参数配置"
+      :visible.sync="parameterVisible"
+      width="400px"
+      :before-close="handleClose"
+    >
+      <h3 style="font-weight: 600; margin-bottom: 10px">轴承参数信息</h3>
+      <p class="maintain">
+        <span class="two"> 滚动体数量:</span>
+        <span class="one">
+          <el-input
+            :disabled="zcShow != 1"
+            v-model="quantity"
+            size="small"
+            @input="validateDecimal('quantity')"
+          ></el-input>
+        </span>
+      </p>
+      <p class="maintain">
+        <span class="two"> 滚动体直径/mm:</span>
+        <span class="one">
+          <el-input
+            :disabled="zcShow != 1"
+            v-model="diameter"
+            size="small"
+            @input="validateDecimal('diameter')"
+          ></el-input>
+        </span>
+      </p>
+      <p class="maintain">
+        <span class="two">节圆直径/mm:</span>
+        <span class="one">
+          <el-input
+            :disabled="zcShow != 1"
+            v-model="section"
+            size="small"
+            @input="validateDecimal('section')"
+          ></el-input>
+        </span>
+      </p>
+      <p class="maintain">
+        <span class="two"> 接触角°:</span>
+        <span class="one">
+          <el-input
+            :disabled="zcShow != 1"
+            v-model="contact"
+            size="small"
+            @input="validateDecimal('contact')"
+          ></el-input>
+        </span>
+      </p>
+      <div style="text-align: center">
+        <el-button
+          :disabled="zcShow != 1"
+          type="primary"
+          @click="submitParameter"
+          >确定</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -316,6 +338,7 @@ import {
   getUnitDictBrandModelPage,
   delUnitDictBrandModel,
   updateUnitDictBrandModel,
+  updateUnitDictBrandModelParameter,
 } from "@/api/maintain.js";
 
 export default {
@@ -359,6 +382,8 @@ export default {
       section: "",
       contact: "",
       zcShow: "",
+      parameterVisible: false,
+      chanshu: "",
     };
   },
   created() {
@@ -609,20 +634,44 @@ export default {
       this.fetchData();
     },
 
+    submitParameter() {
+      const params = {
+        rollsNumbe: this.quantity,
+        rollsDiameter: this.diameter,
+        circleDiameter: this.section,
+        thetaDeg: this.contact,
+        id: this.chanshu.id,
+        unitType: "1",
+      };
+      updateUnitDictBrandModelParameter(params)
+        .then((res) => {
+          this.parameterVisible = false;
+          this.$message({
+            type: "success",
+          showClose: true,
+          message: '提交成功'
+        });
+          this.fetchData();
+          this.drawer=true
+        })
+        .catch(() => {
+          this.$message.error("提交失败");
+          this.parameterVisible = false;
+        });
+    },
     // 提交品牌
     Glsubmit() {
       const params = {
         manufacture: this.brand,
         modelNumber: this.guige,
         unitType: this.drawerList ? this.drawerList.contentsDictKey : "", // 确保 this.drawerList 存在
-        rollsNumbe: this.quantity,
-        rollsDiameter: this.diameter,
-        circleDiameter: this.section,
-        thetaDeg: this.contact,
+        // rollsNumbe: this.quantity,
+        // rollsDiameter: this.diameter,
+        // circleDiameter: this.section,
+        // thetaDeg: this.contact,
       };
       console.log(params, "params");
 
-      return;
       if (!params.manufacture || !params.modelNumber || !params.unitType) {
         this.$message({
           message: "请确保所有字段都已填写!",
@@ -638,10 +687,10 @@ export default {
           manufacture: params.manufacture,
           modelNumber: params.modelNumber,
           unitType: params.unitType,
-          rollsNumbe: params.rollsNumbe,
-          rollsDiameter: params.rollsDiameter,
-          circleDiameter: params.circleDiameter,
-          thetaDeg: params.thetaDeg,
+          // rollsNumbe: params.rollsNumbe,
+          // rollsDiameter: params.rollsDiameter,
+          // circleDiameter: params.circleDiameter,
+          // thetaDeg: params.thetaDeg,
         };
         updateUnitDictBrandModel(updateParams).then((res) => {
           if (res.status === true) {
@@ -718,7 +767,15 @@ export default {
           });
         });
     },
-
+    //参数配置
+    ONparameter(row) {
+      this.parameterVisible = true;
+      this.chanshu = row;
+      this.quantity = row.rollsNumber;
+      this.diameter = row.rollsDiameter;
+      this.section = row.circleDiameter;
+      this.contact = row.thetaDeg;
+    },
     handleClick(row) {
       this.pprow = row;
       this.relevanceVisible = true;
@@ -741,7 +798,7 @@ export default {
       this.maintainVisible = false;
       this.relevanceVisible = false;
       this.drawer = false;
-
+      this.parameterVisible = false;
       this.quantity = "";
       this.diameter = "";
       this.section = "";

+ 11 - 1
src/views/performance/components/analysisEvent.vue

@@ -592,8 +592,18 @@ export default {
       });
       return isDisabled;
     },
-    handleScadaAnalysis() {
+
+    handleScadaAnalysis(obj) {
+      const scada = obj[obj.length - 1].split("|")[0];
+      if (
+        scada === "temperature_large_components" ||
+        scada === "production_indicator" ||
+        scada === "fault"
+      ) {
+        this.$message.warning("当前分析模型无法单独分析");
+      }
       this.getTimeList();
+
       // this.getQueryDataTime();
     },
     handleScada() {

+ 9 - 4
src/views/system/menuMag/index.vue

@@ -33,20 +33,21 @@
           <el-button @click="reset('ruleForm')" size="small">重置</el-button>
         </el-form-item>
       </el-form>
-    </div>
-    <div class="list-page">
       <div class="newly">
         <el-button
           v-hasPermi="['system:menu:add']"
-          type="primary"
+  
           @click="newnuedialog"
           size="small"
           >新增</el-button
         >
-        <el-button type="primary" @click="toggleExpandAll" size="small">{{
+        <el-button  @click="toggleExpandAll" size="small">{{
           defaultExpandAll ? "收起" : "展开"
         }}</el-button>
       </div>
+    </div>
+    <div class="list-page">
+    
       <el-table
         v-loading="loading"
         class="center-align-table"
@@ -438,4 +439,8 @@ export default {
 .dialog-footer {
   margin-top: 20px;
 }
+
+.condition {display: flex;
+justify-content: space-between;
+}
 </style>

+ 8 - 3
src/views/system/roleMag/index.vue

@@ -31,17 +31,18 @@
           <el-button @click="reset('ruleForm')" size="small">重置</el-button>
         </el-form-item>
       </el-form>
-    </div>
-    <div class="list-page">
       <div class="newly">
         <el-button
           v-hasPermi="['system:menu:add']"
-          type="primary"
+   
           @click="newnuedialog"
           size="small"
           >新增</el-button
         >
       </div>
+    </div>
+    <div class="list-page">
+   
       <el-table
         v-loading="loading"
         class="center-align-table"
@@ -667,4 +668,8 @@ export default {
     margin-bottom: 25px;
   }
 }
+
+.condition {display: flex;
+justify-content: space-between;
+}
 </style>

+ 7 - 3
src/views/system/userMag/index.vue

@@ -36,17 +36,18 @@
           <el-button @click="reset('ruleForm')" size="small">重置</el-button>
         </el-form-item>
       </el-form>
-    </div>
-    <div class="list-page">
       <div class="newly">
         <el-button
           v-hasPermi="['system:users:add']"
-          type="primary"
+   
           @click="newnuedialog"
           size="small"
           >新增</el-button
         >
       </div>
+    </div>
+    <div class="list-page">
+    
       <el-table
         v-loading="loading"
         class="center-align-table"
@@ -662,4 +663,7 @@ export default {
     margin-bottom: 25px;
   }
 }
+.condition {display: flex;
+justify-content: space-between;
+}
 </style>

+ 2 - 2
vue.config.js

@@ -115,8 +115,8 @@ module.exports = {
       // 数据转换亮亮
       "/transDataWeb": {
         // target: "http://192.168.50.241:9000/trans_data_web",//生产
-        // target: "http://192.168.50.235/transDataWeb", //测试
-        target: "http://192.168.50.235:8999/transDataWeb", //测试
+        target: "http://192.168.50.235/transDataWeb", //测试
+        // target: "http://192.168.50.235:8999/transDataWeb", //测试
         changeOrigin: true,
         pathRewrite: {
           "^/transDataWeb": "", // 去掉 /transDataWeb 前缀