wangting
2023-06-28 e5346f9ddd5bfe1675ed42636be37c8f4b23bd5b
附件删除
已修改2个文件
14 ■■■■■ 文件已修改
Source/UBCS-WEB/src/api/resource/file.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/file/main.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/resource/file.js
@@ -12,7 +12,7 @@
  })
}
export const remove = (fileOids,oids) => {
export const remove = (oids) => {
  return request({
    url: '/api/ubcs-resource/fileController/deleteFile',
    method: 'delete',
@@ -39,7 +39,8 @@
export const download = (fileOids) => {
  return request({
    url: '/api/ubcs-resource/fileController/downloadFilesByOids',
    method: 'get',
    method: 'post',
    headers:{'Content-Type':'application/x-www-form-urlencoded'},
    params: {
      fileOids
    }
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,
@@ -364,13 +365,13 @@
    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) {
@@ -380,7 +381,7 @@
        type: "warning"
      })
        .then(() => {
          return remove(row.oid,row.oid);
          return remove([row.oid]);
        })
        .then(() => {
          this.onLoad(this.page);
@@ -401,7 +402,7 @@
        type: "warning"
      })
        .then(() => {
          return remove(this.oids,this.oids);
          return remove(this.oids.split(','));
        })
        .then(() => {
          this.onLoad(this.page);