From 7ce592bb5a5b9e0dc78786e727f042b95ebc81c8 Mon Sep 17 00:00:00 2001 From: lihang <lihang@vci-tech.com> Date: 星期四, 13 七月 2023 16:00:59 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS-WEB/src/components/file/main.vue | 36 +++++++++++++++++++++++++++--------- 1 files changed, 27 insertions(+), 9 deletions(-) diff --git a/Source/UBCS-WEB/src/components/file/main.vue b/Source/UBCS-WEB/src/components/file/main.vue index 9e5a099..44b5166 100644 --- a/Source/UBCS-WEB/src/components/file/main.vue +++ b/Source/UBCS-WEB/src/components/file/main.vue @@ -7,6 +7,7 @@ :before-open="beforeOpen" :permission="permissionList" v-model="form" + :height="options.height || 200" ref="crud" @row-del="rowDel" @search-change="searchChange" @@ -67,13 +68,14 @@ import {validatenull} from "@/util/validate"; export default { - props: ["options","visible"], + props: ["options","visible","ownbizOid"], data() { return { form: {}, query: {}, params:{}, loading: false, + hasPage:this.options.hasPage||false, page: { pageSize: 10, currentPage: 1, @@ -188,6 +190,7 @@ prop: 'attachFile', type: 'upload', dragFile: true, + showFileList:false, accept: this.options.uploadAccept || 'file', loadText: '鏂囦欢涓婁紶涓紝璇风◢绛�', span: 24, @@ -230,6 +233,12 @@ }, mounted() { + }, + watch:{ + ownbizOid(val){ + this.setParams() + this.refreshChange() + } }, methods: { setFormItem(){ @@ -311,9 +320,9 @@ setParams() { var queryMap = { currentButtonKey: 'VIEW', - ownbizOid:this.options.ownbizOid || "share", - ownBtmName:this.options.ownbizBtm || "share", - fileDocClassify: this.options.fileDocClassify|| "ADMIN_SHARE", + ownbizOid: this.options.ownbizOid || "share", + ownBtmName: this.options.ownbizBtm || "share", + fileDocClassify: this.options.fileDocClassify || "ADMIN_SHARE", fileDocClassifyName: this.options.fileDocClassifyName || "绠$悊鍛樺叡浜枃浠�" }; if (this.options.where) { @@ -329,6 +338,12 @@ } this.page.pageSize = this.options.pageObject.limit; this.page.currentPage = this.options.pageObject.page; + + this.attachOption.column[1].data.ownbizOid = this.options.ownbizOid || "share"; + this.attachOption.column[1].data.ownBtmName = this.options.ownbizBtm || "share"; + this.attachOption.column[1].data.fileDocClassify = this.options.fileDocClassify || "ADMIN_SHARE"; + this.attachOption.column[1].data.fileDocClassifyName = this.options.fileDocClassifyName || "绠$悊鍛樺叡浜枃浠�" + }, handleUpload() { this.attachOption.column[1].data.fileOid=''; @@ -363,14 +378,17 @@ }, handleDownload(row) { //window.open(`${row.link}`); + let data=new FormData(); if(row && row.oid){ - download(row.oid) + data.append('fileOids',row.oid) + download(data) }else{ if (this.selectionList.length === 0) { this.$message.warning("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�"); return; } - download(this.oids); + data.append('fileOids',this.oids) + download(data); } }, rowDel(row) { @@ -380,7 +398,7 @@ type: "warning" }) .then(() => { - return remove(row.oid,row.oid); + return remove([row.oid]); }) .then(() => { this.onLoad(this.page); @@ -401,7 +419,7 @@ type: "warning" }) .then(() => { - return remove(this.oids,this.oids); + return remove(this.oids.split(',')); }) .then(() => { this.onLoad(this.page); @@ -444,7 +462,7 @@ this.page.pageSize = pageSize; }, refreshChange() { - this.onLoad(this.page, this.query); + this.onLoad(this.page); }, onLoad(page, params={}) { this.loading = true; -- Gitblit v1.9.3