eoss-ui 0.5.80 → 0.5.81-beta1
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/button-group.js +229 -215
- package/lib/button.js +21 -19
- package/lib/calendar.js +2 -2
- package/lib/card.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/checkbox-group.js +21 -20
- package/lib/clients.js +2 -2
- package/lib/config/api.js +1 -0
- package/lib/data-table-form.js +19 -17
- package/lib/data-table.js +27 -25
- package/lib/date-picker.js +21 -19
- package/lib/dialog.js +21 -20
- package/lib/enterprise.js +2 -2
- package/lib/eoss-ui.common.js +6159 -1106
- package/lib/error-page.js +2 -2
- package/lib/flow-group.js +21 -19
- package/lib/flow-list.js +21 -19
- package/lib/flow.js +24 -22
- package/lib/form.js +21 -20
- package/lib/handle-user.js +21 -19
- package/lib/handler.js +25 -23
- package/lib/icon.js +3745 -13
- package/lib/icons.js +3 -3
- package/lib/index.js +1 -1
- package/lib/input-number.js +21 -19
- package/lib/input.js +21 -19
- package/lib/label.js +2 -2
- package/lib/layout.js +2 -2
- package/lib/login.js +98 -55
- package/lib/main.js +5822 -835
- package/lib/menu.js +2 -2
- package/lib/nav.js +21 -19
- package/lib/notify.js +18 -16
- package/lib/page.js +21 -19
- package/lib/pagination.js +2 -2
- package/lib/player.js +25 -23
- package/lib/qr-code.js +23 -21
- package/lib/radio-group.js +21 -19
- package/lib/retrial-auth.js +22 -20
- package/lib/select-ganged.js +21 -19
- package/lib/select.js +21 -19
- package/lib/selector-panel.js +24 -23
- package/lib/selector.js +30 -28
- package/lib/sizer.js +21 -19
- package/lib/steps.js +21 -19
- package/lib/switch.js +28 -26
- package/lib/table-form.js +21 -19
- package/lib/tabs-panel.js +2 -2
- package/lib/tabs.js +21 -19
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/data-table.css +1 -1
- package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff +0 -0
- package/lib/theme-chalk/icon.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -0
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +22 -20
- package/lib/toolbar.js +2 -2
- package/lib/tree-group.js +21 -19
- package/lib/tree.js +21 -19
- package/lib/upload.js +39 -38
- package/lib/utils/util.js +1 -1
- package/lib/wujie.js +21 -19
- package/lib/wxlogin.js +164 -162
- package/package.json +2 -2
- package/packages/data-table/src/main.vue +1 -0
- package/packages/handler/src/main.vue +3 -1
- package/packages/icon/src/main.vue +42 -11
- package/packages/icons/src/icon.json +1 -1
- package/packages/login/src/main.vue +14 -6
- package/packages/main/src/default/index.vue +2121 -0
- package/packages/main/src/main.vue +31 -2214
- package/packages/main/src/simplicity/apps.vue +338 -0
- package/packages/main/src/simplicity/avatar.vue +68 -0
- package/packages/main/src/simplicity/handler.vue +188 -0
- package/packages/main/src/simplicity/index.vue +1608 -0
- package/packages/main/src/simplicity/lists.vue +84 -0
- package/packages/main/src/simplicity/menu-list.vue +77 -0
- package/packages/main/src/simplicity/message.vue +237 -0
- package/packages/main/src/simplicity/notice.vue +145 -0
- package/packages/main/src/simplicity/settings.vue +119 -0
- package/packages/main/src/simplicity/sub-menu.vue +126 -0
- package/packages/main/src/simplicity/user.vue +243 -0
- package/packages/main/src/simplicity/userinfo.vue +302 -0
- package/packages/theme-chalk/lib/base.css +1 -1
- package/packages/theme-chalk/lib/data-table.css +1 -1
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/icon.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/menu.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -0
- package/packages/theme-chalk/lib/sizer.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/base.scss +1 -0
- package/packages/theme-chalk/src/common/var.scss +4 -0
- package/packages/theme-chalk/src/data-table.scss +0 -3
- package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/src/icon.scss +4 -4
- package/packages/theme-chalk/src/login.scss +644 -632
- package/packages/theme-chalk/src/main.scss +8 -4
- package/packages/theme-chalk/src/simplicity.scss +566 -0
- package/packages/upload/src/main.vue +15 -17
- package/src/config/api.js +1 -0
- package/src/index.js +1 -1
- package/src/utils/util.js +1 -1
- package/lib/theme-chalk/mainComp.css +0 -0
- package/packages/main/src/async-component/index.vue +0 -87
- package/packages/theme-chalk/lib/mainComp.css +0 -0
- package/packages/theme-chalk/src/mainComp.scss +0 -0
- /package/packages/main/src/{message.vue → default/message.vue} +0 -0
- /package/packages/main/src/{notice.vue → default/notice.vue} +0 -0
- /package/packages/main/src/{settings.vue → default/settings.vue} +0 -0
- /package/packages/main/src/{userinfo.vue → default/userinfo.vue} +0 -0
package/lib/button-group.js
CHANGED
|
@@ -82,12 +82,11 @@ 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 = 36);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
|
-
/******/ (
|
|
89
|
-
|
|
90
|
-
/***/ 0:
|
|
88
|
+
/******/ ([
|
|
89
|
+
/* 0 */
|
|
91
90
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
91
|
|
|
93
92
|
"use strict";
|
|
@@ -1387,7 +1386,7 @@ var getLightness = function getLightness($v, $i, $isLight) {
|
|
|
1387
1386
|
* @param {function} callback - 回调函数
|
|
1388
1387
|
**/
|
|
1389
1388
|
var getMainConfig = function getMainConfig(callback) {
|
|
1390
|
-
ajax({ url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* mainConfig */ "
|
|
1389
|
+
ajax({ url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* mainConfig */ "fb"] }).then(function (res) {
|
|
1391
1390
|
if (res && res.rCode === 0) {
|
|
1392
1391
|
callback(res.results);
|
|
1393
1392
|
}
|
|
@@ -2121,7 +2120,7 @@ var isLogined = function isLogined(_ref8) {
|
|
|
2121
2120
|
}
|
|
2122
2121
|
var quit = getParams('quit') || getParams('logout');
|
|
2123
2122
|
if (quit) {
|
|
2124
|
-
ajax({ method: 'post', url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* logout */ "
|
|
2123
|
+
ajax({ method: 'post', url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* logout */ "eb"] }).then(function (res) {
|
|
2125
2124
|
if (res.rCode === 0) {
|
|
2126
2125
|
removeStorage();
|
|
2127
2126
|
}
|
|
@@ -2560,7 +2559,7 @@ var replenish = function replenish(_ref12) {
|
|
|
2560
2559
|
while (res.length <= len + precision) {
|
|
2561
2560
|
res += '0';
|
|
2562
2561
|
}
|
|
2563
|
-
return
|
|
2562
|
+
return res;
|
|
2564
2563
|
}
|
|
2565
2564
|
return data;
|
|
2566
2565
|
};
|
|
@@ -3241,16 +3240,15 @@ var watermark = function watermark(option) {
|
|
|
3241
3240
|
});
|
|
3242
3241
|
|
|
3243
3242
|
/***/ }),
|
|
3244
|
-
|
|
3245
|
-
/***/ 1:
|
|
3243
|
+
/* 1 */
|
|
3246
3244
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3247
3245
|
|
|
3248
3246
|
"use strict";
|
|
3249
3247
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return doCaLogin; });
|
|
3250
3248
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return doUserLogin; });
|
|
3251
3249
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return doQrLogin; });
|
|
3252
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3253
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3250
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eb", function() { return logout; });
|
|
3251
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return initLogin; });
|
|
3254
3252
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ub", function() { return switchUserTo; });
|
|
3255
3253
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return changeImg; });
|
|
3256
3254
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return getLoginCode; });
|
|
@@ -3258,19 +3256,19 @@ var watermark = function watermark(option) {
|
|
|
3258
3256
|
/* unused harmony export updateCode */
|
|
3259
3257
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return getModifyPassCode; });
|
|
3260
3258
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return codeModifyPass; });
|
|
3261
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3259
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return loginModifyPassword; });
|
|
3262
3260
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return authCenter; });
|
|
3263
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3261
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return initModifyPassword; });
|
|
3264
3262
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return doWechatQrLogin; });
|
|
3265
3263
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return getTwoFactorLoginCode; });
|
|
3266
3264
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return doTwoFactorLogin; });
|
|
3267
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3265
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return initRetrialAuth; });
|
|
3268
3266
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return getRetrialAuthCode; });
|
|
3269
3267
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pb", function() { return scanCodeRetrialAuth; });
|
|
3270
3268
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return codeRetrialAuth; });
|
|
3271
3269
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return doAssistanceQrLogin; });
|
|
3272
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3273
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3270
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fb", function() { return mainConfig; });
|
|
3271
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return initUserSet; });
|
|
3274
3272
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Xb", function() { return updateUserInfo; });
|
|
3275
3273
|
/* unused harmony export getUserImgUrl */
|
|
3276
3274
|
/* unused harmony export getDoorIndex */
|
|
@@ -3279,11 +3277,12 @@ var watermark = function watermark(option) {
|
|
|
3279
3277
|
/* unused harmony export getApplicationIdArray */
|
|
3280
3278
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return getComplexApplications; });
|
|
3281
3279
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return getComplexApplicationsNew; });
|
|
3280
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return getUserAppWithTag; });
|
|
3282
3281
|
/* unused harmony export getUserCustomInfo */
|
|
3283
3282
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Wb", function() { return updateUserCustomInfo; });
|
|
3284
3283
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "vb", function() { return sysMsgPage; });
|
|
3285
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3286
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3284
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return ignoreSysMsg; });
|
|
3285
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return ignoreAllSysMsg; });
|
|
3287
3286
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getAdjunctProperties; });
|
|
3288
3287
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bc", function() { return uploads; });
|
|
3289
3288
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Zb", function() { return uploadOnlyOne; });
|
|
@@ -3305,9 +3304,9 @@ var watermark = function watermark(option) {
|
|
|
3305
3304
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return findSysCode; });
|
|
3306
3305
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return getDictList; });
|
|
3307
3306
|
/* unused harmony export findUserBaseInfo */
|
|
3308
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3307
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return gethelpdoc; });
|
|
3309
3308
|
/* unused harmony export getCurrentuser */
|
|
3310
|
-
/* harmony export
|
|
3309
|
+
/* unused harmony export mainDetail */
|
|
3311
3310
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ib", function() { return toStartFlow; });
|
|
3312
3311
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fb", function() { return tempSave; });
|
|
3313
3312
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return commonOpion; });
|
|
@@ -3336,8 +3335,8 @@ var watermark = function watermark(option) {
|
|
|
3336
3335
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hb", function() { return toSendMsg; });
|
|
3337
3336
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tb", function() { return sendMsg; });
|
|
3338
3337
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return endFlowHtml; });
|
|
3339
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3340
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3338
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return handleInfo; });
|
|
3339
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "db", function() { return loginUserInfo; });
|
|
3341
3340
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cc", function() { return wss; });
|
|
3342
3341
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tb", function() { return topic; });
|
|
3343
3342
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return getPresetCustomInfo; });
|
|
@@ -3350,7 +3349,7 @@ var watermark = function watermark(option) {
|
|
|
3350
3349
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hb", function() { return pendedhistoryListJson; });
|
|
3351
3350
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ib", function() { return pressListJson; });
|
|
3352
3351
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return deleteFlow; });
|
|
3353
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
3352
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return isCanStartSubFlow; });
|
|
3354
3353
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Qb", function() { return toTaskUnionExamine; });
|
|
3355
3354
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Db", function() { return taskUnionExamine; });
|
|
3356
3355
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ob", function() { return toTaskTakeAdvice; });
|
|
@@ -3406,6 +3405,7 @@ var getQuickMenuIds = '/main2/main/getQuickMenuIds'; // 获取已绑定的快捷
|
|
|
3406
3405
|
var getApplicationIdArray = '/main2/main/getApplicationIdArray'; // 获取应用父id数组
|
|
3407
3406
|
var getComplexApplications = '/main2/menu/getComplexApplications'; // 获取当前用户菜单; 含页签菜单格式的数据
|
|
3408
3407
|
var getComplexApplicationsNew = '/main2/menu/getComplexApplicationsNew'; // 获取当前用户应用菜单; 含页签菜单格式的数据
|
|
3408
|
+
var getUserAppWithTag = '/sysv3/sysUucApp/getUserAppWithTag'; // 获取应用
|
|
3409
3409
|
var getUserCustomInfo = '/main2/main/getUserCustomInfo'; // 获取主题样式
|
|
3410
3410
|
var updateUserCustomInfo = '/main2/main/updateUserCustomInfo'; // 更新主题样式
|
|
3411
3411
|
// 框架 - 系统消息
|
|
@@ -3589,22 +3589,13 @@ var sendBatch = '/notify2/sendRecord/reSendNotifyMessageBatch';
|
|
|
3589
3589
|
var formContents = '/config/admin/online/onlineForm/render';
|
|
3590
3590
|
|
|
3591
3591
|
/***/ }),
|
|
3592
|
-
|
|
3593
|
-
/***/ 10:
|
|
3594
|
-
/***/ (function(module, exports) {
|
|
3595
|
-
|
|
3596
|
-
module.exports = require("sm-crypto");
|
|
3597
|
-
|
|
3598
|
-
/***/ }),
|
|
3599
|
-
|
|
3600
|
-
/***/ 2:
|
|
3592
|
+
/* 2 */
|
|
3601
3593
|
/***/ (function(module, exports) {
|
|
3602
3594
|
|
|
3603
3595
|
module.exports = require("eoss-element");
|
|
3604
3596
|
|
|
3605
3597
|
/***/ }),
|
|
3606
|
-
|
|
3607
|
-
/***/ 3:
|
|
3598
|
+
/* 3 */
|
|
3608
3599
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3609
3600
|
|
|
3610
3601
|
"use strict";
|
|
@@ -3708,8 +3699,210 @@ function normalizeComponent(
|
|
|
3708
3699
|
|
|
3709
3700
|
|
|
3710
3701
|
/***/ }),
|
|
3702
|
+
/* 4 */
|
|
3703
|
+
/***/ (function(module, exports) {
|
|
3704
|
+
|
|
3705
|
+
module.exports = require("qs");
|
|
3706
|
+
|
|
3707
|
+
/***/ }),
|
|
3708
|
+
/* 5 */
|
|
3709
|
+
/***/ (function(module, exports) {
|
|
3710
|
+
|
|
3711
|
+
module.exports = require("axios");
|
|
3712
|
+
|
|
3713
|
+
/***/ }),
|
|
3714
|
+
/* 6 */
|
|
3715
|
+
/***/ (function(module, exports) {
|
|
3716
|
+
|
|
3717
|
+
module.exports = require("json-bigint");
|
|
3718
|
+
|
|
3719
|
+
/***/ }),
|
|
3720
|
+
/* 7 */
|
|
3721
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3722
|
+
|
|
3723
|
+
"use strict";
|
|
3724
|
+
/* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
|
3725
|
+
/* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
|
|
3726
|
+
/* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
|
3727
|
+
/* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
|
|
3728
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3729
|
+
|
|
3730
|
+
|
|
3731
|
+
|
|
3732
|
+
|
|
3733
|
+
var WebSocket = function () {
|
|
3734
|
+
// 构造函数
|
|
3735
|
+
function WebSocket() {
|
|
3736
|
+
_classCallCheck(this, WebSocket);
|
|
3737
|
+
|
|
3738
|
+
this.host = sessionStorage.getItem('wshost') || '';
|
|
3739
|
+
this.tryTimes = 1; // 重连次数
|
|
3740
|
+
this.callback = null; // 回调函数
|
|
3741
|
+
this.client = null; // stomp对象
|
|
3742
|
+
this.reconTimeout = null; // 重连延时器
|
|
3743
|
+
this.debug = true; // 调试
|
|
3744
|
+
this.interval = 20; // 重连间隔时间
|
|
3745
|
+
this.vm = null;
|
|
3746
|
+
this.nextDate = 0;
|
|
3747
|
+
this.connects = 1;
|
|
3748
|
+
this.recon = false;
|
|
3749
|
+
this.sendTimeout = null;
|
|
3750
|
+
this.socket = null;
|
|
3751
|
+
this.subscription = null;
|
|
3752
|
+
}
|
|
3753
|
+
|
|
3754
|
+
/** socket连接 */
|
|
3755
|
+
|
|
3756
|
+
|
|
3757
|
+
WebSocket.prototype.connect = function connect() {
|
|
3758
|
+
var _this = this;
|
|
3759
|
+
|
|
3760
|
+
if (!this.client) {
|
|
3761
|
+
// 连接SockJS
|
|
3762
|
+
this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
|
|
3763
|
+
this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
|
|
3764
|
+
}
|
|
3765
|
+
|
|
3766
|
+
// 日志不打印
|
|
3767
|
+
if (!this.debug) {
|
|
3768
|
+
this.client.debug = function () {};
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
// 向服务器发起websocket连接
|
|
3772
|
+
this.client.connect({}, function () {
|
|
3773
|
+
_this.recon = true;
|
|
3774
|
+
// tryTimes定义重置
|
|
3775
|
+
_this.connects = 1;
|
|
3776
|
+
// 订阅消息
|
|
3777
|
+
_this.subscribe();
|
|
3778
|
+
}, function (error) {
|
|
3779
|
+
_this.unsubscribe();
|
|
3780
|
+
_this.client = null;
|
|
3781
|
+
var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
|
|
3782
|
+
if (_this.connects > 5 && diffSecond < _this.interval) {
|
|
3783
|
+
_this.error && _this.error(error);
|
|
3784
|
+
} else {
|
|
3785
|
+
_this.reconTimeout = setTimeout(function () {
|
|
3786
|
+
_this.connect();
|
|
3787
|
+
_this.connects++;
|
|
3788
|
+
}, 5000);
|
|
3789
|
+
}
|
|
3790
|
+
});
|
|
3791
|
+
}; // 清除订阅
|
|
3792
|
+
|
|
3793
|
+
|
|
3794
|
+
WebSocket.prototype.unsubscribe = function unsubscribe() {
|
|
3795
|
+
if (this.subscription) {
|
|
3796
|
+
this.subscription.unsubscribe();
|
|
3797
|
+
this.subscription = null;
|
|
3798
|
+
}
|
|
3799
|
+
};
|
|
3800
|
+
/** 订阅服务端 */
|
|
3801
|
+
|
|
3802
|
+
|
|
3803
|
+
WebSocket.prototype.subscribe = function subscribe() {
|
|
3804
|
+
var _this2 = this;
|
|
3805
|
+
|
|
3806
|
+
// 订阅服务端提供的某个topic
|
|
3807
|
+
this.subscription = this.client.subscribe(this.take, function (response) {
|
|
3808
|
+
if (response && (_this2.callback || _this2.success)) {
|
|
3809
|
+
var callback = _this2.callback || _this2.success;
|
|
3810
|
+
callback(JSON.parse(response.body));
|
|
3811
|
+
}
|
|
3812
|
+
});
|
|
3813
|
+
};
|
|
3814
|
+
|
|
3815
|
+
/** 赋值、初始化socket */
|
|
3816
|
+
|
|
3817
|
+
|
|
3818
|
+
WebSocket.prototype.init = function init(option, vm) {
|
|
3819
|
+
for (var i in option) {
|
|
3820
|
+
this[i] = option[i];
|
|
3821
|
+
}
|
|
3822
|
+
this.vm = vm;
|
|
3823
|
+
// 初始化连接
|
|
3824
|
+
this.connect();
|
|
3825
|
+
};
|
|
3826
|
+
|
|
3827
|
+
/** 发送消息 */
|
|
3828
|
+
|
|
3829
|
+
|
|
3830
|
+
WebSocket.prototype.send = function send(data) {
|
|
3831
|
+
var _this3 = this;
|
|
3832
|
+
|
|
3833
|
+
if (this.recon) {
|
|
3834
|
+
clearTimeout(this.sendTimeout);
|
|
3835
|
+
this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
|
|
3836
|
+
} else {
|
|
3837
|
+
this.sendTimeout = setTimeout(function () {
|
|
3838
|
+
_this3.send(data);
|
|
3839
|
+
}, 1000);
|
|
3840
|
+
}
|
|
3841
|
+
};
|
|
3842
|
+
|
|
3843
|
+
/** 销毁 */
|
|
3844
|
+
|
|
3845
|
+
|
|
3846
|
+
WebSocket.prototype.destroy = function destroy() {
|
|
3847
|
+
// 断开连接,清除定时器
|
|
3848
|
+
this.unsubscribe();
|
|
3849
|
+
if (this.client) {
|
|
3850
|
+
this.client.disconnect();
|
|
3851
|
+
};
|
|
3852
|
+
this.reconTimeout && clearTimeout(this.reconTimeout);
|
|
3853
|
+
this.sendTimeout && clearTimeout(this.sendTimeout);
|
|
3854
|
+
};
|
|
3855
|
+
|
|
3856
|
+
return WebSocket;
|
|
3857
|
+
}();
|
|
3858
|
+
|
|
3859
|
+
/* harmony default export */ __webpack_exports__["a"] = (WebSocket);
|
|
3860
|
+
|
|
3861
|
+
/***/ }),
|
|
3862
|
+
/* 8 */
|
|
3863
|
+
/***/ (function(module, exports) {
|
|
3864
|
+
|
|
3865
|
+
module.exports = require("sockjs-client");
|
|
3866
|
+
|
|
3867
|
+
/***/ }),
|
|
3868
|
+
/* 9 */
|
|
3869
|
+
/***/ (function(module, exports) {
|
|
3870
|
+
|
|
3871
|
+
module.exports = require("stompjs");
|
|
3872
|
+
|
|
3873
|
+
/***/ }),
|
|
3874
|
+
/* 10 */
|
|
3875
|
+
/***/ (function(module, exports) {
|
|
3876
|
+
|
|
3877
|
+
module.exports = require("sm-crypto");
|
|
3711
3878
|
|
|
3712
|
-
/***/
|
|
3879
|
+
/***/ }),
|
|
3880
|
+
/* 11 */,
|
|
3881
|
+
/* 12 */,
|
|
3882
|
+
/* 13 */,
|
|
3883
|
+
/* 14 */,
|
|
3884
|
+
/* 15 */,
|
|
3885
|
+
/* 16 */,
|
|
3886
|
+
/* 17 */,
|
|
3887
|
+
/* 18 */,
|
|
3888
|
+
/* 19 */,
|
|
3889
|
+
/* 20 */,
|
|
3890
|
+
/* 21 */,
|
|
3891
|
+
/* 22 */,
|
|
3892
|
+
/* 23 */,
|
|
3893
|
+
/* 24 */,
|
|
3894
|
+
/* 25 */,
|
|
3895
|
+
/* 26 */,
|
|
3896
|
+
/* 27 */,
|
|
3897
|
+
/* 28 */,
|
|
3898
|
+
/* 29 */,
|
|
3899
|
+
/* 30 */,
|
|
3900
|
+
/* 31 */,
|
|
3901
|
+
/* 32 */,
|
|
3902
|
+
/* 33 */,
|
|
3903
|
+
/* 34 */,
|
|
3904
|
+
/* 35 */,
|
|
3905
|
+
/* 36 */
|
|
3713
3906
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3714
3907
|
|
|
3715
3908
|
"use strict";
|
|
@@ -4245,184 +4438,5 @@ main.install = function (Vue) {
|
|
|
4245
4438
|
|
|
4246
4439
|
/* harmony default export */ var button_group = __webpack_exports__["default"] = (main);
|
|
4247
4440
|
|
|
4248
|
-
/***/ }),
|
|
4249
|
-
|
|
4250
|
-
/***/ 4:
|
|
4251
|
-
/***/ (function(module, exports) {
|
|
4252
|
-
|
|
4253
|
-
module.exports = require("qs");
|
|
4254
|
-
|
|
4255
|
-
/***/ }),
|
|
4256
|
-
|
|
4257
|
-
/***/ 5:
|
|
4258
|
-
/***/ (function(module, exports) {
|
|
4259
|
-
|
|
4260
|
-
module.exports = require("axios");
|
|
4261
|
-
|
|
4262
|
-
/***/ }),
|
|
4263
|
-
|
|
4264
|
-
/***/ 6:
|
|
4265
|
-
/***/ (function(module, exports) {
|
|
4266
|
-
|
|
4267
|
-
module.exports = require("json-bigint");
|
|
4268
|
-
|
|
4269
|
-
/***/ }),
|
|
4270
|
-
|
|
4271
|
-
/***/ 7:
|
|
4272
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4273
|
-
|
|
4274
|
-
"use strict";
|
|
4275
|
-
/* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
|
4276
|
-
/* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
|
|
4277
|
-
/* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
|
4278
|
-
/* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
|
|
4279
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
var WebSocket = function () {
|
|
4285
|
-
// 构造函数
|
|
4286
|
-
function WebSocket() {
|
|
4287
|
-
_classCallCheck(this, WebSocket);
|
|
4288
|
-
|
|
4289
|
-
this.host = sessionStorage.getItem('wshost') || '';
|
|
4290
|
-
this.tryTimes = 1; // 重连次数
|
|
4291
|
-
this.callback = null; // 回调函数
|
|
4292
|
-
this.client = null; // stomp对象
|
|
4293
|
-
this.reconTimeout = null; // 重连延时器
|
|
4294
|
-
this.debug = true; // 调试
|
|
4295
|
-
this.interval = 20; // 重连间隔时间
|
|
4296
|
-
this.vm = null;
|
|
4297
|
-
this.nextDate = 0;
|
|
4298
|
-
this.connects = 1;
|
|
4299
|
-
this.recon = false;
|
|
4300
|
-
this.sendTimeout = null;
|
|
4301
|
-
this.socket = null;
|
|
4302
|
-
this.subscription = null;
|
|
4303
|
-
}
|
|
4304
|
-
|
|
4305
|
-
/** socket连接 */
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
WebSocket.prototype.connect = function connect() {
|
|
4309
|
-
var _this = this;
|
|
4310
|
-
|
|
4311
|
-
if (!this.client) {
|
|
4312
|
-
// 连接SockJS
|
|
4313
|
-
this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
|
|
4314
|
-
this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
|
|
4315
|
-
}
|
|
4316
|
-
|
|
4317
|
-
// 日志不打印
|
|
4318
|
-
if (!this.debug) {
|
|
4319
|
-
this.client.debug = function () {};
|
|
4320
|
-
}
|
|
4321
|
-
|
|
4322
|
-
// 向服务器发起websocket连接
|
|
4323
|
-
this.client.connect({}, function () {
|
|
4324
|
-
_this.recon = true;
|
|
4325
|
-
// tryTimes定义重置
|
|
4326
|
-
_this.connects = 1;
|
|
4327
|
-
// 订阅消息
|
|
4328
|
-
_this.subscribe();
|
|
4329
|
-
}, function (error) {
|
|
4330
|
-
_this.unsubscribe();
|
|
4331
|
-
_this.client = null;
|
|
4332
|
-
var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
|
|
4333
|
-
if (_this.connects > 5 && diffSecond < _this.interval) {
|
|
4334
|
-
_this.error && _this.error(error);
|
|
4335
|
-
} else {
|
|
4336
|
-
_this.reconTimeout = setTimeout(function () {
|
|
4337
|
-
_this.connect();
|
|
4338
|
-
_this.connects++;
|
|
4339
|
-
}, 5000);
|
|
4340
|
-
}
|
|
4341
|
-
});
|
|
4342
|
-
}; // 清除订阅
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
WebSocket.prototype.unsubscribe = function unsubscribe() {
|
|
4346
|
-
if (this.subscription) {
|
|
4347
|
-
this.subscription.unsubscribe();
|
|
4348
|
-
this.subscription = null;
|
|
4349
|
-
}
|
|
4350
|
-
};
|
|
4351
|
-
/** 订阅服务端 */
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
WebSocket.prototype.subscribe = function subscribe() {
|
|
4355
|
-
var _this2 = this;
|
|
4356
|
-
|
|
4357
|
-
// 订阅服务端提供的某个topic
|
|
4358
|
-
this.subscription = this.client.subscribe(this.take, function (response) {
|
|
4359
|
-
if (response && (_this2.callback || _this2.success)) {
|
|
4360
|
-
var callback = _this2.callback || _this2.success;
|
|
4361
|
-
callback(JSON.parse(response.body));
|
|
4362
|
-
}
|
|
4363
|
-
});
|
|
4364
|
-
};
|
|
4365
|
-
|
|
4366
|
-
/** 赋值、初始化socket */
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
WebSocket.prototype.init = function init(option, vm) {
|
|
4370
|
-
for (var i in option) {
|
|
4371
|
-
this[i] = option[i];
|
|
4372
|
-
}
|
|
4373
|
-
this.vm = vm;
|
|
4374
|
-
// 初始化连接
|
|
4375
|
-
this.connect();
|
|
4376
|
-
};
|
|
4377
|
-
|
|
4378
|
-
/** 发送消息 */
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
WebSocket.prototype.send = function send(data) {
|
|
4382
|
-
var _this3 = this;
|
|
4383
|
-
|
|
4384
|
-
if (this.recon) {
|
|
4385
|
-
clearTimeout(this.sendTimeout);
|
|
4386
|
-
this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
|
|
4387
|
-
} else {
|
|
4388
|
-
this.sendTimeout = setTimeout(function () {
|
|
4389
|
-
_this3.send(data);
|
|
4390
|
-
}, 1000);
|
|
4391
|
-
}
|
|
4392
|
-
};
|
|
4393
|
-
|
|
4394
|
-
/** 销毁 */
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
WebSocket.prototype.destroy = function destroy() {
|
|
4398
|
-
// 断开连接,清除定时器
|
|
4399
|
-
this.unsubscribe();
|
|
4400
|
-
if (this.client) {
|
|
4401
|
-
this.client.disconnect();
|
|
4402
|
-
};
|
|
4403
|
-
this.reconTimeout && clearTimeout(this.reconTimeout);
|
|
4404
|
-
this.sendTimeout && clearTimeout(this.sendTimeout);
|
|
4405
|
-
};
|
|
4406
|
-
|
|
4407
|
-
return WebSocket;
|
|
4408
|
-
}();
|
|
4409
|
-
|
|
4410
|
-
/* harmony default export */ __webpack_exports__["a"] = (WebSocket);
|
|
4411
|
-
|
|
4412
|
-
/***/ }),
|
|
4413
|
-
|
|
4414
|
-
/***/ 8:
|
|
4415
|
-
/***/ (function(module, exports) {
|
|
4416
|
-
|
|
4417
|
-
module.exports = require("sockjs-client");
|
|
4418
|
-
|
|
4419
|
-
/***/ }),
|
|
4420
|
-
|
|
4421
|
-
/***/ 9:
|
|
4422
|
-
/***/ (function(module, exports) {
|
|
4423
|
-
|
|
4424
|
-
module.exports = require("stompjs");
|
|
4425
|
-
|
|
4426
4441
|
/***/ })
|
|
4427
|
-
|
|
4428
|
-
/******/ });
|
|
4442
|
+
/******/ ]);
|