eoss 0.1.0-alpha.35 → 0.1.0-alpha.37
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/lib/0.js +1 -1
- package/lib/1.js +1 -1
- package/lib/10.js +1 -1
- package/lib/11.js +1 -1
- package/lib/12.js +1 -1
- package/lib/13.js +1 -1
- package/lib/14.js +1 -1
- package/lib/15.js +1 -1
- package/lib/16.js +1 -1
- package/lib/17.js +1 -1
- package/lib/18.js +1 -1
- package/lib/19.js +1 -1
- package/lib/20.js +1 -1
- package/lib/21.js +1 -1
- package/lib/22.js +1 -1
- package/lib/23.js +1 -1
- package/lib/24.js +1 -1
- package/lib/25.js +1 -1
- package/lib/26.js +1 -1
- package/lib/27.js +1 -1
- package/lib/28.js +1 -1
- package/lib/29.js +1 -1
- package/lib/3.js +1 -1
- package/lib/30.js +1 -1
- package/lib/31.js +1 -1
- package/lib/32.js +1 -1
- package/lib/33.js +1 -1
- package/lib/34.js +1 -1
- package/lib/35.js +1 -1
- package/lib/36.js +1 -1
- package/lib/37.js +1 -1
- package/lib/38.js +1 -1
- package/lib/39.js +1 -1
- package/lib/4.js +1 -1
- package/lib/40.js +1 -1
- package/lib/41.js +1 -1
- package/lib/42.js +1 -1
- package/lib/43.js +1 -1
- package/lib/44.js +1 -1
- package/lib/45.js +1 -1
- package/lib/46.js +1 -1
- package/lib/47.js +1 -1
- package/lib/48.js +1 -1
- package/lib/49.js +1 -1
- package/lib/5.js +1 -1
- package/lib/50.js +1 -1
- package/lib/51.js +1 -1
- package/lib/52.js +1 -1
- package/lib/53.js +1 -1
- package/lib/54.js +1 -1
- package/lib/55.js +1 -1
- package/lib/56.js +1 -1
- package/lib/57.js +1 -1
- package/lib/58.js +1 -1
- package/lib/59.js +1 -1
- package/lib/6.js +1 -1
- package/lib/60.js +1 -1
- package/lib/61.js +1 -1
- package/lib/62.js +1 -1
- package/lib/63.js +1 -1
- package/lib/64.js +1 -1
- package/lib/65.js +1 -1
- package/lib/66.js +1 -1
- package/lib/67.js +1 -1
- package/lib/68.js +1 -1
- package/lib/69.js +1 -1
- package/lib/7.js +1 -1
- package/lib/70.js +1 -1
- package/lib/71.js +1 -1
- package/lib/72.js +1 -1
- package/lib/73.js +1 -1
- package/lib/74.js +1 -1
- package/lib/75.js +1 -1
- package/lib/76.js +1 -1
- package/lib/77.js +1 -1
- package/lib/78.js +1 -1
- package/lib/79.js +1 -1
- package/lib/8.js +1 -1
- package/lib/80.js +1 -1
- package/lib/81.js +1 -1
- package/lib/9.js +1 -1
- package/lib/account-login.js +1101 -1035
- package/lib/alert.js +2 -2
- package/lib/aside.js +2 -2
- package/lib/audit-trajectory.js +150 -150
- package/lib/autocomplete.js +2095 -1871
- package/lib/avatar.js +2 -2
- package/lib/backtop.js +2 -2
- package/lib/badge.js +2 -2
- package/lib/breadcrumb-item.js +4 -4
- package/lib/breadcrumb.js +4 -4
- package/lib/button-group.js +4 -4
- package/lib/button.js +2 -2
- package/lib/ca-login.js +862 -837
- package/lib/calendar.js +864 -839
- package/lib/card.js +2 -2
- package/lib/carousel-item.js +864 -839
- package/lib/carousel.js +866 -841
- package/lib/cascader-panel.js +878 -853
- package/lib/cascader.js +2325 -2101
- package/lib/checkbox-button.js +4 -4
- package/lib/checkbox-group.js +1060 -1025
- package/lib/checkbox.js +6 -6
- package/lib/col.js +2 -2
- package/lib/collapse-item.js +920 -895
- package/lib/collapse.js +913 -888
- package/lib/color-picker.js +1155 -956
- package/lib/container.js +2 -2
- package/lib/cron.js +18 -18
- package/lib/data-table.js +1053 -1018
- package/lib/date-picker.js +2094 -1870
- package/lib/descriptions-item.js +144 -0
- package/lib/descriptions.js +561 -0
- package/lib/dialog.js +943 -918
- package/lib/divider.js +2 -2
- package/lib/drawer.js +12 -12
- package/lib/dropdown-item.js +6 -6
- package/lib/dropdown-menu.js +1157 -958
- package/lib/dropdown.js +870 -845
- package/lib/email-login.js +1047 -1012
- package/lib/empty.js +2 -2
- package/lib/eoss.common.js +3493 -2313
- package/lib/flip.js +2 -2
- package/lib/flow-group.js +876 -851
- package/lib/flow.js +1184 -1149
- package/lib/flows.js +1080 -1045
- package/lib/footer.js +2 -2
- package/lib/form-item.js +877 -852
- package/lib/form.js +1123 -1087
- package/lib/guide.js +2 -2
- package/lib/header.js +2 -2
- package/lib/icon.js +1009 -984
- package/lib/icons.js +6 -6
- package/lib/image-viewer.js +862 -837
- package/lib/image.js +4 -4
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +2 -2
- package/lib/input-number.js +6 -6
- package/lib/input.js +870 -845
- package/lib/link.js +2 -2
- package/lib/loading.js +13 -13
- package/lib/login.js +1116 -1066
- package/lib/lowcode-view.js +1078 -1043
- package/lib/lowcode.js +1131 -1096
- package/lib/main.js +1185 -1148
- package/lib/marquee.js +862 -837
- package/lib/menu-item-group.js +20 -17
- package/lib/menu-item.js +8 -8
- package/lib/menu.js +2390 -2164
- package/lib/message-box.js +950 -925
- package/lib/message.js +941 -916
- package/lib/notification.js +962 -937
- package/lib/option-group.js +4 -4
- package/lib/option.js +871 -846
- package/lib/page-header.js +2 -2
- package/lib/pagination.js +866 -841
- package/lib/phone-login.js +1049 -1014
- package/lib/popconfirm.js +4 -4
- package/lib/popover.js +2100 -1876
- package/lib/process-config.js +1065 -1030
- package/lib/process-module.js +1053 -1018
- package/lib/process-rule.js +1062 -1027
- package/lib/progress.js +2 -2
- package/lib/qr-code.js +4 -4
- package/lib/qrcode-login.js +1052 -1017
- package/lib/radio-button.js +4 -4
- package/lib/radio-group.js +2608 -2573
- package/lib/radio.js +6 -6
- package/lib/rate.js +864 -839
- package/lib/retrial-auth.js +7063 -0
- package/lib/row.js +2 -2
- package/lib/scrollbar.js +868 -843
- package/lib/select.js +2591 -2357
- package/lib/selector-panel.js +2659 -2624
- package/lib/selector.js +1068 -1033
- package/lib/slider.js +6 -6
- package/lib/step.js +44 -44
- package/lib/steps.js +911 -886
- package/lib/submenu.js +1439 -1236
- package/lib/switch.js +866 -841
- package/lib/tab-pane.js +4 -4
- package/lib/table-column.js +936 -911
- package/lib/table.js +2318 -2084
- package/lib/tabs.js +866 -841
- package/lib/tag.js +2 -2
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/descriptions.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/retrial-auth.css +1 -0
- package/lib/time-picker.js +2047 -1823
- package/lib/time-select.js +2041 -1817
- package/lib/timeline-item.js +2 -2
- package/lib/timeline.js +2 -2
- package/lib/tips.js +1047 -1012
- package/lib/toolbar.js +36 -17
- package/lib/tooltip.js +2080 -1856
- package/lib/transfer.js +881 -856
- package/lib/tree-group.js +1020 -995
- package/lib/tree.js +1062 -1027
- package/lib/update-history.js +151 -151
- package/lib/upload.js +1082 -1047
- package/lib/utils/ajax.js +5 -1
- package/lib/utils/popper.js +97 -48
- package/lib/wujie.js +866 -841
- package/package.json +1 -1
- package/packages/account-login/src/account-login.vue +29 -0
- package/packages/descriptions/index.js +8 -0
- package/packages/descriptions/src/index.js +181 -0
- package/packages/descriptions/src/item.js +30 -0
- package/packages/descriptions/src/row.js +120 -0
- package/packages/descriptions-item/index.js +8 -0
- package/packages/login/src/login.vue +8 -0
- package/packages/login/src/mixins.js +3 -1
- package/packages/main/src/minxs.js +1 -0
- package/packages/menu/src/menu.vue +0 -1
- package/packages/menu/src/mixins.js +4 -3
- package/packages/menu/src/submenu.vue +4 -4
- package/packages/retrial-auth/index.js +5 -0
- package/packages/retrial-auth/src/main.vue +300 -0
- package/packages/theme-chalk/src/base.scss +2 -1
- package/packages/theme-chalk/src/descriptions.scss +0 -1
- package/packages/theme-chalk/src/index.scss +3 -0
- package/packages/theme-chalk/src/retrial-auth.scss +38 -0
- package/packages/toolbar/src/toolbar.vue +5 -0
- package/src/index.js +336 -327
- package/src/utils/ajax.js +2 -1
- package/src/utils/popper.js +109 -70
package/lib/icon.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 243);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -3521,7 +3521,7 @@ module.exports = require("vue");
|
|
|
3521
3521
|
|
|
3522
3522
|
/***/ }),
|
|
3523
3523
|
|
|
3524
|
-
/***/
|
|
3524
|
+
/***/ 243:
|
|
3525
3525
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3526
3526
|
|
|
3527
3527
|
"use strict";
|
|
@@ -3607,7 +3607,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
3607
3607
|
*/
|
|
3608
3608
|
preview: {
|
|
3609
3609
|
type: String,
|
|
3610
|
-
default: api["
|
|
3610
|
+
default: api["Nb" /* previewAdjunct */] + '?adjunctId='
|
|
3611
3611
|
},
|
|
3612
3612
|
/**
|
|
3613
3613
|
* 图标内容
|
|
@@ -4071,146 +4071,146 @@ function normalizeComponent(
|
|
|
4071
4071
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4072
4072
|
|
|
4073
4073
|
"use strict";
|
|
4074
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4075
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4076
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4077
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4078
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4079
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4074
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return doCaLogin; });
|
|
4075
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return doUserLogin; });
|
|
4076
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return doQrLogin; });
|
|
4077
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vb", function() { return logout; });
|
|
4078
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nb", function() { return initLogin; });
|
|
4079
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mc", function() { return switchUserTo; });
|
|
4080
4080
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return changeImg; });
|
|
4081
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4082
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4081
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return getLoginCode; });
|
|
4082
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return doCodeLogin; });
|
|
4083
4083
|
/* unused harmony export updateCode */
|
|
4084
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4084
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return getModifyPassCode; });
|
|
4085
4085
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return codeModifyPass; });
|
|
4086
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4086
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tb", function() { return loginModifyPassword; });
|
|
4087
4087
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return authCenter; });
|
|
4088
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4088
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ob", function() { return initModifyPassword; });
|
|
4089
4089
|
/* unused harmony export doWechatQrLogin */
|
|
4090
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4090
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fb", function() { return getTwoFactorLoginCode; });
|
|
4091
4091
|
/* unused harmony export doTwoFactorLogin */
|
|
4092
|
-
/*
|
|
4093
|
-
/*
|
|
4094
|
-
/*
|
|
4095
|
-
/*
|
|
4096
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4097
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4098
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4099
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4100
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4101
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4102
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4103
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4092
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pb", function() { return initRetrialAuth; });
|
|
4093
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return getRetrialAuthCode; });
|
|
4094
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hc", function() { return scanCodeRetrialAuth; });
|
|
4095
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return codeRetrialAuth; });
|
|
4096
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return doAssistanceQrLogin; });
|
|
4097
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Zc", function() { return userOnline; });
|
|
4098
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hb", function() { return getUserAppWithTag; });
|
|
4099
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Vb", function() { return recordUserApp; });
|
|
4100
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ib", function() { return getUserRecordApp; });
|
|
4101
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wb", function() { return mainConfig; });
|
|
4102
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "qb", function() { return initUserSet; });
|
|
4103
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Vc", function() { return updateUserInfo; });
|
|
4104
4104
|
/* unused harmony export getUserImgUrl */
|
|
4105
4105
|
/* unused harmony export getDoorIndex */
|
|
4106
4106
|
/* unused harmony export refreshOnlineUsers */
|
|
4107
4107
|
/* unused harmony export getQuickMenuIds */
|
|
4108
4108
|
/* unused harmony export getApplicationIdArray */
|
|
4109
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4110
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4111
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4112
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4109
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return getComplexApplications; });
|
|
4110
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return getComplexApplicationsNew; });
|
|
4111
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return getMainAppWithTag; });
|
|
4112
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return getByType; });
|
|
4113
4113
|
/* unused harmony export getUserCustomInfo */
|
|
4114
4114
|
/* unused harmony export updateUserCustomInfo */
|
|
4115
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4116
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4117
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4118
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4119
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4120
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4121
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4122
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4123
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4124
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4115
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gc", function() { return saveOrUpdate; });
|
|
4116
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nc", function() { return sysMsgPage; });
|
|
4117
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mb", function() { return ignoreSysMsg; });
|
|
4118
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lb", function() { return ignoreAllSysMsg; });
|
|
4119
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ic", function() { return searchType; });
|
|
4120
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "db", function() { return getSysParam; });
|
|
4121
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return getAdjunctProperties; });
|
|
4122
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Yc", function() { return uploads; });
|
|
4123
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xc", function() { return uploadOnlyOne; });
|
|
4124
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return getAdjunctFileInfos; });
|
|
4125
4125
|
/* unused harmony export uploadSort */
|
|
4126
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4127
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4128
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4129
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4130
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4131
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4126
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return downloadByAdjunctId; });
|
|
4127
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Wc", function() { return uploadDownloads; });
|
|
4128
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nb", function() { return previewAdjunct; });
|
|
4129
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ob", function() { return previewAdjunct2; });
|
|
4130
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pb", function() { return previewAdjunctOffice; });
|
|
4131
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return delAdjunct; });
|
|
4132
4132
|
/* unused harmony export upload_updateClassify */
|
|
4133
4133
|
/* unused harmony export getDeleteAdjunctFileInfos */
|
|
4134
4134
|
/* unused harmony export getPictureBase64 */
|
|
4135
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4136
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4137
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4135
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return getSelectorOrgTree; });
|
|
4136
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return getSelectorOrgDetail; });
|
|
4137
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return getOrgMainTree; });
|
|
4138
4138
|
/* unused harmony export getSelectOrgsubids */
|
|
4139
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4139
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return findSysCode; });
|
|
4140
4140
|
/* unused harmony export getDictList */
|
|
4141
4141
|
/* unused harmony export findUserBaseInfo */
|
|
4142
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4142
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jb", function() { return gethelpdoc; });
|
|
4143
4143
|
/* unused harmony export getCurrentuser */
|
|
4144
4144
|
/* unused harmony export mainDetail */
|
|
4145
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4146
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4147
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4145
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dc", function() { return toStartFlow; });
|
|
4146
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yc", function() { return tempSave; });
|
|
4147
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return commonOpion; });
|
|
4148
4148
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addCommonOpion; });
|
|
4149
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4150
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4151
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4152
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4153
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4154
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4155
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4156
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4157
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4158
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4159
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4160
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4149
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return editCommonOpion; });
|
|
4150
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fc", function() { return saveCommonOpinion; });
|
|
4151
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tc", function() { return updateCommonOpinion; });
|
|
4152
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return deleteCommonOpion; });
|
|
4153
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return getProcessDefList; });
|
|
4154
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return getNodeInfo; });
|
|
4155
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return findCodeValues; });
|
|
4156
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return findSysParam; });
|
|
4157
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return findSysCodes; });
|
|
4158
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return getNotificationMsg; });
|
|
4159
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return getHandleInfoHtml; });
|
|
4160
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pc", function() { return taskHandleHtml; });
|
|
4161
4161
|
/* unused harmony export getView */
|
|
4162
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4163
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4164
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4165
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4166
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4167
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4168
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4169
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4170
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4171
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4172
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4173
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4174
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4175
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4176
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4177
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4178
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4179
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4180
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4162
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Wb", function() { return register; });
|
|
4163
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mb", function() { return pendedhistoryList; });
|
|
4164
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hc", function() { return toTaskRejectHtml; });
|
|
4165
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rc", function() { return taskRejectHtml; });
|
|
4166
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ec", function() { return toStartTaskRead; });
|
|
4167
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fc", function() { return toStartTaskReadIndex; });
|
|
4168
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "qc", function() { return taskReadHtml; });
|
|
4169
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xb", function() { return rejectAndEnd; });
|
|
4170
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cc", function() { return toSendMsg; });
|
|
4171
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jc", function() { return sendMsg; });
|
|
4172
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return endFlowHtml; });
|
|
4173
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kb", function() { return handleInfo; });
|
|
4174
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ub", function() { return loginUserInfo; });
|
|
4175
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ad", function() { return wss; });
|
|
4176
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rc", function() { return topic; });
|
|
4177
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return getPresetCustomInfo; });
|
|
4178
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return getPresetNodeInfo; });
|
|
4179
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nc", function() { return toTaskTransferIndex; });
|
|
4180
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vc", function() { return taskTransfer; });
|
|
4181
4181
|
/* unused harmony export toPresetInfoListIndex */
|
|
4182
4182
|
/* unused harmony export deletePresetInfo */
|
|
4183
4183
|
/* unused harmony export historyListJson */
|
|
4184
4184
|
/* unused harmony export pendedhistoryListJson */
|
|
4185
4185
|
/* unused harmony export pressListJson */
|
|
4186
4186
|
/* unused harmony export deleteFlow */
|
|
4187
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4188
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4189
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4190
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4191
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4192
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4193
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4194
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4195
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4196
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4197
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4198
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4199
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4200
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4201
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4202
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4203
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4204
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4205
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4206
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4207
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4187
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sb", function() { return isCanStartSubFlow; });
|
|
4188
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Oc", function() { return toTaskUnionExamine; });
|
|
4189
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wc", function() { return taskUnionExamine; });
|
|
4190
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mc", function() { return toTaskTakeAdvice; });
|
|
4191
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uc", function() { return taskTakeAdvice; });
|
|
4192
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jc", function() { return toTaskStartDraft; });
|
|
4193
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kc", function() { return toTaskSupervise; });
|
|
4194
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lc", function() { return toTaskSuperviseSub; });
|
|
4195
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tc", function() { return taskStartDraft; });
|
|
4196
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ic", function() { return toTaskReview; });
|
|
4197
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sc", function() { return taskReview; });
|
|
4198
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pc", function() { return toTaskUnionSeal; });
|
|
4199
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xc", function() { return taskUnionSeal; });
|
|
4200
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qc", function() { return toTwoOfficesDispatch; });
|
|
4201
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sc", function() { return twoOfficesDispatch; });
|
|
4202
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bc", function() { return toResetProcessIndex; });
|
|
4203
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Yb", function() { return resetProcess; });
|
|
4204
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gc", function() { return toTaskContinuationIndex; });
|
|
4205
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "oc", function() { return taskContinuation; });
|
|
4206
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return getFreeStartFlowParams; });
|
|
4207
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return freeStartFlowWithSubmitTask; });
|
|
4208
4208
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return checkForeignOrgStartedCircularRead; });
|
|
4209
4209
|
/* unused harmony export pendedhistoryListWithCircularReadJson */
|
|
4210
4210
|
/* unused harmony export fyListJson */
|
|
4211
4211
|
/* unused harmony export circularReadWithdraw */
|
|
4212
4212
|
/* unused harmony export taskReadWithDraw */
|
|
4213
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4213
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kc", function() { return startReadTransferHandleFlowWithTaskReadEnd; });
|
|
4214
4214
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return checkBusinessIdStartedReadTransferHandle; });
|
|
4215
4215
|
/* unused harmony export sendList */
|
|
4216
4216
|
/* unused harmony export sendInfo */
|
|
@@ -4219,56 +4219,56 @@ function normalizeComponent(
|
|
|
4219
4219
|
/* unused harmony export sendDelete */
|
|
4220
4220
|
/* unused harmony export sendBatch */
|
|
4221
4221
|
/* unused harmony export formContents */
|
|
4222
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4223
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4224
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4225
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4226
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4227
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4228
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4229
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4222
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return directStartTaskCircularRead; });
|
|
4223
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return endFlowAndStartTaskCircularRead; });
|
|
4224
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return getNodeInfoForStart; });
|
|
4225
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return freeStartFlow; });
|
|
4226
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gb", function() { return getUrgencyLevelChangedNotificationType; });
|
|
4227
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ac", function() { return toFreeTaskCircularRead; });
|
|
4228
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return freeTaskCircularRead; });
|
|
4229
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jb", function() { return pageLists; });
|
|
4230
4230
|
/* unused harmony export publishedLists */
|
|
4231
4231
|
/* unused harmony export pageInfo */
|
|
4232
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4233
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4234
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4235
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4232
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ib", function() { return pageGroup; });
|
|
4233
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kb", function() { return pageSave; });
|
|
4234
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lb", function() { return pageUpdate; });
|
|
4235
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hb", function() { return pageDelete; });
|
|
4236
4236
|
/* unused harmony export pageTargetDelete */
|
|
4237
4237
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return batchSave; });
|
|
4238
4238
|
/* unused harmony export batchUpdate */
|
|
4239
4239
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return batchDelete; });
|
|
4240
4240
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return batchList; });
|
|
4241
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4242
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4243
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4244
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4245
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4246
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4247
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4248
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4249
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4250
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4251
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4252
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4253
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4254
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4255
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4256
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4257
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4258
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4259
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4241
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sb", function() { return processListJson; });
|
|
4242
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rb", function() { return processInfo; });
|
|
4243
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qb", function() { return processDeleteJson; });
|
|
4244
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tb", function() { return processSave; });
|
|
4245
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ub", function() { return processUpdate; });
|
|
4246
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Eb", function() { return nodeListJson; });
|
|
4247
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cb", function() { return nodeDeleteJson; });
|
|
4248
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fb", function() { return nodeSave; });
|
|
4249
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gb", function() { return nodeUpdate; });
|
|
4250
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Db", function() { return nodeInfo; });
|
|
4251
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zb", function() { return moduleListJson; });
|
|
4252
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yb", function() { return moduleInfo; });
|
|
4253
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xb", function() { return moduleDelete; });
|
|
4254
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ab", function() { return moduleSave; });
|
|
4255
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bb", function() { return moduleUpdate; });
|
|
4256
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bc", function() { return ruleListJson; });
|
|
4257
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ac", function() { return ruleEdit; });
|
|
4258
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cc", function() { return ruleRead; });
|
|
4259
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dc", function() { return ruleSave; });
|
|
4260
4260
|
/* unused harmony export ruleSupplement */
|
|
4261
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4262
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4263
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4261
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ec", function() { return ruleUndore; });
|
|
4262
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Zb", function() { return ruleAdd; });
|
|
4263
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return companyDetail; });
|
|
4264
4264
|
/* unused harmony export issueDetailList */
|
|
4265
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4266
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4267
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4268
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4269
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4270
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4271
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
4265
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return deleteRule; });
|
|
4266
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eb", function() { return getSysParamV1; });
|
|
4267
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return companyList; });
|
|
4268
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lc", function() { return supplement; });
|
|
4269
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rb", function() { return isAddSource; });
|
|
4270
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zc", function() { return tiggerInTime; });
|
|
4271
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Uc", function() { return updateHistory; });
|
|
4272
4272
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return auditTrajectory; });
|
|
4273
4273
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return changeInTime; });
|
|
4274
4274
|
var flowPendingPrefix = window.flowPendingPrefix || localStorage.getItem('flowPendingPrefix') || '/bpm';
|
|
@@ -4690,736 +4690,759 @@ var changeInTime = '/baseIssueRules/changeInTime';
|
|
|
4690
4690
|
/* unused harmony export getSecond */
|
|
4691
4691
|
/* unused harmony export getWeekday */
|
|
4692
4692
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return timeCycle; });
|
|
4693
|
-
|
|
4694
|
-
|
|
4693
|
+
/* Modified from https://github.com/taylorhakes/fecha
|
|
4694
|
+
*
|
|
4695
|
+
* The MIT License (MIT)
|
|
4696
|
+
*
|
|
4697
|
+
* Copyright (c) 2015 Taylor Hakes
|
|
4698
|
+
*
|
|
4699
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4700
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
4701
|
+
* in the Software without restriction, including without limitation the rights
|
|
4702
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4703
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
4704
|
+
* furnished to do so, subject to the following conditions:
|
|
4705
|
+
*
|
|
4706
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
4707
|
+
* copies or substantial portions of the Software.
|
|
4708
|
+
*
|
|
4709
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4710
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4711
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
4712
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4713
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4714
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4715
|
+
* SOFTWARE.
|
|
4716
|
+
*/
|
|
4717
|
+
|
|
4718
|
+
/*eslint-disable*/
|
|
4719
|
+
// 把 YYYY-MM-DD 改成了 yyyy-MM-dd
|
|
4720
|
+
|
|
4721
|
+
|
|
4695
4722
|
/**
|
|
4696
4723
|
* Parse or format dates
|
|
4697
4724
|
* @class fecha
|
|
4698
|
-
*/
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
function regexEscape(str) {
|
|
4709
|
-
return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
|
|
4710
|
-
}
|
|
4711
|
-
|
|
4712
|
-
function shorten(arr, sLen) {
|
|
4713
|
-
|
|
4714
|
-
for (
|
|
4715
|
-
newArr.push(arr[i].substr(0, sLen));
|
|
4716
|
-
}
|
|
4717
|
-
return newArr;
|
|
4718
|
-
}
|
|
4719
|
-
|
|
4720
|
-
function monthUpdate() {
|
|
4721
|
-
return function (d, v) {
|
|
4722
|
-
|
|
4723
|
-
if (~index) {
|
|
4724
|
-
d.month = index;
|
|
4725
|
-
}
|
|
4726
|
-
};
|
|
4727
|
-
}
|
|
4728
|
-
|
|
4729
|
-
function pad(val, len) {
|
|
4730
|
-
val = String(val);
|
|
4731
|
-
len = len || 2;
|
|
4732
|
-
while (val.length < len) {
|
|
4733
|
-
val = '0' + val;
|
|
4734
|
-
}
|
|
4735
|
-
return val;
|
|
4736
|
-
}
|
|
4737
|
-
|
|
4738
|
-
// 直接使用中文日期名称常量
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
return D + '日';
|
|
4746
|
-
};
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
D: function
|
|
4750
|
-
return dateObj.getDay();
|
|
4751
|
-
},
|
|
4752
|
-
DD: function
|
|
4753
|
-
return pad(dateObj.getDay());
|
|
4754
|
-
},
|
|
4755
|
-
Do: function
|
|
4756
|
-
return DoFn(dateObj.getDate());
|
|
4757
|
-
},
|
|
4758
|
-
d: function
|
|
4759
|
-
return dateObj.getDate();
|
|
4760
|
-
},
|
|
4761
|
-
dd: function
|
|
4762
|
-
return pad(dateObj.getDate());
|
|
4763
|
-
},
|
|
4764
|
-
ddd: function
|
|
4765
|
-
return dayNamesShort[dateObj.getDay()];
|
|
4766
|
-
},
|
|
4767
|
-
dddd: function
|
|
4768
|
-
return dayNames[dateObj.getDay()];
|
|
4769
|
-
},
|
|
4770
|
-
M: function
|
|
4771
|
-
return dateObj.getMonth() + 1;
|
|
4772
|
-
},
|
|
4773
|
-
MM: function
|
|
4774
|
-
return pad(dateObj.getMonth() + 1);
|
|
4775
|
-
},
|
|
4776
|
-
MMM: function
|
|
4777
|
-
return monthNamesShort[dateObj.getMonth()];
|
|
4778
|
-
},
|
|
4779
|
-
MMMM: function
|
|
4780
|
-
return monthNames[dateObj.getMonth()];
|
|
4781
|
-
},
|
|
4782
|
-
yy: function
|
|
4783
|
-
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
4784
|
-
},
|
|
4785
|
-
yyyy: function
|
|
4786
|
-
return pad(dateObj.getFullYear(), 4);
|
|
4787
|
-
},
|
|
4788
|
-
h: function
|
|
4789
|
-
return dateObj.getHours() % 12 || 12;
|
|
4790
|
-
},
|
|
4791
|
-
hh: function
|
|
4792
|
-
return pad(dateObj.getHours() % 12 || 12);
|
|
4793
|
-
},
|
|
4794
|
-
H: function
|
|
4795
|
-
return dateObj.getHours();
|
|
4796
|
-
},
|
|
4797
|
-
HH: function
|
|
4798
|
-
return pad(dateObj.getHours());
|
|
4799
|
-
},
|
|
4800
|
-
m: function
|
|
4801
|
-
return dateObj.getMinutes();
|
|
4802
|
-
},
|
|
4803
|
-
mm: function
|
|
4804
|
-
return pad(dateObj.getMinutes());
|
|
4805
|
-
},
|
|
4806
|
-
s: function
|
|
4807
|
-
return dateObj.getSeconds();
|
|
4808
|
-
},
|
|
4809
|
-
ss: function
|
|
4810
|
-
return pad(dateObj.getSeconds());
|
|
4811
|
-
},
|
|
4812
|
-
S: function
|
|
4813
|
-
return Math.round(dateObj.getMilliseconds() / 100);
|
|
4814
|
-
},
|
|
4815
|
-
SS: function
|
|
4816
|
-
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
4817
|
-
},
|
|
4818
|
-
SSS: function
|
|
4819
|
-
return pad(dateObj.getMilliseconds(), 3);
|
|
4820
|
-
},
|
|
4821
|
-
a: function
|
|
4822
|
-
return dateObj.getHours() < 12 ? '上午' : '下午';
|
|
4823
|
-
},
|
|
4824
|
-
A: function
|
|
4825
|
-
return dateObj.getHours() < 12 ? '上午' : '下午';
|
|
4826
|
-
},
|
|
4827
|
-
ZZ: function
|
|
4828
|
-
|
|
4829
|
-
return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
4830
|
-
}
|
|
4831
|
-
};
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
d: [twoDigits, function (d, v) {
|
|
4835
|
-
d.day = v;
|
|
4836
|
-
}],
|
|
4837
|
-
Do: [twoDigits + word, function (d, v) {
|
|
4838
|
-
d.day = parseInt(v, 10);
|
|
4839
|
-
}],
|
|
4840
|
-
M: [twoDigits, function (d, v) {
|
|
4841
|
-
d.month = v - 1;
|
|
4842
|
-
}],
|
|
4843
|
-
yy: [twoDigits, function (d, v) {
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
}
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
parseFlags.
|
|
4892
|
-
parseFlags.
|
|
4893
|
-
parseFlags.
|
|
4894
|
-
parseFlags.
|
|
4895
|
-
parseFlags.
|
|
4896
|
-
parseFlags.
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4725
|
+
*/
|
|
4726
|
+
const fecha = {};
|
|
4727
|
+
const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
4728
|
+
const twoDigits = '\\d\\d?';
|
|
4729
|
+
const threeDigits = '\\d{3}';
|
|
4730
|
+
const fourDigits = '\\d{4}';
|
|
4731
|
+
const word = '[^\\s]+';
|
|
4732
|
+
const literal = /\[([^]*?)\]/gm;
|
|
4733
|
+
const noop = function () {};
|
|
4734
|
+
|
|
4735
|
+
function regexEscape(str) {
|
|
4736
|
+
return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
|
|
4737
|
+
}
|
|
4738
|
+
|
|
4739
|
+
function shorten(arr, sLen) {
|
|
4740
|
+
const newArr = [];
|
|
4741
|
+
for (let i = 0, len = arr.length; i < len; i++) {
|
|
4742
|
+
newArr.push(arr[i].substr(0, sLen));
|
|
4743
|
+
}
|
|
4744
|
+
return newArr;
|
|
4745
|
+
}
|
|
4746
|
+
|
|
4747
|
+
function monthUpdate() {
|
|
4748
|
+
return function (d, v) {
|
|
4749
|
+
const index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
|
|
4750
|
+
if (~index) {
|
|
4751
|
+
d.month = index;
|
|
4752
|
+
}
|
|
4753
|
+
};
|
|
4754
|
+
}
|
|
4755
|
+
|
|
4756
|
+
function pad(val, len) {
|
|
4757
|
+
val = String(val);
|
|
4758
|
+
len = len || 2;
|
|
4759
|
+
while (val.length < len) {
|
|
4760
|
+
val = '0' + val;
|
|
4761
|
+
}
|
|
4762
|
+
return val;
|
|
4763
|
+
}
|
|
4764
|
+
|
|
4765
|
+
// 直接使用中文日期名称常量
|
|
4766
|
+
const dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
|
|
4767
|
+
const monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
|
|
4768
|
+
const monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
|
|
4769
|
+
const dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
|
|
4770
|
+
const amPm = ['上午', '下午'];
|
|
4771
|
+
const DoFn = function DoFn(D) {
|
|
4772
|
+
return D + '日';
|
|
4773
|
+
};
|
|
4774
|
+
|
|
4775
|
+
const formatFlags = {
|
|
4776
|
+
D: function(dateObj) {
|
|
4777
|
+
return dateObj.getDay();
|
|
4778
|
+
},
|
|
4779
|
+
DD: function(dateObj) {
|
|
4780
|
+
return pad(dateObj.getDay());
|
|
4781
|
+
},
|
|
4782
|
+
Do: function(dateObj) {
|
|
4783
|
+
return DoFn(dateObj.getDate());
|
|
4784
|
+
},
|
|
4785
|
+
d: function(dateObj) {
|
|
4786
|
+
return dateObj.getDate();
|
|
4787
|
+
},
|
|
4788
|
+
dd: function(dateObj) {
|
|
4789
|
+
return pad(dateObj.getDate());
|
|
4790
|
+
},
|
|
4791
|
+
ddd: function(dateObj) {
|
|
4792
|
+
return dayNamesShort[dateObj.getDay()];
|
|
4793
|
+
},
|
|
4794
|
+
dddd: function(dateObj) {
|
|
4795
|
+
return dayNames[dateObj.getDay()];
|
|
4796
|
+
},
|
|
4797
|
+
M: function(dateObj) {
|
|
4798
|
+
return dateObj.getMonth() + 1;
|
|
4799
|
+
},
|
|
4800
|
+
MM: function(dateObj) {
|
|
4801
|
+
return pad(dateObj.getMonth() + 1);
|
|
4802
|
+
},
|
|
4803
|
+
MMM: function(dateObj) {
|
|
4804
|
+
return monthNamesShort[dateObj.getMonth()];
|
|
4805
|
+
},
|
|
4806
|
+
MMMM: function(dateObj) {
|
|
4807
|
+
return monthNames[dateObj.getMonth()];
|
|
4808
|
+
},
|
|
4809
|
+
yy: function(dateObj) {
|
|
4810
|
+
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
4811
|
+
},
|
|
4812
|
+
yyyy: function(dateObj) {
|
|
4813
|
+
return pad(dateObj.getFullYear(), 4);
|
|
4814
|
+
},
|
|
4815
|
+
h: function(dateObj) {
|
|
4816
|
+
return dateObj.getHours() % 12 || 12;
|
|
4817
|
+
},
|
|
4818
|
+
hh: function(dateObj) {
|
|
4819
|
+
return pad(dateObj.getHours() % 12 || 12);
|
|
4820
|
+
},
|
|
4821
|
+
H: function(dateObj) {
|
|
4822
|
+
return dateObj.getHours();
|
|
4823
|
+
},
|
|
4824
|
+
HH: function(dateObj) {
|
|
4825
|
+
return pad(dateObj.getHours());
|
|
4826
|
+
},
|
|
4827
|
+
m: function(dateObj) {
|
|
4828
|
+
return dateObj.getMinutes();
|
|
4829
|
+
},
|
|
4830
|
+
mm: function(dateObj) {
|
|
4831
|
+
return pad(dateObj.getMinutes());
|
|
4832
|
+
},
|
|
4833
|
+
s: function(dateObj) {
|
|
4834
|
+
return dateObj.getSeconds();
|
|
4835
|
+
},
|
|
4836
|
+
ss: function(dateObj) {
|
|
4837
|
+
return pad(dateObj.getSeconds());
|
|
4838
|
+
},
|
|
4839
|
+
S: function(dateObj) {
|
|
4840
|
+
return Math.round(dateObj.getMilliseconds() / 100);
|
|
4841
|
+
},
|
|
4842
|
+
SS: function(dateObj) {
|
|
4843
|
+
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
4844
|
+
},
|
|
4845
|
+
SSS: function(dateObj) {
|
|
4846
|
+
return pad(dateObj.getMilliseconds(), 3);
|
|
4847
|
+
},
|
|
4848
|
+
a: function(dateObj) {
|
|
4849
|
+
return dateObj.getHours() < 12 ? '上午' : '下午';
|
|
4850
|
+
},
|
|
4851
|
+
A: function(dateObj) {
|
|
4852
|
+
return dateObj.getHours() < 12 ? '上午' : '下午';
|
|
4853
|
+
},
|
|
4854
|
+
ZZ: function(dateObj) {
|
|
4855
|
+
const o = dateObj.getTimezoneOffset();
|
|
4856
|
+
return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
4857
|
+
}
|
|
4858
|
+
};
|
|
4859
|
+
|
|
4860
|
+
const parseFlags = {
|
|
4861
|
+
d: [twoDigits, function (d, v) {
|
|
4862
|
+
d.day = v;
|
|
4863
|
+
}],
|
|
4864
|
+
Do: [twoDigits + word, function (d, v) {
|
|
4865
|
+
d.day = parseInt(v, 10);
|
|
4866
|
+
}],
|
|
4867
|
+
M: [twoDigits, function (d, v) {
|
|
4868
|
+
d.month = v - 1;
|
|
4869
|
+
}],
|
|
4870
|
+
yy: [twoDigits, function (d, v) {
|
|
4871
|
+
const da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2);
|
|
4872
|
+
d.year = '' + (v > 68 ? cent - 1 : cent) + v;
|
|
4873
|
+
}],
|
|
4874
|
+
h: [twoDigits, function (d, v) {
|
|
4875
|
+
d.hour = v;
|
|
4876
|
+
}],
|
|
4877
|
+
m: [twoDigits, function (d, v) {
|
|
4878
|
+
d.minute = v;
|
|
4879
|
+
}],
|
|
4880
|
+
s: [twoDigits, function (d, v) {
|
|
4881
|
+
d.second = v;
|
|
4882
|
+
}],
|
|
4883
|
+
yyyy: [fourDigits, function (d, v) {
|
|
4884
|
+
d.year = v;
|
|
4885
|
+
}],
|
|
4886
|
+
S: ['\\d', function (d, v) {
|
|
4887
|
+
d.millisecond = v * 100;
|
|
4888
|
+
}],
|
|
4889
|
+
SS: ['\\d{2}', function (d, v) {
|
|
4890
|
+
d.millisecond = v * 10;
|
|
4891
|
+
}],
|
|
4892
|
+
SSS: [threeDigits, function (d, v) {
|
|
4893
|
+
d.millisecond = v;
|
|
4894
|
+
}],
|
|
4895
|
+
D: [twoDigits, noop],
|
|
4896
|
+
ddd: [word, noop],
|
|
4897
|
+
MMM: [word, monthUpdate('monthNamesShort')],
|
|
4898
|
+
MMMM: [word, monthUpdate('monthNames')],
|
|
4899
|
+
a: [word, function (d, v) {
|
|
4900
|
+
const val = v.toLowerCase();
|
|
4901
|
+
if (val === '上午') {
|
|
4902
|
+
d.isPm = false;
|
|
4903
|
+
} else if (val === '下午') {
|
|
4904
|
+
d.isPm = true;
|
|
4905
|
+
}
|
|
4906
|
+
}],
|
|
4907
|
+
ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
|
|
4908
|
+
let parts = (v + '').match(/([+-]|\d\d)/gi), minutes;
|
|
4909
|
+
|
|
4910
|
+
if (parts) {
|
|
4911
|
+
minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
|
|
4912
|
+
d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
|
|
4913
|
+
}
|
|
4914
|
+
}]
|
|
4915
|
+
};
|
|
4916
|
+
parseFlags.dd = parseFlags.d;
|
|
4917
|
+
parseFlags.dddd = parseFlags.ddd;
|
|
4918
|
+
parseFlags.DD = parseFlags.D;
|
|
4919
|
+
parseFlags.mm = parseFlags.m;
|
|
4920
|
+
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
|
|
4921
|
+
parseFlags.MM = parseFlags.M;
|
|
4922
|
+
parseFlags.ss = parseFlags.s;
|
|
4923
|
+
parseFlags.A = parseFlags.a;
|
|
4924
|
+
|
|
4925
|
+
|
|
4926
|
+
// Some common format strings
|
|
4927
|
+
fecha.masks = {
|
|
4928
|
+
default: 'ddd MMM dd yyyy HH:mm:ss',
|
|
4929
|
+
shortDate: 'M/D/yy',
|
|
4930
|
+
mediumDate: 'MMM d, yyyy',
|
|
4931
|
+
longDate: 'MMMM d, yyyy',
|
|
4932
|
+
fullDate: 'dddd, MMMM d, yyyy',
|
|
4933
|
+
shortTime: 'HH:mm',
|
|
4934
|
+
mediumTime: 'HH:mm:ss',
|
|
4935
|
+
longTime: 'HH:mm:ss.SSS'
|
|
4936
|
+
};
|
|
4937
|
+
|
|
4912
4938
|
/***
|
|
4913
4939
|
* Format a date
|
|
4914
4940
|
* @method format
|
|
4915
4941
|
* @param {Date|number} dateObj
|
|
4916
4942
|
* @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
|
|
4917
|
-
*/
|
|
4918
|
-
fecha.format = function (dateObj, mask) {
|
|
4919
|
-
if (typeof dateObj === 'number') {
|
|
4920
|
-
dateObj = new Date(dateObj);
|
|
4921
|
-
}
|
|
4922
|
-
|
|
4923
|
-
if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
|
|
4924
|
-
throw new Error('Invalid Date in fecha.format');
|
|
4925
|
-
}
|
|
4926
|
-
|
|
4927
|
-
mask = fecha.masks[mask] || mask || fecha.masks['default'];
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
// Make literals inactive by replacing them with ??
|
|
4932
|
-
mask = mask.replace(literal, function
|
|
4933
|
-
literals.push($1);
|
|
4934
|
-
return '@@@';
|
|
4935
|
-
});
|
|
4936
|
-
// Apply formatting rules
|
|
4937
|
-
mask = mask.replace(token, function ($0) {
|
|
4938
|
-
return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
|
|
4939
|
-
});
|
|
4940
|
-
// Inline literal values back into the formatted value
|
|
4941
|
-
return mask.replace(/@@@/g, function
|
|
4942
|
-
return literals.shift();
|
|
4943
|
-
});
|
|
4944
|
-
};
|
|
4945
|
-
|
|
4943
|
+
*/
|
|
4944
|
+
fecha.format = function (dateObj, mask) {
|
|
4945
|
+
if (typeof dateObj === 'number') {
|
|
4946
|
+
dateObj = new Date(dateObj);
|
|
4947
|
+
}
|
|
4948
|
+
|
|
4949
|
+
if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
|
|
4950
|
+
throw new Error('Invalid Date in fecha.format');
|
|
4951
|
+
}
|
|
4952
|
+
|
|
4953
|
+
mask = fecha.masks[mask] || mask || fecha.masks['default'];
|
|
4954
|
+
|
|
4955
|
+
const literals = [];
|
|
4956
|
+
|
|
4957
|
+
// Make literals inactive by replacing them with ??
|
|
4958
|
+
mask = mask.replace(literal, function($0, $1) {
|
|
4959
|
+
literals.push($1);
|
|
4960
|
+
return '@@@';
|
|
4961
|
+
});
|
|
4962
|
+
// Apply formatting rules
|
|
4963
|
+
mask = mask.replace(token, function ($0) {
|
|
4964
|
+
return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
|
|
4965
|
+
});
|
|
4966
|
+
// Inline literal values back into the formatted value
|
|
4967
|
+
return mask.replace(/@@@/g, function() {
|
|
4968
|
+
return literals.shift();
|
|
4969
|
+
});
|
|
4970
|
+
};
|
|
4971
|
+
|
|
4946
4972
|
/**
|
|
4947
4973
|
* Parse a date string into an object, changes - into /
|
|
4948
4974
|
* @method parse
|
|
4949
4975
|
* @param {string} dateStr Date string
|
|
4950
4976
|
* @param {string} format Date parse format
|
|
4951
4977
|
* @returns {Date|boolean}
|
|
4952
|
-
*/
|
|
4953
|
-
fecha.parse = function (dateStr, format) {
|
|
4954
|
-
if (typeof format !== 'string') {
|
|
4955
|
-
throw new Error('Invalid format in fecha.parse');
|
|
4956
|
-
}
|
|
4957
|
-
|
|
4958
|
-
format = fecha.masks[format] || format;
|
|
4959
|
-
|
|
4960
|
-
// Avoid regular expression denial of service, fail early for really long strings
|
|
4961
|
-
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
|
|
4962
|
-
if (dateStr.length > 1000) {
|
|
4963
|
-
return null;
|
|
4964
|
-
}
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
format = format.replace(literal, function
|
|
4970
|
-
literals.push($1);
|
|
4971
|
-
return '@@@';
|
|
4972
|
-
});
|
|
4973
|
-
|
|
4974
|
-
if (parseFlags[$0]) {
|
|
4975
|
-
|
|
4976
|
-
parseInfo.push(info[1]);
|
|
4977
|
-
return '(' + info[0] + ')';
|
|
4978
|
-
}
|
|
4979
|
-
|
|
4980
|
-
return $0;
|
|
4981
|
-
});
|
|
4982
|
-
newFormat = newFormat.replace(/@@@/g, function
|
|
4983
|
-
return literals.shift();
|
|
4984
|
-
});
|
|
4985
|
-
|
|
4986
|
-
if (!matches) {
|
|
4987
|
-
return null;
|
|
4988
|
-
}
|
|
4989
|
-
|
|
4990
|
-
for (
|
|
4991
|
-
parseInfo[i - 1](dateInfo, matches[i]);
|
|
4992
|
-
}
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
4996
|
-
dateInfo.hour = +dateInfo.hour + 12;
|
|
4997
|
-
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
4998
|
-
dateInfo.hour = 0;
|
|
4999
|
-
}
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
if (dateInfo.timezoneOffset != null) {
|
|
5003
|
-
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
5004
|
-
date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
}
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
}
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
if (
|
|
5041
|
-
return
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
// 处理多种输入类型
|
|
5052
|
-
if (!date) return '';
|
|
5053
|
-
|
|
5054
|
-
// 如果是时间戳,转成日期对象
|
|
5055
|
-
if (typeof date === 'number') {
|
|
5056
|
-
date = new Date(date);
|
|
5057
|
-
}
|
|
5058
|
-
// 如果是字符串,转成日期对象
|
|
5059
|
-
if (typeof date === 'string') {
|
|
5060
|
-
date = new Date(date);
|
|
5061
|
-
}
|
|
5062
|
-
|
|
5063
|
-
// 调用toDate进一步验证和转换
|
|
5064
|
-
date = toDate(date);
|
|
5065
|
-
if (!date) return '';
|
|
5066
|
-
|
|
5067
|
-
// 兼容大写和小写的格式标记
|
|
5068
|
-
// 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
return
|
|
5090
|
-
}
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
//
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
|
|
5114
|
-
};
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
return prevDate(result,
|
|
5128
|
-
}
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
//
|
|
5148
|
-
|
|
5149
|
-
//
|
|
5150
|
-
|
|
5151
|
-
//
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
for (
|
|
5171
|
-
hours[i] =
|
|
5172
|
-
}
|
|
5173
|
-
}
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
return
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
};
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
}
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
return
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
return
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
}
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
};
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
return
|
|
5335
|
-
};
|
|
5336
|
-
|
|
5337
|
-
var extractTimeFormat = function extractTimeFormat(format) {
|
|
5338
|
-
return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
|
|
5339
|
-
};
|
|
5340
|
-
|
|
5341
|
-
var validateRangeInOneMonth = function validateRangeInOneMonth(start, end) {
|
|
5342
|
-
return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
|
|
5343
|
-
};
|
|
5344
|
-
|
|
4978
|
+
*/
|
|
4979
|
+
fecha.parse = function (dateStr, format) {
|
|
4980
|
+
if (typeof format !== 'string') {
|
|
4981
|
+
throw new Error('Invalid format in fecha.parse');
|
|
4982
|
+
}
|
|
4983
|
+
|
|
4984
|
+
format = fecha.masks[format] || format;
|
|
4985
|
+
|
|
4986
|
+
// Avoid regular expression denial of service, fail early for really long strings
|
|
4987
|
+
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
|
|
4988
|
+
if (dateStr.length > 1000) {
|
|
4989
|
+
return null;
|
|
4990
|
+
}
|
|
4991
|
+
|
|
4992
|
+
const dateInfo = {};
|
|
4993
|
+
const parseInfo = [];
|
|
4994
|
+
const literals = [];
|
|
4995
|
+
format = format.replace(literal, function($0, $1) {
|
|
4996
|
+
literals.push($1);
|
|
4997
|
+
return '@@@';
|
|
4998
|
+
});
|
|
4999
|
+
let newFormat = regexEscape(format).replace(token, function ($0) {
|
|
5000
|
+
if (parseFlags[$0]) {
|
|
5001
|
+
const info = parseFlags[$0];
|
|
5002
|
+
parseInfo.push(info[1]);
|
|
5003
|
+
return '(' + info[0] + ')';
|
|
5004
|
+
}
|
|
5005
|
+
|
|
5006
|
+
return $0;
|
|
5007
|
+
});
|
|
5008
|
+
newFormat = newFormat.replace(/@@@/g, function() {
|
|
5009
|
+
return literals.shift();
|
|
5010
|
+
});
|
|
5011
|
+
const matches = dateStr.match(new RegExp(newFormat, 'i'));
|
|
5012
|
+
if (!matches) {
|
|
5013
|
+
return null;
|
|
5014
|
+
}
|
|
5015
|
+
|
|
5016
|
+
for (let i = 1; i < matches.length; i++) {
|
|
5017
|
+
parseInfo[i - 1](dateInfo, matches[i]);
|
|
5018
|
+
}
|
|
5019
|
+
|
|
5020
|
+
const today = new Date();
|
|
5021
|
+
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
5022
|
+
dateInfo.hour = +dateInfo.hour + 12;
|
|
5023
|
+
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
5024
|
+
dateInfo.hour = 0;
|
|
5025
|
+
}
|
|
5026
|
+
|
|
5027
|
+
let date;
|
|
5028
|
+
if (dateInfo.timezoneOffset != null) {
|
|
5029
|
+
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
5030
|
+
date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
|
|
5031
|
+
dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
|
|
5032
|
+
} else {
|
|
5033
|
+
date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
|
|
5034
|
+
dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
|
|
5035
|
+
}
|
|
5036
|
+
return date;
|
|
5037
|
+
};
|
|
5038
|
+
|
|
5039
|
+
// 导出fecha对象
|
|
5040
|
+
|
|
5041
|
+
|
|
5042
|
+
// 以下是从date-util.js合并的函数
|
|
5043
|
+
const newArray = function(start, end) {
|
|
5044
|
+
let result = [];
|
|
5045
|
+
for (let i = start; i <= end; i++) {
|
|
5046
|
+
result.push(i);
|
|
5047
|
+
}
|
|
5048
|
+
return result;
|
|
5049
|
+
};
|
|
5050
|
+
|
|
5051
|
+
const getSettings = () => {
|
|
5052
|
+
return {
|
|
5053
|
+
dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
|
|
5054
|
+
dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
|
5055
|
+
monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
5056
|
+
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
|
5057
|
+
amPm: ['上午', '下午']
|
|
5058
|
+
};
|
|
5059
|
+
};
|
|
5060
|
+
|
|
5061
|
+
const toDate = function(date) {
|
|
5062
|
+
return isDate(date) ? new Date(date) : null;
|
|
5063
|
+
};
|
|
5064
|
+
|
|
5065
|
+
const isDate = function(date) {
|
|
5066
|
+
if (date === null || date === undefined) return false;
|
|
5067
|
+
if (isNaN(new Date(date).getTime())) return false;
|
|
5068
|
+
if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
|
|
5069
|
+
return true;
|
|
5070
|
+
};
|
|
5071
|
+
|
|
5072
|
+
const isDateObject = function(val) {
|
|
5073
|
+
return val instanceof Date;
|
|
5074
|
+
};
|
|
5075
|
+
|
|
5076
|
+
const formatDate = function (date, format = 'yyyy-MM-dd') {
|
|
5077
|
+
// 处理多种输入类型
|
|
5078
|
+
if (!date) return '';
|
|
5079
|
+
|
|
5080
|
+
// 如果是时间戳,转成日期对象
|
|
5081
|
+
if (typeof date === 'number') {
|
|
5082
|
+
date = new Date(date);
|
|
5083
|
+
}
|
|
5084
|
+
// 如果是字符串,转成日期对象
|
|
5085
|
+
if (typeof date === 'string') {
|
|
5086
|
+
date = new Date(date);
|
|
5087
|
+
}
|
|
5088
|
+
|
|
5089
|
+
// 调用toDate进一步验证和转换
|
|
5090
|
+
date = toDate(date);
|
|
5091
|
+
if (!date) return '';
|
|
5092
|
+
|
|
5093
|
+
// 兼容大写和小写的格式标记
|
|
5094
|
+
// 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
|
|
5095
|
+
const lowercaseFormat = format
|
|
5096
|
+
.replace(/YYYY/g, 'yyyy')
|
|
5097
|
+
.replace(/D/g, 'd')
|
|
5098
|
+
|
|
5099
|
+
// 使用fecha库进行格式化,支持中文配置
|
|
5100
|
+
const str = fecha.format(date, lowercaseFormat, getSettings());
|
|
5101
|
+
return str;
|
|
5102
|
+
};
|
|
5103
|
+
|
|
5104
|
+
const parseDate = function(string, format) {
|
|
5105
|
+
return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
|
|
5106
|
+
};
|
|
5107
|
+
|
|
5108
|
+
const getDayCountOfMonth = function(year, month) {
|
|
5109
|
+
if (month === 3 || month === 5 || month === 8 || month === 10) {
|
|
5110
|
+
return 30;
|
|
5111
|
+
}
|
|
5112
|
+
|
|
5113
|
+
if (month === 1) {
|
|
5114
|
+
if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
|
|
5115
|
+
return 29;
|
|
5116
|
+
} else {
|
|
5117
|
+
return 28;
|
|
5118
|
+
}
|
|
5119
|
+
}
|
|
5120
|
+
|
|
5121
|
+
return 31;
|
|
5122
|
+
};
|
|
5123
|
+
|
|
5124
|
+
const getDayCountOfYear = function(year) {
|
|
5125
|
+
const isLeapYear = year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0);
|
|
5126
|
+
return isLeapYear ? 366 : 365;
|
|
5127
|
+
};
|
|
5128
|
+
|
|
5129
|
+
const getFirstDayOfMonth = function(date) {
|
|
5130
|
+
const temp = new Date(date.getTime());
|
|
5131
|
+
temp.setDate(1);
|
|
5132
|
+
return temp.getDay();
|
|
5133
|
+
};
|
|
5134
|
+
|
|
5135
|
+
// see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
|
|
5136
|
+
// {prev, next} Date should work for Daylight Saving Time
|
|
5137
|
+
// Adding 24 * 60 * 60 * 1000 does not work in the above scenario
|
|
5138
|
+
const prevDate = function(date, amount = 1) {
|
|
5139
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
|
|
5140
|
+
};
|
|
5141
|
+
|
|
5142
|
+
const nextDate = function(date, amount = 1) {
|
|
5143
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
|
|
5144
|
+
};
|
|
5145
|
+
|
|
5146
|
+
const getStartDateOfMonth = function(year, month) {
|
|
5147
|
+
const result = new Date(year, month, 1);
|
|
5148
|
+
const day = result.getDay();
|
|
5149
|
+
|
|
5150
|
+
if (day === 0) {
|
|
5151
|
+
return prevDate(result, 7);
|
|
5152
|
+
} else {
|
|
5153
|
+
return prevDate(result, day);
|
|
5154
|
+
}
|
|
5155
|
+
};
|
|
5156
|
+
|
|
5157
|
+
const getWeekNumber = function(date) {
|
|
5158
|
+
// 支持多种输入类型
|
|
5159
|
+
if (!date||!isDate(date)) {
|
|
5160
|
+
date = new Date();
|
|
5161
|
+
}
|
|
5162
|
+
if (typeof date === 'string') {
|
|
5163
|
+
date = new Date(date);
|
|
5164
|
+
}
|
|
5165
|
+
|
|
5166
|
+
// 验证日期有效性
|
|
5167
|
+
if (!isDate(date)) return null;
|
|
5168
|
+
|
|
5169
|
+
const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
|
|
5170
|
+
// 设置为最近的星期四:当前日期 + 4 - 当前星期数
|
|
5171
|
+
// 将星期日的星期数设为7
|
|
5172
|
+
d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
|
|
5173
|
+
// 获取当年的第一天
|
|
5174
|
+
const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
|
|
5175
|
+
// 计算到最近的星期四的完整周数
|
|
5176
|
+
const weekNo = Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
|
|
5177
|
+
// 返回周数
|
|
5178
|
+
return weekNo;
|
|
5179
|
+
};
|
|
5180
|
+
|
|
5181
|
+
const getRangeHours = function(ranges) {
|
|
5182
|
+
const hours = [];
|
|
5183
|
+
let disabledHours = [];
|
|
5184
|
+
|
|
5185
|
+
(ranges || []).forEach(range => {
|
|
5186
|
+
const value = range.map(date => date.getHours());
|
|
5187
|
+
|
|
5188
|
+
disabledHours = disabledHours.concat(newArray(value[0], value[1]));
|
|
5189
|
+
});
|
|
5190
|
+
|
|
5191
|
+
if (disabledHours.length) {
|
|
5192
|
+
for (let i = 0; i < 24; i++) {
|
|
5193
|
+
hours[i] = disabledHours.indexOf(i) === -1;
|
|
5194
|
+
}
|
|
5195
|
+
} else {
|
|
5196
|
+
for (let i = 0; i < 24; i++) {
|
|
5197
|
+
hours[i] = false;
|
|
5198
|
+
}
|
|
5199
|
+
}
|
|
5200
|
+
|
|
5201
|
+
return hours;
|
|
5202
|
+
};
|
|
5203
|
+
|
|
5204
|
+
const getPrevMonthLastDays = (date, amount) => {
|
|
5205
|
+
if (amount <= 0) return [];
|
|
5206
|
+
const temp = new Date(date.getTime());
|
|
5207
|
+
temp.setDate(0);
|
|
5208
|
+
const lastDay = temp.getDate();
|
|
5209
|
+
return range(amount).map((_, index) => lastDay - (amount - index - 1));
|
|
5210
|
+
};
|
|
5211
|
+
|
|
5212
|
+
const getMonthDays = (date) => {
|
|
5213
|
+
const temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
5214
|
+
const days = temp.getDate();
|
|
5215
|
+
return range(days).map((_, index) => index + 1);
|
|
5216
|
+
};
|
|
5217
|
+
|
|
5218
|
+
function setRangeData(arr, start, end, value) {
|
|
5219
|
+
for (let i = start; i < end; i++) {
|
|
5220
|
+
arr[i] = value;
|
|
5221
|
+
}
|
|
5222
|
+
}
|
|
5223
|
+
|
|
5224
|
+
const getRangeMinutes = function(ranges, hour) {
|
|
5225
|
+
const minutes = new Array(60);
|
|
5226
|
+
|
|
5227
|
+
if (ranges.length > 0) {
|
|
5228
|
+
ranges.forEach(range => {
|
|
5229
|
+
const start = range[0];
|
|
5230
|
+
const end = range[1];
|
|
5231
|
+
const startHour = start.getHours();
|
|
5232
|
+
const startMinute = start.getMinutes();
|
|
5233
|
+
const endHour = end.getHours();
|
|
5234
|
+
const endMinute = end.getMinutes();
|
|
5235
|
+
if (startHour === hour && endHour !== hour) {
|
|
5236
|
+
setRangeData(minutes, startMinute, 60, true);
|
|
5237
|
+
} else if (startHour === hour && endHour === hour) {
|
|
5238
|
+
setRangeData(minutes, startMinute, endMinute + 1, true);
|
|
5239
|
+
} else if (startHour !== hour && endHour === hour) {
|
|
5240
|
+
setRangeData(minutes, 0, endMinute + 1, true);
|
|
5241
|
+
} else if (startHour < hour && endHour > hour) {
|
|
5242
|
+
setRangeData(minutes, 0, 60, true);
|
|
5243
|
+
}
|
|
5244
|
+
});
|
|
5245
|
+
} else {
|
|
5246
|
+
setRangeData(minutes, 0, 60, true);
|
|
5247
|
+
}
|
|
5248
|
+
return minutes;
|
|
5249
|
+
};
|
|
5250
|
+
|
|
5251
|
+
const range = function(n) {
|
|
5252
|
+
// see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
|
|
5253
|
+
return Array.apply(null, {length: n}).map((_, n) => n);
|
|
5254
|
+
};
|
|
5255
|
+
|
|
5256
|
+
const modifyDate = function(date, y, m, d) {
|
|
5257
|
+
return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
|
|
5258
|
+
};
|
|
5259
|
+
|
|
5260
|
+
const modifyTime = function(date, h, m, s) {
|
|
5261
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
|
|
5262
|
+
};
|
|
5263
|
+
|
|
5264
|
+
const modifyWithTimeString = (date, time) => {
|
|
5265
|
+
if (date == null || !time) {
|
|
5266
|
+
return date;
|
|
5267
|
+
}
|
|
5268
|
+
time = parseDate(time, 'HH:mm:ss');
|
|
5269
|
+
return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
|
|
5270
|
+
};
|
|
5271
|
+
|
|
5272
|
+
const clearTime = function(date) {
|
|
5273
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
5274
|
+
};
|
|
5275
|
+
|
|
5276
|
+
const clearMilliseconds = function(date) {
|
|
5277
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
|
|
5278
|
+
};
|
|
5279
|
+
|
|
5280
|
+
const limitTimeRange = function(date, ranges, format = 'HH:mm:ss') {
|
|
5281
|
+
// TODO: refactory a more elegant solution
|
|
5282
|
+
if (ranges.length === 0) return date;
|
|
5283
|
+
const normalizeDate = date => fecha.parse(fecha.format(date, format), format);
|
|
5284
|
+
const ndate = normalizeDate(date);
|
|
5285
|
+
const nranges = ranges.map(range => range.map(normalizeDate));
|
|
5286
|
+
if (nranges.some(nrange => ndate >= nrange[0] && ndate <= nrange[1])) return date;
|
|
5287
|
+
|
|
5288
|
+
let minDate = nranges[0][0];
|
|
5289
|
+
let maxDate = nranges[0][0];
|
|
5290
|
+
|
|
5291
|
+
nranges.forEach(nrange => {
|
|
5292
|
+
minDate = new Date(Math.min(nrange[0], minDate));
|
|
5293
|
+
maxDate = new Date(Math.max(nrange[1], minDate));
|
|
5294
|
+
});
|
|
5295
|
+
|
|
5296
|
+
const ret = ndate < minDate ? minDate : maxDate;
|
|
5297
|
+
// preserve Year/Month/Date
|
|
5298
|
+
return modifyDate(
|
|
5299
|
+
ret,
|
|
5300
|
+
date.getFullYear(),
|
|
5301
|
+
date.getMonth(),
|
|
5302
|
+
date.getDate()
|
|
5303
|
+
);
|
|
5304
|
+
};
|
|
5305
|
+
|
|
5306
|
+
const timeWithinRange = function(date, selectableRange, format) {
|
|
5307
|
+
const limitedDate = limitTimeRange(date, selectableRange, format);
|
|
5308
|
+
return limitedDate.getTime() === date.getTime();
|
|
5309
|
+
};
|
|
5310
|
+
|
|
5311
|
+
const changeYearMonthAndClampDate = function(date, year, month) {
|
|
5312
|
+
// clamp date to the number of days in `year`, `month`
|
|
5313
|
+
// eg: (2010-1-31, 2010, 2) => 2010-2-28
|
|
5314
|
+
const monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
|
|
5315
|
+
return modifyDate(date, year, month, monthDate);
|
|
5316
|
+
};
|
|
5317
|
+
|
|
5318
|
+
const prevMonth = function(date) {
|
|
5319
|
+
const year = date.getFullYear();
|
|
5320
|
+
const month = date.getMonth();
|
|
5321
|
+
return month === 0
|
|
5322
|
+
? changeYearMonthAndClampDate(date, year - 1, 11)
|
|
5323
|
+
: changeYearMonthAndClampDate(date, year, month - 1);
|
|
5324
|
+
};
|
|
5325
|
+
|
|
5326
|
+
const nextMonth = function(date) {
|
|
5327
|
+
const year = date.getFullYear();
|
|
5328
|
+
const month = date.getMonth();
|
|
5329
|
+
return month === 11
|
|
5330
|
+
? changeYearMonthAndClampDate(date, year + 1, 0)
|
|
5331
|
+
: changeYearMonthAndClampDate(date, year, month + 1);
|
|
5332
|
+
};
|
|
5333
|
+
|
|
5334
|
+
const prevYear = function(date, amount = 1) {
|
|
5335
|
+
const year = date.getFullYear();
|
|
5336
|
+
const month = date.getMonth();
|
|
5337
|
+
return changeYearMonthAndClampDate(date, year - amount, month);
|
|
5338
|
+
};
|
|
5339
|
+
|
|
5340
|
+
const nextYear = function(date, amount = 1) {
|
|
5341
|
+
const year = date.getFullYear();
|
|
5342
|
+
const month = date.getMonth();
|
|
5343
|
+
return changeYearMonthAndClampDate(date, year + amount, month);
|
|
5344
|
+
};
|
|
5345
|
+
|
|
5346
|
+
const extractDateFormat = function(format) {
|
|
5347
|
+
return format
|
|
5348
|
+
.replace(/\W?m{1,2}|\W?ZZ/g, '')
|
|
5349
|
+
.replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '')
|
|
5350
|
+
.trim();
|
|
5351
|
+
};
|
|
5352
|
+
|
|
5353
|
+
const extractTimeFormat = function(format) {
|
|
5354
|
+
return format
|
|
5355
|
+
.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '')
|
|
5356
|
+
.trim();
|
|
5357
|
+
};
|
|
5358
|
+
|
|
5359
|
+
const validateRangeInOneMonth = function(start, end) {
|
|
5360
|
+
return (start.getMonth() === end.getMonth()) && (start.getFullYear() === end.getFullYear());
|
|
5361
|
+
};
|
|
5362
|
+
|
|
5345
5363
|
/**
|
|
5346
5364
|
* 计算两个日期之间的工作日数量(不包括周末和节假日)
|
|
5347
5365
|
* @param {string} start_date - 开始日期字符串,格式为 "YYYY-MM-DD"
|
|
5348
5366
|
* @param {string} end_date - 结束日期字符串,格式为 "YYYY-MM-DD"
|
|
5349
5367
|
* @param {Array<string>} holidays - 假期日期字符串数组,格式为 "YYYY-MM-DD"
|
|
5350
5368
|
* @returns {number} 工作日数量
|
|
5351
|
-
*/
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
}
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
|
|
5363
|
-
throw new Error(
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
}
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5369
|
+
*/
|
|
5370
|
+
const calculateNetworkDays = function (start_date, end_date, holidays = []) {
|
|
5371
|
+
if (typeof start_date !== 'string' || typeof end_date !== 'string') {
|
|
5372
|
+
throw new Error(
|
|
5373
|
+
"Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'."
|
|
5374
|
+
);
|
|
5375
|
+
}
|
|
5376
|
+
|
|
5377
|
+
const startDateObj = new Date(start_date);
|
|
5378
|
+
const endDateObj = new Date(end_date);
|
|
5379
|
+
|
|
5380
|
+
if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
|
|
5381
|
+
throw new Error(
|
|
5382
|
+
"Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'."
|
|
5383
|
+
);
|
|
5384
|
+
}
|
|
5385
|
+
|
|
5386
|
+
if (startDateObj > endDateObj) {
|
|
5387
|
+
throw new Error('Start date should be earlier than or equal to end date.');
|
|
5388
|
+
}
|
|
5389
|
+
|
|
5390
|
+
let workdays = 0;
|
|
5391
|
+
|
|
5392
|
+
// Iterate through each day in the date range
|
|
5393
|
+
for (
|
|
5394
|
+
let currentDate = new Date(startDateObj);
|
|
5395
|
+
currentDate <= endDateObj;
|
|
5396
|
+
currentDate.setDate(currentDate.getDate() + 1)
|
|
5397
|
+
) {
|
|
5398
|
+
// Check if the current day is a weekend (Saturday or Sunday)
|
|
5399
|
+
const isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
|
|
5400
|
+
|
|
5401
|
+
// Check if the current day is a holiday
|
|
5402
|
+
const isHoliday = holidays.some((holiday) => {
|
|
5403
|
+
const holidayDate = new Date(holiday);
|
|
5404
|
+
return currentDate.toDateString() === holidayDate.toDateString();
|
|
5405
|
+
});
|
|
5406
|
+
|
|
5407
|
+
// If it's a workday (not a weekend or holiday), increment the workdays count
|
|
5408
|
+
if (!isWeekend && !isHoliday) {
|
|
5409
|
+
workdays++;
|
|
5410
|
+
}
|
|
5411
|
+
}
|
|
5412
|
+
|
|
5413
|
+
return workdays;
|
|
5414
|
+
};
|
|
5415
|
+
|
|
5397
5416
|
/**
|
|
5398
5417
|
* 日期加减天数
|
|
5399
5418
|
* @param {string} start_date - 起始日期字符串,格式为 "YYYY-MM-DD"
|
|
5400
5419
|
* @param {number} days - 要加上或减去的天数,正数表示加,负数表示减
|
|
5401
5420
|
* @returns {string} 结果日期,格式为 "YYYY-MM-DD"
|
|
5402
|
-
*/
|
|
5403
|
-
|
|
5404
|
-
if (typeof start_date !== 'string' || !Number.isInteger(days)) {
|
|
5405
|
-
throw new Error(
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5421
|
+
*/
|
|
5422
|
+
const dateAddDays = function (start_date, days) {
|
|
5423
|
+
if (typeof start_date !== 'string' || !Number.isInteger(days)) {
|
|
5424
|
+
throw new Error(
|
|
5425
|
+
"Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD' and a valid integer for the number of days."
|
|
5426
|
+
);
|
|
5427
|
+
}
|
|
5428
|
+
|
|
5429
|
+
const startDateObj = new Date(start_date);
|
|
5430
|
+
if (isNaN(startDateObj.getTime())) {
|
|
5431
|
+
throw new Error(
|
|
5432
|
+
"Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
|
|
5433
|
+
);
|
|
5434
|
+
}
|
|
5435
|
+
|
|
5436
|
+
const resultDateObj = new Date(startDateObj);
|
|
5437
|
+
resultDateObj.setDate(resultDateObj.getDate() + days);
|
|
5438
|
+
|
|
5439
|
+
const resultYear = resultDateObj.getFullYear();
|
|
5440
|
+
const resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
|
|
5441
|
+
const resultDay = String(resultDateObj.getDate()).padStart(2, '0');
|
|
5442
|
+
|
|
5443
|
+
return `${resultYear}-${resultMonth}-${resultDay}`;
|
|
5444
|
+
};
|
|
5445
|
+
|
|
5423
5446
|
/**
|
|
5424
5447
|
* 计算两个日期之间的差值
|
|
5425
5448
|
* @date 2023年12月14日
|
|
@@ -5427,180 +5450,182 @@ var dateAddDays = function dateAddDays(start_date, days) {
|
|
|
5427
5450
|
* @param {String} end_date - 结束日期字符串
|
|
5428
5451
|
* @param {String} unit - 单位:year/month/day
|
|
5429
5452
|
* @returns {Number} 差值
|
|
5430
|
-
*/
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
if (unit === '
|
|
5444
|
-
return
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
}
|
|
5454
|
-
|
|
5453
|
+
*/
|
|
5454
|
+
const dateDiff = function (start_date, end_date, unit = 'day') {
|
|
5455
|
+
// Assuming date strings are in "YYYY-MM-DD" format
|
|
5456
|
+
var startDate = new Date(start_date);
|
|
5457
|
+
var endDate = new Date(end_date);
|
|
5458
|
+
|
|
5459
|
+
// If the date is invalid, return 0
|
|
5460
|
+
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
|
5461
|
+
return 0;
|
|
5462
|
+
}
|
|
5463
|
+
|
|
5464
|
+
if (unit === 'year') {
|
|
5465
|
+
return endDate.getFullYear() - startDate.getFullYear();
|
|
5466
|
+
} else if (unit === 'month') {
|
|
5467
|
+
return (
|
|
5468
|
+
(endDate.getFullYear() - startDate.getFullYear()) * 12 +
|
|
5469
|
+
(endDate.getMonth() - startDate.getMonth())
|
|
5470
|
+
);
|
|
5471
|
+
} else {
|
|
5472
|
+
// Default to day
|
|
5473
|
+
var timeDifference = endDate - startDate;
|
|
5474
|
+
// Calculate days (86400000 milliseconds per day)
|
|
5475
|
+
return Math.floor(timeDifference / 86400000);
|
|
5476
|
+
}
|
|
5477
|
+
};
|
|
5478
|
+
|
|
5455
5479
|
/**
|
|
5456
5480
|
* 获取月份中的日期
|
|
5457
5481
|
* @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
|
|
5458
5482
|
* @returns {number} 月份中的日期(1-31)
|
|
5459
|
-
*/
|
|
5460
|
-
|
|
5461
|
-
if (typeof date !== 'string') {
|
|
5462
|
-
throw new Error(
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5483
|
+
*/
|
|
5484
|
+
const dayOfMonth = function (date) {
|
|
5485
|
+
if (typeof date !== 'string') {
|
|
5486
|
+
throw new Error(
|
|
5487
|
+
"Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'."
|
|
5488
|
+
);
|
|
5489
|
+
}
|
|
5490
|
+
|
|
5491
|
+
const dateObj = new Date(date);
|
|
5492
|
+
if (isNaN(dateObj.getTime())) {
|
|
5493
|
+
throw new Error(
|
|
5494
|
+
"Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
|
|
5495
|
+
);
|
|
5496
|
+
}
|
|
5497
|
+
|
|
5498
|
+
return dateObj.getDate();
|
|
5499
|
+
};
|
|
5500
|
+
|
|
5473
5501
|
/**
|
|
5474
5502
|
* 获取当前日期
|
|
5475
5503
|
* @date 2022年5月7日
|
|
5476
5504
|
* @param {string} format - 日期格式,默认为'YYYY-MM-DD'
|
|
5477
5505
|
* @returns {string} 当前日期的格式化字符串
|
|
5478
|
-
*/
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
};
|
|
5484
|
-
|
|
5506
|
+
*/
|
|
5507
|
+
const getCurrentDate = function (format = 'YYYY-MM-DD') {
|
|
5508
|
+
return formatDate(new Date(), format);
|
|
5509
|
+
};
|
|
5510
|
+
|
|
5485
5511
|
/**
|
|
5486
5512
|
* 获取当前日期时间
|
|
5487
5513
|
* @date 2022年5月7日
|
|
5488
5514
|
* @param {string} format - 日期时间格式,默认为'YYYY-MM-DD HH:mm:ss'
|
|
5489
5515
|
* @returns {string} 当前日期时间的格式化字符串
|
|
5490
|
-
*/
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
};
|
|
5496
|
-
|
|
5516
|
+
*/
|
|
5517
|
+
const getCurrentDateTime = function (format = 'YYYY-MM-DD HH:mm:ss') {
|
|
5518
|
+
return formatDate(new Date(), format);
|
|
5519
|
+
};
|
|
5520
|
+
|
|
5497
5521
|
/**
|
|
5498
5522
|
* 获取小时
|
|
5499
5523
|
* @date 2022年5月7日
|
|
5500
5524
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
5501
5525
|
* @returns {number} 小时数(0-23)
|
|
5502
|
-
*/
|
|
5503
|
-
|
|
5504
|
-
if (!date) {
|
|
5505
|
-
return new Date().getHours();
|
|
5506
|
-
}
|
|
5507
|
-
if (typeof date === 'string') {
|
|
5508
|
-
date = new Date(date);
|
|
5509
|
-
}
|
|
5510
|
-
return date.getHours();
|
|
5511
|
-
};
|
|
5512
|
-
|
|
5526
|
+
*/
|
|
5527
|
+
const getHour = function (date) {
|
|
5528
|
+
if (!date) {
|
|
5529
|
+
return new Date().getHours();
|
|
5530
|
+
}
|
|
5531
|
+
if (typeof date === 'string') {
|
|
5532
|
+
date = new Date(date);
|
|
5533
|
+
}
|
|
5534
|
+
return date.getHours();
|
|
5535
|
+
};
|
|
5536
|
+
|
|
5513
5537
|
/**
|
|
5514
5538
|
* 获取分钟
|
|
5515
5539
|
* @date 2022年5月7日
|
|
5516
5540
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
5517
5541
|
* @returns {number} 分钟数(0-59)
|
|
5518
|
-
*/
|
|
5519
|
-
|
|
5520
|
-
if (!date) {
|
|
5521
|
-
return new Date().getMinutes();
|
|
5522
|
-
}
|
|
5523
|
-
if (typeof date === 'string') {
|
|
5524
|
-
date = new Date(date);
|
|
5525
|
-
}
|
|
5526
|
-
return date.getMinutes();
|
|
5527
|
-
};
|
|
5528
|
-
|
|
5542
|
+
*/
|
|
5543
|
+
const getMinute = function (date) {
|
|
5544
|
+
if (!date) {
|
|
5545
|
+
return new Date().getMinutes();
|
|
5546
|
+
}
|
|
5547
|
+
if (typeof date === 'string') {
|
|
5548
|
+
date = new Date(date);
|
|
5549
|
+
}
|
|
5550
|
+
return date.getMinutes();
|
|
5551
|
+
};
|
|
5552
|
+
|
|
5529
5553
|
/**
|
|
5530
5554
|
* 获取月份
|
|
5531
5555
|
* @date 2022年5月7日
|
|
5532
5556
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
5533
5557
|
* @returns {number} 月份数(1-12)
|
|
5534
|
-
*/
|
|
5535
|
-
|
|
5536
|
-
if (!date) {
|
|
5537
|
-
return new Date().getMonth() + 1;
|
|
5538
|
-
}
|
|
5539
|
-
if (typeof date === 'string') {
|
|
5540
|
-
date = new Date(date);
|
|
5541
|
-
}
|
|
5542
|
-
return date.getMonth() + 1;
|
|
5543
|
-
};
|
|
5544
|
-
|
|
5558
|
+
*/
|
|
5559
|
+
const getMonth = function (date) {
|
|
5560
|
+
if (!date) {
|
|
5561
|
+
return new Date().getMonth() + 1;
|
|
5562
|
+
}
|
|
5563
|
+
if (typeof date === 'string') {
|
|
5564
|
+
date = new Date(date);
|
|
5565
|
+
}
|
|
5566
|
+
return date.getMonth() + 1;
|
|
5567
|
+
};
|
|
5568
|
+
|
|
5545
5569
|
/**
|
|
5546
5570
|
* 获取秒
|
|
5547
5571
|
* @date 2022年5月7日
|
|
5548
5572
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
5549
5573
|
* @returns {number} 秒数(0-59)
|
|
5550
|
-
*/
|
|
5551
|
-
|
|
5552
|
-
if (!date) {
|
|
5553
|
-
return new Date().getSeconds();
|
|
5554
|
-
}
|
|
5555
|
-
if (typeof date === 'string') {
|
|
5556
|
-
date = new Date(date);
|
|
5557
|
-
}
|
|
5558
|
-
return date.getSeconds();
|
|
5559
|
-
};
|
|
5560
|
-
|
|
5574
|
+
*/
|
|
5575
|
+
const getSecond = function (date) {
|
|
5576
|
+
if (!date) {
|
|
5577
|
+
return new Date().getSeconds();
|
|
5578
|
+
}
|
|
5579
|
+
if (typeof date === 'string') {
|
|
5580
|
+
date = new Date(date);
|
|
5581
|
+
}
|
|
5582
|
+
return date.getSeconds();
|
|
5583
|
+
};
|
|
5584
|
+
|
|
5561
5585
|
/**
|
|
5562
5586
|
* 获取星期几
|
|
5563
5587
|
* @date 2022年5月7日
|
|
5564
5588
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
5565
5589
|
* @returns {number} 星期几(0-6,0表示星期日)
|
|
5566
|
-
*/
|
|
5567
|
-
|
|
5568
|
-
if (!date) {
|
|
5569
|
-
return new Date().getDay();
|
|
5570
|
-
}
|
|
5571
|
-
if (typeof date === 'string') {
|
|
5572
|
-
date = new Date(date);
|
|
5573
|
-
}
|
|
5574
|
-
return date.getDay();
|
|
5575
|
-
};
|
|
5576
|
-
|
|
5590
|
+
*/
|
|
5591
|
+
const getWeekday = function (date) {
|
|
5592
|
+
if (!date) {
|
|
5593
|
+
return new Date().getDay();
|
|
5594
|
+
}
|
|
5595
|
+
if (typeof date === 'string') {
|
|
5596
|
+
date = new Date(date);
|
|
5597
|
+
}
|
|
5598
|
+
return date.getDay();
|
|
5599
|
+
};
|
|
5600
|
+
|
|
5601
|
+
|
|
5577
5602
|
/**
|
|
5578
5603
|
* @desc 获取上午/下午/晚上
|
|
5579
5604
|
* @author huangbo
|
|
5580
5605
|
* @date 2022年5月7日
|
|
5581
5606
|
* @param {String} [time] - 时间
|
|
5582
|
-
**/
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
if (!time) {
|
|
5586
|
-
hour = new Date().getHours();
|
|
5587
|
-
} else if (typeof time === 'string') {
|
|
5588
|
-
// 从时间字符串中提取小时
|
|
5589
|
-
|
|
5590
|
-
if (match) {
|
|
5591
|
-
hour = parseInt(match[1], 10);
|
|
5592
|
-
}
|
|
5593
|
-
} else if (typeof time === 'number') {
|
|
5594
|
-
hour = time;
|
|
5595
|
-
}
|
|
5596
|
-
// 判断时间段
|
|
5597
|
-
if (hour >= 5 && hour < 12) {
|
|
5598
|
-
return '上午';
|
|
5599
|
-
} else if (hour >= 12 && hour < 18) {
|
|
5600
|
-
return '下午';
|
|
5601
|
-
} else {
|
|
5602
|
-
return '晚上';
|
|
5603
|
-
}
|
|
5607
|
+
**/
|
|
5608
|
+
const timeCycle = function (time) {
|
|
5609
|
+
let hour = 0;
|
|
5610
|
+
if (!time) {
|
|
5611
|
+
hour = new Date().getHours();
|
|
5612
|
+
} else if (typeof time === 'string') {
|
|
5613
|
+
// 从时间字符串中提取小时
|
|
5614
|
+
const match = time.match(/^(\d{1,2})/);
|
|
5615
|
+
if (match) {
|
|
5616
|
+
hour = parseInt(match[1], 10);
|
|
5617
|
+
}
|
|
5618
|
+
} else if (typeof time === 'number') {
|
|
5619
|
+
hour = time;
|
|
5620
|
+
}
|
|
5621
|
+
// 判断时间段
|
|
5622
|
+
if (hour >= 5 && hour < 12) {
|
|
5623
|
+
return '上午';
|
|
5624
|
+
} else if (hour >= 12 && hour < 18) {
|
|
5625
|
+
return '下午';
|
|
5626
|
+
} else {
|
|
5627
|
+
return '晚上';
|
|
5628
|
+
}
|
|
5604
5629
|
};
|
|
5605
5630
|
|
|
5606
5631
|
/***/ }),
|