diff --git a/src/components/custom/work-flow/leave-edit/index.vue b/src/components/custom/work-flow/leave-edit/index.vue
index eb502d95..e89e084d 100644
--- a/src/components/custom/work-flow/leave-edit/index.vue
+++ b/src/components/custom/work-flow/leave-edit/index.vue
@@ -147,7 +147,7 @@ async function handleUpdateModelWhenEdit() {
return;
}
- if (props.operateType === 'edit' || props.operateType === 'detail') {
+ if (props.operateType === 'edit' || (props.operateType === 'detail' && props.rowData)) {
Object.assign(model, props.rowData);
Object.assign(modelDetail, props.rowData);
} else {
@@ -255,17 +255,17 @@ watch(visible, async () => {
- {{ flowCodeTypeRecord[model.flowCode] }}
+ {{ flowCodeTypeRecord[modelDetail.flowCode] }}
- {{ leaveTypeRecord[model.leaveType!] }}
+ {{ leaveTypeRecord[modelDetail.leaveType!] }}
- {{ `${model.startDate} 至 ${model.endDate}` }}
+ {{ `${modelDetail.startDate} 至 ${modelDetail.endDate}` }}
- {{ model.leaveDays }} 天
+ {{ modelDetail.leaveDays }} 天
- {{ model.remark || '-' }}
+ {{ modelDetail.remark || '-' }}
diff --git a/src/views/workflow/process-instance/index.vue b/src/views/workflow/process-instance/index.vue
index 3f5122ce..8d324eee 100644
--- a/src/views/workflow/process-instance/index.vue
+++ b/src/views/workflow/process-instance/index.vue
@@ -32,6 +32,7 @@ useDict('wf_business_status');
const appStore = useAppStore();
const { bool: variableVisible, setTrue: showVariableDrawer } = useBoolean(false);
+const { bool: leaveEditVisible, setTrue: showLeaveEditDrawer } = useBoolean(false);
const runningStatus = ref
(true);
const runningStatusOptions = ref([
@@ -185,7 +186,13 @@ const operateColumns = ref[]>(
}
buttons.push(
-
+ handleShowLeaveEdit(row.businessId)}
+ />
);
buttons.push(
@@ -310,6 +317,12 @@ async function handleShowVariable(id: CommonType.IdType) {
handleEdit('id', id);
showVariableDrawer();
}
+
+const leaveEditBusinessId = ref();
+async function handleShowLeaveEdit(businessId: CommonType.IdType) {
+ leaveEditBusinessId.value = businessId;
+ showLeaveEditDrawer();
+}
@@ -387,6 +400,7 @@ async function handleShowVariable(id: CommonType.IdType) {
:pagination="mobilePagination"
class="sm:h-full"
/>
+