mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 02:25:06 +08:00
fix: form solts
This commit is contained in:
@ -93,8 +93,8 @@
|
||||
:rules="rules"
|
||||
ref="formRef"
|
||||
>
|
||||
<template #cronExpression>
|
||||
<Crontab v-model="cronExpression" :shortcuts="shortcuts" />
|
||||
<template #cronExpression="form">
|
||||
<Crontab v-model="form['cronExpression']" :shortcuts="shortcuts" />
|
||||
</template>
|
||||
</Form>
|
||||
<!-- 对话框(详情) -->
|
||||
@ -162,7 +162,6 @@ const dialogVisible = ref(false) // 是否显示弹出层
|
||||
const dialogTitle = ref('edit') // 弹出层标题
|
||||
const formRef = ref<FormExpose>() // 表单 Ref
|
||||
const detailRef = ref() // 详情 Ref
|
||||
const cronExpression = ref('')
|
||||
const nextTimes = ref([])
|
||||
const shortcuts = ref([
|
||||
{
|
||||
@ -179,7 +178,6 @@ const setDialogTile = (type: string) => {
|
||||
|
||||
// 新增操作
|
||||
const handleCreate = () => {
|
||||
cronExpression.value = ''
|
||||
setDialogTile('create')
|
||||
}
|
||||
|
||||
@ -193,7 +191,6 @@ const handleUpdate = async (rowId: number) => {
|
||||
setDialogTile('update')
|
||||
// 设置数据
|
||||
const res = await JobApi.getJobApi(rowId)
|
||||
cronExpression.value = res.cronExpression
|
||||
unref(formRef)?.setValues(res)
|
||||
}
|
||||
|
||||
@ -305,7 +302,6 @@ const submitForm = async () => {
|
||||
// 提交请求
|
||||
try {
|
||||
const data = unref(formRef)?.formModel as JobApi.JobVO
|
||||
data.cronExpression = cronExpression.value
|
||||
if (actionType.value === 'create') {
|
||||
await JobApi.createJobApi(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
|
Reference in New Issue
Block a user