zhuoyuan.wang
2024-06-19 15ebe96f28cadec6a726c5324593a40bbf56205f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<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>