Browse Source

验证增加

rui.jiang 1 year ago
parent
commit
85c715886e

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


+ 17 - 0
src/api/ledger.js

@@ -432,4 +432,21 @@ export function getWindEngineGroupByFieldCode(data) {
     method: 'post',
     data
   })
+}
+
+// 驾驶舱右侧
+export function queryStatistics(data) {
+  return request({
+    url: '/energy-manage-service/homePage/queryStatistics',
+    method: "get",
+    data
+  })
+}
+
+export function queryOptionRecords(data) {
+  return request({
+    url: '/energy-manage-service/homePage/queryOptionRecords',
+    method: 'get',
+    data
+  })
 }

+ 1 - 1
src/components/HeaderCom.vue

@@ -80,7 +80,7 @@ export default {
   watch: {
     "$store.state.themes.theme": {
       handler(newTheme) {
-        console.log(newTheme, "newTheme");
+        // console.log(newTheme, "newTheme");
         this.currentTheme = newTheme;
       },
       immediate: true,

+ 3 - 2
src/components/map/index.vue

@@ -121,7 +121,8 @@ export default {
       layers: [
         new TileLayer({
           source: new XYZ({
-            url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //根据自己实际的地理位置
+            url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //本地
+            // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内外
           }),
         }),
         new VectorLayer({
@@ -131,7 +132,7 @@ export default {
       ],
       controls: defaultControls().extend([new ZoomSlider()]),
     });
-    console.log(this.map.getView().calculateExtent());
+    // console.log(this.map.getView().calculateExtent());
     this.initEvent();
   },
   methods: {

+ 3 - 1
src/components/selecttree.vue

@@ -5,7 +5,6 @@
       v-model="newVal"
       :placeholder="placeholder"
       :filter-method="filterTree"
-
       @change="$forceUpdate()"
       @clear="clear"
       popper-append-to-body
@@ -89,6 +88,9 @@ export default {
           if (check) {
             this.label = check.companyName;
           }
+        } else {
+          this.newVal = "";
+          this.label = "";
         }
       },
       deep: true, // 深度监听

+ 6 - 3
src/main.js

@@ -46,12 +46,15 @@ Vue.prototype.$formatDate = function (date) {
 Vue.directive("lazy-load", lazyLoad);
 
 // 时间戳转换
-Vue.prototype.$formatDate = function (timestamp) {
+Vue.prototype.$formatDateTWO = function (timestamp) {
   const date = new Date(timestamp);
   const year = date.getFullYear();
   const month = String(date.getMonth() + 1).padStart(2, "0");
   const day = String(date.getDate()).padStart(2, "0");
-  return `${year}-${month}-${day}`;
+  const hours = String(date.getHours()).padStart(2, "0");
+  const minutes = String(date.getMinutes()).padStart(2, "0");
+  const seconds = String(date.getSeconds()).padStart(2, "0");
+  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 };
 
 new Vue({
@@ -71,7 +74,7 @@ new Vue({
   methods: {
     async applyTheme(theme, oldTheme) {
       const themeFile = theme || this.$store.state.themes.theme;
-      console.log(theme, oldTheme, "themeFile");
+      // console.log(theme, oldTheme, "themeFile");
 
       // 动态加载新的主题样式
       try {

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

@@ -17,7 +17,7 @@
       </selecttree>
 
       <p>
-        <span class="SpText">风场总数:</span>{{ totalList.fieldSumNumber }} 个
+        <span class="SpText">登录人风场总数:</span>{{ totalList.fieldSumNumber }} 个
       </p>
       <p>
         <span class="SpText">已完成分析风场:</span
@@ -41,12 +41,17 @@
         v-model="value1"
         active-text="显示"
         inactive-text="隐藏"
-   
         @change="handleSwitchChange"
       >
       </el-switch>
     </div>
-    <Rightdata v-show="ShowRi" class="ridata"></Rightdata>
+    <Rightdata
+      v-show="ShowRi"
+      ref="childRef"
+      :maplistArr="maplistArr"
+      :defaultdata="defaultdata"
+      class="ridata"
+    ></Rightdata>
     <router-view></router-view>
   </div>
 </template>
@@ -74,40 +79,45 @@ export default {
       treeval: "", // 绑定的输入框值
       showTree: false, // 控制树列表显示
       treeData: [
-        // 树列表数据,根据实际需求自行替换
-        {
-          id: 1,
-          label: "Node 1",
-          children: [
-            {
-              id: 2,
-              label: "Node 1-1",
-            },
-          ],
-        },
-        {
-          id: 3,
-          label: "Node 2",
-        },
-      ],
-      maplist: [
-        // { point: [116.4074, 39.9042], val: "1" },
-        // { point: [104.0657, 30.6595], val: "2" },
-        // { point: [108.9402, 34.3416], val: "3" },
+        // // 树列表数据,根据实际需求自行替换
+        // {
+        //   id: 1,
+        //   label: "Node 1",
+        //   children: [
+        //     {
+        //       id: 2,
+        //       label: "Node 1-1",
+        //     },
+        //   ],
+        // },
+        // {
+        //   id: 3,
+        //   label: "Node 2",
+        // },
       ],
+      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" });
@@ -127,6 +137,7 @@ export default {
       const treedata = res.data;
       const processedData = this.processTreeData(treedata);
       this.parentOpt = processedData;
+      this.defaultdata = res.data[0];
     },
 
     //过滤数据
@@ -159,6 +170,7 @@ export default {
       //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) {
@@ -280,6 +292,4 @@ export default {
   left: 10px;
   width: 280px;
 }
-
-
 </style>

+ 94 - 97
src/views/admin/cockpitManage/component/rightdata.vue

@@ -5,26 +5,25 @@
       <div id="main" style="width: 260px; height: 160px"></div>
     </div>
     <div>
-      <h3 >异常设备概览</h3>
+      <h3>异常设备概览</h3>
       <div class="BOX">
         <div style="display: flex">
           <div class="YC01">
-            <strong>0</strong>
+            <strong>{{ equipment.errCounrt }}</strong>
             <span>异常总数</span>
           </div>
           <div class="YC02">
-            <strong>0</strong>
+            <strong>{{ equipment.errCountInCurrentMonth }}</strong>
             <span>本月异常</span>
           </div>
         </div>
-
         <div style="display: flex">
           <div class="YC02">
-            <strong class="textred">0</strong>
+            <strong class="textred">{{ equipment.errCountNotDeal }}</strong>
             <span>未处理异常</span>
           </div>
           <div class="YC02">
-            <strong class="texyellow">0</strong>
+            <strong class="texyellow">{{ equipment.errDeviceCount }}</strong>
             <span>异常设备数</span>
           </div>
           <div class="YC03"></div>
@@ -32,7 +31,7 @@
       </div>
     </div>
     <div>
-      <h3 style="margin: 8px 0;">异常数据信息</h3>
+      <h3 style="margin: 8px 0">异常数据信息</h3>
       <p class="titleYC"><span>风场名称</span><span>风机信息</span></p>
       <Tabroll
         :table-data="YCtableData"
@@ -41,14 +40,9 @@
         :column-widths="YCcolumnWidths"
         :max-height="120"
       ></Tabroll>
-      <!-- <dv-scroll-board
-        :config="config"
-        :headerBGC="'#666666'"
-        style="height: 150px"
-      /> -->
     </div>
     <div>
-      <h3 style="margin: 8px 0;">近期操作记录</h3>
+      <h3 style="margin: 8px 0">性能分析操作记录</h3>
       <p class="titleJQ">
         <span>名字</span><span>日期</span><span>操作记录</span>
       </p>
@@ -64,84 +58,76 @@
 </template>
 
 <script>
+import { queryStatistics, queryOptionRecords } from "@/api/ledger.js";
 import * as echarts from "echarts";
 import Tabroll from "./tabroll.vue";
+
 export default {
+  props: {
+    maplistArr: {
+      type: Object,
+      default: () => ({}),
+    },
+    defaultdata: {
+      type: Object,
+      default: () => ({}),
+    },
+  },
+
+  watch: {
+    maplistArr: {
+      handler(newVal) {
+        if (Object.keys(newVal).length > 0) { // 检查maplistArr是否有值
+          console.log("Map list updated:", newVal);
+          this.getStatistics();
+          this.getOptionRecords();
+        }
+      },
+      immediate: true, // 立即执行一次handler
+      deep: true,      // 深度监听对象内部变化
+    },
+  },
   components: {
     Tabroll,
   },
-
   data() {
     return {
-      // config: {
-      //   header: ["风场名称", "风机信息"],
-      //   data: [
-      //     ["行1列1", "行1列2"],
-      //     ["行2列1", "行2列2"],
-      //     ["行3列1", "行3列2"],
-      //     ["行4列1", "行4列2"],
-      //     ["行5列1", "行5列2"],
-      //     ["行6列1", "行6列2"],
-      //     ["行7列1", "行7列2"],
-      //     ["行8列1", "行8列2"],
-      //     ["行9列1", "行9列2"],
-      //     ["行10列1", "行10列2"],
-      //   ],
-      //   headerBGC: "#004F5F",
-      //   oddRowBGC: "#004F5F",
-      //   evenRowBGC: "#028A8A",
-      // },
-
       myChart: null,
-      YCtableData: [
-        { name: "唐龙三期风电场", date: "XXXX001号风机" },
-        { name: "唐龙三期风电场", date: "XXXX001号风机" },
-        { name: "唐龙三期风电场", date: "XXXX001号风机" },
-        { name: "唐龙三期风电场", date: "XXXX001号风机" },
-        { name: "唐龙三期风电场", date: "XXXX001号风机" },
-        { name: "唐龙三期风电场", date: "XXXX001号风机" },
-      ],
-      tableData: [
-        { name: "王小虎", date: "2020-02-20", record: "操作了性能分析" },
-        { name: "王小虎", date: "2020-02-20", record: "操作了性能分析" },
-        { name: "王小虎", date: "2020-02-20", record: "操作了性能分析" },
-        { name: "王小虎", date: "2020-02-20", record: "操作了性能分析" },
-        { name: "王小虎", date: "2020-02-20", record: "操作了性能分析" },
-        { name: "王小虎", date: "2020-02-20", record: "操作了性能分析" },
-      ],
+      YCtableData: [],
       shujuloading: false,
+      YCtableColumns: [{ prop: "fieldName" }, { prop: "engineName" }],
+      YCcolumnWidths: {
+        fieldName: 120,
+      },
+      tableData: [],
       tableColumns: [
-        { prop: "name", label: "姓名" },
-        { prop: "date", label: "日期" },
-        { prop: "record", label: "记录" },
+        { prop: "optionByName" },
+        { prop: "createTime" },
+        { prop: "optionContent" },
       ],
-      YCtableColumns: [
-        { prop: "name", label: "姓名" },
-        { prop: "date", label: "日期" },
-
-      ],
-
       columnWidths: {
-        // 列宽度信息
-        name: 60,
-        date: 90,
+        optionByName: 60,
+        createTime: 100,
       },
-      YCcolumnWidths: {
-        name: 120,
+      equipment: {
+        analysisedCount: 0,
+        analysisingCount: 0,
+        noAnalysisCount: 0,
       },
     };
   },
+  created() {},
   mounted() {
     this.initChart();
   },
-
   methods: {
     initChart() {
       var chartDom = document.getElementById("main");
-      var myChart = echarts.init(chartDom);
-      var option;
-
-      option = {
+      this.myChart = echarts.init(chartDom);
+      this.updateChart();
+    },
+    updateChart() {
+      var option = {
         tooltip: {
           trigger: "item",
           formatter: function (params) {
@@ -152,7 +138,7 @@ export default {
         legend: {
           orient: "vertical",
           left: "left",
-          top: "30%", // 将图例向下移动一些
+          top: "30%",
         },
         series: [
           {
@@ -166,23 +152,53 @@ export default {
             labelLine: {
               show: false,
             },
-            center: ["60%", "50%"], // 将饼图往右移动一些
+            center: ["60%", "50%"],
             data: [
-              { value: 1, name: "已完成", itemStyle: { color: "#7ECF51" } },
-              { value: 0, name: "进行中", itemStyle: { color: "#EECB5F" } },
-              { value: 4, name: "未开始", itemStyle: { color: "#E16757" } },
+              {
+                value: this.equipment.analysisedCount,
+                name: "已完成",
+                itemStyle: { color: "#7ECF51" },
+              },
+              {
+                value: this.equipment.analysisingCount,
+                name: "进行中",
+                itemStyle: { color: "#EECB5F" },
+              },
+              {
+                value: this.equipment.noAnalysisCount,
+                name: "未开始",
+                itemStyle: { color: "#E16757" },
+              },
             ],
           },
         ],
       };
-
-      option && myChart.setOption(option);
+      this.myChart.setOption(option);
+    },
+    getStatistics() {
+      let DataObject = {
+        codeNumber: this.maplistArr.codeNumber,
+        codeType: this.maplistArr.codeType,
+      };
+      queryStatistics(DataObject).then((res) => {
+        this.YCtableData = res.data.errList || [];
+        this.equipment = res.data || {};
+        this.updateChart(); // Update chart after data is received
+      });
+    },
+    getOptionRecords() {
+      let DataObject = {
+        codeNumber: this.maplistArr.codeNumber,
+        codeType: this.maplistArr.codeType,
+      };
+      queryOptionRecords(DataObject).then((res) => {
+        this.tableData = res.data || [];
+      });
     },
   },
 };
 </script>
 
-
 <style lang="scss" scoped>
 .backbone {
   width: 300px;
@@ -192,16 +208,13 @@ export default {
   border-radius: 5px;
   padding: 20px;
 }
-
 .BOX {
   background: #004f5f;
   display: flex;
-
   padding-left: 10px;
   flex-wrap: wrap;
   padding-bottom: 15px;
 }
-
 .YC01 {
   width: 154px;
   height: 60px;
@@ -212,19 +225,16 @@ export default {
   margin-right: 15px;
   margin-top: 15px;
   text-align: center;
-
   strong {
     display: block;
     font-size: 26px;
     color: #4bffff;
   }
-
   span {
     display: block;
     font-size: 12px;
   }
 }
-
 .YC02 {
   width: 70px;
   height: 60px;
@@ -235,57 +245,45 @@ export default {
   margin-right: 15px;
   margin-top: 15px;
   text-align: center;
-
   .textred {
     color: #d9001b;
   }
-
   .texyellow {
     color: #facd91;
   }
-
   strong {
     display: block;
     font-size: 26px;
     color: #4bffff;
   }
-
   span {
     display: block;
     font-size: 12px;
   }
 }
-
 .YC03 {
   width: 70px;
   height: 60px;
 }
-
 .Tabtab {
   font-size: 12px;
 }
-
 ::v-deep.el-table__cell {
   padding: 2px 0 !important;
 }
-
 ::v-deep.el-table .el-table__cell {
   padding: 2px 0 !important;
 }
-
 ::v-deep.el-table--scrollable-y .el-table__body-wrapper {
   overflow-y: clip !important;
 }
-
-.titleYC{
+.titleYC {
   font-size: 14px;
   background: #214e5d;
   padding: 5px 0;
   span:nth-child(1) {
     margin: 0 70px 0 10px;
   }
-
-  
 }
 .titleJQ {
   font-size: 14px;
@@ -294,9 +292,8 @@ export default {
   span:nth-child(1) {
     margin: 0 15px 0 10px;
   }
-
   span:nth-child(2) {
     margin: 0 45px 0 30px;
   }
 }
-</style>
+</style>

+ 21 - 16
src/views/ledger/anemometer.vue

@@ -84,7 +84,12 @@
             {{ row.state == 1 ? "启用" : "停用" }}
           </template>
         </el-table-column>
-        <el-table-column prop="createTime" align="center" label="创建时间"      width="160">
+        <el-table-column
+          prop="createTime"
+          align="center"
+          label="创建时间"
+          width="160"
+        >
         </el-table-column>
         <el-table-column
           prop="transition"
@@ -305,7 +310,7 @@ export default {
       this.formInline.timeQuantum = [];
       this.endDate = "";
       this.startDate = "";
-      this.onSubmit()
+      this.onSubmit();
     },
     // 重置
     resetForm() {
@@ -383,20 +388,20 @@ export default {
 
     // 编辑
     compile(row) {
-      this.title = "编辑";
-      this.isEdit = true;
-      getAnemometerTower({ anemometerCode: row.anemometerCode }).then((res) => {
-        this.hightower = res.data;
-        this.cftList = res.data.list;
-        const item = JSON.parse(JSON.stringify(res.data));
-        this.detail = item;
-        this.dynamicValidateForm.anemometerName = item.anemometerName;
-        this.dynamicValidateForm.latitude = item.latitude;
-        this.dynamicValidateForm.longitude = item.longitude;
-        this.dynamicValidateForm.anemometerTowerHeightDtoList = this.cftList;
-        this.nuedialog = true;
-      });
-    },
+  this.title = "编辑";
+  this.isEdit = true;
+  this.nuedialog = true; 
+  getAnemometerTower({ anemometerCode: row.anemometerCode }).then((res) => {
+    this.hightower = res.data;
+    this.cftList = res.data.list;
+    const item = JSON.parse(JSON.stringify(res.data));
+    this.detail = item;
+    this.$set(this.dynamicValidateForm, 'anemometerName', item.anemometerName);
+    this.$set(this.dynamicValidateForm, 'latitude', item.latitude);
+    this.$set(this.dynamicValidateForm, 'longitude', item.longitude);
+    this.$set(this.dynamicValidateForm, 'anemometerTowerHeightDtoList', this.cftList);
+  });
+},
 
     //分页数据切换
     handleCurrentChange(val) {

+ 31 - 19
src/views/ledger/component/windsitetolead.vue

@@ -110,6 +110,7 @@ export default {
     },
 
     handleClose() {
+      console.log(111);
       this.companyCode = "";
       this.fileList = [];
       this.globalFileList = null;
@@ -122,31 +123,42 @@ export default {
         companyCode: this.companyCode,
         file: this.globalFileList,
       };
+      if (
+        !this.companyCode ||
+        this.companyCode === "" ||
+        this.companyCode === undefined
+      ) {
+        this.$message({
+          message: "请选择上级单位",
+          type: "warning",
+        });
+        return;
+      }
       if (filedata.file == undefined) {
         this.$message({
           message: "请先上传附件",
           type: "warning",
         });
-      } else {
-      
-        windFieldImportData(filedata)
-          .then((res) => {
-            if (res.code === -1) {
-              // Assuming -1 indicates success, adjust according to actual API response
-              this.$message.success(" 上传失败 ");
-            } else {
-              this.$message.error("上传成功");
-            }
-            this.$emit("handleClose", false, "tolead");
-            this.$emit("onSubmit");
-          })
-          .catch((error) => {
-            // this.$message.error("上传失败");
-            // console.error(error);
-            // this.$emit("handleClose", false, "tolead");
-            // this.$emit("onSubmit");
-          });
+        return;
       }
+      windFieldImportData(filedata)
+        .then((res) => {
+          if (res.code === -1) {
+            // Assuming -1 indicates success, adjust according to actual API response
+            this.$message.error(" 上传失败 ");
+          } else {
+            this.$message.success("上传成功");
+          }
+          this.companyCode = "";
+          this.$emit("handleClose", false, "tolead");
+          this.$emit("onSubmit");
+        })
+        .catch((error) => {
+          // this.$message.error("上传失败");
+          // console.error(error);
+          // this.$emit("handleClose", false, "tolead");
+          // this.$emit("onSubmit");
+        });
     },
 
     parentChange(data) {

+ 152 - 98
src/views/ledger/component/windsitetower.vue

@@ -1,125 +1,179 @@
 <template>
-    <div>
-        <el-dialog title="风机信息" :visible.sync="localdraught" width="1200px" @close="handleClose">
-            <el-table class="center-align-table" :data="draughtData" border :cell-style="rowStyle" stripe>
+  <div>
+    <el-dialog
+      title="风机信息"
+      :visible.sync="localdraught"
+      width="1200px"
+      @close="handleClose"
+    >
+      <el-table
+        class="center-align-table"
+        :data="tableData"
+        border
+        :cell-style="rowStyle"
+        stripe
+      >
+        <el-table-column
+          fixed
+          prop="engineName"
+          align="center"
+          label="风机名称"
+        >
+        </el-table-column>
+        <el-table-column prop="fieldCode" align="center" label="风机编号">
+        </el-table-column>
+        <el-table-column prop="machineTypeCode" align="center" label="风机机型">
+        </el-table-column>
+        <el-table-column
+          prop="manufacturerName"
+          align="center"
+          label="主机厂商"
+        >
+        </el-table-column>
+        <el-table-column prop="sightcing" align="center" label="是否标杆">
+        </el-table-column>
+        <el-table-column
+          prop="elevationHeight"
+          align="center"
+          label="海拔高度/米"
+          width="120"
+        >
+        </el-table-column>
+        <el-table-column prop="latitude" align="center" label="经度" width="80">
+        </el-table-column>
+        <el-table-column
+          prop="longitude"
+          align="center"
+          label="纬度"
+          width="80"
+        >
+        </el-table-column>
+        <el-table-column prop="ratedCapacity" align="center" label="额定容量">
+        </el-table-column>
+      </el-table>
 
-                <el-table-column fixed prop="engineName" align="center" label="风机名称">
-                </el-table-column>
-                <el-table-column prop="fieldCode" align="center" label="风机编号">
-                </el-table-column>
-                <el-table-column prop="machineTypeCode" align="center" label="风机机型">
-                </el-table-column>
-                <el-table-column prop="manufacturerName" align="center" label="主机厂商">
-                </el-table-column>
-                <el-table-column prop="sightcing" align="center" label="是否标杆">
-                </el-table-column>
-                <el-table-column prop="elevationHeight" align="center" label="海拔高度/米" width="120">
-                </el-table-column>
-                <el-table-column prop="latitude" align="center" label="经度" width="80">
-                </el-table-column>
-                <el-table-column prop="longitude" align="center" label="纬度" width="80">
-                </el-table-column>
-                <el-table-column prop="ratedCapacity" align="center" label="额定容量">
-                </el-table-column>
-            </el-table>
-
-            <div class="pagination-container">
-                <el-pagination @current-change="handleCurrentChange" :current-page.sync="pageNum"
-                    layout="total, prev, pager, next" :page-size="pageSize" :total="totalSize">
-                </el-pagination>
-            </div>
-        </el-dialog>
-    </div>
+      <div class="pagination-container">
+        <el-pagination
+          @current-change="handleCurrentChange"
+          :current-page.sync="pageNum"
+          layout="total, prev, pager, next"
+          :page-size="pageSize"
+          :total="totalSize"
+        >
+        </el-pagination>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
+import { windEngineGrouPage } from "@/api/ledger.js";
+import { getTilePriority } from "ol/TileQueue";
 export default {
-    props: {
-        draught: {
-            type: Boolean,
-            default: false
-        },
-        draughtData: {
-            type: Array,
-            default: () => []
-        },
+  props: {
+    draught: {
+      type: Boolean,
+      default: false,
+    },
+    draughtData: {
+      type: Object,
+      default: () => {},
+    },
+  },
+  computed: {
+    localdraught: {
+      get() {
+        console.log(this.draught);
+        return this.draught;
+      },
+      set(value) {
+        // 在这里不进行任何修改
+      },
     },
-    computed: {
-        localdraught: {
-            get() {
-                console.log(this.draught);
-                return this.draught;
-            },
-            set(value) {
-                // 在这里不进行任何修改
-            }
-        }
+  },
+  data() {
+    return {
+      tableData: [],
+      pageNum: 1,
+      pageSize: 10,
+      totalSize: 0,
+    };
+  },
+  watch: {
+    draughtData(newVal) {
+      if (newVal) {
+        this.getfengji();
+      }
     },
-    data() {
-        return {
-            tableData: [
+  },
 
-            ],
-            pageNum: 1,
-            pageSize: 10,
-            totalSize: 0,
-        }
+  methods: {
+    rowStyle() {
+      return "text-align:center";
     },
-    methods: {
-        rowStyle() {
-            return "text-align:center";
-        },
-        handleClose() {
-            this.$emit('handleClose', false, 'draught');
-        },
-        //分页数据切换
-        handleCurrentChange(val) {
-            this.pageNum = val;
-            this.onSubmit();
-        },
-    }
-}
+    handleClose() {
+      this.$emit("handleClose", false, "draught");
+    },
+    //分页数据切换
+    handleCurrentChange(val) {
+      this.pageNum = val;
+      this.getfengji();
+    },
+
+    getfengji() {
+      let paramsData = {
+        fieldCode: this.draughtData.fieldCode,
+        pageNum: this.pageNum || 1,
+        pageSize: 10,
+      };
+      windEngineGrouPage(paramsData).then((res) => {
+        this.tableData = res.data.list;
+        this.totalSize = res.data.totalSize;
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
 .general {
-    display: flex;
-    flex-wrap: wrap;
+  display: flex;
+  flex-wrap: wrap;
 
-    .condition {
-        width: 50%;
-        display: flex;
+  .condition {
+    width: 50%;
+    display: flex;
 
-        p {
-            width: 100px;
-            text-align: right;
-            line-height: 40px;
-        }
+    p {
+      width: 100px;
+      text-align: right;
+      line-height: 40px;
+    }
 
-        span {
-            line-height: 40px;
+    span {
+      line-height: 40px;
 
-            padding-left: 20px;
-        }
+      padding-left: 20px;
+    }
 
-        .el-select {
-            width: 100%;
-            margin-bottom: 20px;
-        }
+    .el-select {
+      width: 100%;
+      margin-bottom: 20px;
+    }
 
-        .el-input {
-            margin-bottom: 20px;
-        }
+    .el-input {
+      margin-bottom: 20px;
     }
+  }
 }
 
 .attachment {
-    display: flex;
-    padding-top: 10px;
+  display: flex;
+  padding-top: 10px;
 
-    p {
-        margin-right: 20px;
-        color: #409eff;
-    }
+  p {
+    margin-right: 20px;
+    color: #409eff;
+  }
 }
 </style>

+ 35 - 10
src/views/ledger/component/windsiteup.vue

@@ -184,20 +184,34 @@ export default {
         fieldCode: this.rowdata.fieldCode,
         file: this.globalFileList,
       };
+      if (
+        !this.superior ||
+        this.superior === "" ||
+        this.superior === undefined
+      ) {
+        this.$message({
+          message: "请选择文件类型",
+          type: "warning",
+        });
+        return;
+      }
       if (filedata.file == "") {
         this.$message({
           message: "请先上传附件在点击提交",
           type: "warning",
         });
-      } else {
-        powerWordContractImportData(filedata).then((res) => {
-          this.$message.success("上传成功");
-          this.$emit("handleClose", false, "tolead");
-        });
+        return;
       }
+      powerWordContractImportData(filedata).then((res) => {
+        this.$message.success("上传成功");
+        this.$emit("handleClose", false, "tolead");
+      });
     },
 
     handleClose() {
+      this.superior = "";
+      this.fileList = [];
+      this.globalFileList = null;
       this.$emit("handleClose", false, "uploadingPOP");
     },
 
@@ -240,17 +254,28 @@ export default {
         resourceUrl: this.succeed.data,
         type: this.globalFileList.type,
       };
+      if (
+        !this.superior ||
+        this.superior === "" ||
+        this.superior === undefined
+      ) {
+        this.$message({
+          message: "请选择文件类型",
+          type: "warning",
+        });
+        return;
+      }
       if (filedata.resourceUrl == "") {
         this.$message({
           message: "请先上传附件在点击提交",
           type: "warning",
         });
-      } else {
-        saveWindFieldResource(filedata).then((res) => {
-          this.$message.success("上传成功");
-          this.$emit("handleClose", false, "tolead");
-        });
+        return;
       }
+      saveWindFieldResource(filedata).then((res) => {
+        this.$message.success("上传成功");
+        this.$emit("handleClose", false, "tolead");
+      });
     },
   },
 };

+ 1 - 0
src/views/ledger/draught.vue

@@ -724,6 +724,7 @@ export default {
                 type: "success",
               });
               this.onSubmit();
+              this.handleClose()
             }
           })
           .catch((error) => {});

+ 5 - 4
src/views/ledger/enterprise.vue

@@ -63,7 +63,7 @@
         >
           <template slot-scope="scope">
             <el-button @click="particulars(scope.row)" type="text" size="small">
-              {{ scope.row.fieldCount }}
+              {{ scope.row.fieldCount ? scope.row.fieldCount : 0 }}
             </el-button>
           </template>
         </el-table-column>
@@ -75,7 +75,7 @@
         </el-table-column>
         <el-table-column prop="createTime" align="center" label="创建时间">
           <template slot-scope="{ row }">
-            {{ $formatDate(row.createTime) }}
+            {{ $formatDateTWO(row.createTime) }}
           </template>
         </el-table-column>
         <el-table-column
@@ -216,15 +216,16 @@
           prop="longitude"
           align="center"
           label="经度"
-          width="80"
+   
         >
         </el-table-column>
-        <el-table-column prop="latitude" align="center" label="纬度" width="80">
+        <el-table-column prop="latitude" align="center" label="纬度" >
         </el-table-column>
         <el-table-column
           prop="ratedCapacityNumber"
           align="center"
           label="额定容量"
+          width="80"
         >
         </el-table-column>
       </el-table>

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

@@ -484,7 +484,6 @@ export default {
           this.$message.error("请填写必填项");
           return false;
         }
-
         let objectdata = {
           machineTypeCode: this.ruleForm.machineTypeCode,
           manufacturerName: this.ruleForm.manufacturerName,

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

@@ -161,7 +161,7 @@
     <!-- 弹出层 -->
 
     <!-- 新增 -->
-    <el-dialog :title="title" :visible.sync="nuedialog" width="800px">
+    <el-dialog :title="title" :visible.sync="nuedialog" width="800px"   @close="handleClose">
       <el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
         <div class="general">
           <div class="row">
@@ -425,7 +425,7 @@ export default {
       options: [],
       filetableData: [],
       anemometerData: [],
-      draughtData: [],
+      draughtData: {},
       unusualdialogdata: {},
       parentOptdata: [],
       AllTemplateurl: {},
@@ -459,6 +459,7 @@ export default {
   methods: {
     handleClose(value, dialogName) {
       this[dialogName] = value;
+  
       Object.assign(this.$data.form, this.$options.data().form);
     },
     // 列表居中展示
@@ -644,15 +645,8 @@ export default {
     },
     //风机详情
     ONdraught(row) {
-      let paramsData = {
-        fieldCode: row.fieldCode,
-        pageNum: 1,
-        pageSize: 10,
-      };
-      windEngineGrouPage(paramsData).then((res) => {
-        this.draughtData = res.data.list;
-        this.draught = true;
-      });
+      this.draughtData=row
+      this.draught = true;
     },
     //测风塔详情
     ONanemometer(row) {

+ 1 - 1
vue.config.js

@@ -66,7 +66,7 @@ module.exports = {
       "/api": {
         // 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