提交 69754cf7 authored 作者: lidongxu's avatar lidongxu

style(plan): 修复上传计划

把错误信息拿到第一列并换行显示多个错误
上级 38d2a0bb
...@@ -482,7 +482,6 @@ getWarZoneList() ...@@ -482,7 +482,6 @@ getWarZoneList()
const managerList = ref([]) const managerList = ref([])
const getChargeList = async () => { const getChargeList = async () => {
const { data } = await getChargeListAPI() const { data } = await getChargeListAPI()
console.log('归属人', data)
managerList.value = data.map(item => { managerList.value = data.map(item => {
return { return {
label: item.name, label: item.name,
...@@ -715,6 +714,11 @@ const planTableList = ref([]) ...@@ -715,6 +714,11 @@ const planTableList = ref([])
const dialogVisible = ref(false) const dialogVisible = ref(false)
const confirmExcelUUID = ref('') const confirmExcelUUID = ref('')
const confirmTableColumns = [ const confirmTableColumns = [
{
label: '错误消息',
prop: 'errorMsg',
width: 450
},
{ {
label: '活动 ID', label: '活动 ID',
prop: 'id', prop: 'id',
...@@ -827,11 +831,7 @@ const confirmTableColumns = [ ...@@ -827,11 +831,7 @@ const confirmTableColumns = [
prop: 'modifyTime', prop: 'modifyTime',
width: 250 width: 250
}, },
{
label: '错误消息',
prop: 'errorMsg',
width: 450
}
] ]
const tableRowClassName = ({ row, rowIndex }) => { const tableRowClassName = ({ row, rowIndex }) => {
if (row.errorMsg) { if (row.errorMsg) {
...@@ -843,6 +843,10 @@ const tableRowClassName = ({ row, rowIndex }) => { ...@@ -843,6 +843,10 @@ const tableRowClassName = ({ row, rowIndex }) => {
const formatterConfirm = (row, col, value) => { const formatterConfirm = (row, col, value) => {
if (col.property === 'clockInTime' || col.property === 'clockOutTime' || col.property === 'date') { if (col.property === 'clockInTime' || col.property === 'clockOutTime' || col.property === 'date') {
return parseTime(value) return parseTime(value)
} else if (col.property === 'errorMsg') {
console.log(123)
// 把分号替换成 \n
return value.replace(/;/g, '\n')
} else { } else {
return value return value
} }
...@@ -1143,4 +1147,15 @@ const uploadChangeFile = async (file) => { ...@@ -1143,4 +1147,15 @@ const uploadChangeFile = async (file) => {
.link { .link {
color: #409eff; color: #409eff;
} }
.container .el-table ::v-deep(.cell) {
white-space: pre-line;
/* 强制显示 2 行,超出的省略号 */
/* overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical; */
}
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论