Commit ac0d4d6f by zhu_yu_dan

fix:导出数据无数据的判断

parent 87618fe0
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-集团后台</title><link href=./static/css/main.0869ec94a66eeb76314b7d1e58d9431c.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/group-people.2.0.08.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-group.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.97beac8581867ec2c61f.js></script><script type=text/javascript src=./static/js/vendor.1e64e812438b0a3af88f.js></script><script type=text/javascript src=./static/js/main.e33a95d298503ba1d291.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-集团后台</title><link href=./static/css/main.229a54115a9fde73267be0b49ea98edc.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/group-people.2.0.08.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-group.2.0.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.e63733312564b42f5d31.js></script><script type=text/javascript src=./static/js/vendor.1e64e812438b0a3af88f.js></script><script type=text/javascript src=./static/js/main.6716008f119e87f86ec5.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,r,t){for(var d,o,b,i=0,u=[];i<a.length;i++)o=a[i],f[o]&&u.push(f[o][0]),f[o]=0;for(d in r)Object.prototype.hasOwnProperty.call(r,d)&&(e[d]=r[d]);for(c&&c(a,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)b=n(n.s=t[i]);return b};var a={},f={40:0};function n(c){if(a[c])return a[c].exports;var f=a[c]={i:c,l:!1,exports:{}};return e[c].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.e=function(e){var c=f[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,n){c=f[e]=[a,n]});c[2]=a;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"aaee7353b0f7c6cd7878",1:"4cf2a332af8b02d35d2a",2:"f3d50a0efb2c504384f6",3:"fce3dad356f29a129ba1",4:"ec261277f3b77c23d303",5:"702d425b8b9fa617b145",6:"ee6b1cdb0d3c99f5286c",7:"4296aa0e6c7381ac4637",8:"bc8e4938a458fc88b920",9:"e64fe180a9160ec8b676",10:"3b458f80443fff10d270",11:"8ae87a9cabc089995c29",12:"682c726e5b5c90c59316",13:"1fdbfb052d607446cc8d",14:"56722011d0e13e162cfd",15:"0b54430ab22f62363bb3",16:"51796661af49d85bd5fd",17:"ab34b0afec19e2d9c06a",18:"408e75cd00a7578f1f86",19:"95b1283d77bc0e40e9d4",20:"a3296f6958ad848717fc",21:"6bce9b7ef9df6d6b316a",22:"7885822386653cba036f",23:"0aca9e9c4dec5d6f5b44",24:"766262ba8639d147913f",25:"95459cc7db56daff85ce",26:"0ff33de5e9a097b857de",27:"8c2e8557714f8c215e04",28:"299704aeddfa9bd2f3e2",29:"8a7cca79e81306000ffc",30:"f76a94679eca01abf064",31:"48065db3dea1f7537219",32:"75acd8614f22c372802d",33:"5d9379aaf669c8452f24",34:"cbef7edb18cd86fa8b91",35:"e3faaf97b0895fc02d99",36:"aea34db678ced642d3cb",37:"5647fde4ae1ccb493a6c"}[e]+".js";var d=setTimeout(o,12e4);function o(){t.onerror=t.onload=null,clearTimeout(d);var c=f[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return t.onerror=t.onload=o,r.appendChild(t),a},n.m=e,n.c=a,n.d=function(e,c,a){n.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,"a",c),c},n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]); !function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,r,t){for(var d,o,b,i=0,u=[];i<a.length;i++)o=a[i],f[o]&&u.push(f[o][0]),f[o]=0;for(d in r)Object.prototype.hasOwnProperty.call(r,d)&&(e[d]=r[d]);for(c&&c(a,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)b=n(n.s=t[i]);return b};var a={},f={40:0};function n(c){if(a[c])return a[c].exports;var f=a[c]={i:c,l:!1,exports:{}};return e[c].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.e=function(e){var c=f[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,n){c=f[e]=[a,n]});c[2]=a;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"aaee7353b0f7c6cd7878",1:"4cf2a332af8b02d35d2a",2:"f3d50a0efb2c504384f6",3:"fce3dad356f29a129ba1",4:"ec261277f3b77c23d303",5:"702d425b8b9fa617b145",6:"ee6b1cdb0d3c99f5286c",7:"4296aa0e6c7381ac4637",8:"bc8e4938a458fc88b920",9:"e64fe180a9160ec8b676",10:"3b458f80443fff10d270",11:"8ae87a9cabc089995c29",12:"682c726e5b5c90c59316",13:"91ddc8e91812a93b56a9",14:"56722011d0e13e162cfd",15:"0b54430ab22f62363bb3",16:"51796661af49d85bd5fd",17:"ab34b0afec19e2d9c06a",18:"408e75cd00a7578f1f86",19:"95b1283d77bc0e40e9d4",20:"a3296f6958ad848717fc",21:"6bce9b7ef9df6d6b316a",22:"7885822386653cba036f",23:"0aca9e9c4dec5d6f5b44",24:"766262ba8639d147913f",25:"95459cc7db56daff85ce",26:"b0504a18a9369b9fb0dc",27:"ab1a6e261d3994425c6b",28:"299704aeddfa9bd2f3e2",29:"8a7cca79e81306000ffc",30:"f76a94679eca01abf064",31:"48065db3dea1f7537219",32:"75acd8614f22c372802d",33:"43fb4212defc2d87c39e",34:"cbef7edb18cd86fa8b91",35:"e3faaf97b0895fc02d99",36:"aea34db678ced642d3cb",37:"5647fde4ae1ccb493a6c"}[e]+".js";var d=setTimeout(o,12e4);function o(){t.onerror=t.onload=null,clearTimeout(d);var c=f[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return t.onerror=t.onload=o,r.appendChild(t),a},n.m=e,n.c=a,n.d=function(e,c,a){n.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,"a",c),c},n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.97beac8581867ec2c61f.js.map //# sourceMappingURL=manifest.e63733312564b42f5d31.js.map
\ No newline at end of file \ No newline at end of file
...@@ -202,7 +202,12 @@ export default { ...@@ -202,7 +202,12 @@ export default {
// 导出数据 // 导出数据
downloadExcel() { downloadExcel() {
let that = this; let that = this;
if (that.downloadExcelBool) { let timeOrDialogBool = this.tableData.length > 0 ? true : false;
if (!timeOrDialogBool) {
that.$message.error('没有可导出的数据');
return;
}
if (that.downloadExcelBool && timeOrDialogBool) {
let para = { let para = {
requestProject: that.projectName, requestProject: that.projectName,
paramTime: that.month, paramTime: that.month,
...@@ -220,27 +225,29 @@ export default { ...@@ -220,27 +225,29 @@ export default {
} }
}); });
} }
that if (timeOrDialogBool) {
.$confirm('正在为您导出数据,60S内不能重复点击导出按钮,若数据量过大,可能需要几分钟时间,请耐心等待', '提示', { that
confirmButtonText: '知道了', .$confirm('正在为您导出数据,60S内不能重复点击导出按钮,若数据量过大,可能需要几分钟时间,请耐心等待', '提示', {
cancelButtonText: '取消', confirmButtonText: '知道了',
showCancelButton: false, cancelButtonText: '取消',
type: 'warning' showCancelButton: false,
}) type: 'warning'
.then(() => {}) })
.catch(() => {}); .then(() => {})
let count = 60; .catch(() => {});
window.myTimer4 = setInterval(function() { let count = 60;
that.downloadExcelBool = false; window.myTimer4 = setInterval(function() {
count--; that.downloadExcelBool = false;
count = count < 10 ? '0' + count : count; count--;
if (count < 1) { count = count < 10 ? '0' + count : count;
clearInterval(window.myTimer4); if (count < 1) {
that.downloadExcelBool = true; clearInterval(window.myTimer4);
} else { that.downloadExcelBool = true;
that.downloadExcelMsg = '倒计时' + count + '秒'; } else {
} that.downloadExcelMsg = '倒计时' + count + '秒';
}, 1000); }
}, 1000);
}
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
......
...@@ -221,7 +221,12 @@ export default { ...@@ -221,7 +221,12 @@ export default {
// 导出明细数据 // 导出明细数据
downloadExcelDtl() { downloadExcelDtl() {
let that = this; let that = this;
if (that.downloadExcelDtlBool) { let timeOrDialogBool = this.tableData.length > 0 ? true : false;
if (!timeOrDialogBool) {
that.$message.error('没有可导出的数据');
return;
}
if (that.downloadExcelDtlBool && timeOrDialogBool) {
let para = { let para = {
requestProject: that.projectName, requestProject: that.projectName,
paramTime: that.month, paramTime: that.month,
...@@ -239,32 +244,39 @@ export default { ...@@ -239,32 +244,39 @@ export default {
} }
}); });
} }
that if (timeOrDialogBool) {
.$confirm('正在为您导出数据,60S内不能重复点击导出按钮,若数据量过大,可能需要几分钟时间,请耐心等待', '提示', { that
confirmButtonText: '知道了', .$confirm('正在为您导出数据,60S内不能重复点击导出按钮,若数据量过大,可能需要几分钟时间,请耐心等待', '提示', {
cancelButtonText: '取消', confirmButtonText: '知道了',
showCancelButton: false, cancelButtonText: '取消',
type: 'warning' showCancelButton: false,
}) type: 'warning'
.then(() => {}) })
.catch(() => {}); .then(() => {})
let count = 60; .catch(() => {});
window.myTimer = setInterval(function() { let count = 60;
that.downloadExcelDtlBool = false; window.myTimer = setInterval(function() {
count--; that.downloadExcelDtlBool = false;
count = count < 10 ? '0' + count : count; count--;
if (count < 1) { count = count < 10 ? '0' + count : count;
clearInterval(window.myTimer); if (count < 1) {
that.downloadExcelDtlBool = true; clearInterval(window.myTimer);
} else { that.downloadExcelDtlBool = true;
that.downloadExcelDtlMsg = '倒计时' + count + '秒'; } else {
} that.downloadExcelDtlMsg = '倒计时' + count + '秒';
}, 1000); }
}, 1000);
}
}, },
// 导出汇总数据 // 导出汇总数据
downloadExcelAll() { downloadExcelAll() {
let that = this; let that = this;
if (that.downloadExcelAllBool) { let timeOrDialogBool = this.tableData.length > 0 ? true : false;
if (!timeOrDialogBool) {
that.$message.error('没有可导出的数据');
return;
}
if (that.downloadExcelAllBool && timeOrDialogBool) {
let para = { let para = {
requestProject: that.projectName, requestProject: that.projectName,
paramTime: that.month, paramTime: that.month,
...@@ -282,27 +294,29 @@ export default { ...@@ -282,27 +294,29 @@ export default {
} }
}); });
} }
that if (timeOrDialogBool) {
.$confirm('正在为您导出数据,60S内不能重复点击导出按钮,若数据量过大,可能需要几分钟时间,请耐心等待', '提示', { that
confirmButtonText: '知道了', .$confirm('正在为您导出数据,60S内不能重复点击导出按钮,若数据量过大,可能需要几分钟时间,请耐心等待', '提示', {
cancelButtonText: '取消', confirmButtonText: '知道了',
showCancelButton: false, cancelButtonText: '取消',
type: 'warning' showCancelButton: false,
}) type: 'warning'
.then(() => {}) })
.catch(() => {}); .then(() => {})
let count = 60; .catch(() => {});
window.myTimer2 = setInterval(function() { let count = 60;
that.downloadExcelAllBool = false; window.myTimer2 = setInterval(function() {
count--; that.downloadExcelAllBool = false;
count = count < 10 ? '0' + count : count; count--;
if (count < 1) { count = count < 10 ? '0' + count : count;
clearInterval(window.myTimer2); if (count < 1) {
that.downloadExcelAllBool = true; clearInterval(window.myTimer2);
} else { that.downloadExcelAllBool = true;
that.downloadExcelAllMsg = '倒计时' + count + '秒'; } else {
} that.downloadExcelAllMsg = '倒计时' + count + '秒';
}, 1000); }
}, 1000);
}
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
......
...@@ -194,7 +194,12 @@ export default { ...@@ -194,7 +194,12 @@ export default {
// 导出数据 // 导出数据
downloadExcel() { downloadExcel() {
let that = this; let that = this;
if (that.downloadExcelBool) { let timeOrDialogBool = this.tableData.length > 0 ? true : false;
if (!timeOrDialogBool) {
that.$message.error('没有可导出的数据');
return;
}
if (that.downloadExcelBool && timeOrDialogBool) {
let para = { let para = {
requestProject: that.projectName, requestProject: that.projectName,
paramTime: that.month, paramTime: that.month,
...@@ -212,27 +217,29 @@ export default { ...@@ -212,27 +217,29 @@ export default {
} }
}); });
} }
that if (timeOrDialogBool) {
.$confirm('正在为您导出数据,60S内不能重复点击导出按钮,若数据量过大,可能需要几分钟时间,请耐心等待', '提示', { that
confirmButtonText: '知道了', .$confirm('正在为您导出数据,60S内不能重复点击导出按钮,若数据量过大,可能需要几分钟时间,请耐心等待', '提示', {
cancelButtonText: '取消', confirmButtonText: '知道了',
showCancelButton: false, cancelButtonText: '取消',
type: 'warning' showCancelButton: false,
}) type: 'warning'
.then(() => {}) })
.catch(() => {}); .then(() => {})
let count = 60; .catch(() => {});
window.myTimer3 = setInterval(function() { let count = 60;
that.downloadExcelBool = false; window.myTimer3 = setInterval(function() {
count--; that.downloadExcelBool = false;
count = count < 10 ? '0' + count : count; count--;
if (count < 1) { count = count < 10 ? '0' + count : count;
clearInterval(window.myTimer3); if (count < 1) {
that.downloadExcelBool = true; clearInterval(window.myTimer3);
} else { that.downloadExcelBool = true;
that.downloadExcelMsg = '倒计时' + count + '秒'; } else {
} that.downloadExcelMsg = '倒计时' + count + '秒';
}, 1000); }
}, 1000);
}
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
......
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 to comment