This commit is contained in:
chenjianxing 2021-01-21 10:11:07 +08:00
commit 668949a918
4 changed files with 19 additions and 7 deletions

View File

@ -854,6 +854,7 @@
this.result = this.$get("/api/automation/getApiScenario/" + this.currentScenario.id, response => {
if (response.data) {
this.path = "/api/automation/update";
this.currentScenario.description = response.data.description;
if (response.data.scenarioDefinition != null) {
let obj = JSON.parse(response.data.scenarioDefinition);
if (obj) {

View File

@ -9,16 +9,16 @@
<el-form-item>
<el-radio v-model='radioValue' :label="2">
{{$t('schedule.cron.period')}} {{$t('schedule.cron.from')}}
<el-input-number v-model='cycle01' :min="0" :max="60" /> -
<el-input-number v-model='cycle02' :min="0" :max="60" /> 小时
<el-input-number v-model='cycle01' :min="0" :max="24" /> -
<el-input-number v-model='cycle02' :min="0" :max="24" /> 小时
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model='radioValue' :label="3">
{{$t('schedule.cron.from')}}
<el-input-number v-model='average01' :min="0" :max="60" /> {{$t('schedule.cron.hours')}}{{$t('schedule.cron.start')}}{{$t('schedule.cron.every')}}
<el-input-number v-model='average02' :min="0" :max="60" /> {{$t('schedule.cron.hours')}}{{$t('schedule.cron.execute_once')}}
<el-input-number v-model='average01' :min="0" :max="24" /> {{$t('schedule.cron.hours')}}{{$t('schedule.cron.start')}}{{$t('schedule.cron.every')}}
<el-input-number v-model='average02' :min="0" :max="24" /> {{$t('schedule.cron.hours')}}{{$t('schedule.cron.execute_once')}}
</el-radio>
</el-form-item>
@ -26,7 +26,7 @@
<el-radio v-model='radioValue' :label="4">
{{$t('schedule.cron.specify')}}
<el-select clearable v-model="checkboxList" :placeholder="$t('schedule.cron.multi_select')" multiple style="width:100%">
<el-option v-for="item in 60" :key="item" :value="item-1">{{item-1}}</el-option>
<el-option v-for="item in 24" :key="item" :value="item-1">{{item-1}}</el-option>
</el-select>
</el-radio>
</el-form-item>

View File

@ -271,7 +271,18 @@
this.$refs.environmentConfig.open(project.id);
},
handleEvent(event) {
if (event.keyCode === 13) {
let enter = event.keyCode;
let ctrl = event.ctrlKey;
let shift = event.shiftKey;
let alt = event.altKey;
if(enter === 13 && ctrl && !shift && !alt) {
//ctrl + enter
this.form.description += '\n';
}
if(enter === 13 && !ctrl && shift && !alt) {
//shift + enter
}
if(enter === 13 && !ctrl && !shift && !alt) {
this.submit('form')
}
},

View File

@ -7,7 +7,7 @@ export default {
install(Vue) {
// 登入请求不重定向
let unRedirectUrls = new Set(['signin','ldap/signin']);
let unRedirectUrls = new Set(['signin','ldap/signin','/signin', '/ldap/signin']);
if (!axios) {
window.console.error('You have to install axios');