Browse Source

性能分析权限接口对接

liujiejie 1 year ago
parent
commit
1a5c11bad0

File diff suppressed because it is too large
+ 16803 - 1
package-lock.json


+ 1 - 0
package.json

@@ -7,6 +7,7 @@
     "build": "vue-cli-service build"
   },
   "dependencies": {
+    "@jiaminghi/data-view": "^2.10.0",
     "@riophae/vue-treeselect": "^0.4.0",
     "axios": "^1.6.8",
     "core-js": "^3.8.3",

+ 9 - 1
src/api/performance.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2024-06-03 09:29:50
- * @LastEditTime: 2024-06-07 16:11:24
+ * @LastEditTime: 2024-06-12 15:51:54
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/api/performance。.js
@@ -119,3 +119,11 @@ export function analysisDetail(data) {
     data,
   });
 }
+//分析详情  事件/编辑
+export function analysis(data) {
+  return request({
+    url: "/energy-manage-service/analysis/analysis",
+    method: "post",
+    data,
+  });
+}

+ 7 - 4
src/main.js

@@ -15,6 +15,10 @@ import SvgIcons from "@/components/SvgIcons/index.vue";
 Vue.component("SvgIcons", SvgIcons);
 // 序列化post方法
 import qs from "qs";
+// 将自动注册所有组件为全局组件
+import dataV from "@jiaminghi/data-view";
+
+Vue.use(dataV);
 Vue.prototype.$qs = qs;
 // Vue.prototype.$tinymce = tinymce;
 
@@ -33,12 +37,11 @@ if (store.state.auth.userInfo.permission !== undefined) {
 }
 
 // 时间转换
