chenrui  2 жил өмнө
parent
commit
d9c65ee88b

+ 48 - 33
src/components/Table/index.vue

@@ -323,7 +323,13 @@
                           v-for="item in tableOptions[item.columnName]"
                           :key="item.v ? item.v : item.planDepartureApt"
                           :label="item.k ? item.k : item.planDepartureApt"
-                          :value="item.v ? item.v : item.planDepartureApt"
+                          :value="
+                            item.setlabel === 'positionDescribe'
+                              ? item.k
+                              : item.v
+                              ? item.v
+                              : item.planDepartureApt
+                          "
                         >
                         </el-option>
                       </el-select>
@@ -801,10 +807,33 @@ export default {
             this.rowTitle = titleColumn.columnName;
           }
           this.tableData.push(...returnData.listValues);
+          // console.log(this.tableOptions.endNode, "11111");
           this.tableCols = returnData.columnSet;
           this.serviceId = returnData.submitID;
           setTimeout(() => {
             this.initTableData();
+            setTimeout(() => {
+              this.tableData.forEach((element) => {
+                console.log(this.tableOptions.calculationBasis);
+                if (this.tableOptions.beginNode) {
+                  this.tableOptions.beginNode.forEach((res) => {
+                    if (res.v === element.beginNode) {
+                      element.beginNode = res.k;
+                    }
+                  });
+                  this.tableOptions.endNode.forEach((res) => {
+                    if (res.v == element.endNode) {
+                      element.endNode = res.k;
+                    }
+                  });
+                  this.tableOptions.calculationBasis.forEach((res) => {
+                    if (res.v == element.calculationBasis) {
+                      element.calculationBasis = res.k;
+                    }
+                  });
+                }
+              });
+            }, 400);
             this.loading = false;
           }, 100);
         } else {
@@ -864,8 +893,6 @@ export default {
     //初始化表格
     initTableData() {
       this.tableColsCopy = this.tableCols.filter((item) => item.needShow);
-      //
-      // debugger;
       this.tableDataCopy = _.cloneDeep(this.tableData);
       const datas = _.cloneDeep(this.tableColsCopy);
       // const reqUts = [];
@@ -1035,43 +1062,19 @@ export default {
               row.queryTemplateColumnSetID
             );
             this.tableForm = JSON.parse(JSON.stringify(data));
-            // if (this.tableForm.beginNode) {
-            //   const datas = _.cloneDeep(this.tableColsCopy);
-            //   datas.forEach(async (item) => {
-            //     if (item.columnLabel === "开始位置") {
-            //       this.tableOptions.beginPosition = await this.getSelectData(
-            //         item.listqueryTemplateID,
-            //         this.tableForm.beginNode
-            //       );
-            //       this.asShow = false;
-            //       this.asShow = true;
-            //     }
-            //   });
-            // }
-            // if (this.tableForm.endNode) {
-            //   const datas = _.cloneDeep(this.tableColsCopy);
-            //   datas.forEach(async (item) => {
-            //     if (item.columnLabel === "结束位置") {
-            //       this.tableOptions.endPosition = await this.getSelectData(
-            //         item.listqueryTemplateID,
-            //         this.tableForm.endNode
-            //       );
-            //       this.asShow = false;
-            //       this.asShow = true;
-            //     }
-            //   });
-            // }
-            // this.tableForm =this.tableForm;
-            // Object.entries(tableForm).forEach(([key, value]) => {
-            //   this.tableForm[key] = value
-            // })
           } else {
             this.tableForm = JSON.parse(JSON.stringify(row));
+            console.log(this.tableOptions.beginNode, "1111111");
             if (this.tableForm.beginNode) {
               const datas = _.cloneDeep(this.tableColsCopy);
               // const reqUts = [];
               datas.forEach(async (item) => {
                 if (item.columnLabel === "开始位置") {
+                  this.tableOptions.beginNode.forEach((element) => {
+                    if (this.tableForm.beginNode == element.k) {
+                      this.tableForm.beginNode = element.v;
+                    }
+                  });
                   this.tableOptions.beginPosition = await this.getSelectData(
                     item.listqueryTemplateID,
                     this.tableForm.beginNode
@@ -1086,6 +1089,11 @@ export default {
               // const reqUts = [];
               datas.forEach(async (item) => {
                 if (item.columnLabel === "结束位置") {
+                  this.tableOptions.endNode.forEach((element) => {
+                    if (this.tableForm.endNode == element.k) {
+                      this.tableForm.endNode = element.v;
+                    }
+                  });
                   this.tableOptions.endPosition = await this.getSelectData(
                     item.listqueryTemplateID,
                     this.tableForm.endNode
@@ -1095,6 +1103,13 @@ export default {
                 }
               });
             }
+            if (this.tableOptions.calculationBasis) {
+              this.tableOptions.calculationBasis.forEach((res) => {
+                if (res.k == element.calculationBasis) {
+                  this.tableForm.calculationBasis = res.v;
+                }
+              });
+            }
           }
           this.flag = true;
           this.tableType = "edit";

+ 0 - 44
src/views/systemSettings/views/warningSet/warningSet.vue

@@ -9,50 +9,6 @@
 
 <template>
   <div class="airportInfo">
-    <!--搜索-->
-    <!-- <div class="nodeLnformation_header">
-      <Search
-        title="报警预警设置"
-        @getSearchData="getSearchData"
-        :isSearch="false"
-      >
-        <button @click="handleAdd" class="btnAdd">新增</button>
-      </Search>
-    </div>
-
-    <div class="aviInfo">
-      <el-row :gutter="20" @scroll="scrollEvent">
-        <el-col :span="4" v-for="(item, index) in warningArr" :key="index">
-          <div class="box-card">
-            <div class="headerBox">
-              <div class="tltle-head">
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  :content="item.IATACode"
-                  placement="bottom"
-                >
-                  <div class="title fz16">{{ item.IATACode }}</div>
-                </el-tooltip>
-                <div @click="gotoAram(item, index)" class="edit_log"></div>
-              </div>
-              <div
-                @click="delBtn(item, index)"
-                class="el-icon-close icon"
-              ></div>
-            </div>
-            <div class="text item" style="margin-top: 6px">
-              <div class="adTime">
-                生效时间:<span class="timeSt">{{ item.startDate }}</span>
-              </div>
-              <div class="adTime">
-                失效时间:<span class="timeSt">{{ item.endDate }}</span>
-              </div>
-            </div>
-          </div>
-        </el-col>
-      </el-row>
-    </div> -->
     <div class="wrap">
       <DataTable
         :data-id="dataId"