添加导出实体模板

dev^2
mqh 1 year ago
parent ea1b6c22dc
commit e4a0aa80de
  1. 3
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  2. 28
      ant-design-vue-jeecg/src/views/modulex/modules/ModulexImport.vue

@ -515,7 +515,8 @@ export default {
],
title: '导入实体',
uploadUrl: this.tablexImportExcelUrl,
downUrl: this.tablexDownExcelUrl
downUrl: "temp/tablex.xls",
downName: "实体模板表.xls"
}
},
modelData: function () {

@ -60,7 +60,7 @@
</template>
<script>
import {getAction} from "@api/manage"
import {downloadFile, getAction} from "@api/manage"
import store from '@/store'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {mixinDevice} from '@/utils/mixin'
@ -85,6 +85,7 @@ export default {
status: '判断文件结构',
},
form: this.$form.createForm(this),
downName:'',
url:
{
downfile: '',
@ -125,18 +126,20 @@ export default {
},
//
handleDownload() {
console.log(this.downName,"111")
downloadFile( this.url.downfile,this.downName)
// getAction(this.url.list, params).then((res) =>
getAction(this.url.downfile).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', 'your-document.pdf')
document.body.appendChild(link)
link.click()
})
.catch(error => {
console.error(error)
})
// getAction(this.url.downfile).then((response) => {
// const url = window.URL.createObjectURL(new Blob([response.data]))
// const link = document.createElement('a')
// link.href = url
// link.setAttribute('download', 'your-document.pdf')
// document.body.appendChild(link)
// link.click()
// })
// .catch(error => {
// console.error(error)
// })
},
add() {
@ -144,6 +147,7 @@ export default {
show(data,ws) {
this.url.uploadUrl = data.uploadUrl
this.url.downfile = data.downUrl
this.downName = data.downName
this.datas = data.note
this.title = data.title
this.ModalData = {}

Loading…
Cancel
Save