From fde69c50bc3d9e43c826b6fdfb0324919ee8ff98 Mon Sep 17 00:00:00 2001
From: gssong <1742057357@qq.com>
Date: Thu, 4 Jan 2024 21:03:50 +0800
Subject: [PATCH] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E8=AF=B7=E5=81=87=E4=BA=8B=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/workflow/leave/index.vue | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/views/workflow/leave/index.vue b/src/views/workflow/leave/index.vue
index bef9434..e1d7f44 100644
--- a/src/views/workflow/leave/index.vue
+++ b/src/views/workflow/leave/index.vue
@@ -95,7 +95,7 @@
-
+
@@ -253,6 +253,13 @@ const handleAdd = () => {
});
};
+const changeLeaveTime = () => {
+ const startDate = new Date(leaveTime.value[0]).getTime()
+ const endDate = new Date(leaveTime.value[1]).getTime()
+ const diffInMilliseconds = endDate - startDate
+ const diffInDays = Math.floor(diffInMilliseconds / (1000 * 60 * 60 * 24))
+ form.value.leaveDays = diffInDays
+};
/** 修改按钮操作 */
const handleUpdate = (row?: LeaveVO) => {
buttonLoading.value = false;
@@ -275,12 +282,6 @@ const submitForm = (status: string) => {
proxy?.$modal.msgError('请假时间不能为空');
return
}
-
- const startDate = new Date(leaveTime.value[0]).getTime()
- const endDate = new Date(leaveTime.value[1]).getTime()
- const diffInMilliseconds = endDate - startDate
- const diffInDays = Math.floor(diffInMilliseconds / (1000 * 60 * 60 * 24))
- form.value.leaveDays = diffInDays
leaveFormRef.value.validate(async (valid: boolean) => {
form.value.startDate = leaveTime.value[0]
form.value.endDate = leaveTime.value[1]
@@ -327,7 +328,7 @@ const handleExport = () => {
//提交申请
const handleStartWorkFlow = async (data: any) => {
- submitFormData.value.processKey = 'leave7';
+ submitFormData.value.processKey = 'leave1';
submitFormData.value.businessKey = data.id;
//流程变量
taskVariables.value = {