|
@@ -111,6 +111,7 @@ import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: product } = createNamespacedHelpers('marketproduct');
|
|
|
const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
|
|
|
const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
+const { mapActions: markettype } = createNamespacedHelpers('markettype');
|
|
|
import _ from 'lodash';
|
|
|
export default {
|
|
|
name: 'marketlists',
|
|
@@ -149,6 +150,10 @@ export default {
|
|
|
technologyTotal: 0,
|
|
|
techDetail: {},
|
|
|
// 技术成果
|
|
|
+ // 原数组
|
|
|
+ priAchieve: [],
|
|
|
+ priAchieveTotal: 0,
|
|
|
+ // 显示数组
|
|
|
achieveList: [],
|
|
|
achieveTotal: 0,
|
|
|
achiDetail: {},
|
|
@@ -159,6 +164,9 @@ export default {
|
|
|
businessTotal: 0,
|
|
|
busiDetail: {},
|
|
|
// 专家信息
|
|
|
+ // 原数组
|
|
|
+ priExpert: [],
|
|
|
+ priExpertTotal: 0,
|
|
|
expertList: [],
|
|
|
expertTotal: 0,
|
|
|
expeDetail: {},
|
|
@@ -176,6 +184,7 @@ export default {
|
|
|
...product({ productList: 'newquery', productFetch: 'newfetch' }),
|
|
|
...expertsuser({ expertsuserList: 'query', expertsuserFetch: 'fetch' }),
|
|
|
...transaction({ transactioncreate: 'create', transactionfetch: 'fetch' }),
|
|
|
+ ...markettype({ markettypeList: 'query' }),
|
|
|
// 查询栏目,列表,详情
|
|
|
async searchColumn() {
|
|
|
if (this.type == 0) {
|
|
@@ -212,7 +221,9 @@ export default {
|
|
|
this.$set(this, `technologyTotal`, res.total);
|
|
|
} else if (columnName == '技术成果') {
|
|
|
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, `priAchieve`, res.data);
|
|
|
+ this.$set(this, `priAchieveTotal`, res.total);
|
|
|
+ this.$set(this, `achieveList`, res.data);
|
|
|
this.$set(this, `achieveTotal`, res.total);
|
|
|
} else if (columnName == '商务服务') {
|
|
|
let res = await this.productList({ skip, type: '2', status: '1', ...info });
|
|
@@ -220,7 +231,9 @@ export default {
|
|
|
this.$set(this, `businessTotal`, res.total);
|
|
|
} else if (columnName == '专家智库') {
|
|
|
let res = await this.expertsuserList({ skip, ...info });
|
|
|
- if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `priExpert`, res.data);
|
|
|
+ this.$set(this, `priExpertTotal`, res.total);
|
|
|
+ this.$set(this, `expertList`, res.data);
|
|
|
this.$set(this, `expertTotal`, res.total);
|
|
|
}
|
|
|
},
|
|
@@ -301,94 +314,92 @@ export default {
|
|
|
// 查询成果单位,专家工作单位
|
|
|
async searchCom() {
|
|
|
// 成果单位
|
|
|
- let res = await this.productList({ type: '1', status: '1' });
|
|
|
+ let res = await this.markettypeList({ category: '05' });
|
|
|
if (this.$checkRes(res)) {
|
|
|
- let newRes = _.uniqBy(
|
|
|
- res.data.map(i => ({ name: i.company })),
|
|
|
- 'name'
|
|
|
- ).filter(
|
|
|
- i =>
|
|
|
- i.name != '中科院长春分院' &&
|
|
|
- i.name != '中科院长春光学精密机械与物理研究所' &&
|
|
|
- i.name != '中国科学院长春应用化学研究所' &&
|
|
|
- i.name != '吉林大学' &&
|
|
|
- i.name != '长春工业大学'
|
|
|
- );
|
|
|
- if (newRes) this.$set(this, `dropList`, newRes);
|
|
|
+ let newRes = res.data;
|
|
|
+ newRes.push({ name: '其他' });
|
|
|
+ this.$set(this, `dropList`, newRes);
|
|
|
}
|
|
|
// 专家工作单位
|
|
|
- res = await this.expertsuserList();
|
|
|
+ res = await this.markettypeList({ category: '06' });
|
|
|
if (this.$checkRes(res)) {
|
|
|
- let newRes = _.uniqBy(
|
|
|
- res.data.map(i => ({ name: i.company })),
|
|
|
- 'name'
|
|
|
- ).filter(
|
|
|
- i =>
|
|
|
- i.name != '中国科学院东北地理与农业生态研究所' &&
|
|
|
- i.name != '中国科学院长春应用化学研究所' &&
|
|
|
- i.name != '中科院长春光学精密机械与物理研究所' &&
|
|
|
- i.name != '吉林大学' &&
|
|
|
- i.name != '长春工业大学'
|
|
|
- );
|
|
|
- if (newRes) this.$set(this, `expertdropList`, newRes);
|
|
|
+ let newRes = res.data;
|
|
|
+ newRes.push({ name: '其他' });
|
|
|
+ this.$set(this, `expertdropList`, 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 {
|
|
|
- if (data) {
|
|
|
- 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);
|
|
|
- }
|
|
|
+ if (data) {
|
|
|
+ if (data == '中科系') {
|
|
|
+ let newRes = this.priAchieve.filter(
|
|
|
+ i =>
|
|
|
+ i.company == '中科院长春分院' ||
|
|
|
+ i.company == '中国科学院东北地理与农业生态研究所' ||
|
|
|
+ i.company == '中国科学院长春应用化学研究所' ||
|
|
|
+ i.company == '中科院长春光学精密机械与物理研究所'
|
|
|
+ );
|
|
|
+ this.$set(this, `achieveList`, newRes);
|
|
|
+ this.$set(this, `achieveTotal`, newRes.length);
|
|
|
+ } else if (data == '其他') {
|
|
|
+ let newRes = this.priAchieve.filter(
|
|
|
+ i =>
|
|
|
+ i.company != '中科院长春分院' &&
|
|
|
+ i.company != '中国科学院东北地理与农业生态研究所' &&
|
|
|
+ i.company != '中国科学院长春应用化学研究所' &&
|
|
|
+ i.company != '中科院长春光学精密机械与物理研究所' &&
|
|
|
+ i.company != '吉林大学' &&
|
|
|
+ i.company != '长春工业大学'
|
|
|
+ );
|
|
|
+ this.$set(this, `achieveList`, newRes);
|
|
|
+ this.$set(this, `achieveTotal`, newRes.length);
|
|
|
} else {
|
|
|
- let res = await this.productList({ type: '1', status: '1' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `achieveList`, res.data);
|
|
|
- this.$set(this, `achieveTotal`, res.total);
|
|
|
+ let newRes = this.priAchieve.filter(i => i.company == data);
|
|
|
+ if (newRes) {
|
|
|
+ this.$set(this, `achieveList`, newRes);
|
|
|
+ this.$set(this, `achieveTotal`, newRes.length);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.$set(this, `achieveList`, this.priAchieve);
|
|
|
+ this.$set(this, `achieveTotal`, this.priAchieve.length);
|
|
|
}
|
|
|
},
|
|
|
// 专家选择单位
|
|
|
async changeExpertCom(data) {
|
|
|
- if (data == '中科系') {
|
|
|
- let res = await this.expertsuserList({ company: '中国科学院东北地理与农业生态研究所' });
|
|
|
- let arr = await this.expertsuserList({ company: '中国科学院长春应用化学研究所' });
|
|
|
- let val = await this.expertsuserList({ company: '中科院长春光学精密机械与物理研究所' });
|
|
|
- if (res || arr || val) {
|
|
|
- var newData = res.data.concat(arr.data).concat(val.data);
|
|
|
- if (newData) {
|
|
|
- this.$set(this, `expertList`, newData);
|
|
|
- this.$set(this, `expertTotal`, newData.length);
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (data) {
|
|
|
- let res = await this.expertsuserList({ company: data });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `expertList`, res.data);
|
|
|
- this.$set(this, `expertTotal`, res.total);
|
|
|
- }
|
|
|
+ if (data) {
|
|
|
+ if (data == '中科系') {
|
|
|
+ let newRes = this.priExpert.filter(
|
|
|
+ i =>
|
|
|
+ i.company == '中科院长春分院' ||
|
|
|
+ i.company == '中国科学院东北地理与农业生态研究所' ||
|
|
|
+ i.company == '中国科学院长春应用化学研究所' ||
|
|
|
+ i.company == '中科院长春光学精密机械与物理研究所'
|
|
|
+ );
|
|
|
+ this.$set(this, `expertList`, newRes);
|
|
|
+ this.$set(this, `expertTotal`, newRes.length);
|
|
|
+ } else if (data == '其他') {
|
|
|
+ let newRes = this.priExpert.filter(
|
|
|
+ i =>
|
|
|
+ i.company != '中科院长春分院' &&
|
|
|
+ i.company != '中国科学院东北地理与农业生态研究所' &&
|
|
|
+ i.company != '中国科学院长春应用化学研究所' &&
|
|
|
+ i.company != '中科院长春光学精密机械与物理研究所' &&
|
|
|
+ i.company != '吉林大学' &&
|
|
|
+ i.company != '长春工业大学'
|
|
|
+ );
|
|
|
+ this.$set(this, `expertList`, newRes);
|
|
|
+ this.$set(this, `expertTotal`, newRes.length);
|
|
|
} else {
|
|
|
- let res = await this.expertsuserList();
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `expertList`, res.data);
|
|
|
- this.$set(this, `expertTotal`, res.total);
|
|
|
+ let newRes = this.priExpert.filter(i => i.company == data);
|
|
|
+ if (newRes) {
|
|
|
+ this.$set(this, `expertList`, newRes);
|
|
|
+ this.$set(this, `expertTotal`, newRes.length);
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.$set(this, `expertList`, this.priExpert);
|
|
|
+ this.$set(this, `expertTotal`, this.priExpert.legnth);
|
|
|
}
|
|
|
},
|
|
|
},
|