兰宝车间质量管理系统-前端
疯狂的狮子Li
2024-06-06 2c9c837c1b999748e3ec7e0526f5673111d108bd
src/views/workflow/leave/leaveEdit.vue
@@ -30,7 +30,7 @@
            @click="approvalVerifyOpen"
            >审批</el-button
          >
          <el-button v-if="form.processInstanceId" type="primary" @click="handleApprovalRecord">流程进度</el-button>
          <el-button v-if="form.status !== 'draft'" type="primary" @click="handleApprovalRecord">流程进度</el-button>
        </div>
        <div>
          <el-button style="float: right" @click="goBack()">返回</el-button>
@@ -82,8 +82,6 @@
const buttonLoading = ref(false);
const loading = ref(true);
const leaveTime = ref<Array<string>>([]);
//流程实例id
const processInstanceId = ref('');
//路由参数
const routeParams = ref<Record<string, any>>({});
const options = [
@@ -125,8 +123,7 @@
  endDate: undefined,
  leaveDays: undefined,
  remark: undefined,
  status: undefined,
  processInstanceId: undefined
  status: undefined
};
const data = reactive<PageData<LeaveForm, LeaveQuery>>({
  form: { ...initFormData },
@@ -157,7 +154,7 @@
  const startDate = new Date(leaveTime.value[0]).getTime();
  const endDate = new Date(leaveTime.value[1]).getTime();
  const diffInMilliseconds = endDate - startDate;
  form.value.leaveDays = Math.floor(diffInMilliseconds / (1000 * 60 * 60 * 24));
  form.value.leaveDays = Math.floor(diffInMilliseconds / (1000 * 60 * 60 * 24)) + 1;
};
/** 获取详情 */
const getInfo = () => {