eoss-ui 0.5.69 → 0.5.71
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 +34 -36
- package/lib/button.js +34 -36
- package/lib/checkbox-group.js +70 -56
- package/lib/data-table-form.js +37 -39
- package/lib/data-table.js +59 -59
- package/lib/date-picker.js +34 -36
- package/lib/dialog.js +49 -51
- package/lib/eoss-ui.common.js +665 -573
- package/lib/flow-group.js +34 -36
- package/lib/flow-list.js +36 -38
- package/lib/flow.js +40 -42
- package/lib/form.js +410 -376
- package/lib/handle-user.js +36 -38
- package/lib/handler.js +34 -36
- package/lib/index.js +1 -1
- package/lib/input-number.js +34 -36
- package/lib/input.js +65 -48
- package/lib/layout.js +2 -2
- package/lib/login.js +54 -55
- package/lib/main.js +39 -41
- package/lib/menu.js +5 -4
- package/lib/nav.js +34 -36
- package/lib/page.js +34 -36
- package/lib/player.js +34 -36
- package/lib/qr-code.js +34 -36
- package/lib/radio-group.js +69 -53
- package/lib/retrial-auth.js +34 -36
- package/lib/select-ganged.js +122 -106
- package/lib/select.js +115 -105
- package/lib/selector-panel.js +90 -76
- package/lib/selector.js +34 -36
- package/lib/sizer.js +36 -38
- package/lib/steps.js +60 -44
- package/lib/switch.js +34 -36
- package/lib/table-form.js +36 -38
- package/lib/tabs.js +34 -36
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/lib/tips.js +59 -42
- package/lib/tree-group.js +34 -36
- package/lib/tree.js +93 -77
- package/lib/upload.js +111 -94
- package/lib/utils/util.js +34 -36
- package/lib/wujie.js +34 -36
- package/lib/wxlogin.js +34 -36
- package/package.json +2 -2
- package/packages/checkbox-group/src/main.vue +7 -1
- package/packages/data-table/src/main.vue +4 -2
- package/packages/dialog/src/main.vue +2 -3
- package/packages/form/src/main.vue +11 -2
- package/packages/input/src/main.vue +8 -1
- package/packages/login/src/main.vue +15 -11
- package/packages/menu/src/main.vue +3 -2
- package/packages/radio-group/src/main.vue +7 -1
- package/packages/select/src/main.vue +10 -10
- package/packages/select-ganged/src/main.vue +7 -1
- package/packages/selector-panel/src/main.vue +7 -1
- package/packages/steps/src/main.vue +9 -3
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/src/login.scss +1 -1
- package/packages/tips/src/main.vue +8 -1
- package/packages/tree/src/main.vue +8 -2
- package/packages/upload/src/main.vue +11 -2
- package/src/index.js +1 -1
- package/src/utils/util.js +34 -34
package/lib/tree.js
CHANGED
|
@@ -154,21 +154,17 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
|
|
|
154
154
|
* @param {Array} [encodes] - 需要对参数值进行encodeURIComponent编码的参数值名称
|
|
155
155
|
**/
|
|
156
156
|
// 请求
|
|
157
|
-
|
|
158
|
-
function getRequestKey(config) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (pendingRequest.has(requestKey)) {
|
|
169
|
-
pendingRequest.delete(requestKey);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
157
|
+
// const pendingRequest = new Map();
|
|
158
|
+
// function getRequestKey(config) {
|
|
159
|
+
// const { method, url, params, data } = config;
|
|
160
|
+
// return [method, url, qs.stringify(params), qs.stringify(data)].join('&');
|
|
161
|
+
// };
|
|
162
|
+
// function delPendingRequest(config) {
|
|
163
|
+
// let requestKey = getRequestKey(config);
|
|
164
|
+
// if (pendingRequest.has(requestKey)) {
|
|
165
|
+
// pendingRequest.delete(requestKey);
|
|
166
|
+
// }
|
|
167
|
+
// }
|
|
172
168
|
var ajax = function ajax(_ref) {
|
|
173
169
|
var headers = _ref.headers,
|
|
174
170
|
method = _ref.method,
|
|
@@ -217,30 +213,32 @@ var ajax = function ajax(_ref) {
|
|
|
217
213
|
http.interceptors.request.use(function (config) {
|
|
218
214
|
config.headers.common = getStorage();
|
|
219
215
|
// 根据请求的信息(请求方式,url,请求get/post数据),产生map的key
|
|
220
|
-
|
|
221
|
-
// 判断请求是否重复
|
|
222
|
-
if (pendingRequest.has(requestKey)) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
// 把请求信息,添加请求到map当中
|
|
230
|
-
// 生成取消方法
|
|
231
|
-
config.cancelToken =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
216
|
+
// let requestKey = getRequestKey(config);
|
|
217
|
+
// // 判断请求是否重复
|
|
218
|
+
// if (pendingRequest.has(requestKey)) {
|
|
219
|
+
// // 取消上次请求
|
|
220
|
+
// let cancel = pendingRequest.get(requestKey);
|
|
221
|
+
// cancel();
|
|
222
|
+
// // 删除请求信息
|
|
223
|
+
// pendingRequest.delete(requestKey);
|
|
224
|
+
// }
|
|
225
|
+
// // 把请求信息,添加请求到map当中
|
|
226
|
+
// // 生成取消方法
|
|
227
|
+
// config.cancelToken =
|
|
228
|
+
// config.cancelToken ||
|
|
229
|
+
// new axios.CancelToken(cancel => {
|
|
230
|
+
// // 把取消方法添加到map
|
|
231
|
+
// if (!pendingRequest.has(requestKey)) {
|
|
232
|
+
// pendingRequest.set(requestKey, cancel);
|
|
233
|
+
// }
|
|
234
|
+
// });
|
|
237
235
|
return config;
|
|
238
236
|
}, function (err) {
|
|
239
237
|
return err;
|
|
240
238
|
});
|
|
241
239
|
// 响应拦截
|
|
242
240
|
http.interceptors.response.use(function (response) {
|
|
243
|
-
delPendingRequest(response.config);
|
|
241
|
+
// delPendingRequest(response.config);
|
|
244
242
|
loading && loading.close();
|
|
245
243
|
if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
|
|
246
244
|
if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
|
|
@@ -357,9 +355,9 @@ var ajax = function ajax(_ref) {
|
|
|
357
355
|
}
|
|
358
356
|
}, function (error) {
|
|
359
357
|
loading && loading.close();
|
|
360
|
-
if (!
|
|
361
|
-
|
|
362
|
-
}
|
|
358
|
+
// if (!axios.isCancel(error)) {
|
|
359
|
+
// delPendingRequest(error.config || {});
|
|
360
|
+
// }
|
|
363
361
|
if (error && error.response) {
|
|
364
362
|
if (error.response.status) {
|
|
365
363
|
switch (error.response.status) {
|
|
@@ -3497,6 +3495,13 @@ module.exports = require("sm-crypto");
|
|
|
3497
3495
|
|
|
3498
3496
|
/***/ }),
|
|
3499
3497
|
|
|
3498
|
+
/***/ 11:
|
|
3499
|
+
/***/ (function(module, exports) {
|
|
3500
|
+
|
|
3501
|
+
module.exports = require("throttle-debounce");
|
|
3502
|
+
|
|
3503
|
+
/***/ }),
|
|
3504
|
+
|
|
3500
3505
|
/***/ 2:
|
|
3501
3506
|
/***/ (function(module, exports) {
|
|
3502
3507
|
|
|
@@ -3637,7 +3642,7 @@ module.exports = require("json-bigint");
|
|
|
3637
3642
|
// ESM COMPAT FLAG
|
|
3638
3643
|
__webpack_require__.r(__webpack_exports__);
|
|
3639
3644
|
|
|
3640
|
-
// 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=
|
|
3645
|
+
// 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=2902064e&
|
|
3641
3646
|
var render = function () {
|
|
3642
3647
|
var _vm = this
|
|
3643
3648
|
var _h = _vm.$createElement
|
|
@@ -3838,11 +3843,14 @@ var staticRenderFns = []
|
|
|
3838
3843
|
render._withStripped = true
|
|
3839
3844
|
|
|
3840
3845
|
|
|
3841
|
-
// CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=
|
|
3846
|
+
// CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=2902064e&
|
|
3842
3847
|
|
|
3843
3848
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
3844
3849
|
var api = __webpack_require__(1);
|
|
3845
3850
|
|
|
3851
|
+
// EXTERNAL MODULE: external "throttle-debounce"
|
|
3852
|
+
var external_throttle_debounce_ = __webpack_require__(11);
|
|
3853
|
+
|
|
3846
3854
|
// EXTERNAL MODULE: ./src/utils/util.js
|
|
3847
3855
|
var util = __webpack_require__(0);
|
|
3848
3856
|
|
|
@@ -3938,6 +3946,7 @@ var util = __webpack_require__(0);
|
|
|
3938
3946
|
|
|
3939
3947
|
|
|
3940
3948
|
|
|
3949
|
+
|
|
3941
3950
|
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
|
3942
3951
|
name: 'EsTree',
|
|
3943
3952
|
inheritAttrs: false,
|
|
@@ -4198,11 +4207,18 @@ var util = __webpack_require__(0);
|
|
|
4198
4207
|
}
|
|
4199
4208
|
}
|
|
4200
4209
|
},
|
|
4210
|
+
beforeCreate: function beforeCreate() {
|
|
4211
|
+
var _this = this;
|
|
4212
|
+
|
|
4213
|
+
this.getTreeData = Object(external_throttle_debounce_["debounce"])(500, function (param) {
|
|
4214
|
+
_this.getTreeDatas(param);
|
|
4215
|
+
});
|
|
4216
|
+
},
|
|
4201
4217
|
created: function created() {
|
|
4202
4218
|
if (Object.prototype.hasOwnProperty.call(this.search, 'value')) {
|
|
4203
4219
|
this.searchValue = this.search.value;
|
|
4204
4220
|
}
|
|
4205
|
-
this.getTreeData();
|
|
4221
|
+
this.getTreeData(param);
|
|
4206
4222
|
},
|
|
4207
4223
|
mounted: function mounted() {},
|
|
4208
4224
|
|
|
@@ -4220,8 +4236,8 @@ var util = __webpack_require__(0);
|
|
|
4220
4236
|
},
|
|
4221
4237
|
|
|
4222
4238
|
//获取树节点
|
|
4223
|
-
|
|
4224
|
-
var
|
|
4239
|
+
getTreeDatas: function getTreeDatas(param) {
|
|
4240
|
+
var _this2 = this;
|
|
4225
4241
|
|
|
4226
4242
|
this.loading = true;
|
|
4227
4243
|
var params = util["a" /* default */].extend({}, this.param, this.where, param);
|
|
@@ -4232,44 +4248,44 @@ var util = __webpack_require__(0);
|
|
|
4232
4248
|
data: params,
|
|
4233
4249
|
params: params
|
|
4234
4250
|
}).then(function (res) {
|
|
4235
|
-
|
|
4251
|
+
_this2.loading = false;
|
|
4236
4252
|
if (res.rCode === 0) {
|
|
4237
|
-
var treeList =
|
|
4238
|
-
|
|
4239
|
-
if (
|
|
4253
|
+
var treeList = _this2.parseData ? _this2.parseData(JSON.parse(JSON.stringify(res.results)), 'results') : JSON.parse(JSON.stringify(res.results));
|
|
4254
|
+
_this2.$emit('results', treeList);
|
|
4255
|
+
if (_this2.currentFirst) {
|
|
4240
4256
|
var currentNode = treeList[0].id;
|
|
4241
|
-
if (!
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4257
|
+
if (!_this2.currentNodeKey && _this2.currentNodeKey != 0) {
|
|
4258
|
+
_this2.$emit('current-first', 'current', treeList[0]);
|
|
4259
|
+
_this2.$nextTick(function () {
|
|
4260
|
+
_this2.$refs.oaTree.setCurrentKey(currentNode);
|
|
4245
4261
|
});
|
|
4246
4262
|
}
|
|
4247
4263
|
}
|
|
4248
|
-
if (
|
|
4264
|
+
if (_this2.checkedFirst) {
|
|
4249
4265
|
var checkedNode = treeList[0].id;
|
|
4250
|
-
if (
|
|
4251
|
-
|
|
4252
|
-
|
|
4266
|
+
if (_this2.defaultCheckedKeys && _this2.defaultCheckedKeys.indexOf(checkedNode) == -1) {
|
|
4267
|
+
_this2.$emit('current-first', 'checked', treeList[0]);
|
|
4268
|
+
_this2.checkedKeys = [checkedNode];
|
|
4253
4269
|
}
|
|
4254
4270
|
}
|
|
4255
|
-
|
|
4271
|
+
_this2.expandedKeys = treeList.filter(function (item) {
|
|
4256
4272
|
if (item.open) {
|
|
4257
4273
|
return item.id;
|
|
4258
4274
|
}
|
|
4259
4275
|
});
|
|
4260
|
-
|
|
4276
|
+
_this2.treeList = treeList;
|
|
4261
4277
|
}
|
|
4262
4278
|
}).catch(function (err) {
|
|
4263
|
-
|
|
4279
|
+
_this2.loading = false;
|
|
4264
4280
|
if (err.message && err.message !== 'canceled') {
|
|
4265
|
-
|
|
4281
|
+
_this2.$message.error(err.message);
|
|
4266
4282
|
}
|
|
4267
4283
|
});
|
|
4268
4284
|
},
|
|
4269
4285
|
|
|
4270
4286
|
//请求子节点数据
|
|
4271
4287
|
loadsub: function loadsub(data, node) {
|
|
4272
|
-
var
|
|
4288
|
+
var _this3 = this;
|
|
4273
4289
|
|
|
4274
4290
|
if (data.state !== '' && (!data.children || data.children.length === 0)) {
|
|
4275
4291
|
var params = util["a" /* default */].extend({}, this.param, this.where, {
|
|
@@ -4283,8 +4299,8 @@ var util = __webpack_require__(0);
|
|
|
4283
4299
|
}
|
|
4284
4300
|
if (this.onLoadsub) {
|
|
4285
4301
|
this.onLoadsub({ data: data, params: params, node: node }).then(function (res) {
|
|
4286
|
-
|
|
4287
|
-
|
|
4302
|
+
_this3.loading = false;
|
|
4303
|
+
_this3.$set(data, 'children', JSON.parse(JSON.stringify(res)));
|
|
4288
4304
|
}).catch(function (e) {});
|
|
4289
4305
|
} else {
|
|
4290
4306
|
util["a" /* default */].ajax({
|
|
@@ -4294,25 +4310,25 @@ var util = __webpack_require__(0);
|
|
|
4294
4310
|
params: params
|
|
4295
4311
|
}).then(function (res) {
|
|
4296
4312
|
if (res.rCode === 0) {
|
|
4297
|
-
|
|
4298
|
-
var results =
|
|
4299
|
-
|
|
4313
|
+
_this3.loading = false;
|
|
4314
|
+
var results = _this3.parseData ? _this3.parseData(JSON.parse(JSON.stringify(res.results)), 'sub-results') : JSON.parse(JSON.stringify(res.results));
|
|
4315
|
+
_this3.$emit('sub-results', results);
|
|
4300
4316
|
if (Array.isArray(results)) {
|
|
4301
4317
|
if (data.id === results[0].id) {
|
|
4302
|
-
|
|
4318
|
+
_this3.$set(data, 'children', results[0].children);
|
|
4303
4319
|
} else {
|
|
4304
|
-
|
|
4320
|
+
_this3.$set(data, 'children', results);
|
|
4305
4321
|
}
|
|
4306
4322
|
} else if (data.id === results.id) {
|
|
4307
|
-
|
|
4323
|
+
_this3.$set(data, 'children', results.children);
|
|
4308
4324
|
} else {
|
|
4309
4325
|
console.error('tree数据格式错误');
|
|
4310
4326
|
}
|
|
4311
4327
|
}
|
|
4312
4328
|
}).catch(function (err) {
|
|
4313
|
-
|
|
4329
|
+
_this3.loading = false;
|
|
4314
4330
|
if (err.message && err.message !== 'canceled') {
|
|
4315
|
-
|
|
4331
|
+
_this3.$message.error(err.message);
|
|
4316
4332
|
}
|
|
4317
4333
|
});
|
|
4318
4334
|
}
|
|
@@ -4340,13 +4356,13 @@ var util = __webpack_require__(0);
|
|
|
4340
4356
|
this.$emit('load', node, resolve);
|
|
4341
4357
|
},
|
|
4342
4358
|
sortTree: function sortTree(arr) {
|
|
4343
|
-
var
|
|
4359
|
+
var _this4 = this;
|
|
4344
4360
|
|
|
4345
4361
|
return arr.sort(function (a, b) {
|
|
4346
|
-
if (
|
|
4347
|
-
return a[
|
|
4362
|
+
if (_this4.order === 'asc' && a[_this4.sort]) {
|
|
4363
|
+
return a[_this4.sort] - b[_this4.sort];
|
|
4348
4364
|
} else {
|
|
4349
|
-
return b[
|
|
4365
|
+
return b[_this4.sort] - a[_this4.sort];
|
|
4350
4366
|
}
|
|
4351
4367
|
});
|
|
4352
4368
|
},
|
|
@@ -4407,7 +4423,7 @@ var util = __webpack_require__(0);
|
|
|
4407
4423
|
}
|
|
4408
4424
|
},
|
|
4409
4425
|
handleCheckChange: function handleCheckChange(data, checked, indeterminate) {
|
|
4410
|
-
var
|
|
4426
|
+
var _this5 = this;
|
|
4411
4427
|
|
|
4412
4428
|
if (this.esPage && this.changeData) {
|
|
4413
4429
|
var checkeds = this.getCheckedNodes();
|
|
@@ -4415,7 +4431,7 @@ var util = __webpack_require__(0);
|
|
|
4415
4431
|
if (util["a" /* default */].isObject(this.changeData)) {
|
|
4416
4432
|
var _loop = function _loop(_i2) {
|
|
4417
4433
|
changeData[_i2] = checkeds.map(function (item) {
|
|
4418
|
-
return item[
|
|
4434
|
+
return item[_this5.changeData[_i2]];
|
|
4419
4435
|
});
|
|
4420
4436
|
};
|
|
4421
4437
|
|
|
@@ -4425,7 +4441,7 @@ var util = __webpack_require__(0);
|
|
|
4425
4441
|
} else if (Array.isArray(this.changeData)) {
|
|
4426
4442
|
this.changeData.forEach(function (item) {
|
|
4427
4443
|
changeData[item] = checkeds.map(function (ele) {
|
|
4428
|
-
return ele[
|
|
4444
|
+
return ele[_this5.changeData[i]];
|
|
4429
4445
|
});
|
|
4430
4446
|
});
|
|
4431
4447
|
} else {
|
|
@@ -4502,12 +4518,12 @@ var util = __webpack_require__(0);
|
|
|
4502
4518
|
return this.$refs.oaTree.insertAfter(data, refNode);
|
|
4503
4519
|
},
|
|
4504
4520
|
getKeys: function getKeys(data, result) {
|
|
4505
|
-
var
|
|
4521
|
+
var _this6 = this;
|
|
4506
4522
|
|
|
4507
4523
|
data.forEach(function (item) {
|
|
4508
4524
|
result.push(item.id);
|
|
4509
4525
|
if (Object.prototype.hasOwnProperty.call(item, 'children') && item.children.length) {
|
|
4510
|
-
|
|
4526
|
+
_this6.getKeys(item.children, result);
|
|
4511
4527
|
}
|
|
4512
4528
|
});
|
|
4513
4529
|
},
|