From f535e26c849277fde5498aa5bafd4297eb77f028 Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Mon, 18 Jul 2022 16:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=92=E5=B1=9E=E9=83=A8=E9=97=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...operOwningDepartmentAndServiceProvider.vue | 95 +++++++++---------- .../Developer/DeveloperTopDetails.vue | 22 +++-- 2 files changed, 61 insertions(+), 56 deletions(-) diff --git a/front/src/views/detailsAll/components/Developer/DeveloperOwningDepartmentAndServiceProvider.vue b/front/src/views/detailsAll/components/Developer/DeveloperOwningDepartmentAndServiceProvider.vue index 8d08732f..cd10212c 100644 --- a/front/src/views/detailsAll/components/Developer/DeveloperOwningDepartmentAndServiceProvider.vue +++ b/front/src/views/detailsAll/components/Developer/DeveloperOwningDepartmentAndServiceProvider.vue @@ -99,29 +99,28 @@ let obj = props.dataList.infoList.filter( (item) => item.attrType === '组件地址' )[0] - if (!obj) { - flag.value = false - } else { - dataFrom.value.content[0].childrenContent[1].attrValue = - props.dataList.deptContacts || '--' - dataFrom.value.content[0].childrenContent[2].attrValue = - props.dataList.deptPhone || '--' - dataFrom.value.content[0].childrenContent[0].attrValue = - props.dataList.deptName || '--' - props.dataList.infoList.map((item) => { - if (item.attrType == '组件地址') { - dataFrom.value.link = item.attrValue - } else if (item.attrType == '服务商联系人') { - dataFrom.value.content[1].childrenContent[1].attrValue = - item.attrValue || '--' - } else if (item.attrType == '服务商联系电话') { - dataFrom.value.content[1].childrenContent[2].attrValue = - item.attrValue || '--' - } else if (item.attrType == '服务商' || item.attrType == '服务商名') { - dataFrom.value.content[1].childrenContent[0].attrValue = - item.attrValue || '--' - } - }) + dataFrom.value.content[0].childrenContent[1].attrValue = + props.dataList.deptContacts || '--' + dataFrom.value.content[0].childrenContent[2].attrValue = + props.dataList.deptPhone || '--' + dataFrom.value.content[0].childrenContent[0].attrValue = + props.dataList.deptName || '--' + props.dataList.infoList.map((item) => { + if (item.attrType == '组件地址') { + dataFrom.value.link = item.attrValue || '暂无数据' + } else if (item.attrType == '服务商联系人') { + dataFrom.value.content[1].childrenContent[1].attrValue = + item.attrValue || '--' + } else if (item.attrType == '服务商联系电话') { + dataFrom.value.content[1].childrenContent[2].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) @@ -161,32 +160,28 @@ (val) => { if (val) { let obj = val.infoList.filter((item) => item.attrType === '组件地址')[0] - if (!obj) { - flag.value = false - } else { - dataFrom.value.content[0].childrenContent[1].attrValue = - props.dataList.deptContacts || '--' - dataFrom.value.content[0].childrenContent[2].attrValue = - props.dataList.deptPhone || '--' - dataFrom.value.content[0].childrenContent[0].attrValue = - props.dataList.deptName || '--' - props.dataList.infoList.map((item) => { - if (item.attrType == '组件地址') { - dataFrom.value.link = item.attrValue - } else if (item.attrType == '服务商联系人') { - dataFrom.value.content[1].childrenContent[1].attrValue = - item.attrValue || '--' - } else if (item.attrType == '服务商联系电话') { - dataFrom.value.content[1].childrenContent[2].attrValue = - item.attrValue || '--' - } else if ( - item.attrType == '服务商' || - item.attrType == '服务商名' - ) { - dataFrom.value.content[1].childrenContent[0].attrValue = - item.attrValue || '--' - } - }) + dataFrom.value.content[0].childrenContent[1].attrValue = + props.dataList.deptContacts || '--' + dataFrom.value.content[0].childrenContent[2].attrValue = + props.dataList.deptPhone || '--' + dataFrom.value.content[0].childrenContent[0].attrValue = + props.dataList.deptName || '--' + props.dataList.infoList.map((item) => { + if (item.attrType == '组件地址') { + dataFrom.value.link = item.attrValue || '暂无数据' + } else if (item.attrType == '服务商联系人') { + dataFrom.value.content[1].childrenContent[1].attrValue = + item.attrValue || '--' + } else if (item.attrType == '服务商联系电话') { + dataFrom.value.content[1].childrenContent[2].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 = '暂无数据' } } } @@ -249,7 +244,7 @@ // -webkit-line-clamp: 1; & > span:last-child { display: inline-block; - width: 1.19rem; + width: 1.49rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue b/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue index 742b762e..e6ae69dd 100644 --- a/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue +++ b/front/src/views/detailsAll/components/Developer/DeveloperTopDetails.vue @@ -157,9 +157,13 @@ } const componentType = ref('') if (props.dataList.infoList) { - applicationArea.value = props.dataList.infoList.filter( - (val) => val.attrType === '应用领域' - )[0].attrValue + if ( + props.dataList.infoList.filter((val) => val.attrType === '应用领域')[0] + ) { + applicationArea.value = props.dataList.infoList.filter( + (val) => val.attrType === '应用领域' + )[0].attrValue + } let obj = props.dataList.infoList.filter( (val) => val.attrType === '组件类型' )[0] @@ -178,9 +182,15 @@ () => props.dataList, (val) => { if (val) { - applicationArea.value = props.dataList.infoList.filter( - (val) => val.attrType === '应用领域' - )[0].attrValue + if ( + props.dataList.infoList.filter( + (val) => val.attrType === '应用领域' + )[0] + ) { + applicationArea.value = props.dataList.infoList.filter( + (val) => val.attrType === '应用领域' + )[0].attrValue + } let obj = props.dataList.infoList.filter( (val) => val.attrType === '组件类型' )[0]