From e156c3fc8e4c6378858b9afbb287d188f51c37d2 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Tue, 17 Aug 2021 09:49:54 +0800 Subject: [PATCH] ss --- hb_client/.env.development | 4 +- hb_client/src/api/employee.js | 16 ++ hb_client/src/api/util.js | 9 + hb_client/src/router/index.js | 8 + hb_client/src/views/system/user.vue | 7 +- hb_client/src/views/system/userupdate.vue | 242 ++++++++++++++++++++++ 6 files changed, 279 insertions(+), 7 deletions(-) create mode 100644 hb_client/src/api/employee.js create mode 100644 hb_client/src/api/util.js create mode 100644 hb_client/src/views/system/userupdate.vue diff --git a/hb_client/.env.development b/hb_client/.env.development index f0aff47..db8f2e7 100644 --- a/hb_client/.env.development +++ b/hb_client/.env.development @@ -2,7 +2,9 @@ ENV = 'development' # base api -VUE_APP_BASE_API = 'http://localhost:8000/api' +#VUE_APP_BASE_API = 'http://localhost:8000/api' +VUE_APP_BASE_API = 'http://47.95.0.242:2222/api' + # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, # to control whether the babel-plugin-dynamic-import-node plugin is enabled. diff --git a/hb_client/src/api/employee.js b/hb_client/src/api/employee.js new file mode 100644 index 0000000..16ba451 --- /dev/null +++ b/hb_client/src/api/employee.js @@ -0,0 +1,16 @@ +import request from '@/utils/request' + + +export function getEmployee(id) { + return request({ + url: `/hrm/employee/${id}/`, + method: 'get' + }) +} +export function updateEmployee(id, data) { + return request({ + url: `/hrm/employee/${id}/`, + method: 'put', + data + }) +} \ No newline at end of file diff --git a/hb_client/src/api/util.js b/hb_client/src/api/util.js new file mode 100644 index 0000000..872cfe8 --- /dev/null +++ b/hb_client/src/api/util.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function genSignature(data) { + return request({ + url: '/utils/signature/', + method: 'post', + data + }) +} diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js index 3991778..c0f8b2e 100644 --- a/hb_client/src/router/index.js +++ b/hb_client/src/router/index.js @@ -123,6 +123,14 @@ export const asyncRoutes = [ name: 'User', component: () => import('@/views/system/user.vue'), meta: { title: '用户管理', icon: 'user', perms: ['user_manage'] } + } + , + { + path: 'userupdate', + name: 'userupdate', + component: () => import('@/views/system/userupdate'), + meta: { title: '人员信息详情', icon: 'employee', perms: ['employee_detail'] }, + hidden: true }, { path: 'organization', diff --git a/hb_client/src/views/system/user.vue b/hb_client/src/views/system/user.vue index 6e33e4d..af18416 100644 --- a/hb_client/src/views/system/user.vue +++ b/hb_client/src/views/system/user.vue @@ -320,12 +320,7 @@ export default { }); }, handleEdit(scope) { - this.user = Object.assign({}, scope.row); // copy obj - this.dialogType = "edit"; - this.dialogVisible = true; - this.$nextTick(() => { - this.$refs["Form"].clearValidate(); - }); + this.$router.push({name:"userupdate",params:{id:scope.row.employee_user}}) }, handleDelete(scope) { this.$confirm("确认删除?", "警告", { diff --git a/hb_client/src/views/system/userupdate.vue b/hb_client/src/views/system/userupdate.vue new file mode 100644 index 0000000..5c6a186 --- /dev/null +++ b/hb_client/src/views/system/userupdate.vue @@ -0,0 +1,242 @@ + + + \ No newline at end of file