From 0c66931154370517845665bb24d793e2f0e1fed8 Mon Sep 17 00:00:00 2001 From: TianyangZhang Date: Wed, 4 Mar 2026 15:39:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:gx-hrm-employee=20=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/hrm/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/hrm/views.py b/apps/hrm/views.py index 7bd5afc8..e59ae130 100755 --- a/apps/hrm/views.py +++ b/apps/hrm/views.py @@ -315,9 +315,8 @@ class EmployeeViewSet(CustomModelViewSet): myLogger = logging.getLogger('log') """导入excel""" file_path = request.data.get('file_path') - # if file_path: - # file_path = r"C:\Users\11825\Desktop\0303光芯花名册.xlsx" - abs_path = os.path.join(settings.BASE_DIR, file_path) + relative_path = file_path.lstrip('/') + abs_path = os.path.join(settings.BASE_DIR, relative_path) wb = load_workbook(abs_path, data_only=True) sheet = wb.active