From 3eda54cf3a2afb012d5a36e3d252293393b7b935 Mon Sep 17 00:00:00 2001 From: XaoLi717 <144221124+XaoLi717@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:19:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home/fwgl/index.ts | 2 +- src/views/OA/fwgl/fwsq/FwglForm.vue | 95 +++++++++++++++-------------- 2 files changed, 49 insertions(+), 48 deletions(-) diff --git a/src/api/home/fwgl/index.ts b/src/api/home/fwgl/index.ts index 960f247..0371e12 100644 --- a/src/api/home/fwgl/index.ts +++ b/src/api/home/fwgl/index.ts @@ -21,7 +21,7 @@ export interface FwglVO { processInstanceId: string // 流程实例的编号 userId: number // 申请人的用户编号 status: number // 审批状态 - startUserSelectAssignees:string //启动用户选择的用户信息 + startUserSelectAssignees:string | object //启动用户选择的用户信息 curfullpath:string // 当前表单路径 processDefinitionKey:string //流程定义的key } diff --git a/src/views/OA/fwgl/fwsq/FwglForm.vue b/src/views/OA/fwgl/fwsq/FwglForm.vue index 237b73b..0f94b4c 100644 --- a/src/views/OA/fwgl/fwsq/FwglForm.vue +++ b/src/views/OA/fwgl/fwsq/FwglForm.vue @@ -5,6 +5,7 @@ - + - + @@ -36,13 +37,13 @@ type="datetime" value-format="x" placeholder="选择起草时间" - readonly + disabled /> - + @@ -129,7 +130,7 @@ import { FwglApi, FwglVO } from '@/api/home/fwgl' import * as DefinitionApi from '@/api/bpm/definition' import * as UserApi from '@/api/system/user' import {useTagsViewStore} from "@/store/modules/tagsView"; -import {getUserProfile, ProfileVO} from "@/api/system/user/profile"; +import {getUserProfile} from "@/api/system/user/profile"; import {FormProcessMappingApi} from "@/api/bpm/formprocessmapping"; /** 发文管理 表单 */ @@ -144,12 +145,12 @@ const { push, currentRoute } = useRouter() // 路由 // const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const draftButton = ref(false) -const formType = ref('') // 表单的类型:create - 新增;update - 修改 +// const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ id: undefined, title: undefined, userName: undefined, - fwglTime: undefined, + fwglTime: undefined as unknown | number, fwglBh: undefined, fwglPhone: undefined, fwglMj: 1, @@ -178,19 +179,19 @@ const formRules = reactive({ fwglJh: [{ required: true, message: '发文急缓不能为空', trigger: 'blur' }], }) const formRef = ref() // 表单 Ref -const userInfo = ref('') -const deptInfo = ref('') +// const userInfo = ref('') +// const deptInfo = ref('') -const formatDate = (date: Date) => { - const yyyy = date.getFullYear() - const mm = String(date.getMonth() + 1).padStart(2, '0') // 月份从 0 开始 - const dd = String(date.getDate()).padStart(2, '0') - const hh = String(date.getHours()).padStart(2, '0') - const mi = String(date.getMinutes()).padStart(2, '0') - const ss = String(date.getSeconds()).padStart(2, '0') +// const formatDate = (date: Date) => { +// const yyyy = date.getFullYear() +// const mm = String(date.getMonth() + 1).padStart(2, '0') // 月份从 0 开始 +// const dd = String(date.getDate()).padStart(2, '0') +// const hh = String(date.getHours()).padStart(2, '0') +// const mi = String(date.getMinutes()).padStart(2, '0') +// const ss = String(date.getSeconds()).padStart(2, '0') - return `${yyyy}-${mm}-${dd} ${hh}:${mi}:${ss}` -} +// return `${yyyy}-${mm}-${dd} ${hh}:${mi}:${ss}` +// } const getUserInfo = async () => { const users = await getUserProfile() @@ -205,8 +206,8 @@ const getUserInfo = async () => { formData.value.userName = users.nickname } - if (formData.value.fwglTime == '' || formData.value.fwglTime == undefined) { - formData.value.fwglTime = formatDate(new Date()) + if (formData.value.fwglTime === undefined) { + formData.value.fwglTime = Date.now(); } if (formData.value.fwglPhone == '' || formData.value.fwglPhone == undefined) { formData.value.fwglPhone = users.mobile @@ -291,33 +292,33 @@ const submitForm = async () => { } /** 重置表单 */ -const resetForm = () => { - formData.value = { - id: undefined, - title: undefined, - userName: undefined, - fwglTime: undefined, - fwglBh: undefined, - fwglPhone: undefined, - fwglMj: 1, - fwglJh: 1, - fwglSendDeptid: undefined, - fwglSendName: undefined, - fwglHqDeptid: undefined, - fwglHqName: undefined, - createTime: 0, - fileStatus:undefined, - filePath: undefined, - attachStatus: undefined, - attachPath: undefined, - deptId: undefined, - deptName: undefined, - processInstanceId: undefined, - userId: undefined, - status: undefined, - } - formRef.value?.resetFields() -} +// const resetForm = () => { +// formData.value = { +// id: undefined, +// title: undefined, +// userName: undefined, +// fwglTime: undefined, +// fwglBh: undefined, +// fwglPhone: undefined, +// fwglMj: 1, +// fwglJh: 1, +// fwglSendDeptid: undefined, +// fwglSendName: undefined, +// fwglHqDeptid: undefined, +// fwglHqName: undefined, +// createTime: 0, +// fileStatus:undefined, +// filePath: undefined, +// attachStatus: undefined, +// attachPath: undefined, +// deptId: undefined, +// deptName: undefined, +// processInstanceId: undefined, +// userId: undefined, +// status: undefined, +// } +// formRef.value?.resetFields() +// } //根据时间戳获取年月日 const getNow = (date:number)=>{ const now = new Date(date);