cloud-web-corejs 1.0.54-dev.563 → 1.0.54-dev.565
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -3
- package/src/components/excelExport/mixins.js +1 -1
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +20 -0
- package/src/components/xform/form-render/container-item/table2-item.vue +12 -4
- package/src/index.js +2 -16
- package/src/mixins/table/index.js +151 -0
- package/src/router/index.js +1 -1
- package/src/router/modules/customer.js +142 -8
- package/src/views/user/home/bears/index.vue +1032 -0
- package/src/views/user/home/taili/index.vue +1034 -0
- package/src/views/user/wf/wf_work_calendar/date.js +65 -64
|
@@ -223,10 +223,10 @@ export default {
|
|
|
223
223
|
* 返回农历y年一整年的总天数
|
|
224
224
|
* @param lunar Year
|
|
225
225
|
* @return Number
|
|
226
|
-
* @eg:
|
|
226
|
+
* @eg:let count = calendar.lYearDays(1987) ;//count=387
|
|
227
227
|
*/
|
|
228
228
|
lYearDays: function (y) {
|
|
229
|
-
|
|
229
|
+
let i,
|
|
230
230
|
sum = 348
|
|
231
231
|
for (i = 0x8000; i > 0x8; i >>= 1) {
|
|
232
232
|
sum += this.lunarInfo[y - 1900] & i ? 1 : 0
|
|
@@ -238,7 +238,7 @@ export default {
|
|
|
238
238
|
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
|
|
239
239
|
* @param lunar Year
|
|
240
240
|
* @return Number (0-12)
|
|
241
|
-
* @eg:
|
|
241
|
+
* @eg:let leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
|
|
242
242
|
*/
|
|
243
243
|
leapMonth: function (y) {
|
|
244
244
|
//闰字编码 \u95f0
|
|
@@ -249,7 +249,7 @@ export default {
|
|
|
249
249
|
* 返回农历y年闰月的天数 若该年没有闰月则返回0
|
|
250
250
|
* @param lunar Year
|
|
251
251
|
* @return Number (0、29、30)
|
|
252
|
-
* @eg:
|
|
252
|
+
* @eg:let leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
|
|
253
253
|
*/
|
|
254
254
|
leapDays: function (y) {
|
|
255
255
|
if (this.leapMonth(y)) {
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
262
262
|
* 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
|
|
263
263
|
* @param lunar Year
|
|
264
264
|
* @return Number (-1、29、30)
|
|
265
|
-
* @eg:
|
|
265
|
+
* @eg:let MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
|
|
266
266
|
*/
|
|
267
267
|
monthDays: function (y, m) {
|
|
268
268
|
if (m > 12 || m < 1) {
|
|
@@ -275,13 +275,13 @@ export default {
|
|
|
275
275
|
* 返回公历(!)y年m月的天数
|
|
276
276
|
* @param solar Year
|
|
277
277
|
* @return Number (-1、28、29、30、31)
|
|
278
|
-
* @eg:
|
|
278
|
+
* @eg:let solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
|
|
279
279
|
*/
|
|
280
280
|
solarDays: function (y, m) {
|
|
281
281
|
if (m > 12 || m < 1) {
|
|
282
282
|
return -1
|
|
283
283
|
} //若参数错误 返回-1
|
|
284
|
-
|
|
284
|
+
let ms = m - 1
|
|
285
285
|
if (ms == 1) {
|
|
286
286
|
//2月份的闰平规律测算后确认返回28或29
|
|
287
287
|
return (y % 4 == 0 && y % 100 != 0) || y % 400 == 0 ? 29 : 28
|
|
@@ -296,8 +296,8 @@ export default {
|
|
|
296
296
|
* @return Cn string
|
|
297
297
|
*/
|
|
298
298
|
toGanZhiYear: function (lYear) {
|
|
299
|
-
|
|
300
|
-
|
|
299
|
+
let ganKey = (lYear - 3) % 10
|
|
300
|
+
let zhiKey = (lYear - 3) % 12
|
|
301
301
|
if (ganKey == 0) ganKey = 10 //如果余数为0则为最后一个天干
|
|
302
302
|
if (zhiKey == 0) zhiKey = 12 //如果余数为0则为最后一个地支
|
|
303
303
|
return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
|
|
@@ -310,9 +310,9 @@ export default {
|
|
|
310
310
|
* @return Cn string
|
|
311
311
|
*/
|
|
312
312
|
toAstro: function (cMonth, cDay) {
|
|
313
|
-
|
|
313
|
+
let s =
|
|
314
314
|
'\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
|
|
315
|
-
|
|
315
|
+
let arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
|
|
316
316
|
return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7' //座
|
|
317
317
|
},
|
|
318
318
|
|
|
@@ -329,7 +329,7 @@ export default {
|
|
|
329
329
|
* 传入公历(!)y年获得该年第n个节气的公历日期
|
|
330
330
|
* @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
|
|
331
331
|
* @return day Number
|
|
332
|
-
* @eg:
|
|
332
|
+
* @eg:let _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
|
|
333
333
|
*/
|
|
334
334
|
getTerm: function (y, n) {
|
|
335
335
|
if (y < 1900 || y > 2100) {
|
|
@@ -338,8 +338,8 @@ export default {
|
|
|
338
338
|
if (n < 1 || n > 24) {
|
|
339
339
|
return -1
|
|
340
340
|
}
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
let _table = this.sTermInfo[y - 1900]
|
|
342
|
+
let _info = [
|
|
343
343
|
parseInt('0x' + _table.substr(0, 5)).toString(),
|
|
344
344
|
parseInt('0x' + _table.substr(5, 5)).toString(),
|
|
345
345
|
parseInt('0x' + _table.substr(10, 5)).toString(),
|
|
@@ -347,7 +347,7 @@ export default {
|
|
|
347
347
|
parseInt('0x' + _table.substr(20, 5)).toString(),
|
|
348
348
|
parseInt('0x' + _table.substr(25, 5)).toString(),
|
|
349
349
|
]
|
|
350
|
-
|
|
350
|
+
let _calday = [
|
|
351
351
|
_info[0].substr(0, 1),
|
|
352
352
|
_info[0].substr(1, 2),
|
|
353
353
|
_info[0].substr(3, 1),
|
|
@@ -385,14 +385,14 @@ export default {
|
|
|
385
385
|
* 传入农历数字月份返回汉语通俗表示法
|
|
386
386
|
* @param lunar month
|
|
387
387
|
* @return Cn string
|
|
388
|
-
* @eg:
|
|
388
|
+
* @eg:let cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
|
|
389
389
|
*/
|
|
390
390
|
toChinaMonth: function (m) {
|
|
391
391
|
// 月 => \u6708
|
|
392
392
|
if (m > 12 || m < 1) {
|
|
393
393
|
return -1
|
|
394
394
|
} //若参数错误 返回-1
|
|
395
|
-
|
|
395
|
+
let s = this.nStr3[m - 1]
|
|
396
396
|
s += '\u6708' //加上月字
|
|
397
397
|
return s
|
|
398
398
|
},
|
|
@@ -401,11 +401,11 @@ export default {
|
|
|
401
401
|
* 传入农历日期数字返回汉字表示法
|
|
402
402
|
* @param lunar day
|
|
403
403
|
* @return Cn string
|
|
404
|
-
* @eg:
|
|
404
|
+
* @eg:let cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
|
|
405
405
|
*/
|
|
406
406
|
toChinaDay: function (d) {
|
|
407
407
|
//日 => \u65e5
|
|
408
|
-
|
|
408
|
+
let s
|
|
409
409
|
switch (d) {
|
|
410
410
|
case 10:
|
|
411
411
|
s = '\u521d\u5341'
|
|
@@ -429,7 +429,7 @@ export default {
|
|
|
429
429
|
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
|
|
430
430
|
* @param y year
|
|
431
431
|
* @return Cn string
|
|
432
|
-
* @eg:
|
|
432
|
+
* @eg:let animal = calendar.getAnimal(1987) ;//animal='兔'
|
|
433
433
|
*/
|
|
434
434
|
getAnimal: function (y) {
|
|
435
435
|
return this.Animals[(y - 4) % 12]
|
|
@@ -462,19 +462,20 @@ export default {
|
|
|
462
462
|
return -1
|
|
463
463
|
}
|
|
464
464
|
//未传参 获得当天
|
|
465
|
+
let objDate = null;
|
|
465
466
|
if (!y) {
|
|
466
|
-
|
|
467
|
+
objDate = new Date()
|
|
467
468
|
} else {
|
|
468
|
-
|
|
469
|
+
objDate = new Date(y, parseInt(m) - 1, d)
|
|
469
470
|
}
|
|
470
|
-
|
|
471
|
-
leap = 0,
|
|
471
|
+
let i,
|
|
472
|
+
// leap = 0,
|
|
472
473
|
temp = 0
|
|
473
474
|
//修正ymd参数
|
|
474
|
-
|
|
475
|
+
y = objDate.getFullYear(),
|
|
475
476
|
m = objDate.getMonth() + 1,
|
|
476
477
|
d = objDate.getDate()
|
|
477
|
-
|
|
478
|
+
let offset =
|
|
478
479
|
(Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) -
|
|
479
480
|
Date.UTC(1900, 0, 31)) /
|
|
480
481
|
86400000
|
|
@@ -488,7 +489,7 @@ export default {
|
|
|
488
489
|
}
|
|
489
490
|
|
|
490
491
|
//是否今天
|
|
491
|
-
|
|
492
|
+
let isTodayObj = new Date(),
|
|
492
493
|
isToday = false
|
|
493
494
|
if (
|
|
494
495
|
isTodayObj.getFullYear() == y &&
|
|
@@ -498,16 +499,16 @@ export default {
|
|
|
498
499
|
isToday = true
|
|
499
500
|
}
|
|
500
501
|
//星期几
|
|
501
|
-
|
|
502
|
+
let nWeek = objDate.getDay(),
|
|
502
503
|
cWeek = this.nStr1[nWeek]
|
|
503
504
|
//数字表示周几顺应天朝周一开始的惯例
|
|
504
505
|
if (nWeek == 0) {
|
|
505
506
|
nWeek = 7
|
|
506
507
|
}
|
|
507
508
|
//农历年
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
509
|
+
let year = i
|
|
510
|
+
let leap = this.leapMonth(i) //闰哪个月
|
|
511
|
+
let isLeap = false
|
|
511
512
|
|
|
512
513
|
//效验闰月
|
|
513
514
|
for (i = 1; i < 13 && offset > 0; i++) {
|
|
@@ -539,27 +540,27 @@ export default {
|
|
|
539
540
|
--i
|
|
540
541
|
}
|
|
541
542
|
//农历月
|
|
542
|
-
|
|
543
|
+
let month = i
|
|
543
544
|
//农历日
|
|
544
|
-
|
|
545
|
+
let day = offset + 1
|
|
545
546
|
//天干地支处理
|
|
546
|
-
|
|
547
|
-
|
|
547
|
+
let sm = m - 1
|
|
548
|
+
let gzY = this.toGanZhiYear(year)
|
|
548
549
|
|
|
549
550
|
// 当月的两个节气
|
|
550
551
|
// bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
|
|
551
|
-
|
|
552
|
-
|
|
552
|
+
let firstNode = this.getTerm(y, m * 2 - 1) //返回当月「节」为几日开始
|
|
553
|
+
let secondNode = this.getTerm(y, m * 2) //返回当月「节」为几日开始
|
|
553
554
|
|
|
554
555
|
// 依据12节气修正干支月
|
|
555
|
-
|
|
556
|
+
let gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
|
|
556
557
|
if (d >= firstNode) {
|
|
557
558
|
gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
|
|
558
559
|
}
|
|
559
560
|
|
|
560
561
|
//传入的日期的节气与否
|
|
561
|
-
|
|
562
|
-
|
|
562
|
+
let isTerm = false
|
|
563
|
+
let Term = null
|
|
563
564
|
if (firstNode == d) {
|
|
564
565
|
isTerm = true
|
|
565
566
|
Term = this.solarTerm[m * 2 - 2]
|
|
@@ -569,19 +570,19 @@ export default {
|
|
|
569
570
|
Term = this.solarTerm[m * 2 - 1]
|
|
570
571
|
}
|
|
571
572
|
//日柱 当月一日与 1900/1/1 相差天数
|
|
572
|
-
|
|
573
|
-
|
|
573
|
+
let dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
|
|
574
|
+
let gzD = this.toGanZhi(dayCyclical + d - 1)
|
|
574
575
|
//该日期所属的星座
|
|
575
|
-
|
|
576
|
+
let astro = this.toAstro(m, d)
|
|
576
577
|
|
|
577
|
-
|
|
578
|
-
|
|
578
|
+
let solarDate = y + '-' + (m + '').padStart(2, 0) + '-' + (d + '').padStart(2, 0)
|
|
579
|
+
let lunarDate = year + '-' + month + '-' + day
|
|
579
580
|
|
|
580
|
-
|
|
581
|
-
|
|
581
|
+
let festival = this.festival
|
|
582
|
+
let lfestival = this.getLunarFestival(year, month, day)
|
|
582
583
|
|
|
583
|
-
|
|
584
|
-
|
|
584
|
+
let festivalDate = m + '-' + d
|
|
585
|
+
let lunarFestivalDate = month + '-' + day
|
|
585
586
|
|
|
586
587
|
return {
|
|
587
588
|
isWork: workday.includes(solarDate),
|
|
@@ -627,18 +628,18 @@ export default {
|
|
|
627
628
|
y = parseInt(y)
|
|
628
629
|
m = parseInt(m)
|
|
629
630
|
d = parseInt(d)
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
631
|
+
isLeapMonth = !!isLeapMonth
|
|
632
|
+
let leapOffset = 0
|
|
633
|
+
let leapMonth = this.leapMonth(y)
|
|
634
|
+
let leapDay = this.leapDays(y)
|
|
634
635
|
if (isLeapMonth && leapMonth != m) {
|
|
635
636
|
return -1
|
|
636
637
|
} //传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
|
|
637
638
|
if ((y == 2100 && m == 12 && d > 1) || (y == 1900 && m == 1 && d < 31)) {
|
|
638
639
|
return -1
|
|
639
640
|
} //超出了最大极限值
|
|
640
|
-
|
|
641
|
-
|
|
641
|
+
let day = this.monthDays(y, m)
|
|
642
|
+
let _day = day
|
|
642
643
|
//bugFix 2016-9-25
|
|
643
644
|
//if month is leap, _day use leapDays method
|
|
644
645
|
if (isLeapMonth) {
|
|
@@ -649,13 +650,13 @@ export default {
|
|
|
649
650
|
} //参数合法性效验
|
|
650
651
|
|
|
651
652
|
//计算农历的时间差
|
|
652
|
-
|
|
653
|
-
for (
|
|
653
|
+
let offset = 0
|
|
654
|
+
for (let i = 1900; i < y; i++) {
|
|
654
655
|
offset += this.lYearDays(i)
|
|
655
656
|
}
|
|
656
|
-
|
|
657
|
+
let leap = 0,
|
|
657
658
|
isAdd = false
|
|
658
|
-
for (
|
|
659
|
+
for (let i = 1; i < m; i++) {
|
|
659
660
|
leap = this.leapMonth(y)
|
|
660
661
|
if (!isAdd) {
|
|
661
662
|
//处理闰月
|
|
@@ -671,11 +672,11 @@ export default {
|
|
|
671
672
|
offset += day
|
|
672
673
|
}
|
|
673
674
|
//1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
675
|
+
let stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
|
|
676
|
+
let calObj = new Date((offset + d - 31) * 86400000 + stmap)
|
|
677
|
+
let cY = calObj.getUTCFullYear()
|
|
678
|
+
let cM = calObj.getUTCMonth() + 1
|
|
679
|
+
let cD = calObj.getUTCDate()
|
|
679
680
|
return `${cY}${cM}${cD}`
|
|
680
681
|
// return this.solar2lunar(cY, cM, cD)
|
|
681
682
|
},
|