|
@@ -8,13 +8,13 @@ import { stringify } from 'qs'
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
export function getToolPage (parameter) {
|
|
|
- return axios({
|
|
|
- url: '/tool/tools/page?' + stringify(parameter),
|
|
|
- method: 'get',
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
- }
|
|
|
- })
|
|
|
+ return axios({
|
|
|
+ url: '/tool/tools/page?' + stringify(parameter),
|
|
|
+ method: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -24,15 +24,15 @@ export function getToolPage (parameter) {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
export function addTool (parameter) {
|
|
|
- return axios({
|
|
|
- url: '/tool/tools',
|
|
|
- method: 'POST',
|
|
|
- headers: {
|
|
|
- 'Accept': 'application/json',
|
|
|
- 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
- },
|
|
|
- data: parameter
|
|
|
- })
|
|
|
+ return axios({
|
|
|
+ url: '/tool/tools',
|
|
|
+ method: 'POST',
|
|
|
+ headers: {
|
|
|
+ 'Accept': 'application/json',
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ },
|
|
|
+ data: parameter
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -42,14 +42,13 @@ export function addTool (parameter) {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
export function updateTool (parameter) {
|
|
|
- return axios({
|
|
|
- url: '/tool/tools/' + parameter.id,
|
|
|
- method: 'PUT',
|
|
|
- data: parameter
|
|
|
- })
|
|
|
+ return axios({
|
|
|
+ url: '/tool/tools/' + parameter.id,
|
|
|
+ method: 'PUT',
|
|
|
+ data: parameter
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* fetch single func
|
|
|
* parameter: { }
|
|
@@ -57,13 +56,13 @@ export function updateTool (parameter) {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
export function fetchTool (parameter) {
|
|
|
- return axios({
|
|
|
- url: '/tool/tools/' + parameter.id,
|
|
|
- method: 'get',
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
- }
|
|
|
- })
|
|
|
+ return axios({
|
|
|
+ url: '/tool/tools/' + parameter.id,
|
|
|
+ method: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -73,13 +72,13 @@ export function fetchTool (parameter) {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
export function queryTool (parameter) {
|
|
|
- return axios({
|
|
|
- url: '/tool/tools?' + stringify(parameter),
|
|
|
- method: 'get',
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
- }
|
|
|
- })
|
|
|
+ return axios({
|
|
|
+ url: '/tool/tools?' + stringify(parameter),
|
|
|
+ method: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -89,11 +88,11 @@ export function queryTool (parameter) {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
export function deleteTools (parameter) {
|
|
|
- return axios({
|
|
|
- url: '/tool/tools',
|
|
|
- method: 'DELETE',
|
|
|
- data: parameter
|
|
|
- })
|
|
|
+ return axios({
|
|
|
+ url: '/tool/tools',
|
|
|
+ method: 'DELETE',
|
|
|
+ data: parameter
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -103,14 +102,13 @@ export function deleteTools (parameter) {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
export function deleteTool (parameter) {
|
|
|
- return axios({
|
|
|
- url: '/tool/tools/' + parameter.id,
|
|
|
- method: 'DELETE',
|
|
|
- data: parameter
|
|
|
- })
|
|
|
+ return axios({
|
|
|
+ url: '/tool/tools/' + parameter.id,
|
|
|
+ method: 'DELETE',
|
|
|
+ data: parameter
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* export file
|
|
|
* parameter: { }
|
|
@@ -118,12 +116,12 @@ export function deleteTool (parameter) {
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
export function exportTool (parameter) {
|
|
|
- return axios({
|
|
|
- url: '/tool/tools/export?' + stringify(parameter),
|
|
|
- method: 'get',
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
- },
|
|
|
- responseType: 'blob'
|
|
|
- })
|
|
|
+ return axios({
|
|
|
+ url: '/tool/tools/export?' + stringify(parameter),
|
|
|
+ method: 'get',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
+ },
|
|
|
+ responseType: 'blob'
|
|
|
+ })
|
|
|
}
|