From ec4a8eb416562951f84041a6cd8dd91fcb729e22 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期一, 27 五月 2024 14:41:57 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/components/tool/value-table.vue | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 9a36a6c..57471ca 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -309,7 +309,7 @@
<el-dialog title="鏁版嵁瀵煎叆" :visible.sync="uploadDia" width="500px">
<div style="margin: 0 auto;">
<el-upload ref="upload" drag :action="javaApi + inputUrl" :headers="token" :file-list="fileList" name="file"
- :auto-upload="false" accept=".csv" :limit="1" :on-change="beforeUpload" :on-success="onSuccess"
+ :auto-upload="false" :accept="data.accept===undefined?'.csv':data.accept" :limit="1" :on-change="beforeUpload" :on-success="onSuccess"
:on-error="onError" :data="{param: data.uploadStr}">
<i class="el-icon-upload"></i>
<div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
@@ -596,6 +596,7 @@
this.total = res.data.body.total
this.tableHead = res.data.head
this.tableData = res.data.body.records
+ // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData))
for (var a in this.data.selectField) {
if (this.data.selectField[a].choose == true) {
this.tableData.map(b => {
@@ -963,7 +964,8 @@
this.uploadDia = true
},
beforeUpload(file, fileList) {
- if (file.raw.type != 'text/csv') {
+ console.log(file.raw.type);
+ if (file.raw.type != (this.data.inputType===undefined?'text/csv':this.data.inputType)) {
this.$message.error('涓婁紶鏂囦欢鏍煎紡涓嶆纭�');
this.$refs.upload.clearFiles()
return false;
--
Gitblit v1.9.3