归属部门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,29 +99,28 @@
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(item) => item.attrType === '组件地址' (item) => item.attrType === '组件地址'
)[0] )[0]
if (!obj) { dataFrom.value.content[0].childrenContent[1].attrValue =
flag.value = false props.dataList.deptContacts || '--'
} else { dataFrom.value.content[0].childrenContent[2].attrValue =
dataFrom.value.content[0].childrenContent[1].attrValue = props.dataList.deptPhone || '--'
props.dataList.deptContacts || '--' dataFrom.value.content[0].childrenContent[0].attrValue =
dataFrom.value.content[0].childrenContent[2].attrValue = props.dataList.deptName || '--'
props.dataList.deptPhone || '--' props.dataList.infoList.map((item) => {
dataFrom.value.content[0].childrenContent[0].attrValue = if (item.attrType == '组件地址') {
props.dataList.deptName || '--' dataFrom.value.link = item.attrValue || '暂无数据'
props.dataList.infoList.map((item) => { } else if (item.attrType == '服务商联系人') {
if (item.attrType == '组件地址') { dataFrom.value.content[1].childrenContent[1].attrValue =
dataFrom.value.link = item.attrValue item.attrValue || '--'
} else if (item.attrType == '服务商联系人') { } else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[1].attrValue = dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue || '--' item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') { } else if (item.attrType == '服务商' || item.attrType == '服务商名') {
dataFrom.value.content[1].childrenContent[2].attrValue = dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--' item.attrValue || '--'
} else if (item.attrType == '服务商' || item.attrType == '服务商名') { }
dataFrom.value.content[1].childrenContent[0].attrValue = })
item.attrValue || '--' if (dataFrom.value.link === '') {
} dataFrom.value.link = '暂无数据'
})
} }
} }
console.log('obj', dataFrom.value) console.log('obj', dataFrom.value)
@ -161,32 +160,28 @@
(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) { dataFrom.value.content[0].childrenContent[1].attrValue =
flag.value = false props.dataList.deptContacts || '--'
} else { dataFrom.value.content[0].childrenContent[2].attrValue =
dataFrom.value.content[0].childrenContent[1].attrValue = props.dataList.deptPhone || '--'
props.dataList.deptContacts || '--' dataFrom.value.content[0].childrenContent[0].attrValue =
dataFrom.value.content[0].childrenContent[2].attrValue = props.dataList.deptName || '--'
props.dataList.deptPhone || '--' props.dataList.infoList.map((item) => {
dataFrom.value.content[0].childrenContent[0].attrValue = if (item.attrType == '组件地址') {
props.dataList.deptName || '--' dataFrom.value.link = item.attrValue || '暂无数据'
props.dataList.infoList.map((item) => { } else if (item.attrType == '服务商联系人') {
if (item.attrType == '组件地址') { dataFrom.value.content[1].childrenContent[1].attrValue =
dataFrom.value.link = item.attrValue item.attrValue || '--'
} else if (item.attrType == '服务商联系人') { } else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[1].attrValue = dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue || '--' item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') { } else if (item.attrType == '服务商' || item.attrType == '服务商名') {
dataFrom.value.content[1].childrenContent[2].attrValue = dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--' item.attrValue || '--'
} else if ( }
item.attrType == '服务商' || })
item.attrType == '服务商名' if (dataFrom.value.link === '') {
) { dataFrom.value.link = '暂无数据'
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--'
}
})
} }
} }
} }
@ -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) {
applicationArea.value = props.dataList.infoList.filter( if (
(val) => val.attrType === '应用领域' props.dataList.infoList.filter((val) => val.attrType === '应用领域')[0]
)[0].attrValue ) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[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) {
applicationArea.value = props.dataList.infoList.filter( if (
(val) => val.attrType === '应用领域' props.dataList.infoList.filter(
)[0].attrValue (val) => val.attrType === '应用领域'
)[0]
) {
applicationArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
}
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型' (val) => val.attrType === '组件类型'
)[0] )[0]