|
@@ -23,11 +23,53 @@
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="listDown">
|
|
|
- <el-button @click="display = 'detail'">详情</el-button>
|
|
|
+ <span v-if="column_name == '科技需求'">
|
|
|
+ <technology :technologyList="technologyList" :total="technologyTotal" @clickDetail="clickDetail"></technology>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="column_name == '技术成果'">
|
|
|
+ <achieve :achieveList="achieveList" :total="achieveTotal" @clickDetail="clickDetail"></achieve>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="column_name == '商务信息'">
|
|
|
+ <business :businessList="businessList" :total="businessTotal" @clickDetail="clickDetail"></business>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="column_name == '专家服务'">
|
|
|
+ <expert :expertList="expertList" :total="expertTotal" @clickDetail="clickDetail"></expert>
|
|
|
+ </span>
|
|
|
</el-col>
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
- <el-button @click="display = 'list'">返回</el-button>
|
|
|
+ <span v-if="column_name == '科技需求'">
|
|
|
+ <el-col :span="24" style="text-align:right;">
|
|
|
+ <el-button type="primary" size="mini" @click="display = 'list'">返回</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <techDetail :detailInfo="techDetail"></techDetail>
|
|
|
+ </el-col>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="column_name == '技术成果'">
|
|
|
+ <el-col :span="24" style="text-align:right;">
|
|
|
+ <el-button type="primary" size="mini" @click="display = 'list'">返回</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <achiDetail :detailInfo="achiDetail"></achiDetail>
|
|
|
+ </el-col>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="column_name == '商务信息'">
|
|
|
+ <el-col :span="24" style="text-align:right;">
|
|
|
+ <el-button type="primary" size="mini" @click="display = 'list'">返回</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <busiDetail :detailInfo="busiDetail"></busiDetail>
|
|
|
+ </el-col>
|
|
|
+ </span>
|
|
|
+ <span v-else-if="column_name == '专家服务'">
|
|
|
+ <el-col :span="24" style="text-align:right;">
|
|
|
+ <el-button type="primary" size="mini" @click="display = 'list'">返回</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <expeDetail :detailInfo="expeDetail"></expeDetail>
|
|
|
+ </el-col>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</el-col>
|
|
|
</div>
|
|
@@ -37,11 +79,36 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+// 列表
|
|
|
+import technology from './list/technology.vue';
|
|
|
+import achieve from './list/achieve.vue';
|
|
|
+import business from './list/business.vue';
|
|
|
+import expert from './list/expert.vue';
|
|
|
+// 详情
|
|
|
+import techDetail from './detail/techDetail.vue';
|
|
|
+import achiDetail from './detail/achiDetail.vue';
|
|
|
+import busiDetail from './detail/busiDetail.vue';
|
|
|
+import expeDetail from './detail/expeDetail.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: product } = createNamespacedHelpers('enterpriseproject');
|
|
|
+const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
|
|
|
export default {
|
|
|
name: 'marketlists',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ // 科技需求
|
|
|
+ technology,
|
|
|
+ techDetail,
|
|
|
+ // 技术成果
|
|
|
+ achieve,
|
|
|
+ achiDetail,
|
|
|
+ // 商务信息
|
|
|
+ business,
|
|
|
+ busiDetail,
|
|
|
+ // 专家服务
|
|
|
+ expert,
|
|
|
+ expeDetail,
|
|
|
+ },
|
|
|
data: function() {
|
|
|
return {
|
|
|
squareImage: require('@/assets/live/square_big.png'),
|
|
@@ -56,13 +123,32 @@ export default {
|
|
|
column_name: '科技需求',
|
|
|
// 搜索
|
|
|
infoName: '',
|
|
|
+ // 列表&詳情
|
|
|
+ // 科技需求
|
|
|
+ technologyList: [],
|
|
|
+ technologyTotal: 0,
|
|
|
+ techDetail: {},
|
|
|
+ // 技术成果
|
|
|
+ achieveList: [],
|
|
|
+ achieveTotal: 0,
|
|
|
+ achiDetail: {},
|
|
|
+ // 商务信息
|
|
|
+ businessList: [],
|
|
|
+ businessTotal: 0,
|
|
|
+ busiDetail: {},
|
|
|
+ // 专家信息
|
|
|
+ expertList: [],
|
|
|
+ expertTotal: 0,
|
|
|
+ expeDetail: {},
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.searchColumn();
|
|
|
},
|
|
|
methods: {
|
|
|
- // 查询栏目
|
|
|
+ ...product({ productList: 'newquery', productFetch: 'newfetch' }),
|
|
|
+ ...expertsuser({ expertsuserList: 'query', expertsuserFetch: 'fetch' }),
|
|
|
+ // 查询栏目,列表,详情
|
|
|
async searchColumn() {
|
|
|
if (this.type == 0) {
|
|
|
this.changeMenu(this.columnName, this.type);
|
|
@@ -75,6 +161,8 @@ export default {
|
|
|
}
|
|
|
if (this.id) {
|
|
|
this.display = 'detail';
|
|
|
+ // 查看详情
|
|
|
+ this.searchDetail(this.columnName, this.id);
|
|
|
} else {
|
|
|
this.display = 'list';
|
|
|
}
|
|
@@ -85,6 +173,49 @@ export default {
|
|
|
this.column_name = name;
|
|
|
this.menuIndex = index;
|
|
|
this.menuColor = 'rgb(254, 149, 14)';
|
|
|
+ this.searchInfo({ name });
|
|
|
+ },
|
|
|
+ // 查看列表
|
|
|
+ async searchInfo({ skip = 0, limit = 10, name, ...info } = {}) {
|
|
|
+ if (name == '科技需求') {
|
|
|
+ let res = await this.productList({ skip, type: '0', status: '1', ...info });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `technologyList`, res.data);
|
|
|
+ this.$set(this, `technologyTotal`, res.total);
|
|
|
+ } else if (name == '技术成果') {
|
|
|
+ let res = await this.productList({ skip, type: '1', status: '1', ...info });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `achieveList`, res.data);
|
|
|
+ this.$set(this, `achieveTotal`, res.total);
|
|
|
+ } else if (name == '商务信息') {
|
|
|
+ let res = await this.productList({ skip, type: '2', status: '1', ...info });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `businessList`, res.data);
|
|
|
+ this.$set(this, `businessTotal`, res.total);
|
|
|
+ } else if (name == '专家服务') {
|
|
|
+ let res = await this.expertsuserList({ skip, ...info });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
|
|
|
+ this.$set(this, `expertTotal`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 查看详情
|
|
|
+ async searchDetail(columnName, id) {
|
|
|
+ if (columnName == '科技需求') {
|
|
|
+ let res = await this.productFetch(id);
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `techDetail`, res.data);
|
|
|
+ } else if (columnName == '技术成果') {
|
|
|
+ let res = await this.productFetch(id);
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `achiDetail`, res.data);
|
|
|
+ } else if (columnName == '商务信息') {
|
|
|
+ let res = await this.productFetch(id);
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `busiDetail`, res.data);
|
|
|
+ } else {
|
|
|
+ let res = await this.expertsuserFetch(id);
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `expeDetail`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 点击查看详情
|
|
|
+ clickDetail({ column_name, id }) {
|
|
|
+ this.$set(this, `column_name`, column_name);
|
|
|
+ this.display = 'detail';
|
|
|
+ this.searchDetail(column_name, id);
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
@@ -148,7 +279,7 @@ export default {
|
|
|
.listInfo {
|
|
|
float: right;
|
|
|
width: 78%;
|
|
|
- height: 600px;
|
|
|
+ min-height: 600px;
|
|
|
overflow: hidden;
|
|
|
box-shadow: 0 0 10px #2d64b3;
|
|
|
padding: 10px;
|