<template>
|
<app-dialog-form
|
v-bind="dialogFormProps"
|
>
|
<app-cron-tab
|
v-bind="cronTabProps"
|
/>
|
</app-dialog-form>
|
</template>
|
|
<script setup>
|
|
import {useI18n} from 'vue-i18n';
|
|
const {t} = useI18n();
|
|
import {meta} from "@/hooks";
|
|
const {useMetaData} = meta;
|
|
import {useEntityStore, useAppStore} from '@/store/modules';
|
|
const entityStore = useEntityStore();
|
const appStore = useAppStore();
|
|
const dialogFormRef = ref();
|
const cronTabRef = ref();
|
|
const props = defineProps({
|
subValue: {
|
type: Function,
|
default: () => {
|
}
|
},
|
});
|
|
const cronTabProps = {
|
ref: cronTabRef,
|
}
|
|
const dialogFormProps = {
|
title: 'Cron配置',
|
ref: dialogFormRef,
|
subSubmit: async () => {
|
const cron = cronTabRef.value.getValue();
|
props.subValue(cron);
|
},
|
subReset: async () => {
|
}
|
};
|
const onOpen = async (cron) => {
|
|
dialogFormRef.value.onOpen();
|
|
await nextTick();
|
|
cronTabRef.value.setValue(cron);
|
}
|
|
defineExpose({
|
onOpen,
|
});
|
|
</script>
|