Explorar el Código

修复bug6-25am 合并

liujiejie hace 11 meses
padre
commit
10440d4279

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 5 - 129
package-lock.json


+ 1 - 1
public/index.html

@@ -7,7 +7,7 @@
     <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
 
     <title>风机运行管理系统</title>
-    <script src="./config/config.js"></script>
+    <!-- <script src="./config/config.js"></script> -->
   </head>
 
   <body>

+ 38 - 29
src/components/map/index.vue

@@ -8,11 +8,17 @@
           <span>风场编号</span><span>{{ hoverInfo.codeNumber }}</span>
         </p>
         <p>
-          <span>空气密度</span><span>{{ hoverInfo.density }}</span>
+          <span>空气密度</span><span>{{ hoverInfo.density }} kg/m3</span>
         </p>
         <p>
           <span>总额定容量</span
-          ><span>{{ hoverInfo.ratedCapacityNumber }}</span>
+          ><span
+            >{{
+              hoverInfo?.ratedCapacityNumber
+                ? hoverInfo.ratedCapacityNumber
+                : 0
+            }}/KW</span
+          >
         </p>
         <p>
           <span>经度</span><span>{{ hoverInfo.longitude }}</span>
@@ -21,11 +27,11 @@
           <span>纬度</span><span>{{ hoverInfo.latitude }}</span>
         </p>
         <p>
-          <span>海拔高度</span><span>{{ hoverInfo.elevationHeight }}</span>
+          <span>海拔高度</span><span>{{ hoverInfo.elevationHeight }} /米</span>
         </p>
         <p>
           <span>最新分析时间</span
-          ><span> {{ $formatDate(hoverInfo.wfbrCreateTime) }}</span>
+          ><span> {{ $formatDateTWO(hoverInfo.wfbrCreateTime) }}</span>
         </p>
       </div>
     </div>
@@ -37,13 +43,20 @@
           <span>风机编号</span><span>{{ hoverfengji.engineCode }}</span>
         </p>
         <p>
-          <span>额定容量</span><span>{{ hoverfengji.ratedCapacity }}</span>
+          <span>额定容量</span
+          ><span
+            >{{
+              hoverfengji?.ratedCapacity ? hoverfengji?.ratedCapacity : 0
+            }}
+            /KW</span
+          >
         </p>
         <p>
-          <span>海拔高度</span><span>{{ hoverfengji.elevationHeight }}</span>
+          <span>海拔高度</span
+          ><span>{{ hoverfengji.elevationHeight }} /米</span>
         </p>
         <p>
-          <span>轮毂高度</span><span>{{ hoverfengji.hubHeight }}</span>
+          <span>轮毂高度</span><span>{{ hoverfengji.hubHeight }} /米</span>
         </p>
         <p>
           <span>经度</span><span>{{ hoverfengji.longitude }}</span>
@@ -56,15 +69,16 @@
           <span>{{ hoverfengji.sightcing == 1 ? "是" : "否" }}</span>
         </p>
         <p>
-          <span>额定风速</span><span>{{ hoverfengji.rated_wind_speed }}</span>
+          <span>额定风速</span
+          ><span>{{ hoverfengji.rated_wind_speed }} m/s</span>
         </p>
         <p>
           <span>切入风速</span
-          ><span>{{ hoverfengji.ratedCutInWindspeed }}</span>
+          ><span>{{ hoverfengji.ratedCutInWindspeed }} m/s</span>
         </p>
         <p>
           <span>切出风速</span
-          ><span>{{ hoverfengji.ratedCutOutWindspeed }}</span>
+          ><span>{{ hoverfengji.ratedCutOutWindspeed }} m/s</span>
         </p>
       </div>
     </div>
@@ -79,14 +93,14 @@
           <span>经度</span><span>{{ hoverta.longitude }}</span>
         </p>
         <p>
-          <span>维度</span><span>{{ hoverta.anemometerName }}</span>
-        </p>
-        <p>
-          <span>状态</span><span>{{ hoverta.latitude }}</span>
+          <span>维度</span><span>{{ hoverta.latitude }}</span>
         </p>
+        <!-- <p>
+          <span>状态</span><span>{{  }}</span>
+        </p> -->
         <p>
           <span>测风塔高度</span
-          ><span>{{ hoverta.anemometerHeightStrings }}</span>
+          ><span>{{ hoverta.anemometerHeightStrings }}/米</span>
         </p>
       </div>
     </div>
