eoss 0.1.0-alpha.25 → 0.1.0-alpha.26
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 +1000 -971
- package/lib/alert.js +2 -2
- package/lib/aside.js +2 -2
- package/lib/audit-trajectory.js +75 -71
- package/lib/autocomplete.js +2136 -1951
- 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 +12 -12
- package/lib/button.js +2 -2
- package/lib/ca-login.js +913 -888
- package/lib/calendar.js +872 -847
- package/lib/card.js +2 -2
- package/lib/carousel-item.js +905 -880
- package/lib/carousel.js +1042 -1017
- package/lib/cascader-panel.js +926 -901
- package/lib/cascader.js +2022 -1837
- package/lib/checkbox-button.js +2 -2
- package/lib/checkbox-group.js +1000 -971
- package/lib/checkbox.js +2 -2
- package/lib/col.js +2 -2
- package/lib/collapse-item.js +2174 -1980
- package/lib/collapse.js +2175 -1980
- package/lib/color-picker.js +1112 -952
- package/lib/config/api.js +3 -0
- package/lib/container.js +2 -2
- package/lib/cron.js +2 -2
- package/lib/data-table.js +1007 -978
- package/lib/date-picker.js +2142 -1957
- package/lib/dialog.js +910 -885
- package/lib/divider.js +2 -2
- package/lib/drawer.js +2 -2
- package/lib/dropdown-item.js +4 -4
- package/lib/dropdown-menu.js +1104 -944
- package/lib/dropdown.js +925 -900
- package/lib/email-login.js +999 -970
- package/lib/empty.js +2 -2
- package/lib/eoss.common.js +8751 -4166
- package/lib/flip.js +2 -2
- package/lib/flow-group.js +906 -881
- package/lib/flow.js +1112 -1083
- package/lib/flows.js +1010 -981
- package/lib/footer.js +2 -2
- package/lib/form-item.js +909 -884
- package/lib/form.js +2185 -1986
- package/lib/guide.js +620 -0
- package/lib/header.js +2 -2
- package/lib/icon.js +981 -952
- package/lib/icons.js +2 -2
- package/lib/image-viewer.js +907 -882
- package/lib/image.js +4 -4
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +2 -2
- package/lib/input-number.js +4 -4
- package/lib/input.js +910 -885
- package/lib/link.js +2 -2
- package/lib/loading.js +2 -2
- package/lib/login.js +1027 -998
- package/lib/lowcode.js +17336 -13510
- package/lib/main.js +14933 -14625
- package/lib/marquee.js +907 -882
- package/lib/menu-item-group.js +2 -2
- package/lib/menu-item.js +2 -2
- package/lib/menu.js +2011 -1826
- package/lib/message-box.js +923 -898
- package/lib/message.js +911 -886
- package/lib/notification.js +911 -886
- package/lib/option-group.js +2 -2
- package/lib/option.js +907 -882
- package/lib/page-header.js +2 -2
- package/lib/pagination.js +910 -885
- package/lib/phone-login.js +998 -969
- package/lib/popconfirm.js +12 -12
- package/lib/popover.js +2009 -1824
- package/lib/process-config.js +1015 -986
- package/lib/process-module.js +1001 -972
- package/lib/process-rule.js +1019 -990
- package/lib/progress.js +5 -5
- package/lib/qr-code.js +4 -4
- package/lib/qrcode-login.js +1057 -1028
- package/lib/radio-button.js +2 -2
- package/lib/radio-group.js +998 -969
- package/lib/radio.js +2 -2
- package/lib/rate.js +907 -882
- package/lib/row.js +2 -2
- package/lib/scrollbar.js +904 -879
- package/lib/select.js +2135 -1945
- package/lib/selector-panel.js +1009 -980
- package/lib/selector.js +1001 -972
- package/lib/slider.js +2 -2
- package/lib/step.js +2172 -1977
- package/lib/steps.js +907 -882
- package/lib/submenu.js +1119 -959
- package/lib/switch.js +907 -882
- package/lib/tab-pane.js +2 -2
- package/lib/table-column.js +906 -881
- package/lib/table.js +2236 -2047
- package/lib/tabs.js +911 -886
- package/lib/tag.js +2 -2
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/guide.css +1 -0
- package/lib/theme-chalk/icon.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/lowcode-view.css +1 -0
- package/lib/theme-chalk/lowcode.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/select-dropdown.css +1 -1
- package/lib/theme-chalk/select.css +1 -1
- package/lib/theme-chalk/wujie.css +1 -0
- package/lib/time-picker.js +1977 -1792
- package/lib/time-select.js +1978 -1793
- package/lib/timeline-item.js +2 -2
- package/lib/timeline.js +2 -2
- package/lib/tips.js +998 -969
- package/lib/toolbar.js +2 -2
- package/lib/tooltip.js +2006 -1821
- package/lib/transfer.js +916 -891
- package/lib/tree-group.js +978 -949
- package/lib/tree.js +999 -970
- package/lib/update-history.js +76 -72
- package/lib/upload.js +1028 -999
- package/lib/utils/frame.js +133 -0
- package/lib/wujie.js +5037 -0
- package/package.json +3 -2
- package/packages/cascader/src/cascader.vue +1 -1
- package/packages/date-picker/src/picker.vue +1 -1
- package/packages/form/src/form-item-render.vue +10 -6
- package/packages/guide/index.js +8 -0
- package/packages/guide/src/directive.js +47 -0
- package/packages/guide/src/guide.vue +89 -0
- package/packages/guide/src/manager.js +133 -0
- package/packages/input/src/input.vue +1 -1
- package/packages/lowcode/src/aside.vue +41 -8
- package/packages/lowcode/src/attribute/bind.vue +2 -4
- package/packages/lowcode/src/attribute/dependency.vue +3 -16
- package/packages/lowcode/src/attribute/function.vue +2 -4
- package/packages/lowcode/src/attribute/property.vue +3 -15
- package/packages/lowcode/src/attribute/styles.vue +105 -11
- package/packages/lowcode/src/attribute.vue +5 -35
- package/packages/lowcode/src/canvas.vue +223 -97
- package/packages/lowcode/src/iframe.vue +60 -0
- package/packages/lowcode/src/lowcode.vue +32 -8
- package/packages/lowcode/src/pages.vue +1 -1
- package/packages/lowcode/src/render.vue +312 -70
- package/packages/lowcode/src/util/source-generator.js +7 -11
- package/packages/lowcode/src/util/source-parser.js +1 -1
- package/packages/lowcode-view/index.js +1 -1
- package/packages/lowcode-view/src/Iframe.vue +55 -0
- package/packages/lowcode-view/src/Modulels.vue +239 -0
- package/packages/lowcode-view/src/render.vue +337 -0
- package/packages/lowcode-view/src/view.vue +763 -0
- package/packages/main/src/components/pages.vue +11 -2
- package/packages/main/src/event-center.js +160 -0
- package/packages/main/src/minxs.js +60 -90
- package/packages/progress/src/progress.vue +1 -1
- package/packages/select/src/select.vue +2 -1
- package/packages/theme-chalk/src/common/var.scss +34 -10
- package/packages/theme-chalk/src/guide.scss +93 -0
- package/packages/theme-chalk/src/icon.scss +425 -426
- package/packages/theme-chalk/src/index.scss +2 -0
- package/packages/theme-chalk/src/lowcode-view.scss +288 -0
- package/packages/theme-chalk/src/lowcode.scss +11 -1
- package/packages/theme-chalk/src/select-dropdown.scss +1 -1
- package/packages/theme-chalk/src/wujie.scss +5 -0
- package/packages/wujie/index.js +10 -0
- package/packages/wujie/src/wujie.vue +205 -0
- package/src/config/api.js +3 -0
- package/src/index.js +325 -319
- package/src/utils/frame.js +102 -0
- package/packages/lowcode/src/view.vue +0 -187
package/lib/selector.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 = 161);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -91,32 +91,32 @@ module.exports =
|
|
|
91
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
92
|
|
|
93
93
|
"use strict";
|
|
94
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
95
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
96
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
97
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
98
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
94
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return noop; });
|
|
95
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return hasOwn; });
|
|
96
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return toObject; });
|
|
97
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getValueByPath; });
|
|
98
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getPropByPath; });
|
|
99
99
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return generateId; });
|
|
100
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
100
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return valueEquals; });
|
|
101
101
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return escapeRegexpString; });
|
|
102
102
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return arrayFindIndex; });
|
|
103
103
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFind; });
|
|
104
104
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return coerceTruthyValueToArray; });
|
|
105
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
106
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
107
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
105
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return isIE; });
|
|
106
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return isEdge; });
|
|
107
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return isFirefox; });
|
|
108
108
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return autoprefixer; });
|
|
109
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
109
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return kebabCase; });
|
|
110
110
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return capitalize; });
|
|
111
111
|
/* unused harmony export looseEqual */
|
|
112
112
|
/* unused harmony export arrayEquals */
|
|
113
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
114
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
113
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return isEqual; });
|
|
114
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return rafThrottle; });
|
|
115
115
|
/* unused harmony export objToArray */
|
|
116
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
116
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return requestAnimationFrame; });
|
|
117
117
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return cancelAnimationFrame; });
|
|
118
118
|
/* unused harmony export debounce */
|
|
119
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
119
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return throttle; });
|
|
120
120
|
/* unused harmony export guid */
|
|
121
121
|
/* unused harmony export uid */
|
|
122
122
|
/* unused harmony export get */
|
|
@@ -124,7 +124,7 @@ module.exports =
|
|
|
124
124
|
/* unused harmony export cloneDeep */
|
|
125
125
|
/* unused harmony export grouping */
|
|
126
126
|
/* unused harmony export pager */
|
|
127
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
127
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getWinTop; });
|
|
128
128
|
/* unused harmony export getFileType */
|
|
129
129
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrUnique; });
|
|
130
130
|
/* unused harmony export average */
|
|
@@ -142,54 +142,54 @@ module.exports =
|
|
|
142
142
|
/* unused harmony export exportXls */
|
|
143
143
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return extend; });
|
|
144
144
|
/* unused harmony export getObjectType */
|
|
145
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
145
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getParams; });
|
|
146
146
|
/* unused harmony export getScript */
|
|
147
147
|
/* unused harmony export getStyle */
|
|
148
148
|
/* unused harmony export getTypeName */
|
|
149
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
149
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getTypePrefix; });
|
|
150
150
|
/* unused harmony export getValues */
|
|
151
151
|
/* unused harmony export getZoom */
|
|
152
152
|
/* unused harmony export getLength */
|
|
153
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
153
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return timestampUrl; });
|
|
154
154
|
/* unused harmony export hasChars */
|
|
155
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
156
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
157
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
158
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
155
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return identical; });
|
|
156
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return indexOfObj; });
|
|
157
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return isEmpty; });
|
|
158
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return isExist; });
|
|
159
159
|
/* unused harmony export isFunction */
|
|
160
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
161
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
162
|
-
/* harmony export
|
|
163
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
160
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return isObjectEqual; });
|
|
161
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return joinUrl; });
|
|
162
|
+
/* unused harmony export getHorizontalMargin */
|
|
163
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return layoutWaterfall; });
|
|
164
164
|
/* unused harmony export loadJs */
|
|
165
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
165
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return loading; });
|
|
166
166
|
/* unused harmony export lowerCase */
|
|
167
167
|
/* unused harmony export overbrim */
|
|
168
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
168
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return queryParams; });
|
|
169
169
|
/* unused harmony export receiveMessage */
|
|
170
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
170
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return renderIcon; });
|
|
171
171
|
/* unused harmony export replenish */
|
|
172
172
|
/* unused harmony export rmbToCapital */
|
|
173
173
|
/* unused harmony export setScale */
|
|
174
174
|
/* unused harmony export sendMessage */
|
|
175
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
175
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return setFavicon; });
|
|
176
176
|
/* unused harmony export sum */
|
|
177
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
177
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return startWith; });
|
|
178
178
|
/* unused harmony export takeLeft */
|
|
179
179
|
/* unused harmony export takeRight */
|
|
180
180
|
/* unused harmony export trimWhitespace */
|
|
181
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
181
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return toFixed; });
|
|
182
182
|
/* unused harmony export toFunction */
|
|
183
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
183
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return updateTheme; });
|
|
184
184
|
/* unused harmony export upperType */
|
|
185
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
186
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
187
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
185
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return urlJoinParams; });
|
|
186
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return uuid; });
|
|
187
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return watermark; });
|
|
188
188
|
/* unused harmony export winTopOpen */
|
|
189
189
|
/* unused harmony export confirm */
|
|
190
190
|
/* unused harmony export success */
|
|
191
191
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return error; });
|
|
192
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
192
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return warning; });
|
|
193
193
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
|
|
194
194
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
195
195
|
/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
|
|
@@ -2172,7 +2172,7 @@ var loadJs = function loadJs(url, callback) {
|
|
|
2172
2172
|
var loading = function loading() {
|
|
2173
2173
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '请求中...';
|
|
2174
2174
|
|
|
2175
|
-
var Loading = __webpack_require__(
|
|
2175
|
+
var Loading = __webpack_require__(17).default;
|
|
2176
2176
|
return Loading.service({
|
|
2177
2177
|
text: text,
|
|
2178
2178
|
spinner: 'es-icon-jiazai',
|
|
@@ -3344,7 +3344,7 @@ var getColor = function getColor($color, $n) {
|
|
|
3344
3344
|
var getLightness = function getLightness($v, $i, $isLight) {
|
|
3345
3345
|
var $value = $isLight ? $v + $brightnessStep1 * $i : $v - $brightnessStep2 * $i;
|
|
3346
3346
|
$value = $value < 1 ? $value : 1;
|
|
3347
|
-
return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "
|
|
3347
|
+
return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "U"])($value, 2);
|
|
3348
3348
|
};
|
|
3349
3349
|
|
|
3350
3350
|
/**
|
|
@@ -3368,7 +3368,7 @@ var getSaturation = function getSaturation($s, $i, $isLight) {
|
|
|
3368
3368
|
$saturation = 0.1;
|
|
3369
3369
|
}
|
|
3370
3370
|
$saturation = $saturation > 0.06 ? $saturation : 0.06;
|
|
3371
|
-
return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "
|
|
3371
|
+
return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "U"])($saturation, 2);
|
|
3372
3372
|
};
|
|
3373
3373
|
|
|
3374
3374
|
/**
|
|
@@ -3627,7 +3627,7 @@ function scrollMove(wrap) {
|
|
|
3627
3627
|
|
|
3628
3628
|
/***/ }),
|
|
3629
3629
|
|
|
3630
|
-
/***/
|
|
3630
|
+
/***/ 161:
|
|
3631
3631
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3632
3632
|
|
|
3633
3633
|
"use strict";
|
|
@@ -3643,7 +3643,7 @@ _src_selector__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].install = function
|
|
|
3643
3643
|
|
|
3644
3644
|
/***/ }),
|
|
3645
3645
|
|
|
3646
|
-
/***/
|
|
3646
|
+
/***/ 17:
|
|
3647
3647
|
/***/ (function(module, exports) {
|
|
3648
3648
|
|
|
3649
3649
|
module.exports = require("eoss/lib/loading");
|
|
@@ -3707,736 +3707,759 @@ module.exports = require("lodash/get");
|
|
|
3707
3707
|
/* unused harmony export getSecond */
|
|
3708
3708
|
/* unused harmony export getWeekday */
|
|
3709
3709
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return timeCycle; });
|
|
3710
|
-
|
|
3711
|
-
|
|
3710
|
+
/* Modified from https://github.com/taylorhakes/fecha
|
|
3711
|
+
*
|
|
3712
|
+
* The MIT License (MIT)
|
|
3713
|
+
*
|
|
3714
|
+
* Copyright (c) 2015 Taylor Hakes
|
|
3715
|
+
*
|
|
3716
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
3717
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
3718
|
+
* in the Software without restriction, including without limitation the rights
|
|
3719
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
3720
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
3721
|
+
* furnished to do so, subject to the following conditions:
|
|
3722
|
+
*
|
|
3723
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
3724
|
+
* copies or substantial portions of the Software.
|
|
3725
|
+
*
|
|
3726
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
3727
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
3728
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
3729
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
3730
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
3731
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
3732
|
+
* SOFTWARE.
|
|
3733
|
+
*/
|
|
3734
|
+
|
|
3735
|
+
/*eslint-disable*/
|
|
3736
|
+
// 把 YYYY-MM-DD 改成了 yyyy-MM-dd
|
|
3737
|
+
|
|
3738
|
+
|
|
3712
3739
|
/**
|
|
3713
3740
|
* Parse or format dates
|
|
3714
3741
|
* @class fecha
|
|
3715
|
-
*/
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
function regexEscape(str) {
|
|
3726
|
-
return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
|
|
3727
|
-
}
|
|
3728
|
-
|
|
3729
|
-
function shorten(arr, sLen) {
|
|
3730
|
-
|
|
3731
|
-
for (
|
|
3732
|
-
newArr.push(arr[i].substr(0, sLen));
|
|
3733
|
-
}
|
|
3734
|
-
return newArr;
|
|
3735
|
-
}
|
|
3736
|
-
|
|
3737
|
-
function monthUpdate() {
|
|
3738
|
-
return function (d, v) {
|
|
3739
|
-
|
|
3740
|
-
if (~index) {
|
|
3741
|
-
d.month = index;
|
|
3742
|
-
}
|
|
3743
|
-
};
|
|
3744
|
-
}
|
|
3745
|
-
|
|
3746
|
-
function pad(val, len) {
|
|
3747
|
-
val = String(val);
|
|
3748
|
-
len = len || 2;
|
|
3749
|
-
while (val.length < len) {
|
|
3750
|
-
val = '0' + val;
|
|
3751
|
-
}
|
|
3752
|
-
return val;
|
|
3753
|
-
}
|
|
3754
|
-
|
|
3755
|
-
// 直接使用中文日期名称常量
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
return D + '日';
|
|
3763
|
-
};
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
D: function
|
|
3767
|
-
return dateObj.getDay();
|
|
3768
|
-
},
|
|
3769
|
-
DD: function
|
|
3770
|
-
return pad(dateObj.getDay());
|
|
3771
|
-
},
|
|
3772
|
-
Do: function
|
|
3773
|
-
return DoFn(dateObj.getDate());
|
|
3774
|
-
},
|
|
3775
|
-
d: function
|
|
3776
|
-
return dateObj.getDate();
|
|
3777
|
-
},
|
|
3778
|
-
dd: function
|
|
3779
|
-
return pad(dateObj.getDate());
|
|
3780
|
-
},
|
|
3781
|
-
ddd: function
|
|
3782
|
-
return dayNamesShort[dateObj.getDay()];
|
|
3783
|
-
},
|
|
3784
|
-
dddd: function
|
|
3785
|
-
return dayNames[dateObj.getDay()];
|
|
3786
|
-
},
|
|
3787
|
-
M: function
|
|
3788
|
-
return dateObj.getMonth() + 1;
|
|
3789
|
-
},
|
|
3790
|
-
MM: function
|
|
3791
|
-
return pad(dateObj.getMonth() + 1);
|
|
3792
|
-
},
|
|
3793
|
-
MMM: function
|
|
3794
|
-
return monthNamesShort[dateObj.getMonth()];
|
|
3795
|
-
},
|
|
3796
|
-
MMMM: function
|
|
3797
|
-
return monthNames[dateObj.getMonth()];
|
|
3798
|
-
},
|
|
3799
|
-
yy: function
|
|
3800
|
-
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
3801
|
-
},
|
|
3802
|
-
yyyy: function
|
|
3803
|
-
return pad(dateObj.getFullYear(), 4);
|
|
3804
|
-
},
|
|
3805
|
-
h: function
|
|
3806
|
-
return dateObj.getHours() % 12 || 12;
|
|
3807
|
-
},
|
|
3808
|
-
hh: function
|
|
3809
|
-
return pad(dateObj.getHours() % 12 || 12);
|
|
3810
|
-
},
|
|
3811
|
-
H: function
|
|
3812
|
-
return dateObj.getHours();
|
|
3813
|
-
},
|
|
3814
|
-
HH: function
|
|
3815
|
-
return pad(dateObj.getHours());
|
|
3816
|
-
},
|
|
3817
|
-
m: function
|
|
3818
|
-
return dateObj.getMinutes();
|
|
3819
|
-
},
|
|
3820
|
-
mm: function
|
|
3821
|
-
return pad(dateObj.getMinutes());
|
|
3822
|
-
},
|
|
3823
|
-
s: function
|
|
3824
|
-
return dateObj.getSeconds();
|
|
3825
|
-
},
|
|
3826
|
-
ss: function
|
|
3827
|
-
return pad(dateObj.getSeconds());
|
|
3828
|
-
},
|
|
3829
|
-
S: function
|
|
3830
|
-
return Math.round(dateObj.getMilliseconds() / 100);
|
|
3831
|
-
},
|
|
3832
|
-
SS: function
|
|
3833
|
-
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
3834
|
-
},
|
|
3835
|
-
SSS: function
|
|
3836
|
-
return pad(dateObj.getMilliseconds(), 3);
|
|
3837
|
-
},
|
|
3838
|
-
a: function
|
|
3839
|
-
return dateObj.getHours() < 12 ? '上午' : '下午';
|
|
3840
|
-
},
|
|
3841
|
-
A: function
|
|
3842
|
-
return dateObj.getHours() < 12 ? '上午' : '下午';
|
|
3843
|
-
},
|
|
3844
|
-
ZZ: function
|
|
3845
|
-
|
|
3846
|
-
return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
3847
|
-
}
|
|
3848
|
-
};
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
d: [twoDigits, function (d, v) {
|
|
3852
|
-
d.day = v;
|
|
3853
|
-
}],
|
|
3854
|
-
Do: [twoDigits + word, function (d, v) {
|
|
3855
|
-
d.day = parseInt(v, 10);
|
|
3856
|
-
}],
|
|
3857
|
-
M: [twoDigits, function (d, v) {
|
|
3858
|
-
d.month = v - 1;
|
|
3859
|
-
}],
|
|
3860
|
-
yy: [twoDigits, function (d, v) {
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
}
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
parseFlags.
|
|
3909
|
-
parseFlags.
|
|
3910
|
-
parseFlags.
|
|
3911
|
-
parseFlags.
|
|
3912
|
-
parseFlags.
|
|
3913
|
-
parseFlags.
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3742
|
+
*/
|
|
3743
|
+
const fecha = {};
|
|
3744
|
+
const token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
3745
|
+
const twoDigits = '\\d\\d?';
|
|
3746
|
+
const threeDigits = '\\d{3}';
|
|
3747
|
+
const fourDigits = '\\d{4}';
|
|
3748
|
+
const word = '[^\\s]+';
|
|
3749
|
+
const literal = /\[([^]*?)\]/gm;
|
|
3750
|
+
const noop = function () {};
|
|
3751
|
+
|
|
3752
|
+
function regexEscape(str) {
|
|
3753
|
+
return str.replace(/[|\\{()[^$+*?.-]/g, '\\$&');
|
|
3754
|
+
}
|
|
3755
|
+
|
|
3756
|
+
function shorten(arr, sLen) {
|
|
3757
|
+
const newArr = [];
|
|
3758
|
+
for (let i = 0, len = arr.length; i < len; i++) {
|
|
3759
|
+
newArr.push(arr[i].substr(0, sLen));
|
|
3760
|
+
}
|
|
3761
|
+
return newArr;
|
|
3762
|
+
}
|
|
3763
|
+
|
|
3764
|
+
function monthUpdate() {
|
|
3765
|
+
return function (d, v) {
|
|
3766
|
+
const index = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].indexOf(v.toLowerCase());
|
|
3767
|
+
if (~index) {
|
|
3768
|
+
d.month = index;
|
|
3769
|
+
}
|
|
3770
|
+
};
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
function pad(val, len) {
|
|
3774
|
+
val = String(val);
|
|
3775
|
+
len = len || 2;
|
|
3776
|
+
while (val.length < len) {
|
|
3777
|
+
val = '0' + val;
|
|
3778
|
+
}
|
|
3779
|
+
return val;
|
|
3780
|
+
}
|
|
3781
|
+
|
|
3782
|
+
// 直接使用中文日期名称常量
|
|
3783
|
+
const dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
|
|
3784
|
+
const monthNames = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
|
|
3785
|
+
const monthNamesShort = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二'];
|
|
3786
|
+
const dayNamesShort = ['日', '一', '二', '三', '四', '五', '六'];
|
|
3787
|
+
const amPm = ['上午', '下午'];
|
|
3788
|
+
const DoFn = function DoFn(D) {
|
|
3789
|
+
return D + '日';
|
|
3790
|
+
};
|
|
3791
|
+
|
|
3792
|
+
const formatFlags = {
|
|
3793
|
+
D: function(dateObj) {
|
|
3794
|
+
return dateObj.getDay();
|
|
3795
|
+
},
|
|
3796
|
+
DD: function(dateObj) {
|
|
3797
|
+
return pad(dateObj.getDay());
|
|
3798
|
+
},
|
|
3799
|
+
Do: function(dateObj) {
|
|
3800
|
+
return DoFn(dateObj.getDate());
|
|
3801
|
+
},
|
|
3802
|
+
d: function(dateObj) {
|
|
3803
|
+
return dateObj.getDate();
|
|
3804
|
+
},
|
|
3805
|
+
dd: function(dateObj) {
|
|
3806
|
+
return pad(dateObj.getDate());
|
|
3807
|
+
},
|
|
3808
|
+
ddd: function(dateObj) {
|
|
3809
|
+
return dayNamesShort[dateObj.getDay()];
|
|
3810
|
+
},
|
|
3811
|
+
dddd: function(dateObj) {
|
|
3812
|
+
return dayNames[dateObj.getDay()];
|
|
3813
|
+
},
|
|
3814
|
+
M: function(dateObj) {
|
|
3815
|
+
return dateObj.getMonth() + 1;
|
|
3816
|
+
},
|
|
3817
|
+
MM: function(dateObj) {
|
|
3818
|
+
return pad(dateObj.getMonth() + 1);
|
|
3819
|
+
},
|
|
3820
|
+
MMM: function(dateObj) {
|
|
3821
|
+
return monthNamesShort[dateObj.getMonth()];
|
|
3822
|
+
},
|
|
3823
|
+
MMMM: function(dateObj) {
|
|
3824
|
+
return monthNames[dateObj.getMonth()];
|
|
3825
|
+
},
|
|
3826
|
+
yy: function(dateObj) {
|
|
3827
|
+
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
3828
|
+
},
|
|
3829
|
+
yyyy: function(dateObj) {
|
|
3830
|
+
return pad(dateObj.getFullYear(), 4);
|
|
3831
|
+
},
|
|
3832
|
+
h: function(dateObj) {
|
|
3833
|
+
return dateObj.getHours() % 12 || 12;
|
|
3834
|
+
},
|
|
3835
|
+
hh: function(dateObj) {
|
|
3836
|
+
return pad(dateObj.getHours() % 12 || 12);
|
|
3837
|
+
},
|
|
3838
|
+
H: function(dateObj) {
|
|
3839
|
+
return dateObj.getHours();
|
|
3840
|
+
},
|
|
3841
|
+
HH: function(dateObj) {
|
|
3842
|
+
return pad(dateObj.getHours());
|
|
3843
|
+
},
|
|
3844
|
+
m: function(dateObj) {
|
|
3845
|
+
return dateObj.getMinutes();
|
|
3846
|
+
},
|
|
3847
|
+
mm: function(dateObj) {
|
|
3848
|
+
return pad(dateObj.getMinutes());
|
|
3849
|
+
},
|
|
3850
|
+
s: function(dateObj) {
|
|
3851
|
+
return dateObj.getSeconds();
|
|
3852
|
+
},
|
|
3853
|
+
ss: function(dateObj) {
|
|
3854
|
+
return pad(dateObj.getSeconds());
|
|
3855
|
+
},
|
|
3856
|
+
S: function(dateObj) {
|
|
3857
|
+
return Math.round(dateObj.getMilliseconds() / 100);
|
|
3858
|
+
},
|
|
3859
|
+
SS: function(dateObj) {
|
|
3860
|
+
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
3861
|
+
},
|
|
3862
|
+
SSS: function(dateObj) {
|
|
3863
|
+
return pad(dateObj.getMilliseconds(), 3);
|
|
3864
|
+
},
|
|
3865
|
+
a: function(dateObj) {
|
|
3866
|
+
return dateObj.getHours() < 12 ? '上午' : '下午';
|
|
3867
|
+
},
|
|
3868
|
+
A: function(dateObj) {
|
|
3869
|
+
return dateObj.getHours() < 12 ? '上午' : '下午';
|
|
3870
|
+
},
|
|
3871
|
+
ZZ: function(dateObj) {
|
|
3872
|
+
const o = dateObj.getTimezoneOffset();
|
|
3873
|
+
return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
|
|
3874
|
+
}
|
|
3875
|
+
};
|
|
3876
|
+
|
|
3877
|
+
const parseFlags = {
|
|
3878
|
+
d: [twoDigits, function (d, v) {
|
|
3879
|
+
d.day = v;
|
|
3880
|
+
}],
|
|
3881
|
+
Do: [twoDigits + word, function (d, v) {
|
|
3882
|
+
d.day = parseInt(v, 10);
|
|
3883
|
+
}],
|
|
3884
|
+
M: [twoDigits, function (d, v) {
|
|
3885
|
+
d.month = v - 1;
|
|
3886
|
+
}],
|
|
3887
|
+
yy: [twoDigits, function (d, v) {
|
|
3888
|
+
const da = new Date(), cent = +('' + da.getFullYear()).substr(0, 2);
|
|
3889
|
+
d.year = '' + (v > 68 ? cent - 1 : cent) + v;
|
|
3890
|
+
}],
|
|
3891
|
+
h: [twoDigits, function (d, v) {
|
|
3892
|
+
d.hour = v;
|
|
3893
|
+
}],
|
|
3894
|
+
m: [twoDigits, function (d, v) {
|
|
3895
|
+
d.minute = v;
|
|
3896
|
+
}],
|
|
3897
|
+
s: [twoDigits, function (d, v) {
|
|
3898
|
+
d.second = v;
|
|
3899
|
+
}],
|
|
3900
|
+
yyyy: [fourDigits, function (d, v) {
|
|
3901
|
+
d.year = v;
|
|
3902
|
+
}],
|
|
3903
|
+
S: ['\\d', function (d, v) {
|
|
3904
|
+
d.millisecond = v * 100;
|
|
3905
|
+
}],
|
|
3906
|
+
SS: ['\\d{2}', function (d, v) {
|
|
3907
|
+
d.millisecond = v * 10;
|
|
3908
|
+
}],
|
|
3909
|
+
SSS: [threeDigits, function (d, v) {
|
|
3910
|
+
d.millisecond = v;
|
|
3911
|
+
}],
|
|
3912
|
+
D: [twoDigits, noop],
|
|
3913
|
+
ddd: [word, noop],
|
|
3914
|
+
MMM: [word, monthUpdate('monthNamesShort')],
|
|
3915
|
+
MMMM: [word, monthUpdate('monthNames')],
|
|
3916
|
+
a: [word, function (d, v) {
|
|
3917
|
+
const val = v.toLowerCase();
|
|
3918
|
+
if (val === '上午') {
|
|
3919
|
+
d.isPm = false;
|
|
3920
|
+
} else if (val === '下午') {
|
|
3921
|
+
d.isPm = true;
|
|
3922
|
+
}
|
|
3923
|
+
}],
|
|
3924
|
+
ZZ: ['[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z', function (d, v) {
|
|
3925
|
+
let parts = (v + '').match(/([+-]|\d\d)/gi), minutes;
|
|
3926
|
+
|
|
3927
|
+
if (parts) {
|
|
3928
|
+
minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
|
|
3929
|
+
d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
|
|
3930
|
+
}
|
|
3931
|
+
}]
|
|
3932
|
+
};
|
|
3933
|
+
parseFlags.dd = parseFlags.d;
|
|
3934
|
+
parseFlags.dddd = parseFlags.ddd;
|
|
3935
|
+
parseFlags.DD = parseFlags.D;
|
|
3936
|
+
parseFlags.mm = parseFlags.m;
|
|
3937
|
+
parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
|
|
3938
|
+
parseFlags.MM = parseFlags.M;
|
|
3939
|
+
parseFlags.ss = parseFlags.s;
|
|
3940
|
+
parseFlags.A = parseFlags.a;
|
|
3941
|
+
|
|
3942
|
+
|
|
3943
|
+
// Some common format strings
|
|
3944
|
+
fecha.masks = {
|
|
3945
|
+
default: 'ddd MMM dd yyyy HH:mm:ss',
|
|
3946
|
+
shortDate: 'M/D/yy',
|
|
3947
|
+
mediumDate: 'MMM d, yyyy',
|
|
3948
|
+
longDate: 'MMMM d, yyyy',
|
|
3949
|
+
fullDate: 'dddd, MMMM d, yyyy',
|
|
3950
|
+
shortTime: 'HH:mm',
|
|
3951
|
+
mediumTime: 'HH:mm:ss',
|
|
3952
|
+
longTime: 'HH:mm:ss.SSS'
|
|
3953
|
+
};
|
|
3954
|
+
|
|
3929
3955
|
/***
|
|
3930
3956
|
* Format a date
|
|
3931
3957
|
* @method format
|
|
3932
3958
|
* @param {Date|number} dateObj
|
|
3933
3959
|
* @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
|
|
3934
|
-
*/
|
|
3935
|
-
fecha.format = function (dateObj, mask) {
|
|
3936
|
-
if (typeof dateObj === 'number') {
|
|
3937
|
-
dateObj = new Date(dateObj);
|
|
3938
|
-
}
|
|
3939
|
-
|
|
3940
|
-
if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
|
|
3941
|
-
throw new Error('Invalid Date in fecha.format');
|
|
3942
|
-
}
|
|
3943
|
-
|
|
3944
|
-
mask = fecha.masks[mask] || mask || fecha.masks['default'];
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
// Make literals inactive by replacing them with ??
|
|
3949
|
-
mask = mask.replace(literal, function
|
|
3950
|
-
literals.push($1);
|
|
3951
|
-
return '@@@';
|
|
3952
|
-
});
|
|
3953
|
-
// Apply formatting rules
|
|
3954
|
-
mask = mask.replace(token, function ($0) {
|
|
3955
|
-
return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
|
|
3956
|
-
});
|
|
3957
|
-
// Inline literal values back into the formatted value
|
|
3958
|
-
return mask.replace(/@@@/g, function
|
|
3959
|
-
return literals.shift();
|
|
3960
|
-
});
|
|
3961
|
-
};
|
|
3962
|
-
|
|
3960
|
+
*/
|
|
3961
|
+
fecha.format = function (dateObj, mask) {
|
|
3962
|
+
if (typeof dateObj === 'number') {
|
|
3963
|
+
dateObj = new Date(dateObj);
|
|
3964
|
+
}
|
|
3965
|
+
|
|
3966
|
+
if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
|
|
3967
|
+
throw new Error('Invalid Date in fecha.format');
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
mask = fecha.masks[mask] || mask || fecha.masks['default'];
|
|
3971
|
+
|
|
3972
|
+
const literals = [];
|
|
3973
|
+
|
|
3974
|
+
// Make literals inactive by replacing them with ??
|
|
3975
|
+
mask = mask.replace(literal, function($0, $1) {
|
|
3976
|
+
literals.push($1);
|
|
3977
|
+
return '@@@';
|
|
3978
|
+
});
|
|
3979
|
+
// Apply formatting rules
|
|
3980
|
+
mask = mask.replace(token, function ($0) {
|
|
3981
|
+
return $0 in formatFlags ? formatFlags[$0](dateObj) : $0.slice(1, $0.length - 1);
|
|
3982
|
+
});
|
|
3983
|
+
// Inline literal values back into the formatted value
|
|
3984
|
+
return mask.replace(/@@@/g, function() {
|
|
3985
|
+
return literals.shift();
|
|
3986
|
+
});
|
|
3987
|
+
};
|
|
3988
|
+
|
|
3963
3989
|
/**
|
|
3964
3990
|
* Parse a date string into an object, changes - into /
|
|
3965
3991
|
* @method parse
|
|
3966
3992
|
* @param {string} dateStr Date string
|
|
3967
3993
|
* @param {string} format Date parse format
|
|
3968
3994
|
* @returns {Date|boolean}
|
|
3969
|
-
*/
|
|
3970
|
-
fecha.parse = function (dateStr, format) {
|
|
3971
|
-
if (typeof format !== 'string') {
|
|
3972
|
-
throw new Error('Invalid format in fecha.parse');
|
|
3973
|
-
}
|
|
3974
|
-
|
|
3975
|
-
format = fecha.masks[format] || format;
|
|
3976
|
-
|
|
3977
|
-
// Avoid regular expression denial of service, fail early for really long strings
|
|
3978
|
-
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
|
|
3979
|
-
if (dateStr.length > 1000) {
|
|
3980
|
-
return null;
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
format = format.replace(literal, function
|
|
3987
|
-
literals.push($1);
|
|
3988
|
-
return '@@@';
|
|
3989
|
-
});
|
|
3990
|
-
|
|
3991
|
-
if (parseFlags[$0]) {
|
|
3992
|
-
|
|
3993
|
-
parseInfo.push(info[1]);
|
|
3994
|
-
return '(' + info[0] + ')';
|
|
3995
|
-
}
|
|
3996
|
-
|
|
3997
|
-
return $0;
|
|
3998
|
-
});
|
|
3999
|
-
newFormat = newFormat.replace(/@@@/g, function
|
|
4000
|
-
return literals.shift();
|
|
4001
|
-
});
|
|
4002
|
-
|
|
4003
|
-
if (!matches) {
|
|
4004
|
-
return null;
|
|
4005
|
-
}
|
|
4006
|
-
|
|
4007
|
-
for (
|
|
4008
|
-
parseInfo[i - 1](dateInfo, matches[i]);
|
|
4009
|
-
}
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
4013
|
-
dateInfo.hour = +dateInfo.hour + 12;
|
|
4014
|
-
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
4015
|
-
dateInfo.hour = 0;
|
|
4016
|
-
}
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
if (dateInfo.timezoneOffset != null) {
|
|
4020
|
-
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
4021
|
-
date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
}
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
}
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
if (
|
|
4058
|
-
return
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
// 处理多种输入类型
|
|
4069
|
-
if (!date) return '';
|
|
4070
|
-
|
|
4071
|
-
// 如果是时间戳,转成日期对象
|
|
4072
|
-
if (typeof date === 'number') {
|
|
4073
|
-
date = new Date(date);
|
|
4074
|
-
}
|
|
4075
|
-
// 如果是字符串,转成日期对象
|
|
4076
|
-
if (typeof date === 'string') {
|
|
4077
|
-
date = new Date(date);
|
|
4078
|
-
}
|
|
4079
|
-
|
|
4080
|
-
// 调用toDate进一步验证和转换
|
|
4081
|
-
date = toDate(date);
|
|
4082
|
-
if (!date) return '';
|
|
4083
|
-
|
|
4084
|
-
// 兼容大写和小写的格式标记
|
|
4085
|
-
// 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
return
|
|
4107
|
-
}
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
//
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
|
|
4131
|
-
};
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
return prevDate(result,
|
|
4145
|
-
}
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
//
|
|
4165
|
-
|
|
4166
|
-
//
|
|
4167
|
-
|
|
4168
|
-
//
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
for (
|
|
4188
|
-
hours[i] =
|
|
4189
|
-
}
|
|
4190
|
-
}
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
return
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
};
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
}
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
return
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
return
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
}
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
};
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
return
|
|
4352
|
-
};
|
|
4353
|
-
|
|
4354
|
-
var extractTimeFormat = function extractTimeFormat(format) {
|
|
4355
|
-
return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '').trim();
|
|
4356
|
-
};
|
|
4357
|
-
|
|
4358
|
-
var validateRangeInOneMonth = function validateRangeInOneMonth(start, end) {
|
|
4359
|
-
return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
|
|
4360
|
-
};
|
|
4361
|
-
|
|
3995
|
+
*/
|
|
3996
|
+
fecha.parse = function (dateStr, format) {
|
|
3997
|
+
if (typeof format !== 'string') {
|
|
3998
|
+
throw new Error('Invalid format in fecha.parse');
|
|
3999
|
+
}
|
|
4000
|
+
|
|
4001
|
+
format = fecha.masks[format] || format;
|
|
4002
|
+
|
|
4003
|
+
// Avoid regular expression denial of service, fail early for really long strings
|
|
4004
|
+
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
|
|
4005
|
+
if (dateStr.length > 1000) {
|
|
4006
|
+
return null;
|
|
4007
|
+
}
|
|
4008
|
+
|
|
4009
|
+
const dateInfo = {};
|
|
4010
|
+
const parseInfo = [];
|
|
4011
|
+
const literals = [];
|
|
4012
|
+
format = format.replace(literal, function($0, $1) {
|
|
4013
|
+
literals.push($1);
|
|
4014
|
+
return '@@@';
|
|
4015
|
+
});
|
|
4016
|
+
let newFormat = regexEscape(format).replace(token, function ($0) {
|
|
4017
|
+
if (parseFlags[$0]) {
|
|
4018
|
+
const info = parseFlags[$0];
|
|
4019
|
+
parseInfo.push(info[1]);
|
|
4020
|
+
return '(' + info[0] + ')';
|
|
4021
|
+
}
|
|
4022
|
+
|
|
4023
|
+
return $0;
|
|
4024
|
+
});
|
|
4025
|
+
newFormat = newFormat.replace(/@@@/g, function() {
|
|
4026
|
+
return literals.shift();
|
|
4027
|
+
});
|
|
4028
|
+
const matches = dateStr.match(new RegExp(newFormat, 'i'));
|
|
4029
|
+
if (!matches) {
|
|
4030
|
+
return null;
|
|
4031
|
+
}
|
|
4032
|
+
|
|
4033
|
+
for (let i = 1; i < matches.length; i++) {
|
|
4034
|
+
parseInfo[i - 1](dateInfo, matches[i]);
|
|
4035
|
+
}
|
|
4036
|
+
|
|
4037
|
+
const today = new Date();
|
|
4038
|
+
if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
|
|
4039
|
+
dateInfo.hour = +dateInfo.hour + 12;
|
|
4040
|
+
} else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
|
|
4041
|
+
dateInfo.hour = 0;
|
|
4042
|
+
}
|
|
4043
|
+
|
|
4044
|
+
let date;
|
|
4045
|
+
if (dateInfo.timezoneOffset != null) {
|
|
4046
|
+
dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
|
|
4047
|
+
date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
|
|
4048
|
+
dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
|
|
4049
|
+
} else {
|
|
4050
|
+
date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1,
|
|
4051
|
+
dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
|
|
4052
|
+
}
|
|
4053
|
+
return date;
|
|
4054
|
+
};
|
|
4055
|
+
|
|
4056
|
+
// 导出fecha对象
|
|
4057
|
+
|
|
4058
|
+
|
|
4059
|
+
// 以下是从date-util.js合并的函数
|
|
4060
|
+
const newArray = function(start, end) {
|
|
4061
|
+
let result = [];
|
|
4062
|
+
for (let i = start; i <= end; i++) {
|
|
4063
|
+
result.push(i);
|
|
4064
|
+
}
|
|
4065
|
+
return result;
|
|
4066
|
+
};
|
|
4067
|
+
|
|
4068
|
+
const getSettings = () => {
|
|
4069
|
+
return {
|
|
4070
|
+
dayNamesShort: ['日', '一', '二', '三', '四', '五', '六'],
|
|
4071
|
+
dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
|
4072
|
+
monthNamesShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
4073
|
+
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
|
4074
|
+
amPm: ['上午', '下午']
|
|
4075
|
+
};
|
|
4076
|
+
};
|
|
4077
|
+
|
|
4078
|
+
const toDate = function(date) {
|
|
4079
|
+
return isDate(date) ? new Date(date) : null;
|
|
4080
|
+
};
|
|
4081
|
+
|
|
4082
|
+
const isDate = function(date) {
|
|
4083
|
+
if (date === null || date === undefined) return false;
|
|
4084
|
+
if (isNaN(new Date(date).getTime())) return false;
|
|
4085
|
+
if (Array.isArray(date)) return false; // deal with `new Date([ new Date() ]) -> new Date()`
|
|
4086
|
+
return true;
|
|
4087
|
+
};
|
|
4088
|
+
|
|
4089
|
+
const isDateObject = function(val) {
|
|
4090
|
+
return val instanceof Date;
|
|
4091
|
+
};
|
|
4092
|
+
|
|
4093
|
+
const formatDate = function (date, format = 'yyyy-MM-dd') {
|
|
4094
|
+
// 处理多种输入类型
|
|
4095
|
+
if (!date) return '';
|
|
4096
|
+
|
|
4097
|
+
// 如果是时间戳,转成日期对象
|
|
4098
|
+
if (typeof date === 'number') {
|
|
4099
|
+
date = new Date(date);
|
|
4100
|
+
}
|
|
4101
|
+
// 如果是字符串,转成日期对象
|
|
4102
|
+
if (typeof date === 'string') {
|
|
4103
|
+
date = new Date(date);
|
|
4104
|
+
}
|
|
4105
|
+
|
|
4106
|
+
// 调用toDate进一步验证和转换
|
|
4107
|
+
date = toDate(date);
|
|
4108
|
+
if (!date) return '';
|
|
4109
|
+
|
|
4110
|
+
// 兼容大写和小写的格式标记
|
|
4111
|
+
// 将大写的YYYY/MM/DD/HH/mm/ss转换为小写的yyyy/mm/dd/hh/mm/ss
|
|
4112
|
+
const lowercaseFormat = format
|
|
4113
|
+
.replace(/YYYY/g, 'yyyy')
|
|
4114
|
+
.replace(/D/g, 'd')
|
|
4115
|
+
|
|
4116
|
+
// 使用fecha库进行格式化,支持中文配置
|
|
4117
|
+
const str = fecha.format(date, lowercaseFormat, getSettings());
|
|
4118
|
+
return str;
|
|
4119
|
+
};
|
|
4120
|
+
|
|
4121
|
+
const parseDate = function(string, format) {
|
|
4122
|
+
return fecha.parse(string, format || 'yyyy-MM-dd', getSettings());
|
|
4123
|
+
};
|
|
4124
|
+
|
|
4125
|
+
const getDayCountOfMonth = function(year, month) {
|
|
4126
|
+
if (month === 3 || month === 5 || month === 8 || month === 10) {
|
|
4127
|
+
return 30;
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
if (month === 1) {
|
|
4131
|
+
if (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) {
|
|
4132
|
+
return 29;
|
|
4133
|
+
} else {
|
|
4134
|
+
return 28;
|
|
4135
|
+
}
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4138
|
+
return 31;
|
|
4139
|
+
};
|
|
4140
|
+
|
|
4141
|
+
const getDayCountOfYear = function(year) {
|
|
4142
|
+
const isLeapYear = year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0);
|
|
4143
|
+
return isLeapYear ? 366 : 365;
|
|
4144
|
+
};
|
|
4145
|
+
|
|
4146
|
+
const getFirstDayOfMonth = function(date) {
|
|
4147
|
+
const temp = new Date(date.getTime());
|
|
4148
|
+
temp.setDate(1);
|
|
4149
|
+
return temp.getDay();
|
|
4150
|
+
};
|
|
4151
|
+
|
|
4152
|
+
// see: https://stackoverflow.com/questions/3674539/incrementing-a-date-in-javascript
|
|
4153
|
+
// {prev, next} Date should work for Daylight Saving Time
|
|
4154
|
+
// Adding 24 * 60 * 60 * 1000 does not work in the above scenario
|
|
4155
|
+
const prevDate = function(date, amount = 1) {
|
|
4156
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() - amount);
|
|
4157
|
+
};
|
|
4158
|
+
|
|
4159
|
+
const nextDate = function(date, amount = 1) {
|
|
4160
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + amount);
|
|
4161
|
+
};
|
|
4162
|
+
|
|
4163
|
+
const getStartDateOfMonth = function(year, month) {
|
|
4164
|
+
const result = new Date(year, month, 1);
|
|
4165
|
+
const day = result.getDay();
|
|
4166
|
+
|
|
4167
|
+
if (day === 0) {
|
|
4168
|
+
return prevDate(result, 7);
|
|
4169
|
+
} else {
|
|
4170
|
+
return prevDate(result, day);
|
|
4171
|
+
}
|
|
4172
|
+
};
|
|
4173
|
+
|
|
4174
|
+
const getWeekNumber = function(date) {
|
|
4175
|
+
// 支持多种输入类型
|
|
4176
|
+
if (!date||!isDate(date)) {
|
|
4177
|
+
date = new Date();
|
|
4178
|
+
}
|
|
4179
|
+
if (typeof date === 'string') {
|
|
4180
|
+
date = new Date(date);
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
// 验证日期有效性
|
|
4184
|
+
if (!isDate(date)) return null;
|
|
4185
|
+
|
|
4186
|
+
const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
|
|
4187
|
+
// 设置为最近的星期四:当前日期 + 4 - 当前星期数
|
|
4188
|
+
// 将星期日的星期数设为7
|
|
4189
|
+
d.setUTCDate(d.getUTCDate() + 4 - (d.getUTCDay() || 7));
|
|
4190
|
+
// 获取当年的第一天
|
|
4191
|
+
const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
|
|
4192
|
+
// 计算到最近的星期四的完整周数
|
|
4193
|
+
const weekNo = Math.ceil((((d - yearStart) / 86400000) + 1) / 7);
|
|
4194
|
+
// 返回周数
|
|
4195
|
+
return weekNo;
|
|
4196
|
+
};
|
|
4197
|
+
|
|
4198
|
+
const getRangeHours = function(ranges) {
|
|
4199
|
+
const hours = [];
|
|
4200
|
+
let disabledHours = [];
|
|
4201
|
+
|
|
4202
|
+
(ranges || []).forEach(range => {
|
|
4203
|
+
const value = range.map(date => date.getHours());
|
|
4204
|
+
|
|
4205
|
+
disabledHours = disabledHours.concat(newArray(value[0], value[1]));
|
|
4206
|
+
});
|
|
4207
|
+
|
|
4208
|
+
if (disabledHours.length) {
|
|
4209
|
+
for (let i = 0; i < 24; i++) {
|
|
4210
|
+
hours[i] = disabledHours.indexOf(i) === -1;
|
|
4211
|
+
}
|
|
4212
|
+
} else {
|
|
4213
|
+
for (let i = 0; i < 24; i++) {
|
|
4214
|
+
hours[i] = false;
|
|
4215
|
+
}
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4218
|
+
return hours;
|
|
4219
|
+
};
|
|
4220
|
+
|
|
4221
|
+
const getPrevMonthLastDays = (date, amount) => {
|
|
4222
|
+
if (amount <= 0) return [];
|
|
4223
|
+
const temp = new Date(date.getTime());
|
|
4224
|
+
temp.setDate(0);
|
|
4225
|
+
const lastDay = temp.getDate();
|
|
4226
|
+
return range(amount).map((_, index) => lastDay - (amount - index - 1));
|
|
4227
|
+
};
|
|
4228
|
+
|
|
4229
|
+
const getMonthDays = (date) => {
|
|
4230
|
+
const temp = new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
4231
|
+
const days = temp.getDate();
|
|
4232
|
+
return range(days).map((_, index) => index + 1);
|
|
4233
|
+
};
|
|
4234
|
+
|
|
4235
|
+
function setRangeData(arr, start, end, value) {
|
|
4236
|
+
for (let i = start; i < end; i++) {
|
|
4237
|
+
arr[i] = value;
|
|
4238
|
+
}
|
|
4239
|
+
}
|
|
4240
|
+
|
|
4241
|
+
const getRangeMinutes = function(ranges, hour) {
|
|
4242
|
+
const minutes = new Array(60);
|
|
4243
|
+
|
|
4244
|
+
if (ranges.length > 0) {
|
|
4245
|
+
ranges.forEach(range => {
|
|
4246
|
+
const start = range[0];
|
|
4247
|
+
const end = range[1];
|
|
4248
|
+
const startHour = start.getHours();
|
|
4249
|
+
const startMinute = start.getMinutes();
|
|
4250
|
+
const endHour = end.getHours();
|
|
4251
|
+
const endMinute = end.getMinutes();
|
|
4252
|
+
if (startHour === hour && endHour !== hour) {
|
|
4253
|
+
setRangeData(minutes, startMinute, 60, true);
|
|
4254
|
+
} else if (startHour === hour && endHour === hour) {
|
|
4255
|
+
setRangeData(minutes, startMinute, endMinute + 1, true);
|
|
4256
|
+
} else if (startHour !== hour && endHour === hour) {
|
|
4257
|
+
setRangeData(minutes, 0, endMinute + 1, true);
|
|
4258
|
+
} else if (startHour < hour && endHour > hour) {
|
|
4259
|
+
setRangeData(minutes, 0, 60, true);
|
|
4260
|
+
}
|
|
4261
|
+
});
|
|
4262
|
+
} else {
|
|
4263
|
+
setRangeData(minutes, 0, 60, true);
|
|
4264
|
+
}
|
|
4265
|
+
return minutes;
|
|
4266
|
+
};
|
|
4267
|
+
|
|
4268
|
+
const range = function(n) {
|
|
4269
|
+
// see https://stackoverflow.com/questions/3746725/create-a-javascript-array-containing-1-n
|
|
4270
|
+
return Array.apply(null, {length: n}).map((_, n) => n);
|
|
4271
|
+
};
|
|
4272
|
+
|
|
4273
|
+
const modifyDate = function(date, y, m, d) {
|
|
4274
|
+
return new Date(y, m, d, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
|
|
4275
|
+
};
|
|
4276
|
+
|
|
4277
|
+
const modifyTime = function(date, h, m, s) {
|
|
4278
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, s, date.getMilliseconds());
|
|
4279
|
+
};
|
|
4280
|
+
|
|
4281
|
+
const modifyWithTimeString = (date, time) => {
|
|
4282
|
+
if (date == null || !time) {
|
|
4283
|
+
return date;
|
|
4284
|
+
}
|
|
4285
|
+
time = parseDate(time, 'HH:mm:ss');
|
|
4286
|
+
return modifyTime(date, time.getHours(), time.getMinutes(), time.getSeconds());
|
|
4287
|
+
};
|
|
4288
|
+
|
|
4289
|
+
const clearTime = function(date) {
|
|
4290
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
4291
|
+
};
|
|
4292
|
+
|
|
4293
|
+
const clearMilliseconds = function(date) {
|
|
4294
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), 0);
|
|
4295
|
+
};
|
|
4296
|
+
|
|
4297
|
+
const limitTimeRange = function(date, ranges, format = 'HH:mm:ss') {
|
|
4298
|
+
// TODO: refactory a more elegant solution
|
|
4299
|
+
if (ranges.length === 0) return date;
|
|
4300
|
+
const normalizeDate = date => fecha.parse(fecha.format(date, format), format);
|
|
4301
|
+
const ndate = normalizeDate(date);
|
|
4302
|
+
const nranges = ranges.map(range => range.map(normalizeDate));
|
|
4303
|
+
if (nranges.some(nrange => ndate >= nrange[0] && ndate <= nrange[1])) return date;
|
|
4304
|
+
|
|
4305
|
+
let minDate = nranges[0][0];
|
|
4306
|
+
let maxDate = nranges[0][0];
|
|
4307
|
+
|
|
4308
|
+
nranges.forEach(nrange => {
|
|
4309
|
+
minDate = new Date(Math.min(nrange[0], minDate));
|
|
4310
|
+
maxDate = new Date(Math.max(nrange[1], minDate));
|
|
4311
|
+
});
|
|
4312
|
+
|
|
4313
|
+
const ret = ndate < minDate ? minDate : maxDate;
|
|
4314
|
+
// preserve Year/Month/Date
|
|
4315
|
+
return modifyDate(
|
|
4316
|
+
ret,
|
|
4317
|
+
date.getFullYear(),
|
|
4318
|
+
date.getMonth(),
|
|
4319
|
+
date.getDate()
|
|
4320
|
+
);
|
|
4321
|
+
};
|
|
4322
|
+
|
|
4323
|
+
const timeWithinRange = function(date, selectableRange, format) {
|
|
4324
|
+
const limitedDate = limitTimeRange(date, selectableRange, format);
|
|
4325
|
+
return limitedDate.getTime() === date.getTime();
|
|
4326
|
+
};
|
|
4327
|
+
|
|
4328
|
+
const changeYearMonthAndClampDate = function(date, year, month) {
|
|
4329
|
+
// clamp date to the number of days in `year`, `month`
|
|
4330
|
+
// eg: (2010-1-31, 2010, 2) => 2010-2-28
|
|
4331
|
+
const monthDate = Math.min(date.getDate(), getDayCountOfMonth(year, month));
|
|
4332
|
+
return modifyDate(date, year, month, monthDate);
|
|
4333
|
+
};
|
|
4334
|
+
|
|
4335
|
+
const prevMonth = function(date) {
|
|
4336
|
+
const year = date.getFullYear();
|
|
4337
|
+
const month = date.getMonth();
|
|
4338
|
+
return month === 0
|
|
4339
|
+
? changeYearMonthAndClampDate(date, year - 1, 11)
|
|
4340
|
+
: changeYearMonthAndClampDate(date, year, month - 1);
|
|
4341
|
+
};
|
|
4342
|
+
|
|
4343
|
+
const nextMonth = function(date) {
|
|
4344
|
+
const year = date.getFullYear();
|
|
4345
|
+
const month = date.getMonth();
|
|
4346
|
+
return month === 11
|
|
4347
|
+
? changeYearMonthAndClampDate(date, year + 1, 0)
|
|
4348
|
+
: changeYearMonthAndClampDate(date, year, month + 1);
|
|
4349
|
+
};
|
|
4350
|
+
|
|
4351
|
+
const prevYear = function(date, amount = 1) {
|
|
4352
|
+
const year = date.getFullYear();
|
|
4353
|
+
const month = date.getMonth();
|
|
4354
|
+
return changeYearMonthAndClampDate(date, year - amount, month);
|
|
4355
|
+
};
|
|
4356
|
+
|
|
4357
|
+
const nextYear = function(date, amount = 1) {
|
|
4358
|
+
const year = date.getFullYear();
|
|
4359
|
+
const month = date.getMonth();
|
|
4360
|
+
return changeYearMonthAndClampDate(date, year + amount, month);
|
|
4361
|
+
};
|
|
4362
|
+
|
|
4363
|
+
const extractDateFormat = function(format) {
|
|
4364
|
+
return format
|
|
4365
|
+
.replace(/\W?m{1,2}|\W?ZZ/g, '')
|
|
4366
|
+
.replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, '')
|
|
4367
|
+
.trim();
|
|
4368
|
+
};
|
|
4369
|
+
|
|
4370
|
+
const extractTimeFormat = function(format) {
|
|
4371
|
+
return format
|
|
4372
|
+
.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?y{2,4}/g, '')
|
|
4373
|
+
.trim();
|
|
4374
|
+
};
|
|
4375
|
+
|
|
4376
|
+
const validateRangeInOneMonth = function(start, end) {
|
|
4377
|
+
return (start.getMonth() === end.getMonth()) && (start.getFullYear() === end.getFullYear());
|
|
4378
|
+
};
|
|
4379
|
+
|
|
4362
4380
|
/**
|
|
4363
4381
|
* 计算两个日期之间的工作日数量(不包括周末和节假日)
|
|
4364
4382
|
* @param {string} start_date - 开始日期字符串,格式为 "YYYY-MM-DD"
|
|
4365
4383
|
* @param {string} end_date - 结束日期字符串,格式为 "YYYY-MM-DD"
|
|
4366
4384
|
* @param {Array<string>} holidays - 假期日期字符串数组,格式为 "YYYY-MM-DD"
|
|
4367
4385
|
* @returns {number} 工作日数量
|
|
4368
|
-
*/
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
}
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
|
|
4380
|
-
throw new Error(
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
}
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4386
|
+
*/
|
|
4387
|
+
const calculateNetworkDays = function (start_date, end_date, holidays = []) {
|
|
4388
|
+
if (typeof start_date !== 'string' || typeof end_date !== 'string') {
|
|
4389
|
+
throw new Error(
|
|
4390
|
+
"Invalid input. Please provide valid date strings in the format 'YYYY-MM-DD'."
|
|
4391
|
+
);
|
|
4392
|
+
}
|
|
4393
|
+
|
|
4394
|
+
const startDateObj = new Date(start_date);
|
|
4395
|
+
const endDateObj = new Date(end_date);
|
|
4396
|
+
|
|
4397
|
+
if (isNaN(startDateObj.getTime()) || isNaN(endDateObj.getTime())) {
|
|
4398
|
+
throw new Error(
|
|
4399
|
+
"Invalid date format. Please provide valid date strings in the format 'YYYY-MM-DD'."
|
|
4400
|
+
);
|
|
4401
|
+
}
|
|
4402
|
+
|
|
4403
|
+
if (startDateObj > endDateObj) {
|
|
4404
|
+
throw new Error('Start date should be earlier than or equal to end date.');
|
|
4405
|
+
}
|
|
4406
|
+
|
|
4407
|
+
let workdays = 0;
|
|
4408
|
+
|
|
4409
|
+
// Iterate through each day in the date range
|
|
4410
|
+
for (
|
|
4411
|
+
let currentDate = new Date(startDateObj);
|
|
4412
|
+
currentDate <= endDateObj;
|
|
4413
|
+
currentDate.setDate(currentDate.getDate() + 1)
|
|
4414
|
+
) {
|
|
4415
|
+
// Check if the current day is a weekend (Saturday or Sunday)
|
|
4416
|
+
const isWeekend = currentDate.getDay() === 0 || currentDate.getDay() === 6;
|
|
4417
|
+
|
|
4418
|
+
// Check if the current day is a holiday
|
|
4419
|
+
const isHoliday = holidays.some((holiday) => {
|
|
4420
|
+
const holidayDate = new Date(holiday);
|
|
4421
|
+
return currentDate.toDateString() === holidayDate.toDateString();
|
|
4422
|
+
});
|
|
4423
|
+
|
|
4424
|
+
// If it's a workday (not a weekend or holiday), increment the workdays count
|
|
4425
|
+
if (!isWeekend && !isHoliday) {
|
|
4426
|
+
workdays++;
|
|
4427
|
+
}
|
|
4428
|
+
}
|
|
4429
|
+
|
|
4430
|
+
return workdays;
|
|
4431
|
+
};
|
|
4432
|
+
|
|
4414
4433
|
/**
|
|
4415
4434
|
* 日期加减天数
|
|
4416
4435
|
* @param {string} start_date - 起始日期字符串,格式为 "YYYY-MM-DD"
|
|
4417
4436
|
* @param {number} days - 要加上或减去的天数,正数表示加,负数表示减
|
|
4418
4437
|
* @returns {string} 结果日期,格式为 "YYYY-MM-DD"
|
|
4419
|
-
*/
|
|
4420
|
-
|
|
4421
|
-
if (typeof start_date !== 'string' || !Number.isInteger(days)) {
|
|
4422
|
-
throw new Error(
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4438
|
+
*/
|
|
4439
|
+
const dateAddDays = function (start_date, days) {
|
|
4440
|
+
if (typeof start_date !== 'string' || !Number.isInteger(days)) {
|
|
4441
|
+
throw new Error(
|
|
4442
|
+
"Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD' and a valid integer for the number of days."
|
|
4443
|
+
);
|
|
4444
|
+
}
|
|
4445
|
+
|
|
4446
|
+
const startDateObj = new Date(start_date);
|
|
4447
|
+
if (isNaN(startDateObj.getTime())) {
|
|
4448
|
+
throw new Error(
|
|
4449
|
+
"Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
|
|
4450
|
+
);
|
|
4451
|
+
}
|
|
4452
|
+
|
|
4453
|
+
const resultDateObj = new Date(startDateObj);
|
|
4454
|
+
resultDateObj.setDate(resultDateObj.getDate() + days);
|
|
4455
|
+
|
|
4456
|
+
const resultYear = resultDateObj.getFullYear();
|
|
4457
|
+
const resultMonth = String(resultDateObj.getMonth() + 1).padStart(2, '0');
|
|
4458
|
+
const resultDay = String(resultDateObj.getDate()).padStart(2, '0');
|
|
4459
|
+
|
|
4460
|
+
return `${resultYear}-${resultMonth}-${resultDay}`;
|
|
4461
|
+
};
|
|
4462
|
+
|
|
4440
4463
|
/**
|
|
4441
4464
|
* 计算两个日期之间的差值
|
|
4442
4465
|
* @date 2023年12月14日
|
|
@@ -4444,180 +4467,182 @@ var dateAddDays = function dateAddDays(start_date, days) {
|
|
|
4444
4467
|
* @param {String} end_date - 结束日期字符串
|
|
4445
4468
|
* @param {String} unit - 单位:year/month/day
|
|
4446
4469
|
* @returns {Number} 差值
|
|
4447
|
-
*/
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
if (unit === '
|
|
4461
|
-
return
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
}
|
|
4471
|
-
|
|
4470
|
+
*/
|
|
4471
|
+
const dateDiff = function (start_date, end_date, unit = 'day') {
|
|
4472
|
+
// Assuming date strings are in "YYYY-MM-DD" format
|
|
4473
|
+
var startDate = new Date(start_date);
|
|
4474
|
+
var endDate = new Date(end_date);
|
|
4475
|
+
|
|
4476
|
+
// If the date is invalid, return 0
|
|
4477
|
+
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
|
4478
|
+
return 0;
|
|
4479
|
+
}
|
|
4480
|
+
|
|
4481
|
+
if (unit === 'year') {
|
|
4482
|
+
return endDate.getFullYear() - startDate.getFullYear();
|
|
4483
|
+
} else if (unit === 'month') {
|
|
4484
|
+
return (
|
|
4485
|
+
(endDate.getFullYear() - startDate.getFullYear()) * 12 +
|
|
4486
|
+
(endDate.getMonth() - startDate.getMonth())
|
|
4487
|
+
);
|
|
4488
|
+
} else {
|
|
4489
|
+
// Default to day
|
|
4490
|
+
var timeDifference = endDate - startDate;
|
|
4491
|
+
// Calculate days (86400000 milliseconds per day)
|
|
4492
|
+
return Math.floor(timeDifference / 86400000);
|
|
4493
|
+
}
|
|
4494
|
+
};
|
|
4495
|
+
|
|
4472
4496
|
/**
|
|
4473
4497
|
* 获取月份中的日期
|
|
4474
4498
|
* @param {string} date - 日期字符串,格式为 "YYYY-MM-DD"
|
|
4475
4499
|
* @returns {number} 月份中的日期(1-31)
|
|
4476
|
-
*/
|
|
4477
|
-
|
|
4478
|
-
if (typeof date !== 'string') {
|
|
4479
|
-
throw new Error(
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4500
|
+
*/
|
|
4501
|
+
const dayOfMonth = function (date) {
|
|
4502
|
+
if (typeof date !== 'string') {
|
|
4503
|
+
throw new Error(
|
|
4504
|
+
"Invalid input. Please provide a valid date string in the format 'YYYY-MM-DD'."
|
|
4505
|
+
);
|
|
4506
|
+
}
|
|
4507
|
+
|
|
4508
|
+
const dateObj = new Date(date);
|
|
4509
|
+
if (isNaN(dateObj.getTime())) {
|
|
4510
|
+
throw new Error(
|
|
4511
|
+
"Invalid date format. Please provide a valid date string in the format 'YYYY-MM-DD'."
|
|
4512
|
+
);
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4515
|
+
return dateObj.getDate();
|
|
4516
|
+
};
|
|
4517
|
+
|
|
4490
4518
|
/**
|
|
4491
4519
|
* 获取当前日期
|
|
4492
4520
|
* @date 2022年5月7日
|
|
4493
4521
|
* @param {string} format - 日期格式,默认为'YYYY-MM-DD'
|
|
4494
4522
|
* @returns {string} 当前日期的格式化字符串
|
|
4495
|
-
*/
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
};
|
|
4501
|
-
|
|
4523
|
+
*/
|
|
4524
|
+
const getCurrentDate = function (format = 'YYYY-MM-DD') {
|
|
4525
|
+
return formatDate(new Date(), format);
|
|
4526
|
+
};
|
|
4527
|
+
|
|
4502
4528
|
/**
|
|
4503
4529
|
* 获取当前日期时间
|
|
4504
4530
|
* @date 2022年5月7日
|
|
4505
4531
|
* @param {string} format - 日期时间格式,默认为'YYYY-MM-DD HH:mm:ss'
|
|
4506
4532
|
* @returns {string} 当前日期时间的格式化字符串
|
|
4507
|
-
*/
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
};
|
|
4513
|
-
|
|
4533
|
+
*/
|
|
4534
|
+
const getCurrentDateTime = function (format = 'YYYY-MM-DD HH:mm:ss') {
|
|
4535
|
+
return formatDate(new Date(), format);
|
|
4536
|
+
};
|
|
4537
|
+
|
|
4514
4538
|
/**
|
|
4515
4539
|
* 获取小时
|
|
4516
4540
|
* @date 2022年5月7日
|
|
4517
4541
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
4518
4542
|
* @returns {number} 小时数(0-23)
|
|
4519
|
-
*/
|
|
4520
|
-
|
|
4521
|
-
if (!date) {
|
|
4522
|
-
return new Date().getHours();
|
|
4523
|
-
}
|
|
4524
|
-
if (typeof date === 'string') {
|
|
4525
|
-
date = new Date(date);
|
|
4526
|
-
}
|
|
4527
|
-
return date.getHours();
|
|
4528
|
-
};
|
|
4529
|
-
|
|
4543
|
+
*/
|
|
4544
|
+
const getHour = function (date) {
|
|
4545
|
+
if (!date) {
|
|
4546
|
+
return new Date().getHours();
|
|
4547
|
+
}
|
|
4548
|
+
if (typeof date === 'string') {
|
|
4549
|
+
date = new Date(date);
|
|
4550
|
+
}
|
|
4551
|
+
return date.getHours();
|
|
4552
|
+
};
|
|
4553
|
+
|
|
4530
4554
|
/**
|
|
4531
4555
|
* 获取分钟
|
|
4532
4556
|
* @date 2022年5月7日
|
|
4533
4557
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
4534
4558
|
* @returns {number} 分钟数(0-59)
|
|
4535
|
-
*/
|
|
4536
|
-
|
|
4537
|
-
if (!date) {
|
|
4538
|
-
return new Date().getMinutes();
|
|
4539
|
-
}
|
|
4540
|
-
if (typeof date === 'string') {
|
|
4541
|
-
date = new Date(date);
|
|
4542
|
-
}
|
|
4543
|
-
return date.getMinutes();
|
|
4544
|
-
};
|
|
4545
|
-
|
|
4559
|
+
*/
|
|
4560
|
+
const getMinute = function (date) {
|
|
4561
|
+
if (!date) {
|
|
4562
|
+
return new Date().getMinutes();
|
|
4563
|
+
}
|
|
4564
|
+
if (typeof date === 'string') {
|
|
4565
|
+
date = new Date(date);
|
|
4566
|
+
}
|
|
4567
|
+
return date.getMinutes();
|
|
4568
|
+
};
|
|
4569
|
+
|
|
4546
4570
|
/**
|
|
4547
4571
|
* 获取月份
|
|
4548
4572
|
* @date 2022年5月7日
|
|
4549
4573
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
4550
4574
|
* @returns {number} 月份数(1-12)
|
|
4551
|
-
*/
|
|
4552
|
-
|
|
4553
|
-
if (!date) {
|
|
4554
|
-
return new Date().getMonth() + 1;
|
|
4555
|
-
}
|
|
4556
|
-
if (typeof date === 'string') {
|
|
4557
|
-
date = new Date(date);
|
|
4558
|
-
}
|
|
4559
|
-
return date.getMonth() + 1;
|
|
4560
|
-
};
|
|
4561
|
-
|
|
4575
|
+
*/
|
|
4576
|
+
const getMonth = function (date) {
|
|
4577
|
+
if (!date) {
|
|
4578
|
+
return new Date().getMonth() + 1;
|
|
4579
|
+
}
|
|
4580
|
+
if (typeof date === 'string') {
|
|
4581
|
+
date = new Date(date);
|
|
4582
|
+
}
|
|
4583
|
+
return date.getMonth() + 1;
|
|
4584
|
+
};
|
|
4585
|
+
|
|
4562
4586
|
/**
|
|
4563
4587
|
* 获取秒
|
|
4564
4588
|
* @date 2022年5月7日
|
|
4565
4589
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
4566
4590
|
* @returns {number} 秒数(0-59)
|
|
4567
|
-
*/
|
|
4568
|
-
|
|
4569
|
-
if (!date) {
|
|
4570
|
-
return new Date().getSeconds();
|
|
4571
|
-
}
|
|
4572
|
-
if (typeof date === 'string') {
|
|
4573
|
-
date = new Date(date);
|
|
4574
|
-
}
|
|
4575
|
-
return date.getSeconds();
|
|
4576
|
-
};
|
|
4577
|
-
|
|
4591
|
+
*/
|
|
4592
|
+
const getSecond = function (date) {
|
|
4593
|
+
if (!date) {
|
|
4594
|
+
return new Date().getSeconds();
|
|
4595
|
+
}
|
|
4596
|
+
if (typeof date === 'string') {
|
|
4597
|
+
date = new Date(date);
|
|
4598
|
+
}
|
|
4599
|
+
return date.getSeconds();
|
|
4600
|
+
};
|
|
4601
|
+
|
|
4578
4602
|
/**
|
|
4579
4603
|
* 获取星期几
|
|
4580
4604
|
* @date 2022年5月7日
|
|
4581
4605
|
* @param {Date|string} [date] - 日期对象或日期字符串
|
|
4582
4606
|
* @returns {number} 星期几(0-6,0表示星期日)
|
|
4583
|
-
*/
|
|
4584
|
-
|
|
4585
|
-
if (!date) {
|
|
4586
|
-
return new Date().getDay();
|
|
4587
|
-
}
|
|
4588
|
-
if (typeof date === 'string') {
|
|
4589
|
-
date = new Date(date);
|
|
4590
|
-
}
|
|
4591
|
-
return date.getDay();
|
|
4592
|
-
};
|
|
4593
|
-
|
|
4607
|
+
*/
|
|
4608
|
+
const getWeekday = function (date) {
|
|
4609
|
+
if (!date) {
|
|
4610
|
+
return new Date().getDay();
|
|
4611
|
+
}
|
|
4612
|
+
if (typeof date === 'string') {
|
|
4613
|
+
date = new Date(date);
|
|
4614
|
+
}
|
|
4615
|
+
return date.getDay();
|
|
4616
|
+
};
|
|
4617
|
+
|
|
4618
|
+
|
|
4594
4619
|
/**
|
|
4595
4620
|
* @desc 获取上午/下午/晚上
|
|
4596
4621
|
* @author huangbo
|
|
4597
4622
|
* @date 2022年5月7日
|
|
4598
4623
|
* @param {String} [time] - 时间
|
|
4599
|
-
**/
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
if (!time) {
|
|
4603
|
-
hour = new Date().getHours();
|
|
4604
|
-
} else if (typeof time === 'string') {
|
|
4605
|
-
// 从时间字符串中提取小时
|
|
4606
|
-
|
|
4607
|
-
if (match) {
|
|
4608
|
-
hour = parseInt(match[1], 10);
|
|
4609
|
-
}
|
|
4610
|
-
} else if (typeof time === 'number') {
|
|
4611
|
-
hour = time;
|
|
4612
|
-
}
|
|
4613
|
-
// 判断时间段
|
|
4614
|
-
if (hour >= 5 && hour < 12) {
|
|
4615
|
-
return '上午';
|
|
4616
|
-
} else if (hour >= 12 && hour < 18) {
|
|
4617
|
-
return '下午';
|
|
4618
|
-
} else {
|
|
4619
|
-
return '晚上';
|
|
4620
|
-
}
|
|
4624
|
+
**/
|
|
4625
|
+
const timeCycle = function (time) {
|
|
4626
|
+
let hour = 0;
|
|
4627
|
+
if (!time) {
|
|
4628
|
+
hour = new Date().getHours();
|
|
4629
|
+
} else if (typeof time === 'string') {
|
|
4630
|
+
// 从时间字符串中提取小时
|
|
4631
|
+
const match = time.match(/^(\d{1,2})/);
|
|
4632
|
+
if (match) {
|
|
4633
|
+
hour = parseInt(match[1], 10);
|
|
4634
|
+
}
|
|
4635
|
+
} else if (typeof time === 'number') {
|
|
4636
|
+
hour = time;
|
|
4637
|
+
}
|
|
4638
|
+
// 判断时间段
|
|
4639
|
+
if (hour >= 5 && hour < 12) {
|
|
4640
|
+
return '上午';
|
|
4641
|
+
} else if (hour >= 12 && hour < 18) {
|
|
4642
|
+
return '下午';
|
|
4643
|
+
} else {
|
|
4644
|
+
return '晚上';
|
|
4645
|
+
}
|
|
4621
4646
|
};
|
|
4622
4647
|
|
|
4623
4648
|
/***/ }),
|
|
@@ -5036,17 +5061,10 @@ var removeResizeListener = function removeResizeListener(element, fn) {
|
|
|
5036
5061
|
|
|
5037
5062
|
/***/ }),
|
|
5038
5063
|
|
|
5039
|
-
/***/ 28:
|
|
5040
|
-
/***/ (function(module, exports) {
|
|
5041
|
-
|
|
5042
|
-
module.exports = require("qs");
|
|
5043
|
-
|
|
5044
|
-
/***/ }),
|
|
5045
|
-
|
|
5046
5064
|
/***/ 29:
|
|
5047
5065
|
/***/ (function(module, exports) {
|
|
5048
5066
|
|
|
5049
|
-
module.exports = require("
|
|
5067
|
+
module.exports = require("qs");
|
|
5050
5068
|
|
|
5051
5069
|
/***/ }),
|
|
5052
5070
|
|
|
@@ -5158,6 +5176,13 @@ function normalizeComponent(
|
|
|
5158
5176
|
/***/ 30:
|
|
5159
5177
|
/***/ (function(module, exports) {
|
|
5160
5178
|
|
|
5179
|
+
module.exports = require("axios");
|
|
5180
|
+
|
|
5181
|
+
/***/ }),
|
|
5182
|
+
|
|
5183
|
+
/***/ 31:
|
|
5184
|
+
/***/ (function(module, exports) {
|
|
5185
|
+
|
|
5161
5186
|
module.exports = require("json-bigint");
|
|
5162
5187
|
|
|
5163
5188
|
/***/ }),
|
|
@@ -5869,7 +5894,7 @@ function insertAfter(newEl, targetEl) {
|
|
|
5869
5894
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return doQrLogin; });
|
|
5870
5895
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nb", function() { return logout; });
|
|
5871
5896
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ib", function() { return initLogin; });
|
|
5872
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5897
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dc", function() { return switchUserTo; });
|
|
5873
5898
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return changeImg; });
|
|
5874
5899
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return getLoginCode; });
|
|
5875
5900
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return doCodeLogin; });
|
|
@@ -5887,13 +5912,13 @@ function insertAfter(newEl, targetEl) {
|
|
|
5887
5912
|
/* unused harmony export scanCodeRetrialAuth */
|
|
5888
5913
|
/* unused harmony export codeRetrialAuth */
|
|
5889
5914
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return doAssistanceQrLogin; });
|
|
5890
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5915
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qc", function() { return userOnline; });
|
|
5891
5916
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return getUserAppWithTag; });
|
|
5892
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5917
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nb", function() { return recordUserApp; });
|
|
5893
5918
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "db", function() { return getUserRecordApp; });
|
|
5894
5919
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ob", function() { return mainConfig; });
|
|
5895
5920
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jb", function() { return initUserSet; });
|
|
5896
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5921
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mc", function() { return updateUserInfo; });
|
|
5897
5922
|
/* unused harmony export getUserImgUrl */
|
|
5898
5923
|
/* unused harmony export getDoorIndex */
|
|
5899
5924
|
/* unused harmony export refreshOnlineUsers */
|
|
@@ -5905,22 +5930,22 @@ function insertAfter(newEl, targetEl) {
|
|
|
5905
5930
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return getByType; });
|
|
5906
5931
|
/* unused harmony export getUserCustomInfo */
|
|
5907
5932
|
/* unused harmony export updateUserCustomInfo */
|
|
5908
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5909
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5933
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Yb", function() { return saveOrUpdate; });
|
|
5934
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ec", function() { return sysMsgPage; });
|
|
5910
5935
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hb", function() { return ignoreSysMsg; });
|
|
5911
5936
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gb", function() { return ignoreAllSysMsg; });
|
|
5912
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5937
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Zb", function() { return searchType; });
|
|
5913
5938
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return getSysParam; });
|
|
5914
5939
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return getAdjunctProperties; });
|
|
5915
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5916
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5940
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pc", function() { return uploads; });
|
|
5941
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Oc", function() { return uploadOnlyOne; });
|
|
5917
5942
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return getAdjunctFileInfos; });
|
|
5918
5943
|
/* unused harmony export uploadSort */
|
|
5919
5944
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return downloadByAdjunctId; });
|
|
5920
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5921
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5922
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5923
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5945
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nc", function() { return uploadDownloads; });
|
|
5946
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fb", function() { return previewAdjunct; });
|
|
5947
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gb", function() { return previewAdjunct2; });
|
|
5948
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hb", function() { return previewAdjunctOffice; });
|
|
5924
5949
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return delAdjunct; });
|
|
5925
5950
|
/* unused harmony export upload_updateClassify */
|
|
5926
5951
|
/* unused harmony export getDeleteAdjunctFileInfos */
|
|
@@ -5935,13 +5960,13 @@ function insertAfter(newEl, targetEl) {
|
|
|
5935
5960
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eb", function() { return gethelpdoc; });
|
|
5936
5961
|
/* unused harmony export getCurrentuser */
|
|
5937
5962
|
/* unused harmony export mainDetail */
|
|
5938
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5939
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5963
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uc", function() { return toStartFlow; });
|
|
5964
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pc", function() { return tempSave; });
|
|
5940
5965
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return commonOpion; });
|
|
5941
5966
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addCommonOpion; });
|
|
5942
5967
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return editCommonOpion; });
|
|
5943
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5944
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5968
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xb", function() { return saveCommonOpinion; });
|
|
5969
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kc", function() { return updateCommonOpinion; });
|
|
5945
5970
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return deleteCommonOpion; });
|
|
5946
5971
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return getProcessDefList; });
|
|
5947
5972
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return getNodeInfo; });
|
|
@@ -5950,27 +5975,27 @@ function insertAfter(newEl, targetEl) {
|
|
|
5950
5975
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return findSysCodes; });
|
|
5951
5976
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return getNotificationMsg; });
|
|
5952
5977
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return getHandleInfoHtml; });
|
|
5953
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5978
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gc", function() { return taskHandleHtml; });
|
|
5954
5979
|
/* unused harmony export getView */
|
|
5955
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5956
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5957
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5958
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5959
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5960
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5961
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5962
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5963
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5964
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5980
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ob", function() { return register; });
|
|
5981
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Eb", function() { return pendedhistoryList; });
|
|
5982
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yc", function() { return toTaskRejectHtml; });
|
|
5983
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ic", function() { return taskRejectHtml; });
|
|
5984
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vc", function() { return toStartTaskRead; });
|
|
5985
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wc", function() { return toStartTaskReadIndex; });
|
|
5986
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hc", function() { return taskReadHtml; });
|
|
5987
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pb", function() { return rejectAndEnd; });
|
|
5988
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tc", function() { return toSendMsg; });
|
|
5989
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ac", function() { return sendMsg; });
|
|
5965
5990
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return endFlowHtml; });
|
|
5966
5991
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fb", function() { return handleInfo; });
|
|
5967
5992
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mb", function() { return loginUserInfo; });
|
|
5968
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5969
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5993
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rc", function() { return wss; });
|
|
5994
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ic", function() { return topic; });
|
|
5970
5995
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return getPresetCustomInfo; });
|
|
5971
5996
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return getPresetNodeInfo; });
|
|
5972
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5973
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5997
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ec", function() { return toTaskTransferIndex; });
|
|
5998
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mc", function() { return taskTransfer; });
|
|
5974
5999
|
/* unused harmony export toPresetInfoListIndex */
|
|
5975
6000
|
/* unused harmony export deletePresetInfo */
|
|
5976
6001
|
/* unused harmony export historyListJson */
|
|
@@ -5978,24 +6003,24 @@ function insertAfter(newEl, targetEl) {
|
|
|
5978
6003
|
/* unused harmony export pressListJson */
|
|
5979
6004
|
/* unused harmony export deleteFlow */
|
|
5980
6005
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lb", function() { return isCanStartSubFlow; });
|
|
5981
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5982
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5983
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5984
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5985
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5986
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5987
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5988
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5989
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5990
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5991
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5992
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5993
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5994
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5995
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5996
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5997
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
5998
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6006
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fc", function() { return toTaskUnionExamine; });
|
|
6007
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nc", function() { return taskUnionExamine; });
|
|
6008
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dc", function() { return toTaskTakeAdvice; });
|
|
6009
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lc", function() { return taskTakeAdvice; });
|
|
6010
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ac", function() { return toTaskStartDraft; });
|
|
6011
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bc", function() { return toTaskSupervise; });
|
|
6012
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cc", function() { return toTaskSuperviseSub; });
|
|
6013
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kc", function() { return taskStartDraft; });
|
|
6014
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zc", function() { return toTaskReview; });
|
|
6015
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jc", function() { return taskReview; });
|
|
6016
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gc", function() { return toTaskUnionSeal; });
|
|
6017
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "oc", function() { return taskUnionSeal; });
|
|
6018
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hc", function() { return toTwoOfficesDispatch; });
|
|
6019
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jc", function() { return twoOfficesDispatch; });
|
|
6020
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sc", function() { return toResetProcessIndex; });
|
|
6021
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qb", function() { return resetProcess; });
|
|
6022
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xc", function() { return toTaskContinuationIndex; });
|
|
6023
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fc", function() { return taskContinuation; });
|
|
5999
6024
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return getFreeStartFlowParams; });
|
|
6000
6025
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return freeStartFlowWithSubmitTask; });
|
|
6001
6026
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return checkForeignOrgStartedCircularRead; });
|
|
@@ -6003,7 +6028,7 @@ function insertAfter(newEl, targetEl) {
|
|
|
6003
6028
|
/* unused harmony export fyListJson */
|
|
6004
6029
|
/* unused harmony export circularReadWithdraw */
|
|
6005
6030
|
/* unused harmony export taskReadWithDraw */
|
|
6006
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6031
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bc", function() { return startReadTransferHandleFlowWithTaskReadEnd; });
|
|
6007
6032
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return checkBusinessIdStartedReadTransferHandle; });
|
|
6008
6033
|
/* unused harmony export sendList */
|
|
6009
6034
|
/* unused harmony export sendInfo */
|
|
@@ -6017,23 +6042,24 @@ function insertAfter(newEl, targetEl) {
|
|
|
6017
6042
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return getNodeInfoForStart; });
|
|
6018
6043
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return freeStartFlow; });
|
|
6019
6044
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return getUrgencyLevelChangedNotificationType; });
|
|
6020
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6045
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rc", function() { return toFreeTaskCircularRead; });
|
|
6021
6046
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return freeTaskCircularRead; });
|
|
6022
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6047
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bb", function() { return pageLists; });
|
|
6023
6048
|
/* unused harmony export publishedLists */
|
|
6024
6049
|
/* unused harmony export pageInfo */
|
|
6025
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6026
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cb", function() { return
|
|
6050
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ab", function() { return pageGroup; });
|
|
6051
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cb", function() { return pageSave; });
|
|
6052
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Db", function() { return pageUpdate; });
|
|
6027
6053
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zb", function() { return pageDelete; });
|
|
6028
6054
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return batchSave; });
|
|
6029
6055
|
/* unused harmony export batchUpdate */
|
|
6030
6056
|
/* unused harmony export batchDelete */
|
|
6031
6057
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return batchList; });
|
|
6032
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6033
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6034
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6035
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6036
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6058
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kb", function() { return processListJson; });
|
|
6059
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Jb", function() { return processInfo; });
|
|
6060
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ib", function() { return processDeleteJson; });
|
|
6061
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lb", function() { return processSave; });
|
|
6062
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mb", function() { return processUpdate; });
|
|
6037
6063
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wb", function() { return nodeListJson; });
|
|
6038
6064
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ub", function() { return nodeDeleteJson; });
|
|
6039
6065
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xb", function() { return nodeSave; });
|
|
@@ -6044,22 +6070,22 @@ function insertAfter(newEl, targetEl) {
|
|
|
6044
6070
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pb", function() { return moduleDelete; });
|
|
6045
6071
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sb", function() { return moduleSave; });
|
|
6046
6072
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tb", function() { return moduleUpdate; });
|
|
6047
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6048
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6049
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6050
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6073
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tb", function() { return ruleListJson; });
|
|
6074
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sb", function() { return ruleEdit; });
|
|
6075
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ub", function() { return ruleRead; });
|
|
6076
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Vb", function() { return ruleSave; });
|
|
6051
6077
|
/* unused harmony export ruleSupplement */
|
|
6052
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6053
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6078
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Wb", function() { return ruleUndore; });
|
|
6079
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rb", function() { return ruleAdd; });
|
|
6054
6080
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return companyDetail; });
|
|
6055
6081
|
/* unused harmony export issueDetailList */
|
|
6056
6082
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return deleteRule; });
|
|
6057
6083
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return getSysParamV1; });
|
|
6058
6084
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return companyList; });
|
|
6059
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6085
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cc", function() { return supplement; });
|
|
6060
6086
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kb", function() { return isAddSource; });
|
|
6061
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6062
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
6087
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "qc", function() { return tiggerInTime; });
|
|
6088
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lc", function() { return updateHistory; });
|
|
6063
6089
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return auditTrajectory; });
|
|
6064
6090
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return changeInTime; });
|
|
6065
6091
|
var flowPendingPrefix = window.flowPendingPrefix || localStorage.getItem('flowPendingPrefix') || '/bpm';
|
|
@@ -6341,6 +6367,9 @@ var pageLists = '/main2/pageComponentConfig/listJson';
|
|
|
6341
6367
|
var publishedLists = '/main2/pageComponentConfig/listPublished';
|
|
6342
6368
|
// 获取自定义配置详情
|
|
6343
6369
|
var pageInfo = '/main2/pageComponentConfig/info';
|
|
6370
|
+
// 获取自定义配置授权列表
|
|
6371
|
+
var pageGroup = 'main2/pageComponentTarget/listByConfigIdAndTypeGroup';
|
|
6372
|
+
|
|
6344
6373
|
// 保存自定义配置,发布也调这个接口但要加上字段status=1
|
|
6345
6374
|
var pageSave = '/main2/pageComponentConfig/save';
|
|
6346
6375
|
// 更新自定义配置
|
|
@@ -7345,7 +7374,7 @@ var scrollbar = __webpack_require__(14);
|
|
|
7345
7374
|
immediate: true,
|
|
7346
7375
|
deep: true,
|
|
7347
7376
|
handler: function handler(val) {
|
|
7348
|
-
if (Object(util["
|
|
7377
|
+
if (Object(util["D" /* isExist */])(val)) {
|
|
7349
7378
|
if (Object(types["d" /* isObject */])(val)) {
|
|
7350
7379
|
this.selected = [val];
|
|
7351
7380
|
} else {
|
|
@@ -7561,7 +7590,7 @@ var scrollbar = __webpack_require__(14);
|
|
|
7561
7590
|
var val = Object(types["d" /* isObject */])(res) ? [res] : res;
|
|
7562
7591
|
if (this.mix) {
|
|
7563
7592
|
val.forEach(function (item, index) {
|
|
7564
|
-
val[index]._typeName = Object(util["
|
|
7593
|
+
val[index]._typeName = Object(util["u" /* getTypePrefix */])(item.stype);
|
|
7565
7594
|
});
|
|
7566
7595
|
}
|
|
7567
7596
|
this.$emit('input', val);
|
|
@@ -7618,7 +7647,7 @@ var scrollbar = __webpack_require__(14);
|
|
|
7618
7647
|
getLabel: function getLabel(res) {
|
|
7619
7648
|
var tag = '';
|
|
7620
7649
|
if (this.mix) {
|
|
7621
|
-
tag = this.classify ? Object(util["
|
|
7650
|
+
tag = this.classify ? Object(util["u" /* getTypePrefix */])(res.stype) : '';
|
|
7622
7651
|
} else if (this.showFilterListDep) {
|
|
7623
7652
|
tag = this.getDep(res);
|
|
7624
7653
|
}
|
|
@@ -7741,12 +7770,12 @@ module.exports = require("eoss/lib/message-box");
|
|
|
7741
7770
|
/* unused harmony export downloadZip */
|
|
7742
7771
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return deleteFile; });
|
|
7743
7772
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getTableData; });
|
|
7744
|
-
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
7773
|
+
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29);
|
|
7745
7774
|
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_0__);
|
|
7746
|
-
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
7775
|
+
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30);
|
|
7747
7776
|
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
|
|
7748
7777
|
/* harmony import */ var _sm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
|
|
7749
|
-
/* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
7778
|
+
/* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31);
|
|
7750
7779
|
/* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_3__);
|
|
7751
7780
|
/* harmony import */ var _storage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
|
|
7752
7781
|
/* harmony import */ var fetch_request_source__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24);
|
|
@@ -7988,7 +8017,7 @@ var ajax = function ajax(_ref) {
|
|
|
7988
8017
|
delete params[key];
|
|
7989
8018
|
}
|
|
7990
8019
|
}
|
|
7991
|
-
url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "
|
|
8020
|
+
url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "X"])({ url: url, param: encodedParams });
|
|
7992
8021
|
}
|
|
7993
8022
|
} else {
|
|
7994
8023
|
params = {};
|
|
@@ -8346,7 +8375,7 @@ function redirectToLogin() {
|
|
|
8346
8375
|
|
|
8347
8376
|
if (loginPage) {
|
|
8348
8377
|
// 处理相对路径
|
|
8349
|
-
if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "
|
|
8378
|
+
if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "R"])(loginPage, ['http', '/'], true)) {
|
|
8350
8379
|
var pathname = '';
|
|
8351
8380
|
try {
|
|
8352
8381
|
pathname = window.top.location.pathname;
|
|
@@ -8378,7 +8407,7 @@ function redirectToLogin() {
|
|
|
8378
8407
|
* @returns {Promise} 认证完成后 resolve
|
|
8379
8408
|
*/
|
|
8380
8409
|
var initAuth = function initAuth() {
|
|
8381
|
-
var params = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "
|
|
8410
|
+
var params = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "s"])();
|
|
8382
8411
|
var token = Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('token') || Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('Authorization');
|
|
8383
8412
|
|
|
8384
8413
|
// 已有 token 或没有认证参数,直接返回
|
|
@@ -8386,7 +8415,7 @@ var initAuth = function initAuth() {
|
|
|
8386
8415
|
return Promise.resolve();
|
|
8387
8416
|
}
|
|
8388
8417
|
|
|
8389
|
-
var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "
|
|
8418
|
+
var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "K"])('页面加载中...');
|
|
8390
8419
|
|
|
8391
8420
|
return ajax({
|
|
8392
8421
|
method: 'post',
|
|
@@ -8465,7 +8494,7 @@ var isLogined = function isLogined(_ref3) {
|
|
|
8465
8494
|
|
|
8466
8495
|
// 处理cookie参数
|
|
8467
8496
|
if (cookie === undefined) {
|
|
8468
|
-
cookie = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "
|
|
8497
|
+
cookie = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "s"])({ name: 'cookie' });
|
|
8469
8498
|
}
|
|
8470
8499
|
|
|
8471
8500
|
// 处理登录页面路径
|
|
@@ -8480,7 +8509,7 @@ var isLogined = function isLogined(_ref3) {
|
|
|
8480
8509
|
sessionStorage.setItem('loginPage', loginPage);
|
|
8481
8510
|
|
|
8482
8511
|
// 处理相对路径
|
|
8483
|
-
if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "
|
|
8512
|
+
if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "R"])(loginPage, ['http', '/'], true)) {
|
|
8484
8513
|
if (pathname !== '/') {
|
|
8485
8514
|
var pathParts = pathname.split('/');
|
|
8486
8515
|
pathParts.splice(pathParts.length - 1);
|
|
@@ -8505,7 +8534,7 @@ var isLogined = function isLogined(_ref3) {
|
|
|
8505
8534
|
|
|
8506
8535
|
// 处理重定向
|
|
8507
8536
|
if (redirect && (to.path === '/main' || to.path === '/login')) {
|
|
8508
|
-
window.location.replace(Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "
|
|
8537
|
+
window.location.replace(Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "X"])({ url: '.' + to.path + '.html', param: to.query }));
|
|
8509
8538
|
} else {
|
|
8510
8539
|
next();
|
|
8511
8540
|
}
|
|
@@ -8708,7 +8737,7 @@ var downloadFile = function downloadFile(_ref6) {
|
|
|
8708
8737
|
|
|
8709
8738
|
// 拼接URL参数
|
|
8710
8739
|
if (Object.keys(params).length > 0) {
|
|
8711
|
-
downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "
|
|
8740
|
+
downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "X"])({ url: downloadUrl, param: params });
|
|
8712
8741
|
}
|
|
8713
8742
|
} else if (file.raw) {
|
|
8714
8743
|
downloadUrl = URL.createObjectURL(file.raw);
|
|
@@ -8754,7 +8783,7 @@ var downloadZip = function downloadZip(_ref7) {
|
|
|
8754
8783
|
code = _ref7.code,
|
|
8755
8784
|
option = _objectWithoutProperties(_ref7, ['withToken', 'fileName', 'url', 'ownId', 'code']);
|
|
8756
8785
|
|
|
8757
|
-
var dochubConfig = Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('dochubConfig') || { compressDownloadDocumentUrl: _config_api__WEBPACK_IMPORTED_MODULE_7__[/* uploadDownloads */ "
|
|
8786
|
+
var dochubConfig = Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('dochubConfig') || { compressDownloadDocumentUrl: _config_api__WEBPACK_IMPORTED_MODULE_7__[/* uploadDownloads */ "Nc"] };
|
|
8758
8787
|
|
|
8759
8788
|
// 处理URL和参数
|
|
8760
8789
|
var downloadUrl = url ? url : dochubConfig.compressDownloadDocumentUrl;
|
|
@@ -8770,7 +8799,7 @@ var downloadZip = function downloadZip(_ref7) {
|
|
|
8770
8799
|
|
|
8771
8800
|
// 拼接URL参数
|
|
8772
8801
|
if (Object.keys(params).length > 0) {
|
|
8773
|
-
downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "
|
|
8802
|
+
downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "X"])({ url: downloadUrl, param: params });
|
|
8774
8803
|
}
|
|
8775
8804
|
|
|
8776
8805
|
// 创建a标签
|
|
@@ -8875,7 +8904,7 @@ var getTableData = function getTableData(_ref9) {
|
|
|
8875
8904
|
onSuccess = _ref9.onSuccess,
|
|
8876
8905
|
onError = _ref9.onError;
|
|
8877
8906
|
|
|
8878
|
-
var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "
|
|
8907
|
+
var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "K"])('数据加载中...');
|
|
8879
8908
|
return new Promise(function (resolve, reject) {
|
|
8880
8909
|
ajax({
|
|
8881
8910
|
method: method,
|