zhaoke 2 years ago
parent
commit
2cf30bc869
2 changed files with 29 additions and 18 deletions
  1. 4 5
      public/config.js
  2. 25 13
      src/views/upload/index.vue

+ 4 - 5
public/config.js

@@ -53,11 +53,6 @@ window.DATACONTENT_ID = {
   sysServiceStrategyId: 18033, //预警报警策略(按照ID)
   sysServiceStrategyaddId: 8014, //新增预警报警策略
 
-  /***-----速运行李------***/
-  expressTransportation: 1803435, // 速运行李数据查询
-  expressTransportationUpload: 20034, // 速运行李数据上传
-  expressTransportationNum: 1803434, // 速运行李次数查询
-
   /***-----进港管理------***/
   arrivalAirId: 67, //进港管理-机场选择
   arrivalTableId: 38, //进港管理-表格
@@ -202,4 +197,8 @@ window.SERVICE_ID = {
   sysServiceAddXyId: 10, //系统设置-服务管理-新增服务-新增数据源-提交
   sysDataTabId: 9, //系统设置-数据结构-数据项-表格-增删改
 
+  /***-----速运行李------***/
+  expressTransportation: 1803435, // 速运行李数据查询
+  expressTransportationUpload: 20034, // 速运行李数据上传
+  expressTransportationNum: 1803434, // 速运行李次数查询
 }

+ 25 - 13
src/views/upload/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="upload">
-    <div class="upload-wrapper">
+    <!-- <div class="upload-wrapper">
       <header class="upload-header">
         <div class="manageTitle">{{ title }}</div>
         <el-upload ref="upload" action="#" multiple :loading="exceed" :accept="acceptTypesStr" :show-file-list="false" :http-request="uploadHandler" :before-upload="beforeUpload">
@@ -32,19 +32,30 @@
         </ul>
         <NoData v-else :image-width="230" :image-height="160" />
       </main>
-    </div>
+    </div> -->
     <div class="upload-wrapper">
       <header class="upload-header">
-        <div class="manageTitle">{{ title2 }}</div>
+        <div class="flex">
+          <div class="manageTitle">{{ title2 }}</div>
+          <div>
+            <el-date-picker v-model="input" size="small" value-format="yyyy-MM-dd" type="date" placeholder="选择日期">
+            </el-date-picker>
+          </div>
+        </div>
         <div class="upload-header-right">
-          <el-date-picker v-model="flightDate" size="small" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" :clearable="false" />
-          <el-button class="btn-refresh" type="primary" icon="el-icon-refresh" @click="getStateData" />
+          <!-- <el-date-picker v-model="flightDate" size="small" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" :clearable="false" />
+          <el-button class="btn-refresh" type="primary" icon="el-icon-refresh" @click="getStateData" /> -->
+          <el-upload ref="upload" action="#" multiple :loading="exceed" :accept="acceptTypesStr" :show-file-list="false" :http-request="uploadHandler" :before-upload="beforeUpload">
+            <el-button slot="trigger" type="primary" size="small">
+              上传文件
+            </el-button>
+          </el-upload>
         </div>
       </header>
       <main class="upload-main">
         <div class="upload-main-content flex-wrap">
           <div v-loading="loading1" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="upload-main-content-left">
-            <el-table :data="stateData" :highlight-current-row="true" @cell-click="stateClick" border stripe fit height="100%" class="state-table">
+            <el-table :data="capData" :highlight-current-row="true" @cell-click="stateClick" border stripe fit height="100%" class="state-table">
               <el-table-column label="日期">
                 <template slot-scope="scope">
                   <div>{{ currDate(scope.row.thedate) }}</div>
@@ -134,6 +145,7 @@ export default {
         onPick: this.dateRangePickHandler,
         disabledDate: this.dateRangeDisabled,
       },
+      input: '',
       tableColumns: [
         {
           prop: 'C0',
@@ -200,6 +212,10 @@ export default {
           return '-'
         }
       }
+    },
+    capData () {
+      const val = this.input
+      return this.stateData.filter(data => !val || data.thedate && data.thedate.includes(val))
     }
   },
   // watch: {
@@ -379,7 +395,7 @@ export default {
       if (dataObjectId) {
         this.getTableData(dataObjectId)
       }
-    }
+    },
   },
 }
 </script>
@@ -393,12 +409,7 @@ export default {
     width: 100%;
     padding: 24px 24px 0;
     background-color: #fff;
-    &:nth-child(1) {
-      height: calc(24px + 32px + 30px + 3 * 63px + 26px);
-    }
-    &:nth-child(2) {
-      height: calc(100% - (24px + 32px + 30px + 3 * 63px + 26px));
-    }
+    height: 100%;
   }
   &-header {
     display: flex;
@@ -428,6 +439,7 @@ export default {
       }
       &-right {
         flex: 1;
+        width: calc(100% - 350px);
       }
     }
   }