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

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

上级 67a7e024
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="component-content screenSet" id="screenSet"> <div class="component-content screenSet" id="screenSet">
<p>导出文件列表</p> <p>导出文件列表</p>
<el-table :data="tableData" style="width: 100%"> <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"> <el-table-column prop="createdTime" label="时间" align="center" min-width="120">
<template slot-scope="scope">{{ scope.row.createdTime }}</template> <template slot-scope="scope">{{ scope.row.createdTime }}</template>
</el-table-column> </el-table-column>
...@@ -89,29 +89,6 @@ export default { ...@@ -89,29 +89,6 @@ export default {
} }
}, },
search() { 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(); // this.setButton();
let req = { let req = {
projectId : vm.projectId, projectId : vm.projectId,
...@@ -148,11 +125,11 @@ export default { ...@@ -148,11 +125,11 @@ export default {
vm.tableData[row.index].status = res.data.data; vm.tableData[row.index].status = res.data.data;
// console.log('res.data.data',res.data.data); // console.log('res.data.data',res.data.data);
if(res.data.data == 1) { 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 = "下载"; vm.tableData[row.index].buttonText = "下载";
} else { } else {
console.log('res',res,vm.tableData[row.index]); 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 = "刷新"; vm.tableData[row.index].buttonText = "刷新";
} }
} }
...@@ -166,26 +143,20 @@ export default { ...@@ -166,26 +143,20 @@ export default {
// vm.getDownLoadStatus(row); // 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].title = vm.tableData[row.index].title+ ' ';
vm.tableData[row.index].buttonText = nowTime + "s后可以刷新"; vm.tableData[row.index].buttonText = nowTime + "s后可以刷新";
vm.tableData[row.index].buttonStatus = true; vm.tableData[row.index].buttonStatus = true;
let clock = window.setInterval(() => { let clock = window.setInterval(() => {
nowTime--; 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后可以刷新"; 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].title = vm.tableData[row.index].title+ ' ';
// vm.tableData[row.index].buttonText = "刷新"; // vm.tableData[row.index].buttonText = "刷新";
vm.tableData[row.index].buttonStatus = false; //这里重新开启 vm.tableData[row.index].buttonStatus = false; //这里重新开启
vm.getDownLoadStatus(row); 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); }, 1000);
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册