|
@@ -28,16 +28,24 @@
|
|
|
label="金额"
|
|
label="金额"
|
|
|
v-if="!(createTaskForm.type === 'mint' || createTaskForm.type === 'removeLiquidity')"
|
|
v-if="!(createTaskForm.type === 'mint' || createTaskForm.type === 'removeLiquidity')"
|
|
|
>
|
|
>
|
|
|
- <ElInput v-model="createTaskForm.minAmount" class="!w-36">
|
|
|
|
|
- <template #prepend>MIN</template>
|
|
|
|
|
- </ElInput>
|
|
|
|
|
- <ElInput v-model="createTaskForm.maxAmount" class="ml-6 !w-36">
|
|
|
|
|
- <template #prepend>MAX</template>
|
|
|
|
|
- </ElInput>
|
|
|
|
|
|
|
+ <ElInputNumber v-model="createTaskForm.minAmount" class="mr-3 !w-24" :controls="false" />
|
|
|
|
|
+ ~
|
|
|
|
|
+ <ElInputNumber v-model="createTaskForm.maxAmount" class="ml-3 mr-4 !w-24" :controls="false" />
|
|
|
</ElFormItem>
|
|
</ElFormItem>
|
|
|
<ElFormItem prop="startTime" label="执行时间">
|
|
<ElFormItem prop="startTime" label="执行时间">
|
|
|
<ElDatePicker type="datetime" v-model="createTaskForm.startTime"></ElDatePicker>
|
|
<ElDatePicker type="datetime" v-model="createTaskForm.startTime"></ElDatePicker>
|
|
|
</ElFormItem>
|
|
</ElFormItem>
|
|
|
|
|
+ <ElFormItem prop="interval" label="间隔时间">
|
|
|
|
|
+ <ElInputNumber v-model="createTaskForm.minInterval" :min="1" class="mr-3 !w-24" :controls="false" />
|
|
|
|
|
+ ~
|
|
|
|
|
+ <ElInputNumber
|
|
|
|
|
+ v-model="createTaskForm.maxInterval"
|
|
|
|
|
+ :min="1"
|
|
|
|
|
+ class="ml-3 mr-3 !w-24"
|
|
|
|
|
+ :controls="false"
|
|
|
|
|
+ />
|
|
|
|
|
+ 秒
|
|
|
|
|
+ </ElFormItem>
|
|
|
</ElForm>
|
|
</ElForm>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<ElButton @click="showCreateTaskDialog = false">取消</ElButton>
|
|
<ElButton @click="showCreateTaskDialog = false">取消</ElButton>
|
|
@@ -82,7 +90,20 @@ const createTaskRule = {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
- startTime: [{ required: true, message: '请选择执行时间' }]
|
|
|
|
|
|
|
+ startTime: [{ required: true, message: '请选择执行时间' }],
|
|
|
|
|
+ interval: [
|
|
|
|
|
+ {
|
|
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
|
|
+ if (!(createTaskForm.value.minInterval && createTaskForm.value.maxInterval)) {
|
|
|
|
|
+ callback(new Error('请输入间隔时间'))
|
|
|
|
|
+ } else if (Number(createTaskForm.value.minInterval) > Number(createTaskForm.value.maxInterval)) {
|
|
|
|
|
+ callback(new Error('最小间隔时间不能大于最大间隔时间'))
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
}
|
|
}
|
|
|
const creatingTask = ref(false)
|
|
const creatingTask = ref(false)
|
|
|
function onCreateTask() {
|
|
function onCreateTask() {
|
|
@@ -105,7 +126,9 @@ function createTask() {
|
|
|
accounts: selected().map((i) => i.id),
|
|
accounts: selected().map((i) => i.id),
|
|
|
params: {
|
|
params: {
|
|
|
minAmount: createTaskForm.value.minAmount,
|
|
minAmount: createTaskForm.value.minAmount,
|
|
|
- maxAmount: createTaskForm.value.maxAmount
|
|
|
|
|
|
|
+ maxAmount: createTaskForm.value.maxAmount,
|
|
|
|
|
+ minInterval: createTaskForm.value.minInterval,
|
|
|
|
|
+ maxInterval: createTaskForm.value.maxInterval
|
|
|
},
|
|
},
|
|
|
type: createTaskForm.value.type,
|
|
type: createTaskForm.value.type,
|
|
|
startTime: createTaskForm.value.startTime
|
|
startTime: createTaskForm.value.startTime
|