|
@@ -138,6 +138,16 @@
|
|
|
</j-vxe-table>
|
|
|
</a-form-model>
|
|
|
</a-spin>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-model-item label="附件" prop="accessory">
|
|
|
+ <ul v-for="(item, index) in accessory" :key="index" >
|
|
|
+ <li>
|
|
|
+ <a @click="accessoryDownload(item)">{{item}}</a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
</a-card>
|
|
|
</a-drawer>
|
|
|
</div>
|
|
@@ -147,6 +157,7 @@
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import { JVXETypes } from '@/components/jeecg/JVxeTable'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
+import { downFile } from '@/api/manage'
|
|
|
|
|
|
|
|
|
export default {
|
|
@@ -163,6 +174,7 @@ export default {
|
|
|
// // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮
|
|
|
// btn: []
|
|
|
},
|
|
|
+ accessory:[],
|
|
|
// 表头
|
|
|
clothesAddColumns: [
|
|
|
{
|
|
@@ -585,6 +597,27 @@ export default {
|
|
|
},
|
|
|
]
|
|
|
},
|
|
|
+ accessoryDownload(name){
|
|
|
+ downFile(`/sys/common/static/${name}`).then(data => {
|
|
|
+ if (!data) {
|
|
|
+ this.$message.warning('文件下载失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
|
|
|
+ } else {
|
|
|
+ let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
+ let link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ link.setAttribute('download', name + '.xls')
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link) // 下载完成移除元素
|
|
|
+ window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// - father------------------------------------
|
|
|
aa() {},
|
|
|
modalFormOk() {},
|