eoss-mobiles 0.3.22 → 0.3.23

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.
@@ -2150,8 +2150,8 @@ mainvue_type_template_id_17308961_render._withStripped = true
2150
2150
 
2151
2151
  // CONCATENATED MODULE: ./packages/selector/src/main.vue?vue&type=template&id=17308961
2152
2152
 
2153
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector-tree.vue?vue&type=template&id=a36bef12
2154
- var selector_treevue_type_template_id_a36bef12_render = function () {
2153
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/selector-tree.vue?vue&type=template&id=237c573e
2154
+ var selector_treevue_type_template_id_237c573e_render = function () {
2155
2155
  var _vm = this
2156
2156
  var _h = _vm.$createElement
2157
2157
  var _c = _vm._self._c || _h
@@ -2331,14 +2331,14 @@ var selector_treevue_type_template_id_a36bef12_render = function () {
2331
2331
  1
2332
2332
  )
2333
2333
  }
2334
- var selector_treevue_type_template_id_a36bef12_staticRenderFns = []
2335
- selector_treevue_type_template_id_a36bef12_render._withStripped = true
2334
+ var selector_treevue_type_template_id_237c573e_staticRenderFns = []
2335
+ selector_treevue_type_template_id_237c573e_render._withStripped = true
2336
2336
 
2337
2337
 
2338
- // CONCATENATED MODULE: ./packages/selector/src/selector-tree.vue?vue&type=template&id=a36bef12
2338
+ // CONCATENATED MODULE: ./packages/selector/src/selector-tree.vue?vue&type=template&id=237c573e
2339
2339
 
2340
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/tree.vue?vue&type=template&id=4c8a9869
2341
- var treevue_type_template_id_4c8a9869_render = function () {
2340
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/tree.vue?vue&type=template&id=d9c99060
2341
+ var treevue_type_template_id_d9c99060_render = function () {
2342
2342
  var _vm = this
2343
2343
  var _h = _vm.$createElement
2344
2344
  var _c = _vm._self._c || _h
@@ -2670,11 +2670,6 @@ var treevue_type_template_id_4c8a9869_render = function () {
2670
2670
  "\n " +
2671
2671
  _vm._s(
2672
2672
  item.attr &&
2673
- (!item.nocheck ||
2674
- _vm.enterprise ||
2675
- (_vm.selectType == _vm.departmentValueKey &&
2676
- item[_vm.departmentLabelKey] ==
2677
- _vm.departmentValueKey)) &&
2678
2673
  !_vm.showTree &&
2679
2674
  _vm.inputSearch &&
2680
2675
  _vm.selectType === "employee"
@@ -2733,11 +2728,11 @@ var treevue_type_template_id_4c8a9869_render = function () {
2733
2728
  0
2734
2729
  )
2735
2730
  }
2736
- var treevue_type_template_id_4c8a9869_staticRenderFns = []
2737
- treevue_type_template_id_4c8a9869_render._withStripped = true
2731
+ var treevue_type_template_id_d9c99060_staticRenderFns = []
2732
+ treevue_type_template_id_d9c99060_render._withStripped = true
2738
2733
 
2739
2734
 
2740
- // CONCATENATED MODULE: ./packages/selector/src/tree.vue?vue&type=template&id=4c8a9869
2735
+ // CONCATENATED MODULE: ./packages/selector/src/tree.vue?vue&type=template&id=d9c99060
2741
2736
 
2742
2737
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector/src/tree.vue?vue&type=script&lang=js
2743
2738
  //
@@ -3163,8 +3158,8 @@ treevue_type_template_id_4c8a9869_render._withStripped = true
3163
3158
 
3164
3159
  var tree_component = normalizeComponent(
3165
3160
  src_treevue_type_script_lang_js,
3166
- treevue_type_template_id_4c8a9869_render,
3167
- treevue_type_template_id_4c8a9869_staticRenderFns,
3161
+ treevue_type_template_id_d9c99060_render,
3162
+ treevue_type_template_id_d9c99060_staticRenderFns,
3168
3163
  false,
3169
3164
  null,
3170
3165
  null,
@@ -3593,6 +3588,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3593
3588
 
3594
3589
  var _props, _methods;
3595
3590
 
3591
+ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
3592
+
3596
3593
  //
3597
3594
  //
3598
3595
  //
@@ -4180,12 +4177,30 @@ var _props, _methods;
4180
4177
 
4181
4178
  methods: (_methods = {
4182
4179
  handleClick: function handleClick(index) {
4183
- this.selectIndex = index;
4184
- this.inputSearch = false;
4185
- this.getContent();
4180
+ var _this3 = this;
4181
+
4182
+ return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
4183
+ return regeneratorRuntime.wrap(function _callee$(_context) {
4184
+ while (1) {
4185
+ switch (_context.prev = _context.next) {
4186
+ case 0:
4187
+ _this3.selectIndex = index;
4188
+ _context.next = 3;
4189
+ return _this3.getContent();
4190
+
4191
+ case 3:
4192
+ _this3.inputSearch = false;
4193
+
4194
+ case 4:
4195
+ case 'end':
4196
+ return _context.stop();
4197
+ }
4198
+ }
4199
+ }, _callee, _this3);
4200
+ }))();
4186
4201
  },
4187
4202
  getNodeList: function getNodeList(isSearch) {
4188
- var _this3 = this;
4203
+ var _this4 = this;
4189
4204
 
4190
4205
  this.personnel = JSON.parse(JSON.stringify(this.nodeList));
4191
4206
  // !isSearch && (this.list = $.deepClone(this.selectList));
@@ -4212,7 +4227,7 @@ var _props, _methods;
4212
4227
  } else {
4213
4228
  _this.personnel.map(function (x) {
4214
4229
  if (x.children && x.children.length > 0) {
4215
- _this3.setChecked(x.children);
4230
+ _this4.setChecked(x.children);
4216
4231
  } else {
4217
4232
  _this.$set(x, 'checked', false);
4218
4233
  }
@@ -4230,13 +4245,13 @@ var _props, _methods;
4230
4245
  });
4231
4246
  },
4232
4247
  setChecked: function setChecked(list) {
4233
- var _this4 = this;
4248
+ var _this5 = this;
4234
4249
 
4235
4250
  list.map(function (x) {
4236
4251
  if (x.children && x.children.length > 0) {
4237
- _this4.setChecked(x.children);
4252
+ _this5.setChecked(x.children);
4238
4253
  } else {
4239
- _this4.$set(x, 'checked', false);
4254
+ _this5.$set(x, 'checked', false);
4240
4255
  }
4241
4256
  });
4242
4257
  },
@@ -4276,21 +4291,41 @@ var _props, _methods;
4276
4291
  * @author liufan
4277
4292
  */
4278
4293
  onSearch: function onSearch() {
4279
- var _this5 = this;
4294
+ var _this6 = this;
4280
4295
 
4281
4296
  if (this.timer != null) {
4282
4297
  clearTimeout(this.timer);
4283
4298
  }
4284
- this.timer = setTimeout(function () {
4285
- if (_this5.$listeners.search) {
4286
- _this5.oldIsSearch = _this5.isSearch;
4287
- _this5.isSearch = !_this5.isSearch;
4288
- _this5.$emit('search', _this5.namelike);
4289
- } else {
4290
- _this5.inputSearch = true;
4291
- _this5.getContent();
4292
- }
4293
- }, 1000);
4299
+ this.timer = setTimeout(_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
4300
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
4301
+ while (1) {
4302
+ switch (_context2.prev = _context2.next) {
4303
+ case 0:
4304
+ if (!_this6.$listeners.search) {
4305
+ _context2.next = 6;
4306
+ break;
4307
+ }
4308
+
4309
+ _this6.oldIsSearch = _this6.isSearch;
4310
+ _this6.isSearch = !_this6.isSearch;
4311
+ _this6.$emit('search', _this6.namelike);
4312
+ _context2.next = 9;
4313
+ break;
4314
+
4315
+ case 6:
4316
+ _context2.next = 8;
4317
+ return _this6.getContent();
4318
+
4319
+ case 8:
4320
+ _this6.inputSearch = !!_this6.namelike.trim();
4321
+
4322
+ case 9:
4323
+ case 'end':
4324
+ return _context2.stop();
4325
+ }
4326
+ }
4327
+ }, _callee2, _this6);
4328
+ })), 1000);
4294
4329
  },
