|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: JC9527
|
|
|
|
|
* @Date: 2024-03-25 15:37:35
|
|
|
|
|
* @LastEditors: JC9527
|
|
|
|
|
* @LastEditTime: 2024-03-27 17:22:13
|
|
|
|
|
* @LastEditTime: 2024-03-28 11:27:44
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
@ -44,38 +44,48 @@ export default {
|
|
|
|
|
|
|
|
|
|
let obj = {};
|
|
|
|
|
obj["key"] = key;
|
|
|
|
|
obj["value"] = newInfo[key]
|
|
|
|
|
obj["value"] = newInfo[key] ? newInfo[key] : '暂无'
|
|
|
|
|
obj["span"] = 1;
|
|
|
|
|
arr.push(obj)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
arr = arr.filter(element => element.key !== "");
|
|
|
|
|
for (var i = 0; i < arr.length; i++) {
|
|
|
|
|
// if(!arr[i].key) {
|
|
|
|
|
// delete arr[i];
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// 计算不同长度所占的列宽
|
|
|
|
|
if(arr[i].value) {
|
|
|
|
|
if((i + 1) % 3 == 1 && arr[i].value.length > 50) {
|
|
|
|
|
if((i + 1) % 3 == 1 && arr[i].value.length > 50 && arr[i - 1]?.span == 2) {
|
|
|
|
|
arr[i - 1].span = 3
|
|
|
|
|
arr[i].span = 3
|
|
|
|
|
} else if((i + 1) % 3 == 1 && arr[i].value.length > 18 && arr[i].value.length < 50 ) {
|
|
|
|
|
} else if((i + 1) % 3 == 1 && arr[i].value.length > 18 && arr[i].value.length < 50 && arr[i - 1]?.span == 2) {
|
|
|
|
|
arr[i - 1].span = 3
|
|
|
|
|
arr[i].span = 2
|
|
|
|
|
} else if((i + 1) % 3 == 2 && arr[i].value.length > 50) {
|
|
|
|
|
arr[i - 1].span = 3
|
|
|
|
|
arr[i].span = 3
|
|
|
|
|
} else if((i + 1) % 3 == 2 && arr[i].value.length > 18 && arr[i].value.length < 50) {
|
|
|
|
|
} else if((i + 1) % 3 == 2 && arr[i].value.length > 18 && arr[i].value.length < 50 && arr[i - 1]?.span == 2) {
|
|
|
|
|
arr[i - 1].span = 3
|
|
|
|
|
arr[i].span = 2
|
|
|
|
|
} else if((i + 1) % 3 == 0 && arr[i].value.length > 18 && arr[i].value.length < 50 && arr[i - 1].span == 1) {
|
|
|
|
|
} else if((i + 1) % 3 == 0 && arr[i].value.length > 18 && arr[i].value.length < 50 && arr[i - 1]?.span == 1) {
|
|
|
|
|
arr[i - 1].span = 2
|
|
|
|
|
arr[i].span = 2
|
|
|
|
|
} else if((i + 1) % 3 == 0 && arr[i].value.length > 50 && arr[i - 1].span == 1) {
|
|
|
|
|
arr[i - 1].span = 2
|
|
|
|
|
arr[i].span = 3
|
|
|
|
|
} else if((i + 1) % 3 == 0 && arr[i].value.length > 18 && arr[i].value.length < 50 && arr[i - 1].span == 2) {
|
|
|
|
|
} else if((i + 1) % 3 == 0 && arr[i].value.length > 18 && arr[i].value.length < 50 && arr[i - 1]?.span == 2) {
|
|
|
|
|
arr[i].span = 2
|
|
|
|
|
} else if((i + 1) % 3 == 0 && arr[i].value.length > 50) {
|
|
|
|
|
arr[i].span = 3
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
arr[i].span = 1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.info = [...arr]
|
|
|
|
|
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.info = [...arr]
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|