refactor: 合并代码修改部分页面显示
This commit is contained in:
parent
5aa7019bb0
commit
da8c52e6e3
|
@ -6,13 +6,15 @@
|
||||||
<span class="character">SCHEDULER</span>
|
<span class="character">SCHEDULER</span>
|
||||||
</span>
|
</span>
|
||||||
<el-switch :disabled="!schedule.value || isReadOnly" v-model="schedule.enable" @change="scheduleChange"/>
|
<el-switch :disabled="!schedule.value || isReadOnly" v-model="schedule.enable" @change="scheduleChange"/>
|
||||||
<ms-schedule-edit :is-read-only="isReadOnly" :schedule="schedule" :save="save" :custom-validate="customValidate" ref="scheduleEdit"/>
|
<ms-schedule-edit :is-read-only="isReadOnly" :schedule="schedule" :save="save" :custom-validate="customValidate"
|
||||||
|
ref="scheduleEdit"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>
|
<span>
|
||||||
{{ $t('schedule.next_execution_time') }}:
|
{{ $t('schedule.next_execution_time') }}:
|
||||||
<span :class="{'disable-character': !schedule.enable}" v-if="!schedule.enable">{{$t('schedule.not_set')}}</span>
|
<span :class="{'disable-character': !schedule.enable}"
|
||||||
|
v-if="!schedule.enable">{{ $t('schedule.not_set') }}</span>
|
||||||
<crontab-result v-if="schedule.enable" :enable-simple-mode="true" :ex="schedule.value" ref="crontabResult"/>
|
<crontab-result v-if="schedule.enable" :enable-simple-mode="true" :ex="schedule.value" ref="crontabResult"/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,7 +25,9 @@
|
||||||
import MsScheduleEdit from "./MsScheduleEdit";
|
import MsScheduleEdit from "./MsScheduleEdit";
|
||||||
import CrontabResult from "../cron/CrontabResult";
|
import CrontabResult from "../cron/CrontabResult";
|
||||||
|
|
||||||
function defaultCustomValidate() {return {pass: true};}
|
function defaultCustomValidate() {
|
||||||
|
return {pass: true};
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsScheduleConfig",
|
name: "MsScheduleConfig",
|
||||||
|
@ -40,7 +44,9 @@
|
||||||
type: Function,
|
type: Function,
|
||||||
default() {
|
default() {
|
||||||
return {
|
return {
|
||||||
checkOpen() {return true;}
|
checkOpen() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :close-on-click-modal="false" width="35%" class="schedule-edit" :visible.sync="dialogVisible"
|
<el-dialog :close-on-click-modal="false" width="70%" class="schedule-edit" :visible.sync="dialogVisible"
|
||||||
@close="close">
|
@close="close">
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane :label="$t('schedule.edit_timer_task')" name="first">
|
<el-tab-pane :label="$t('schedule.edit_timer_task')" name="first">
|
||||||
<el-form :model="form" :rules="rules" ref="from">
|
<el-form :model="form" :rules="rules" ref="from">
|
||||||
|
@ -20,7 +18,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<crontab-result :ex="form.cronValue" ref="crontabResult"/>
|
<crontab-result :ex="form.cronValue" ref="crontabResult"/>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-dialog :title="$t('schedule.generate_expression')" :visible.sync="showCron" :modal="false">
|
<el-dialog :title="$t('schedule.generate_expression')" width="70%" :visible.sync="showCron" :modal="false">
|
||||||
<crontab @hide="showCron=false" @fill="crontabFill" :expression="schedule.value" ref="crontab"/>
|
<crontab @hide="showCron=false" @fill="crontabFill" :expression="schedule.value" ref="crontab"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@ -85,8 +83,6 @@
|
||||||
</template>
|
</template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -94,8 +90,8 @@
|
||||||
|
|
||||||
import Crontab from "../cron/Crontab";
|
import Crontab from "../cron/Crontab";
|
||||||
import CrontabResult from "../cron/CrontabResult";
|
import CrontabResult from "../cron/CrontabResult";
|
||||||
import {cronValidate} from "../../../../common/js/cron";
|
import {cronValidate} from "@/common/js/cron";
|
||||||
import {listenGoBack, removeGoBackListener} from "../../../../common/js/utils";
|
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||||
|
|
||||||
function defaultCustomValidate() {
|
function defaultCustomValidate() {
|
||||||
return {pass: true};
|
return {pass: true};
|
||||||
|
|
Loading…
Reference in New Issue