2 Commits 3b051805b8 ... 43b5e38893

Author SHA1 Message Date
  zhanghonggang 43b5e38893 fix: 修复图表切换的BUG 5 months ago
  zhanghonggang 330e12d5d5 feat: 上传/下载优化 5 months ago

+ 7 - 5
src/views/flight/flightQueryByLogTime/index.vue

@@ -144,6 +144,7 @@
       width="95%"
       append-to-body
       center
+      @close="initData()"
     >
       <div
         class="chart-container"
@@ -241,10 +242,6 @@ export default {
         ],
         MINUTE: [
           {
-            type: "5",
-            value: "5分钟",
-          },
-          {
             type: "10",
             value: "10分钟",
           },
@@ -480,7 +477,7 @@ export default {
         } else if (val === "HOUR") {
           this.statisticalInterval = "1";
         } else if (val === "MINUTE") {
-          this.statisticalInterval = "5";
+          this.statisticalInterval = "10";
         }
       } else if (type === "DAY") {
         this.statisticalInterval = "1";
@@ -500,6 +497,11 @@ export default {
         // type === "DAY" || (type === "lx" && val === "MINUTE")
       });
     },
+    initData() {
+      this.statisticalInterval = "1";
+      this.logDate = null;
+      this.timeTypeValue = "HOUR";
+    },
     selectFlightNumber(row) {
       this.selectRow = row;
       if (row.flightNumber) {

+ 28 - 15
src/views/flight/global-ticket/index.vue

@@ -118,7 +118,7 @@
               @click="handleUpload"
               v-hasPermi="['global-ticket:queryTask:upload']"
             >
-              上传表格
+              导入查询任务
             </el-button>
           </el-col>
           <el-col :span="1.5">
@@ -130,7 +130,7 @@
               @click="handleDownload"
               v-hasPermi="['global-ticket:queryTask:download']"
             >
-              下载模板
+              下载任务模板
             </el-button>
           </el-col>
         </el-row>
@@ -170,6 +170,16 @@
             :show-overflow-tooltip="true"
           />
           <el-table-column
+            label="自定义舱位顺序"
+            align="center"
+            key="cabinList"
+            prop="cabinList"
+            :show-overflow-tooltip="true">
+            <template #default="scope">
+              {{ scope.row.cabinList ? scope.row.cabinList.join(',') : '' }}
+            </template>
+          </el-table-column>
+          <el-table-column
             label="起飞日期"
             align="center"
             key="depTime"
@@ -391,6 +401,7 @@
       :visible.sync="chartOpen"
       width="95%"
       append-to-body
+      @close="initData()"
     >
       <el-row>
         <el-col
@@ -410,7 +421,7 @@
       <el-row>
         <h1 v-show="this.getTaskChartDataParam.flightNumber">
           {{ this.getTaskChartDataParam.flightNumber }}航班价格曲线图
-          <span>{{ logDate }}</span>
+          <span>{{ logDate ? '统计日期' + logDate :logDate}}</span>
         </h1>
       </el-row>
       <div
@@ -478,7 +489,7 @@
         :limit="1"
         accept=".xlsx, .xls"
         :headers="upload.headers"
-        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :action="upload.url"
         :disabled="upload.isUploading"
         :on-progress="handleFileUploadProgress"
         :on-success="handleFileSuccess"
@@ -488,10 +499,6 @@
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
         <div class="el-upload__tip text-center" slot="tip">
-          <div class="el-upload__tip" slot="tip">
-            <el-checkbox v-model="upload.updateSupport" />
-            是否更新已经存在的用户数据
-          </div>
           <span>仅允许导入xls、xlsx格式文件。</span>
           <el-link
             type="primary"
@@ -517,15 +524,13 @@ import {
   getTaskChartData,
   updateTaskRate,
 } from "@/api/flight/global-tickt/flightquery";
-import { addTaskForm } from "./createQueryTask.vue";
 import FlightLineChart from "../FlightLineChart";
 import { getToken } from "@/utils/auth";
 
 export default {
   name: "GlobalTicket",
   components: {
-    FlightLineChart,
-    addTaskForm: addTaskForm,
+    FlightLineChart
   },
   props: [],
   data() {
@@ -637,7 +642,7 @@ export default {
         {
           label: "否",
           value: 0,
-        },
+        }
       ],
       shippingRules: [
         {
@@ -647,7 +652,7 @@ export default {
         {
           label: "自定义舱位",
           value: false,
-        },
+        }
       ],
       taskStatus: [
         {
@@ -705,7 +710,7 @@ export default {
         depTime: null,
         taskRate: null,
         isShare: 0,
-        useRealCabin: 0,
+        useRealCabin: true,
       },
       createQueryTaskDataRules: {
         depAirport: [
@@ -783,11 +788,13 @@ export default {
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {
       this.upload.isUploading = true;
+      this.$modal.loading("正在导入查询任务,请稍候...");
     },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
       this.upload.open = false;
       this.upload.isUploading = false;
+      this.$modal.closeLoading();
       this.$refs.upload.clearFiles();
       this.$alert(
         "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
@@ -863,6 +870,7 @@ export default {
       this.createQueryTaskData = {
         taskRate: 300,
         isShare: 0,
+        useRealCabin: true
       };
       this.open = true;
       this.title = "创建航班查询任务";
@@ -877,7 +885,7 @@ export default {
       this.download(
         "/flight/downloadTemplate",
         {},
-        `航班查询任务${new Date().getTime()}.xlsx`
+        `航班查询任务模板.xlsx`
       );
     },
     // 提交上传文件
@@ -1002,6 +1010,11 @@ export default {
       };
       this.chartOpen = true;
     },
+    initData() {
+      this.statisticalInterval = "1";
+      this.logDate = null;
+      this.timeTypeValue = "HOUR";
+    },
     showChart(flightNumber) {
       this.selectRow.flightNumber = flightNumber;
       this.getTaskChartDataParam.flightNumber = flightNumber;