diff --git a/src/api/model/common.js b/src/api/model/common.js index 47c5b0f5..61012f7d 100644 --- a/src/api/model/common.js +++ b/src/api/model/common.js @@ -3,14 +3,14 @@ import http from "@/utils/request" export default { upload: { - url: `${config.API_URL}/upload`, + url: `${config.API_URL}/file/`, name: "文件上传", post: async function(data, config={}){ return await http.post(this.url, data, config); } }, uploadFile: { - url: `${config.API_URL}/uploadFile`, + url: `${config.API_URL}/file/`, name: "附件上传", post: async function(data, config={}){ return await http.post(this.url, data, config); diff --git a/src/api/model/hrm.js b/src/api/model/hrm.js index 90dcd8e4..d9908d55 100644 --- a/src/api/model/hrm.js +++ b/src/api/model/hrm.js @@ -3,12 +3,15 @@ import http from "@/utils/request" export default { employee: { - list: { - url: `${config.API_URL}/hrm/employee/`, - name: "获取企业员工", - get: async function(data){ - return await http.get(this.url, data); - } + list: async function(data){ + return await http.get( + `${config.API_URL}/hrm/employee/`, + data); + }, + update: async function(id, data){ + return await http.put( + `${config.API_URL}/hrm/employee/${id}/`, + data); } }, } \ No newline at end of file diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index c1fcd76f..3fdaccfb 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -279,7 +279,7 @@ export default { Object.assign(reqData, this.tableParams); try { - var res = await this.apiObj.get(reqData); + var res = await this.apiObj(reqData); if (this.hidePagination) { this.tableData = res; if (res.length == 0) { diff --git a/src/views/hrm/employee.vue b/src/views/hrm/employee.vue index b7a9371e..6de9b7a3 100644 --- a/src/views/hrm/employee.vue +++ b/src/views/hrm/employee.vue @@ -14,7 +14,7 @@ - + diff --git a/src/views/hrm/ep_form.vue b/src/views/hrm/ep_form.vue index 2b861012..3fa3d437 100644 --- a/src/views/hrm/ep_form.vue +++ b/src/views/hrm/ep_form.vue @@ -1,181 +1,153 @@