IndexTemplateAPI.js 2.41 KB
Newer Older
YazhouChen's avatar
YazhouChen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
import Axios from 'axios'

import {
  REQUEST_CONFIG,
  INDEX_TEMPLATE_ADMQ, INDEX_TEMPLATE_QUERY, INDEX_TEMPLATE_TOTAL, PERFORM_TASK_QUERY
} from '../../utils/RequestUrls'
var staticMethods = {
  /**
   * @Description  : huoqusuoyou
   * @author       : ls
   * @date         : 2020/4/26 15:10
   * @param        :
   * @return       :
   */
  getIndexTemplateCollection: function () {
    return Axios.get(INDEX_TEMPLATE_ADMQ)
  },

  /**
   * @Description  : 添加指标模板
   * @author       : ls
   * @date         : 2020/4/27 9:45
   * @param        :
   * @return       :
   */
  postAddIndexTemplate: function (indexT) {
    return Axios.post(INDEX_TEMPLATE_ADMQ, indexT, REQUEST_CONFIG)
  },

  /**
   * @Description  : shanchu
   * @author       : ls
   * @date         : 2020/4/27 9:55
   * @param        :
   * @return       :
   */
  deleteDeleteIndexTemplate: function (keyList) {
    return Axios.delete(INDEX_TEMPLATE_ADMQ, {
      data: keyList,
      headers: {'Content-Type': 'application/json', 'Encoding': 'utf-8'}
    })
  },

  /**
   * @Description  : 修改指标模板
   * @author       : ls
   * @date         : 2020/4/27 17:05
   * @param        :
   * @return       :
   */
  putModifyIndexTemplate: function (indexT) {
    return Axios.put(INDEX_TEMPLATE_ADMQ, indexT, REQUEST_CONFIG)
  },

  /**
   * @Description  : 条件查询
   * @author       : ls
   * @date         : 2020/4/27 10:33
   * @param        :
   * @return       :
   */
  putConditionQueryIndexTemplate: function (conditionSet) {
    return Axios.put(INDEX_TEMPLATE_QUERY, conditionSet, REQUEST_CONFIG)
  },
  /**
   * @Description  : 总数
   * @author       : ls
   * @date         : 2020/6/10 15:54
   * @param        :
   * @return       :
   */
  getIndexTemplateCounts: function (conditionSet) {
    return Axios.put(INDEX_TEMPLATE_TOTAL, conditionSet, REQUEST_CONFIG)
  },
  /**
   * @Description  : 分页
   * @author       : ls
   * @date         : 2020/6/10 16:03
   * @param        :
   * @return       :
   */
  queryIndexTemplatePaging: function (beginItem, endItem, selectList) {
    return Axios.put(INDEX_TEMPLATE_QUERY + '/' + beginItem + '/' + endItem + '/', selectList, REQUEST_CONFIG)
  }
}

function IndexTemplateAPI () {
  return Object.freeze(Object.assign(
    {
      // object methods comes here
    },
    staticMethods
  ))
}
// inject static methods
Object.assign(IndexTemplateAPI, staticMethods)
export default IndexTemplateAPI