count.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import Vue from 'vue';
  2. import Vuex from 'vuex';
  3. import _ from 'lodash';
  4. Vue.use(Vuex);
  5. const api = {
  6. countInfo: `/api/market/count`,
  7. };
  8. const state = () => ({});
  9. const mutations = {};
  10. const actions = {
  11. // e专利数据统计
  12. async patentQuery({ commit }, { skip = 0, limit, ...info } = {}) {
  13. const res = await this.$axios.$get(`${api.countInfo}/patent`, {
  14. skip,
  15. limit,
  16. ...info,
  17. });
  18. return res;
  19. },
  20. // 技术成果数据统计-所属领域
  21. async productQuery({ commit }, { skip = 0, limit, ...info } = {}) {
  22. const res = await this.$axios.$get(`${api.countInfo}/product`, {
  23. skip,
  24. limit,
  25. ...info,
  26. });
  27. return res;
  28. },
  29. // 专家数据统计-所属单位
  30. async expertQuery({ commit }, { skip = 0, limit, ...info } = {}) {
  31. const res = await this.$axios.$get(`${api.countInfo}/expert`, {
  32. skip,
  33. limit,
  34. ...info,
  35. });
  36. return res;
  37. },
  38. // 统计数据
  39. async circleQuery({ commit }, { skip = 0, limit, ...info } = {}) {
  40. const res = await this.$axios.$get(`${api.countInfo}/circle`, {
  41. skip,
  42. limit,
  43. ...info,
  44. });
  45. return res;
  46. },
  47. };
  48. export default {
  49. namespaced: true,
  50. state,
  51. mutations,
  52. actions,
  53. };