Commit 523e1a01 by LJM

商品管理/品牌列表:导出未请求接口

parent b8da44df
......@@ -211,7 +211,8 @@ export default {
this.disabled = true
this.$message({
message: '正在导出中,请耐心等待',
type: 'success'
type: 'warning',
duration: 0
});
this.timer = setInterval(() => {
if (!this.disabled) {
......@@ -235,11 +236,15 @@ export default {
});
this.downHref = res.data
setTimeout(() => {
this.$refs.downs.click()
}, 10)
this.$message.closeAll();
this.$refs.downs.click();
}, 2000)
} else if (res.code == -1) {
//导出失败
this.$message(res.data)
this.$message({
message: res.msg,
type: 'error'
});
this.disabled = false
}
}, error => {
......
......@@ -21,7 +21,7 @@
<div class="btn-nav clr">
<el-button type="primary" @click="updateBrand">修改</el-button>
<el-button type="primary" @click="downOut">导出</el-button>
<a :href="downHref" ref="downs" target="_blank">下载</a>
<a :href="downHref" ref="downs" target="_blank" style="display:none">下载</a>
</div>
<div class="data-box th-all" v-if="tableData">
<el-table :data="tableData" border max-height="600" @selection-change="handleSelectionChange">
......@@ -271,7 +271,8 @@ export default {
this.disabled = true;
this.$message({
message: '正在导出中,请耐心等待',
type: 'warning'
type: 'warning',
duration: 0
});
this.timer = setInterval(() => {
if (!this.disabled) {
......@@ -295,8 +296,9 @@ export default {
});
this.downHref = res.data
setTimeout(() => {
this.$message.closeAll();
this.$refs.downs.click()
}, 10)
}, 2000)
} else if (res.code == -1) {
//导出失败
this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment