|
@@ -5,13 +5,13 @@
|
|
|
<!-- 是否支持多开 accordion -->
|
|
|
<el-collapse v-model="activeName" accordion>
|
|
|
<el-collapse-item title="创新成果" name="1">
|
|
|
- <kjpdlist :list="listNow" :total="nowTotal" status="1" @query="searchList" :province="province" :place="place"></kjpdlist>
|
|
|
+ <kjpdlist :list="onelist" @query="searchList"></kjpdlist>
|
|
|
</el-collapse-item>
|
|
|
<el-collapse-item title="科技普及" name="2">
|
|
|
- <kjpdlist :list="listPre" :total="preTotal" status="0" @query="searchList" :province="province" :place="place"></kjpdlist>
|
|
|
+ <kjpdlist :list="twolist" @query="searchList"></kjpdlist>
|
|
|
</el-collapse-item>
|
|
|
<el-collapse-item title="专家讲堂" name="3">
|
|
|
- <kjpdlist :list="listPast" :total="pastTotal" status="2" @query="searchList" :province="province" :place="place"></kjpdlist>
|
|
|
+ <kjpdlist :list="threelist" @query="searchList"></kjpdlist>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</el-col>
|
|
@@ -23,52 +23,55 @@
|
|
|
import _ from 'lodash';
|
|
|
import kjpdlist from './kjpdlist.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
+const { mapActions: channel } = createNamespacedHelpers('channel');
|
|
|
+const { mapActions: markettype } = createNamespacedHelpers('markettype');
|
|
|
export default {
|
|
|
name: 'product',
|
|
|
- props: {
|
|
|
- // 省
|
|
|
- province: { type: Array, default: () => [] },
|
|
|
- // 市
|
|
|
- place: { type: Array, default: () => [] },
|
|
|
- },
|
|
|
+ props: {},
|
|
|
components: {
|
|
|
kjpdlist,
|
|
|
},
|
|
|
data: function() {
|
|
|
return {
|
|
|
activeName: '1',
|
|
|
- // 下期预告
|
|
|
- listPre: [],
|
|
|
- preTotal: 0,
|
|
|
- // 正在直播
|
|
|
- listNow: [],
|
|
|
- nowTotal: 0,
|
|
|
- // 往期直播
|
|
|
- listPast: [],
|
|
|
- pastTotal: 0,
|
|
|
+ onelist: [],
|
|
|
+ twolist: [],
|
|
|
+ threelist: [],
|
|
|
+ // 类型
|
|
|
+ typelist: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
- await this.searchList({ status: '0' });
|
|
|
- await this.searchList({ status: '1' });
|
|
|
- await this.searchList({ status: '2' });
|
|
|
+ await this.searchType();
|
|
|
+ await this.searchList();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...dock({ dockQuery: 'query' }),
|
|
|
- async searchList({ skip = 0, limit = 10, status, ...info } = {}) {
|
|
|
- let res = await this.dockQuery({ is_allowed: 1, skip, status, ...info });
|
|
|
- if (res.errcode === 0) {
|
|
|
- if (status == '0') {
|
|
|
- this.$set(this, `preTotal`, res.total);
|
|
|
- this.$set(this, `listPre`, res.data);
|
|
|
- } else if (status == '1') {
|
|
|
- this.$set(this, `nowTotal`, res.total);
|
|
|
- this.$set(this, `listNow`, res.data);
|
|
|
- } else if (status == '2') {
|
|
|
- this.$set(this, `pastTotal`, res.total);
|
|
|
- this.$set(this, `listPast`, res.data);
|
|
|
- }
|
|
|
+ ...markettype({ typequery: 'query' }),
|
|
|
+ ...channel(['query']),
|
|
|
+ //查询类型
|
|
|
+ async searchType() {
|
|
|
+ let res = await this.typequery({ category: '04' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `typelist`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 查询
|
|
|
+ async searchList() {
|
|
|
+ let type = this.typelist;
|
|
|
+ let one = type.find(f => f.code == '040');
|
|
|
+ let res = await this.query({ type: one.id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `onelist`, res.data);
|
|
|
+ }
|
|
|
+ let two = type.find(f => f.code == '041');
|
|
|
+ res = await this.query({ type: two.id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `twolist`, res.data);
|
|
|
+ }
|
|
|
+ let three = type.find(f => f.code == '042');
|
|
|
+ res = await this.query({ type: three.id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `threelist`, res.data);
|
|
|
}
|
|
|
},
|
|
|
},
|