From 48086bde3ff19c8cefb92c449ccadc6c9f9affae Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 13 十一月 2024 18:56:29 +0800
Subject: [PATCH] 车辆人脸点位在线离线时间点

---
 src/views/system/work-order/threshold/index.vue |   64 +++++++++++++++++++++++++------
 1 files changed, 51 insertions(+), 13 deletions(-)

diff --git a/src/views/system/work-order/threshold/index.vue b/src/views/system/work-order/threshold/index.vue
index 3649c30..aaef9f5 100644
--- a/src/views/system/work-order/threshold/index.vue
+++ b/src/views/system/work-order/threshold/index.vue
@@ -285,20 +285,11 @@
     </el-row>
     <el-row class="content-warp">
       <div class="header鈥攖ext" style="margin-bottom: 5px">宸ュ崟鐧藉悕鍗�</div>
-      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
-        <el-form-item label="璁惧缂栫爜" prop="serialNumber">
+      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" @submit.native.prevent>
+        <el-form-item label="鍏抽敭瀛�" prop="keyword">
           <el-input
-            v-model="queryParams.serialNumber"
-            placeholder="璁惧缂栫爜"
-            clearable
-            @keyup.enter.native="getWhiteList"
-            @clear="getWhiteList"
-          />
-        </el-form-item>
-        <el-form-item label="鐐逛綅鍚嶇О" prop="pointName">
-          <el-input
-            v-model="queryParams.pointName"
-            placeholder="鐐逛綅鍚嶇О"
+            v-model="queryParams.keyword"
+            placeholder="璁惧缂栫爜/鐐逛綅鍚�"
             clearable
             @keyup.enter.native="getWhiteList"
             @clear="getWhiteList"
@@ -312,6 +303,30 @@
     <el-row class="content-warp">
       <el-button size="small" type="success" @click="addOpen" plain>鏂板</el-button>
       <el-button size="small" type="danger" @click="bathDelete" plain>鍒犻櫎</el-button>
+      <el-popover style="margin-left: 10px" placement="bottom" trigger="hover" content="瀵煎叆鐐逛綅">
+        <div class="bottom_">
+          <p>瀵煎叆鐐逛綅鍙仛鏂板鎿嶄綔</p>
+        </div>
+        <div class="bottom_">
+          <el-upload
+            ref="upload"
+            class="upload-demo"
+            drag
+            :action="importUrl"
+            :file-list="fileList"
+            :before-upload="beforeUpload"
+          >
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+            <div class="el-upload__tip" slot="tip">鍙兘涓婁紶xls/xlsx鏂囦欢</div>
+          </el-upload>
+        </div>
+        <div>
+          <el-button class="bottom_" type="primary" size="small" v-loading="upload" @click="handleImport"
+                     v-hasPermi="['point:import']">瀵煎叆</el-button>
+        </div>
+        <el-button type="primary" size="small" plain icon="el-icon-bottom" slot="reference" v-hasPermi="['point:import']">瀵煎叆鐧藉悕鍗�</el-button>
+      </el-popover>
     </el-row>
     <el-row class="content-warp">
       <el-col :span="24">
@@ -363,6 +378,7 @@
   listThreshold,
   getThreshold,
   updateThreshold,
+  importData,
 } from "@/api/platform/threshold";
 import {
   editCar,
@@ -501,6 +517,11 @@
           {required: true, message: "璁惧缂栫爜涓嶈兘涓虹┖", trigger: "blur"},
         ],
       },
+      // 瀵煎叆鏂囦欢璺緞
+      importUrl: '',
+      fileList: [],
+      importFile: null,
+      upload: false,
     };
   },
   created() {
@@ -895,6 +916,23 @@
         this.$modal.msgSuccess("鎵归噺鍒犻櫎鎴愬姛");
         this.ids = [];
       })
+    },
+    beforeUpload(file) {
+      this.importFile = file
+      this.fileList = [file]
+      return false
+    },
+    // 瀵煎叆鐧藉悕鍗�
+    handleImport() {
+      this.upload = true;
+      let formData = new FormData()
+      formData.append("file", this.importFile)
+      importData(formData).then(res => {
+        this.$message.success("瀵煎叆鎴愬姛")
+        this.upload = false
+        this.fileList = []
+        this.getWhiteList()
+      })
     }
   }
 };

--
Gitblit v1.8.0