|
@@ -1,234 +1,48 @@
|
|
|
<template>
|
|
|
<div id="productData">
|
|
|
<el-row>
|
|
|
- <el-col :span="24" class="style">
|
|
|
- <el-tabs v-model="active" type="card">
|
|
|
- <el-tab-pane label="技术成果" name="first">
|
|
|
- <el-col :span="24" class="first">
|
|
|
- <el-col :span="5" class="achieveList" v-for="(item, index) in achieveList" :key="index">
|
|
|
- <el-col :span="24" class="top">
|
|
|
- <p class="textOver">{{ item.name || '暂无' }}</p>
|
|
|
- <p>{{ item.achievebrief || '暂无' }}</p>
|
|
|
- <p class="textOver">领域:{{ item.field || '暂无' }}</p>
|
|
|
- <p class="textOver">联系人{{ item.contacts || '暂无' }}</p>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="down">
|
|
|
- <el-button size="mini" type="primary" @click="detail(item, '1')">详情</el-button>
|
|
|
- <el-button size="mini" type="success" @click="trans(item, '1')">对接</el-button>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="btn">
|
|
|
- <el-button type="primary" size="mini" @click="moreBtn('1')">查看更多项目</el-button>
|
|
|
- </el-col>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="科技需求" name="second">
|
|
|
- <el-col :span="24" class="second">
|
|
|
- <el-col :span="5" class="techolList" v-for="(item, index) in techolList" :key="index">
|
|
|
- <el-col :span="24" class="top">
|
|
|
- <p>{{ item.name || '暂无' }}</p>
|
|
|
- <p class="textOver">领域:{{ item.field || '暂无' }}</p>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="down">
|
|
|
- <el-button size="mini" type="primary" @click="detail(item, '0')">详情</el-button>
|
|
|
- <el-button size="mini" type="success" @click="trans(item, '0')">对接</el-button>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="btn">
|
|
|
- <el-button type="primary" size="mini" @click="moreBtn('0')">查看更多项目</el-button>
|
|
|
- </el-col>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="one">
|
|
|
+ <el-tabs v-model="activeName" type="card">
|
|
|
+ <el-tab-pane label="技术成果" name="first">技术成果</el-tab-pane>
|
|
|
+ <el-tab-pane label="科技需求" name="second">科技需求</el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-dialog title="技术成果详情" :visible.sync="dialog" width="50%" :before-close="handleClose">
|
|
|
- <achieveInfo :form="info" :showBtn="false"></achieveInfo>
|
|
|
- </el-dialog>
|
|
|
- <el-dialog title="科技需求详情" :visible.sync="twoDialog" width="50%" :before-close="handleClose">
|
|
|
- <techolInfo :form="info" :showBtn="false"></techolInfo>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import achieveInfo from '../product/achieveInfo.vue';
|
|
|
-import techolInfo from '../product/techolInfo.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
-const { mapActions: dockUser } = createNamespacedHelpers('dockUser');
|
|
|
export default {
|
|
|
name: 'productData',
|
|
|
props: {},
|
|
|
- components: {
|
|
|
- achieveInfo,
|
|
|
- techolInfo,
|
|
|
- },
|
|
|
+ components: {},
|
|
|
data: function() {
|
|
|
return {
|
|
|
- active: 'first',
|
|
|
- achieveList: [],
|
|
|
- techolList: [
|
|
|
- {
|
|
|
- name: '科技需求',
|
|
|
- field: '所属领域',
|
|
|
- },
|
|
|
- ],
|
|
|
- // 技术成果详情
|
|
|
- dialog: false,
|
|
|
- info: {},
|
|
|
- // 科技需求详情
|
|
|
- twoDialog: false,
|
|
|
- twoinfo: {},
|
|
|
+ activeName: 'first',
|
|
|
};
|
|
|
},
|
|
|
- async created() {
|
|
|
- await this.search();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- ...dock(['productQuery']),
|
|
|
- ...dockUser(['query']),
|
|
|
- async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
- info.dock_id = this.id;
|
|
|
- const res = await this.query({ skip, limit, ...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, `achieveList`, achieve);
|
|
|
- // 需求
|
|
|
- let techol = val.goodsList.filter(i => i.type == '0');
|
|
|
- if (techol) this.$set(this, `techolList`, techol);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- // 查看更多项目
|
|
|
- moreBtn(type) {
|
|
|
- this.$router.push({ path: '/achieveLive/product/index', query: { dock_id: this.id, type } });
|
|
|
- },
|
|
|
- // 详情
|
|
|
- detail(data, type) {
|
|
|
- this.$set(this, `info`, data);
|
|
|
- // 科技需求
|
|
|
- if (type == '0') this.twoDialog = true;
|
|
|
- // 技术成果
|
|
|
- else if (type == '1') this.dialog = true;
|
|
|
- },
|
|
|
- // 对接
|
|
|
- trans(data, type) {
|
|
|
- this.$router.push({ path: '/achieveLive/product/detail', query: { dock_id: this.id, id: data.id, type: data.type } });
|
|
|
- },
|
|
|
- // 取消查看
|
|
|
- handleClose() {
|
|
|
- this.dialog = false;
|
|
|
- this.twoDialog = false;
|
|
|
- },
|
|
|
- },
|
|
|
+ created() {},
|
|
|
+ methods: {},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
id() {
|
|
|
return this.$route.query.id;
|
|
|
},
|
|
|
},
|
|
|
- watch: {},
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ test: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {},
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped>
|
|
|
-.style {
|
|
|
- .btn {
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- .first {
|
|
|
- padding: 0 10px;
|
|
|
- height: 530px;
|
|
|
- overflow: hidden;
|
|
|
- .achieveList {
|
|
|
- width: 18.9%;
|
|
|
- height: 250px;
|
|
|
- background: url('~@common/src/assets/achieve.png');
|
|
|
- background-size: 100% 100%;
|
|
|
- background-repeat: no-repeat;
|
|
|
- margin: 0 15px 15px 0;
|
|
|
- padding: 22px 22px 8px 22px;
|
|
|
- .top {
|
|
|
- height: 190px;
|
|
|
- overflow: hidden;
|
|
|
- p:nth-child(1) {
|
|
|
- font-size: 18px;
|
|
|
- font-weight: bold;
|
|
|
- padding: 5px 0;
|
|
|
- }
|
|
|
- p:nth-child(2) {
|
|
|
- font-size: 12px;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- -webkit-line-clamp: 6;
|
|
|
- word-break: break-all;
|
|
|
- display: -webkit-box;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- padding: 0 5px;
|
|
|
- height: 105px;
|
|
|
- line-height: 17px;
|
|
|
- }
|
|
|
- p:nth-child(3) {
|
|
|
- font-size: 14px;
|
|
|
- padding: 4px 0 0 0;
|
|
|
- }
|
|
|
- p:nth-child(4) {
|
|
|
- font-size: 14px;
|
|
|
- padding: 4px 0 0 0;
|
|
|
- }
|
|
|
- }
|
|
|
- .down {
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- }
|
|
|
- .achieveList:nth-child(5n) {
|
|
|
- margin: 0 0 15px 0;
|
|
|
- }
|
|
|
- }
|
|
|
- .second {
|
|
|
- padding: 0 10px;
|
|
|
- height: 530px;
|
|
|
- overflow: hidden;
|
|
|
- .techolList {
|
|
|
- width: 18.9%;
|
|
|
- height: 250px;
|
|
|
- border: 1px solid #ccc;
|
|
|
- border-radius: 5px;
|
|
|
- margin: 0 15px 15px 0;
|
|
|
- padding: 22px 22px 8px 22px;
|
|
|
- .top {
|
|
|
- height: 190px;
|
|
|
- overflow: hidden;
|
|
|
- p:nth-child(1) {
|
|
|
- height: 145px;
|
|
|
- text-align: center;
|
|
|
- font-size: 18px;
|
|
|
- margin: 0 0 10px 0;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- -webkit-line-clamp: 6;
|
|
|
- word-break: break-all;
|
|
|
- display: -webkit-box;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- }
|
|
|
- p:nth-child(2) {
|
|
|
- text-align: center;
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
- }
|
|
|
- .down {
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- }
|
|
|
- .techolList:nth-child(5n) {
|
|
|
- margin: 0 0 15px 0;
|
|
|
- }
|
|
|
- }
|
|
|
- /deep/.el-tabs__header {
|
|
|
- margin: 0 0 10px 0;
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|
|
|
+<style lang="less" scoped></style>
|