新增 - 简单生成模式

This commit is contained in:
suwings 2018-08-10 13:02:13 +08:00
parent 2e6c6c99e5
commit 7e0438e9da
2 changed files with 20 additions and 9 deletions

View File

@ -27,17 +27,20 @@
</div>
</div>
<div class="row">
<hr>
<div class="col-sm-12 PanelItemF">
<div class="PanelItem" v-on:click="toPopWindForTime()">
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> 使用简单模式填写
</div>
<p>如果您不会填写,请仔细阅读参数手册,或者使用简单模式来生成参数。</p>
<div class="PanelItem" v-on:click="toSave()">
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> 新建/重构
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span> 新建/保存
</div>
<div class="PanelItem" v-on:click="toBack()">
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> 放弃并返回
</div>
<div class="PanelItem" v-on:click="toPopWindForTime()">
<span class="glyphicon glyphicon-certificate" aria-hidden="true"></span> 使用简单模式生成(推荐)
</div>
</div>
</div>
</div>
@ -124,6 +127,8 @@
this.toBack();
},
toPopWindForTime: function () {
var that = this;
//弹出简单模式窗口
TOOLS.popWind({
style: {
maxWidth: "400px"
@ -131,7 +136,11 @@
title: "计划任务简单模式",
template: "template/dialog/time_bulider.html",
callback: function (result) {
console.log("得到结果", result)
console.log("简单模式结果:", result);
if (!result) return;
that.time = result.time || "* * * * * *";
that.count = result.count || "0";
that.commande = result.command || "";
}
});
}

View File

@ -4,8 +4,9 @@
<samll>旨在简化计划任务时间表达式的书写,十分简单</samll>
<hr>
<div class="input-group input-group-sm">
<span class="input-group-addon" id="sizing-addon3">每隔分数</span>
<input id="DialogSec" type="text" class="form-control" placeholder="单位分钟" aria-describedby="sizing-addon3" v-model="sec">
<span class="input-group-addon" id="sizing-addon3">每隔时间</span>
<input id="DialogSec" type="text" class="form-control" placeholder="单位分钟,每隔多久执行 | 列如 60 代表一个小时" aria-describedby="sizing-addon3"
v-model="sec">
</div>
<div class="input-group input-group-sm">
<span class="input-group-addon" id="sizing-addon3">执行次数</span>
@ -15,8 +16,9 @@
<span class="input-group-addon" id="sizing-addon3">执行指令</span>
<input id="DialogCommand" type="text" class="form-control" placeholder="与服务器命令一样,不要加 \ 符号" v-model="command" aria-describedby="sizing-addon3">
</div>
<p>填写好您需要的计划数据,单击 "生成" 再进行保存即可。</p>
<button class="btn btn-success" v-on:click="ok()">
确认并生成
生成
</button>
<button class="btn btn-danger" v-on:click="no()">
取消
@ -61,7 +63,7 @@
console.log("生成的时间表达式是:", reg)
TOOLS.popWindClose({
time: this.sec,
time: reg,
count: this.count,
command: this.command
});