fix: tenant
This commit is contained in:
parent
5da9ae25fe
commit
fdfdd823a6
@ -99,7 +99,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, unref, onMounted } from 'vue'
|
import { ref, unref, onMounted } from 'vue'
|
||||||
import dayjs from 'dayjs'
|
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { useMessage } from '@/hooks/web/useMessage'
|
import { useMessage } from '@/hooks/web/useMessage'
|
||||||
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
|
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
|
||||||
@ -163,7 +162,6 @@ const handleUpdate = async (rowId: number) => {
|
|||||||
// 设置数据
|
// 设置数据
|
||||||
const res = await TenantApi.getTenantApi(rowId)
|
const res = await TenantApi.getTenantApi(rowId)
|
||||||
tenantPackageId.value = res.packageId
|
tenantPackageId.value = res.packageId
|
||||||
res.expireTime = dayjs(res.expireTime).format('YYYY-MM-DD HH:mm:ss')
|
|
||||||
unref(formRef)?.setValues(res)
|
unref(formRef)?.setValues(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,11 +196,9 @@ const submitForm = async () => {
|
|||||||
const data = unref(formRef)?.formModel as TenantApi.TenantVO
|
const data = unref(formRef)?.formModel as TenantApi.TenantVO
|
||||||
data.packageId = tenantPackageId.value
|
data.packageId = tenantPackageId.value
|
||||||
if (actionType.value === 'create') {
|
if (actionType.value === 'create') {
|
||||||
data.expireTime = dayjs(data.expireTime).valueOf().toString()
|
|
||||||
await TenantApi.createTenantApi(data)
|
await TenantApi.createTenantApi(data)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(t('common.createSuccess'))
|
||||||
} else {
|
} else {
|
||||||
data.expireTime = dayjs(data.expireTime).valueOf().toString()
|
|
||||||
await TenantApi.updateTenantApi(data)
|
await TenantApi.updateTenantApi(data)
|
||||||
message.success(t('common.updateSuccess'))
|
message.success(t('common.updateSuccess'))
|
||||||
}
|
}
|
||||||
|
@ -69,11 +69,9 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
|||||||
field: 'expireTime',
|
field: 'expireTime',
|
||||||
formatter: 'formatDate',
|
formatter: 'formatDate',
|
||||||
form: {
|
form: {
|
||||||
show: true,
|
|
||||||
component: 'DatePicker',
|
component: 'DatePicker',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
type: 'datetime',
|
type: 'datetime'
|
||||||
valueFormat: 'x'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user