From 64cd24b079ec15ea5c9be7360060e7b34eb3d8bd Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期三, 21 一月 2026 17:48:46 +0800
Subject: [PATCH] 在入职管理、离职管理和用印管理中新增附件上传功能

---
 src/views/personnelManagement/dimission/components/formDia.vue |    4 
 src/views/collaborativeApproval/sealManagement/filesDia.vue    |  207 +++++++++++++++
 src/api/collaborativeApproval/sealManagement.js                |   25 +
 src/api/personnelManagement/onboarding.js                      |   24 +
 src/views/personnelManagement/dimission/filesDia.vue           |  207 +++++++++++++++
 src/views/personnelManagement/dimission/index.vue              |   18 +
 src/views/personnelManagement/onboarding/filesDia.vue          |  207 +++++++++++++++
 src/views/collaborativeApproval/sealManagement/index.vue       |   12 
 src/views/personnelManagement/onboarding/index.vue             |   18 +
 9 files changed, 721 insertions(+), 1 deletions(-)

diff --git a/src/api/collaborativeApproval/sealManagement.js b/src/api/collaborativeApproval/sealManagement.js
index cb990b3..fb4068c 100644
--- a/src/api/collaborativeApproval/sealManagement.js
+++ b/src/api/collaborativeApproval/sealManagement.js
@@ -114,3 +114,28 @@
   });
 }
 
+
+// 鏌ヨ鐢ㄥ嵃绠$悊闄勪欢鍒楄〃
+export function fileListPage(query) {
+    return request({
+        url: "/sealApplicationManagement/listPageSealApplicationManagementFile",
+        method: "get",
+        params: query,
+    });
+}
+// 淇濆瓨鐢ㄥ嵃绠$悊闄勪欢
+export function fileAdd(query) {
+    return request({
+        url: "/sealApplicationManagement/addSealApplicationManagementFile",
+        method: "post",
+        data: query,
+    });
+}
+// 鍒犻櫎鐢ㄥ嵃绠$悊闄勪欢
+export function fileDel(query) {
+    return request({
+        url: "/sealApplicationManagement/delSealApplicationManagementFile",
+        method: "delete",
+        data: query,
+    });
+}
diff --git a/src/api/personnelManagement/onboarding.js b/src/api/personnelManagement/onboarding.js
index 39dbf22..f3dc6ee 100644
--- a/src/api/personnelManagement/onboarding.js
+++ b/src/api/personnelManagement/onboarding.js
@@ -47,3 +47,27 @@
     method: "get",
   });
 }
