修改Array.indexOf

This commit is contained in:
yjb 2021-09-22 18:54:10 +08:00
parent aaae404b2a
commit 492ee4fae5

View File

@ -3,7 +3,7 @@
<p class="title">最近5次运行时间</p>
<ul class="popup-result-scroll">
<template v-if='isShow'>
<li v-for='item in resultList' :key="item">{{item}}</li>
<li v-for='item in resultList' :key="item">{{ item }}</li>
</template>
<li v-else>计算结果中...</li>
</ul>
@ -25,7 +25,6 @@ export default {
methods: {
//
expressionChange() {
// -
this.isShow = false;
// [0123456]
@ -151,7 +150,6 @@ export default {
}
continue;
}
//
if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true && this.dayRule !== 'workDay' && this.dayRule !== 'lastWeek' && this.dayRule !== 'lastDay') {
resetDay();
@ -160,7 +158,6 @@ export default {
//
if (this.dayRule == 'lastDay') {
//
if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
DD--;
@ -200,7 +197,7 @@ export default {
//
let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
// dayRuleSup
if (Array.indexOf(this.dayRuleSup, thisWeek) < 0) {
if (this.dayRuleSup.indexOf(thisWeek) < 0) {
//
if (Di == DDate.length - 1) {
resetDay();
@ -241,11 +238,9 @@ export default {
}
// 1005
DD = DD < 10 ? '0' + DD : DD;
//
goHour: for (let hi = hIdx; hi < hDate.length; hi++) {
let hh = hDate[hi] < 10 ? '0' + hDate[hi] : hDate[hi]
//
if (nMin > mDate[mDate.length - 1]) {
resetMin();
@ -266,7 +261,6 @@ export default {
// ""
goMin: for (let mi = mIdx; mi < mDate.length; mi++) {
let mm = mDate[mi] < 10 ? '0' + mDate[mi] : mDate[mi];
//
if (nSecond > sDate[sDate.length - 1]) {
resetSecond();