From 611dd8268e40caa4d97e8954b85b5adaaef99afa Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 26 十月 2026 17:45:58 +0800
Subject: [PATCH] feat(hrm): 考勤规则支持地图定位打卡
---
src/views/hrm/employee/modules/form.vue | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/views/hrm/employee/modules/form.vue b/src/views/hrm/employee/modules/form.vue
index 0cd7c0d..dbae5ef 100644
--- a/src/views/hrm/employee/modules/form.vue
+++ b/src/views/hrm/employee/modules/form.vue
@@ -16,7 +16,6 @@
import EducationList from './education-list.vue';
import WorkHistoryList from './work-history-list.vue';
import EmergencyContactList from './emergency-contact-list.vue';
-import SocialSecurityList from './social-security-list.vue';
import EmployeeDetail from './detail.vue';
const emit = defineEmits(['success']);
@@ -30,7 +29,6 @@
const educationListRef = ref<InstanceType<typeof EducationList>>();
const workHistoryListRef = ref<InstanceType<typeof WorkHistoryList>>();
const emergencyContactListRef = ref<InstanceType<typeof EmergencyContactList>>();
-const socialSecurityListRef = ref<InstanceType<typeof SocialSecurityList>>();
const isDetail = computed(() => formType.value === 'detail');
const getTitle = computed(() => {
@@ -68,6 +66,10 @@
// 鎻愪氦琛ㄥ崟
const data = (await formApi.getValues()) as HrmEmployeeApi.Employee;
data.remark = remark.value;
+ // 闄勪欢锛氭妸 FileUpload 鐨勫�艰浆鎴� blobId 鏁扮粍
+ if (Array.isArray(data.blobIds)) {
+ data.blobIds = (data.blobIds as any[]).map((item) => item?.id ?? item);
+ }
// 鑾峰彇瀛愯〃鏁版嵁
data.educations = educationListRef.value?.getData();
data.workHistories = workHistoryListRef.value?.getData();
@@ -113,7 +115,14 @@
employeeData.value = formData;
remark.value = formData.remark;
if (data.formType !== 'detail') {
- await formApi.setValues(formData);
+ const blobIds = (formData.attachmentList || []).map((item) => ({
+ uid: String(item.id),
+ name: item.name || '',
+ url: item.url || '',
+ status: 'done',
+ id: item.id,
+ }));
+ await formApi.setValues({ ...formData, blobIds });
}
} finally {
modalApi.unlock();
@@ -153,14 +162,6 @@
ref="emergencyContactListRef"
:form-type="formType"
:employee-id="employeeId"
- />
- </Tabs.TabPane>
- <Tabs.TabPane key="socialSecurity" tab="绀句繚鍏Н閲戞。妗�" v-if="employeeId">
- <SocialSecurityList
- ref="socialSecurityListRef"
- :form-type="formType"
- :employee-id="employeeId"
- :user-id="employeeData?.userId"
/>
</Tabs.TabPane>
</Tabs>
--
Gitblit v1.9.3