فهرست منبع

气象站基础信息新增及解析

xusl 1 سال پیش
والد
کامیت
f5db4f5eb9

+ 5 - 2
ipp-ap/src/const/crud/weatherstationinfo.js

@@ -10,18 +10,21 @@ export const tableOption = {
   delBtn: false,
   excelBtn: true,
   title: "气象站信息 ",
-  "column": [{
+  "column": [
+    {
     "type": "select",
     "label": "所属场站",
     "prop": "stationCode",
     rules: [{
       required: true,
-      message: '请选择是否上报',
+      message: '请选择所属场站',
       trigger: 'blur'
     }],
+    slot: true,
     filterable: true,
     dicUrl: '/electricfield/all'
   }
+
     , {
       "type": "input",
       "label": "设备编号",

+ 23 - 9
ipp-ap/src/views/idp/control/weatherstationinfo/index.vue

@@ -48,6 +48,10 @@
                  @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)">
@@ -122,19 +126,29 @@ 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
       this.$refs.crud.rowEdit(row, index);

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

@@ -65,8 +65,7 @@ public class ParsingQxzInfoServiceImpl extends ServiceImpl<ParsingQxzInfoMapper,
             List<ParsingQxzInfo> parsingQxzInfos = baseMapper.selectList(Wrappers.lambdaQuery(ParsingQxzInfo.class).like(ParsingInfo::getStationCode, parsingUrl.getStationCode()));
             if (parsingQxzInfos.size() > 0) {
                 List<WeatherStationInfo> weatherStationInfoList = weatherStationInfoService.list(Wrappers.lambdaQuery(WeatherStationInfo.class)
-                        .eq(WeatherStationInfo::getStationCode, parsingUrl.getStationCode())
-                        .eq(WeatherStationInfo::getAnalyticUse, "1"));
+                        .eq(WeatherStationInfo::getStationCode, parsingUrl.getStationCode()));
                 if (weatherStationInfoList.size() > 0) {
                     List<String> fileContent = FileUtil.getFileContent(file);
                     for (ParsingQxzInfo parsingQxzInfo : parsingQxzInfos) {