Quellcode durchsuchen

Merge branch 'master' of http://120.26.64.82:3000/BFFE/CABaggageData2.0

zhongxiaoyu vor 2 Jahren
Ursprung
Commit
8631874a1a

+ 253 - 79
src/components/Table/index.vue

@@ -1,28 +1,78 @@
 <template>
   <div class="data-table" :style="{ marginTop: marginTop }">
-    <div :style="dataTableContentStyle" v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="data-table-content">
+    <div
+      :style="dataTableContentStyle"
+      v-loading="loading"
+      element-loading-text="拼命加载中"
+      element-loading-spinner="el-icon-loading"
+      element-loading-background="rgba(0, 0, 0, 0.8)"
+      class="data-table-content"
+    >
       <div :class="isStatus ? 'flex' : 'flex-end'" class="data-table-btn">
         <div v-if="isStatus" class="vStatus">
           <slot name="header" />
         </div>
-        <el-button v-if="isBtn" size="small" @click="handleAdd" plain type="primary">新增</el-button>
+        <el-button
+          v-if="isBtn"
+          size="small"
+          @click="handleAdd"
+          plain
+          type="primary"
+          >新增</el-button
+        >
       </div>
       <template v-if="tableData.length">
         <div>
-          <el-table v-el-table-infinite-scroll="load" :data="filteredTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" :tree-props="treeProps" :row-key="rowKeyTree" stripe :show-summary="showSummary" border ref="table" :height="tableHeight ? tableHeight : minHeight - 8 + 'vh'" class="table infinite-list" style="width: 100%; overflow: auto" @select="selectHandler">
-            <el-table-column v-if="selectionEnable" type="selection" width="35" />
+          <el-table
+            v-el-table-infinite-scroll="load"
+            :data="filteredTableData"
+            :summary-method="getSummaries"
+            :span-method="tableSpanMethod"
+            :tree-props="treeProps"
+            :row-key="rowKeyTree"
+            stripe
+            :show-summary="showSummary"
+            border
+            ref="table"
+            :height="tableHeight ? tableHeight : minHeight - 8 + 'vh'"
+            class="table infinite-list"
+            style="width: 100%; overflow: auto"
+            @select="selectHandler"
+          >
+            <el-table-column
+              v-if="selectionEnable"
+              type="selection"
+              width="35"
+            />
             <el-table-column v-if="isStatus" width="55">
               <template slot-scope="scope">
                 <div class="tableStatus">
-                  <div v-if="filteredTableData[scope.$index].runState == '运行'" class="status0">
+                  <div
+                    v-if="filteredTableData[scope.$index].runState == '运行'"
+                    class="status0"
+                  >
+                    <span class="icon"></span>
+                  </div>
+                  <div
+                    v-else-if="
+                      filteredTableData[scope.$index].runState == '停止'
+                    "
+                    class="status1"
+                  >
                     <span class="icon"></span>
                   </div>
-                  <div v-else-if="filteredTableData[scope.$index].runState == '停止'" class="status1"><span class="icon"></span></div>
                   <div v-else class="status2"><span class="icon"></span></div>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column v-for="(item, index) in tableColsCopy" :sortable="item.needSort ? true : false" :key="index" :prop="item.columnName" :label="item.columnLabel" :show-overflow-tooltip="showOverflowTooltip">
+            <el-table-column
+              v-for="(item, index) in tableColsCopy"
+              :sortable="item.needSort ? true : false"
+              :key="index"
+              :prop="item.columnName"
+              :label="item.columnLabel"
+              :show-overflow-tooltip="showOverflowTooltip"
+            >
               <template #header>
                 <span class="colTips">
                   <el-tooltip :content="item.columnDescribe" placement="top">
@@ -30,18 +80,38 @@
                   </el-tooltip>
                 </span>
                 <span v-if="item.needFilters">
-                  <el-popover placement="bottom" trigger="click" @show="popoverShowHandler(item.columnName)" @hide="popoverHideHandler">
-                    <i slot="reference" :class="[
+                  <el-popover
+                    placement="bottom"
+                    trigger="click"
+                    @show="popoverShowHandler(item.columnName)"
+                    @hide="popoverHideHandler"
+                  >
+                    <i
+                      slot="reference"
+                      :class="[
                         'filter-arrow',
                         'el-icon-arrow-down',
                         arrowClass(item.columnName),
