|
@@ -33,23 +33,23 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="list">
|
|
|
<span v-if="columnName == '专题研讨'">
|
|
|
- <topicList :list="list" :total="total" @detailBtn="detailBtn"></topicList>
|
|
|
+ <topicList :list="list" :total="total" @detailBtn="detailBtn" @query="searchinfo"></topicList>
|
|
|
</span>
|
|
|
|
|
|
<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 v-else-if="columnName == '行业研究'">
|
|
|
- <industryList :list="list" :total="total" @detailBtn="detailBtn"></industryList>
|
|
|
+ <industryList :list="list" :total="total" @detailBtn="detailBtn" @query="searchinfo"></industryList>
|
|
|
</span>
|
|
|
<span v-else-if="columnName == '科技培训'">
|
|
|
- <scienceList :list="list" :total="total" @detailBtn="detailBtn"></scienceList>
|
|
|
+ <scienceList :list="list" :total="total" @detailBtn="detailBtn" @query="searchinfo"></scienceList>
|
|
|
</span>
|
|
|
</el-col>
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
<span v-if="columnName == '专题研讨'">
|
|
|
- <topicDetail :details="details"></topicDetail>
|
|
|
+ <topicDetail :newsid="newsid" :details="details"></topicDetail>
|
|
|
</span>
|
|
|
<span v-else-if="columnName == '技术问答'">
|
|
|
<technologyDetail :details="details"></technologyDetail>
|
|
@@ -124,6 +124,8 @@ export default {
|
|
|
],
|
|
|
// 总数
|
|
|
total: 10,
|
|
|
+ limit: 14,
|
|
|
+ newsid: '',
|
|
|
// 详情
|
|
|
details: {
|
|
|
title: '信息标题',
|
|
@@ -135,6 +137,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.changeColumn();
|
|
|
+ this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
...news({ newsQuery: 'query', newsFetch: 'fetch' }),
|
|
@@ -144,48 +147,25 @@ export default {
|
|
|
this.menuIndex = 0;
|
|
|
this.columnName = this.col_name;
|
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
- if (this.display == '0') {
|
|
|
- let name = this.columnName;
|
|
|
- this.changeMenu(name);
|
|
|
- } else {
|
|
|
- this.detailBtn();
|
|
|
- }
|
|
|
-
|
|
|
this.$set(this, `displays`, this.display);
|
|
|
} else if (this.col_name == '技术问答') {
|
|
|
this.menuIndex = 1;
|
|
|
this.columnName = this.col_name;
|
|
|
console.log('cc');
|
|
|
-
|
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
- if (this.display == '0') {
|
|
|
- let name = this.columnName;
|
|
|
- this.changeMenu(name);
|
|
|
- } else {
|
|
|
- this.detailBtn();
|
|
|
- }
|
|
|
+
|
|
|
this.$set(this, `displays`, this.display);
|
|
|
} else if (this.col_name == '行业研究') {
|
|
|
this.menuIndex = 2;
|
|
|
this.columnName = this.col_name;
|
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
- if (this.display == '0') {
|
|
|
- let name = this.columnName;
|
|
|
- this.changeMenu(name);
|
|
|
- } else {
|
|
|
- this.detailBtn();
|
|
|
- }
|
|
|
+
|
|
|
this.$set(this, `displays`, this.display);
|
|
|
} else if (this.col_name == '科技培训') {
|
|
|
this.menuIndex = 3;
|
|
|
this.columnName = this.col_name;
|
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
- if (this.display == '0') {
|
|
|
- let name = this.columnName;
|
|
|
- this.changeMenu(name);
|
|
|
- } else {
|
|
|
- this.detailBtn();
|
|
|
- }
|
|
|
+
|
|
|
this.$set(this, `displays`, this.display);
|
|
|
}
|
|
|
},
|
|
@@ -198,9 +178,26 @@ export default {
|
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
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: {
|