import Vue from 'vue'; import Vuex from 'vuex'; import _ from 'lodash'; Vue.use(Vuex); const api = { countInfo: `/api/market/count`, }; const state = () => ({}); const mutations = {}; const actions = { // e专利数据统计 async patentQuery({ commit }, { skip = 0, limit, ...info } = {}) { const res = await this.$axios.$get(`${api.countInfo}/patent`, { skip, limit, ...info, }); return res; }, // 技术成果数据统计-所属领域 async productQuery({ commit }, { skip = 0, limit, ...info } = {}) { const res = await this.$axios.$get(`${api.countInfo}/product`, { skip, limit, ...info, }); return res; }, // 专家数据统计-所属单位 async expertQuery({ commit }, { skip = 0, limit, ...info } = {}) { const res = await this.$axios.$get(`${api.countInfo}/expert`, { skip, limit, ...info, }); return res; }, // 统计数据 async circleQuery({ commit }, { skip = 0, limit, ...info } = {}) { const res = await this.$axios.$get(`${api.countInfo}/circle`, { skip, limit, ...info, }); return res; }, }; export default { namespaced: true, state, mutations, actions, };