-                      ]" />
+                      ]"
+                    />
                     <el-form>
                       <el-form-item :label="item.columnLabel">
-                        <el-select v-model="filterValues[item.columnName]" size="small" placeholder="筛选" default-first-option filterable clearable>
-                          <el-option v-for="(option, optionIndex) in tableDataFilters[
+                        <el-select
+                          v-model="filterValues[item.columnName]"
+                          size="small"
+                          placeholder="筛选"
+                          default-first-option
+                          filterable
+                          clearable
+                        >
+                          <el-option
+                            v-for="(option, optionIndex) in tableDataFilters[
                               item.columnName
-                            ]" :key="option.value + optionIndex" :value="option.value" :label="option.text" />
+                            ]"
+                            :key="option.value + optionIndex"
+                            :value="option.value"
+                            :label="option.text"
+                          />
                         </el-select>
                       </el-form-item>
                     </el-form>
@@ -54,17 +124,77 @@
                 <div class="hd-td">
                   <div class="hd-tr">
                     <template v-if="isStatus">
-                      <el-button type="text" @click="handleLook(scope.row)" size="small" class="rmScs">查看</el-button>
-                      <el-button type="text" v-if="scope.row.runState == '停止'" @click="chanheState(scope.row)" size="small" class="rmScs">启动</el-button>
-                      <el-button type="text" v-if="scope.row.runState == '运行'" @click="chanheState(scope.row)" size="small" class="rmScs">停止</el-button>
+                      <el-button
+                        type="text"
+                        @click="handleLook(scope.row)"
+                        size="small"
+                        class="rmScs"
+                        >查看</el-button
+                      >
+                      <el-button
+                        type="text"
+                        v-if="scope.row.runState == '停止'"
+                        @click="chanheState(scope.row)"
+                        size="small"
+                        class="rmScs"
+                        >启动</el-button
+                      >
+                      <el-button
+                        type="text"
+                        v-if="scope.row.runState == '运行'"
+                        @click="chanheState(scope.row)"
+                        size="small"
+                        class="rmScs"
+                        >停止</el-button
+                      >
                     </template>
                     <!-- <el-button class="hrefBtn" type="text" @click="handleHerf(scope.row)" size="small">跳转</el-button> -->
-                    <el-button type="text" @click="handleEdit(scope.row)" size="small" class="rmScs">编辑</el-button>
-                    <el-button class="rmSc" type="text" @click="handleRemove(scope.row)" size="small">删除</el-button>
-                    <el-button class="rmScs" v-if="withColumnSet" type="text" size="small" @click="handleColumnSet(scope.row)">列设置</el-button>
-                    <el-button class="rmScs" v-if="withItemSet" type="text" size="small" @click="handleItemSet(scope.row)">数据项</el-button>
-                    <el-button class="rmScser" v-if="withlodSet" type="text" size="small" @click="handlelodSet(scope.row)">航站设置</el-button>
-                    <el-button class="rmScser" v-if="withnodeSet" type="text" size="small" @click="handlenodeSet(scope.row)">位置设置</el-button>
+                    <el-button
+                      type="text"
+                      @click="handleEdit(scope.row)"
+                      size="small"
+                      class="rmScs"
+                      >编辑</el-button
+                    >
+                    <el-button
+                      class="rmSc"
+                      type="text"
+                      @click="handleRemove(scope.row)"
+                      size="small"
+                      >删除</el-button
+                    >
+                    <el-button
+                      class="rmScs"
+                      v-if="withColumnSet"
+                      type="text"
+                      size="small"
+                      @click="handleColumnSet(scope.row)"
+                      >列设置</el-button
+                    >
+                    <el-button
+                      class="rmScs"
+                      v-if="withItemSet"
+                      type="text"
+                      size="small"
+                      @click="handleItemSet(scope.row)"
+                      >数据项</el-button
+                    >
+                    <el-button
+                      class="rmScser"
+                      v-if="withlodSet"
+                      type="text"
+                      size="small"
+                      @click="handlelodSet(scope.row)"
+                      >航站设置</el-button
+                    >
+                    <el-button
+                      class="rmScser"
+                      v-if="withnodeSet"
+                      type="text"
+                      size="small"
+                      @click="handlenodeSet(scope.row)"
+                      >位置设置</el-button
+                    >
                   </div>
                 </div>
               </template>
