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

对接excel 查看原始数据情况

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