From 6642af099ff17d8a8ffb4cb1980c99f4d09c5422 Mon Sep 17 00:00:00 2001 From: RenCheng Date: Sun, 2 Mar 2025 23:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=80=89=E6=8B=A9=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/datalink/modules/SliceUpload.vue | 35 ++++++++++++++++++---- src/views/datalink/waterDocuments.vue | 1 + 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/views/datalink/modules/SliceUpload.vue b/src/views/datalink/modules/SliceUpload.vue index f0b06fd..a6693fd 100644 --- a/src/views/datalink/modules/SliceUpload.vue +++ b/src/views/datalink/modules/SliceUpload.vue @@ -2,6 +2,11 @@
+ + + {{ d }} + + import SparkMD5 from 'spark-md5' -import { postAction,downloadFile2 } from '@/api/manage' +import { getAction,postAction,downloadFile2 } from '@/api/manage' import { verifyFileExist } from '@/api/fileapi' @@ -87,7 +92,7 @@ export default { dataLinkType: { type: String, default: '1' - } + }, }, data () { return { @@ -95,9 +100,14 @@ export default { isStop: false, fileList: [], tableDate: [], - + schemaName:"", + allSchemaName:[] } }, + created () { + this.getAllSchemaName(); + this.deleteFile(); + }, methods: { stop (record) { this.isStop = true @@ -119,15 +129,24 @@ export default { } }) }, - // 从外部设置已有文件列表 setFileList (fileList) { this.tableDate = fileList }, - deleteFile () { this.fileList = [] this.tableDate = [] + this.schemaName ="" + }, + getAllSchemaName(){ + getAction("/fileDataLink/getAllSchemaName").then((res) => { + if (res.success) { + console.log(res) + this.allSchemaName = res.result; + }else{ + this.$message.warning(res.message); + } + }); }, getFileList () { return this.tableDate @@ -177,6 +196,10 @@ export default { * 自定义上传事件 */ customRequestUpload ({ file }) { + if(this.schemaName ==""){ + this.$message.warning("请先选择上传的模式"); + return + } // 开始执行上传逻辑 const currentRow = this.tableDate.find((row) => row.uid === file.uid) if (currentRow) { @@ -243,6 +266,7 @@ export default { formData.append('currShareM5', currShareM5) formData.append('file', file) formData.append("dataLinkType",this.dataLinkType); + formData.append("schemaName",this.schemaName); return formData }, @@ -394,7 +418,6 @@ export default {