+// 鏌ヨ鍏ヨ亴/绂昏亴闄勪欢鍒楄〃
+export function fileListPage(query) {
+    return request({
+        url: "/staff/staffJoinLeaveRecord/listPageFile",
+        method: "get",
+        params: query,
+    });
+}
+// 淇濆瓨鍏ヨ亴/绂昏亴闄勪欢
+export function fileAdd(query) {
+    return request({
+        url: "/staff/staffJoinLeaveRecord/addFile",
+        method: "post",
+        data: query,
+    });
+}
+// 鍒犻櫎鍏ヨ亴/绂昏亴闄勪欢
+export function fileDel(query) {
+    return request({
+        url: "/staff/staffJoinLeaveRecord/delFile",
+        method: "delete",
+        data: query,
+    });
+}
diff --git a/src/views/collaborativeApproval/sealManagement/filesDia.vue b/src/views/collaborativeApproval/sealManagement/filesDia.vue
new file mode 100644
index 0000000..f655d7d
--- /dev/null
+++ b/src/views/collaborativeApproval/sealManagement/filesDia.vue
@@ -0,0 +1,207 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="涓婁紶闄勪欢"
+        width="50%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-upload
+            v-model:file-list="fileList"
+            class="upload-demo"
+            :action="uploadUrl"
+            :on-success="handleUploadSuccess"
+            :on-error="handleUploadError"
+            name="file"
+            :show-file-list="false"
+            :headers="headers"
+            style="display: inline;margin-right: 10px"
+        >
+          <el-button type="primary">涓婁紶闄勪欢</el-button>
+        </el-upload>
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="500"
+          @pagination-change="paginationSearch"
+          :total="total"
+          :page="page.current"
+          :limit="page.size"
+        >
+      >
+      </PIMTable>
+			<pagination
+				style="margin: 10px 0"
+				v-show="total > 0"
+				@pagination="paginationSearch"
+				:total="total"
+				:page="page.current"
+				:limit="page.size"
+			/>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+    <filePreview ref="filePreviewRef" />
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {ElMessageBox} from "element-plus";
+import {getToken} from "@/utils/auth.js";
+import filePreview from '@/components/filePreview/index.vue'
+import {
+  fileAdd,
+  fileDel,
+  fileListPage
+} from "@/api/collaborativeApproval/sealManagement.js";
+import Pagination from "@/components/PIMTable/Pagination.vue";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const currentId = ref('')
+const selectedRows = ref([]);
+const filePreviewRef = ref()
+const tableColumn = ref([
+  {
+    label: "鏂囦欢鍚嶇О",
+    prop: "name",
+  },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    operation: [
+      {
+        name: "涓嬭浇",
+        type: "text",
+        clickFun: (row) => {
+          downLoadFile(row);
+        },
+      },
+      {
+        name: "棰勮",
+        type: "text",
+        clickFun: (row) => {
+          lookFile(row);
+        },
+      }
+    ],
+  },
+]);
+const page = reactive({
+	current: 1,
+	size: 100,
+});
+const total = ref(0);
+const tableData = ref([]);
+const fileList = ref([]);
+const tableLoading = ref(false);
+const accountType = ref('')
+const headers = ref({
+  Authorization: "Bearer " + getToken(),
+});
+const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/file/upload"); // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
+
+// 鎵撳紑寮规
+const openDialog = (row,type) => {
+  accountType.value = type;
+  dialogFormVisible.value = true;
+  currentId.value = row.id;
+  getList()
+}
+const paginationSearch = (obj) => {
+	page.current = obj.page;
+	page.size = obj.limit;
+	getList();
+};
+const getList = () => {
+  fileListPage({sealApplicationManagementId: currentId.value, ...page}).then(res => {
+    tableData.value = res.data.records;
+		total.value = res.data.total;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 涓婁紶鎴愬姛澶勭悊
+function handleUploadSuccess(res, file) {
+  // 濡傛灉涓婁紶鎴愬姛
+  if (res.code == 200) {
+    const fileRow = {}
+    fileRow.name = res.data.originalName
+    fileRow.url = res.data.tempPath
+    uploadFile(fileRow)
+  } else {
+    proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+  }
+}
+function uploadFile(file) {
+  file.sealApplicationManagementId = currentId.value;
+  file.accountType = accountType.value;
+  fileAdd(file).then(res => {
+    proxy.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛");
+    getList()
+  })
+}
+// 涓婁紶澶辫触澶勭悊
+function handleUploadError() {
+  proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+}
+// 涓嬭浇闄勪欢
+const downLoadFile = (row) => {
+  proxy.$download.name(row.url);
+}
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  }).then(() => {
+    fileDel(ids).then((res) => {
+      proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      getList();
+    });
+  }).catch(() => {
+    proxy.$modal.msg("宸插彇娑�");
+  });
+};
+// 棰勮闄勪欢
+const lookFile = (row) => {
+  filePreviewRef.value.open(row.url)
+}
+
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index 88d33dc..5f96247 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -53,6 +53,7 @@
               <el-table-column label="鎿嶄綔" width="200" fixed="right">
                 <template #default="scope">
                   <el-button link @click="viewSealDetail(scope.row)">鏌ョ湅</el-button>
+                  <el-button link type="warning" @click="openFilesFormDia(scope.row)">闄勪欢</el-button>
                   <el-button 
                     v-if="scope.row.status === 'pending'"
 										link