@@ -83,16 +213,38 @@
         <div class="dialog-content">
           <div class="title">{{ tableTitle }}</div>
           <div class="content">
-            <el-form ref="ruleForm" :model="tableForm" :label-width="labelWidth">
+            <el-form
+              ref="ruleForm"
+              :model="tableForm"
+              :label-width="labelWidth"
+            >
               <el-row :gutter="20">
-                <el-col v-for="(item, index) in tableColsCopy" :key="index" :span="rows">
+                <el-col
+                  v-for="(item, index) in tableColsCopy"
+                  :key="index"
+                  :span="rows"
+                >
                   <el-form-item :label="item.columnLabel">
-                    <template v-if="
+                    <template
+                      v-if="
                         item.listqueryTemplateID ||
                         item.listqueryTemplateID == 0
-                      ">
-                      <el-select size="small" clearable style="width: 100%" v-model="tableForm[item.columnName]" @change="changeSelect(item.columnName)" placeholder="请选择">
-                        <el-option v-for="item in tableOptions[item.columnName]" :key="item.v" :label="item.k" :value="item.v">
+                      "
+                    >
+                      <el-select
+                        size="small"
+                        clearable
+                        style="width: 100%"
+                        v-model="tableForm[item.columnName]"
+                        @change="changeSelect(item.columnName)"
+                        placeholder="请选择"
+                      >
+                        <el-option
+                          v-for="item in tableOptions[item.columnName]"
+                          :key="item.v"
+                          :label="item.k"
+                          :value="item.v"
+                        >
                         </el-option>
                       </el-select>
                     </template>
@@ -105,7 +257,11 @@
                       ></el-input>
                     </template> -->
                     <template v-else>
-                      <el-input size="small" v-model="tableForm[item.columnName]" @change="inputChangeHandler(item.columnName)"></el-input>
+                      <el-input
+                        size="small"
+                        v-model="tableForm[item.columnName]"
+                        @change="inputChangeHandler(item.columnName)"
+                      ></el-input>
                     </template>
                   </el-form-item>
                 </el-col>
@@ -113,7 +269,13 @@
             </el-form>
           </div>
           <div class="foot right t30">
-            <el-button size="medium" @click="handleOk" class="r24" type="primary">确定</el-button>
+            <el-button
+              size="medium"
+              @click="handleOk"
+              class="r24"
+              type="primary"
+              >确定</el-button
+            >
             <el-button @click="flag = false" size="medium">取消</el-button>
           </div>
         </div>
@@ -122,11 +284,20 @@
         <div class="airportInfoDialog">
           <div class="title del-title">删除</div>
           <div class="content del-content">
-            <span class="el-icon-error error r10"></span>您是否确认删除<span class="error l10">{{ rmTitle }}</span>
+            <span class="el-icon-error error r10"></span>您是否确认删除<span
+              class="error l10"
+              >{{ rmTitle }}</span
+            >
           </div>
           <div class="foot right Delfoot t30">
-            <el-button size="medium" class="r24" @click="tableRemove" type="danger">删除</el-button>
+            <el-button
+              size="medium"
+              class="r24"
+              @click="tableRemove"
+              type="danger"
+              >删除</el-button
+            >
             <el-button size="medium" @click="rmFlag = false">取消</el-button>
           </div>
         </div>
@@ -139,7 +310,7 @@
 import { setTableFilters } from "@/utils/table";
 import Dialog from "@/layout/components/Dialog/index.vue";
 import NoData from "@/components/nodata";
-import { translateDataToTreeAllTreeMsg } from '@/utils/validate';
+import { translateDataToTreeAllTreeMsg } from "@/utils/validate";
 import {
   Query,
   GeneralDataReception,
@@ -204,13 +375,13 @@ export default {
     treeProps: {
       type: Object,
       default: function () {
-        return { children: 'children', hasChildren: 'hasChildren' }
-      }
+        return { children: "children", hasChildren: "hasChildren" };
+      },
     },
     //树形标识id
     rowKeyTree: {
       type: String,
-      default: 'companyID',
+      default: "companyID",
     },
     //是否显示新增按钮
     isBtn: {
@@ -268,7 +439,7 @@ export default {
     },
   },
   components: { Dialog, NoData },
-  data () {
+  data() {
     return {
       loading: false,
       flag: false,
@@ -298,7 +469,7 @@ export default {
     };
   },
   computed: {
-    dataTableContentStyle () {
+    dataTableContentStyle() {
       const style = {};
       if (this.minHeight) {
         style["min-height"] = this.minHeight;
@@ -309,7 +480,7 @@ export default {
       return style;
     },
     //设置表头-下拉-箭头样式
-    arrowClass () {
+    arrowClass() {
       return function (prop) {
         let classString = "";
         if (this.colShowFilter === prop) {
@@ -326,9 +497,13 @@ export default {
       };
     },
     //设置表头-下拉-选中数据
-    filteredTableData () {
+    filteredTableData() {
       if (this.isTree) {
-        this.tableData = translateDataToTreeAllTreeMsg(this.tableData, 'parentID', 'companyID')
+        this.tableData = translateDataToTreeAllTreeMsg(
+          this.tableData,
+          "parentID",
+          "companyID"
+        );
       }
       return this.tableData.filter((item) => {
         let flag = true;
@@ -343,7 +518,7 @@ export default {
   },
   watch: {
     dataContent: {
-      handler (val) {
+      handler(val) {
         if (val) {
           if (val.companyID) {
             this.resetTable();
@@ -364,14 +539,14 @@ export default {
     //   },
     // },
   },
-  mounted () {
+  mounted() {
     this.getQuery();
   },
-  updated () {
+  updated() {
     this.$refs["table"]?.doLayout();
   },
   methods: {
-    load () {
+    load() {
       // console.log("分页");
       if (!this.isTree) {
         if (this.noMore || this.loading) {
@@ -380,12 +555,12 @@ export default {
         this.getQuery();
       }
     },
-    resetTable () {
+    resetTable() {
       this.page = 0;
       this.noMore = false;
       this.tableData = [];
     },
-    changeSelect (data) {
+    changeSelect(data) {
       if (this.tableForm[data] === "") {
         this.tableForm[data] = null;
       }
@@ -393,13 +568,13 @@ export default {
         this.tableForm[data];
       // console.log(this.tableForm)
     },
-    inputChangeHandler (data) {
+    inputChangeHandler(data) {
       if (this.tableForm[data] === "") {
         this.tableForm[data] = null;
       }
     },
     //获取表格数据
-    async getQuery () {
+    async getQuery() {
       try {
         this.loading = true;
         const { code, returnData } = await Query({
@@ -438,7 +613,7 @@ export default {
       }
     },
     //表格-增/删/改
-    async generalDataReception (data) {
+    async generalDataReception(data) {
       try {
         data = {
           ...data,
@@ -472,17 +647,17 @@ export default {
       }
     },
     // 表格勾选
-    toggleRowSelection (row, isSelected) {
+    toggleRowSelection(row, isSelected) {
       this.$refs["table"].toggleRowSelection(row, isSelected);
     },
     // 表格初始勾选
-    selectTableRows (tableData, selectFlagName) {
+    selectTableRows(tableData, selectFlagName) {
       tableData.forEach((row) => {
         this.$refs["table"].toggleRowSelection(row, !!row[selectFlagName]);
       });
     },
     //初始化表格
-    initTableData () {
+    initTableData() {
       this.tableColsCopy = this.tableCols.filter((item) => item.needShow);
       // console.log(this.tableColsCopy);
       // debugger;
@@ -513,7 +688,7 @@ export default {
       // this.getSelectDataAll(reqUts)
     },
     //获取所有获取弹框-下拉数据-请求状态
-    getSelectDataAll (reqUts) {
+    getSelectDataAll(reqUts) {
       Promise.all(reqUts)
         .then((res) => {
           this.proAll = true;
@@ -523,7 +698,7 @@ export default {
         });
     },
     //获取弹框-下拉数据
-    async getSelectData (id) {
+    async getSelectData(id) {
       const { code, returnData } = await Query({
         id,
         dataContent: [],
@@ -535,7 +710,7 @@ export default {
       }
     },
     //重组table-显示名称
-    setTable () {
+    setTable() {
       this.tableArrs.forEach((item) => {
         this.tableOptions[item].forEach((p) => {
           this.tableDataCopy.forEach((msg) => {
@@ -554,7 +729,7 @@ export default {
       this.tableData = this.tableDataCopy;
     },
     //分组
-    tableGroup (tableData) {
+    tableGroup(tableData) {
       const spanArr = [];
       let pos = 0;
       let ifYj = this.tableGroups[0];
@@ -574,14 +749,14 @@ export default {
       this.spanArr = spanArr;
       this.pos = pos;
     },
-    popoverShowHandler (prop) {
+    popoverShowHandler(prop) {
       this.colShowFilter = prop;
     },
-    popoverHideHandler () {
+    popoverHideHandler() {
       this.colShowFilter = "";
     },
     //分组
-    tableSpanMethod ({ row, column, rowIndex, columnIndex }) {
+    tableSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (this.tableGroups.includes(column["property"])) {
         const _row = this.spanArr[rowIndex];
         const _col = _row > 0 ? 1 : 0;
@@ -592,7 +767,7 @@ export default {
       }
     },
     //合计
-    getSummaries (param) {
+    getSummaries(param) {
       const { columns, data } = param;
       const sums = [];
       columns.forEach((column, index) => {
@@ -616,15 +791,15 @@ export default {
       return sums;
     },
     //弹框-确定
-    handleOk () {
+    handleOk() {
       this.submitClickHandler();
     },
     //滚动
-    tableLoad () {
+    tableLoad() {
       console.log("d");
     },
     //表格-新增
-    handleAdd () {
+    handleAdd() {
       // this.flag = true;
       //   this.tableType = "add";
       //   this.tableTitle = "新增";
@@ -634,7 +809,6 @@ export default {
         this.tableType = "add";
         this.tableTitle = "新增";
         this.tableForm = {};
-        // this.tableForm.
       } else {
         this.$emit("handleAdd");
       }
@@ -642,7 +816,7 @@ export default {
       // console.log(this.tableOptions);
     },
     //表格-编辑
-    async handleEdit (row) {
+    async handleEdit(row) {
       if (this.isDialog) {
         if (this.editId) {
           let data = await this.queryOriginRow(
@@ -664,7 +838,7 @@ export default {
         this.$emit("handleEdit", row);
       }
     },
-    async queryOriginRow (editId, queryTemplateColumnSetID) {
+    async queryOriginRow(editId, queryTemplateColumnSetID) {
       try {
         const { code, returnData } = await Query({
           id: editId,
@@ -680,11 +854,11 @@ export default {
       }
     },
     //表格-跳转
-    handleHerf (row) {
+    handleHerf(row) {
       alert("跳转");
     },
     // 新增/编辑-确认
-    submitClickHandler () {
+    submitClickHandler() {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           if (this.tableType == "add") {
@@ -699,19 +873,19 @@ export default {
       });
     },
     //表格-删除
-    handleRemove (row) {
+    handleRemove(row) {
       this.rmFlag = true;
       // this.rmTitle = row.className || row.username || row.serviceName || row.queryTemplateName;
       this.rmTitle = row[this.rowTitle];
       this.tableObj = row;
     },
     //表格-删除-确认
-    tableRemove () {
+    tableRemove() {
       this.tableObj.event = 3;
       this.generalDataReception(this.tableObj);
     },
     // 表格-跳转列设置页
-    handleColumnSet (row) {
+    handleColumnSet(row) {
       this.$router.push({
         path: "/systemSettings/queryTemplateChild",
         query: {
@@ -720,7 +894,7 @@ export default {
       });
     },
     // 表格-跳转数据项设置页
-    handleItemSet (row) {
+    handleItemSet(row) {
       this.$router.push({
         path: "/systemSettings/datastructureChild",
         query: {
@@ -729,7 +903,7 @@ export default {
       });
     },
     // 表格-跳转航站设置页
-    handlelodSet (row) {
+    handlelodSet(row) {
       this.$router.push({
         path: "/BasicsData/airportInfoChild",
         query: {
@@ -738,7 +912,7 @@ export default {
       });
     },
     // 表格-节点置页
-    handlenodeSet (row) {
+    handlenodeSet(row) {
       this.$router.push({
         path: "/BasicsData/deployNodeChild",
         query: {
@@ -747,7 +921,7 @@ export default {
       });
     },
     // 表格-查看
-    handleLook (row) {
+    handleLook(row) {
       this.$router.push({
         name: "serviceTopology",
         params: {
@@ -757,16 +931,16 @@ export default {
       });
     },
     // 表格-启动/停止
-    async chanheState (row) {
+    async chanheState(row) {
       const runState = row.runState == "运行" ? 0 : 1;
       const serviceID = row.serviceID;
       this.changeBtn(runState, serviceID);
     },
     // 表格-选中行
-    selectHandler (selection, row) {
+    selectHandler(selection, row) {
       this.$emit("selection-change", selection, row);
     },
-    async changeBtn (state, id) {
+    async changeBtn(state, id) {
       let res = null;
       // const { code, message } = await GeneralDataReception({
       //   serviceId: 61,

+ 75 - 53
src/components/Table/indexcopy.vue → src/components/TableAirport/index.vue

@@ -28,6 +28,8 @@
             :data="filteredTableData"
             :summary-method="getSummaries"
             :span-method="tableSpanMethod"
+            :tree-props="treeProps"
+            :row-key="rowKeyTree"
             stripe
             :show-summary="showSummary"
             border
@@ -51,7 +53,15 @@
                   >
                     <span class="icon"></span>
                   </div>
-                  <div v-else class="status1"><span class="icon"></span></div>
+                  <div
+                    v-else-if="
+                      filteredTableData[scope.$index].runState == '停止'
+                    "
+                    class="status1"
+                  >
+                    <span class="icon"></span>
+                  </div>
+                  <div v-else class="status2"><span class="icon"></span></div>
                 </div>
               </template>
             </el-table-column>
@@ -183,7 +193,7 @@
                       type="text"
                       size="small"
                       @click="handlenodeSet(scope.row)"
-                      >节点设置</el-button
+                      >位置设置</el-button
                     >
                   </div>
                 </div>
@@ -239,7 +249,12 @@
                       </el-select>
                     </template>
                     <!-- <template v-else-if="item.dataType == 'longtext'">
-                      <el-input size="small" :rows="1" type="textarea" v-model="tableForm[item.columnName]"></el-input>
+                      <el-input
+                        size="small"
+                        :rows="1"
+                        type="textarea"
+                        v-model="tableForm[item.columnName]"
+                      ></el-input>
                     </template> -->
                     <template v-else>
                       <el-input
@@ -295,6 +310,7 @@
 import { setTableFilters } from "@/utils/table";
 import Dialog from "@/layout/components/Dialog/index.vue";
 import NoData from "@/components/nodata";
+import { translateDataToTreeAllTreeMsg } from "@/utils/validate";
 import {
   Query,
   GeneralDataReception,
@@ -350,6 +366,23 @@ export default {
       type: Number,
       default: 65,
     },
+    //是否显示树形表格
+    isTree: {
+      type: Boolean,
+      default: false,
+    },
+    //树形props
+    treeProps: {
+      type: Object,
+      default: function () {
+        return { children: "children", hasChildren: "hasChildren" };
+      },
+    },
+    //树形标识id
+    rowKeyTree: {
+      type: String,
+      default: "companyID",
+    },
     //是否显示新增按钮
     isBtn: {
       type: Boolean,
@@ -465,6 +498,13 @@ export default {
     },
     //设置表头-下拉-选中数据
     filteredTableData() {
+      if (this.isTree) {
+        this.tableData = translateDataToTreeAllTreeMsg(
+          this.tableData,
+          "parentID",
+          "companyID"
+        );
+      }
       return this.tableData.filter((item) => {
         let flag = true;
         Object.entries(this.filterValues).forEach(([key, value]) => {
@@ -480,7 +520,6 @@ export default {
     dataContent: {
       handler(val) {
         if (val) {
-          console.log(val);
           if (val.companyID) {
             this.resetTable();
             this.getQuery();
@@ -490,15 +529,15 @@ export default {
       deep: true,
     },
     //监听机场变更的id  不可删除
-    dataId: {
-      if(val) {
-        console.log(val);
-        if (val.companyID) {
-          this.resetTable();
-          this.getQuery();
-        }
-      },
-    },
+    // dataId: {
+    //   if(val) {
+    //     console.log(val);
+    //     if (val.companyID) {
+    //       this.resetTable();
+    //       this.getQuery();
+    //     }
+    //   },
+    // },
   },
   mounted() {
     this.getQuery();
@@ -509,10 +548,12 @@ export default {
   methods: {
     load() {
       // console.log("分页");
-      if (this.noMore || this.loading) {
-        return;
+      if (!this.isTree) {
+        if (this.noMore || this.loading) {
+          return;
+        }
+        this.getQuery();
       }
-      this.getQuery();
     },
     resetTable() {
       this.page = 0;
@@ -576,7 +617,6 @@ export default {
       try {
         data = {
           ...data,
-          ...this.dataContent,
         };
         const { code, message } = await GeneralDataReception({
           serviceId: this.serviceId,
@@ -632,9 +672,11 @@ export default {
           this.tableArrs.push(item.columnName);
           // const reqUt = this.getSelectData(item.listqueryTemplateID)
           // reqUts.push(reqUt)
-          this.tableOptions[item.columnName] = await this.getSelectData(
-            item.listqueryTemplateID
-          );
+          if (!this.tableOptions[item.columnName]) {
+            this.tableOptions[item.columnName] = await this.getSelectData(
+              item.listqueryTemplateID
+            );
+          }
           // console.log(this.tableOptions[item.columnName])
         }
         // this.filterValues[item.columnName] = ''
@@ -766,26 +808,14 @@ export default {
         this.tableType = "add";
         this.tableTitle = "新增";
         this.tableForm = {};
-        if (this.dataContent.nodeCode) {
-          this.tableForm.nodeCode = this.dataContent.nodeCode;
-        }
         if (this.dataContent.companyID) {
-          this.tableForm.companyID = this.dataContent.companyID;
-        }
-        if (this.dataContent.IATACode) {
-          this.tableForm.IATACode = this.dataContent.IATACode;
+          this.tableForm.companyName = this.dataContent.companyID;
         }
-        // this.tableForm.
-      } else {
         if (this.dataContent.nodeCode) {
           this.tableForm.nodeCode = this.dataContent.nodeCode;
         }
-        if (this.dataContent.IATACode) {
-          this.tableForm.IATACode = this.dataContent.IATACode;
-        }
-        if (this.dataContent.companyID) {
-          this.tableForm.companyID = this.dataContent.companyID;
-        }
+        // this.tableForm.
+      } else {
         this.$emit("handleAdd");
       }
 
@@ -800,30 +830,12 @@ export default {
             row.queryTemplateColumnSetID
           );
           this.tableForm = JSON.parse(JSON.stringify(data));
-          if (this.dataContent.nodeCode) {
-            this.tableForm.nodeCode = this.dataContent.nodeCode;
-          }
-          if (this.dataContent.companyID) {
-            this.tableForm.companyID = this.dataContent.companyID;
-          }
-          if (this.dataContent.IATACode) {
-            this.tableForm.IATACode = this.dataContent.IATACode;
-          }
           // this.tableForm =this.tableForm;
           // Object.entries(tableForm).forEach(([key, value]) => {
           //   this.tableForm[key] = value
           // })
         } else {
           this.tableForm = JSON.parse(JSON.stringify(row));
-          if (this.dataContent.nodeCode) {
-            this.tableForm.nodeCode = this.dataContent.nodeCode;
-          }
-          if (this.dataContent.companyID) {
-            this.tableForm.companyID = this.dataContent.companyID;
-          }
-          if (this.dataContent.IATACode) {
-            this.tableForm.IATACode = this.dataContent.IATACode;
-          }
         }
         this.flag = true;
         this.tableType = "edit";
@@ -966,6 +978,9 @@ export default {
   width: 100%;
   // background-color: #fff;
   // padding: 20px;
+  .data-table-content {
+    height: 100%;
+  }
   ::v-deep .table {
     width: 100%;
     .cell {
@@ -1096,6 +1111,13 @@ export default {
           background-color: #afb4bf;
         }
       }
+      .status2 {
+        position: relative;
+        top: 5px;
+        .icon {
+          background-color: #eb2f3b;
+        }
+      }
     }
     .el-table__fixed-right {
       thead {

+ 1 - 1
src/views/BasicsData/views/airport/airportInfo.vue

@@ -225,7 +225,7 @@ import { AirportsList, AddAriports, DelAriports } from "@/api/SystemSettings";
 import { translateDataToTreeAll } from "@/utils/validate";
 import { Query } from "@/api/dataIntegration";
 import { findarrays } from "@/utils/validate";
-import DataTable from "@/components/Table/indexcopy.vue";
+import DataTable from "@/components/TableAirport";
 export default {
   name: "AirportInfo",
   components: { Search, Dialog, DataTable },