时间保存问题

This commit is contained in:
gexinzhineng/gxzn27 2023-02-01 15:18:59 +08:00
parent 9e35ca512c
commit e718263f5f

View File

@ -13,7 +13,7 @@
</template>
<script setup lang="ts">
import { FormExpose } from '@/components/Form'
import XEUtils from 'xe-utils'
// import XEUtils from 'xe-utils'
// import
import * as LeaveApi from '@/api/bpm/leave'
@ -39,8 +39,10 @@ const submitForm = async () => {
//
actionLoading.value = true
const data = unref(formRef)?.formModel as LeaveApi.LeaveVO
data.startTime = XEUtils.toDateString(data.startTime, 'yyyy-MM-dd HH:mm:ss')
data.endTime = XEUtils.toDateString(data.endTime, 'yyyy-MM-dd HH:mm:ss')
// data.startTime = XEUtils.toDateString(data.startTime, 'yyyy-MM-dd HH:mm:ss')
// data.endTime = XEUtils.toDateString(data.endTime, 'yyyy-MM-dd HH:mm:ss')
data.startTime = Date.parse(new Date(data.startTime).toString())
data.endTime = Date.parse(new Date(data.endTime).toString())
//
await LeaveApi.createLeaveApi(data)
message.success(t('common.createSuccess'))