|
|
@ -8,19 +8,25 @@ |
|
|
|
<Location :title="defaultTitle" /> |
|
|
|
<div class="content-detail p-4" :style="{ 'min-height': list.children.length * 56 + 'px' }"> |
|
|
|
<template v-if="!introId"> |
|
|
|
<template v-if="code !== '0204'"> |
|
|
|
<ListPage :code="code" @changeYear="changeYear" :content="content" @getData="getData" /> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<div class="list-title mb-2">集团</div> |
|
|
|
<ListPage :code="code" @changeYear="changeYear" :content="content1" @getData="getData" /> |
|
|
|
<div class="list-title mb-2">省公司</div> |
|
|
|
<ListPage :code="code" @changeYear="changeYear" :content="content2" @getData="getData" /> |
|
|
|
<div class="list-title mb-2">公司</div> |
|
|
|
<ListPage :code="code" @changeYear="changeYear" :content="content3" @getData="getData" /> |
|
|
|
</template> |
|
|
|
<a-spin tip="拼命加载中..." :spinning="showLoading"> |
|
|
|
<template v-if="code !== '0204'"> |
|
|
|
<ListPage :code="code" @changeYear="changeYear" :content="content" @getData="getData" /> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<div class="list-title mb-2">集团</div> |
|
|
|
<ListPage :code="code" @changeYear="changeYear" :content="content1" @getData="getData" /> |
|
|
|
<div class="list-title mb-2">省公司</div> |
|
|
|
<ListPage :code="code" @changeYear="changeYear" :content="content2" @getData="getData" /> |
|
|
|
<div class="list-title mb-2">公司</div> |
|
|
|
<ListPage :code="code" @changeYear="changeYear" :content="content3" @getData="getData" /> |
|
|
|
</template> |
|
|
|
</a-spin> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<a-spin tip="拼命加载中..." :spinning="showLoading"> |
|
|
|
<RichText :rich-obj="introContent" /> |
|
|
|
</a-spin> |
|
|
|
</template> |
|
|
|
<RichText v-else :rich-obj="introContent" /> |
|
|
|
</div> |
|
|
|
<div v-if="introContent.relations && introContent.relations.length" class="content-detail p-4"> |
|
|
|
<Relevant :data="introContent" /> |
|
|
@ -100,6 +106,7 @@ export default { |
|
|
|
introId: '', |
|
|
|
introContent: {}, |
|
|
|
showType: '0', |
|
|
|
showLoading: true |
|
|
|
}; |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -157,6 +164,7 @@ export default { |
|
|
|
}, |
|
|
|
async getContentData(showPage) { |
|
|
|
try { |
|
|
|
this.showLoading = true; |
|
|
|
let param = { |
|
|
|
showPage: showPage || this.code, |
|
|
|
year: this.year, |
|
|
@ -172,30 +180,40 @@ export default { |
|
|
|
param.pageSize = 16; |
|
|
|
if (showPage === '0201') { |
|
|
|
data1 = await this.getContentImg(param); |
|
|
|
this.showLoading = false; |
|
|
|
this.content1 = data1; |
|
|
|
} else if (showPage === '0202') { |
|
|
|
data2 = await this.getContentImg(param); |
|
|
|
this.showLoading = false; |
|
|
|
this.content2 = data2; |
|
|
|
} else if (showPage === '0203') { |
|
|
|
data3 = await this.getContentImg(param); |
|
|
|
this.showLoading = false; |
|
|
|
this.content3 = data3; |
|
|
|
} |
|
|
|
} else { |
|
|
|
data = await this.getContent(param); |
|
|
|
this.showLoading = false; |
|
|
|
this.content = data; |
|
|
|
} |
|
|
|
} catch (error) {} |
|
|
|
} catch (error) { |
|
|
|
this.showLoading = false; |
|
|
|
console.error('error: ', error); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取文章信息 |
|
|
|
async getIntroContent() { |
|
|
|
try { |
|
|
|
this.showLoading = true; |
|
|
|
const param = { |
|
|
|
showPage: '', |
|
|
|
introId: this.introId, |
|
|
|
}; |
|
|
|
const data = await this.getDetail(param); |
|
|
|
this.showLoading = false; |
|
|
|
this.introContent = data || {}; |
|
|
|
} catch (error) { |
|
|
|
this.showLoading = false; |
|
|
|
console.error('error: ', error); |
|
|
|
} |
|
|
|
}, |
|
|
|