Commit ac1c2c91 by zhouzy

修复了导出和管理界面新建的清空问题

1 parent ddf3028b
...@@ -747,12 +747,13 @@ export default { ...@@ -747,12 +747,13 @@ export default {
exportbatchdetail() { exportbatchdetail() {
equityApi.cardExport(this.collectionListSearch).then((res) => { equityApi.cardExport(this.collectionListSearch).then((res) => {
if (res) { if (res) {
console.log(res); console.log(res)
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('href', res) a.setAttribute('href', res.data)
a.setAttribute('target', '_blank') a.setAttribute('target', '_blank')
a.setAttribute('id', 'd2admin-link-temp') a.setAttribute('id', 'd2admin-link-temp')
A.setAttribute('download', '批次列表导出文档' + '.xlsx') // 设置下载文件名称 a.setAttribute('download', '批次列表导出文档' + '.xlsx') // 设置下载文件名称
window.open(a)
document.body.appendChild(a) document.body.appendChild(a)
a.click() a.click()
document.body.removeChild(document.getElementById('d2admin-link-temp')) document.body.removeChild(document.getElementById('d2admin-link-temp'))
...@@ -774,13 +775,13 @@ export default { ...@@ -774,13 +775,13 @@ export default {
// 领用界面导出 // 领用界面导出
exportCollection() { exportCollection() {
equityApi.cardExport(this.collectionListSearch).then((res) => { equityApi.cardExport(this.collectionListSearch).then((res) => {
if (res) { if (res.data) {
console.log(res); console.log(res.data);
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('href', res) a.setAttribute('href', res.data)
a.setAttribute('target', '_blank') a.setAttribute('target', '_blank')
a.setAttribute('id', 'd2admin-link-temp') a.setAttribute('id', 'd2admin-link-temp')
A.setAttribute('download', '领用列表导出文档' + '.xlsx') // 设置下载文件名称 a.setAttribute('download', '领用列表导出文档' + '.xlsx') // 设置下载文件名称
document.body.appendChild(a) document.body.appendChild(a)
a.click() a.click()
document.body.removeChild(document.getElementById('d2admin-link-temp')) document.body.removeChild(document.getElementById('d2admin-link-temp'))
......
...@@ -507,6 +507,7 @@ export default { ...@@ -507,6 +507,7 @@ export default {
this.dialogVisible = true this.dialogVisible = true
this.isAdd = cd this.isAdd = cd
console.log(this.isAdd) console.log(this.isAdd)
this.ruleForm = {}
}, },
groupChange(value) { groupChange(value) {
console.log(value); console.log(value);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!