|
@@ -6,7 +6,7 @@
|
|
|
<template>
|
|
|
<el-col :span="24" class="search">
|
|
|
<el-col :span="5">
|
|
|
- <el-select v-model="field" placeholder="请选择所属领域" @change="change">
|
|
|
+ <el-select v-model="field" filterable clearable placeholder="请选择所属领域" @change="changeField">
|
|
|
<el-option label="先进制造" value="0"></el-option>
|
|
|
<el-option label="新材料" value="1"></el-option>
|
|
|
<el-option label="光电子" value="2"></el-option>
|
|
@@ -15,7 +15,7 @@
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-radio-group v-model="radio1" @change="submits">
|
|
|
+ <el-radio-group v-model="radio1" @change="changeRadio">
|
|
|
<el-radio label="0" border>是我处支持范围</el-radio>
|
|
|
<el-radio label="1" border>不是我处支持范围</el-radio>
|
|
|
</el-radio-group>
|
|
@@ -24,7 +24,6 @@
|
|
|
<el-table :data="list" style="width: 100%" border>
|
|
|
<el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
|
|
|
<el-table-column prop="name" label="商品名称 " align="center"> </el-table-column>
|
|
|
- <el-table-column prop="company" label="所属单位 " align="center"> </el-table-column>
|
|
|
<el-table-column prop="field" label="所属技术领域" align="center">
|
|
|
<template v-slot="scoped">
|
|
|
{{
|
|
@@ -42,14 +41,43 @@
|
|
|
}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column label="操作" align="center">
|
|
|
- <template slot-scope="scoped">
|
|
|
- <el-button v-if="scoped.row.status == 4" type="primary" size="mini" @click="shareBtn(scoped.row.id)">审核 </el-button>
|
|
|
-
|
|
|
- </el-table-column> -->
|
|
|
+ <el-table-column prop="phase" label="研发阶段" align="center">
|
|
|
+ <template v-slot="scoped">
|
|
|
+ {{ scoped.row.phase == '0' ? '阶段成果' : scoped.row.phase == '1' ? '最终成果' : '暂无' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="coopermode" label="合作方式" align="center">
|
|
|
+ <template v-slot="scoped">
|
|
|
+ {{
|
|
|
+ scoped.row.coopermode == '0'
|
|
|
+ ? '技术转让'
|
|
|
+ : scoped.row.coopermode == '1'
|
|
|
+ ? '技术服务'
|
|
|
+ : scoped.row.coopermode == '2'
|
|
|
+ ? '技术许可'
|
|
|
+ : scoped.row.coopermode == '3'
|
|
|
+ ? '技术融资'
|
|
|
+ : scoped.row.coopermode == '4'
|
|
|
+ ? '其他'
|
|
|
+ : '暂无'
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="business" label="交易方式" align="center">
|
|
|
+ <template v-slot="scoped">
|
|
|
+ {{ scoped.row.business == '0' ? '公用' : scoped.row.business == '1' ? '竞价' : scoped.row.business == '2' ? '转让' : '暂无' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<el-col :span="24" class="page">
|
|
|
- <page v-bind="$attrs" position="center" :limit="limit" :total="total" @query="search"></page>
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ :page-size="pageSize"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
</el-col>
|
|
|
</template>
|
|
|
</el-col>
|
|
@@ -59,65 +87,70 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import page from '@/components/pagination.vue';
|
|
|
import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
|
-const { mapActions: product } = createNamespacedHelpers('marketproduct');
|
|
|
+const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
+import _ from 'loadsh';
|
|
|
export default {
|
|
|
name: 'column',
|
|
|
props: {},
|
|
|
- components: {
|
|
|
- page,
|
|
|
- },
|
|
|
+ components: {},
|
|
|
data: () => ({
|
|
|
- currentPage: 0,
|
|
|
- pageSize: 10,
|
|
|
- limit: 10,
|
|
|
+ applyList: [], //查询数据
|
|
|
+ currentPage: 1, //默认数据1
|
|
|
+ pageSize: 10, //每页显示数据数量
|
|
|
+ origin: [], //分割数据
|
|
|
+ list: [], //显示数据列表
|
|
|
total: 0,
|
|
|
- list: [],
|
|
|
- field: [],
|
|
|
+ // 技术领域
|
|
|
+ field: '',
|
|
|
+ // 是否我处支持
|
|
|
radio1: '',
|
|
|
}),
|
|
|
created() {
|
|
|
this.search();
|
|
|
},
|
|
|
- computed: {},
|
|
|
methods: {
|
|
|
- ...product({ productQuery: 'query' }),
|
|
|
+ ...dock(['query', 'delete', 'update', 'fetch']),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
- if (this.field) {
|
|
|
- if (this.radio1) {
|
|
|
- let res = await this.productQuery({ skip, totaltype: 1, field: this.field, radio1: this.radio1, limit, ...info });
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
- } else {
|
|
|
- let res = await this.productQuery({ skip, totaltype: 1, field: this.field, limit, ...info });
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
- }
|
|
|
- } else if (this.radio1) {
|
|
|
- if (this.field) {
|
|
|
- let res = await this.productQuery({ skip, totaltype: 1, field: this.field, radio1: this.radio1, limit, ...info });
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
- } else {
|
|
|
- let res = await this.productQuery({ skip, totaltype: 1, radio1: this.radio1, limit, ...info });
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
- }
|
|
|
- } else {
|
|
|
- let res = await this.productQuery({ skip, totaltype: 1, limit, ...info });
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
- }
|
|
|
+ let res = await this.query({ skip, limit, uid: this.user.uid, ...info });
|
|
|
+ let arr = res.data.map(item => item.apply.map(apply => apply.goodsList));
|
|
|
+ arr = _.flattenDeep(arr);
|
|
|
+ var newArr = arr.filter(item => item.totaltype === '1');
|
|
|
+ this.$set(this, `applyList`, newArr);
|
|
|
+ this.$set(this, `total`, newArr.length);
|
|
|
},
|
|
|
- async change(value) {
|
|
|
- this.$set(this, `field`, value);
|
|
|
- this.search();
|
|
|
+ searchPage(page = 1) {
|
|
|
+ this.$set(this, `list`, this.origin[page - 1]);
|
|
|
},
|
|
|
-
|
|
|
- submits(value) {
|
|
|
- this.$set(this, `radio1`, value);
|
|
|
- this.search();
|
|
|
+ handleCurrentChange(currentPage) {
|
|
|
+ this.searchPage(currentPage);
|
|
|
+ },
|
|
|
+ // 筛选技术领域
|
|
|
+ changeField(value) {
|
|
|
+ var arr = this.applyList.filter(item => item.field === value);
|
|
|
+ this.$set(this, `list`, arr);
|
|
|
+ this.$set(this, `total`, arr.length);
|
|
|
+ },
|
|
|
+ // 筛选是否是我处支持
|
|
|
+ changeRadio() {},
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ pageTitle() {
|
|
|
+ return `${this.$route.meta.title}`;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ applyList: {
|
|
|
+ immediate: true,
|
|
|
+ deep: true,
|
|
|
+ handler(val) {
|
|
|
+ if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
|
|
|
+ this.searchPage();
|
|
|
+ },
|
|
|
},
|
|
|
},
|
|
|
};
|