提交 f4d1eb48 编写于 作者: zhentian.jia's avatar zhentian.jia

对接excel 查看原始数据情况

上级 06b4eb67
...@@ -23,8 +23,8 @@ export const envConfig = { ...@@ -23,8 +23,8 @@ export const envConfig = {
saasDomainUrl: 'https://dev-saas.yunqueyi.com/', saasDomainUrl: 'https://dev-saas.yunqueyi.com/',
workApiUrl: 'https://dev-work.yunqueyi.com/web', workApiUrl: 'https://dev-work.yunqueyi.com/web',
workApiSrc: 'https://dev-work.yunqueyi.com', workApiSrc: 'https://dev-work.yunqueyi.com',
reportUrl: 'http://10.177.15.150:10401/', // reportUrl: 'http://10.177.15.150:10401/',
// reportUrl: 'https://dev-sc-report.yunqueyi.com/', reportUrl: 'https://dev-sc-report.yunqueyi.com/',
}, },
dev: { dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/', baseUrl: 'https://dev-sc.yunqueyi.com/',
......
...@@ -117,8 +117,10 @@ export default { ...@@ -117,8 +117,10 @@ export default {
projectId : vm.projectId, projectId : vm.projectId,
} }
vm.reportGET("report/downLoad/getDownloadList", req).then(res => { vm.reportGET("report/downLoad/getDownloadList", req).then(res => {
vm.tableData = res.data.data; if (res.code == "000000") {
vm.setButton(); vm.tableData = res.data.data;
vm.setButton();
}
}); });
}, },
downLoad() { downLoad() {
...@@ -136,15 +138,31 @@ export default { ...@@ -136,15 +138,31 @@ export default {
// document.body.removeChild(downloadElement) // 下载完成移除元素 // document.body.removeChild(downloadElement) // 下载完成移除元素
// window.URL.revokeObjectURL(href) // 释放掉blob对象 // window.URL.revokeObjectURL(href) // 释放掉blob对象
}, },
getDownLoadStatus() { getDownLoadStatus(row) {
let req = {
id : row.id,
}
vm.reportGET("report/downLoad/getDownLoadStatus", req).then(res => {
if (res.code == "000000") {
vm.tableData[row.index].status = res.data.data;
// console.log('res.data.data',res.data.data);
if(res.data.data == 1) {
vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' ';
vm.tableData[row.index].buttonText = "下载";
} else {
console.log('res',res,vm.tableData[row.index]);
vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' ';
vm.tableData[row.index].buttonText = "刷新";
}
}
});
}, },
update(row) { update(row) {
if(vm.tableData[row.index].status == 1) { if(vm.tableData[row.index].status == 1) {
vm.downLoad(); vm.downLoad();
} else { } else {
this.$nextTick(function() { this.$nextTick(function() {
vm.getDownLoadStatus(); // vm.getDownLoadStatus(row);
console.log(vm.tableData[row.index]); console.log(vm.tableData[row.index]);
let nowTime = vm.totalTime; let nowTime = vm.totalTime;
vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' '; vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' ';
...@@ -155,17 +173,18 @@ export default { ...@@ -155,17 +173,18 @@ export default {
nowTime--; nowTime--;
vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' '; vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' ';
vm.tableData[row.index].buttonText = nowTime + "s后可以刷新"; vm.tableData[row.index].buttonText = nowTime + "s后可以刷新";
if (nowTime < 0) { if (nowTime <= 0) {
window.clearInterval(clock); window.clearInterval(clock);
vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' '; vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' ';
// vm.tableData[row.index].buttonText = "刷新"; // vm.tableData[row.index].buttonText = "刷新";
vm.tableData[row.index].buttonStatus = false; //这里重新开启 vm.tableData[row.index].buttonStatus = false; //这里重新开启
vm.tableData[row.index].status = Boolean(Math.round(Math.random())); vm.getDownLoadStatus(row);
if(vm.tableData[row.index].status == 1) { // vm.tableData[row.index].status = Boolean(Math.round(Math.random()));
vm.tableData[row.index].buttonText = "下载"; // if(vm.tableData[row.index].status == 1) {
} else { // vm.tableData[row.index].buttonText = "下载";
vm.tableData[row.index].buttonText = "刷新"; // } else {
} // vm.tableData[row.index].buttonText = "刷新";
// }
} }
}, 1000); }, 1000);
}); });
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
@close="handleTagClose(tag)" @close="handleTagClose(tag)"
>{{ tag.label }}</el-tag> >{{ tag.label }}</el-tag>
</div> </div>
<el-form-item label> <el-form-item label v-if="showOriginal == 1">
<el-checkbox size="small" v-model="formInline.checked">查看原始数据</el-checkbox> <el-checkbox size="small" v-model="formInline.checked">查看原始数据</el-checkbox>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -190,6 +190,7 @@ export default { ...@@ -190,6 +190,7 @@ export default {
// }, 1000); // }, 1000);
} }
}, },
showOriginal: 2,
formInline: { formInline: {
region: [], region: [],
date: "", date: "",
...@@ -208,7 +209,7 @@ export default { ...@@ -208,7 +209,7 @@ export default {
activeName: "first", activeName: "first",
organizationNum: 0, organizationNum: 0,
dialogVisible: false, dialogVisible: false,
dialogUpdate: false dialogUpdate: false,
}; };
}, },
computed: { computed: {
...@@ -222,12 +223,25 @@ export default { ...@@ -222,12 +223,25 @@ export default {
created() { created() {
vm = this; vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id"); this.projectId = vm.getUrlSearch(window.location.href, "id");
this.getDisplay();
this.getRegionOption(); this.getRegionOption();
}, },
mounted: function() { mounted: function() {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
}, },
methods: { methods: {
getDisplay() {
let req = {
projectId: vm.projectId,
};
openLoading(vm);
vm.reportGET("report/portal/display", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
vm.showOriginal = res.data;
}
});
},
beforeLeave(activeName, oldActiveName) { beforeLeave(activeName, oldActiveName) {
console.log('action',activeName,'oldActive',oldActiveName) console.log('action',activeName,'oldActive',oldActiveName)
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册