@@ -236,6 +237,7 @@
         </el-table-column>
       </el-table>
     </el-dialog>
+    <files-dia ref="filesDia"></files-dia>
   </div>
 </template>
 
@@ -249,12 +251,13 @@
 import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
 import useUserStore from '@/store/modules/user'
 import { userLoginFacotryList } from "@/api/system/user.js"
-
+import FilesDia from "./filesDia.vue";
 // 鍝嶅簲寮忔暟鎹�
 const currentUser = ref(null)
 const activeTab = ref('seal')
 const operationType = ref('add')
 const tableData = ref([])
+const filesDia = ref()
 // 鐢ㄥ嵃鐢宠鐩稿叧
 const userStore = useUserStore()
 const showSealApplyDialog = ref(false)
@@ -432,6 +435,13 @@
     ElMessage.error('璇峰畬鍠勭敵璇蜂俊鎭�')
   }
 }
+// 鎵撳紑闄勪欢寮规
+const openFilesFormDia = (row) => {
+  console.log(row)
+  nextTick(() => {
+    filesDia.value?.openDialog( row,'鐢ㄥ嵃绠$悊')
+  })
+};
 // 鏂板
 const handleAdd = () => {
   operationType.value = 'add'
diff --git a/src/views/personnelManagement/dimission/components/formDia.vue b/src/views/personnelManagement/dimission/components/formDia.vue
index 48425ea..132d8ed 100644
--- a/src/views/personnelManagement/dimission/components/formDia.vue
+++ b/src/views/personnelManagement/dimission/components/formDia.vue
@@ -187,6 +187,7 @@
     firstStudy: "",
     profession: "",
     age: 0,
+    medical: "",
     phone: "",
     emergencyContact: "",
     emergencyContactPhone: "",
@@ -249,6 +250,7 @@
     firstStudy: "",
     profession: "",
     age: 0,
+    medical: "",
     phone: "",
     emergencyContact: "",
     emergencyContactPhone: "",
@@ -291,6 +293,7 @@
       firstStudy,
       profession,
       age,
+      medical,
       emergencyContact,
       emergencyContactPhone,
       contractTerm,
@@ -310,6 +313,7 @@
       firstStudy,
       profession,
       age,
+      medical,
       emergencyContact,
       emergencyContactPhone,
       contractTerm,
diff --git a/src/views/personnelManagement/dimission/filesDia.vue b/src/views/personnelManagement/dimission/filesDia.vue
new file mode 100644
index 0000000..e706fee
--- /dev/null
+++ b/src/views/personnelManagement/dimission/filesDia.vue
@@ -0,0 +1,207 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="涓婁紶闄勪欢"
+        width="50%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-upload
+            v-model:file-list="fileList"
+            class="upload-demo"
+            :action="uploadUrl"
+            :on-success="handleUploadSuccess"
+            :on-error="handleUploadError"
+            name="file"
+            :show-file-list="false"
+            :headers="headers"
+            style="display: inline;margin-right: 10px"
+        >
+          <el-button type="primary">涓婁紶闄勪欢</el-button>
+        </el-upload>
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="500"
+          @pagination-change="paginationSearch"
+          :total="total"
+          :page="page.current"
+          :limit="page.size"
+        >
+      >
+      </PIMTable>
+			<pagination
+				style="margin: 10px 0"
+				v-show="total > 0"
+				@pagination="paginationSearch"
+				:total="total"
+				:page="page.current"
+				:limit="page.size"
+			/>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+    <filePreview ref="filePreviewRef" />
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {ElMessageBox} from "element-plus";
+import {getToken} from "@/utils/auth.js";
+import filePreview from '@/components/filePreview/index.vue'
+import {
+  fileAdd,
+  fileDel,
+  fileListPage
+} from "@/api/personnelManagement/onboarding.js";
+import Pagination from "@/components/PIMTable/Pagination.vue";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const currentId = ref('')
+const selectedRows = ref([]);
+const filePreviewRef = ref()
+const tableColumn = ref([
+  {
+    label: "鏂囦欢鍚嶇О",
+    prop: "name",
+  },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    operation: [
+      {
+        name: "涓嬭浇",
+        type: "text",
+        clickFun: (row) => {
+          downLoadFile(row);
+        },
+      },
+      {
+        name: "棰勮",
+        type: "text",
+        clickFun: (row) => {
+          lookFile(row);
+        },
+      }
+    ],
+  },
+]);
+const page = reactive({
+	current: 1,
+	size: 100,
+});
+const total = ref(0);
+const tableData = ref([]);
+const fileList = ref([]);
+const tableLoading = ref(false);
+const accountType = ref('')
+const headers = ref({
+  Authorization: "Bearer " + getToken(),
+});
+const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/file/upload"); // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
+
+// 鎵撳紑寮规
+const openDialog = (row,type) => {
+  accountType.value = type;
+  dialogFormVisible.value = true;
+  currentId.value = row.id;
+  getList()
+}
+const paginationSearch = (obj) => {
+	page.current = obj.page;
+	page.size = obj.limit;
+	getList();
+};
+const getList = () => {
+  fileListPage({staffJoinLeaveRecordId: currentId.value, ...page}).then(res => {
+    tableData.value = res.data.records;
+		total.value = res.data.total;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 涓婁紶鎴愬姛澶勭悊
+function handleUploadSuccess(res, file) {
+  // 濡傛灉涓婁紶鎴愬姛
+  if (res.code == 200) {
+    const fileRow = {}
+    fileRow.name = res.data.originalName
+    fileRow.url = res.data.tempPath
+    uploadFile(fileRow)
+  } else {
+    proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+  }
+}
+function uploadFile(file) {
+  file.staffJoinLeaveRecordId = currentId.value;
+  file.accountType = accountType.value;
+  fileAdd(file).then(res => {
+    proxy.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛");
+    getList()
+  })
+}
+// 涓婁紶澶辫触澶勭悊
+function handleUploadError() {
+  proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+}
+// 涓嬭浇闄勪欢
+const downLoadFile = (row) => {
+  proxy.$download.name(row.url);
+}
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  }).then(() => {
+    fileDel(ids).then((res) => {
+      proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      getList();
+    });
+  }).catch(() => {
+    proxy.$modal.msg("宸插彇娑�");
+  });
+};
+// 棰勮闄勪欢
+const lookFile = (row) => {
+  filePreviewRef.value.open(row.url)
+}
+
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/personnelManagement/dimission/index.vue b/src/views/personnelManagement/dimission/index.vue
index 5780e5e..247a96c 100644
--- a/src/views/personnelManagement/dimission/index.vue
+++ b/src/views/personnelManagement/dimission/index.vue
@@ -51,6 +51,7 @@
       ></PIMTable>
     </div>
     <form-dia ref="formDia" @close="handleQuery"></form-dia>
