|
@@ -33,23 +33,23 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="list">
|
|
<el-col :span="24" class="list">
|
|
<span v-if="columnName == '专题研讨'">
|
|
<span v-if="columnName == '专题研讨'">
|
|
- <topicList :list="list" :total="total" @detailBtn="detailBtn"></topicList>
|
|
|
|
|
|
+ <topicList :list="list" :total="total" @detailBtn="detailBtn" @query="searchinfo"></topicList>
|
|
</span>
|
|
</span>
|
|
|
|
|
|
<span v-else-if="columnName == '技术问答'">
|
|
<span v-else-if="columnName == '技术问答'">
|
|
- <technologyList :list="list" :total="total" @detailBtn="detailBtn"></technologyList>
|
|
|
|
|
|
+ <technologyList :list="list" :total="total" @detailBtn="detailBtn" @query="searchinfo"></technologyList>
|
|
</span>
|
|
</span>
|
|
<span v-else-if="columnName == '行业研究'">
|
|
<span v-else-if="columnName == '行业研究'">
|
|
- <industryList :list="list" :total="total" @detailBtn="detailBtn"></industryList>
|
|
|
|
|
|
+ <industryList :list="list" :total="total" @detailBtn="detailBtn" @query="searchinfo"></industryList>
|
|
</span>
|
|
</span>
|
|
<span v-else-if="columnName == '科技培训'">
|
|
<span v-else-if="columnName == '科技培训'">
|
|
- <scienceList :list="list" :total="total" @detailBtn="detailBtn"></scienceList>
|
|
|
|
|
|
+ <scienceList :list="list" :total="total" @detailBtn="detailBtn" @query="searchinfo"></scienceList>
|
|
</span>
|
|
</span>
|
|
</el-col>
|
|
</el-col>
|
|
</span>
|
|
</span>
|
|
<span v-else>
|
|
<span v-else>
|
|
<span v-if="columnName == '专题研讨'">
|
|
<span v-if="columnName == '专题研讨'">
|
|
- <topicDetail :details="details"></topicDetail>
|
|
|
|
|
|
+ <topicDetail :newsid="newsid" :details="details"></topicDetail>
|
|
</span>
|
|
</span>
|
|
<span v-else-if="columnName == '技术问答'">
|
|
<span v-else-if="columnName == '技术问答'">
|
|
<technologyDetail :details="details"></technologyDetail>
|
|
<technologyDetail :details="details"></technologyDetail>
|
|
@@ -78,7 +78,6 @@
|
|
import top from '@/layout/common/top.vue';
|
|
import top from '@/layout/common/top.vue';
|
|
import menus from '@/layout/common/menus.vue';
|
|
import menus from '@/layout/common/menus.vue';
|
|
import foot from '@/layout/common/foot.vue';
|
|
import foot from '@/layout/common/foot.vue';
|
|
-
|
|
|
|
import technologyList from './parts/technologyList.vue';
|
|
import technologyList from './parts/technologyList.vue';
|
|
import technologyDetail from './parts/technologyDetail.vue';
|
|
import technologyDetail from './parts/technologyDetail.vue';
|
|
import industryList from './parts/industryList.vue';
|
|
import industryList from './parts/industryList.vue';
|
|
@@ -88,6 +87,7 @@ import topicDetail from './parts/topicDetail.vue';
|
|
import scienceList from './parts/scienceList.vue';
|
|
import scienceList from './parts/scienceList.vue';
|
|
import scienceDetail from './parts/scienceDetail.vue';
|
|
import scienceDetail from './parts/scienceDetail.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
+const { mapActions: news } = createNamespacedHelpers('news');
|
|
export default {
|
|
export default {
|
|
name: 'listDetail',
|
|
name: 'listDetail',
|
|
props: {},
|
|
props: {},
|
|
@@ -124,6 +124,8 @@ export default {
|
|
],
|
|
],
|
|
// 总数
|
|
// 总数
|
|
total: 10,
|
|
total: 10,
|
|
|
|
+ limit: 14,
|
|
|
|
+ newsid: '',
|
|
// 详情
|
|
// 详情
|
|
details: {
|
|
details: {
|
|
title: '信息标题',
|
|
title: '信息标题',
|
|
@@ -135,8 +137,10 @@ export default {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.changeColumn();
|
|
this.changeColumn();
|
|
|
|
+ this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ ...news({ newsQuery: 'query', newsFetch: 'fetch' }),
|
|
// 选择栏目
|
|
// 选择栏目
|
|
changeColumn() {
|
|
changeColumn() {
|
|
if (this.col_name == '专题研讨') {
|
|
if (this.col_name == '专题研讨') {
|
|
@@ -147,30 +151,53 @@ export default {
|
|
} else if (this.col_name == '技术问答') {
|
|
} else if (this.col_name == '技术问答') {
|
|
this.menuIndex = 1;
|
|
this.menuIndex = 1;
|
|
this.columnName = this.col_name;
|
|
this.columnName = this.col_name;
|
|
|
|
+ console.log('cc');
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
|
+
|
|
this.$set(this, `displays`, this.display);
|
|
this.$set(this, `displays`, this.display);
|
|
} else if (this.col_name == '行业研究') {
|
|
} else if (this.col_name == '行业研究') {
|
|
this.menuIndex = 2;
|
|
this.menuIndex = 2;
|
|
this.columnName = this.col_name;
|
|
this.columnName = this.col_name;
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
|
+
|
|
this.$set(this, `displays`, this.display);
|
|
this.$set(this, `displays`, this.display);
|
|
} else if (this.col_name == '科技培训') {
|
|
} else if (this.col_name == '科技培训') {
|
|
this.menuIndex = 3;
|
|
this.menuIndex = 3;
|
|
this.columnName = this.col_name;
|
|
this.columnName = this.col_name;
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
|
+
|
|
this.$set(this, `displays`, this.display);
|
|
this.$set(this, `displays`, this.display);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 点击选择菜单
|
|
// 点击选择菜单
|
|
- changeMenu(name, index) {
|
|
|
|
|
|
+ async changeMenu(name, index) {
|
|
this.menuIndex = index;
|
|
this.menuIndex = index;
|
|
this.columnName = name;
|
|
this.columnName = name;
|
|
|
|
+ let res = await this.newsQuery({ skip: 0, limit: 14, col_name: name, status: 2 });
|
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
this.$set(this, `displays`, 0);
|
|
this.$set(this, `displays`, 0);
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ async search() {
|
|
|
|
+ let res = await this.newsQuery({ skip: 0, limit: 14, col_name: this.col_name, status: 2 });
|
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ async searchinfo(skip, limit) {
|
|
|
|
+ let res = await this.newsQuery({ skip, limit: 14, col_name: this.col_name, status: 2 });
|
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
|
+ },
|
|
|
|
+
|
|
// 点击详情
|
|
// 点击详情
|
|
- detailBtn(id) {
|
|
|
|
- this.$set(this, `displays`, 1);
|
|
|
|
|
|
+ detailBtn(item) {
|
|
|
|
+ console.log(item);
|
|
|
|
+ if (item.url) {
|
|
|
|
+ window.open(item.url);
|
|
|
|
+ } else {
|
|
|
|
+ this.$set(this, `displays`, 1);
|
|
|
|
+ this.$set(this, `newsid`, item.id);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|