4295
4330
 
4296
4331
  /**
@@ -4300,7 +4335,7 @@ var _props, _methods;
4300
4335
  * @author liufan
4301
4336
  */
4302
4337
  getContent: function getContent(name) {
4303
- var _this6 = this;
4338
+ var _this7 = this;
4304
4339
 
4305
4340
  if (name) {
4306
4341
  this.label = name;
@@ -4324,7 +4359,7 @@ var _props, _methods;
4324
4359
  }
4325
4360
  delete this.newParam.department;
4326
4361
  delete this.newParam.myemployee;
4327
- utils_http({
4362
+ return utils_http({
4328
4363
  url: this.url ? this.url : this.baseUrl ? this.baseUrl + selectObject : selectObject,
4329
4364
  params: _extends({
4330
4365
  objType: this.objType,
@@ -4333,45 +4368,40 @@ var _props, _methods;
4333
4368
  filid: this.filid
4334
4369
  }, this.newParam)
4335
4370
  }).then(function (res) {
4336
- _this6.$toast.clear();
4371
+ _this7.$toast.clear();
4337
4372
  var rCode = res.rCode,
4338
4373
  msg = res.msg;
4339
4374
 
4340
4375
  if (rCode == 0) {
4341
- if (_this6.inputSearch && !_this6.namelike) {
4342
- _this6.inputSearch = false;
4343
- } else if (_this6.namelike.trim()) {
4344
- _this6.inputSearch = true;
4376
+ if (typeof _this7.selectList == 'string') {
4377
+ _this7.selectData = [];
4378
+ _this7.list = _this7.getSelectData(JSON.parse(JSON.stringify(res.results)));
4379
+ _this7.$emit('update:selectList', _this7.list);
4345
4380
  }
4346
- if (typeof _this6.selectList == 'string') {
4347
- _this6.selectData = [];
4348
- _this6.list = _this6.getSelectData(JSON.parse(JSON.stringify(res.results)));
4349
- _this6.$emit('update:selectList', _this6.list);
4350
- }
4351
- _this6.personnel = JSON.parse(JSON.stringify(res.results));
4352
- var _this = _this6;
4353
- _this6.list.filter(function (r) {
4381
+ _this7.personnel = JSON.parse(JSON.stringify(res.results));
4382
+ var _this = _this7;
4383
+ _this7.list.filter(function (r) {
4354
4384
  _this.personnel.find(function (i) {
4355
4385
  if (i[_this.valueKey] === r[_this.valueKey]) {
4356
4386
  _this.$set(i, 'checked', true);
4357
4387
  }
4358
4388
  });
4359
4389
  });
4360
- _this6.genre = JSON.parse(JSON.stringify(res.results));
4390
+ _this7.genre = JSON.parse(JSON.stringify(res.results));
4361
4391
  } else {
4362
- _this6.$toast(msg);
4392
+ _this7.$toast(msg);
4363
4393
  }
4364
4394
  });
4365
4395
  },
4366
4396
  getSelectData: function getSelectData(data) {
4367
- var _this7 = this;
4397
+ var _this8 = this;
4368
4398
 
4369
4399
  var _this = this;
4370
4400
  var user = this.selectList.split(',');
4371
4401
  user.map(function (x) {
4372
4402
  data.map(function (i) {
4373
4403
  if (i[_this.valueKey] == x) {
4374
- _this7.selectData.push(i);
4404
+ _this8.selectData.push(i);
4375
4405
  } else if (i.children) {
4376
4406
  _this.getSelectData(i.children);
4377
4407
  }
@@ -4380,7 +4410,7 @@ var _props, _methods;
4380
4410
  return this.selectData;
4381
4411
  },
4382
4412
  getData: function getData(obj) {
4383
- var _this8 = this;
4413
+ var _this9 = this;
4384
4414
 
4385
4415
  var params = _extends({}, this.newParam, {
4386
4416
  pid: obj[this.valueKey],
@@ -4399,7 +4429,7 @@ var _props, _methods;
4399
4429
  params: params
4400
4430
  }).then(function (res) {
4401
4431
  if (res.rCode == 0) {
4402
- if (res.results.length > 0 && res.results[0].nocheck == false && _this8.isAllCheck && _this8.multiple) {
4432
+ if (res.results.length > 0 && res.results[0].nocheck == false && _this9.isAllCheck && _this9.multiple) {
4403
4433
  res.results.unshift({
4404
4434
  showshortname: '全选',
4405
4435
  checked: false,
@@ -4408,16 +4438,16 @@ var _props, _methods;
4408
4438
  parentshowid: res.results[0].parentshowid
4409
4439
  });
4410
4440
  }
4411
- _this8.$set(obj, 'children', res.results);
4412
- var _this = _this8;
4413
- _this8.list.filter(function (r) {
4441
+ _this9.$set(obj, 'children', res.results);
4442
+ var _this = _this9;
4443
+ _this9.list.filter(function (r) {
4414
4444
  obj.children.find(function (i) {
4415
4445
  if (i[_this.valueKey] === r[_this.valueKey]) {
4416
4446
  _this.$set(i, 'checked', true);
4417
4447
  }
4418
4448
  });
4419
4449
  });
4420
- if (_this8.isAllCheck && _this8.multiple && obj.children.length > 0) {
4450
+ if (_this9.isAllCheck && _this9.multiple && obj.children.length > 0) {
4421
4451
  var checkList = obj.children.slice(1, obj.children.length).filter(function (x) {
4422
4452
  return x.checked;
4423
4453
  });
@@ -4426,11 +4456,11 @@ var _props, _methods;
4426
4456
  }
4427
4457
  }
4428
4458
  }
4429
- _this8.$toast.clear();
4459
+ _this9.$toast.clear();
4430
4460
  });
4431
4461
  },
4432
4462
  getChiled: function getChiled(res, isStart, key) {
4433
- var _this9 = this;
4463
+ var _this10 = this;
4434
4464
 
4435
4465
  var _that = this;
4436
4466
  var data = [];
@@ -4473,9 +4503,9 @@ var _props, _methods;
4473
4503
  _that.$set(i, 'checked', false);
4474
4504
  });
4475
4505
  }
4476
- _this9.$toast.clear();
4506
+ _this10.$toast.clear();
4477
4507
  }).catch(function (err) {
4478
- _this9.$toast('数据返回错误');
4508
+ _this10.$toast('数据返回错误');
4479
4509
  });
4480
4510
  } else {
4481
4511
  data.map(function (x) {
@@ -4536,7 +4566,7 @@ var _props, _methods;
4536
4566
  }
4537
4567
  },
4538
4568
  checked: function checked(res, model) {
4539
- var _this10 = this;
4569
+ var _this11 = this;
4540
4570
 
4541
4571
  this.oldIsSearch = this.isSearch;
4542
4572
  if (!res.obj.mixType) {
@@ -4545,12 +4575,12 @@ var _props, _methods;
4545
4575
  if (res.obj.checked) {
4546
4576
  if (res.obj.isAllCheck) {
4547
4577
  model.map(function (x) {
4548
- for (var i in _this10.list) {
4549
- if (_this10.list[i][_this10.valueKey] == x[_this10.valueKey]) {
4550
- _this10.list.splice(i, 1);
4578
+ for (var i in _this11.list) {
4579
+ if (_this11.list[i][_this11.valueKey] == x[_this11.valueKey]) {
4580
+ _this11.list.splice(i, 1);
4551
4581
  }
4552
4582
  }
4553
- _this10.$set(x, 'checked', false);
4583
+ _this11.$set(x, 'checked', false);
4554
4584
  });
4555
4585
  } else {
4556
4586
  for (var i in this.list) {
@@ -4570,8 +4600,8 @@ var _props, _methods;
4570
4600
 
4571
4601
  var selectData = [];
4572
4602
  model.map(function (x) {
4573
- if (!x.disabled && !x.nocheck && !x.isAllCheck) {
4574
- _this10.$set(x, 'checked', true);
4603
+ if (!x.disabled && !x.nocheck && !x.isAllCheck && x.selecttype == _this11.newParam.selecttype) {
4604
+ _this11.$set(x, 'checked', true);
4575
4605
  selectData.push(x);
4576
4606
  }
4577
4607
  });
@@ -4595,10 +4625,13 @@ var _props, _methods;
4595
4625
  obj[next.showid] ? '' : obj[next.showid] = true && item.push(next);
4596
4626
  return item;
4597
4627
  }, []);
4598
- if (model.length - 1 === checkList.length) {
4628
+ var newArr = model.filter(function (x) {
4629
+ return !x.disabled && !x.nocheck && x.selecttype == _this11.newParam.selecttype;
4630
+ });
4631
+ if (newArr.length === checkList.length) {
4599
4632
  model.map(function (x) {
4600
4633
  if (!x.disabled) {
4601
- _this10.$set(model[0], 'checked', true);
4634
+ _this11.$set(model[0], 'checked', true);
4602
4635
  }
4603
4636
  });
4604
4637
  } else {
@@ -4607,16 +4640,16 @@ var _props, _methods;
4607
4640
  }
4608
4641
  }
4609
4642
  }, _methods['setChecked'] = function setChecked(data, item) {
4610
- var _this11 = this;
4643
+ var _this12 = this;
4611
4644
 
4612
4645
  data.map(function (x) {
4613
- if (x[_this11.valueKey] === item[_this11.valueKey]) {
4614
- _this11.$set(x, 'checked', true);
4646
+ if (x[_this12.valueKey] === item[_this12.valueKey]) {
4647
+ _this12.$set(x, 'checked', true);
4615
4648
  } else {
4616
- _this11.$set(x, 'checked', false);
4649
+ _this12.$set(x, 'checked', false);
4617
4650
  }
4618
4651
  if (x.children) {
4619
- _this11.setChecked(x.children, item);
4652
+ _this12.setChecked(x.children, item);
4620
4653
  }
4621
4654
  });
4622
4655
  }, _methods.dispose = function dispose() {
@@ -4643,8 +4676,8 @@ var _props, _methods;
4643
4676
 
4644
4677
  var selector_tree_component = normalizeComponent(
4645
4678
  src_selector_treevue_type_script_lang_js,
4646
- selector_treevue_type_template_id_a36bef12_render,
4647
- selector_treevue_type_template_id_a36bef12_staticRenderFns,
4679
+ selector_treevue_type_template_id_237c573e_render,
4680
+ selector_treevue_type_template_id_237c573e_staticRenderFns,
4648
4681
  false,
4649
4682
  null,
4650
4683
  null,
@@ -28147,7 +28180,7 @@ if (typeof window !== 'undefined' && window.Vue) {
28147
28180
  }
28148
28181
 
28149
28182
  /* harmony default export */ var src = __webpack_exports__["default"] = ({
28150
- version: '0.3.22',
28183
+ version: '0.3.23',
28151
28184
  install: install,
28152
28185
  Button: packages_button,
28153
28186
  ButtonGroup: button_group,