text: import axios from 'axios'
  import ToolService from '@/api/com/pro/tool/toolService'
  import Parameter from '@/api/com/pro/tool/Parameter'
  
  const toolService = new ToolService()
  
  const url = '/pro/code/plugin/pk'
  
  const vourl = '/pro/code/plugin/pk/vo'
  
  export default {
    save: (pk) => {
      let parameter = new Parameter()
      parameter.action = toolService.save
      return axios.post(url + toolService.getUrl(parameter), pk, toolService.getConfig())
    },
    batchSave: (pkOrList) => {
      let parameter = new Parameter()
      parameter.action = toolService.batchSave
      if (pkOrList instanceof Array) {
        return axios.post(url + toolService.getUrl(parameter), pkOrList, toolService.getConfig())
      } else {
        return axios.post(url + toolService.getUrl(parameter), new Array(pkOrList), toolService.getConfig())
      }
    },
    update: (pk) => {
      let parameter = new Parameter()
      parameter.action = toolService.update
      return axios.put(url + toolService.getUrl(parameter), pk, toolService.getConfig())
    },
    batchUpdate: (pkOrList) => {
      let parameter = new Parameter()
      parameter.action = toolService.batchUpdate
      if (pkOrList instanceof Array) {
        return axios.put(url + toolService.getUrl(parameter), pkOrList, toolService.getConfig())
      } else {
        return axios.put(url + toolService.getUrl(parameter), new Array(pkOrList), toolService.getConfig())
      }
    },
    remove: (pk) => {
      let parameter = new Parameter()
      parameter.action = toolService.remove
      return axios.delete(url + toolService.getUrl(parameter), toolService.getConfig(pk))
    },
    batchRemove: (pkOrList) => {
      let parameter = new Parameter()
      parameter.action = toolService.batchRemove
      if (pkOrList instanceof Array) {
        return axios.delete(url + toolService.getUrl(parameter), toolService.getConfig(pkOrList))
      } else {
        return axios.delete(url + toolService.getUrl(parameter), toolService.getConfig(new Array(pkOrList)))
      }
    },
    getByPk: (primaryKey) => {
      let parameter = new Parameter()
      parameter.action = toolService.getByPk
      parameter.primaryKey = primaryKey
      return axios.get(url + toolService.getUrl(parameter), toolService.getConfig())
    },
    getAll: () => {
      let parameter = new Parameter()
      parameter.action = toolService.getAll
      return axios.post(url + toolService.getUrl(parameter), toolService.getConfig())
    },
    paging: (rows, page) => {
      let parameter = new Parameter()
      parameter.action = toolService.paging
      return axios.post(url + toolService.getPagingUrl(parameter, rows, page), toolService.getConfig())
    },
    query: (pkQuery) => {
      let parameter = new Parameter()
      parameter.action = toolService.getAll
      return axios.post(url + toolService.getUrl(parameter), pkQuery, toolService.getConfig())
    },
    pagingQuery: (pkQuery, rows, page) => {
      let parameter = new Parameter()
      parameter.action = toolService.paging
      return axios.post(url + toolService.getPagingUrl(parameter, rows, page), pkQuery, toolService.getConfig())
    },
    getVOByPk: (primaryKey) => {
      let parameter = new Parameter()
      parameter.action = toolService.getVOByPk
      parameter.primaryKey = primaryKey
      return axios.get(url + toolService.getUrl(parameter), toolService.getConfig())
    },
    getAllVO: () => {
      let parameter = new Parameter()
      parameter.action = toolService.getAllVO
      return axios.post(vourl + toolService.getUrl(parameter), toolService.getConfig())
    },
    pagingVO: (rows, page) => {
      let parameter = new Parameter()
      parameter.action = toolService.pagingVO
      return axios.post(vourl + toolService.getPagingUrl(parameter, rows, page), toolService.getConfig())
    },
    queryVO: (pkQuery) => {
      let parameter = new Parameter()
      parameter.action = toolService.getAllVO
      return axios.post(vourl + toolService.getUrl(parameter), pkQuery, toolService.getConfig())
    },
    pagingQueryVO: (pkQuery, rows, page) => {
      let parameter = new Parameter()
      parameter.action = toolService.pagingVO
      return axios.post(vourl + toolService.getPagingUrl(parameter, rows, page), pkQuery, toolService.getConfig())
    }
  }
  