From 690eaac5ed710462a5f2635ccf9736e560f09381 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 06 十一月 2024 10:07:02 +0800
Subject: [PATCH] 大图展示得分分开
---
src/views/system/work-order/threshold/index.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/src/views/system/work-order/threshold/index.vue b/src/views/system/work-order/threshold/index.vue
index 5f98f68..6e2d5af 100644
--- a/src/views/system/work-order/threshold/index.vue
+++ b/src/views/system/work-order/threshold/index.vue
@@ -284,6 +284,7 @@
>
</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-input
@@ -309,8 +310,32 @@
</el-form>
</el-row>
<el-row class="content-warp">
- <el-button size="small" type="success" @click="addOpen">鏂板</el-button>
- <el-button size="small" type="danger" @click="bathDelete">鍒犻櫎</el-button>
+ <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">
@@ -362,6 +387,7 @@
listThreshold,
getThreshold,
updateThreshold,
+ importData,
} from "@/api/platform/threshold";
import {
editCar,
@@ -500,6 +526,11 @@
{required: true, message: "璁惧缂栫爜涓嶈兘涓虹┖", trigger: "blur"},
],
},
+ // 瀵煎叆鏂囦欢璺緞
+ importUrl: '',
+ fileList: [],
+ importFile: null,
+ upload: false,
};
},
created() {
@@ -894,6 +925,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