Browse Source

桨距角分析init

chenminghua 1 year ago
parent
commit
28cdcda54a

+ 1 - 1
src/api/axios.js

@@ -15,7 +15,7 @@ import JSONBIG from 'json-bigint';
 var loading = null;
 const service = axios.create({
     baseURL: baseURL,
-    timeout: 2000,
+    timeout: 200000,
     headers: { 'Content-Type': 'application/json' },
     transformResponse: [
         function (data) {

+ 4 - 4
src/api/config.js

@@ -9,10 +9,10 @@
 const config = {
     // baseURL: 'http://120.46.148.180:9002',
     // socketURL: 'ws://120.46.148.180:9002'
-    baseURL: 'http://192.168.1.67:9002',
-    socketURL: 'ws://192.168.1.67:9002'
-    // baseURL: 'http://192.168.10.7:9002',
-    // socketURL: 'ws://192.168.10.7:9002'
+    // baseURL: 'http://192.168.1.67:9002',
+    // socketURL: 'ws://192.168.1.67:9002'
+    baseURL: 'http://192.168.10.7:9002',
+    socketURL: 'ws://192.168.10.7:9002'
 }
 
 export default config;

+ 3 - 0
src/pages/dataAnalysis/bladeAnalysis/index.vue

@@ -0,0 +1,3 @@
+<template>
+    sfagag
+</template>

+ 25 - 5
src/pages/report/index.vue

@@ -83,7 +83,7 @@
           <el-button
             size="small"
             type="danger"
-            @click="handleDelete(scope.$index, scope.row)"
+            @click="handleReport(scope.$index, scope.row)"
             >查看报告</el-button
           >
         </template>
@@ -96,6 +96,7 @@
     title="风电场性能分析报告"
     width="50%"
     center
+    :before-close="handleClose"
     style="padding: 15px 40px;"
   >
   <div id="pdfDom">
@@ -232,7 +233,7 @@
 </div>
     <template #footer>
       <span class="dialog-footer">
-        <el-button @click="centerDialogVisible = false">取消</el-button>
+        <el-button @click="handleClose">取消</el-button>
         <!-- <el-button type="primary" @click="centerDialogVisible = false">
           确定
         </el-button> -->
@@ -297,7 +298,7 @@ const addform = async () => {
 let val1 = ref();
 let value2 = ref();
 const BeginChange = (val) => {
-  console.log(val);
+  // console.log(val);
   val1.value = val;
   // console.log(val);
 };
@@ -310,7 +311,7 @@ let eltime = ref();
 let wtcount=ref()
 let hjwtid=ref()
 let hjcount=ref()
-const handleDelete = async (index, row) => {
+const handleReport = async (index, row) => {
   time.value = row.time;
   //   console.log(index, row)
   centerDialogVisible.value = true;
@@ -319,9 +320,11 @@ const handleDelete = async (index, row) => {
   );
   nbdata.value = res.data.station;
   //    console.log('nb',nbdata.value);
-  res.data.info.curve.forEach((ele) => {
+  if(res.data.info.curve?.length){
+    res.data.info.curve.forEach((ele) => {
     ele.module = "偏差率负值";
   });
+  }
 //   res.data.info.stoptime.forEach((ele)=>{
 //       ele.remark=ele.remark/60
 //   })
@@ -352,6 +355,23 @@ const getTime1 = (val) => {
     return end;
   }
 };
+
+const handleClose = (() => {
+  reset();
+  centerDialogVisible.value = false;
+})
+
+const reset = (() =>{
+  curve.value = [];
+  mrlxs.value = [];
+  staticwind.value = [];
+  stoptime.value = [];
+  eltime.value = '';
+  wtcount.value = '';
+  hjwtid.value = '';
+  hjcount.value = '';
+});
+
 onMounted(() => {
   funGetStation();
  

+ 12 - 12
src/router/index.js

@@ -146,18 +146,18 @@ const routes = [{
                             '../pages/dataAnalysis/spaceAnalysis/index.vue'
                         ),
                 },
-                // {
-                //     icon: 'el-icon-s-home',
-                //     path: '/dataAnalysis/angleAnalysis',
-                //     name: 'dataAnalysisAngleAnalysis',
-                //     meta: {
-                //         title: '浆距角分析',
-                //     },
-                //     component: () =>
-                //         import(
-                //             '../pages/dataAnalysis/angleAnalysis/index.vue'
-                //         ),
-                // },
+                {
+                    icon: 'el-icon-s-home',
+                    path: '/dataAnalysis/baldeAnalysis',
+                    name: 'dataAnalysisAngleAnalysis',
+                    meta: {
+                        title: '浆距角分析',
+                    },
+                    component: () =>
+                        import(
+                            '../pages/dataAnalysis/bladeAnalysis/index.vue'
+                        ),
+                },
                 {
                     icon: 'el-icon-s-home',
                     path: '/dataAnalysis/windAnalysis',