+    <files-dia ref="filesDia"></files-dia>
   </div>
 </template>
 
@@ -61,6 +62,7 @@
 import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
 import {ElMessageBox} from "element-plus";
 import dayjs from "dayjs";
+import FilesDia from "./filesDia.vue";
 
 const data = reactive({
   searchForm: {
@@ -170,12 +172,20 @@
     dataType: "action",
     label: "鎿嶄綔",
     align: "center",
+    width: 120,
     operation: [
       {
         name: "缂栬緫",
         type: "text",
         clickFun: (row) => {
           openForm("edit", row);
+        },
+      },
+      {
+        name: "闄勪欢",
+        type: "text",
+        clickFun: (row) => {
+          openFilesFormDia(row);
         },
       },
     ],
@@ -190,6 +200,7 @@
   total: 0,
 });
 const formDia = ref()
+const filesDia = ref()
 const { proxy } = getCurrentInstance()
 
 
@@ -207,6 +218,13 @@
   }
   getList();
 };
+// 鎵撳紑闄勪欢寮规
+const openFilesFormDia = (row) => {
+  console.log(row)
+  nextTick(() => {
+    filesDia.value?.openDialog( row,'鍚堝悓')
+  })
+};
 // 鏌ヨ鍒楄〃
 /** 鎼滅储鎸夐挳鎿嶄綔 */
 const handleQuery = () => {
diff --git a/src/views/personnelManagement/onboarding/filesDia.vue b/src/views/personnelManagement/onboarding/filesDia.vue
new file mode 100644
index 0000000..e706fee
--- /dev/null
+++ b/src/views/personnelManagement/onboarding/filesDia.vue
@@ -0,0 +1,207 @@
+<template>
+  <div>
+    <el-dialog
+        v-model="dialogFormVisible"
+        title="涓婁紶闄勪欢"
+        width="50%"
+        @close="closeDia"
+    >
+      <div style="margin-bottom: 10px;text-align: right">
+        <el-upload
+            v-model:file-list="fileList"
+            class="upload-demo"
+            :action="uploadUrl"
+            :on-success="handleUploadSuccess"
+            :on-error="handleUploadError"
+            name="file"
+            :show-file-list="false"
+            :headers="headers"
+            style="display: inline;margin-right: 10px"
+        >
+          <el-button type="primary">涓婁紶闄勪欢</el-button>
+        </el-upload>
+        <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+      <PIMTable
+          rowKey="id"
+          :column="tableColumn"
+          :tableData="tableData"
+          :tableLoading="tableLoading"
+          :isSelection="true"
+          @selection-change="handleSelectionChange"
+          height="500"
+          @pagination-change="paginationSearch"
+          :total="total"
+          :page="page.current"
+          :limit="page.size"
+        >
+      >
+      </PIMTable>
+			<pagination
+				style="margin: 10px 0"
+				v-show="total > 0"
+				@pagination="paginationSearch"
+				:total="total"
+				:page="page.current"
+				:limit="page.size"
+			/>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
+    <filePreview ref="filePreviewRef" />
+  </div>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {ElMessageBox} from "element-plus";
+import {getToken} from "@/utils/auth.js";
+import filePreview from '@/components/filePreview/index.vue'
+import {
+  fileAdd,
+  fileDel,
+  fileListPage
+} from "@/api/personnelManagement/onboarding.js";
+import Pagination from "@/components/PIMTable/Pagination.vue";
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['close'])
+
+const dialogFormVisible = ref(false);
+const currentId = ref('')
+const selectedRows = ref([]);
+const filePreviewRef = ref()
+const tableColumn = ref([
+  {
+    label: "鏂囦欢鍚嶇О",
+    prop: "name",
+  },
+  {
+    dataType: "action",
+    label: "鎿嶄綔",
+    align: "center",
+    operation: [
+      {
+        name: "涓嬭浇",
+        type: "text",
+        clickFun: (row) => {
+          downLoadFile(row);
+        },
+      },
+      {
+        name: "棰勮",
+        type: "text",
+        clickFun: (row) => {
+          lookFile(row);
+        },
+      }
+    ],
+  },
+]);
+const page = reactive({
+	current: 1,
+	size: 100,
+});
+const total = ref(0);
+const tableData = ref([]);
+const fileList = ref([]);
+const tableLoading = ref(false);
+const accountType = ref('')
+const headers = ref({
+  Authorization: "Bearer " + getToken(),
+});
+const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/file/upload"); // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃
+
+// 鎵撳紑寮规
+const openDialog = (row,type) => {
+  accountType.value = type;
+  dialogFormVisible.value = true;
+  currentId.value = row.id;
+  getList()
+}
+const paginationSearch = (obj) => {
+	page.current = obj.page;
+	page.size = obj.limit;
+	getList();
+};
+const getList = () => {
+  fileListPage({staffJoinLeaveRecordId: currentId.value, ...page}).then(res => {
+    tableData.value = res.data.records;
+		total.value = res.data.total;
+  })
+}
+// 琛ㄦ牸閫夋嫨鏁版嵁
+const handleSelectionChange = (selection) => {
+  selectedRows.value = selection;
+};
+
+// 鍏抽棴寮规
+const closeDia = () => {
+  dialogFormVisible.value = false;
+  emit('close')
+};
+// 涓婁紶鎴愬姛澶勭悊
+function handleUploadSuccess(res, file) {
+  // 濡傛灉涓婁紶鎴愬姛
+  if (res.code == 200) {
+    const fileRow = {}
+    fileRow.name = res.data.originalName
+    fileRow.url = res.data.tempPath
+    uploadFile(fileRow)
+  } else {
+    proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+  }
+}
+function uploadFile(file) {
+  file.staffJoinLeaveRecordId = currentId.value;
+  file.accountType = accountType.value;
+  fileAdd(file).then(res => {
+    proxy.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛");
+    getList()
+  })
+}
+// 涓婁紶澶辫触澶勭悊
+function handleUploadError() {
+  proxy.$modal.msgError("鏂囦欢涓婁紶澶辫触");
+}
+// 涓嬭浇闄勪欢
+const downLoadFile = (row) => {
+  proxy.$download.name(row.url);
+}
+// 鍒犻櫎
+const handleDelete = () => {
+  let ids = [];
+  if (selectedRows.value.length > 0) {
+    ids = selectedRows.value.map((item) => item.id);
+  } else {
+    proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+    return;
+  }
+  ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  }).then(() => {
+    fileDel(ids).then((res) => {
+      proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      getList();
+    });
+  }).catch(() => {
+    proxy.$modal.msg("宸插彇娑�");
+  });
+};
+// 棰勮闄勪欢
+const lookFile = (row) => {
+  filePreviewRef.value.open(row.url)
+}
+
+defineExpose({
+  openDialog,
+});
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/personnelManagement/onboarding/index.vue b/src/views/personnelManagement/onboarding/index.vue
index 9151a6c..bf04f20 100644
--- a/src/views/personnelManagement/onboarding/index.vue
+++ b/src/views/personnelManagement/onboarding/index.vue
@@ -51,6 +51,7 @@
       ></PIMTable>
     </div>
     <form-dia ref="formDia" @close="handleQuery"></form-dia>
