归属部门bug

This commit is contained in:
851673013@qq.com 2022-07-18 16:29:49 +08:00
parent 3d3e2729ed
commit f535e26c84
2 changed files with 61 additions and 56 deletions

View File

@ -99,9 +99,6 @@
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(item) => item.attrType === '组件地址' (item) => item.attrType === '组件地址'
)[0] )[0]
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].childrenContent[1].attrValue = dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptContacts || '--' props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue = dataFrom.value.content[0].childrenContent[2].attrValue =
@ -110,7 +107,7 @@
props.dataList.deptName || '--' props.dataList.deptName || '--'
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') { if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue dataFrom.value.link = item.attrValue || '暂无数据'
} else if (item.attrType == '服务商联系人') { } else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue = dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue || '--' item.attrValue || '--'
@ -122,6 +119,8 @@
item.attrValue || '--' item.attrValue || '--'
} }
}) })
if (dataFrom.value.link === '') {
dataFrom.value.link = '暂无数据'
} }
} }
console.log('obj', dataFrom.value) console.log('obj', dataFrom.value)
@ -161,9 +160,6 @@
(val) => { (val) => {
if (val) { if (val) {
let obj = val.infoList.filter((item) => item.attrType === '组件地址')[0] let obj = val.infoList.filter((item) => item.attrType === '组件地址')[0]
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].childrenContent[1].attrValue = dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptContacts || '--' props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue = dataFrom.value.content[0].childrenContent[2].attrValue =
@ -172,21 +168,20 @@
props.dataList.deptName || '--' props.dataList.deptName || '--'
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') { if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue dataFrom.value.link = item.attrValue || '暂无数据'
} else if (item.attrType == '服务商联系人') { } else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue = dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue || '--' item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') { } else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue = dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue || '--' item.attrValue || '--'
} else if ( } else if (item.attrType == '服务商' || item.attrType == '服务商名') {
item.attrType == '服务商' ||
item.attrType == '服务商名'
) {
dataFrom.value.content[1].childrenContent[0].attrValue = dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--' item.attrValue || '--'
} }
}) })
if (dataFrom.value.link === '') {
dataFrom.value.link = '暂无数据'
} }
} }
} }
@ -249,7 +244,7 @@
// -webkit-line-clamp: 1; // -webkit-line-clamp: 1;
& > span:last-child { & > span:last-child {
display: inline-block; display: inline-block;
width: 1.19rem; width: 1.49rem;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

View File

@ -157,9 +157,13 @@
} }
const componentType = ref('') const componentType = ref('')
if (props.dataList.infoList) { if (props.dataList.infoList) {
if (
props.dataList.infoList.filter((val) => val.attrType === '应用领域')[0]
) {
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
}
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型' (val) => val.attrType === '组件类型'
)[0] )[0]
@ -178,9 +182,15 @@
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
if (
props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0]
) {
applicationArea.value = props.dataList.infoList.filter( applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域' (val) => val.attrType === '应用领域'
)[0].attrValue )[0].attrValue
}
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型' (val) => val.attrType === '组件类型'
)[0] )[0]