|
@@ -14,16 +14,34 @@
|
|
|
<span v-if="display == 'list'">
|
|
|
<el-col :span="24" class="listDown">
|
|
|
<span v-if="column_name == '科技需求'">
|
|
|
- <technology :technologyList="technologyList" :column_name="column_name" :total="technologyTotal" @clickDetail="clickDetail"></technology>
|
|
|
+ <technology
|
|
|
+ :technologyList="technologyList"
|
|
|
+ :column_name="column_name"
|
|
|
+ :total="technologyTotal"
|
|
|
+ @clickDetail="clickDetail"
|
|
|
+ @searchData="searchData"
|
|
|
+ ></technology>
|
|
|
</span>
|
|
|
<span v-else-if="column_name == '技术成果'">
|
|
|
- <achieve :achieveList="achieveList" :column_name="column_name" :total="achieveTotal" @clickDetail="clickDetail"></achieve>
|
|
|
+ <achieve
|
|
|
+ :achieveList="achieveList"
|
|
|
+ :column_name="column_name"
|
|
|
+ :total="achieveTotal"
|
|
|
+ @clickDetail="clickDetail"
|
|
|
+ @searchData="searchData"
|
|
|
+ ></achieve>
|
|
|
</span>
|
|
|
<span v-else-if="column_name == '商务信息'">
|
|
|
- <business :businessList="businessList" :column_name="column_name" :total="businessTotal" @clickDetail="clickDetail"></business>
|
|
|
+ <business
|
|
|
+ :businessList="businessList"
|
|
|
+ :column_name="column_name"
|
|
|
+ :total="businessTotal"
|
|
|
+ @clickDetail="clickDetail"
|
|
|
+ @searchData="searchData"
|
|
|
+ ></business>
|
|
|
</span>
|
|
|
<span v-else-if="column_name == '专家服务'">
|
|
|
- <expert :expertList="expertList" :column_name="column_name" :total="expertTotal" @clickDetail="clickDetail"></expert>
|
|
|
+ <expert :expertList="expertList" :column_name="column_name" :total="expertTotal" @clickDetail="clickDetail" @searchData="searchData"></expert>
|
|
|
</span>
|
|
|
</el-col>
|
|
|
</span>
|
|
@@ -162,29 +180,30 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 选择菜单
|
|
|
- changeMenu(name, index) {
|
|
|
+ changeMenu(columnName, index) {
|
|
|
this.display = 'list';
|
|
|
- this.column_name = name;
|
|
|
+ this.column_name = columnName;
|
|
|
this.menuIndex = index;
|
|
|
this.menuColor = 'rgb(254, 149, 14)';
|
|
|
- this.searchInfo({ name });
|
|
|
+ this.searchInfo({ columnName });
|
|
|
},
|
|
|
// 查看列表
|
|
|
- async searchInfo({ skip = 0, limit = 10, name, ...info } = {}) {
|
|
|
- if (name == '科技需求') {
|
|
|
- let res = await this.productList({ skip, type: '0', status: '1', ...info });
|
|
|
+ async searchInfo({ skip = 0, limit = 10, columnName, name, ...info } = {}) {
|
|
|
+ console.log(columnName, name);
|
|
|
+ if (columnName == '科技需求') {
|
|
|
+ let res = await this.productList({ skip, type: '0', status: '1', name, ...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 });
|
|
|
+ } else if (columnName == '技术成果') {
|
|
|
+ let res = await this.productList({ skip, type: '1', status: '1', name, ...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 });
|
|
|
+ } else if (columnName == '商务信息') {
|
|
|
+ let res = await this.productList({ skip, type: '2', status: '1', name, ...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 });
|
|
|
+ } else if (columnName == '专家服务') {
|
|
|
+ let res = await this.expertsuserList({ skip, name, ...info });
|
|
|
if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
|
|
|
this.$set(this, `expertTotal`, res.total);
|
|
|
}
|
|
@@ -259,6 +278,9 @@ export default {
|
|
|
this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
|
|
|
}
|
|
|
},
|
|
|
+ searchData({ name, columnName }) {
|
|
|
+ this.searchInfo({ columnName, name });
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|