@@ -170,7 +184,8 @@ export default {
         new TileLayer({
           source: new XYZ({
             // url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //本地
-            url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内外
+            // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
+            url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
           }),
         }),
         new VectorLayer({
@@ -267,31 +282,30 @@ export default {
           if (val == "1") {
             this.hoverInfo = feature.get("data");
             this.hoverStyle.left = `${evt.pixel[0] + 10}px`;
-            this.hoverStyle.top = `${evt.pixel[1] + 10}px`;
+            this.hoverStyle.top = `${evt.pixel[1] - 150}px`;
           } else if (val == "4") {
             this.hoverfengji = feature.get("data");
             this.hoverfengjiStyle.left = `${evt.pixel[0] + 10}px`;
-            this.hoverfengjiStyle.top = `${evt.pixel[1] + 10}px`;
-            this.currentFeatureData = feature.get("data"); // Store the feature data for click event
+            this.hoverfengjiStyle.top = `${evt.pixel[1] - 150}px`;
+            this.currentFeatureData = feature.get("data");
           } else if (val == "5") {
             this.hoverta = feature.get("data");
             this.hovertaStyle.left = `${evt.pixel[0] + 10}px`;
-            this.hovertaStyle.top = `${evt.pixel[1] + 10}px`;
-            this.currentFeatureData = feature.get("data"); // Store the feature data for click event
+            this.hovertaStyle.top = `${evt.pixel[1] - 150}px`;
+            this.currentFeatureData = feature.get("data");
           } else {
             this.hoverInfo = null;
             this.hoverfengji = false;
             this.hoverta = false;
-            this.currentFeatureData = null; // Ensure no stored feature data if val is not 3 or 4
+            this.currentFeatureData = null;
           }
         } else {
           this.hoverInfo = null;
           this.hoverfengji = false;
           this.hoverta = false;
-          this.currentFeatureData = null; // Ensure no stored feature data if there are no features
+          this.currentFeatureData = null;
         }
       });
-
       this.map.on("click", (evt) => {
         const features = this.map.getFeaturesAtPixel(evt.pixel, {
           hitTolerance: 1,
@@ -300,17 +314,12 @@ export default {
           const feature = features.at(0);
           this.$emit("feature-click", feature.get("data"));
         }
-        // Check if there's stored feature data and if it's a val === "4" feature
         if (this.currentFeatureData && this.currentFeatureData.val === "4") {
-          // Handle click event for val === "4"
           this.handleFeatureClick(this.currentFeatureData);
         }
       });
     },
-
     handleFeatureClick(featureData) {
-      // Implement your logic to handle the click event for val === "4"
-      // For example, emit an event or perform some action
       console.log("Feature with val === '4' clicked:", featureData);
     },
 

+ 36 - 33
src/views/admin/cockpitManage/Index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="map-ditu" v-loading="loading">
+  <div class="map-ditu">
     <Tmap ref="map" :maplist="maplist" @feature-click="featureClick"></Tmap>
     <div class="ledata">
       <selecttree
@@ -62,7 +62,8 @@
       :maplistArr="maplistArr"
       :defaultdata="defaultdata"
       class="ridata"
-    ></Rightdata>
+    >
+    </Rightdata>
     <router-view></router-view>
   </div>
 </template>
@@ -75,6 +76,7 @@ import {
 } from "@/api/ledger.js";
 import Tmap from "@/components/map";
 import Rightdata from "./component/rightdata.vue";
+
 export default {
   name: "Index",
   components: {
@@ -84,13 +86,12 @@ export default {
   },
   data() {
     return {
-      loading: false,
       ShowRi: true,
       treeval: "",
       value1: true,
       treeval: "", // 绑定的输入框值
       showTree: false, // 控制树列表显示
-      treeData: [], // 树列表数据,根据实际需求自行替换
+      treeData: [],
       maplist: [],
       maplistArr: {},
       totalList: [],
@@ -102,12 +103,6 @@ export default {
   created() {
     this.GETtree();
     this.GETtotal();
-
-    // 页面初始化时手动触发一次赋值操作
-    this.$watch("defaultdata", (newValue) => {
-      this.maplistArr = newValue; // 将defaultdata的值赋给maplistArr
-    });
-    this.maplistArr = this.defaultdata;
   },
   mounted() {
     //模拟地图上的点位
@@ -117,33 +112,24 @@ export default {
     //   // this.$refs.map.addMarker({ point: [116.40740,39.90420], val: "1" });
     // });
   },
-
   methods: {
     // 获取总数
     GETtotal() {
-      this.loading = true;
-      getCompanyFieldNumberVo()
-        .then((res) => {
-          this.totalList = res.data;
-          this.loading = false;
-        })
-        .catch((err) => {
-          console.error(err, "err");
-          this.loading = false;
-        });
+      getCompanyFieldNumberVo().then((res) => {
+        this.totalList = res.data;
+      });
     },
     // 获取企业数
     async GETtree() {
-      this.loading = true;
-      try {
-        const res = await getSysOrganizationAuthTreeByRoleId();
-        const treedata = res.data;
-        const processedData = this.processTreeData(treedata);
-        this.parentOpt = processedData;
-        this.defaultdata = res.data[0];
-        this.loading = false;
-      } catch (err) {
-        this.loading = false;
+      const res = await getSysOrganizationAuthTreeByRoleId();
+      const treedata = res.data;
+      const processedData = this.processTreeData(treedata);
+      this.parentOpt = processedData;
+
+      // Automatically handle the first layer of children where codeType === "field"
+      const firstLayer = this.findFirstFieldLayer(processedData);
+      if (firstLayer) {
+        this.parentChange(firstLayer);
       }
     },
     //过滤数据
@@ -163,13 +149,16 @@ export default {
         processNode(root);
         processedData.push(root);
       });
-
       return processedData;
     },
+    handleTreeData() {
+      this.treeData = this.processTreeData(this.treeData);
+    },
     parseCoordinates(input) {
       if (input && typeof input === "string") {
         return input.split(",").map(Number);
       }
+      debugger;
       return [];
     },
     parentChange(data) {
@@ -208,7 +197,20 @@ export default {
         });
       }
     },
-
+    findFirstFieldLayer(data) {
+      for (const item of data) {
+        if (item.codeType === "field") {
+          return item;
+        }
+        if (item.children && item.children.length > 0) {
+          const childResult = this.findFirstFieldLayer(item.children);
+          if (childResult) {
+            return childResult;
+          }
+        }
+      }
+      return null;
+    },
     featureClick(data) {
       console.log(data, "featureClick");
       const val = data.val;
@@ -235,6 +237,7 @@ export default {
 };
 </script>
 
+
 <style lang="scss" scoped>
 .map-ditu {
   // min-width: 86.9vw;

+ 287 - 0
src/views/admin/cockpitManage/IndexBeiF.vue

@@ -0,0 +1,287 @@
+<template>
+  <div class="map-ditu">
+    <Tmap ref="map" :maplist="maplist" @feature-click="featureClick"></Tmap>
+    <div class="ledata">
+      <selecttree
+        placeholder="请选择上级单位"
+        :list="parentOpt"
+        type="1"
+        v-model="companyCode"
+        @change="parentChange"
+        :defaultParentProps="{
+          children: 'children',
+          label: 'companyName',
+          value: 'codeNumber',
+        }"
+      >
+      </selecttree>
+
+      <p>
+        <span class="SpText">登录人风场总数:</span>
+        {{ totalList?.fieldSumNumber ? totalList.fieldSumNumber : 0 }}
+        个
+      </p>
+      <p>
+        <span class="SpText">已完成分析风场:</span>
+        {{
+          totalList?.analysisFinishNumber ? totalList.analysisFinishNumber : 0
+        }}
+        个
+      </p>
+      <p>
+        <span class="SpText">未完成分析风场:</span>
+        {{
+          totalList?.analysisUnFinishedNumber
+            ? totalList.analysisUnFinishedNumber
+            : 0
+        }}
+        个
+      </p>
+      <p>
+        <span class="SpText">风机数量:</span>
+        {{ totalList?.engineGroupNumber ? totalList.engineGroupNumber : 0 }}
+        个
+      </p>
+      <p>
+        <span class="SpText">风场状态:</span>
+        <span class="red"></span>
+        <span class="yellow"></span>
+        <span class="green"></span>
+      </p>
+      <el-switch
+        v-model="value1"
+        active-text="显示"
+        inactive-text="隐藏"
+        @change="handleSwitchChange"
+      >
+      </el-switch>
+    </div>
+    <Rightdata
+      v-show="ShowRi"
+      ref="childRef"
+      :maplistArr="maplistArr"
+      :defaultdata="defaultdata"
+      class="ridata"
+    ></Rightdata>
+    <router-view></router-view>
+  </div>
+</template>
+
+<script>
+import selecttree from "../../../components/selecttree.vue";
+import {
+  getCompanyFieldNumberVo,
+  getSysOrganizationAuthTreeByRoleId,
+} from "@/api/ledger.js";
+import Tmap from "@/components/map";
+import Rightdata from "./component/rightdata.vue";
+export default {
+  name: "Index",
+  components: {
+    Tmap,
+    Rightdata,
+    selecttree,
+  },
+  data() {
+    return {
+      ShowRi: true,
+      treeval: "",
+      value1: true,
+      treeval: "", // 绑定的输入框值
+      showTree: false, // 控制树列表显示
+      treeData: [
+
+      ],
+      maplist: [],
+      maplistArr: {},
+      totalList: [],
+      parentOpt: [],
+      companyCode: "",
+      defaultdata: {},
+    };
+  },
+  created() {
+    this.GETtree();
+    this.GETtotal();
+
+    // 页面初始化时手动触发一次赋值操作
+    this.$watch("defaultdata", (newValue) => {
+      this.maplistArr = newValue; // 将defaultdata的值赋给maplistArr
+    });
+    this.maplistArr = this.defaultdata;
+  },
+  mounted() {
+    //模拟地图上的点位
+    const data = this.maplist;
+    // data.forEach((element) => {
+    //   console.log(element);
+    //   // this.$refs.map.addMarker({ point: [116.40740,39.90420], val: "1" });
+    // });
+  },
+
+  methods: {
+    // 获取总数
+    GETtotal() {
+      getCompanyFieldNumberVo().then((res) => {
+        this.totalList = res.data;
+      });
+    },
+    // 获取企业数
+    async GETtree() {
+      const res = await getSysOrganizationAuthTreeByRoleId();
+      const treedata = res.data;
+      const processedData = this.processTreeData(treedata);
+      this.parentOpt = processedData;
+      this.defaultdata = res.data[0];
+    },
+
+    //过滤数据
+    processTreeData(treeData) {
+      const processedData = [];
+      function processNode(node) {
+        if (node.codeType === "field") {
+          node.companyName = node.fieldName;
+        }
+        if (node.children && node.children.length > 0) {
+          node.children.forEach((child) => {
+            processNode(child);
+          });
+        }
+      }
+      treeData.forEach((root) => {
+        processNode(root);
+        processedData.push(root);
+      });
+
+      return processedData;
+    },
+    parseCoordinates(input) {
+      if (input && typeof input === "string") {
+        return input.split(",").map(Number);
+      }
+      return [];
+    },
+    parentChange(data) {
+      //data为当前选中对象
+      this.$refs.map.clearMarkers();
+      this.maplist = data;
+      this.maplistArr = data;
+      console.log(data, "parentChange");
+      if (data.codeType === "field") {
+        if (this.parseCoordinates(data.longitudeAndLatitudeString).length > 0) {
+          this.$refs.map.addMarker({
+            point: this.parseCoordinates(data.longitudeAndLatitudeString),
+            val: data.analysisState,
+            ...data,
+          });
+          return;
+        }
+        this.$refs.map.clearMarkers();
+      } else {
+        const dataMapList = data.children;
+        dataMapList.forEach((element) => {
+          console.log(element);
+          if (
+            this.parseCoordinates(element.longitudeAndLatitudeString).length >
+              0 &&
+            element.codeType === "field"
+          ) {
+            this.$refs.map.addMarker({
+              point: this.parseCoordinates(element.longitudeAndLatitudeString),
+              val: element.analysisState,
+              ...element,
+            });
+            return;
+          }
+          this.$refs.map.clearMarkers();
+        });
+      }
+    },
+
+    featureClick(data) {
+      console.log(data, "featureClick");
+      const val = data.val;
+      if (val === "-1" || val === -1) {
+        this.$message.error("当前风场未进行分析");
+      } else if (val === "0" || val === 0) {
+        this.$message({
+          message: "当前风场正在分析中",
+          type: "warning",
+        });
+      } else if (val === "1" || val === 1) {
+        this.$router.push({
+          path: "cockpitManage/electronic-map",
+          query: {
+            fieldCode: data.codeNumber,
+          },
+        });
+      }
+    },
+    handleSwitchChange() {
+      this.ShowRi = !this.ShowRi;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.map-ditu {
+  // min-width: 86.9vw;
+  // max-width: 94.9vw;
+  height: 93vh;
+  position: relative;
+}
+
+.ridata {
+  position: absolute;
+  top: 20px;
+  right: 20px;
+}
+
+.ledata {
+  font-size: 14px;
+  width: 300px;
+  position: absolute;
+  top: 20px;
+  left: 60px;
+  background: #008080;
+  padding: 10px;
+  color: #fff;
+  border-radius: 5px;
+
+  p {
+    line-height: 24px;
+
+    .SpText {
+      display: inline-block;
+      width: 120px;
+      text-align: right;
+    }
+
+    .red,
+    .yellow,
+    .green {
+      display: inline-block;
+      width: 30px;
+      height: 12px;
+      margin-right: 5px;
+    }
+
+    .red {
+      background-color: #e16757;
+    }
+
+    .yellow {
+      background-color: #eecb5f;
+    }
+
+    .green {
+      background-color: #7ecf51;
+    }
+  }
+}
+
+::v-deep .el-switch__label.is-active {
+  color: #fff;
+}
+</style>

+ 63 - 32
src/views/dataAdministration/index.vue

@@ -132,7 +132,10 @@
               size="small"
               >编辑</el-button
             >
-            <el-button @click="handleClick(scope.row)" type="text" size="small"
+            <el-button
+              @click="handleClick(scope.row.downloadUrl)"
+              type="text"
+              size="small"
               >下载</el-button
             >
             <el-button
@@ -175,6 +178,7 @@
       :visible.sync="nuedialog"
       class="dialogBox"
       width="900px"
+      :before-close="handleCloses"
     >
       <div v-loading="loadingView" class="views">
         <el-form ref="form" :model="newform" label-width="150px">
@@ -252,6 +256,7 @@
       :visible.sync="editNuedialog"
       class="dialogBox"
       width="900px"
+      :before-close="handleCloses"
     >
       <div v-loading="loadingViewEdit" class="views">
         <el-form
@@ -352,7 +357,12 @@
       </div>
     </el-dialog>
     <!-- 异常信息详情 -->
-    <el-dialog title="异常详情" :visible.sync="unusualdialog" width="800px">
+    <el-dialog
+      title="异常详情"
+      :visible.sync="unusualdialog"
+      width="800px"
+      :before-close="handleCloses"
+    >
       {{ errInfo }}
     </el-dialog>
     <!-- 转换\重新转换 -->
@@ -360,6 +370,7 @@
       :title="editTransferStateTitle"
       :visible.sync="editTransferStateLoading"
       width="400px"
+      :before-close="handleCloses"
     >
       <div v-loading="loadingViewEdit" class="views">
         <el-form
@@ -486,6 +497,14 @@ export default {
     this.getBatchCodeList();
   },
   methods: {
+    handleCloses(done) {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          this.getBatchCodeList();
+          done();
+        })
+        .catch((_) => {});
+    },
     ensureMinValue(item, field) {
       if (item[field] < 1) {
         item[field] = 1;
@@ -497,6 +516,7 @@ export default {
       this.editTransferStateForm.dataTransferTypePath = "";
       this.editTransferStateLoading = false;
       this.loadingViewEdit = false;
+      this.getBatchCodeList();
     },
     editStately(formName) {
       this.$refs[formName].validate((valid) => {
@@ -542,6 +562,7 @@ export default {
       this.editNuedialog = false;
       this.loadingViewEdit = false;
       this.getTableList();
+      this.getBatchCodeList();
     },
     editly(formName) {
       this.$refs[formName].validate((valid) => {
@@ -655,38 +676,48 @@ export default {
       this.errInfo = row.errInfo;
     },
     //下载
-    async handleClick() {
-      try {
-        // 获取 HTML 内容
-        const response = await axios.get("/downLoadApi", {
-          responseType: "blob",
-        }); // 确保响应类型为 Blob
-        const reader = new FileReader();
-        reader.onload = function (event) {
-          const htmlContent = event.target.result; // 读取的 HTML 内容
-          const newWindow = window.open("", "_blank");
-          newWindow.document.open();
-          newWindow.document.write(htmlContent);
-          newWindow.document.close();
-          // 获取当前页面的 URL
-          const currentUrl = window.location.href;
-          const proxyUrl = currentUrl.substring(0, currentUrl.indexOf("/", 8)); // 从第8个字符开始搜索,找到第一个 "/" 为止
-          // 拼接代理地址和接口路径
-          const apiEndpoint = proxyUrl + "/downLoadApi";
-
-          // 拼接新的路径
-          const newUrl = apiEndpoint + "/downLoadApi";
-          // 设置 base 元素
-          const baseElement = newWindow.document.createElement("base");
-          baseElement.href = newUrl; // 使用代理地址和接口路径
-          newWindow.document.head.appendChild(baseElement);
-        };
-        reader.readAsText(response.data, "utf-8"); // 以 UTF-8 编码读取 Blob
-      } catch (error) {
-        console.error("Failed to fetch data:", error);
-        this.$message.error("无法打开新链接");
+    async handleClick(downloadUrl) {
+      let newWindow = window.open(downloadUrl, "_blank");
+      if (
+        !newWindow ||
+        newWindow.closed ||
+        typeof newWindow.closed == "undefined"
+      ) {
+        alert("弹出窗口已被阻止!请允许弹出式窗口访问本网站。");
       }
     },
+    // async handleClick() {
+    //   try {
+    //     // 获取 HTML 内容
+    //     const response = await axios.get("/downLoadApi", {
+    //       responseType: "blob",
+    //     }); // 确保响应类型为 Blob
+    //     const reader = new FileReader();
+    //     reader.onload = function (event) {
+    //       const htmlContent = event.target.result; // 读取的 HTML 内容
+    //       const newWindow = window.open("", "_blank");
+    //       newWindow.document.open();
+    //       newWindow.document.write(htmlContent);
+    //       newWindow.document.close();
+    //       // 获取当前页面的 URL
+    //       const currentUrl = window.location.href;
+    //       const proxyUrl = currentUrl.substring(0, currentUrl.indexOf("/", 8)); // 从第8个字符开始搜索,找到第一个 "/" 为止
+    //       // 拼接代理地址和接口路径
+    //       const apiEndpoint = proxyUrl + "/downLoadApi";
+
+    //       // 拼接新的路径
+    //       const newUrl = apiEndpoint + "/downLoadApi";
+    //       // 设置 base 元素
+    //       const baseElement = newWindow.document.createElement("base");
+    //       baseElement.href = newUrl; // 使用代理地址和接口路径
+    //       newWindow.document.head.appendChild(baseElement);
+    //     };
+    //     reader.readAsText(response.data, "utf-8"); // 以 UTF-8 编码读取 Blob
+    //   } catch (error) {
+    //     console.error("Failed to fetch data:", error);
+    //     this.$message.error("无法打开新链接");
+    //   }
+    // },
     async getTableList() {
       try {
         this.loading = true;

+ 6 - 0
src/views/home/Index.vue

@@ -5,6 +5,11 @@
       <el-main>
         <HeaderCom @setLoding="setLoding"></HeaderCom>
         <!-- 主体内容-->
+        <!-- <el-scrollbar>
+          <ul>
+            <li v-for="(item, index) in history" :key="index">{{ item }}</li>
+          </ul>
+        </el-scrollbar> -->
         <transition name="slide-fade">
           <div class="">
             <router-view />
@@ -26,6 +31,7 @@ export default {
   },
   data() {
     return {
+      // history: ["11", "22", "33"],
       loading: false,
     };
   },

+ 2 - 2
src/views/ledger/anemometer.vue

@@ -475,12 +475,12 @@ export default {
 
     // 数字验证
     validateNumber(rule, value, callback) {
-      const numberRegex = /^\d{1,3}(\.\d{1,5})?$/; // 匹配不超过四位数且小数点后不超过二位数的数字
+      const numberRegex = /^\d{1,3}(\.\d{1,8})?$/; // 匹配不超过四位数且小数点后不超过二位数的数字
       if (!value) {
         callback(new Error("该项不能为空"));
       } else if (!numberRegex.test(value)) {
         callback(
-          new Error("该项必须为不超过三位数且小数点后不超过位数的数字")
+          new Error("该项必须为不超过三位数且小数点后不超过位数的数字")
         );
       } else {
         callback();

+ 10 - 2
src/views/ledger/component/windsitetower.vue

@@ -31,6 +31,10 @@
         >
         </el-table-column>
         <el-table-column prop="sightcing" align="center" label="是否标杆">
+          <template slot-scope="scope">
+          <span v-if="scope.row.sightcing === 1 || scope.row.sightcing === '是'">是</span>
+          <span v-else-if="scope.row.sightcing === 2 || scope.row.sightcing === '否'">否</span>
+        </template>
         </el-table-column>
         <el-table-column
           prop="elevationHeight"
@@ -48,7 +52,11 @@
           width="80"
         >
         </el-table-column>
-        <el-table-column prop="ratedCapacity" align="center" label="额定容量">
+        <el-table-column
+          prop="ratedCapacity"
+          align="center"
+          label="额定容量(kW)"
+        >
         </el-table-column>
       </el-table>
 
@@ -176,4 +184,4 @@ export default {
     color: #409eff;
   }
 }
-</style>
+</style>

+ 4 - 4
src/views/ledger/draught.vue

@@ -353,7 +353,7 @@
         </div>
         <div class="condition">
           <p>额定容量:</p>
-          <span>{{ particularsdata.ratedCapacity }}</span> <span>(MW)</span>
+          <span>{{ particularsdata.ratedCapacity }}</span> <span>(kW)</span>
         </div>
 
         <div class="condition">
@@ -470,7 +470,7 @@ export default {
           { required: true, message: "请输入机型编号", trigger: "blur" },
         ],
         ratedCapacity: [
-          { required: true, message: "请输入额定容量", trigger: "blur" },
+          { required: true, message: "请输入额定容量(kW)", trigger: "blur" },
         ],
         longitude: [
           { required: true, message: "请输入经度", trigger: "blur" },
@@ -562,12 +562,12 @@ export default {
     },
     // 数字验证
     validateNumber(rule, value, callback) {
-      const numberRegex = /^\d{1,3}(\.\d{1,5})?$/; // 匹配不超过四位数且小数点后不超过二位数的数字
+      const numberRegex = /^\d{1,3}(\.\d{1,8})?$/; // 匹配不超过四位数且小数点后不超过二位数的数字
       if (!value) {
         callback(new Error("该项不能为空"));
       } else if (!numberRegex.test(value)) {
         callback(
-          new Error("该项必须为不超过三位数且小数点后不超过位数的数字")
+          new Error("该项必须为不超过三位数且小数点后不超过位数的数字")
         );
       } else {
         callback();

+ 2 - 2
src/views/ledger/enterprise.vue

@@ -206,7 +206,7 @@
         <el-table-column
           prop="elevationHeight"
           align="center"
-          label="海拔高度"
+          label="海拔高度/米"
           width="80"
         >
         </el-table-column>
@@ -217,7 +217,7 @@
         <el-table-column
           prop="ratedCapacityNumber"
           align="center"
-          label="额定容量"
+          label="额定容量/kW"
           width="80"
         >
         </el-table-column>

+ 1 - 1
src/views/ledger/milltype.vue

@@ -287,7 +287,7 @@
         </div>
         <div class="condition">
           <p>叶轮直径:</p>
-          <span>{{ particularsdata.rotorDiameter }}(m)</span>
+          <span>{{ particularsdata.rotorDiameter }}()</span>
         </div>
         <div class="condition">
           <p>传动比-转速比:</p>

+ 5 - 5
src/views/ledger/windsite copy.vue

@@ -189,7 +189,7 @@
               </el-form-item>
             </div>
             <div class="condition">
-              <el-form-item label="海拔高度:" prop="elevationHeight">
+              <el-form-item label="海拔高度/米:" prop="elevationHeight">
                 <el-input v-model="form.elevationHeight"></el-input>
               </el-form-item>
             </div>
@@ -466,10 +466,10 @@ export default {
   },
   methods: {
     handleClose(value, dialogName) {
-  this[dialogName] = value;
-  this.$refs.formRef.resetFields();
-  this.form = Object.assign({}, this.$options.data().form);
-},
+      this[dialogName] = value;
+      this.$refs.formRef.resetFields();
+      this.form = Object.assign({}, this.$options.data().form);
+    },
 
     // 列表居中展示
     rowStyle() {

+ 8 - 4
src/views/ledger/windsite.vue

@@ -468,7 +468,10 @@ export default {
   methods: {
     handleClose(value, dialogName) {
       this[dialogName] = value;
-      this.$refs.formRef.resetFields();
+      if (this.$refs.formRef) {
+        this.$refs.formRef.resetFields();
+      }
+      // this.$refs.formRef.resetFields();
       this.form = Object.assign({}, this.$options.data().form);
     },
 
@@ -557,6 +560,7 @@ export default {
         pageSize: 10,
       };
       this.loading = true;
+
       WindFieldListPage(paramsData)
         .then((res) => {
           this.tableData = res.data.list;
@@ -815,8 +819,8 @@ export default {
         case "longitude":
         case "latitude":
           return {
-            regex: /^\d{1,3}(\.\d{1,5})?$/,
-            errorMessage: "该项必须为不超过三位数且小数点后不超位数的数字",
+            regex: /^\d{1,3}(\.\d{1,8})?$/,
+            errorMessage: "该项必须为不超过三位数且小数点后不超位数的数字",
           };
         default:
           return {
@@ -843,7 +847,7 @@ export default {
     width: 50%;
 
     .el-select {
-      width: 260px;
+      width: 360px;
     }
 
     .el-form-item {

+ 14 - 2
src/views/performance/batchMag.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:23:37
- * @LastEditTime: 2024-06-18 16:08:24
+ * @LastEditTime: 2024-06-25 11:16:07
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/batchMag.vue
@@ -140,7 +140,12 @@
 
     <!-- 弹出层 -->
     <!-- 新增 /编辑-->
-    <el-dialog :title="title" :visible.sync="nuedialog" width="500px">
+    <el-dialog
+      :title="title"
+      :visible.sync="nuedialog"
+      width="500px"
+      :before-close="handleCloses"
+    >
       <div v-loading="loadingView" class="views">
         <el-form
           :model="ruleForm"
@@ -249,6 +254,13 @@ export default {
   },
 
   methods: {
+    handleCloses(done) {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          done();
+        })
+        .catch((_) => {});
+    },
     onDateChange(date) {
       if (Array.isArray(date)) {
         this.startDate = this.$formatDate(date[0]);

+ 34 - 7
src/views/performance/components/EditAnalysis.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:14:23
- * @LastEditTime: 2024-06-17 16:11:54
+ * @LastEditTime: 2024-06-25 10:04:12
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/EditAnalysis.vue
@@ -76,21 +76,48 @@
                 ></el-option>
               </el-select>
             </div>
-            <div>1.额定容量:{{ windDetail.ratedCapacity }}</div>
+            <div>
+              1.额定容量:{{
+                windDetail.ratedCapacity ? windDetail.ratedCapacity : 0
+              }}
+              <span> (kW)</span>
+            </div>
             <!-- <div>2.发电机类型(Generator Type):{{}}</div> -->
             <div>2.风机编号:{{ windDetail.engineCode }}</div>
             <div>3.经度(Longitude):{{ windDetail.longitude }}</div>
             <div>4.维度(Dimensionality):{{ windDetail.latitude }}</div>
-            <div>5.海拔高度(Altitude):{{ windDetail.elevationHeight }}</div>
+            <div>
+              5.海拔高度(Altitude):{{
+                windDetail.elevationHeight ? windDetail.elevationHeight : 0
+              }}
+              <span>(米)</span>
+            </div>
             <div>6.风机名称:{{ windDetail.engineName }}</div>
             <div>
-              7.是否标杆(Benchmarking or not):{{ windDetail.sightcing }}
+              7.是否标杆(Benchmarking or not):{{
+                windDetail.sightcing == 1 ? "是" : "否"
+              }}
             </div>
             <div>8.风场编号:{{ windDetail.fieldCode }}</div>
-            <div>9.轮毂高度:{{ windDetail.hubHeight }}</div>
+            <div>
+              9.轮毂高度:{{ windDetail.hubHeight ? windDetail.hubHeight : 0 }}
+              <span>(米)</span>
+            </div>
             <div>10.机型编号:{{ windDetail.millTypeCode }}</div>
-            <div>11.切入风速:{{ windDetail.ratedCutInWindspeed }}</div>
-            <div>12.切出风速:{{ windDetail.ratedCutOutWindspeed }}</div>
+            <div>
+              11.切入风速:{{
+                windDetail.ratedCutInWindspeed
+                  ? windDetail.ratedCutInWindspeed
+                  : 0
+              }}<span>(m/s)</span>
+            </div>
+            <div>
+              12.切出风速:{{
+                windDetail.ratedCutOutWindspeed
+                  ? windDetail.ratedCutOutWindspeed
+                  : 0
+              }}<span>(m/s)</span>
+            </div>
           </div>
         </el-col>
         <el-col :span="12"

+ 38 - 8
src/views/performance/components/analysisEvent.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:13:51
- * @LastEditTime: 2024-06-19 14:03:49
+ * @LastEditTime: 2024-06-25 16:30:49
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
@@ -522,21 +522,48 @@
                 ></el-option>
               </el-select>
             </div>
-            <div>1.额定容量:{{ windDetail.ratedCapacity }}</div>
+            <div>
+              1.额定容量:{{
+                windDetail.ratedCapacity ? windDetail.ratedCapacity : 0
+              }}
+              <span> (kW)</span>
+            </div>
             <!-- <div>2.发电机类型(Generator Type):{{}}</div> -->
             <div>2.风机编号:{{ windDetail.engineCode }}</div>
             <div>3.经度(Longitude):{{ windDetail.longitude }}</div>
             <div>4.维度(Dimensionality):{{ windDetail.latitude }}</div>
-            <div>5.海拔高度(Altitude):{{ windDetail.elevationHeight }}</div>
+            <div>
+              5.海拔高度(Altitude):{{
+                windDetail.elevationHeight ? windDetail.elevationHeight : 0
+              }}
+              <span>(米)</span>
+            </div>
             <div>6.风机名称:{{ windDetail.engineName }}</div>
             <div>
-              7.是否标杆(Benchmarking or not):{{ windDetail.sightcing }}
+              7.是否标杆(Benchmarking or not):{{
+                windDetail.sightcing == 1 ? "是" : "否"
+              }}
             </div>
             <div>8.风场编号:{{ windDetail.fieldCode }}</div>
-            <div>9.轮毂高度:{{ windDetail.hubHeight }}</div>
+            <div>
+              9.轮毂高度:{{ windDetail.hubHeight ? windDetail.hubHeight : 0 }}
+              <span> (米)</span>
+            </div>
             <div>10.机型编号:{{ windDetail.millTypeCode }}</div>
-            <div>11.切入风速:{{ windDetail.ratedCutInWindspeed }}</div>
-            <div>12.切出风速:{{ windDetail.ratedCutOutWindspeed }}</div>
+            <div>
+              11.切入风速:{{
+                windDetail.ratedCutInWindspeed
+                  ? windDetail.ratedCutInWindspeed
+                  : 0
+              }}<span> (m/s)</span>
+            </div>
+            <div>
+              12.切出风速:{{
+                windDetail.ratedCutOutWindspeed
+                  ? windDetail.ratedCutOutWindspeed
+                  : 0
+              }}<span> (m/s)</span>
+            </div>
             <!-- <div>8.地理位置(Location):不同地理位置的气候条件{{}}</div>
             <div>
               9.供应商信息(Manufacturer
@@ -900,7 +927,10 @@ export default {
     }
   }
 }
-.drawerOption {
+::v-deep.drawerOption {
+  .el-drawer {
+    width: 33% !important;
+  }
   .el-checkbox-group {
     line-height: 40px !important;
   }

+ 9 - 1
src/views/performance/components/dialogCom.vue

@@ -2,7 +2,7 @@
   <el-dialog
     :visible.sync="dialogVisible"
     :title="title"
-    :before-close="handleClose"
+    :before-close="handleCloses"
     :width="title === '异常详情' ? '750px' : '1120px'"
   >
     <!-- 根据 emptyFlag 和 title 显示不同的内容 -->
@@ -63,6 +63,14 @@ export default {
     handleClose() {
       this.$emit("confirm");
     },
+    handleCloses(done) {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          done();
+          this.$emit("confirm");
+        })
+        .catch((_) => {});
+    },
     handleConfirm() {
       // 获取插槽内容并传递出去
       const slotContent = this.$slots.tableEl;

+ 8 - 0
src/views/system/menuMag/index.vue

@@ -127,6 +127,7 @@
       :visible.sync="unusualdialog"
       width="500px"
       @close="handleClose"
+      :before-close="handleCloses"
     >
       <div v-loading="loadingView" class="views">
         <el-tabs type="border-card" class="tabs" v-model="activeName">
@@ -214,6 +215,13 @@ export default {
     },
   },
   methods: {
+    handleCloses(done) {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          done();
+        })
+        .catch((_) => {});
+    },
     selected(name) {
       console.log(name);
       this.piconUrl = name;

+ 21 - 4
src/views/system/roleMag/index.vue

@@ -162,7 +162,12 @@
 
     <!-- 弹出层 -->
     <!-- 新增 /编辑-->
-    <el-dialog :title="title" :visible.sync="nuedialog" width="500px">
+    <el-dialog
+      :title="title"
+      :visible.sync="nuedialog"
+      width="500px"
+      :before-close="handleClose"
+    >
       <div v-loading="loadingView" class="views">
         <el-form
           :model="ruleForm"
@@ -213,7 +218,12 @@
       </div>
     </el-dialog>
     <!-- 权限设置 -->
-    <el-dialog title="权限设置" :visible.sync="unusualdialog" width="500px">
+    <el-dialog
+      title="权限设置"
+      :visible.sync="unusualdialog"
+      width="500px"
+      :before-close="handleClose"
+    >
       <div v-loading="loadingView" class="views">
         <el-form
           :model="editRoleAuth"
@@ -228,7 +238,7 @@
           >
             <el-input
               disabled
-              v-model.number="editRoleAuth.roleName"
+              v-model="editRoleAuth.roleName"
               autocomplete="off"
             ></el-input>
           </el-form-item>
@@ -239,7 +249,7 @@
           >
             <el-input
               disabled
-              v-model.number="editRoleAuth.roleCode"
+              v-model="editRoleAuth.roleCode"
               autocomplete="off"
             ></el-input>
           </el-form-item>
@@ -360,6 +370,13 @@ export default {
     this.getTableList();
   },
   methods: {
+    handleClose(done) {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          done();
+        })
+        .catch((_) => {});
+    },
     //修改权限
     editAuthMenu(formName) {
       this.$refs[formName].validate((valid) => {

+ 23 - 6
src/views/system/userMag/index.vue

@@ -74,10 +74,10 @@
             <span>
               {{
                 scope.row.state == 0
-                  ? "未启用"
+                  ? "用"
                   : scope.row.state == 1
                   ? "启用"
-                  : "禁用"
+                  : "/"
               }}</span
             >
           </template>
@@ -141,7 +141,12 @@
 
     <!-- 弹出层 -->
     <!-- 新增 /编辑-->
-    <el-dialog :title="title" :visible.sync="nuedialog" width="500px">
+    <el-dialog
+      :title="title"
+      :visible.sync="nuedialog"
+      width="500px"
+      :before-close="handleClose"
+    >
       <div v-loading="loadingView" class="views">
         <el-form
           :model="ruleForm"
@@ -206,7 +211,12 @@
       </div>
     </el-dialog>
     <!-- 风场详情 -->
-    <el-dialog title="修改密码" :visible.sync="unusualdialog" width="500px">
+    <el-dialog
+      title="修改密码"
+      :visible.sync="unusualdialog"
+      width="500px"
+      :before-close="handleClose"
+    >
       <div v-loading="loadingView" class="views">
         <el-form
           :model="editUserPassword"
@@ -220,7 +230,7 @@
             :rules="[{ required: true, message: '旧密码不能为空' }]"
           >
             <el-input
-              v-model.number="editUserPassword.oldPWD"
+              v-model="editUserPassword.oldPWD"
               autocomplete="off"
               show-password
             ></el-input>
@@ -231,7 +241,7 @@
             :rules="[{ required: true, message: '新密码不能为空' }]"
           >
             <el-input
-              v-model.number="editUserPassword.newPWD"
+              v-model="editUserPassword.newPWD"
               autocomplete="off"
               show-password
             ></el-input>
@@ -352,6 +362,13 @@ export default {
   },
 
   methods: {
+    handleClose(done) {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          done();
+        })
+        .catch((_) => {});
+    },
     //修改密码
     editUserPwd(formName) {
       this.$refs[formName].validate((valid) => {

+ 10 - 7
vue.config.js

@@ -73,13 +73,13 @@ module.exports = {
           "^/api": "", // 需要regit write重写的,
         },
       },
-      "/downLoadApi": {
-        target: "http://192.168.50.241:8080", //http://192.168.50.241:8080/
-        changeOrigin: true,
-        pathRewrite: {
-          "^/downLoadApi": "", // 需要rewrite重写的,z
-        },
-      },
+      // "/downLoadApi": {
+      //   target: "http://192.168.50.241:8080", //http://192.168.50.241:8080/
+      //   changeOrigin: true,
+      //   pathRewrite: {
+      //     "^/downLoadApi": "", // 需要rewrite重写的,z
+      //   },
+      // },
     },
   },
 
@@ -113,4 +113,7 @@ module.exports = {
       patterns: [],
     },
   },
+  configureWebpack: {
+    devtool: "source-map",
+  },
 };

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio