zhongxiaoyu 2 жил өмнө
parent
commit
051abdfb47

+ 7 - 3
src/views/newQuery/components/search.vue

@@ -459,18 +459,22 @@ export default {
 
 <style lang="scss" scoped>
 .advance-wrapper {
-  padding: 0 24px 10px;
+  padding: 0 24px 20px;
   background: #f0f3f7;
   ::v-deep .query-params {
     padding: 0;
     &-wrapper {
       padding-top: 15px;
-      height: 210px;
+      height: 200px;
       overflow-x: hidden;
       overflow-y: auto;
       > .el-col {
-        margin-bottom: 15px;
+        margin-top: 15px;
         display: flex;
+        &:nth-child(1),
+        &:nth-child(2) {
+          margin-top: 0;
+        }
       }
     }
     .el-form-item {

+ 68 - 41
src/views/upload/index.vue

@@ -71,16 +71,24 @@
     <div class="upload-wrapper">
       <header class="upload-header">
         <div class="manageTitle">{{ title2 }}</div>
-        <el-date-picker
-          v-model="flightDate"
-          size="small"
-          type="daterange"
-          value-format="yyyy-MM-dd"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :picker-options="dateRangePickerOptions"
-          :clearable="false"
-        />
+        <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="getTableData"
+          />
+        </div>
       </header>
       <main
         v-loading="loading"
@@ -171,45 +179,45 @@ export default {
       flightDate: new Array(2).fill(parseTime(new Date(), '{y}-{m}-{d}')),
       dateRangePickerOptions: {
         onPick: this.dateRangePickHandler,
-        disabledDate: this.dateRangeDisabled
+        disabledDate: this.dateRangeDisabled,
       },
       tableColumns: [
         {
-          prop: 'C0'
+          prop: 'C0',
         },
         {
-          prop: 'C1'
+          prop: 'C1',
         },
         {
-          prop: 'C2'
+          prop: 'C2',
         },
         {
-          prop: 'C3'
+          prop: 'C3',
         },
         {
-          prop: 'C4'
+          prop: 'C4',
         },
         {
-          prop: 'C5'
+          prop: 'C5',
         },
         {
-          prop: 'C6'
+          prop: 'C6',
         },
         {
-          prop: 'C7'
+          prop: 'C7',
         },
         {
-          prop: 'C8'
+          prop: 'C8',
         },
         {
-          prop: 'C9'
+          prop: 'C9',
         },
         {
-          prop: 'createtime'
-        }
+          prop: 'createtime',
+        },
       ],
       tableData: [],
-      loading: false
+      loading: false,
     }
   },
   computed: {
@@ -220,7 +228,7 @@ export default {
     },
     exceed() {
       return this.currentProgressNum >= this.limit
-    }
+    },
   },
   watch: {
     flightDate: {
@@ -228,8 +236,8 @@ export default {
         this.getTableData()
       },
       deep: true,
-      immediate: true
-    }
+      immediate: true,
+    },
   },
   methods: {
     beforeUpload(file) {
@@ -239,16 +247,22 @@ export default {
         return
       }
       if (this.exceed) {
-        this.$message.warning(`${file.name} 上传出错:超出最大同时上传数量,最多同时上传 ${this.limit} 个文件`)
+        this.$message.warning(
+          `${file.name} 上传出错:超出最大同时上传数量,最多同时上传 ${this.limit} 个文件`
+        )
       }
       const extensionName = file.name.split('.').pop()
       const acceptExtention = acceptTypes.includes(extensionName)
       if (!acceptExtention) {
-        this.$message.warning(`${file.name} 上传出错:上传文件只能是 ${acceptTypes.join('/')} 格式`)
+        this.$message.warning(
+          `${file.name} 上传出错:上传文件只能是 ${acceptTypes.join('/')} 格式`
+        )
         return false
       }
       if (file.size > maxSize) {
-        this.$message.warning(`${file.name} 上传出错:上传文件大小不能超过 ${short}`)
+        this.$message.warning(
+          `${file.name} 上传出错:上传文件大小不能超过 ${short}`
+        )
         return false
       }
     },
@@ -266,7 +280,7 @@ export default {
         key: `${file.name}${file.lastModified}`,
         fileName: file.name,
         state: this.exceed ? 2 : 0,
-        time: parseTime(Date.now(), '{y}-{m}-{d} {h}:{i}:{s}')
+        time: parseTime(Date.now(), '{y}-{m}-{d} {h}:{i}:{s}'),
       }
       this.totalProgressList.push(newProgress)
     },
@@ -321,7 +335,9 @@ export default {
       }
     },
     dateRangeDisabled(date) {
-      return this.pickedDate ? Math.abs(date - this.pickedDate) > 2 * 24 * 60 * 60 * 1000 : false
+      return this.pickedDate
+        ? Math.abs(date - this.pickedDate) > 2 * 24 * 60 * 60 * 1000
+        : false
     },
     cellClass({ row, column, rowIndex, columnIndex }) {
       const classes = []
@@ -343,13 +359,16 @@ export default {
       this.loading = true
       try {
         // const dataContent = [this.flightDate[0], this.flightDate[1]]
-        const dataContent = [`${this.flightDate[0]} 00:00:00`, `${this.flightDate[1]} 23:59:59`]
+        const dataContent = [
+          `${this.flightDate[0]} 00:00:00`,
+          `${this.flightDate[1]} 23:59:59`,
+        ]
         const {
           code,
-          returnData: { listValues }
+          returnData: { listValues },
         } = await WhatQuery({
           id: SERVICE_ID.expressTransportation,
-          dataContent
+          dataContent,
         })
         if (Number(code) !== 0) {
           throw new Error('失败')
@@ -359,15 +378,12 @@ export default {
         this.$message.error('查询表格失败')
       }
       this.loading = false
-    }
-  }
+    },
+  },
 }
 </script>
 
-<style
-  lang="scss"
-  scoped
->
+<style lang="scss" scoped>
 .upload {
   width: 100%;
   height: calc(100vh - 100px);
@@ -472,6 +488,17 @@ export default {
   }
 }
 
+.upload-header-right {
+  display: flex;
+  align-items: center;
+}
+.btn-refresh {
+  margin-left: 10px;
+  padding: 0;
+  width: 30px;
+  height: 30px;
+}
+
 .tooltip-content {
   max-width: 500px;
 }