+    <files-dia ref="filesDia"></files-dia>
   </div>
 </template>
 
@@ -61,6 +62,7 @@
 // import FormDia from "@/views/personnelManagement/onboarding/components/formDiaXJHT.vue"; // 鏂扮枂椋熷搧鍏徃鐢ㄧ殑琛ㄥ崟
 import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
 import {ElMessageBox} from "element-plus";
+import FilesDia from "./filesDia.vue";
 import dayjs from "dayjs";
 
 const data = reactive({
@@ -165,12 +167,20 @@
     label: "鎿嶄綔",
     align: "center",
     fixed: 'right',
+    width: 120,
     operation: [
       {
         name: "缂栬緫",
         type: "text",
         clickFun: (row) => {
           openForm("edit", row);
+        },
+      },
+      {
+        name: "闄勪欢",
+        type: "text",
+        clickFun: (row) => {
+          openFilesFormDia(row);
         },
       },
     ],
@@ -185,6 +195,7 @@
   total: 0,
 });
 const formDia = ref()
+const filesDia = ref()
 const { proxy } = getCurrentInstance()
 
 const handleDateChange = (value,type) => {
@@ -201,6 +212,13 @@
   }
   getList();
 };
+// 鎵撳紑闄勪欢寮规
+const openFilesFormDia = (row) => {
+  console.log(row)
+  nextTick(() => {
+    filesDia.value?.openDialog( row,'鍚堝悓')
+  })
+};
 // 鏌ヨ鍒楄〃
 /** 鎼滅储鎸夐挳鎿嶄綔 */
 const handleQuery = () => {

--
Gitblit v1.9.3