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

table内容过长、table项目改成title

上级 67a7e024
......@@ -4,7 +4,7 @@
<div class="component-content screenSet" id="screenSet">
<p>导出文件列表</p>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="title" label="名称" align="center" min-width="150"></el-table-column>
<el-table-column prop="title" label="名称" align="center" min-width="150" show-overflow-tooltip></el-table-column>
<el-table-column prop="createdTime" label="时间" align="center" min-width="120">
<template slot-scope="scope">{{ scope.row.createdTime }}</template>
</el-table-column>
......@@ -89,29 +89,6 @@ export default {
}
},
search() {
vm.tableData = [
// {
// id: 123,
// fileName:
// "浙江省心脑项目,浙江省杭州市区西湖区,第二人民医院杭州市中医院---",
// createdTime: 1562221264000,
// status: 0,
// },
// {
// id: 233,
// fileName:
// "江西省心脑项目,浙江省杭州市区西湖区,第二人民医院杭州市中医院---",
// createdTime: 1562221874000,
// status: 0,
// },
// {
// id: 666,
// fileName:
// "上海市心脑项目,浙江省杭州市区西湖区,第二人民医院杭州市中医院---",
// createdTime: 1562225864000,
// status: 0,
// }
];
// this.setButton();
let req = {
projectId : vm.projectId,
......@@ -148,11 +125,11 @@ export default {
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].title = vm.tableData[row.index].title+ ' ';
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].title = vm.tableData[row.index].title+ ' ';
vm.tableData[row.index].buttonText = "刷新";
}
}
......@@ -166,26 +143,20 @@ export default {
// vm.getDownLoadStatus(row);
console.log(vm.tableData[row.index]);
let nowTime = vm.totalTime;
vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' ';
vm.tableData[row.index].title = vm.tableData[row.index].title+ ' ';
vm.tableData[row.index].buttonText = nowTime + "s后可以刷新";
vm.tableData[row.index].buttonStatus = true;
let clock = window.setInterval(() => {
nowTime--;
vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' ';
vm.tableData[row.index].title = vm.tableData[row.index].title+ ' ';
vm.tableData[row.index].buttonText = nowTime + "s后可以刷新";
if (nowTime <= 0) {
window.clearInterval(clock);
vm.tableData[row.index].fileName = vm.tableData[row.index].fileName+ ' ';
vm.tableData[row.index].title = vm.tableData[row.index].title+ ' ';
// vm.tableData[row.index].buttonText = "刷新";
vm.tableData[row.index].buttonStatus = false; //这里重新开启
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);
});
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册