diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/PointAndLine.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/PointAndLine.vue index 26bf916..0faf3e1 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/PointAndLine.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/PointAndLine.vue @@ -241,7 +241,7 @@ value: ownership.value.filter(item => { return item.value == properties.ownershipUnits; - })[0].label || '-', + })[0]?.label || '-', }, { name: '管段长度', value: properties.pipelineLength }, { name: '建设年代', value: properties.constructionDate }, @@ -318,10 +318,7 @@ { name: '附属物', value: obj.appendage || '-' }, { name: '管网归属', - value: - ownership.value.filter(item => { - return item.value == obj.ownershipUnits; - })[0].label || '-', + value: obj.ownershipUnits, }, { name: '维护管理单位', value: obj.operationalUnits || '-' }, @@ -355,7 +352,7 @@ value: ownership.value.filter(item => { return item.value == obj2.ownershipUnits; - })[0].label || '-', + })[0]?.label || '-', }, { name: '管段长度(m)', value: obj2.pipelineLength || '-' }, { name: '断面类型', value: obj2.sectionType || '-' }, diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/PointAndLine.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/PointAndLine.vue index 26bf916..0faf3e1 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/PointAndLine.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/PointAndLine.vue @@ -241,7 +241,7 @@ value: ownership.value.filter(item => { return item.value == properties.ownershipUnits; - })[0].label || '-', + })[0]?.label || '-', }, { name: '管段长度', value: properties.pipelineLength }, { name: '建设年代', value: properties.constructionDate }, @@ -318,10 +318,7 @@ { name: '附属物', value: obj.appendage || '-' }, { name: '管网归属', - value: - ownership.value.filter(item => { - return item.value == obj.ownershipUnits; - })[0].label || '-', + value: obj.ownershipUnits, }, { name: '维护管理单位', value: obj.operationalUnits || '-' }, @@ -355,7 +352,7 @@ value: ownership.value.filter(item => { return item.value == obj2.ownershipUnits; - })[0].label || '-', + })[0]?.label || '-', }, { name: '管段长度(m)', value: obj2.pipelineLength || '-' }, { name: '断面类型', value: obj2.sectionType || '-' }, diff --git a/vite.config.js b/vite.config.js index bdfa4ec..4ddbb34 100644 --- a/vite.config.js +++ b/vite.config.js @@ -136,4 +136,3 @@ }, }; }); - \ No newline at end of file