|
@@ -29,6 +29,8 @@
|
|
:total="achieveTotal"
|
|
:total="achieveTotal"
|
|
@clickDetail="clickDetail"
|
|
@clickDetail="clickDetail"
|
|
@searchData="searchData"
|
|
@searchData="searchData"
|
|
|
|
+ @changeCom="changeCom"
|
|
|
|
+ :dropList="dropList"
|
|
></achieve>
|
|
></achieve>
|
|
</span>
|
|
</span>
|
|
<span v-else-if="column_name == '商务服务'">
|
|
<span v-else-if="column_name == '商务服务'">
|
|
@@ -101,6 +103,7 @@ import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions: product } = createNamespacedHelpers('marketproduct');
|
|
const { mapActions: product } = createNamespacedHelpers('marketproduct');
|
|
const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
|
|
const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
|
|
const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
|
+import _ from 'lodash';
|
|
export default {
|
|
export default {
|
|
name: 'marketlists',
|
|
name: 'marketlists',
|
|
props: {},
|
|
props: {},
|
|
@@ -141,6 +144,8 @@ export default {
|
|
achieveList: [],
|
|
achieveList: [],
|
|
achieveTotal: 0,
|
|
achieveTotal: 0,
|
|
achiDetail: {},
|
|
achiDetail: {},
|
|
|
|
+ // 其他单位列表
|
|
|
|
+ dropList: [],
|
|
// 商务服务
|
|
// 商务服务
|
|
businessList: [],
|
|
businessList: [],
|
|
businessTotal: 0,
|
|
businessTotal: 0,
|
|
@@ -153,8 +158,9 @@ export default {
|
|
displayBtn: true,
|
|
displayBtn: true,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
- this.searchColumn();
|
|
|
|
|
|
+ async created() {
|
|
|
|
+ await this.searchColumn();
|
|
|
|
+ await this.searchCom();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...product({ productList: 'newquery', productFetch: 'newfetch' }),
|
|
...product({ productList: 'newquery', productFetch: 'newfetch' }),
|
|
@@ -189,21 +195,21 @@ export default {
|
|
},
|
|
},
|
|
// 查看列表
|
|
// 查看列表
|
|
async searchInfo({ skip = 0, limit = 10, columnName, name, ...info } = {}) {
|
|
async searchInfo({ skip = 0, limit = 10, columnName, name, ...info } = {}) {
|
|
|
|
+ if (name) info.name = name;
|
|
if (columnName == '科技需求') {
|
|
if (columnName == '科技需求') {
|
|
- let res = await this.productList({ skip, type: '0', status: '1', name, ...info });
|
|
|
|
|
|
+ let res = await this.productList({ skip, type: '0', status: '1', ...info });
|
|
if (this.$checkRes(res)) this.$set(this, `technologyList`, res.data);
|
|
if (this.$checkRes(res)) this.$set(this, `technologyList`, res.data);
|
|
this.$set(this, `technologyTotal`, res.total);
|
|
this.$set(this, `technologyTotal`, res.total);
|
|
} else if (columnName == '技术成果') {
|
|
} else if (columnName == '技术成果') {
|
|
- let res = await this.productList({ skip, type: '1', status: '1', name, ...info });
|
|
|
|
- console.log(res.data);
|
|
|
|
|
|
+ let res = await this.productList({ skip, type: '1', status: '1', ...info });
|
|
if (this.$checkRes(res)) this.$set(this, `achieveList`, res.data);
|
|
if (this.$checkRes(res)) this.$set(this, `achieveList`, res.data);
|
|
this.$set(this, `achieveTotal`, res.total);
|
|
this.$set(this, `achieveTotal`, res.total);
|
|
} else if (columnName == '商务服务') {
|
|
} else if (columnName == '商务服务') {
|
|
- let res = await this.productList({ skip, type: '2', status: '1', name, ...info });
|
|
|
|
|
|
+ let res = await this.productList({ skip, type: '2', status: '1', ...info });
|
|
if (this.$checkRes(res)) this.$set(this, `businessList`, res.data);
|
|
if (this.$checkRes(res)) this.$set(this, `businessList`, res.data);
|
|
this.$set(this, `businessTotal`, res.total);
|
|
this.$set(this, `businessTotal`, res.total);
|
|
} else if (columnName == '专家智库') {
|
|
} else if (columnName == '专家智库') {
|
|
- let res = await this.expertsuserList({ skip, name, ...info });
|
|
|
|
|
|
+ let res = await this.expertsuserList({ skip, ...info });
|
|
if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
|
|
if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
|
|
this.$set(this, `expertTotal`, res.total);
|
|
this.$set(this, `expertTotal`, res.total);
|
|
}
|
|
}
|
|
@@ -282,6 +288,38 @@ export default {
|
|
searchData({ name, columnName }) {
|
|
searchData({ name, columnName }) {
|
|
this.searchInfo({ columnName, name });
|
|
this.searchInfo({ columnName, name });
|
|
},
|
|
},
|
|
|
|
+ // 查询成果单位
|
|
|
|
+ async searchCom() {
|
|
|
|
+ let res = await this.productList({ type: '1', status: '1' });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ let newRes = _.uniqBy(
|
|
|
|
+ res.data.map(i => ({ name: i.company })),
|
|
|
|
+ 'name'
|
|
|
|
+ ).filter(i => i.name != '中科院长春分院' && i.name != '中科院长春光学精密机械与物理研究所' && i.name != '中国科学院长春应用化学研究所');
|
|
|
|
+ if (newRes) this.$set(this, `dropList`, newRes);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 选择单位
|
|
|
|
+ async changeCom(data) {
|
|
|
|
+ if (data == '中科系') {
|
|
|
|
+ let res = await this.productList({ type: '1', status: '1', company: '中科院长春分院' });
|
|
|
|
+ let arr = await this.productList({ type: '1', status: '1', company: '中科院长春光学精密机械与物理研究所' });
|
|
|
|
+ let val = await this.productList({ type: '1', status: '1', company: '中国科学院长春应用化学研究所' });
|
|
|
|
+ if (res || arr || val) {
|
|
|
|
+ var newData = res.data.concat(arr.data).concat(val.data);
|
|
|
|
+ if (newData) {
|
|
|
|
+ this.$set(this, `achieveList`, newData);
|
|
|
|
+ this.$set(this, `achieveTotal`, newData.length);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ let res = await this.productList({ type: '1', status: '1', company: data });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `achieveList`, res.data);
|
|
|
|
+ this.$set(this, `achieveTotal`, res.total);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|