Commit 8aaadb05 by liuchenxi

update: 标签规则

parent ff5794f2
......@@ -183,7 +183,6 @@
<label class="inline-block middle label-unit m-r-8">最近</label
><el-input v-model="parent.fixedRecentTimeRecent" placeholder="请输入1-730" class="m-r-8" style="width: 120px" @blur="value => toEditInput(value, 'fixedRecentTimeRecent', parent)"></el-input
><label class="inline-block middle label-unit"></label>
<span class="tips m-l-8 middle">(输入1则统计昨天获取的积分)</span>
</div>
</div>
</div>
......@@ -626,7 +625,7 @@
></el-input>
<template v-if="parent.timeRadio == 1">
<label class="inline-block middle label-unit m-l-8"></label>
<label class="inline-block middle label-tip">正整数,最大365</label>
<label class="inline-block middle label-tip">正整数,最大730</label>
</template>
<template v-if="parent.timeRadio == 2">
<label class="inline-block middle label-unit m-l-8"></label>
......
......@@ -1398,15 +1398,19 @@ export default {
* 天/月/年输入
*/
toEditDateInput(e, radio, parent) {
const code = parent.templateCode;
let newNum;
newNum = !!parseInt(String(e.target.value).replace(/[^\d]/g, '')) ? parseInt(String(e.target.value).replace(/[^\d]/g, '')) : 1;
if (newNum <= 0) {
newNum = 1;
}
// 天
if (newNum > 365 && radio == 1) {
if (code != 'tag020' && newNum > 365 && radio == 1) {
newNum = 365;
}
if (code == 'tag020' && newNum > 730 && radio == 1) {
newNum = 730;
}
// 月
if (newNum > 24 && radio == 2) {
newNum = 24;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment