chenrui  преди 2 години
родител
ревизия
9ced59028f

+ 327 - 146
src/components/Table/index.vue

@@ -1,18 +1,47 @@
 <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 v-if="isBtn" class="data-table-btn flex-end">
-        <el-button size="small" @click="handleAdd" plain type="primary">新增</el-button>
+        <el-button 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" 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
+            v-el-table-infinite-scroll="load"
+            :data="filteredTableData"
+            :summary-method="getSummaries"
+            :span-method="tableSpanMethod"
+            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-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">
@@ -20,18 +49,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>
@@ -44,10 +93,52 @@
                 <div class="hd-td">
                   <div class="hd-tr">
                     <!-- <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
+                      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>
@@ -66,16 +157,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>
@@ -83,7 +196,11 @@
                       <el-input size="small" :rows="1" type="textarea" v-model="tableForm[item.columnName]"></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>
@@ -91,7 +208,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>
@@ -100,11 +223,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>
@@ -123,20 +255,20 @@ export default {
   props: {
     isDialog: {
       type: Boolean,
-      default: true
+      default: true,
     },
     //接口ID
     dataId: {
       type: [String, Number],
-      default: ''
+      default: "",
     },
     editId: {
       type: [String, Number],
-      default: ''
+      default: "",
     },
     dataContent: {
       type: Object,
-      default: () => ({})
+      default: () => ({}),
     },
     //弹框宽度
     width: {
@@ -156,7 +288,7 @@ export default {
     //表格高度
     tableHeight: {
       type: [String, Number],
-      default: 0
+      default: 0,
     },
     minHeight: {
       type: Number,
@@ -170,46 +302,56 @@ export default {
     // 是否显示合计行
     showSummary: {
       type: Boolean,
-      default: false
+      default: false,
     },
     marginTop: {
       type: String,
-      default: '20px'
+      default: "20px",
     },
     // 是否可选中行
     selectionEnable: {
       type: Boolean,
-      default: false
+      default: false,
     },
     // 懒加载
     withLazyLoad: {
       type: Boolean,
-      default: false
+      default: false,
     },
     // 不换行,溢出隐藏
     showOverflowTooltip: {
       type: Boolean,
-      default: false
+      default: false,
     },
     // 表格-操作-列设置按钮显示
     withColumnSet: {
       type: Boolean,
-      default: false
+      default: false,
     },
     // 表格-操作-项设置按钮显示
     withItemSet: {
       type: Boolean,
-      default: false
-    }
+      default: false,
+    },
+    // 表格-操作-项设置按钮显示
+    withlodSet: {
+      type: Boolean,
+      default: false,
+    },
+    // 表格-操作-节点按钮显示
+    withnodeSet: {
+      type: Boolean,
+      default: false,
+    },
   },
   components: { Dialog, NoData },
-  data () {
+  data() {
     return {
       loading: false,
       flag: false,
       serviceId: null,
       rmFlag: false,
-      rowTitle: '',
+      rowTitle: "",
       tableCols: [], //表头数据
       tableData: [], //表格数据
       tableColsCopy: [], //表头数据缓存
@@ -227,22 +369,22 @@ export default {
       tableObj: {}, //增/删/改数据缓存
       tableOptions: {}, //弹框-下来数据缓存
       tableArrs: [], //重组table-表头下拉
-      proAll: false //重组时-所有请求是否都完成
+      proAll: false, //重组时-所有请求是否都完成
     };
   },
   computed: {
     dataTableContentStyle() {
-      const style = {}
+      const style = {};
       if (this.minHeight) {
-        style['min-height'] = this.minHeight
+        style["min-height"] = this.minHeight;
       }
       if (this.tableHeight) {
-        style['height'] = this.tableHeight
+        style["height"] = this.tableHeight;
       }
-      return style
+      return style;
     },
     //设置表头-下拉-箭头样式
-    arrowClass () {
+    arrowClass() {
       return function (prop) {
         let classString = "";
         if (this.colShowFilter === prop) {
@@ -259,7 +401,7 @@ export default {
       };
     },
     //设置表头-下拉-选中数据
-    filteredTableData () {
+    filteredTableData() {
       return this.tableData.filter((item) => {
         let flag = true;
         Object.entries(this.filterValues).forEach(([key, value]) => {
@@ -271,42 +413,41 @@ export default {
       });
     },
   },
-  // watch: {
-  //   proAll: {
-  //     handler (val) {
-  //       if (val) {
-  //         setTimeout(() => {
-  //           this.setTable()
-  //         }, 200);
-  //       }
-  //     },
-  //     deep: true
-  //   }
-  // },
-  mounted () {
+  watch: {
+    dataContent: {
+      handler(val) {
+        if (val) {
+          this.getQuery();
+        }
+      },
+      deep: true,
+    },
+  },
+  mounted() {
     this.getQuery();
   },
   updated() {
-    this.$refs['table']?.doLayout()
+    this.$refs["table"]?.doLayout();
   },
   methods: {
-    load(){
-      console.log('分页')
+    load() {
+      console.log("分页");
     },
-    changeSelect(data){
-      if (this.tableForm[data] === '') {
-        this.tableForm[data] = null
+    changeSelect(data) {
+      if (this.tableForm[data] === "") {
+        this.tableForm[data] = null;
       }
-      this.tableForm[this.tableOptions[data][0].setvalue] = this.tableForm[data];
+      this.tableForm[this.tableOptions[data][0].setvalue] =
+        this.tableForm[data];
       // console.log(this.tableForm)
     },
     inputChangeHandler(data) {
-      if (this.tableForm[data] === '') {
-        this.tableForm[data] = null
+      if (this.tableForm[data] === "") {
+        this.tableForm[data] = null;
       }
     },
     //获取表格数据
-    async getQuery () {
+    async getQuery() {
       try {
         this.loading = true;
         const { code, returnData } = await Query({
@@ -314,9 +455,11 @@ export default {
           dataContent: Object.values(this.dataContent),
         });
         if (code == 0) {
-          const titleColumn = returnData.columnSet.find(item => item.needShow === 1)
+          const titleColumn = returnData.columnSet.find(
+            (item) => item.needShow === 1
+          );
           if (titleColumn) {
-            this.rowTitle = titleColumn.columnName
+            this.rowTitle = titleColumn.columnName;
           }
           this.tableData = returnData.listValues;
           this.tableCols = returnData.columnSet;
@@ -335,12 +478,12 @@ export default {
       }
     },
     //表格-增/删/改
-    async generalDataReception (data) {
+    async generalDataReception(data) {
       try {
         data = {
           ...data,
-          ...this.dataContent
-        }
+          ...this.dataContent,
+        };
         const { code, message } = await GeneralDataReception({
           serviceId: this.serviceId,
           dataContent: JSON.stringify(data),
@@ -369,50 +512,54 @@ export default {
     },
     // 表格勾选
     toggleRowSelection(row, isSelected) {
-      this.$refs['table'].toggleRowSelection(row, isSelected)
+      this.$refs["table"].toggleRowSelection(row, isSelected);
     },
     // 表格初始勾选
     selectTableRows(tableData, selectFlagName) {
-      tableData.forEach(row => {
-        this.$refs['table'].toggleRowSelection(row, !!row[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)
       this.tableDataCopy = _.cloneDeep(this.tableData);
       const datas = _.cloneDeep(this.tableColsCopy);
-      const reqUts = []
+      const reqUts = [];
       datas.forEach(async (item) => {
         this.tableDataFilters[item.columnName] = [];
         if (item.needGroup) {
           this.tableGroups.push(item.columnName);
         }
         if (item.listqueryTemplateID || item.listqueryTemplateID == 0) {
-          this.tableArrs.push(item.columnName)
+          this.tableArrs.push(item.columnName);
           // const reqUt = this.getSelectData(item.listqueryTemplateID)
           // reqUts.push(reqUt)
-          this.tableOptions[item.columnName] = await this.getSelectData(item.listqueryTemplateID)
+          this.tableOptions[item.columnName] = await this.getSelectData(
+            item.listqueryTemplateID
+          );
           // console.log(this.tableOptions[item.columnName])
         }
         // this.filterValues[item.columnName] = ''
       });
       setTableFilters(this.tableData, this.tableDataFilters);
       this.tableGroup(this.tableData);
-      this.selectTableRows(this.tableData, 'DeployID')
+      this.selectTableRows(this.tableData, "DeployID");
       // this.getSelectDataAll(reqUts)
     },
     //获取所有获取弹框-下拉数据-请求状态
-    getSelectDataAll (reqUts) {
-      Promise.all(reqUts).then(res => {
-        this.proAll = true
-      }).catch(err => {
-        this.proAll = false
-      })
+    getSelectDataAll(reqUts) {
+      Promise.all(reqUts)
+        .then((res) => {
+          this.proAll = true;
+        })
+        .catch((err) => {
+          this.proAll = false;
+        });
     },
     //获取弹框-下拉数据
-    async getSelectData (id) {
+    async getSelectData(id) {
       const { code, returnData } = await Query({
         id,
         dataContent: [],
@@ -424,26 +571,26 @@ export default {
       }
     },
     //重组table-显示名称
-    setTable () {
-      this.tableArrs.forEach(item => {
-        this.tableOptions[item].forEach(p => {
-          this.tableDataCopy.forEach(msg => {
+    setTable() {
+      this.tableArrs.forEach((item) => {
+        this.tableOptions[item].forEach((p) => {
+          this.tableDataCopy.forEach((msg) => {
             if (msg[item] == p.v) {
-              msg[item] = p.k
+              msg[item] = p.k;
             }
-          })
-          this.tableDataFilters[item].forEach(cap => {
+          });
+          this.tableDataFilters[item].forEach((cap) => {
             if (cap.value == p.v) {
-              cap.text = p.k
-              cap.value = p.k
+              cap.text = p.k;
+              cap.value = p.k;
             }
-          })
-        })
-      })
-      this.tableData = this.tableDataCopy
+          });
+        });
+      });
+      this.tableData = this.tableDataCopy;
     },
     //分组
-    tableGroup (tableData) {
+    tableGroup(tableData) {
       const spanArr = [];
       let pos = 0;
       let ifYj = this.tableGroups[0];
@@ -463,14 +610,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;
@@ -481,7 +628,7 @@ export default {
       }
     },
     //合计
-    getSummaries (param) {
+    getSummaries(param) {
       const { columns, data } = param;
       const sums = [];
       columns.forEach((column, index) => {
@@ -505,72 +652,74 @@ export default {
       return sums;
     },
     //弹框-确定
-    handleOk () {
+    handleOk() {
       this.submitClickHandler();
     },
     //滚动
-    tableLoad () {
+    tableLoad() {
       console.log("d");
     },
     //表格-新增
-    handleAdd () {
+    handleAdd() {
       // this.flag = true;
       //   this.tableType = "add";
       //   this.tableTitle = "新增";
       //   this.tableForm = {};
-      if(this.isDialog ){
+      if (this.isDialog) {
         this.flag = true;
         this.tableType = "add";
         this.tableTitle = "新增";
         this.tableForm = {};
-      }
-      else{
+      } else {
         this.$emit("handleAdd");
       }
 
       // console.log(this.tableOptions);
     },
     //表格-编辑
-    async handleEdit (row) {
-      if(this.isDialog) {
+    async handleEdit(row) {
+      if (this.isDialog) {
         if (this.editId) {
-          let data  = await this.queryOriginRow(this.editId, row.queryTemplateColumnSetID)
-          this.tableForm =  JSON.parse(JSON.stringify(data))
+          let data = await this.queryOriginRow(
+            this.editId,
+            row.queryTemplateColumnSetID
+          );
+          this.tableForm = JSON.parse(JSON.stringify(data));
           // this.tableForm =this.tableForm;
           // Object.entries(tableForm).forEach(([key, value]) => {
           //   this.tableForm[key] = value
           // })
         } else {
-          this.tableForm =  JSON.parse(JSON.stringify(row));
+          this.tableForm = JSON.parse(JSON.stringify(row));
         }
         this.flag = true;
         this.tableType = "edit";
         this.tableTitle = "编辑";
-      } else{
-        this.$emit("handleEdit",row);
+      } else {
+        this.$emit("handleEdit", row);
       }
     },
     async queryOriginRow(editId, queryTemplateColumnSetID) {
       try {
         const { code, returnData } = await Query({
           id: editId,
-          dataContent: [queryTemplateColumnSetID]
-        })
+          dataContent: [queryTemplateColumnSetID],
+        });
         if (Number(code) === 0) {
-          return returnData.listValues[0]
+          return returnData.listValues[0];
         } else {
-          this.$message.error("失败")
+          this.$message.error("失败");
         }
       } catch (error) {
-        console.log(error)
+        console.log(error);
       }
     },
     //表格-跳转
-    handleHerf(row){
-      alert('跳转')
+    handleHerf(row) {
+      alert("跳转");
     },
     // 新增/编辑-确认
-    submitClickHandler () {
+    submitClickHandler() {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           if (this.tableType == "add") {
@@ -585,39 +734,57 @@ 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.rmTitle = row[this.rowTitle];
       this.tableObj = row;
     },
     //表格-删除-确认
-    tableRemove () {
+    tableRemove() {
       this.tableObj.event = 3;
       this.generalDataReception(this.tableObj);
     },
     // 表格-跳转列设置页
     handleColumnSet(row) {
       this.$router.push({
-        path: '/systemSettings/queryTemplateChild',
+        path: "/systemSettings/queryTemplateChild",
         query: {
-          queryTemplateID: row.queryTemplateID
-        }
-      })
+          queryTemplateID: row.queryTemplateID,
+        },
+      });
     },
     // 表格-跳转数据项设置页
     handleItemSet(row) {
       this.$router.push({
-        path: '/systemSettings/datastructureChild',
+        path: "/systemSettings/datastructureChild",
         query: {
-          dataStructureID: row.dataStructureID
-        }
-      })
+          dataStructureID: row.dataStructureID,
+        },
+      });
+    },
+    // 表格-跳转航站设置页
+    handlelodSet(row) {
+      this.$router.push({
+        path: "/BasicsData/airportInfoChild",
+        query: {
+          dataStructureID: row.dataStructureID,
+        },
+      });
+    },
+    // 表格-节点置页
+    handlenodeSet(row) {
+      this.$router.push({
+        path: "/BasicsData/deployNodeChild",
+        query: {
+          dataStructureID: row.dataStructureID,
+        },
+      });
     },
     // 表格-选中行
     selectHandler(selection, row) {
-      this.$emit('selection-change', selection, row)
-    }
+      this.$emit("selection-change", selection, row);
+    },
   },
 };
 </script>
@@ -648,8 +815,8 @@ export default {
         font-weight: bold;
         color: #101116;
         > .el-checkbox {
-        display: none;
-      }
+          display: none;
+        }
       }
       .has-gutter {
         tr {
@@ -693,6 +860,20 @@ export default {
         color: #2d67e3;
       }
     }
+    .rmScser {
+      width: 60px;
+      height: 24px;
+      border-color: #9ebbf7;
+      box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
+      border-radius: 4px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      float: left;
+      span {
+        color: #2d67e3;
+      }
+    }
     .rmSc {
       width: 48px;
       height: 24px;
@@ -710,7 +891,7 @@ export default {
     .hrefBtn {
       width: 48px;
       height: 24px;
-      background: #6F81BC;
+      background: #6f81bc;
       box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
       border-radius: 4px;
       display: flex;
@@ -729,7 +910,7 @@ export default {
       }
     }
     .hd-td {
-      .hd-tr{
+      .hd-tr {
         display: flex;
         justify-content: center;
         flex-direction: row;

+ 36 - 3
src/router/routes/routes-file-one.js

@@ -42,16 +42,40 @@ const BasicsDataRoutes = {
               isAlone: true,
               src: require('@/assets/nav/ic_setting_top@2x.png')
             },
+            {
+              path: '/BasicsData/airportInfoChild',
+              name: 'airportInfoChild',
+              component: () => import('@/views/BasicsData/views/airport/airportInfoChild'),
+              meta: { title: '航站设置' },
+              hidden: false,
+              isAlone: true,
+              src: require('@/assets/nav/ic_setting_top@2x.png')
+            }
           ]
         },
         {
           path: '/BasicsData/deployNode',
           name: 'deployNode',
-          component: () => import('@/views/BasicsData/views/deployNode/deployNodeHome'),
+          component: { render(c) { return c('router-view') } },
           meta: { title: '节点信息维护' },
           hidden: true,
           src: require('@/assets/nav/ic_data_top_default @2x.png'),
-          srcer: require('@/assets/nav/ic_data_top_check@2x.png')
+          srcer: require('@/assets/nav/ic_data_top_check@2x.png'),
+          children: [
+            {
+              path: '/BasicsData/deployNode',
+              component: () => import('@/views/BasicsData/views/deployNode/deployNodeHome'),
+            },
+            {
+              path: '/BasicsData/deployNodeChild',
+              name: 'deployNodeChild',
+              component: () => import('@/views/BasicsData/views/deployNode/deployNodeChild'),
+              meta: { title: '节点设置' },
+              hidden: false,
+              isAlone: true,
+              src: require('@/assets/nav/ic_setting_top@2x.png')
+            }
+          ]
         },
         // {
         //   path: '/BasicsData/warningSet',
@@ -85,7 +109,16 @@ const BasicsDataRoutes = {
           hidden: true,
           src: require('@/assets/nav/ic_data_top_default @2x.png'),
           srcer: require('@/assets/nav/ic_data_top_check@2x.png')
-        }
+        },
+        // {
+        //   path: '/BasicsData/airportChild',
+        //   name: 'airportChild',
+        //   component: () => import('@/views/systemSettings/views/airport/airportChild'),
+        //   meta: { title: '航站设置' },
+        //   hidden: false,
+        //   isAlone: true,
+        //   src: require('@/assets/nav/ic_setting_top@2x.png')
+        // }
       ]
     }
   ]

+ 43 - 150
src/views/BasicsData/views/airport/airportInfo.vue

@@ -8,13 +8,6 @@
 -->
 <template>
   <div class="airportInfo">
-    <DataTable
-      data-id="53"
-      :rows="12"
-      labelWidth="100px"
-      :minHeight="70"
-      width="800px"
-    />
     <!--搜索-->
     <!-- <div class="airportInfo-search">
       <Search
@@ -28,9 +21,9 @@
       </Search>
     </div> -->
     <!--内容区域-->
-    <!-- <div class="airportInfo-content">
+    <div class="airportInfo-content">
       <el-row :gutter="24">
-        <el-col :span="8">
+        <el-col :span="6">
           <div class="tree_left">
             <el-scrollbar style="height: 100%">
               <div class="corporate">所属公司</div>
@@ -44,55 +37,19 @@
             </el-scrollbar>
           </div>
         </el-col>
-        <el-col :span="16">
-          <el-row :gutter="24">
-            <div class="cont_right">
-              <el-scrollbar style="height: 100%">
-                <el-col
-                  v-for="(item, index) in arr"
-                  class="airportInfo-content-list"
-                  :key="index"
-                  :span="6"
-                >
-                  <div class="grid-content box-public-shadow">
-                    <div class="flex list">
-                      <div class="ult flex-wrap er">
-                        <el-tooltip
-                          class="item"
-                          effect="dark"
-                          :content="item.name"
-                          placement="bottom"
-                        >
-                          <div class="title">{{ item.name }}</div>
-                        </el-tooltip>
-                        <div @click="toTink(item)" class="edit_log"></div>
-                      </div>
-                      <div class="close">
-                        <span
-                          @click.stop="handleMove(item)"
-                          class="el-icon-close icon"
-                        ></span>
-                      </div>
-                    </div>
-                    <div class="list desc">
-                      <div class="plus" @click="newterminal()">+</div>
-                      <div
-                        class="plus_list"
-                        v-for="(res, indexs) in item.fullName"
-                        :key="indexs"
-                      >
-                        {{ res.name }}
-                        <div class="logx" @click="Tinkhall(res)"></div>
-                      </div>
-                    </div>
-                  </div>
-                </el-col>
-              </el-scrollbar>
-            </div>
-          </el-row>
+        <el-col :span="18">
+          <DataTable
+            data-id="57"
+            :rows="12"
+            labelWidth="100px"
+            :minHeight="70"
+            width="800px"
+            :withlodSet="true"
+            :data-content="{ companyID }"
+          />
         </el-col>
       </el-row>
-    </div> -->
+    </div>
     <!--删除弹框-->
     <Dialog :flag="flag">
       <div class="airportInfoDialog">
@@ -264,6 +221,8 @@
 import Search from "@/layout/components/Search/index.vue";
 import Dialog from "@/layout/components/Dialog/index.vue";
 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";
 export default {
@@ -271,92 +230,14 @@ export default {
   components: { Search, Dialog, DataTable },
   data() {
     return {
-      data: [
-        {
-          label: "西南分公司",
-          children: [
-            {
-              label: "二级 1-1",
-              children: [
-                {
-                  label: "三级 1-1-1",
-                },
-              ],
-            },
-          ],
-        },
-        {
-          label: "一级 2",
-          children: [
-            {
-              label: "二级 2-1",
-              children: [
-                {
-                  label: "三级 2-1-1",
-                },
-              ],
-            },
-            {
-              label: "二级 2-2",
-              children: [
-                {
-                  label: "三级 2-2-1",
-                },
-              ],
-            },
-          ],
-        },
-        {
-          label: "一级 3",
-          children: [
-            {
-              label: "二级 3-1",
-              children: [
-                {
-                  label: "三级 3-1-1",
-                },
-              ],
-            },
-            {
-              label: "二级 3-2",
-              children: [
-                {
-                  label: "三级 3-2-1",
-                },
-              ],
-            },
-          ],
-        },
-      ],
+      data: [],
       defaultProps: {
         children: "children",
-        label: "label",
+        label: "companyName",
       },
       newUp: false, //新增开关
       newUpname: "",
       msgType: true, //新增/编辑切换
-      arr: [
-        {
-          name: "名称",
-          fullName: [
-            {
-              name: "T1",
-            },
-            {
-              name: "T1",
-            },
-            {
-              name: "T1",
-            },
-            {
-              name: "T1",
-            },
-            {
-              name: "T1",
-            },
-          ],
-        },
-      ], //内容数据
       flag: false, //删除弹框开关
       flaghall: false, //删除航站楼开关
       addFlag: false, //新增机场信息弹框开关
@@ -402,10 +283,11 @@ export default {
           { required: true, message: "请输入机场三字码", trigger: "blur" },
         ],
       },
+      companyID: "",
     };
   },
   mounted() {
-    // this.getAirlines();
+    this.getAirlines();
   },
   methods: {
     //新增航站楼
@@ -414,10 +296,7 @@ export default {
     },
     //点击树状图
     handleNodeClick(data) {
-      if (data.label) {
-        this.newUp = true;
-        this.ruleForm.upname = data.label;
-      }
+      this.companyID = data.companyID;
     },
     closeForm() {
       this.$refs.ruleForm.resetFields();
@@ -467,13 +346,26 @@ export default {
         },
       });
     },
-    //机场列表
+    //公司列表
     async getAirlines() {
-      const result = await AirportsList({});
-      if (result.code === 0) {
-        this.arr = result.returnData;
-      } else {
-        this.$message.error.message;
+      try {
+        const res = await Query({
+          id: 58,
+          dataContent: [],
+        });
+        if (res.code === "0") {
+          let arr = [];
+          arr = translateDataToTreeAll(
+            res.returnData.listValues,
+            "parentID",
+            "companyID"
+          );
+          this.data = arr;
+        } else {
+          this.$message.error(res.message ?? "失败");
+        }
+      } catch (error) {
+        console.log("错误", error);
       }
     },
     //删除信息
@@ -588,11 +480,12 @@ export default {
   }
   .tree_left {
     width: 100%;
-    height: 69vh;
+    height: 71.8vh;
     background: #ffffff;
-    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
-    border-radius: 4px;
+    // box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
+    // border-radius: 4px;
     padding: 24px 24px;
+    margin-top: 20px;
     .corporate {
       font-size: 16px;
       font-family: Microsoft YaHei;

+ 55 - 0
src/views/BasicsData/views/airport/airportInfoChild.vue

@@ -0,0 +1,55 @@
+<template>
+  <div class="queryItemSettings_home">
+    <div class="wrap">
+      <DataTable
+        data-id="44"
+        edit-id="45"
+        :data-content="{ queryTemplateID }"
+        :rows="12"
+        label-width="140px"
+        :min-height="70"
+        width="800px"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import DataTable from "@/components/Table";
+export default {
+  components: { DataTable },
+  data() {
+    return {
+      queryTemplateID: null,
+    };
+  },
+  created() {
+    // if (!this.$route.query.queryTemplateID) {
+    //   this.$router.push("/systemSettings/queryTemplate");
+    //   return;
+    // }
+    this.queryTemplateID = Number(this.$route.query.queryTemplateID);
+  },
+};
+</script>
+<style lang="scss" scoped>
+.queryItemSettings-home {
+  .wrap {
+    padding: 16px 0;
+    .service-header {
+      line-height: 32px;
+      font-size: 14px;
+      .btn-white {
+        border: 1px solid #9ebbf7;
+        background: #f5f7fa;
+        -webkit-box-shadow: 0px 6px 7px 0px rgb(0 0 0 / 6%);
+        box-shadow: 0px 6px 7px 0px rgb(0 0 0 / 6%);
+        border-radius: 4px;
+        font-family: Microsoft YaHei;
+        font-weight: bold;
+        color: #2d67e3;
+      }
+      margin-bottom: 30px;
+    }
+  }
+}
+</style>

+ 55 - 0
src/views/BasicsData/views/deployNode/deployNodeChild.vue

@@ -0,0 +1,55 @@
+<template>
+  <div class="queryItemSettings_home">
+    <div class="wrap">
+      <DataTable
+        data-id="44"
+        edit-id="45"
+        :data-content="{ queryTemplateID }"
+        :rows="12"
+        label-width="140px"
+        :min-height="70"
+        width="800px"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import DataTable from "@/components/Table";
+export default {
+  components: { DataTable },
+  data() {
+    return {
+      queryTemplateID: null,
+    };
+  },
+  created() {
+    // if (!this.$route.query.queryTemplateID) {
+    //   this.$router.push("/systemSettings/queryTemplate");
+    //   return;
+    // }
+    this.queryTemplateID = Number(this.$route.query.queryTemplateID);
+  },
+};
+</script>
+<style lang="scss" scoped>
+.queryItemSettings-home {
+  .wrap {
+    padding: 16px 0;
+    .service-header {
+      line-height: 32px;
+      font-size: 14px;
+      .btn-white {
+        border: 1px solid #9ebbf7;
+        background: #f5f7fa;
+        -webkit-box-shadow: 0px 6px 7px 0px rgb(0 0 0 / 6%);
+        box-shadow: 0px 6px 7px 0px rgb(0 0 0 / 6%);
+        border-radius: 4px;
+        font-family: Microsoft YaHei;
+        font-weight: bold;
+        color: #2d67e3;
+      }
+      margin-bottom: 30px;
+    }
+  }
+}
+</style>

+ 1 - 0
src/views/BasicsData/views/deployNode/deployNodeHome.vue

@@ -3,6 +3,7 @@
     <DataTable
       data-id="54"
       :rows="12"
+      :withnodeSet="true"
       labelWidth="100px"
       :minHeight="70"
       width="800px"