|
@@ -6,7 +6,7 @@
|
|
<h2 class="title">{{ contentsItem.title }}</h2>
|
|
<h2 class="title">{{ contentsItem.title }}</h2>
|
|
<h4 class="title" v-if="contentsItem && contentsItem.curtTitle">{{ contentsItem.curtTitle }}</h4>
|
|
<h4 class="title" v-if="contentsItem && contentsItem.curtTitle">{{ contentsItem.curtTitle }}</h4>
|
|
<!-- <span class="describe">{{ contentsItem.describe }}</span> -->
|
|
<!-- <span class="describe">{{ contentsItem.describe }}</span> -->
|
|
- <span class="date">发表时间: {{ contentsItem.date | dates }}<span class="visit" v-if="contentsItem.source">来源: {{ contentsItem.source }}</span><span class="visit">访问量: {{ contentsItem.visit }}</span></span>
|
|
|
|
|
|
+ <span class="date">发表时间: {{ contentsItem.date | dates }}<span class="visit" v-if="contentsItem.source">来源: {{ contentsItem.source | source }}</span><span class="visit">访问量: {{ contentsItem.visit }}</span></span>
|
|
<div class="content" v-html="contentsItem.content"></div>
|
|
<div class="content" v-html="contentsItem.content"></div>
|
|
<div v-if="contentsItem && contentsItem.annex">
|
|
<div v-if="contentsItem && contentsItem.annex">
|
|
<a v-for="(item, index) in contentsItem.annex" :key="index" :href="item.url" :download="item.url" target="view_window">下载附件:{{ item.name }}<br/></a>
|
|
<a v-for="(item, index) in contentsItem.annex" :key="index" :href="item.url" :download="item.url" target="view_window">下载附件:{{ item.name }}<br/></a>
|
|
@@ -20,13 +20,14 @@
|
|
import moment from 'moment';
|
|
import moment from 'moment';
|
|
import breadcrumb from '../components/breadcrumb/index.vue';
|
|
import breadcrumb from '../components/breadcrumb/index.vue';
|
|
import { mapState, mapActions } from 'vuex';
|
|
import { mapState, mapActions } from 'vuex';
|
|
|
|
+let _this;
|
|
export default {
|
|
export default {
|
|
name: 'detailsHome',
|
|
name: 'detailsHome',
|
|
components: {
|
|
components: {
|
|
breadcrumb
|
|
breadcrumb
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['contentsItem']),
|
|
|
|
|
|
+ ...mapState(['contentsItem', 'dict']),
|
|
isshow() {
|
|
isshow() {
|
|
if (this.contentsItem.bind.includes('012')) return true;
|
|
if (this.contentsItem.bind.includes('012')) return true;
|
|
return false;
|
|
return false;
|
|
@@ -38,6 +39,7 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
|
|
+ _this = this;
|
|
this.id = this.$route.params.id;
|
|
this.id = this.$route.params.id;
|
|
const type = this.$route.query.type;
|
|
const type = this.$route.query.type;
|
|
if (type) {
|
|
if (type) {
|
|
@@ -46,13 +48,18 @@ export default {
|
|
}
|
|
}
|
|
await this.contentsFetch({ id: this.id });
|
|
await this.contentsFetch({ id: this.id });
|
|
this.$refs.detailsHome.scrollIntoView(true);
|
|
this.$refs.detailsHome.scrollIntoView(true);
|
|
|
|
+ await this.sourceQuery();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapActions(['contentsFetch', 'imgNewsFetch'])
|
|
|
|
|
|
+ ...mapActions(['contentsFetch', 'imgNewsFetch', 'sourceQuery'])
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
dates(e) {
|
|
dates(e) {
|
|
return moment(e).format('YYYY-MM-DD');
|
|
return moment(e).format('YYYY-MM-DD');
|
|
|
|
+ },
|
|
|
|
+ source(code) {
|
|
|
|
+ const name = _this.dict.source.find(e => e.code == code).name;
|
|
|
|
+ return name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|