|
@ -9,13 +9,13 @@ |
|
|
import { defineProps, onMounted } from 'vue'; |
|
|
import { defineProps, onMounted } from 'vue'; |
|
|
import { useForm, BasicForm } from '@/components/Form'; |
|
|
import { useForm, BasicForm } from '@/components/Form'; |
|
|
import { countStatisticsFormSchema } from './countStatistics.data' |
|
|
import { countStatisticsFormSchema } from './countStatistics.data' |
|
|
import { modifychangeFieldManageById, getchangeFieldManageById } from './countStatistics.api'; |
|
|
import { modifyPeriodicallabCount, getperiodicallabById } from './countStatistics.api'; |
|
|
|
|
|
|
|
|
let emit = defineEmits(["exit"]) |
|
|
let emit = defineEmits(["exit"]) |
|
|
let dataTo = defineProps(["id"]) |
|
|
let dataTo = defineProps(["id"]) |
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
let res = await getchangeFieldManageById({id: dataTo.id}) |
|
|
let res = await getperiodicallabById({id: dataTo.id}) |
|
|
console.log("结果是", res) |
|
|
console.log("结果是", res) |
|
|
setFieldsValue(res) |
|
|
setFieldsValue(res) |
|
|
}) |
|
|
}) |
|
@ -46,7 +46,7 @@ const [registerchangeFieldForm,{ getFieldsValue, validate, setFieldsValue }] = u |
|
|
async function handleSubmit() { |
|
|
async function handleSubmit() { |
|
|
if (await validate()) { |
|
|
if (await validate()) { |
|
|
let datas = await getFieldsValue() |
|
|
let datas = await getFieldsValue() |
|
|
await modifychangeFieldManageById(datas) |
|
|
await modifyPeriodicallabCount(datas) |
|
|
emit("exit") |
|
|
emit("exit") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|