Sfoglia il codice sorgente

修改测风塔信息及解析

xusl 10 mesi fa
parent
commit
d8acd777ab

+ 2 - 1
ipp-ap/src/const/crud/windtowerinfo.js

@@ -16,9 +16,10 @@ export const tableOption = {
     "prop": "stationCode",
     rules: [{
       required: true,
-      message: '请填写场站编号',
+      message: '请选择所属场站',
       trigger: 'blur'
     }],
+    slot: true,
     filterable: true,
     dicUrl: '/electricfield/all'
   }

+ 22 - 8
ipp-ap/src/views/idp/control/windtowerinfo/index.vue

@@ -49,6 +49,9 @@
                  @row-update="handleUpdate"
                  @row-save="handleSave"
                  @row-del="rowDel">
+        <template slot='stationCode' slot-scope="scope">
+          <span>{{ formatStationCode(scope.row) }}</span>
+        </template>
         <template slot="menu" slot-scope="{ row, index }">
           <el-button type="primary" size="small" icon="el-icon-edit" class="myButton"
                      @click.stop="handleEdit(row,index)">
@@ -123,17 +126,28 @@ export default {
       let equipmentNo = this.findObject(this.tableOption.column, 'equipmentNo')
       equipmentNo.rules = [{required: true, validator: _self.checkequipmentNo, trigger: 'blur'}]
       /*场站添加change方法*/
-      let stationCode = this.findObject(this.tableOption.column, 'stationCode')
-      stationCode.change = (val)=>{
-        if(val.value != ''){
-          if(this.modId ==''){/*新增*/
-            this.analyticUseOption(null,val.value)
-          }else{/*编辑*/
-            this.analyticUseOption(this.modId,val.value)
+      // let stationCode = this.findObject(this.tableOption.column, 'stationCode')
+      // stationCode.change = (val)=>{
+      //   if(val.value != ''){
+      //     if(this.modId ==''){/*新增*/
+      //       this.analyticUseOption(null,val.value)
+      //     }else{/*编辑*/
+      //       this.analyticUseOption(this.modId,val.value)
+      //     }
+      //   }
+      // }
+      done()
+    },
+    formatStationCode(row) {
+      if (row.stationCode !== null) {
+        let b = ''
+        for (let i = 0; i < this.stationList.length; i++) {
+          if (row.stationCode === this.stationList[i].value) {
+            b += this.stationList[i].label
           }
         }
+        return b;
       }
-      done()
     },
     handleEdit(row, index) {
       this.modId = row.id

+ 1 - 2
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/impl/an/ParsingCftInfoServiceImpl.java

@@ -69,8 +69,7 @@ public class ParsingCftInfoServiceImpl extends ServiceImpl<ParsingCftInfoMapper,
             List<ParsingCftInfo> parsingCftInfos = baseMapper.selectList(Wrappers.lambdaQuery(ParsingCftInfo.class).like(ParsingInfo::getStationCode, parsingUrl.getStationCode()));
             if (parsingCftInfos.size() > 0) {
                 List<WindTowerInfo> windTowerInfoList = windTowerInfoService.list(Wrappers.lambdaQuery(WindTowerInfo.class)
-                        .eq(WindTowerInfo::getStationCode, parsingUrl.getStationCode())
-                        .eq(WindTowerInfo::getAnalyticUse, "1"));
+                        .eq(WindTowerInfo::getStationCode, parsingUrl.getStationCode()));
                 if (windTowerInfoList.size() > 0) {
                     List<String> fileContent = FileUtil.getFileContent(file);
                     for (ParsingCftInfo parsingCftInfo : parsingCftInfos) {