-Vue.prototype.$formatDate = function(date) {
+Vue.prototype.$formatDate = function (date) {
   const year = date.getFullYear();
-  const month = (date.getMonth() + 1).toString().padStart(2, '0'); // Adding 1 to month since it's zero-based
-  const day = date.getDate().toString().padStart(2, '0');
+  const month = (date.getMonth() + 1).toString().padStart(2, "0"); // Adding 1 to month since it's zero-based
+  const day = date.getDate().toString().padStart(2, "0");
 
-  
   return `${year}-${month}-${day}`;
 };
 

+ 5 - 3
src/views/performance/assetssDetail.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:25:45
- * @LastEditTime: 2024-06-12 10:31:16
+ * @LastEditTime: 2024-06-12 17:26:14
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/assetssDetail.vue
@@ -38,7 +38,8 @@
       </el-form-item>
     </el-form>
     <el-button type="primary" @click="() => $router.go(-1)">返回</el-button>
-    <h4>分析时间:2020-04-20 10:10:10{{}}</h4>
+    <h4>分析时间:{{ detailInfo.generalFiles[0].createTime }}</h4>
+    <img :src="detailInfo.generalFiles[0].fileAddr" alt="" />
     <el-card class="box-card analysisType">
       <el-row>
         <el-col :span="12">
@@ -84,7 +85,8 @@ export default {
       //获取详情信息
       try {
         const response = await analysisDetail(formData);
-        this.detailInfo = response.data;
+        console.log(response.data, "data");
+        this.detailInfo = response.data[0];
       } catch (error) {
         console.error(error);
       }

+ 8 - 2
src/views/performance/assetssMag.vue

@@ -89,11 +89,13 @@
         <el-table-column prop="roleName" align="center" label="分析记录">
           <template slot-scope="scope">
             <el-button
+              v-if="scope.row.analysisState == 1 && scope.row.errState !== 1"
               @click="handleAssetssDetail(scope.row)"
               type="text"
               size="small"
               >分析详情</el-button
             >
+            <span v-else>/</span>
           </template>
         </el-table-column>
         <el-table-column prop="createTime" align="center" label="创建时间">
@@ -182,10 +184,14 @@ export default {
 
   methods: {
     //分析
-    handleAssetss() {
+    handleAssetss(row) {
       this.$router.push({
         path: "/home/performance/editAssets",
-        query: { id: 123, name: "John" },
+        query: {
+          batchCode: row.batchCode,
+          analysisTypeCode: row.analysisTypeCode,
+          fieldEngineCode: row.fieldCode,
+        },
       });
     },
     //分析详情

+ 37 - 420
src/views/performance/components/EditAnalysis.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:14:23
- * @LastEditTime: 2024-06-03 09:38:23
+ * @LastEditTime: 2024-06-12 14:37:26
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/EditAnalysis.vue
@@ -16,7 +16,6 @@
               >分析</el-button
             >
             <el-button size="small">重置</el-button>
-            <i @click="drawer = true" class="el-icon-setting"></i>
           </el-form-item>
         </el-col>
       </el-row>
@@ -24,295 +23,37 @@
         <el-collapse-item title="基础筛选:" name="1">
           <el-row class="flex-wrap-row" :gutter="5">
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
-              <el-form-item
-                label="分析类型"
-                v-if="checkedCities.find((item) => item === '分析类型')"
-              >
+              <el-form-item label="分析类型">
                 <el-select
-                  v-model="form.region"
+                  v-model="form.configAnalysis"
                   placeholder="请选择分析类型"
                   size="small"
+                  clearable
                 >
-                  <el-option label="类型一" value="shanghai"></el-option>
-                  <el-option label="类型二" value="beijing"></el-option>
+                  <el-option
+                    v-for="item in analysisTypeList"
+                    :key="item.typeCode"
+                    :label="item.typeName"
+                    :value="item.typeCode"
+                  ></el-option>
                 </el-select> </el-form-item
             ></el-col>
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
-              <el-form-item
-                label="机组编号"
-                v-if="checkedCities.find((item) => item === '机组编号')"
-              >
+              <el-form-item label="机组编号">
                 <el-select
-                  multiple
-                  v-model="form.region"
+                  clearable
+                  v-model="form.turbines"
                   placeholder="请选择机组编号"
                   size="small"
                 >
-                  <el-option label="类型一" value="shanghai"></el-option>
-                  <el-option label="类型二" value="beijing"></el-option>
+                  <el-option
+                    v-for="item in windEngineGroupList"
+                    :key="item"
+                    :label="item"
+                    :value="item"
+                  ></el-option>
                 </el-select> </el-form-item
             ></el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
-              <el-form-item
-                label="滤除月份"
-                v-if="checkedCities.find((item) => item === '滤除月份')"
-              >
-                <el-date-picker
-                  width="200"
-                  size="small"
-                  type="dates"
-                  v-model="value4"
-                  placeholder="选择一个或多个日期"
-                >
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="9">
-              <el-form-item
-                label="分析时间"
-                v-if="checkedCities.find((item) => item === '分析时间')"
-              >
-                <el-date-picker
-                  size="small"
-                  v-model="value1"
-                  type="daterange"
-                  range-separator="至"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                >
-                </el-date-picker> </el-form-item
-            ></el-col>
-          </el-row>
-        </el-collapse-item>
-        <el-collapse-item
-          title="SACAD数据测点过滤设置:"
-          name="2"
-          v-if="checkedCities.find((item) => item === 'SCADA数据过滤')"
-        >
-          <el-row :gutter="5">
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="风速过滤">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="桨距角过滤">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="有功功率过滤">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="发电机转速过滤">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-collapse-item>
-        <el-collapse-item
-          title="图像轴系设置:"
-          name="3"
-          v-if="checkedCities.find((item) => item === '图像设置')"
-        >
-          <el-row :gutter="5">
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="发电机转矩">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="步长"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="风能利用系数">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="步长"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="叶尖转速比">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="步长"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="有功功率">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="步长"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="桨距角">
-                <div class="demo-input-suffix">
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="步长"
-                    v-model="input1"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最小值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                  <el-input
-                    type="number"
-                    size="small"
-                    placeholder="最大值"
-                    v-model="input2"
-                  >
-                  </el-input>
-                </div>
-              </el-form-item>
-            </el-col>
           </el-row>
         </el-collapse-item>
       </el-collapse>
@@ -381,80 +122,10 @@
         </el-tab-pane>
       </el-tabs>
     </div>
-    <el-drawer
-      title="偏好设置"
-      :visible.sync="drawer"
-      :direction="direction"
-      :before-close="handleClose"
-      class="drawerOption"
-    >
-      <el-row>
-        <el-col :span="12"
-          ><div class="drawerLeft">
-            <div style="text-align: center; font-size: 16px">常用功能设置</div>
-            <el-checkbox
-              :indeterminate="isIndeterminate"
-              v-model="checkAll"
-              @change="handleCheckAllChange"
-              >全选</el-checkbox
-            >
-            <div style="margin: 15px 0"></div>
-            <el-checkbox-group
-              v-model="checkedCities"
-              @change="handleCheckedCitiesChange"
-            >
-              <el-checkbox v-for="city in cities" :label="city" :key="city">{{
-                city
-              }}</el-checkbox>
-              <el-checkbox
-                label="SCADA数据过滤"
-                key="SCADA数据过滤"
-              ></el-checkbox>
-              <div class="checkFromRow">
-                <el-row>
-                  <el-col :span="12">发电机转速测点</el-col>
-                  <el-col :span="12">桨距角值测点</el-col>
-                  <el-col :span="12">有功功率测点</el-col>
-                  <el-col :span="12">风速速度测点</el-col>
-                </el-row>
-              </div>
-
-              <el-checkbox label="图像设置" key="图像设置"></el-checkbox>
-              <div class="checkFromRow">
-                <el-row>
-                  <el-col :span="12">发电机转矩轴系</el-col>
-                  <el-col :span="12">桨距角轴系</el-col>
-                  <el-col :span="12">叶尖速比轴系</el-col>
-                  <el-col :span="12">有功功率轴系</el-col>
-                  <el-col :span="12">发电机转矩轴系</el-col>
-                </el-row>
-              </div>
-            </el-checkbox-group>
-          </div></el-col
-        >
-        <el-col :span="12">
-          <div class="drawerRight">
-            <div style="text-align: center; font-size: 16px">已选中功能</div>
-            <ul>
-              <li v-for="func in checkedCities" :key="func">
-                {{ func }}
-                <el-button
-                  type="text"
-                  icon="el-icon-delete"
-                  @click="removeFunction(func)"
-                ></el-button>
-              </li>
-            </ul></div
-        ></el-col>
-      </el-row>
-      <div class="demo-drawer__footer">
-        <el-button @click="handleClose">取 消</el-button>
-        <el-button type="primary" @click="handleClose">{{ "确 定" }}</el-button>
-      </div>
-    </el-drawer>
   </div>
 </template>
 <script>
+import { analysisEditQuery } from "@/api/performance";
 import TinymceEditor from "@/components/Tinymce.vue";
 export default {
   components: {
@@ -465,16 +136,9 @@ export default {
       value4: "",
       value1: "",
       form: {},
-      activeNames: ["1", "2", "3"],
+      activeNames: ["1"],
       msg: "",
       disabled: false,
-
-      checkAll: false,
-      checkedCities: ["分析类型", "分析时间", "滤除月份", "机组编号"],
-      cities: ["分析类型", "分析时间", "滤除月份", "机组编号"],
-      isIndeterminate: true,
-      drawer: false,
-      direction: "rtl",
       value: "",
       options: [],
       editableTabsValue: "2",
@@ -490,34 +154,27 @@ export default {
           content: "Tab 2 content",
         },
       ],
+      analysisTypeList: [],
+      windEngineGroupList: [],
       formData: { content: "<p>Hello, Tinymce!</p>" },
       tabIndex: 2,
     };
   },
+  created() {
+    //获取分析 分析类型、机组编号 列表
+    this.getWindCodeList();
+  },
   methods: {
-    handleCheckAllChange(val) {
-      this.checkedCities = val
-        ? [...this.cities, "SCADA数据过滤", "图像设置"]
-        : [];
-      this.isIndeterminate = false;
-    },
-    handleCheckedCitiesChange(value) {
-      let checkedCount = value.length;
-      this.checkAll = checkedCount === this.cities.length + 2;
-      this.isIndeterminate =
-        checkedCount > 0 && checkedCount < this.cities.length + 2;
-    },
-    removeFunction(item) {
-      this.checkedCities = this.checkedCities.filter((fuc) => fuc !== item);
-    },
-
-    handleClose(done) {
-      this.$confirm("确认关闭?")
-        .then((_) => {
-          // done();
-          this.drawer = false;
-        })
-        .catch((_) => {});
+    async getWindCodeList() {
+      try {
+        const response = await analysisEditQuery({
+          batchCode: this.$route.query.batchCode,
+        });
+        this.analysisTypeList = response.data.analysisTypeList;
+        this.windEngineGroupList = response.data.windEngineGroupList;
+      } catch (error) {
+        console.error(error);
+      }
     },
     // 鼠标单击的事件
     onClick(e, editor) {
@@ -589,46 +246,6 @@ export default {
     }
   }
 }
-.drawerOption {
-  .el-checkbox-group {
-    line-height: 40px !important;
-  }
-  .drawerLeft {
-    margin-left: 20px;
-    color: #606266 !important;
-  }
-  .checkFromRow {
-    .el-col-12 {
-      color: #606266 !important;
-      font-size: 14px;
-    }
-    .el-col-12:nth-child(even) {
-      text-align: end !important;
-    }
-  }
-  .drawerRight {
-    margin-right: 20px;
-    color: #606266 !important;
-    font-size: 14px;
-    ul {
-      list-style-type: none;
-      padding: 0;
-      color: #606266 !important;
-      li {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        padding: 0px 10px;
-        line-height: 40px !important;
-      }
-    }
-  }
-  .demo-drawer__footer {
-    display: flex;
-    margin-top: 50px;
-    justify-content: center;
-  }
-}
 ::v-deep.el-input--small .el-input__inner {
   width: 200px !important;
 }

+ 218 - 50
src/views/performance/components/analysisEvent.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:13:51
- * @LastEditTime: 2024-05-31 16:26:47
+ * @LastEditTime: 2024-06-12 17:15:00
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
@@ -27,14 +27,21 @@
               <el-form-item
                 label="分析类型"
                 v-if="checkedCities.find((item) => item === '分析类型')"
+                prop=""
               >
                 <el-select
-                  v-model="form.region"
+                  v-model="form.configAnalysis"
                   placeholder="请选择分析类型"
                   size="small"
+                  multiple
+                  clearable
                 >
-                  <el-option label="类型一" value="shanghai"></el-option>
-                  <el-option label="类型二" value="beijing"></el-option>
+                  <el-option
+                    v-for="item in analysisTypeList"
+                    :key="item.typeCode"
+                    :label="item.typeName"
+                    :value="item.typeCode"
+                  ></el-option>
                 </el-select> </el-form-item
             ></el-col>
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
@@ -44,14 +51,44 @@
               >
                 <el-select
                   multiple
-                  v-model="form.region"
+                  v-model="form.turbines"
                   placeholder="请选择机组编号"
                   size="small"
+                  clearable
                 >
-                  <el-option label="类型一" value="shanghai"></el-option>
-                  <el-option label="类型二" value="beijing"></el-option>
-                </el-select> </el-form-item
-            ></el-col>
+                  <el-option
+                    v-for="item in windEngineGroupList"
+                    :key="item"
+                    :label="item"
+                    :value="item"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
+              <el-form-item
+                label="SCADA数据"
+                v-if="checkedCities.find((item) => item === 'SCADA数据')"
+              >
+                <el-select
+                  v-model="form.scada"
+                  placeholder="请选择SCADA数据"
+                  size="small"
+                  clearable
+                >
+                  <el-option
+                    :key="'minute'"
+                    :label="'分钟级'"
+                    :value="'minute'"
+                  ></el-option>
+                  <el-option
+                    :key="'second'"
+                    :label="'秒级'"
+                    :value="'second'"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
               <el-form-item
                 label="滤除月份"
@@ -61,7 +98,7 @@
                   width="200"
                   size="small"
                   type="dates"
-                  v-model="value4"
+                  v-model="form.excludingMonths"
                   placeholder="选择一个或多个日期"
                 >
                 </el-date-picker>
@@ -74,7 +111,7 @@
               >
                 <el-date-picker
                   size="small"
-                  v-model="value1"
+                  v-model="picker"
                   type="daterange"
                   range-separator="至"
                   start-placeholder="开始日期"
@@ -97,14 +134,14 @@
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input1"
+                    v-model="form.valueWindSpeed[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.valueWindSpeed[1]"
                   >
                   </el-input>
                 </div>
@@ -117,14 +154,14 @@
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input1"
+                    v-model="form.valuePitchAngle[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.valuePitchAngle[1]"
                   >
                   </el-input>
                 </div>
@@ -137,14 +174,14 @@
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input1"
+                    v-model="form.valueActivePower[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.valueActivePower[1]"
                   >
                   </el-input>
                 </div>
@@ -157,14 +194,14 @@
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input1"
+                    v-model="form.valueGeneratorSpeed[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.valueGeneratorSpeed[1]"
                   >
                   </el-input>
                 </div>
@@ -179,27 +216,108 @@
         >
           <el-row :gutter="5">
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
-              <el-form-item label="发电机转矩">
+              <el-form-item label="直驱发电机转速轴系">
+                <div class="demo-input-suffix">
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="步长"
+                    v-model="form.dGeneratorSpeed[0]"
+                  >
+                  </el-input>
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="最小值"
+                    v-model="form.dGeneratorSpeed[1]"
+                  >
+                  </el-input>
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="最大值"
+                    v-model="form.dGeneratorSpeed[2]"
+                  >
+                  </el-input>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
+              <el-form-item label="非直驱发电机转速轴系设置">
+                <div class="demo-input-suffix">
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="步长"
+                    v-model="form.iGeneratorSpeed[0]"
+                  >
+                  </el-input>
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="最小值"
+                    v-model="form.iGeneratorSpeed[1]"
+                  >
+                  </el-input>
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="最大值"
+                    v-model="form.iGeneratorSpeed[2]"
+                  >
+                  </el-input>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
+              <el-form-item label="直驱发电机转矩轴系">
                 <div class="demo-input-suffix">
                   <el-input
                     type="number"
                     size="small"
                     placeholder="步长"
-                    v-model="input1"
+                    v-model="form.dGeneratorTorque[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input2"
+                    v-model="form.dGeneratorTorque[1]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.dGeneratorTorque[2]"
+                  >
+                  </el-input>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
+              <el-form-item label="非直驱发电机转矩轴系">
+                <div class="demo-input-suffix">
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="步长"
+                    v-model="form.iGeneratorTorque[0]"
+                  >
+                  </el-input>
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="最小值"
+                    v-model="form.iGeneratorTorque[1]"
+                  >
+                  </el-input>
+                  <el-input
+                    type="number"
+                    size="small"
+                    placeholder="最大值"
+                    v-model="form.iGeneratorTorque[2]"
                   >
                   </el-input>
                 </div>
@@ -212,21 +330,21 @@
                     type="number"
                     size="small"
                     placeholder="步长"
-                    v-model="input1"
+                    v-model="form.cp[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input2"
+                    v-model="form.cp[1]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.cp[2]"
                   >
                   </el-input>
                 </div>
@@ -239,21 +357,21 @@
                     type="number"
                     size="small"
                     placeholder="步长"
-                    v-model="input1"
+                    v-model="form.tsr[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input2"
+                    v-model="form.tsr[1]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.tsr[2]"
                   >
                   </el-input>
                 </div>
@@ -266,21 +384,21 @@
                     type="number"
                     size="small"
                     placeholder="步长"
-                    v-model="input1"
+                    v-model="form.activePower[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input2"
+                    v-model="form.activePower[1]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.activePower[2]"
                   >
                   </el-input>
                 </div>
@@ -293,21 +411,21 @@
                     type="number"
                     size="small"
                     placeholder="步长"
-                    v-model="input1"
+                    v-model="form.pitchAngle[0]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最小值"
-                    v-model="input2"
+                    v-model="form.pitchAngle[1]"
                   >
                   </el-input>
                   <el-input
                     type="number"
                     size="small"
                     placeholder="最大值"
-                    v-model="input2"
+                    v-model="form.pitchAngle[2]"
                   >
                   </el-input>
                 </div>
@@ -432,16 +550,44 @@
   </div>
 </template>
 <script>
+import { analysisEditQuery, analysis } from "@/api/performance";
 export default {
   data() {
     return {
-      value4: "",
-      value1: "",
-      form: {},
+      picker: [],
+      form: {
+        configAnalysis: null, //分析类型
+        powerFarmID: null, //风场编号//通过路由获取的默认传递的
+        dataBatchNum: null, //批次号
+        scada: "minute", //scada数类型
+        turbines: [], //机组编号
+        beginTime: null, //开始时间
+        endTime: null, //结束时间
+        excludingMonths: null, //过滤月份
+        valueWindSpeed: [], //风速值最大最小 数组第一值为min  第二个 max
+        valuePitchAngle: [], //桨距角最大最小
+        valueActivePower: [], //有功功率
+        valueGeneratorSpeed: [], //发电机转速
+        //图像
+        dGeneratorSpeed: [], //直驱发电机转速轴系 第一个值为步长 第二个min 第三个 max
+        iGeneratorSpeed: [], //非直驱发电机转速轴系设置
+        dGeneratorTorque: [], //直驱发电机转矩轴系
+        iGeneratorTorque: [], //非直驱发电机转矩轴系
+        cp: [], //风能利用系数轴系
+        tsr: [], //叶尖速比轴系
+        pitchAngle: [], //桨距角轴系
+        activePower: [], //有功功率轴系
+      },
       activeNames: ["1", "2", "3"],
       checkAll: false,
-      checkedCities: ["分析类型", "分析时间", "滤除月份", "机组编号"],
-      cities: ["分析类型", "分析时间", "滤除月份", "机组编号"],
+      checkedCities: [
+        "分析类型",
+        "SCADA数据",
+        "分析时间",
+        "滤除月份",
+        "机组编号",
+      ],
+      cities: ["分析类型", "SCADA数据", "分析时间", "滤除月份", "机组编号"],
       isIndeterminate: true,
       drawer: false,
       direction: "rtl",
@@ -460,21 +606,43 @@ export default {
           content: "Tab 2 content",
         },
       ],
-      form: {
-        name: "",
-        region: "",
-        date1: "",
-        date2: "",
-        delivery: false,
-        type: [],
-        resource: "",
-        desc: "",
-      },
       formData: { content: "<p>Hello, Tinymce!</p>" },
       tabIndex: 2,
+      analysisTypeList: [],
+      windEngineGroupList: [],
     };
   },
+  created() {
+    //获取分析 分析类型、机组编号 列表
+    this.getWindCodeList();
+  },
   methods: {
+    async getAnalysis() {
+      try {
+        await analysis({
+          ...this.form,
+        });
+      } catch (error) {
+        console.error(error);
+      }
+    },
+    async getWindCodeList() {
+      try {
+        const response = await analysisEditQuery({
+          batchCode: this.$route.query.batchCode,
+        });
+        this.form.powerFarmID = this.$route.query.fieldEngineCode;
+        this.form.dataBatchNum = this.$route.query.batchCode;
+        this.form.scada = "minute";
+        this.form.configAnalysis = [response.data.analysisTypeList[0].typeCode];
+        this.analysisTypeList = response.data.analysisTypeList;
+        this.windEngineGroupList = response.data.windEngineGroupList;
+        this.getAnalysis();
+      } catch (error) {
+        console.error(error);
+        this.$router.go(-1);
+      }
+    },
     handleCheckAllChange(val) {
       this.checkedCities = val
         ? [...this.cities, "SCADA数据过滤", "图像设置"]

+ 1 - 1
src/views/system/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-17 16:02:11
- * @LastEditTime: 2024-05-27 17:19:02
+ * @LastEditTime: 2024-06-12 17:47:00
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /dasheng/performance-test/src/views/system/index.vue

+ 2 - 2
vue.config.js

@@ -64,9 +64,9 @@ module.exports = {
     // contentBase: path.join(__dirname, "public"),
     proxy: {
       "/api": {
-        target: "http://192.168.5.4:16200", // 石月
+        // target: "http://192.168.5.4:16200", // 石月
         // target: "http://192.168.50.235:16200", //内网
-        // target: "http://192.168.5.15:16200",
+        target: "http://192.168.5.15:16200",
         // target: "http://106.120.102.238:16600", //外网
         changeOrigin: true,
         pathRewrite: {

Some files were not shown because too many files changed in this diff