eoss-ui 0.5.73 → 0.5.75
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 +115 -29
- package/lib/button.js +115 -29
- package/lib/checkbox-group.js +115 -29
- package/lib/clients.js +16 -7
- package/lib/data-table-form.js +115 -29
- package/lib/data-table.js +130 -35
- package/lib/date-picker.js +115 -29
- package/lib/dialog.js +115 -29
- package/lib/eoss-ui.common.js +345 -133
- package/lib/flow-group.js +115 -29
- package/lib/flow-list.js +115 -29
- package/lib/flow.js +115 -29
- package/lib/form.js +115 -29
- package/lib/handle-user.js +115 -29
- package/lib/handler.js +115 -29
- package/lib/index.js +1 -1
- package/lib/input-number.js +114 -28
- package/lib/input.js +131 -35
- package/lib/login.js +147 -40
- package/lib/main.js +197 -51
- package/lib/nav.js +163 -52
- package/lib/page.js +115 -29
- package/lib/player.js +115 -29
- package/lib/qr-code.js +115 -29
- package/lib/radio-group.js +115 -29
- package/lib/retrial-auth.js +115 -29
- package/lib/select-ganged.js +115 -29
- package/lib/select.js +130 -34
- package/lib/selector-panel.js +115 -29
- package/lib/selector.js +115 -29
- package/lib/sizer.js +115 -29
- package/lib/steps.js +115 -29
- package/lib/switch.js +114 -28
- package/lib/table-form.js +115 -29
- package/lib/tabs.js +115 -29
- package/lib/theme-chalk/base.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/nav.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +115 -29
- package/lib/tree-group.js +115 -29
- package/lib/tree.js +115 -29
- package/lib/upload.js +115 -29
- package/lib/utils/util.js +98 -22
- package/lib/utils/webSocket.js +16 -6
- package/lib/wujie.js +115 -29
- package/lib/wxlogin.js +114 -28
- package/package.json +2 -2
- package/packages/clients/src/main.vue +3 -1
- package/packages/data-table/src/main.vue +10 -1
- package/packages/input/src/main.vue +7 -6
- package/packages/login/src/main.vue +13 -0
- package/packages/login/src/resetPassword.vue +1 -1
- package/packages/main/src/main.vue +44 -10
- package/packages/nav/src/main.vue +25 -8
- package/packages/select/src/main.vue +6 -5
- package/packages/theme-chalk/lib/base.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/nav.css +1 -1
- 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 +3 -0
- package/packages/theme-chalk/src/login.scss +175 -171
- package/packages/theme-chalk/src/main.scss +5 -2
- package/packages/theme-chalk/src/nav.scss +4 -1
- package/src/index.js +1 -1
- package/src/utils/util.js +112 -23
- package/src/utils/webSocket.js +14 -7
package/lib/clients.js
CHANGED
|
@@ -199,7 +199,7 @@ function normalizeComponent(
|
|
|
199
199
|
// ESM COMPAT FLAG
|
|
200
200
|
__webpack_require__.r(__webpack_exports__);
|
|
201
201
|
|
|
202
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/clients/src/main.vue?vue&type=template&id=
|
|
202
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/clients/src/main.vue?vue&type=template&id=12fa73ca&
|
|
203
203
|
var render = function () {
|
|
204
204
|
var _vm = this
|
|
205
205
|
var _h = _vm.$createElement
|
|
@@ -208,11 +208,18 @@ var render = function () {
|
|
|
208
208
|
_vm.logo
|
|
209
209
|
? _c("img", { staticClass: "es-clients-logo", attrs: { src: _vm.logo } })
|
|
210
210
|
: _vm._e(),
|
|
211
|
-
_c(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
211
|
+
_c(
|
|
212
|
+
"div",
|
|
213
|
+
{ staticClass: "es-clients-title" },
|
|
214
|
+
[
|
|
215
|
+
_vm._v("\n 请通过手机浏览器\n "),
|
|
216
|
+
_vm.ios
|
|
217
|
+
? [_vm._v(" (iOS11版本以上的苹果手机使用照相功能) ")]
|
|
218
|
+
: _vm._e(),
|
|
219
|
+
_vm._v("\n 扫码下载安装\n "),
|
|
220
|
+
],
|
|
221
|
+
2
|
|
222
|
+
),
|
|
216
223
|
_c("ul", { staticClass: "es-clients-list" }, [
|
|
217
224
|
_vm.ios
|
|
218
225
|
? _c(
|
|
@@ -325,7 +332,7 @@ var staticRenderFns = [
|
|
|
325
332
|
render._withStripped = true
|
|
326
333
|
|
|
327
334
|
|
|
328
|
-
// CONCATENATED MODULE: ./packages/clients/src/main.vue?vue&type=template&id=
|
|
335
|
+
// CONCATENATED MODULE: ./packages/clients/src/main.vue?vue&type=template&id=12fa73ca&
|
|
329
336
|
|
|
330
337
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/clients/src/main.vue?vue&type=script&lang=js&
|
|
331
338
|
var _props;
|
|
@@ -373,6 +380,8 @@ var _props;
|
|
|
373
380
|
//
|
|
374
381
|
//
|
|
375
382
|
//
|
|
383
|
+
//
|
|
384
|
+
//
|
|
376
385
|
|
|
377
386
|
//import util from 'eoss-ui/src/utils/util';
|
|
378
387
|
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
package/lib/data-table-form.js
CHANGED
|
@@ -620,6 +620,35 @@ var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
|
|
|
620
620
|
return workdays;
|
|
621
621
|
};
|
|
622
622
|
|
|
623
|
+
/**
|
|
624
|
+
* chunkToChinese
|
|
625
|
+
* @desc 将四位数的整数转换为中文大写
|
|
626
|
+
* @param {number} chunk - 数字
|
|
627
|
+
**/
|
|
628
|
+
function chunkToChinese(chunk) {
|
|
629
|
+
var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
630
|
+
var capitalDigits = ['', '拾', '佰', '仟'];
|
|
631
|
+
|
|
632
|
+
var result = '';
|
|
633
|
+
var digitIndex = 0;
|
|
634
|
+
|
|
635
|
+
while (chunk > 0) {
|
|
636
|
+
var digit = chunk % 10;
|
|
637
|
+
if (digit > 0) {
|
|
638
|
+
result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
|
|
639
|
+
} else {
|
|
640
|
+
// 当前数字是零,需要判断是否需要添加零
|
|
641
|
+
if (result.charAt(0) !== '零') {
|
|
642
|
+
result = '零' + result;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
chunk = Math.floor(chunk / 10);
|
|
646
|
+
digitIndex++;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
return result;
|
|
650
|
+
}
|
|
651
|
+
|
|
623
652
|
/**
|
|
624
653
|
* concatenate
|
|
625
654
|
* @desc 指定连接符合并文本
|
|
@@ -1815,6 +1844,31 @@ var getWeekday = function getWeekday(date) {
|
|
|
1815
1844
|
return adjustedDay === 0 ? 7 : adjustedDay;
|
|
1816
1845
|
};
|
|
1817
1846
|
|
|
1847
|
+
/**
|
|
1848
|
+
* getZoom
|
|
1849
|
+
* @desc 获取缩放比
|
|
1850
|
+
* @param {number} n - 可选参数,表示星期的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
|
|
1851
|
+
**/
|
|
1852
|
+
var getZoom = function getZoom() {
|
|
1853
|
+
var ratio = 0;
|
|
1854
|
+
var screen = window.screen;
|
|
1855
|
+
var ua = navigator.userAgent.toLowerCase();
|
|
1856
|
+
if (window.devicePixelRatio !== undefined) {
|
|
1857
|
+
ratio = window.devicePixelRatio;
|
|
1858
|
+
} else if (~ua.indexOf('msie')) {
|
|
1859
|
+
if (screen.deviceXDPI && screen.logicalXDPI) {
|
|
1860
|
+
ratio = screen.deviceXDPI / screen.logicalXDPI;
|
|
1861
|
+
}
|
|
1862
|
+
} else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
|
|
1863
|
+
ratio = window.outerWidth / window.innerWidth;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
if (ratio) {
|
|
1867
|
+
ratio = Math.round(ratio * 100);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
return ratio / 100;
|
|
1871
|
+
};
|
|
1818
1872
|
/**
|
|
1819
1873
|
* handlerUrl
|
|
1820
1874
|
* @desc:更新url参数中的时间戳
|
|
@@ -2557,32 +2611,53 @@ var rmbToCapital = function rmbToCapital(number) {
|
|
|
2557
2611
|
|
|
2558
2612
|
return result;
|
|
2559
2613
|
};
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
var
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2614
|
+
/**
|
|
2615
|
+
* setScale
|
|
2616
|
+
* @desc 设置缩放
|
|
2617
|
+
* @param {number} width - 分辨率宽度
|
|
2618
|
+
* @param {number} height - 分辨率高度
|
|
2619
|
+
**/
|
|
2620
|
+
var setScale = function setScale() {
|
|
2621
|
+
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1920;
|
|
2622
|
+
var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1080;
|
|
2623
|
+
|
|
2624
|
+
var n = 1;
|
|
2625
|
+
var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
|
|
2626
|
+
var zoom = getZoom();
|
|
2627
|
+
if (isMac) {
|
|
2628
|
+
n = 2;
|
|
2629
|
+
} else {
|
|
2630
|
+
n = 1;
|
|
2631
|
+
}
|
|
2632
|
+
if (zoom === 1) {
|
|
2633
|
+
document.body.style.removeProperty('transform');
|
|
2634
|
+
document.body.style.removeProperty('width');
|
|
2635
|
+
document.body.style.removeProperty('height');
|
|
2636
|
+
document.body.style.removeProperty('transform-origin');
|
|
2637
|
+
return;
|
|
2638
|
+
}
|
|
2639
|
+
if (Math.abs(parseInt(width - window.innerWidth * zoom / n, 10)) > 15 && window.innerWidth * zoom / n !== width) {
|
|
2640
|
+
var scale = 'scale(' + window.innerWidth * zoom / width / zoom + ',' + window.innerHeight * zoom / height / zoom + ')';
|
|
2641
|
+
document.body.style.transform = scale;
|
|
2642
|
+
document.body.style.width = width + 'px';
|
|
2643
|
+
document.body.style.height = height + 'px';
|
|
2644
|
+
document.body.style.transformOrigin = '0 0';
|
|
2645
|
+
} else {
|
|
2646
|
+
if (isMac) {
|
|
2647
|
+
var _scale = 'scale(' + 1 * n / zoom + ')';
|
|
2648
|
+
document.body.style.transform = _scale;
|
|
2649
|
+
document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
|
|
2650
|
+
document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
|
|
2651
|
+
document.body.style.transformOrigin = '0 0';
|
|
2573
2652
|
} else {
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2653
|
+
var _scale2 = 'scale(' + 1 * n / zoom + ')';
|
|
2654
|
+
document.body.style.transform = _scale2;
|
|
2655
|
+
document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
|
|
2656
|
+
document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
|
|
2657
|
+
document.body.style.transformOrigin = '0 0';
|
|
2578
2658
|
}
|
|
2579
|
-
chunk = Math.floor(chunk / 10);
|
|
2580
|
-
digitIndex++;
|
|
2581
2659
|
}
|
|
2582
|
-
|
|
2583
|
-
return result;
|
|
2584
|
-
}
|
|
2585
|
-
|
|
2660
|
+
};
|
|
2586
2661
|
/**
|
|
2587
2662
|
* sendMessage
|
|
2588
2663
|
* @desc:向iframe发送信息
|
|
@@ -3118,6 +3193,7 @@ var watermark = function watermark(option) {
|
|
|
3118
3193
|
rmbToCapital: rmbToCapital,
|
|
3119
3194
|
sendMessage: sendMessage,
|
|
3120
3195
|
setFavicon: setFavicon,
|
|
3196
|
+
setScale: setScale,
|
|
3121
3197
|
setStorage: setStorage,
|
|
3122
3198
|
socket: socket,
|
|
3123
3199
|
startWith: startWith,
|
|
@@ -3643,6 +3719,8 @@ var WebSocket = function () {
|
|
|
3643
3719
|
this.connects = 1;
|
|
3644
3720
|
this.recon = false;
|
|
3645
3721
|
this.sendTimeout = null;
|
|
3722
|
+
this.socket = null;
|
|
3723
|
+
this.subscription = null;
|
|
3646
3724
|
}
|
|
3647
3725
|
|
|
3648
3726
|
/** socket连接 */
|
|
@@ -3653,14 +3731,12 @@ var WebSocket = function () {
|
|
|
3653
3731
|
|
|
3654
3732
|
if (!this.client) {
|
|
3655
3733
|
// 连接SockJS
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
|
|
3734
|
+
this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
|
|
3735
|
+
this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
|
|
3659
3736
|
}
|
|
3660
3737
|
|
|
3661
3738
|
// 日志不打印
|
|
3662
3739
|
if (!this.debug) {
|
|
3663
|
-
console.log(111);
|
|
3664
3740
|
this.client.debug = function () {};
|
|
3665
3741
|
}
|
|
3666
3742
|
|
|
@@ -3672,9 +3748,10 @@ var WebSocket = function () {
|
|
|
3672
3748
|
// 订阅消息
|
|
3673
3749
|
_this.subscribe();
|
|
3674
3750
|
}, function (error) {
|
|
3751
|
+
_this.unsubscribe();
|
|
3752
|
+
_this.client = null;
|
|
3675
3753
|
var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
|
|
3676
3754
|
if (_this.connects > 5 && diffSecond < _this.interval) {
|
|
3677
|
-
_this.client.disconnect();
|
|
3678
3755
|
_this.error && _this.error(error);
|
|
3679
3756
|
} else {
|
|
3680
3757
|
_this.reconTimeout = setTimeout(function () {
|
|
@@ -3683,6 +3760,14 @@ var WebSocket = function () {
|
|
|
3683
3760
|
}, 5000);
|
|
3684
3761
|
}
|
|
3685
3762
|
});
|
|
3763
|
+
}; // 清除订阅
|
|
3764
|
+
|
|
3765
|
+
|
|
3766
|
+
WebSocket.prototype.unsubscribe = function unsubscribe() {
|
|
3767
|
+
if (this.subscription) {
|
|
3768
|
+
this.subscription.unsubscribe();
|
|
3769
|
+
this.subscription = null;
|
|
3770
|
+
}
|
|
3686
3771
|
};
|
|
3687
3772
|
/** 订阅服务端 */
|
|
3688
3773
|
|
|
@@ -3691,7 +3776,7 @@ var WebSocket = function () {
|
|
|
3691
3776
|
var _this2 = this;
|
|
3692
3777
|
|
|
3693
3778
|
// 订阅服务端提供的某个topic
|
|
3694
|
-
this.client.subscribe(this.take, function (response) {
|
|
3779
|
+
this.subscription = this.client.subscribe(this.take, function (response) {
|
|
3695
3780
|
if (response && (_this2.callback || _this2.success)) {
|
|
3696
3781
|
var callback = _this2.callback || _this2.success;
|
|
3697
3782
|
callback(JSON.parse(response.body));
|
|
@@ -3732,6 +3817,7 @@ var WebSocket = function () {
|
|
|
3732
3817
|
|
|
3733
3818
|
WebSocket.prototype.destroy = function destroy() {
|
|
3734
3819
|
// 断开连接,清除定时器
|
|
3820
|
+
this.unsubscribe();
|
|
3735
3821
|
if (this.client) {
|
|
3736
3822
|
this.client.disconnect();
|
|
3737
3823
|
};
|
package/lib/data-table.js
CHANGED
|
@@ -620,6 +620,35 @@ var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
|
|
|
620
620
|
return workdays;
|
|
621
621
|
};
|
|
622
622
|
|
|
623
|
+
/**
|
|
624
|
+
* chunkToChinese
|
|
625
|
+
* @desc 将四位数的整数转换为中文大写
|
|
626
|
+
* @param {number} chunk - 数字
|
|
627
|
+
**/
|
|
628
|
+
function chunkToChinese(chunk) {
|
|
629
|
+
var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
630
|
+
var capitalDigits = ['', '拾', '佰', '仟'];
|
|
631
|
+
|
|
632
|
+
var result = '';
|
|
633
|
+
var digitIndex = 0;
|
|
634
|
+
|
|
635
|
+
while (chunk > 0) {
|
|
636
|
+
var digit = chunk % 10;
|
|
637
|
+
if (digit > 0) {
|
|
638
|
+
result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
|
|
639
|
+
} else {
|
|
640
|
+
// 当前数字是零,需要判断是否需要添加零
|
|
641
|
+
if (result.charAt(0) !== '零') {
|
|
642
|
+
result = '零' + result;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
chunk = Math.floor(chunk / 10);
|
|
646
|
+
digitIndex++;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
return result;
|
|
650
|
+
}
|
|
651
|
+
|
|
623
652
|
/**
|
|
624
653
|
* concatenate
|
|
625
654
|
* @desc 指定连接符合并文本
|
|
@@ -1815,6 +1844,31 @@ var getWeekday = function getWeekday(date) {
|
|
|
1815
1844
|
return adjustedDay === 0 ? 7 : adjustedDay;
|
|
1816
1845
|
};
|
|
1817
1846
|
|
|
1847
|
+
/**
|
|
1848
|
+
* getZoom
|
|
1849
|
+
* @desc 获取缩放比
|
|
1850
|
+
* @param {number} n - 可选参数,表示星期的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
|
|
1851
|
+
**/
|
|
1852
|
+
var getZoom = function getZoom() {
|
|
1853
|
+
var ratio = 0;
|
|
1854
|
+
var screen = window.screen;
|
|
1855
|
+
var ua = navigator.userAgent.toLowerCase();
|
|
1856
|
+
if (window.devicePixelRatio !== undefined) {
|
|
1857
|
+
ratio = window.devicePixelRatio;
|
|
1858
|
+
} else if (~ua.indexOf('msie')) {
|
|
1859
|
+
if (screen.deviceXDPI && screen.logicalXDPI) {
|
|
1860
|
+
ratio = screen.deviceXDPI / screen.logicalXDPI;
|
|
1861
|
+
}
|
|
1862
|
+
} else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
|
|
1863
|
+
ratio = window.outerWidth / window.innerWidth;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
if (ratio) {
|
|
1867
|
+
ratio = Math.round(ratio * 100);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
return ratio / 100;
|
|
1871
|
+
};
|
|
1818
1872
|
/**
|
|
1819
1873
|
* handlerUrl
|
|
1820
1874
|
* @desc:更新url参数中的时间戳
|
|
@@ -2557,32 +2611,53 @@ var rmbToCapital = function rmbToCapital(number) {
|
|
|
2557
2611
|
|
|
2558
2612
|
return result;
|
|
2559
2613
|
};
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
var
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2614
|
+
/**
|
|
2615
|
+
* setScale
|
|
2616
|
+
* @desc 设置缩放
|
|
2617
|
+
* @param {number} width - 分辨率宽度
|
|
2618
|
+
* @param {number} height - 分辨率高度
|
|
2619
|
+
**/
|
|
2620
|
+
var setScale = function setScale() {
|
|
2621
|
+
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1920;
|
|
2622
|
+
var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1080;
|
|
2623
|
+
|
|
2624
|
+
var n = 1;
|
|
2625
|
+
var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
|
|
2626
|
+
var zoom = getZoom();
|
|
2627
|
+
if (isMac) {
|
|
2628
|
+
n = 2;
|
|
2629
|
+
} else {
|
|
2630
|
+
n = 1;
|
|
2631
|
+
}
|
|
2632
|
+
if (zoom === 1) {
|
|
2633
|
+
document.body.style.removeProperty('transform');
|
|
2634
|
+
document.body.style.removeProperty('width');
|
|
2635
|
+
document.body.style.removeProperty('height');
|
|
2636
|
+
document.body.style.removeProperty('transform-origin');
|
|
2637
|
+
return;
|
|
2638
|
+
}
|
|
2639
|
+
if (Math.abs(parseInt(width - window.innerWidth * zoom / n, 10)) > 15 && window.innerWidth * zoom / n !== width) {
|
|
2640
|
+
var scale = 'scale(' + window.innerWidth * zoom / width / zoom + ',' + window.innerHeight * zoom / height / zoom + ')';
|
|
2641
|
+
document.body.style.transform = scale;
|
|
2642
|
+
document.body.style.width = width + 'px';
|
|
2643
|
+
document.body.style.height = height + 'px';
|
|
2644
|
+
document.body.style.transformOrigin = '0 0';
|
|
2645
|
+
} else {
|
|
2646
|
+
if (isMac) {
|
|
2647
|
+
var _scale = 'scale(' + 1 * n / zoom + ')';
|
|
2648
|
+
document.body.style.transform = _scale;
|
|
2649
|
+
document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
|
|
2650
|
+
document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
|
|
2651
|
+
document.body.style.transformOrigin = '0 0';
|
|
2573
2652
|
} else {
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2653
|
+
var _scale2 = 'scale(' + 1 * n / zoom + ')';
|
|
2654
|
+
document.body.style.transform = _scale2;
|
|
2655
|
+
document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
|
|
2656
|
+
document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
|
|
2657
|
+
document.body.style.transformOrigin = '0 0';
|
|
2578
2658
|
}
|
|
2579
|
-
chunk = Math.floor(chunk / 10);
|
|
2580
|
-
digitIndex++;
|
|
2581
2659
|
}
|
|
2582
|
-
|
|
2583
|
-
return result;
|
|
2584
|
-
}
|
|
2585
|
-
|
|
2660
|
+
};
|
|
2586
2661
|
/**
|
|
2587
2662
|
* sendMessage
|
|
2588
2663
|
* @desc:向iframe发送信息
|
|
@@ -3118,6 +3193,7 @@ var watermark = function watermark(option) {
|
|
|
3118
3193
|
rmbToCapital: rmbToCapital,
|
|
3119
3194
|
sendMessage: sendMessage,
|
|
3120
3195
|
setFavicon: setFavicon,
|
|
3196
|
+
setScale: setScale,
|
|
3121
3197
|
setStorage: setStorage,
|
|
3122
3198
|
socket: socket,
|
|
3123
3199
|
startWith: startWith,
|
|
@@ -3643,6 +3719,8 @@ var WebSocket = function () {
|
|
|
3643
3719
|
this.connects = 1;
|
|
3644
3720
|
this.recon = false;
|
|
3645
3721
|
this.sendTimeout = null;
|
|
3722
|
+
this.socket = null;
|
|
3723
|
+
this.subscription = null;
|
|
3646
3724
|
}
|
|
3647
3725
|
|
|
3648
3726
|
/** socket连接 */
|
|
@@ -3653,14 +3731,12 @@ var WebSocket = function () {
|
|
|
3653
3731
|
|
|
3654
3732
|
if (!this.client) {
|
|
3655
3733
|
// 连接SockJS
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(socket);
|
|
3734
|
+
this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
|
|
3735
|
+
this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
|
|
3659
3736
|
}
|
|
3660
3737
|
|
|
3661
3738
|
// 日志不打印
|
|
3662
3739
|
if (!this.debug) {
|
|
3663
|
-
console.log(111);
|
|
3664
3740
|
this.client.debug = function () {};
|
|
3665
3741
|
}
|
|
3666
3742
|
|
|
@@ -3672,9 +3748,10 @@ var WebSocket = function () {
|
|
|
3672
3748
|
// 订阅消息
|
|
3673
3749
|
_this.subscribe();
|
|
3674
3750
|
}, function (error) {
|
|
3751
|
+
_this.unsubscribe();
|
|
3752
|
+
_this.client = null;
|
|
3675
3753
|
var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
|
|
3676
3754
|
if (_this.connects > 5 && diffSecond < _this.interval) {
|
|
3677
|
-
_this.client.disconnect();
|
|
3678
3755
|
_this.error && _this.error(error);
|
|
3679
3756
|
} else {
|
|
3680
3757
|
_this.reconTimeout = setTimeout(function () {
|
|
@@ -3683,6 +3760,14 @@ var WebSocket = function () {
|
|
|
3683
3760
|
}, 5000);
|
|
3684
3761
|
}
|
|
3685
3762
|
});
|
|
3763
|
+
}; // 清除订阅
|
|
3764
|
+
|
|
3765
|
+
|
|
3766
|
+
WebSocket.prototype.unsubscribe = function unsubscribe() {
|
|
3767
|
+
if (this.subscription) {
|
|
3768
|
+
this.subscription.unsubscribe();
|
|
3769
|
+
this.subscription = null;
|
|
3770
|
+
}
|
|
3686
3771
|
};
|
|
3687
3772
|
/** 订阅服务端 */
|
|
3688
3773
|
|
|
@@ -3691,7 +3776,7 @@ var WebSocket = function () {
|
|
|
3691
3776
|
var _this2 = this;
|
|
3692
3777
|
|
|
3693
3778
|
// 订阅服务端提供的某个topic
|
|
3694
|
-
this.client.subscribe(this.take, function (response) {
|
|
3779
|
+
this.subscription = this.client.subscribe(this.take, function (response) {
|
|
3695
3780
|
if (response && (_this2.callback || _this2.success)) {
|
|
3696
3781
|
var callback = _this2.callback || _this2.success;
|
|
3697
3782
|
callback(JSON.parse(response.body));
|
|
@@ -3732,6 +3817,7 @@ var WebSocket = function () {
|
|
|
3732
3817
|
|
|
3733
3818
|
WebSocket.prototype.destroy = function destroy() {
|
|
3734
3819
|
// 断开连接,清除定时器
|
|
3820
|
+
this.unsubscribe();
|
|
3735
3821
|
if (this.client) {
|
|
3736
3822
|
this.client.disconnect();
|
|
3737
3823
|
};
|
|
@@ -3816,8 +3902,8 @@ module.exports = require("vue");
|
|
|
3816
3902
|
// ESM COMPAT FLAG
|
|
3817
3903
|
__webpack_require__.r(__webpack_exports__);
|
|
3818
3904
|
|
|
3819
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=
|
|
3820
|
-
var
|
|
3905
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=202d0a16&
|
|
3906
|
+
var mainvue_type_template_id_202d0a16_render = function () {
|
|
3821
3907
|
var _vm = this
|
|
3822
3908
|
var _h = _vm.$createElement
|
|
3823
3909
|
var _c = _vm._self._c || _h
|
|
@@ -4128,10 +4214,10 @@ var mainvue_type_template_id_7b641b60_render = function () {
|
|
|
4128
4214
|
)
|
|
4129
4215
|
}
|
|
4130
4216
|
var staticRenderFns = []
|
|
4131
|
-
|
|
4217
|
+
mainvue_type_template_id_202d0a16_render._withStripped = true
|
|
4132
4218
|
|
|
4133
4219
|
|
|
4134
|
-
// CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=
|
|
4220
|
+
// CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=202d0a16&
|
|
4135
4221
|
|
|
4136
4222
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
4137
4223
|
var api = __webpack_require__(1);
|
|
@@ -6575,12 +6661,14 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6575
6661
|
theads: {
|
|
6576
6662
|
get: function get() {
|
|
6577
6663
|
var thead = [];
|
|
6664
|
+
var addfilter = false;
|
|
6578
6665
|
var types = this.theadData.filter(function (item) {
|
|
6579
6666
|
return item.type == 'selection' || item.type == 'index' || item.type == 'sort';
|
|
6580
6667
|
}).map(function (item) {
|
|
6581
6668
|
return item.type;
|
|
6582
6669
|
});
|
|
6583
6670
|
if (this.dragSort && !types.includes('sort')) {
|
|
6671
|
+
addfilter = true;
|
|
6584
6672
|
thead.push({
|
|
6585
6673
|
type: 'sort',
|
|
6586
6674
|
key: 'es-sort'
|
|
@@ -6594,8 +6682,12 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6594
6682
|
fixed: 'left',
|
|
6595
6683
|
selectable: this.selectable,
|
|
6596
6684
|
reserveSelection: this.reserveSelection,
|
|
6685
|
+
filterIcon: this.filter && !addfilter ? 'es-icon-biao' : undefined,
|
|
6597
6686
|
key: 'es-checkbox'
|
|
6598
6687
|
});
|
|
6688
|
+
if (!addfilter) {
|
|
6689
|
+
addfilter = true;
|
|
6690
|
+
}
|
|
6599
6691
|
}
|
|
6600
6692
|
if (this.numbers && !types.includes('index')) {
|
|
6601
6693
|
var index = 1;
|
|
@@ -6611,9 +6703,12 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
6611
6703
|
align: 'center',
|
|
6612
6704
|
fixed: 'left',
|
|
6613
6705
|
index: index,
|
|
6614
|
-
filterIcon: this.filter ? 'es-icon-biao' : undefined,
|
|
6706
|
+
filterIcon: this.filter && !addfilter ? 'es-icon-biao' : undefined,
|
|
6615
6707
|
key: 'es-index'
|
|
6616
6708
|
});
|
|
6709
|
+
if (!addfilter) {
|
|
6710
|
+
addfilter = true;
|
|
6711
|
+
}
|
|
6617
6712
|
}
|
|
6618
6713
|
if (this.theadData.length) {
|
|
6619
6714
|
thead = [].concat(thead, this.theadData);
|
|
@@ -7579,7 +7674,7 @@ var mainvue_type_script_lang_js_components, _watch;
|
|
|
7579
7674
|
|
|
7580
7675
|
var main_component = Object(componentNormalizer["a" /* default */])(
|
|
7581
7676
|
src_mainvue_type_script_lang_js_,
|
|
7582
|
-
|
|
7677
|
+
mainvue_type_template_id_202d0a16_render,
|
|
7583
7678
|
staticRenderFns,
|
|
7584
7679
|
false,
|
|
7585
7680
|
null,
|