From e5346f9ddd5bfe1675ed42636be37c8f4b23bd5b Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期三, 28 六月 2023 11:42:29 +0800 Subject: [PATCH] 附件删除 --- Source/UBCS-WEB/src/components/file/main.vue | 35 +++++++++++++++++------------------ 1 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Source/UBCS-WEB/src/components/file/main.vue b/Source/UBCS-WEB/src/components/file/main.vue index 7a9ba08..370eea5 100644 --- a/Source/UBCS-WEB/src/components/file/main.vue +++ b/Source/UBCS-WEB/src/components/file/main.vue @@ -188,6 +188,7 @@ prop: 'attachFile', type: 'upload', dragFile: true, + showFileList:false, accept: this.options.uploadAccept || 'file', loadText: '鏂囦欢涓婁紶涓紝璇风◢绛�', span: 24, @@ -196,7 +197,7 @@ }, data: { ownbizOid:this.options.ownbizOid || "share", - ownBtmname:this.options.ownbizBtm || "share", + ownBtmName:this.options.ownbizBtm || "share", fileDocClassify:this.options.fileDocClassify || "ADMIN_SHARE", fileDocClassifyName:this.options.fileDocClassifyName || "绠$悊鍛樺叡浜枃浠�" }, @@ -311,10 +312,10 @@ setParams() { var queryMap = { currentButtonKey: 'VIEW', - ownbizOid: this.options.ownbizOid, - ownbizBtm: this.options.ownbizBtm, - fileDocClassify: this.options.fileDocClassify, - fileDocClassifyName: this.options.fileDocClassifyName + ownbizOid:this.options.ownbizOid || "share", + ownBtmName:this.options.ownbizBtm || "share", + fileDocClassify: this.options.fileDocClassify|| "ADMIN_SHARE", + fileDocClassifyName: this.options.fileDocClassifyName || "绠$悊鍛樺叡浜枃浠�" }; if (this.options.where) { Object.assign(queryMap, this.options.where); @@ -353,28 +354,24 @@ done(); }, uploadAfter(res, done, loading, column) { - if(res.success){ - this.attachBox = false; - this.$message.success('鏂囦欢涓婁紶鎴愬姛') - }else{ - this.$message.error(res.msg); - } + this.attachBox = false; + this.$message.success('鏂囦欢涓婁紶鎴愬姛') this.refreshChange(); done(); }, uploadError(error, column) { - this.$message.error('涓婁紶鏂囦欢鍑虹幇浜嗗紓甯�') + this.$message.error(error || '涓婁紶鏂囦欢鍑虹幇浜嗗紓甯�') }, handleDownload(row) { //window.open(`${row.link}`); if(row && row.oid){ - download(row.oid) + download({fileOids:row.oid}) }else{ if (this.selectionList.length === 0) { this.$message.warning("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�"); return; } - download(this.oids); + download({fileOids:this.oids}); } }, rowDel(row) { @@ -384,7 +381,7 @@ type: "warning" }) .then(() => { - return remove(row.oid); + return remove([row.oid]); }) .then(() => { this.onLoad(this.page); @@ -405,7 +402,7 @@ type: "warning" }) .then(() => { - return remove(this.oids); + return remove(this.oids.split(',')); }) .then(() => { this.onLoad(this.page); @@ -461,7 +458,7 @@ getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => { const data = res.data.data; this.page.total = data.total; - if(data && data.records.length>0 && this.options.fileDocClassifyCombox){ + if(this.options.fileDocClassifyCombox){ this.data = data.records.map(item => { if(validatenull(item.fileDocClassifyName)&& !validatenull(item.fileDocClassify)){ item.fileDocClassifyName = this.options.fileDocClassifyCombox[item.fileDocClassify] || ''; @@ -470,8 +467,10 @@ ...item } }) + }else{ + this.data = data.records; } - //this.data = data.records; + this.loading = false; this.selectionClear(); }).catch(error=>{ -- Gitblit v1.9.3