eoss-ui 0.4.31 → 0.4.33
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/CHANGELOG.md +929 -0
- package/lib/button-group.js +33 -61
- package/lib/button.js +33 -61
- package/lib/checkbox-group.js +33 -61
- package/lib/data-table-form.js +33 -61
- package/lib/data-table.js +47 -67
- package/lib/date-picker.js +33 -61
- package/lib/dialog.js +33 -61
- package/lib/eoss-ui.common.js +197 -174
- package/lib/flow-group.js +43 -67
- package/lib/flow-list.js +33 -61
- package/lib/flow.js +33 -61
- package/lib/form.js +38 -65
- package/lib/handle-user.js +33 -61
- package/lib/handler.js +33 -61
- package/lib/index.js +1 -1
- package/lib/input-number.js +33 -61
- package/lib/input.js +33 -61
- package/lib/login.js +47 -72
- package/lib/main.js +58 -75
- package/lib/mainComp.js +36 -68
- package/lib/nav.js +33 -61
- package/lib/page.js +33 -61
- package/lib/player.js +33 -61
- package/lib/qr-code.js +33 -61
- package/lib/radio-group.js +33 -61
- package/lib/select-ganged.js +33 -61
- package/lib/select.js +33 -61
- package/lib/selector-panel.js +33 -61
- package/lib/selector.js +33 -61
- package/lib/sizer.js +33 -61
- package/lib/steps.js +33 -61
- package/lib/switch.js +33 -61
- package/lib/table-form.js +33 -61
- package/lib/tabs.js +33 -61
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/tips.js +33 -61
- package/lib/tree-group.js +43 -63
- package/lib/tree.js +48 -63
- package/lib/upload.js +61 -82
- package/lib/utils/util.js +33 -61
- package/lib/wujie.js +33 -61
- package/lib/wxlogin.js +33 -61
- package/package.json +2 -2
- package/packages/data-table/src/main.vue +9 -2
- package/packages/flow-group/src/main.vue +5 -4
- package/packages/form/src/main.vue +4 -2
- package/packages/login/src/main.vue +12 -9
- package/packages/main/src/main.vue +13 -3
- package/packages/main/src/userinfo.vue +21 -24
- package/packages/mainComp/src/main.vue +1 -5
- package/packages/theme-chalk/lib/form.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/form.scss +1 -1
- package/packages/tree/src/main.vue +12 -0
- package/packages/tree-group/src/main.vue +6 -0
- package/packages/upload/src/main.vue +25 -25
- package/src/index.js +1 -1
- package/src/utils/util.js +50 -77
package/lib/tips.js
CHANGED
|
@@ -126,6 +126,7 @@ var $brightnessStep2 = 0.15;
|
|
|
126
126
|
var $lightColorCount = 5;
|
|
127
127
|
var $darkColorCount = 4;
|
|
128
128
|
var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
|
|
129
|
+
var loginMsg = void 0;
|
|
129
130
|
|
|
130
131
|
var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
|
|
131
132
|
|
|
@@ -147,7 +148,6 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
|
|
|
147
148
|
* @param {Object} [loading] - loading加载对象
|
|
148
149
|
**/
|
|
149
150
|
// 请求
|
|
150
|
-
var _timer = null;
|
|
151
151
|
var pendingRequest = new Map();
|
|
152
152
|
function getRequestKey(config) {
|
|
153
153
|
var method = config.method,
|
|
@@ -246,44 +246,36 @@ var ajax = function ajax(_ref) {
|
|
|
246
246
|
if (response.status === 200) {
|
|
247
247
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
248
248
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig']);
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
268
|
-
win.top.location.href = './login.html';
|
|
269
|
-
} else {
|
|
270
|
-
var hash = win.top.location.hash;
|
|
271
|
-
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
272
|
-
var len = win.top.location.href.indexOf(hash);
|
|
273
|
-
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
274
|
-
win.top.location.href = href;
|
|
249
|
+
if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1) {
|
|
250
|
+
clearTimeout(loginMsg);
|
|
251
|
+
loginMsg = setTimeout(function () {
|
|
252
|
+
eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
253
|
+
confirmButtonText: '确定',
|
|
254
|
+
closeOnClickModal: false,
|
|
255
|
+
type: 'warning'
|
|
256
|
+
} : {
|
|
257
|
+
confirmButtonText: '确定',
|
|
258
|
+
cancelButtonText: '取消',
|
|
259
|
+
closeOnClickModal: false,
|
|
260
|
+
type: 'warning'
|
|
261
|
+
}).then(function () {
|
|
262
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
263
|
+
if (loginPage) {
|
|
264
|
+
win.top.location.href = loginPage;
|
|
265
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
266
|
+
win.top.location.href = './login.html';
|
|
275
267
|
} else {
|
|
276
|
-
win.top.location.
|
|
268
|
+
var hash = win.top.location.hash;
|
|
269
|
+
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
270
|
+
var len = win.top.location.href.indexOf(hash);
|
|
271
|
+
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
272
|
+
win.top.location.href = href;
|
|
273
|
+
} else {
|
|
274
|
+
win.top.location.href = '/login.html';
|
|
275
|
+
}
|
|
277
276
|
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
_timer && clearTimeout(_timer);
|
|
281
|
-
_timer = setTimeout(function () {
|
|
282
|
-
removeStorage('timer');
|
|
283
|
-
clearTimeout(_timer);
|
|
284
|
-
_timer = null;
|
|
285
|
-
}, 1000);
|
|
286
|
-
});
|
|
277
|
+
}).catch(function (e) {});
|
|
278
|
+
}, 1000);
|
|
287
279
|
}
|
|
288
280
|
return Promise.reject(response.data);
|
|
289
281
|
} else {
|
|
@@ -427,31 +419,11 @@ var browser = function browser() {
|
|
|
427
419
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
428
420
|
**/
|
|
429
421
|
|
|
430
|
-
var debounce = function debounce(
|
|
431
|
-
var timeout =
|
|
422
|
+
var debounce = function debounce(callback, delay) {
|
|
423
|
+
var timeout = null;
|
|
432
424
|
return function () {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (timeout) clearTimeout(timeout);
|
|
437
|
-
// 是否在某一批事件中首次执行
|
|
438
|
-
if (immediate) {
|
|
439
|
-
var callNow = !timeout;
|
|
440
|
-
timeout = setTimeout(function () {
|
|
441
|
-
timeout = null;
|
|
442
|
-
fn.apply(self, args);
|
|
443
|
-
immediate = true;
|
|
444
|
-
}, wait);
|
|
445
|
-
if (callNow) {
|
|
446
|
-
fn.apply(self, args);
|
|
447
|
-
}
|
|
448
|
-
immediate = false;
|
|
449
|
-
} else {
|
|
450
|
-
timeout = setTimeout(function () {
|
|
451
|
-
fn.apply(self, args);
|
|
452
|
-
immediate = true;
|
|
453
|
-
}, wait);
|
|
454
|
-
}
|
|
425
|
+
clearTimeout(timeout);
|
|
426
|
+
timeout = setTimeout(callback, delay ? delay : 500);
|
|
455
427
|
};
|
|
456
428
|
};
|
|
457
429
|
/**
|
package/lib/tree-group.js
CHANGED
|
@@ -126,6 +126,7 @@ var $brightnessStep2 = 0.15;
|
|
|
126
126
|
var $lightColorCount = 5;
|
|
127
127
|
var $darkColorCount = 4;
|
|
128
128
|
var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
|
|
129
|
+
var loginMsg = void 0;
|
|
129
130
|
|
|
130
131
|
var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
|
|
131
132
|
|
|
@@ -147,7 +148,6 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
|
|
|
147
148
|
* @param {Object} [loading] - loading加载对象
|
|
148
149
|
**/
|
|
149
150
|
// 请求
|
|
150
|
-
var _timer = null;
|
|
151
151
|
var pendingRequest = new Map();
|
|
152
152
|
function getRequestKey(config) {
|
|
153
153
|
var method = config.method,
|
|
@@ -246,44 +246,36 @@ var ajax = function ajax(_ref) {
|
|
|
246
246
|
if (response.status === 200) {
|
|
247
247
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
248
248
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig']);
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
268
|
-
win.top.location.href = './login.html';
|
|
269
|
-
} else {
|
|
270
|
-
var hash = win.top.location.hash;
|
|
271
|
-
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
272
|
-
var len = win.top.location.href.indexOf(hash);
|
|
273
|
-
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
274
|
-
win.top.location.href = href;
|
|
249
|
+
if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1) {
|
|
250
|
+
clearTimeout(loginMsg);
|
|
251
|
+
loginMsg = setTimeout(function () {
|
|
252
|
+
eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
253
|
+
confirmButtonText: '确定',
|
|
254
|
+
closeOnClickModal: false,
|
|
255
|
+
type: 'warning'
|
|
256
|
+
} : {
|
|
257
|
+
confirmButtonText: '确定',
|
|
258
|
+
cancelButtonText: '取消',
|
|
259
|
+
closeOnClickModal: false,
|
|
260
|
+
type: 'warning'
|
|
261
|
+
}).then(function () {
|
|
262
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
263
|
+
if (loginPage) {
|
|
264
|
+
win.top.location.href = loginPage;
|
|
265
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
266
|
+
win.top.location.href = './login.html';
|
|
275
267
|
} else {
|
|
276
|
-
win.top.location.
|
|
268
|
+
var hash = win.top.location.hash;
|
|
269
|
+
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
270
|
+
var len = win.top.location.href.indexOf(hash);
|
|
271
|
+
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
272
|
+
win.top.location.href = href;
|
|
273
|
+
} else {
|
|
274
|
+
win.top.location.href = '/login.html';
|
|
275
|
+
}
|
|
277
276
|
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
_timer && clearTimeout(_timer);
|
|
281
|
-
_timer = setTimeout(function () {
|
|
282
|
-
removeStorage('timer');
|
|
283
|
-
clearTimeout(_timer);
|
|
284
|
-
_timer = null;
|
|
285
|
-
}, 1000);
|
|
286
|
-
});
|
|
277
|
+
}).catch(function (e) {});
|
|
278
|
+
}, 1000);
|
|
287
279
|
}
|
|
288
280
|
return Promise.reject(response.data);
|
|
289
281
|
} else {
|
|
@@ -427,31 +419,11 @@ var browser = function browser() {
|
|
|
427
419
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
428
420
|
**/
|
|
429
421
|
|
|
430
|
-
var debounce = function debounce(
|
|
431
|
-
var timeout =
|
|
422
|
+
var debounce = function debounce(callback, delay) {
|
|
423
|
+
var timeout = null;
|
|
432
424
|
return function () {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (timeout) clearTimeout(timeout);
|
|
437
|
-
// 是否在某一批事件中首次执行
|
|
438
|
-
if (immediate) {
|
|
439
|
-
var callNow = !timeout;
|
|
440
|
-
timeout = setTimeout(function () {
|
|
441
|
-
timeout = null;
|
|
442
|
-
fn.apply(self, args);
|
|
443
|
-
immediate = true;
|
|
444
|
-
}, wait);
|
|
445
|
-
if (callNow) {
|
|
446
|
-
fn.apply(self, args);
|
|
447
|
-
}
|
|
448
|
-
immediate = false;
|
|
449
|
-
} else {
|
|
450
|
-
timeout = setTimeout(function () {
|
|
451
|
-
fn.apply(self, args);
|
|
452
|
-
immediate = true;
|
|
453
|
-
}, wait);
|
|
454
|
-
}
|
|
425
|
+
clearTimeout(timeout);
|
|
426
|
+
timeout = setTimeout(callback, delay ? delay : 500);
|
|
455
427
|
};
|
|
456
428
|
};
|
|
457
429
|
/**
|
|
@@ -2706,7 +2678,7 @@ module.exports = require("json-bigint");
|
|
|
2706
2678
|
// ESM COMPAT FLAG
|
|
2707
2679
|
__webpack_require__.r(__webpack_exports__);
|
|
2708
2680
|
|
|
2709
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-group/src/main.vue?vue&type=template&id=
|
|
2681
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree-group/src/main.vue?vue&type=template&id=67920e49&
|
|
2710
2682
|
var render = function () {
|
|
2711
2683
|
var _vm = this
|
|
2712
2684
|
var _h = _vm.$createElement
|
|
@@ -2766,6 +2738,7 @@ var render = function () {
|
|
|
2766
2738
|
on: {
|
|
2767
2739
|
"node-click": _vm.handleNodeClick,
|
|
2768
2740
|
"check-change": _vm.handleCheckChange,
|
|
2741
|
+
"current-first": _vm.handleCurrentFirst,
|
|
2769
2742
|
},
|
|
2770
2743
|
},
|
|
2771
2744
|
"es-tree",
|
|
@@ -2821,6 +2794,7 @@ var render = function () {
|
|
|
2821
2794
|
on: {
|
|
2822
2795
|
"node-click": _vm.handleNodeClick,
|
|
2823
2796
|
"check-change": _vm.handleCheckChange,
|
|
2797
|
+
"current-first": _vm.handleCurrentFirst,
|
|
2824
2798
|
},
|
|
2825
2799
|
},
|
|
2826
2800
|
"es-tree",
|
|
@@ -3023,7 +2997,7 @@ var staticRenderFns = []
|
|
|
3023
2997
|
render._withStripped = true
|
|
3024
2998
|
|
|
3025
2999
|
|
|
3026
|
-
// CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=
|
|
3000
|
+
// CONCATENATED MODULE: ./packages/tree-group/src/main.vue?vue&type=template&id=67920e49&
|
|
3027
3001
|
|
|
3028
3002
|
// EXTERNAL MODULE: ./src/utils/util.js
|
|
3029
3003
|
var util = __webpack_require__(0);
|
|
@@ -3178,6 +3152,8 @@ var util = __webpack_require__(0);
|
|
|
3178
3152
|
//
|
|
3179
3153
|
//
|
|
3180
3154
|
//
|
|
3155
|
+
//
|
|
3156
|
+
//
|
|
3181
3157
|
|
|
3182
3158
|
|
|
3183
3159
|
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
|
@@ -3433,6 +3409,10 @@ var util = __webpack_require__(0);
|
|
|
3433
3409
|
handleConfirm: function handleConfirm(res) {
|
|
3434
3410
|
this.checkeds = res;
|
|
3435
3411
|
this.$emit('enterprise-confirm', res);
|
|
3412
|
+
},
|
|
3413
|
+
handleCurrentFirst: function handleCurrentFirst(res) {
|
|
3414
|
+
this.checkeds = res.children[0];
|
|
3415
|
+
this.$emit('current-first', res);
|
|
3436
3416
|
}
|
|
3437
3417
|
}
|
|
3438
3418
|
});
|
package/lib/tree.js
CHANGED
|
@@ -126,6 +126,7 @@ var $brightnessStep2 = 0.15;
|
|
|
126
126
|
var $lightColorCount = 5;
|
|
127
127
|
var $darkColorCount = 4;
|
|
128
128
|
var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
|
|
129
|
+
var loginMsg = void 0;
|
|
129
130
|
|
|
130
131
|
var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
|
|
131
132
|
|
|
@@ -147,7 +148,6 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
|
|
|
147
148
|
* @param {Object} [loading] - loading加载对象
|
|
148
149
|
**/
|
|
149
150
|
// 请求
|
|
150
|
-
var _timer = null;
|
|
151
151
|
var pendingRequest = new Map();
|
|
152
152
|
function getRequestKey(config) {
|
|
153
153
|
var method = config.method,
|
|
@@ -246,44 +246,36 @@ var ajax = function ajax(_ref) {
|
|
|
246
246
|
if (response.status === 200) {
|
|
247
247
|
if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
|
|
248
248
|
removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig']);
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
268
|
-
win.top.location.href = './login.html';
|
|
269
|
-
} else {
|
|
270
|
-
var hash = win.top.location.hash;
|
|
271
|
-
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
272
|
-
var len = win.top.location.href.indexOf(hash);
|
|
273
|
-
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
274
|
-
win.top.location.href = href;
|
|
249
|
+
if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1) {
|
|
250
|
+
clearTimeout(loginMsg);
|
|
251
|
+
loginMsg = setTimeout(function () {
|
|
252
|
+
eoss_element__WEBPACK_IMPORTED_MODULE_4__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
|
|
253
|
+
confirmButtonText: '确定',
|
|
254
|
+
closeOnClickModal: false,
|
|
255
|
+
type: 'warning'
|
|
256
|
+
} : {
|
|
257
|
+
confirmButtonText: '确定',
|
|
258
|
+
cancelButtonText: '取消',
|
|
259
|
+
closeOnClickModal: false,
|
|
260
|
+
type: 'warning'
|
|
261
|
+
}).then(function () {
|
|
262
|
+
var loginPage = getStorage('login') || getStorage('loginPage');
|
|
263
|
+
if (loginPage) {
|
|
264
|
+
win.top.location.href = loginPage;
|
|
265
|
+
} else if (win.top.location.href.indexOf('main.html') > -1) {
|
|
266
|
+
win.top.location.href = './login.html';
|
|
275
267
|
} else {
|
|
276
|
-
win.top.location.
|
|
268
|
+
var hash = win.top.location.hash;
|
|
269
|
+
if (hash || win.top.location.indexOf('model=') && win.top.location.indexOf('view=') && win.top.location.indexOf('render.html')) {
|
|
270
|
+
var len = win.top.location.href.indexOf(hash);
|
|
271
|
+
var href = win.top.location.href.slice(0, len) + '#/login';
|
|
272
|
+
win.top.location.href = href;
|
|
273
|
+
} else {
|
|
274
|
+
win.top.location.href = '/login.html';
|
|
275
|
+
}
|
|
277
276
|
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
_timer && clearTimeout(_timer);
|
|
281
|
-
_timer = setTimeout(function () {
|
|
282
|
-
removeStorage('timer');
|
|
283
|
-
clearTimeout(_timer);
|
|
284
|
-
_timer = null;
|
|
285
|
-
}, 1000);
|
|
286
|
-
});
|
|
277
|
+
}).catch(function (e) {});
|
|
278
|
+
}, 1000);
|
|
287
279
|
}
|
|
288
280
|
return Promise.reject(response.data);
|
|
289
281
|
} else {
|
|
@@ -427,31 +419,11 @@ var browser = function browser() {
|
|
|
427
419
|
* @param {Boolean} [immediate] - 是否首次触发执行
|
|
428
420
|
**/
|
|
429
421
|
|
|
430
|
-
var debounce = function debounce(
|
|
431
|
-
var timeout =
|
|
422
|
+
var debounce = function debounce(callback, delay) {
|
|
423
|
+
var timeout = null;
|
|
432
424
|
return function () {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (timeout) clearTimeout(timeout);
|
|
437
|
-
// 是否在某一批事件中首次执行
|
|
438
|
-
if (immediate) {
|
|
439
|
-
var callNow = !timeout;
|
|
440
|
-
timeout = setTimeout(function () {
|
|
441
|
-
timeout = null;
|
|
442
|
-
fn.apply(self, args);
|
|
443
|
-
immediate = true;
|
|
444
|
-
}, wait);
|
|
445
|
-
if (callNow) {
|
|
446
|
-
fn.apply(self, args);
|
|
447
|
-
}
|
|
448
|
-
immediate = false;
|
|
449
|
-
} else {
|
|
450
|
-
timeout = setTimeout(function () {
|
|
451
|
-
fn.apply(self, args);
|
|
452
|
-
immediate = true;
|
|
453
|
-
}, wait);
|
|
454
|
-
}
|
|
425
|
+
clearTimeout(timeout);
|
|
426
|
+
timeout = setTimeout(callback, delay ? delay : 500);
|
|
455
427
|
};
|
|
456
428
|
};
|
|
457
429
|
/**
|
|
@@ -2699,7 +2671,7 @@ module.exports = require("eoss-element");
|
|
|
2699
2671
|
// ESM COMPAT FLAG
|
|
2700
2672
|
__webpack_require__.r(__webpack_exports__);
|
|
2701
2673
|
|
|
2702
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=template&id=
|
|
2674
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=template&id=6e8d7069&
|
|
2703
2675
|
var render = function () {
|
|
2704
2676
|
var _vm = this
|
|
2705
2677
|
var _h = _vm.$createElement
|
|
@@ -2847,6 +2819,7 @@ var render = function () {
|
|
|
2847
2819
|
"expand-on-click-node": false,
|
|
2848
2820
|
"highlight-current": true,
|
|
2849
2821
|
"show-checkbox": _vm.showCheckbox,
|
|
2822
|
+
"current-node-key": _vm.currentNodeKey,
|
|
2850
2823
|
},
|
|
2851
2824
|
scopedSlots: _vm._u([
|
|
2852
2825
|
{
|
|
@@ -2891,7 +2864,7 @@ var staticRenderFns = []
|
|
|
2891
2864
|
render._withStripped = true
|
|
2892
2865
|
|
|
2893
2866
|
|
|
2894
|
-
// CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=
|
|
2867
|
+
// CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=6e8d7069&
|
|
2895
2868
|
|
|
2896
2869
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
2897
2870
|
var api = __webpack_require__(1);
|
|
@@ -2983,6 +2956,7 @@ var util = __webpack_require__(0);
|
|
|
2983
2956
|
//
|
|
2984
2957
|
//
|
|
2985
2958
|
//
|
|
2959
|
+
//
|
|
2986
2960
|
|
|
2987
2961
|
|
|
2988
2962
|
|
|
@@ -3043,6 +3017,8 @@ var util = __webpack_require__(0);
|
|
|
3043
3017
|
},
|
|
3044
3018
|
// 选择项本地数据
|
|
3045
3019
|
data: Array,
|
|
3020
|
+
currentFirst: Boolean,
|
|
3021
|
+
currentNodeKey: [String, Number],
|
|
3046
3022
|
icon: {
|
|
3047
3023
|
type: Boolean,
|
|
3048
3024
|
default: true
|
|
@@ -3268,6 +3244,15 @@ var util = __webpack_require__(0);
|
|
|
3268
3244
|
_this.loading = false;
|
|
3269
3245
|
if (res.rCode === 0) {
|
|
3270
3246
|
_this.treeList = JSON.parse(JSON.stringify(res.results));
|
|
3247
|
+
if (_this.currentFirst) {
|
|
3248
|
+
var currentNode = _this.treeList[0].children[0].id;
|
|
3249
|
+
_this.$emit('current-first', _this.treeList[0]);
|
|
3250
|
+
if (!_this.currentNodeKey) {
|
|
3251
|
+
_this.$nextTick(function () {
|
|
3252
|
+
_this.$refs.oaTree.setCurrentKey(currentNode);
|
|
3253
|
+
});
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3271
3256
|
_this.expandedKeys = _this.treeList.filter(function (item) {
|
|
3272
3257
|
if (item.open) {
|
|
3273
3258
|
return item.id;
|