| | |
| | | prop: 'attachFile', |
| | | type: 'upload', |
| | | dragFile: true, |
| | | showFileList:false, |
| | | accept: this.options.uploadAccept || 'file', |
| | | loadText: '文件上传中,请稍等', |
| | | span: 24, |
| | |
| | | }, |
| | | 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 || "管理员共享文件" |
| | | }, |
| | |
| | | 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); |
| | |
| | | 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) { |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.oid); |
| | | return remove([row.oid]); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.oids); |
| | | return remove(this.oids.split(',')); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | 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] || ''; |
| | |
| | | ...item |
| | | } |
| | | }) |
| | | }else{ |
| | | this.data = data.records; |
| | | } |
| | | //this.data = data.records; |
| | | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error=>{ |