From e9eb57ea47e5e415a3ddf44f37d90fbbc4cdb46d Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期四, 22 八月 2024 16:39:48 +0800 Subject: [PATCH] 导入点位优化 --- src/views/system/point/index.vue | 20 +++++--------------- 1 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue index e3c0f39..9003544 100644 --- a/src/views/system/point/index.vue +++ b/src/views/system/point/index.vue @@ -58,10 +58,6 @@ </el-date-picker> </div> <div class="bottom_"> - <el-checkbox v-model="provinceTag">鐪佸巺</el-checkbox> - <el-checkbox v-model="importantCommandImageTag">閲嶇偣鎸囨尌鍥惧儚</el-checkbox> - </div> - <div class="bottom_"> <el-upload ref="upload" class="upload-demo" @@ -76,7 +72,7 @@ </el-upload> </div> <div> - <el-button class="bottom_" type="primary" size="small" v-model="upload" :disabled="! importUnitId || ! importFile || ! this.ywTimes || this.ywTimes.length < 2" @click="handleImport" + <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="mini" plain icon="el-icon-top" slot="reference">瀵煎叆鐐逛綅</el-button> @@ -333,19 +329,13 @@ }, // 鐐逛綅瀵煎叆 handleImport() { - if (! this.ywTimes || this.ywTimes.length < 2) { - this.$message.error("璇烽�夋嫨杩愮淮鏃堕棿") - return - } this.upload =true; let formData = new FormData() formData.append("file", this.importFile) - formData.append("startTime", this.ywTimes[0]) - formData.append("endTime", this.ywTimes[1]) - formData.append("provinceTag", this.provinceTag) - formData.append("importantTag", this.importantTag) - formData.append("importantCommandImageTag", this.importantCommandImageTag) - importData(formData, this.importUnitId).then(res => { + formData.append("startTime", this.ywTimes[0] ? this.ywTimes[0] : '') + formData.append("endTime", this.ywTimes[1] ? this.ywTimes[1] : '') + formData.append("unitId", this.importUnitId ? this.importUnitId : -1) + importData(formData).then(res => { this.$message.success("瀵煎叆鎴愬姛") this.upload = false this.getList() -- Gitblit v1.8.0