|
@@ -62,7 +62,6 @@
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
size="mini"
|
|
@@ -883,7 +882,13 @@
|
|
|
:label="$t('文件名称')"
|
|
|
width="300"
|
|
|
:show-overflow-tooltip="true"
|
|
|
- align="center"/>
|
|
|
+ align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a class="link-type" @click="handleDownload(scope.row)">
|
|
|
+ <span>{{ scope.row.fileName }}</span>
|
|
|
+ </a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
<form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
|
|
@@ -1722,7 +1727,17 @@ export default {
|
|
|
}
|
|
|
this.getList();
|
|
|
},
|
|
|
-
|
|
|
+ // 文件下载处理
|
|
|
+ handleDownload(row) {
|
|
|
+ var name = row.fileName;
|
|
|
+ var url = row.filePath;
|
|
|
+ var suffix = url.substring(url.lastIndexOf("."), url.length);
|
|
|
+ const a = document.createElement('a')
|
|
|
+ a.setAttribute('download', name)
|
|
|
+ a.setAttribute('target', '_blank')
|
|
|
+ a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
|
|
|
+ a.click()
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|