Commit da6939b8 authored by 姬鋆屾's avatar 姬鋆屾

推修改所提出的样式喝功能上的缺陷

parent d67f7622
...@@ -195,9 +195,7 @@ export default { ...@@ -195,9 +195,7 @@ export default {
formatter(row, column, val) { formatter(row, column, val) {
const content = formatter(this.tableData, column, val); const content = formatter(this.tableData, column, val);
return content == 0 ? ( return content == 0 ? (
<el-tag type={"info"} size="mini"> <p>{content}</p>
{content}
</el-tag>
) : content ? ( ) : content ? (
content == "未处理" ? ( content == "未处理" ? (
<el-tag type={"danger"} size="mini"> <el-tag type={"danger"} size="mini">
...@@ -208,17 +206,11 @@ export default { ...@@ -208,17 +206,11 @@ export default {
{content} {content}
</el-tag> </el-tag>
) : row.subAddType == 1 && column.label.includes("分值") ? ( ) : row.subAddType == 1 && column.label.includes("分值") ? (
<el-tag type={"info"} size="mini"> <p>{content}</p>
{content}
</el-tag>
) : row.subAddType == 2 && column.label.includes("分值") ? ( ) : row.subAddType == 2 && column.label.includes("分值") ? (
<el-tag type={"info"} size="mini"> <p>{-content}</p>
{-content}
</el-tag>
) : ( ) : (
<el-tag type={"info"} size="mini"> <p>{content}</p>
{content}
</el-tag>
) )
) : ( ) : (
val val
......
...@@ -46,7 +46,7 @@ const formatterAmount = (row, column) => { ...@@ -46,7 +46,7 @@ const formatterAmount = (row, column) => {
const formatterDate = (row, column) => { const formatterDate = (row, column) => {
const property = column.property; const property = column.property;
const time = row[property]; const time = row[property];
if(!time) return '-'; if(!time) return '--';
let date = time.length<13?new Date(Number(time) * 1000) : new Date(Number(time)); let date = time.length<13?new Date(Number(time) * 1000) : new Date(Number(time));
let Y = date.getFullYear() + '-'; let Y = date.getFullYear() + '-';
let M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; let M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
:empty-text="emptytxt ? emptytxt : emptyText" :empty-text="emptytxt ? emptytxt : emptyText"
border border
style="width: 100%" style="width: 100%"
height="520" height="570"
> >
<el-table-column <el-table-column
v-for="column in columns" v-for="column in columns"
...@@ -119,6 +119,14 @@ export default { ...@@ -119,6 +119,14 @@ export default {
? (this.emptytxt = "暂无数据") ? (this.emptytxt = "暂无数据")
: (this.emptytxt = "加载中..."); : (this.emptytxt = "加载中...");
// if (val.length > 0) {
// val.forEach((v) => {
// for (let key in v) {
// v[key] ? "" : (v[key] = "--");
// }
// });
// console.log(val);
// }
}, },
}, },
methods: {}, methods: {},
......
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