zhaoke %!s(int64=2) %!d(string=hai) anos
pai
achega
cdb2ed63b7

+ 15 - 2
src/views/newBagDetails/components/baggageList.vue

@@ -80,9 +80,22 @@ export default {
       baggageTableData: [],
       spanArr: [],
       pos: 0,
-      loading: false
+      loading: false,
+      dataContent: {}
     }
   },
+  watch: {
+    tagObj: {
+      handler (obj) {
+        this.dataContent = obj
+        this.queryDetails()
+      },
+      deep: true
+    }
+  },
+  created () {
+    this.dataContent = this.query
+  },
   mounted () {
     this.queryDetails()
   },
@@ -90,7 +103,7 @@ export default {
     async queryDetails () {
       try {
         this.loading = true
-        const { code, returnData } = await this.getQueryList(SERVICE_ID.bagDetailId, this.query)
+        const { code, returnData } = await this.getQueryList(SERVICE_ID.bagDetailId, this.dataContent)
         if (code == 0 && returnData && returnData.length) {
           this.baggageTableData = returnData.map((item, index) => {
             if (item['dealTime']) {

+ 38 - 16
src/views/newBagDetails/components/baggageMessage.vue

@@ -1,22 +1,26 @@
 <template>
   <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="baggageMessage">
-    <el-scrollbar style="height: 100%">
+    <div class="baggageMessage-content">
       <template v-if="messageList.length">
-        <el-row :gutter="24">
-          <el-col v-for="(message, index) in messageList" :key="index" :span="6">
-            <div class="card">
-              <div class="message-date">{{ message.flightDate }}</div>
-              <div class="message-content">
-                {{ message.sourceData.replaceAll(/[\r\n]{2,}/g, '\n').replaceAll('\\', '') }}
+        <el-scrollbar style="height: 100%">
+          <el-row style="margin:0" :gutter="15">
+            <el-col v-for="(message, index) in messageList" :key="index" :span="6">
+              <div class="card">
+                <div class="message-date">{{ message.readTime }}</div>
+                <div class="message-content">
+                  <el-scrollbar style="height: 100%">
+                    <div>{{ message.sourceData.replaceAll(/[\r\n]{2,}/g, '\n').replaceAll('\\', '') }}</div>
+                  </el-scrollbar>
+                </div>
               </div>
-            </div>
-          </el-col>
-        </el-row>
+            </el-col>
+          </el-row>
+        </el-scrollbar>
       </template>
       <template v-else>
         <el-empty :image-size="1" description="暂无数据" />
       </template>
-    </el-scrollbar>
+    </div>
     <div class="btns">
       <img class="btn-square btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportMessageToExcel">
     </div>
@@ -44,9 +48,22 @@ export default {
   data () {
     return {
       messageList: [],
-      loading: false
+      loading: false,
+      dataContent: []
+    }
+  },
+  watch: {
+    tagObj: {
+      handler (obj) {
+        this.dataContent = obj
+        this.queryDetails()
+      },
+      deep: true
     }
   },
+  created () {
+    this.dataContent = this.query
+  },
   mounted () {
     this.queryDetails()
   },
@@ -54,7 +71,7 @@ export default {
     async queryDetails () {
       try {
         this.loading = true
-        const { code, returnData } = await this.getQueryList(SERVICE_ID.bagDetailId, this.query)
+        const { code, returnData } = await this.getQueryList(SERVICE_ID.bagDetailId, this.dataContent)
         if (code == 0 && returnData && returnData.length) {
           this.messageList = [...returnData]
           this.loading = false
@@ -166,16 +183,20 @@ export default {
 
 <style lang="scss" scoped>
 .baggageMessage {
-  padding: 24px;
   height: 100%;
   position: relative;
+  &-content {
+    padding: 24px;
+    height: 100%;
+  }
   .card {
     width: 100%;
-    min-height: 440px;
+    height: 440px;
     padding: 20px;
     background: #ffffff;
+    border: 1px solid #dfe3ea;
     box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, 0.29);
-    margin-bottom: 24px;
+    margin-bottom: 12px;
     > .message-date {
       width: 180px;
       height: 26px;
@@ -192,6 +213,7 @@ export default {
       font-size: 14px;
       color: #303133;
       word-break: break-all;
+      height: calc(100% - 44px);
     }
   }
   .btns {

+ 3 - 3
src/views/newBagDetails/index.vue

@@ -265,11 +265,11 @@ export default {
       }
     },
     tagClick (item, index) {
-      const { luggageNum, flightDate, flightNo } = item
+      const { luggageNum, carrierFlights, carrierFlightsDate } = item
       this.tagObj = {
         luggageNum,
-        flightDate,
-        flightNo
+        carrierFlights,
+        carrierFlightsDate
       }
       this.activeIndex = index
     },

+ 11 - 11
src/views/newQuery/components/search.vue

@@ -490,17 +490,17 @@ export default {
           })
         }
       })
-      const optionsList = await Promise.all(
-        Object.keys(reflect).map(listqueryTemplateID => this.getSelectData(Number(listqueryTemplateID)))
-      )
-      optionsList.forEach(({ id, options }) => {
-        reflect[id].forEach(columnName => {
-          this.columnSet[columnName].options = options.map(option => ({
-            label: option.k,
-            value: option.v
-          }))
-        })
-      })
+      // const optionsList = await Promise.all(
+      //   Object.keys(reflect).map(listqueryTemplateID => this.getSelectData(Number(listqueryTemplateID)))
+      // )
+      // optionsList.forEach(({ id, options }) => {
+      //   reflect[id].forEach(columnName => {
+      //     this.columnSet[columnName].options = options.map(option => ({
+      //       label: option.k,
+      //       value: option.v
+      //     }))
+      //   })
+      // })
     },
     load () {
       if (this.noMore || this.loading) {

+ 14 - 0
src/views/newQuery/components/table.vue

@@ -37,6 +37,7 @@ import pf from '@/layout/mixin/publicFunc';
 import { setTableFilters } from "@/utils/table";
 import { getToken } from '@/utils/auth';
 import { getAuthData } from "@/utils/validate";
+import { throttledExportToExcel } from '@/utils/table';
 export default {
   name: 'NewQueryTable',
   mixins: [pf],
@@ -96,6 +97,9 @@ export default {
         return flag;
       });
     },
+    tableHeight () {
+      return 100
+    }
   },
   watch: {
     tableTag: {
@@ -310,6 +314,13 @@ export default {
         }
       }
     },
+    //导出
+    exportHandler () {
+      const table = this.$refs['table'].$el.cloneNode(true)
+      // const { luggageNum, flightNo, flightDate } = this.query
+      const fileName = `高级查询.xlsx`
+      throttledExportToExcel(table, '高级查询', fileName)
+    },
   }
 }
 </script>
@@ -325,6 +336,9 @@ export default {
         position: relative;
       }
     }
+    .cell {
+      color: #000;
+    }
   }
 }
 </style>

+ 20 - 9
src/views/newQuery/index.vue

@@ -5,10 +5,12 @@
         <div class="newQuery-head-left flex-wrap">
           <div class="title">高级查询</div>
           <div class="btns">
-            <el-button v-for="(item,index) in queryItems" :key="index" @click="handleClick(item)" size="mini" plain type="primary">
-              <span class="btnName">{{ item.name }}</span>
-              <span @click.stop="handleRemove(item)" class="btnIcon"><i class="el-icon-close"></i></span>
-            </el-button>
+            <el-scrollbar ref="scrollContainer" :vertical="false">
+              <el-button v-for="(item,index) in queryItems" :key="index" @click="handleClick(item)" size="mini" plain type="primary">
+                <span class="btnName">{{ item.name }}</span>
+                <span @click.stop="handleRemove(item)" class="btnIcon"><i class="el-icon-close"></i></span>
+              </el-button>
+            </el-scrollbar>
           </div>
         </div>
         <div class="newQuery-head-right flex-wrap">
@@ -16,8 +18,8 @@
             <el-button @click="handleAdd" size="mini" plain type="primary">新增</el-button>
             <el-button @click="saveItem" size="mini" plain type="primary">保存条件</el-button>
           </template>
-          <el-button @click="handleSearch" size="mini" plain type="primary">查询</el-button>
-          <el-button type="primary" plain size="mini" icon="el-icon-download"></el-button>
+          <el-button @click="handleSearch" size="mini" class="r10" plain type="primary">查询</el-button>
+          <img @click="handleDown" class="btn-square btn-shadow" src="@/assets/baggage/ic_export.png" title="导出">
         </div>
       </div>
       <div class="newQuery-tab">
@@ -30,7 +32,7 @@
         <Search :dataQuery="dataQuery" @getColData="getColData" ref="searchTable" />
       </div>
       <div :style="{height:tableHeight}" class="newQuery-table">
-        <Table :tableTag="tableTag" />
+        <Table ref="queryTable" :tableTag="tableTag" />
       </div>
     </div>
     <Dialog width="520px" :flag="diaFlag">
@@ -127,6 +129,10 @@ export default {
         }
       }, 50);
     },
+    //table导出
+    handleDown () {
+      this.$refs.queryTable.exportHandler()
+    },
     // 保存条件
     saveItem () {
       this.diaFlag = true
@@ -213,20 +219,23 @@ export default {
     border-radius: 4px;
     position: relative;
   }
+  .r10 {
+    margin-right: 10px;
+  }
   &-tab {
     position: absolute;
     left: 0;
     top: 78px;
     width: 100%;
     height: 5px;
-    background-color: #999;
+    background-color: #b2cbde;
     z-index: 100;
     text-align: center;
     .msg {
       display: inline-block;
       width: 100px;
       height: 15px;
-      background-color: #999;
+      background-color: #b2cbde;
       border-radius: 5px;
       cursor: pointer;
       color: #fff;
@@ -240,6 +249,8 @@ export default {
       margin-right: 50px;
     }
     .btns {
+      max-width: 650px;
+      white-space: nowrap;
       .btnIcon {
         margin-left: 15px;
       }

+ 13 - 3
src/views/systemSettings/views/newAuth/components/table.vue

@@ -112,11 +112,19 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
-              <el-form-item label-width="80px" label="字段排序">
+            <el-col :span="6">
+              <el-form-item class="flex1" label-width="80px" label="字段排序">
                 <el-input size="small" clearable placeholder="请输入名称" v-model="tableForm.orderNumber"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :span="6">
+              <el-form-item class="flex1" label-width="80px" label="查询项">
+                <el-select size="small" clearable v-model="tableForm.is_search" placeholder="请选择是否查询项">
+                  <el-option label="是" value="1"></el-option>
+                  <el-option label="否" value="0"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
           </el-row>
         </el-form>
       </div>
@@ -248,6 +256,7 @@ export default {
         needCount: "",
         orderNumber: "",
         needSearch: "",
+        is_search: ''
       },
       tableData: [],
       tableDataCopys: [],
@@ -327,7 +336,8 @@ export default {
     //表格数据提交
     async handleOk () {
       this.tableForm.serviceOutPutId = this.form.auth_id
-      const { code } = await this.getChangeList(SERVICE_ID.getTableColumnId, this.tableForm, 2, 'queryTemplateColumnSetID')
+      const newObj = _.cloneDeep(this.tableForm)
+      const { code } = await this.getChangeList(SERVICE_ID.getTableColumnId, newObj, 2, 'queryTemplateColumnSetID')
       if (code == 0) {
         this.$message.success('操作成功')
       } else {