|
@@ -15,7 +15,7 @@
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="list">
|
|
|
- <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @check="toCheck"></data-table>
|
|
|
+ <data-table :fields="fields" :opera="opera" :data="list" :total="total" :limit="15" @query="search" @check="toCheck"></data-table>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
@@ -30,7 +30,7 @@ import subTop from '../parts/subTop.vue';
|
|
|
import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
-const { mapActions: expert } = createNamespacedHelpers('expert');
|
|
|
+const { mapActions: dockUser } = createNamespacedHelpers('dockUser');
|
|
|
export default {
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
@@ -67,6 +67,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...dock(['fetch', 'productQuery']),
|
|
|
+ ...dockUser(['query']),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
if (this.dock_id) {
|
|
|
let res = await this.fetch(this.dock_id);
|
|
@@ -74,21 +75,34 @@ export default {
|
|
|
this.$set(this, `liveInfo`, res.data);
|
|
|
}
|
|
|
}
|
|
|
- if (this.type == '0') {
|
|
|
- // 科技需求
|
|
|
- let res = await this.productQuery({ skip, limit, type: '0', dock_id: this.dock_id, ...info });
|
|
|
- if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
- } else {
|
|
|
- // 技术成果
|
|
|
- let res = await this.productQuery({ skip, limit, type: '1', dock_id: this.dock_id, ...info });
|
|
|
- if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
+ let res = await this.query({ skip, limit, dock_id: this.dock_id, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ for (const val of res.data) {
|
|
|
+ // 成果
|
|
|
+ let achieve = val.goodsList.filter(i => i.type == '1');
|
|
|
+ if (achieve) this.$set(this, `list`, achieve);
|
|
|
+ this.$set(this, `total`, achieve.length);
|
|
|
+ // 需求
|
|
|
+ let techol = val.goodsList.filter(i => i.type == '0');
|
|
|
+ if (techol) this.$set(this, `list`, techol);
|
|
|
+ this.$set(this, `total`, techol.length);
|
|
|
+ }
|
|
|
}
|
|
|
+ // if (this.type == '0') {
|
|
|
+ // // 科技需求
|
|
|
+ // let res = await this.productQuery({ skip, limit, type: '0', dock_id: this.dock_id, ...info });
|
|
|
+ // if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
+ // this.$set(this, `total`, res.total);
|
|
|
+ // } else {
|
|
|
+ // // 技术成果
|
|
|
+ // let res = await this.productQuery({ skip, limit, type: '1', dock_id: this.dock_id, ...info });
|
|
|
+ // if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
+ // this.$set(this, `total`, res.total);
|
|
|
+ // }
|
|
|
},
|
|
|
// 对接
|
|
|
toCheck({ data }) {
|
|
|
- this.$router.push({ path: '/achieveLive/product/detail', query: { dock_id: this.dock_id, id: data._id, type: data.type } });
|
|
|
+ this.$router.push({ path: '/achieveLive/product/detail', query: { dock_id: this.dock_id, id: data.id, type: data.type } });
|
|
|
},
|
|
|
// 返回
|
|
|
back() {
|