Merge remote-tracking branch 'origin/fix-bug-202303' into fix-bug-202303
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.modules.message.util;
|
package com.jero.modules.message.util;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import freemarker.template.Configuration;
|
import freemarker.template.Configuration;
|
||||||
import freemarker.template.Template;
|
import freemarker.template.Template;
|
||||||
import freemarker.template.TemplateException;
|
import freemarker.template.TemplateException;
|
||||||
@@ -66,7 +67,7 @@ public class PushMsgUtil {
|
|||||||
content = stringWriter.toString();
|
content = stringWriter.toString();
|
||||||
sysMessage.setEsTitle(title);
|
sysMessage.setEsTitle(title);
|
||||||
sysMessage.setEsContent(content);
|
sysMessage.setEsContent(content);
|
||||||
sysMessage.setEsParam(JSONObject.toJSONString(map));
|
sysMessage.setEsParam(JSON.toJSONString(map));
|
||||||
sysMessage.setEsSendTime(new Date());
|
sysMessage.setEsSendTime(new Date());
|
||||||
sysMessage.setEsSendStatus(SendMsgStatusEnum.WAIT.getCode());
|
sysMessage.setEsSendStatus(SendMsgStatusEnum.WAIT.getCode());
|
||||||
sysMessage.setEsSendNum(0);
|
sysMessage.setEsSendNum(0);
|
||||||
|
|||||||
@@ -1,66 +1,66 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="j-easy-cron">
|
<div class='j-easy-cron'>
|
||||||
<div class="content">
|
<div class='content'>
|
||||||
<div>
|
<div>
|
||||||
<a-tabs size="small" v-model="curtab">
|
<a-tabs size='small' v-model='curtab'>
|
||||||
<a-tab-pane tab="秒" key="second" v-if="!hideSecond">
|
<a-tab-pane tab='秒' key='second' v-if='!hideSecond'>
|
||||||
<second-ui v-model="second" :disabled="disabled"></second-ui>
|
<second-ui v-model='second' :disabled='disabled'></second-ui>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="分" key="minute">
|
<a-tab-pane tab='分' key='minute'>
|
||||||
<minute-ui v-model="minute" :disabled="disabled"></minute-ui>
|
<minute-ui v-model='minute' :disabled='disabled'></minute-ui>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="时" key="hour">
|
<a-tab-pane tab='时' key='hour'>
|
||||||
<hour-ui v-model="hour" :disabled="disabled"></hour-ui>
|
<hour-ui v-model='hour' :disabled='disabled'></hour-ui>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="日" key="day">
|
<a-tab-pane tab='日' key='day'>
|
||||||
<day-ui v-model="day" :week="week" :disabled="disabled"></day-ui>
|
<day-ui v-model='day' :week='week' :disabled='disabled'></day-ui>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="月" key="month">
|
<a-tab-pane tab='月' key='month'>
|
||||||
<month-ui v-model="month" :disabled="disabled"></month-ui>
|
<month-ui v-model='month' :disabled='disabled'></month-ui>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="周" key="week">
|
<a-tab-pane tab='周' key='week'>
|
||||||
<week-ui v-model="week" :day="day" :disabled="disabled"></week-ui>
|
<week-ui v-model='week' :day='day' :disabled='disabled'></week-ui>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="年" key="year" v-if="!hideYear && !hideSecond">
|
<a-tab-pane tab='年' key='year' v-if='!hideYear && !hideSecond'>
|
||||||
<year-ui v-model="year" :disabled="disabled"></year-ui>
|
<year-ui v-model='year' :disabled='disabled'></year-ui>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</div>
|
</div>
|
||||||
<a-divider/>
|
<a-divider />
|
||||||
<!-- 执行时间预览 -->
|
<!-- 执行时间预览 -->
|
||||||
<a-row :gutter="8">
|
<a-row :gutter='8'>
|
||||||
<a-col :span="18" style="margin-top: 22px;">
|
<a-col :span='18' style='margin-top: 22px;'>
|
||||||
<a-row :gutter="8">
|
<a-row :gutter='8'>
|
||||||
<a-col :span="8" style="margin-bottom: 8px;">
|
<a-col :span='8' style='margin-bottom: 8px;'>
|
||||||
<a-input addon-before="秒" v-model="inputValues.second" @blur="onInputBlur"/>
|
<a-input addon-before='秒' v-model='inputValues.second' @blur='onInputBlur' />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" style="margin-bottom: 8px;">
|
<a-col :span='8' style='margin-bottom: 8px;'>
|
||||||
<a-input addon-before="分" v-model="inputValues.minute" @blur="onInputBlur"/>
|
<a-input addon-before='分' v-model='inputValues.minute' @blur='onInputBlur' />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" style="margin-bottom: 8px;">
|
<a-col :span='8' style='margin-bottom: 8px;'>
|
||||||
<a-input addon-before="时" v-model="inputValues.hour" @blur="onInputBlur"/>
|
<a-input addon-before='时' v-model='inputValues.hour' @blur='onInputBlur' />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" style="margin-bottom: 8px;">
|
<a-col :span='8' style='margin-bottom: 8px;'>
|
||||||
<a-input addon-before="日" v-model="inputValues.day" @blur="onInputBlur"/>
|
<a-input addon-before='日' v-model='inputValues.day' @blur='onInputBlur' />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" style="margin-bottom: 8px;">
|
<a-col :span='8' style='margin-bottom: 8px;'>
|
||||||
<a-input addon-before="月" v-model="inputValues.month" @blur="onInputBlur"/>
|
<a-input addon-before='月' v-model='inputValues.month' @blur='onInputBlur' />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" style="margin-bottom: 8px;">
|
<a-col :span='8' style='margin-bottom: 8px;'>
|
||||||
<a-input addon-before="周" v-model="inputValues.week" @blur="onInputBlur"/>
|
<a-input addon-before='周' v-model='inputValues.week' @blur='onInputBlur' />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8" style="margin-bottom: 8px;">
|
<a-col :span='8' style='margin-bottom: 8px;'>
|
||||||
<a-input addon-before="年" v-model="inputValues.year" @blur="onInputBlur"/>
|
<a-input addon-before='年' v-model='inputValues.year' @blur='onInputBlur' />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="16" style="margin-bottom: 8px;">
|
<a-col :span='16' style='margin-bottom: 8px;'>
|
||||||
<a-input addon-before="Cron" v-model="inputValues.cron" @blur="onInputCronBlur"/>
|
<a-input addon-before='Cron' v-model='inputValues.cron' @blur='onInputCronBlur' />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span='6'>
|
||||||
|
|
||||||
<div>近十次执行时间(不含年)</div>
|
<div>近十次执行时间(不含年)</div>
|
||||||
<a-textarea type="textarea" :value="preTimeList" :rows="5"/>
|
<a-textarea type='textarea' :value='preTimeList' :rows='5' />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
@@ -152,14 +152,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cronValue (newVal, oldVal) {
|
cronValue (newVal) {
|
||||||
if (newVal === this.cronValue_c) {
|
if (newVal === this.cronValue_c) {
|
||||||
// console.info('same cron value: ' + newVal)
|
// console.info('same cron value: ' + newVal)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.formatValue()
|
this.formatValue()
|
||||||
},
|
},
|
||||||
cronValue_c (newVal, oldVal) {
|
cronValue_c (newVal) {
|
||||||
this.calTriggerList()
|
this.calTriggerList()
|
||||||
this.$emit('change', newVal)
|
this.$emit('change', newVal)
|
||||||
this.assignInput()
|
this.assignInput()
|
||||||
@@ -230,6 +230,38 @@ export default {
|
|||||||
if (values.length > i) this.year = values[i]
|
if (values.length > i) this.year = values[i]
|
||||||
this.assignInput()
|
this.assignInput()
|
||||||
},
|
},
|
||||||
|
// 将 Quartz 星期 的规则转换为 CronParser 的规则:
|
||||||
|
// Quartz 的规则:1 = 周日,2 = 周一,3 = 周二,4 = 周三,5 = 周四,6 = 周五,7 = 周六
|
||||||
|
// CronParser 的规则: 0 = 周日,1 = 周一,2 = 周二,3 = 周三,4 = 周四,5 = 周五,6 = 周六,7 = 周日
|
||||||
|
convertQuartzWeekToCParser (week) {
|
||||||
|
const convert = (v) => {
|
||||||
|
if (v === '0') {
|
||||||
|
return '1'
|
||||||
|
}
|
||||||
|
if (v === '1') {
|
||||||
|
return '0'
|
||||||
|
}
|
||||||
|
return (Number.parseInt(v) - 1).toString()
|
||||||
|
}
|
||||||
|
// 匹配示例 1-7 or 1/7
|
||||||
|
const patten1 = /^([0-7])([-/])([0-7])$/
|
||||||
|
// 匹配示例 1,4,7
|
||||||
|
const patten2 = /^([0-7])(,[0-7])+$/
|
||||||
|
if (/^[0-7]$/.test(week)) {
|
||||||
|
return convert(week)
|
||||||
|
} else if (patten1.test(week)) {
|
||||||
|
return week.replace(patten1, ($0, before, separator, after) => {
|
||||||
|
if (separator === '/') {
|
||||||
|
return convert(before) + separator + after
|
||||||
|
} else {
|
||||||
|
return convert(before) + separator + convert(after)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (patten2.test(week)) {
|
||||||
|
return week.split(',').map(v => convert(v)).join(',')
|
||||||
|
}
|
||||||
|
return week
|
||||||
|
},
|
||||||
calTriggerList: simpleDebounce(function () {
|
calTriggerList: simpleDebounce(function () {
|
||||||
this.calTriggerListInner()
|
this.calTriggerListInner()
|
||||||
}, 500),
|
}, 500),
|
||||||
@@ -272,14 +304,14 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang='less'>
|
||||||
.j-easy-cron {
|
.j-easy-cron {
|
||||||
|
|
||||||
/deep/ .content {
|
/deep/ .content {
|
||||||
.ant-checkbox-wrapper + .ant-checkbox-wrapper {
|
.ant-checkbox-wrapper + .ant-checkbox-wrapper {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -70,13 +70,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cronValue (newVal, oldVal) {
|
cronValue (newVal) {
|
||||||
if (newVal === this.editCronValue) {
|
if (newVal === this.editCronValue) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.editCronValue = newVal
|
this.editCronValue = newVal
|
||||||
},
|
},
|
||||||
editCronValue (newVal, oldVal) {
|
editCronValue (newVal) {
|
||||||
this.$emit('change', newVal)
|
this.$emit('change', newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,45 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="config-list">
|
<div class='config-list'>
|
||||||
<a-radio-group v-model="type">
|
<a-radio-group v-model='type'>
|
||||||
<div class="item">
|
<div class='item'>
|
||||||
<a-radio value="TYPE_NOT_SET" class="choice" :disabled="disableChoice">不设置</a-radio>
|
<a-radio value='TYPE_NOT_SET' class='choice' :disabled='disableChoice'>不设置</a-radio>
|
||||||
<span class="tip-info">日和周只能设置其中之一</span>
|
<span class='tip-info'>日和周只能设置其中之一</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class='item'>
|
||||||
<a-radio value="TYPE_EVERY" class="choice" :disabled="disableChoice">每日</a-radio>
|
<a-radio value='TYPE_EVERY' class='choice' :disabled='disableChoice'>每日</a-radio>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class='item'>
|
||||||
<a-radio value="TYPE_RANGE" class="choice" :disabled="disableChoice">区间</a-radio>
|
<a-radio value='TYPE_RANGE' class='choice' :disabled='disableChoice'>区间</a-radio>
|
||||||
从
|
从
|
||||||
<a-input-number :disabled="type!==TYPE_RANGE || disableChoice" :max="maxValue" :min="minValue" :precision="0" class="w60" v-model="valueRange.start"/>
|
<a-input-number :disabled='type!==TYPE_RANGE || disableChoice' :max='maxValue' :min='minValue' :precision='0' class='w60'
|
||||||
|
v-model='valueRange.start' />
|
||||||
日
|
日
|
||||||
至
|
至
|
||||||
<a-input-number :disabled="type!==TYPE_RANGE || disableChoice" :max="maxValue" :min="minValue" :precision="0" class="w60" v-model="valueRange.end"/>
|
<a-input-number :disabled='type!==TYPE_RANGE || disableChoice' :max='maxValue' :min='minValue' :precision='0' class='w60'
|
||||||
|
v-model='valueRange.end' />
|
||||||
日
|
日
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class='item'>
|
||||||
<a-radio value="TYPE_LOOP" class="choice" :disabled="disableChoice">循环</a-radio>
|
<a-radio value='TYPE_LOOP' class='choice' :disabled='disableChoice'>循环</a-radio>
|
||||||
从
|
从
|
||||||
<a-input-number :disabled="type!==TYPE_LOOP || disableChoice" :max="maxValue" :min="minValue" :precision="0" class="w60" v-model="valueLoop.start"/>
|
<a-input-number :disabled='type!==TYPE_LOOP || disableChoice' :max='maxValue' :min='minValue' :precision='0' class='w60'
|
||||||
|
v-model='valueLoop.start' />
|
||||||
日开始,间隔
|
日开始,间隔
|
||||||
<a-input-number :disabled="type!==TYPE_LOOP || disableChoice" :max="maxValue" :min="minValue" :precision="0" class="w60" v-model="valueLoop.interval"/>
|
<a-input-number :disabled='type!==TYPE_LOOP || disableChoice' :max='maxValue' :min='minValue' :precision='0' class='w60'
|
||||||
|
v-model='valueLoop.interval' />
|
||||||
日
|
日
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class='item'>
|
||||||
<a-radio value="TYPE_WORK" class="choice" :disabled="disableChoice">工作日</a-radio>
|
<a-radio value='TYPE_WORK' class='choice' :disabled='disableChoice'>工作日</a-radio>
|
||||||
本月
|
本月
|
||||||
<a-input-number :disabled="type!==TYPE_WORK || disableChoice" :max="maxValue" :min="minValue" :precision="0" class="w60" v-model="valueWork"/>
|
<a-input-number :disabled='type!==TYPE_WORK || disableChoice' :max='maxValue' :min='minValue' :precision='0' class='w60'
|
||||||
|
v-model='valueWork' />
|
||||||
日,最近的工作日
|
日,最近的工作日
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class='item'>
|
||||||
<a-radio value="TYPE_LAST" class="choice" :disabled="disableChoice">最后一日</a-radio>
|
<a-radio value='TYPE_LAST' class='choice' :disabled='disableChoice'>最后一日</a-radio>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class='item'>
|
||||||
<a-radio value="TYPE_SPECIFY" class="choice" :disabled="disableChoice">指定</a-radio>
|
<a-radio value='TYPE_SPECIFY' class='choice' :disabled='disableChoice'>指定</a-radio>
|
||||||
<div class="list">
|
<div class='list'>
|
||||||
<a-checkbox-group v-model="valueList">
|
<a-checkbox-group v-model='valueList'>
|
||||||
<template v-for="i of specifyRange">
|
<template v-for='i of specifyRange'>
|
||||||
<a-checkbox class="list-check-item" :key="`key-${i}`" :value="i" :disabled="type!==TYPE_SPECIFY || disabled">{{i}}</a-checkbox>
|
<a-checkbox class='list-check-item' :key='`key-${i}`' :value='i' :disabled='type!==TYPE_SPECIFY || disabled'>{{ i }}</a-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</a-checkbox-group>
|
</a-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,11 +74,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value_c (newVal, oldVal) {
|
value_c () {
|
||||||
// 数值变化
|
// 数值变化
|
||||||
this.updateValue()
|
this.updateValue()
|
||||||
},
|
},
|
||||||
week (newVal, oldVal) {
|
week () {
|
||||||
// console.info('new week: ' + newVal)
|
// console.info('new week: ' + newVal)
|
||||||
this.updateValue()
|
this.updateValue()
|
||||||
}
|
}
|
||||||
@@ -96,6 +101,6 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang='less' scoped>
|
||||||
@import "mixin.less";
|
@import "mixin.less";
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value_c (newVal, oldVal) {
|
value_c (newVal) {
|
||||||
this.$emit('change', newVal)
|
this.$emit('change', newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value_c (newVal, oldVal) {
|
value_c (newVal) {
|
||||||
this.$emit('change', newVal)
|
this.$emit('change', newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -54,11 +54,12 @@ export default {
|
|||||||
valueList: [],
|
valueList: [],
|
||||||
valueWork: 1,
|
valueWork: 1,
|
||||||
maxValue: 0,
|
maxValue: 0,
|
||||||
minValue: 0
|
minValue: 0,
|
||||||
|
valueLast: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
prop (newVal, oldVal) {
|
prop (newVal) {
|
||||||
if (newVal === this.value_c) {
|
if (newVal === this.value_c) {
|
||||||
// console.info('skip ' + newVal)
|
// console.info('skip ' + newVal)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value_c (newVal, oldVal) {
|
value_c (newVal) {
|
||||||
this.$emit('change', newVal)
|
this.$emit('change', newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value_c (newVal, oldVal) {
|
value_c (newVal) {
|
||||||
this.$emit('change', newVal)
|
this.$emit('change', newVal)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
从
|
从
|
||||||
<a-select v-model="valueRange.start" class="w80" :disabled="type!==TYPE_RANGE || disableChoice">
|
<a-select v-model="valueRange.start" class="w80" :disabled="type!==TYPE_RANGE || disableChoice">
|
||||||
<template v-for="(v, k) of WEEK_MAP">
|
<template v-for="(v, k) of WEEK_MAP">
|
||||||
<a-select-option :value="v">{{k}}</a-select-option>
|
<a-select-option :value="v" :key='v'>{{k}}</a-select-option>
|
||||||
</template>
|
</template>
|
||||||
</a-select>
|
</a-select>
|
||||||
至
|
至
|
||||||
<a-select v-model="valueRange.end" class="w80" :disabled="type!==TYPE_RANGE || disableChoice">
|
<a-select v-model="valueRange.end" class="w80" :disabled="type!==TYPE_RANGE || disableChoice">
|
||||||
<template v-for="(v, k) of WEEK_MAP">
|
<template v-for="(v, k) of WEEK_MAP">
|
||||||
<a-select-option :value="v">{{k}}</a-select-option>
|
<a-select-option :value="v" :key='v'>{{k}}</a-select-option>
|
||||||
</template>
|
</template>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
从
|
从
|
||||||
<a-select v-model="valueLoop.start" class="w80" :disabled="type!==TYPE_LOOP || disableChoice">
|
<a-select v-model="valueLoop.start" class="w80" :disabled="type!==TYPE_LOOP || disableChoice">
|
||||||
<template v-for="(v, k) of WEEK_MAP">
|
<template v-for="(v, k) of WEEK_MAP">
|
||||||
<a-select-option :value="v">{{k}}</a-select-option>
|
<a-select-option :value="v" :key='v'>{{k}}</a-select-option>
|
||||||
</template>
|
</template>
|
||||||
</a-select>
|
</a-select>
|
||||||
开始,间隔
|
开始,间隔
|
||||||
@@ -82,11 +82,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value_c (newVal, oldVal) {
|
value_c () {
|
||||||
// 如果设置日,那么星期就直接不设置
|
// 如果设置日,那么星期就直接不设置
|
||||||
this.updateValue()
|
this.updateValue()
|
||||||
},
|
},
|
||||||
day (newVal) {
|
day () {
|
||||||
// console.info('new day: ' + newVal)
|
// console.info('new day: ' + newVal)
|
||||||
this.updateValue()
|
this.updateValue()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value_c (newVal, oldVal) {
|
value_c (newVal) {
|
||||||
// console.info('change:' + newVal)
|
// console.info('change:' + newVal)
|
||||||
this.$emit('change', newVal)
|
this.$emit('change', newVal)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default (rule, value, callback) => {
|
|||||||
if (values.length === 7) {
|
if (values.length === 7) {
|
||||||
const year = replaceWeekName(values[6])
|
const year = replaceWeekName(values[6])
|
||||||
if (year !== '*' && year !== '?') {
|
if (year !== '*' && year !== '?') {
|
||||||
let yearValues = []
|
let yearValues
|
||||||
if (year.indexOf('-') >= 0) {
|
if (year.indexOf('-') >= 0) {
|
||||||
yearValues = year.split('-')
|
yearValues = year.split('-')
|
||||||
} else if (year.indexOf('/')) {
|
} else if (year.indexOf('/')) {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export default {
|
|||||||
this.editor.setMarkdown(newValue)
|
this.editor.setMarkdown(newValue)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
language (val) {
|
language () {
|
||||||
this.destroyEditor()
|
this.destroyEditor()
|
||||||
this.initEditor()
|
this.initEditor()
|
||||||
},
|
},
|
||||||
@@ -137,7 +137,6 @@ export default {
|
|||||||
*/
|
*/
|
||||||
// 获取编辑器上的功能条
|
// 获取编辑器上的功能条
|
||||||
const toolbar = this.editor.getUI().getToolbar()
|
const toolbar = this.editor.getUI().getToolbar()
|
||||||
const fileDom = this.$refs.files
|
|
||||||
// 添加图片点击事件
|
// 添加图片点击事件
|
||||||
this.editor.eventManager.addEventType('isShowClickEvent')
|
this.editor.eventManager.addEventType('isShowClickEvent')
|
||||||
this.editor.eventManager.listen('isShowClickEvent', () => {
|
this.editor.eventManager.listen('isShowClickEvent', () => {
|
||||||
@@ -184,7 +183,7 @@ export default {
|
|||||||
return this.editor.getHtml()
|
return this.editor.getHtml()
|
||||||
},
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
if (this.index == '1') {
|
if (this.index === '1') {
|
||||||
this.imageUrl = getFileAccessHttpUrl(this.fileList)
|
this.imageUrl = getFileAccessHttpUrl(this.fileList)
|
||||||
if (this.remark) {
|
if (this.remark) {
|
||||||
this.addImgToMd(this.imageUrl, this.remark)
|
this.addImgToMd(this.imageUrl, this.remark)
|
||||||
|
|||||||
Reference in New Issue
Block a user