parent
cec1bed947
commit
5cf7273451
@ -1,23 +1,21 @@
|
||||
<script setup lang="tsx">
|
||||
import { ElTabs,ElTabPane } from 'element-plus';
|
||||
import ProcedureConfig from './components/ProcedureConfig.vue';
|
||||
import ParamConfig from './components/ParamConfig.vue';
|
||||
import BasicInfo from './components/BasicInfo.vue';
|
||||
import { ElTabs,ElTabPane } from 'element-plus';
|
||||
import ProcedureConfig from './components/ProcedureConfig.vue';
|
||||
import ParamConfig from './components/ParamConfig.vue';
|
||||
import BasicInfo from './components/BasicInfo.vue';
|
||||
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<ElTabs tab-position="left" style="height: 200px">
|
||||
<ElTabPane label="存储过程">
|
||||
<ProcedureConfig ref="procedureConfig" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="参数配置">
|
||||
<ParamConfig ref="paramConfig" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="基本信息">
|
||||
<BasicInfo ref="basicInfo" />
|
||||
</ElTabPane>
|
||||
</ElTabs>
|
||||
</ContentWrap>
|
||||
<ElTabs tab-position="left" style="height: 100%;">
|
||||
<ElTabPane label="存储过程">
|
||||
<ProcedureConfig ref="procedureConfig" rule-type="ProcedureRule" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="参数配置">
|
||||
<ParamConfig ref="paramConfig" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="基本信息">
|
||||
<BasicInfo ref="basicInfo" />
|
||||
</ElTabPane>
|
||||
</ElTabs>
|
||||
</template>
|
@ -1,23 +1,31 @@
|
||||
<script setup lang="tsx">
|
||||
import { elTabs,elTabPane } from 'element-plus';
|
||||
import SQLRule from './components/SQLRule.vue';
|
||||
import SetParams from './components/SetParams.vue';
|
||||
import BasicInfo from './components/BasicInfo.vue';
|
||||
import { ElTabs,ElTabPane } from 'element-plus';
|
||||
import SearchStucter from './components/SearchStucter.vue';
|
||||
import ParamConfig from './components/ParamConfig.vue';
|
||||
import FieldInfo from './components/FieldInfo.vue';
|
||||
import TargetPeek from './components/TargetPeek.vue'
|
||||
import BasicInfo from './components/BasicInfo.vue';
|
||||
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<elTabs tab-position="left" style="height: 200px">
|
||||
<elTabPane label="SQL">
|
||||
<SQLRule ref="sqlRule" />
|
||||
</elTabPane>
|
||||
<elTabPane label="参数配置">
|
||||
<SetParams ref="setParams" />
|
||||
</elTabPane>
|
||||
<elTabPane label="基本信息">
|
||||
<ElTabs tab-position="left" style="height: 100%;">
|
||||
<ElTabPane label="查询结构">
|
||||
<SearchStucter ref="searchStucter" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="参数配置">
|
||||
<ParamConfig ref="paramConfig" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="字段信息">
|
||||
<FieldInfo ref="fieldInfo" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="指标取数">
|
||||
<TargetPeek ref="targetPeek" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="基本信息">
|
||||
<BasicInfo ref="basicInfo" />
|
||||
</elTabPane>
|
||||
</elTabs>
|
||||
</ElTabPane>
|
||||
</ElTabs>
|
||||
</ContentWrap>
|
||||
</template>
|
@ -1,105 +0,0 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType,ref,reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
import { ElDialog } from 'element-plus'ss
|
||||
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
}
|
||||
})
|
||||
let showCron = ref(false);
|
||||
let NewCornData = "";//当前最新的corn语句的定义
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'cron',
|
||||
label: '定时器信息',
|
||||
component: 'Input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
componentProps:{
|
||||
value:"",
|
||||
on:{
|
||||
click:()=>{
|
||||
NewCornData = formSchema[0].value;
|
||||
showCron.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
cron:[required()],
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues,getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData();
|
||||
formData.cron = formSchema[0].value;
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
//修改定时器的信息
|
||||
const changeCron = (corn)=>{
|
||||
formSchema[0].value = corn.toString();
|
||||
formSchema[0].componentProps.value = corn.toString();
|
||||
if(formSchema[0].value != '[object Event]'){
|
||||
NewCornData = formSchema[0].value
|
||||
}
|
||||
}
|
||||
const closeDialog = ()=>{
|
||||
if(NewCornData != formSchema[0].value){
|
||||
formSchema[0].value = NewCornData;
|
||||
formSchema[0].componentProps.value = NewCornData;
|
||||
}
|
||||
showCron.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
<ElDialog v-model="showCron">
|
||||
<vue3CronPlus
|
||||
i18n="cn"
|
||||
@change="changeCron"
|
||||
@close="closeDialog"
|
||||
max-height="300px"
|
||||
/>
|
||||
</ElDialog>
|
||||
</template>
|
||||
<style scoped>
|
||||
.vue3-cron-plus-container>>>.language{
|
||||
top:40px !important;
|
||||
}
|
||||
</style>
|
@ -1,105 +0,0 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType,ref,reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
import { ElDialog } from 'element-plus'ss
|
||||
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
}
|
||||
})
|
||||
let showCron = ref(false);
|
||||
let NewCornData = "";//当前最新的corn语句的定义
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'cron',
|
||||
label: '定时器信息',
|
||||
component: 'Input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
componentProps:{
|
||||
value:"",
|
||||
on:{
|
||||
click:()=>{
|
||||
NewCornData = formSchema[0].value;
|
||||
showCron.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
cron:[required()],
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues,getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData();
|
||||
formData.cron = formSchema[0].value;
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
//修改定时器的信息
|
||||
const changeCron = (corn)=>{
|
||||
formSchema[0].value = corn.toString();
|
||||
formSchema[0].componentProps.value = corn.toString();
|
||||
if(formSchema[0].value != '[object Event]'){
|
||||
NewCornData = formSchema[0].value
|
||||
}
|
||||
}
|
||||
const closeDialog = ()=>{
|
||||
if(NewCornData != formSchema[0].value){
|
||||
formSchema[0].value = NewCornData;
|
||||
formSchema[0].componentProps.value = NewCornData;
|
||||
}
|
||||
showCron.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
<ElDialog v-model="showCron">
|
||||
<vue3CronPlus
|
||||
i18n="cn"
|
||||
@change="changeCron"
|
||||
@close="closeDialog"
|
||||
max-height="300px"
|
||||
/>
|
||||
</ElDialog>
|
||||
</template>
|
||||
<style scoped>
|
||||
.vue3-cron-plus-container>>>.language{
|
||||
top:40px !important;
|
||||
}
|
||||
</style>
|
@ -1,31 +1,22 @@
|
||||
<script setup lang="tsx">
|
||||
import { elTabs,elTabPane } from 'element-plus';
|
||||
import SearchStucter from './components/SearchStucter.vue';
|
||||
import ParamConfig from './components/ParamConfig.vue';
|
||||
import FieldInfo from './components/FieldInfo.vue';
|
||||
import TargetPeek from './components/TargetPeek.vue'
|
||||
import BasicInfo from './components/BasicInfo.vue';
|
||||
|
||||
import { ElTabs,ElTabPane } from 'element-plus';
|
||||
import ProcedureConfig from '@/views/IndexProcess/ProcedureRule/components/ProcedureConfig.vue';
|
||||
import SetParams from './components/SetParams.vue';
|
||||
import BasicInfo from './components/BasicInfo.vue';
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<elTabs tab-position="left" style="height: 200px">
|
||||
<elTabPane label="查询结构">
|
||||
<SearchStucter ref="searchStucter" />
|
||||
</elTabPane>
|
||||
<elTabPane label="参数配置">
|
||||
<ParamConfig ref="paramConfig" />
|
||||
</elTabPane>
|
||||
<elTabPane label="字段信息">
|
||||
<FieldInfo ref="fieldInfo" />
|
||||
</elTabPane>
|
||||
<elTabPane label="指标取数">
|
||||
<TargetPeek ref="targetPeek" />
|
||||
</elTabPane>
|
||||
<elTabPane label="基本信息">
|
||||
<ElTabs tab-position="left" style="height: 100%;">
|
||||
<ElTabPane label="SQL">
|
||||
<ProcedureConfig ref="procedureConfig" rule-type="SqlRule" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="参数配置">
|
||||
<SetParams ref="setParams" />
|
||||
</ElTabPane>
|
||||
<ElTabPane label="基本信息">
|
||||
<BasicInfo ref="basicInfo" />
|
||||
</elTabPane>
|
||||
</elTabs>
|
||||
</ElTabPane>
|
||||
</ElTabs>
|
||||
</ContentWrap>
|
||||
</template>
|
@ -1,105 +0,0 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType,ref,reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
import { ElDialog } from 'element-plus'ss
|
||||
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
}
|
||||
})
|
||||
let showCron = ref(false);
|
||||
let NewCornData = "";//当前最新的corn语句的定义
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'cron',
|
||||
label: '定时器信息',
|
||||
component: 'Input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
componentProps:{
|
||||
value:"",
|
||||
on:{
|
||||
click:()=>{
|
||||
NewCornData = formSchema[0].value;
|
||||
showCron.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
cron:[required()],
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues,getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData();
|
||||
formData.cron = formSchema[0].value;
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
//修改定时器的信息
|
||||
const changeCron = (corn)=>{
|
||||
formSchema[0].value = corn.toString();
|
||||
formSchema[0].componentProps.value = corn.toString();
|
||||
if(formSchema[0].value != '[object Event]'){
|
||||
NewCornData = formSchema[0].value
|
||||
}
|
||||
}
|
||||
const closeDialog = ()=>{
|
||||
if(NewCornData != formSchema[0].value){
|
||||
formSchema[0].value = NewCornData;
|
||||
formSchema[0].componentProps.value = NewCornData;
|
||||
}
|
||||
showCron.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
<ElDialog v-model="showCron">
|
||||
<vue3CronPlus
|
||||
i18n="cn"
|
||||
@change="changeCron"
|
||||
@close="closeDialog"
|
||||
max-height="300px"
|
||||
/>
|
||||
</ElDialog>
|
||||
</template>
|
||||
<style scoped>
|
||||
.vue3-cron-plus-container>>>.language{
|
||||
top:40px !important;
|
||||
}
|
||||
</style>
|
@ -1,105 +0,0 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType,ref,reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
import { ElDialog } from 'element-plus'ss
|
||||
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
}
|
||||
})
|
||||
let showCron = ref(false);
|
||||
let NewCornData = "";//当前最新的corn语句的定义
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'cron',
|
||||
label: '定时器信息',
|
||||
component: 'Input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
componentProps:{
|
||||
value:"",
|
||||
on:{
|
||||
click:()=>{
|
||||
NewCornData = formSchema[0].value;
|
||||
showCron.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
cron:[required()],
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues,getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData();
|
||||
formData.cron = formSchema[0].value;
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
//修改定时器的信息
|
||||
const changeCron = (corn)=>{
|
||||
formSchema[0].value = corn.toString();
|
||||
formSchema[0].componentProps.value = corn.toString();
|
||||
if(formSchema[0].value != '[object Event]'){
|
||||
NewCornData = formSchema[0].value
|
||||
}
|
||||
}
|
||||
const closeDialog = ()=>{
|
||||
if(NewCornData != formSchema[0].value){
|
||||
formSchema[0].value = NewCornData;
|
||||
formSchema[0].componentProps.value = NewCornData;
|
||||
}
|
||||
showCron.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
<ElDialog v-model="showCron">
|
||||
<vue3CronPlus
|
||||
i18n="cn"
|
||||
@change="changeCron"
|
||||
@close="closeDialog"
|
||||
max-height="300px"
|
||||
/>
|
||||
</ElDialog>
|
||||
</template>
|
||||
<style scoped>
|
||||
.vue3-cron-plus-container>>>.language{
|
||||
top:40px !important;
|
||||
}
|
||||
</style>
|
@ -1,105 +0,0 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType,ref,reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
import { ElDialog } from 'element-plus'ss
|
||||
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
}
|
||||
})
|
||||
let showCron = ref(false);
|
||||
let NewCornData = "";//当前最新的corn语句的定义
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'cron',
|
||||
label: '定时器信息',
|
||||
component: 'Input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
componentProps:{
|
||||
value:"",
|
||||
on:{
|
||||
click:()=>{
|
||||
NewCornData = formSchema[0].value;
|
||||
showCron.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
cron:[required()],
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues,getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData();
|
||||
formData.cron = formSchema[0].value;
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
//修改定时器的信息
|
||||
const changeCron = (corn)=>{
|
||||
formSchema[0].value = corn.toString();
|
||||
formSchema[0].componentProps.value = corn.toString();
|
||||
if(formSchema[0].value != '[object Event]'){
|
||||
NewCornData = formSchema[0].value
|
||||
}
|
||||
}
|
||||
const closeDialog = ()=>{
|
||||
if(NewCornData != formSchema[0].value){
|
||||
formSchema[0].value = NewCornData;
|
||||
formSchema[0].componentProps.value = NewCornData;
|
||||
}
|
||||
showCron.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
<ElDialog v-model="showCron">
|
||||
<vue3CronPlus
|
||||
i18n="cn"
|
||||
@change="changeCron"
|
||||
@close="closeDialog"
|
||||
max-height="300px"
|
||||
/>
|
||||
</ElDialog>
|
||||
</template>
|
||||
<style scoped>
|
||||
.vue3-cron-plus-container>>>.language{
|
||||
top:40px !important;
|
||||
}
|
||||
</style>
|
@ -1,105 +0,0 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType,ref,reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
import { ElDialog } from 'element-plus'ss
|
||||
import {vue3CronPlus} from '@/views/vue3-cron-plus/index'
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
}
|
||||
})
|
||||
let showCron = ref(false);
|
||||
let NewCornData = "";//当前最新的corn语句的定义
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'cron',
|
||||
label: '定时器信息',
|
||||
component: 'Input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
componentProps:{
|
||||
value:"",
|
||||
on:{
|
||||
click:()=>{
|
||||
NewCornData = formSchema[0].value;
|
||||
showCron.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
cron:[required()],
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues,getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData();
|
||||
formData.cron = formSchema[0].value;
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
//修改定时器的信息
|
||||
const changeCron = (corn)=>{
|
||||
formSchema[0].value = corn.toString();
|
||||
formSchema[0].componentProps.value = corn.toString();
|
||||
if(formSchema[0].value != '[object Event]'){
|
||||
NewCornData = formSchema[0].value
|
||||
}
|
||||
}
|
||||
const closeDialog = ()=>{
|
||||
if(NewCornData != formSchema[0].value){
|
||||
formSchema[0].value = NewCornData;
|
||||
formSchema[0].componentProps.value = NewCornData;
|
||||
}
|
||||
showCron.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
<ElDialog v-model="showCron">
|
||||
<vue3CronPlus
|
||||
i18n="cn"
|
||||
@change="changeCron"
|
||||
@close="closeDialog"
|
||||
max-height="300px"
|
||||
/>
|
||||
</ElDialog>
|
||||
</template>
|
||||
<style scoped>
|
||||
.vue3-cron-plus-container>>>.language{
|
||||
top:40px !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue