eoss-ui 0.4.96 → 0.4.98

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.
@@ -1 +1 @@
1
- @charset "UTF-8";.es-selector,.es-selector .es-selector-tags{position:relative}.es-selector{line-height:normal}.es-selector .el-select__tags{max-width:100%;padding-left:4px}.es-selector .el-select__tags.es-selector-edit>span{padding-top:4px}.es-selector .el-select__tags .el-tag{margin-right:4px;margin-bottom:4px}.es-selector .es-selector-search .el-select__tags{max-width:calc(100% - 71px)}.es-selector .es-selector-tags.es-selector-more{padding-right:50px;width:100%}.es-selector .es-selector-tags.es-selector-more .el-tag{display:block}.es-selector .es-selector-tags.es-selector-more .es-tags-more{width:40px;padding:0 4px;position:absolute;top:0;right:6px;text-align:center}.es-selector .es-selector-tags-box{line-height:0}.es-selector .es-pointer .el-input__inner{cursor:pointer}.es-selector .es-selector-dropdown-item.hover,.es-selector .es-selector-dropdown-item:hover{background-color:#f5f7fa}.es-selector .es-selector-dropdown-item{font-size:14px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#606266;height:34px;line-height:34px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}.es-selector .es-selector-dropdown-item.es-selected{color:#1890ff}.es-zindex-2{z-index:2}.es-selector-dialog .el-dialog__header{padding:12px 20px 8px}.es-selector-dialog .el-dialog__header .el-dialog__title{font-size:14px}.es-selector-dialog .el-dialog__headerbtn{top:14px;right:16px}.es-selector-dialog .el-dialog__body{padding:4px}
1
+ @charset "UTF-8";.es-selector,.es-selector .es-selector-tags{position:relative}.es-selector{line-height:normal}.es-selector .el-select__tags{max-width:100%;padding-left:4px}.es-selector .el-select__tags.es-selector-edit>span{padding-top:4px}.es-selector .el-select__tags .el-tag{margin-right:4px;margin-bottom:4px}.es-selector .es-selector-search .el-select__tags{max-width:calc(100% - 71px)}.es-selector .es-selector-tags.es-selector-more{padding-right:50px;width:100%}.es-selector .es-selector-tags.es-selector-more .el-tag{display:block}.es-selector .es-selector-tags.es-selector-more .es-tags-more{width:40px;padding:0 4px;position:absolute;top:0;right:6px;text-align:center}.es-selector .es-selector-tags-box{line-height:0}.es-selector .es-pointer .el-input__inner{cursor:pointer}.es-selector-dropdown-item.hover,.es-selector-dropdown-item:hover{background-color:#f5f7fa}.es-selector-popover{padding:0}.es-selector-popover .es-selector-dropdown__list{padding:12px}.es-selector-popover .es-selector-dropdown-item{font-size:14px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#606266;height:34px;line-height:34px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}.es-selector-popover .es-selector-dropdown-item.es-selected{color:#1890ff}.es-zindex-2{z-index:2}.es-selector-dialog .el-dialog__header{padding:12px 20px 8px}.es-selector-dialog .el-dialog__header .el-dialog__title{font-size:14px}.es-selector-dialog .el-dialog__headerbtn{top:14px;right:16px}.es-selector-dialog .el-dialog__body{padding:4px}
package/lib/upload.js CHANGED
@@ -3312,6 +3312,13 @@ module.exports = require("eoss-element");
3312
3312
 
3313
3313
  /***/ }),
3314
3314
 
3315
+ /***/ 24:
3316
+ /***/ (function(module, exports) {
3317
+
3318
+ module.exports = require("js-base64");
3319
+
3320
+ /***/ }),
3321
+
3315
3322
  /***/ 3:
3316
3323
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3317
3324
 
@@ -3424,8 +3431,8 @@ function normalizeComponent(
3424
3431
  // ESM COMPAT FLAG
3425
3432
  __webpack_require__.r(__webpack_exports__);
3426
3433
 
3427
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=3bdc3f65&
3428
- var mainvue_type_template_id_3bdc3f65_render = function () {
3434
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=079ba0f8&
3435
+ var mainvue_type_template_id_079ba0f8_render = function () {
3429
3436
  var _vm = this
3430
3437
  var _h = _vm.$createElement
3431
3438
  var _c = _vm._self._c || _h
@@ -3805,10 +3812,10 @@ var mainvue_type_template_id_3bdc3f65_render = function () {
3805
3812
  : _vm._e()
3806
3813
  }
3807
3814
  var staticRenderFns = []
3808
- mainvue_type_template_id_3bdc3f65_render._withStripped = true
3815
+ mainvue_type_template_id_079ba0f8_render._withStripped = true
3809
3816
 
3810
3817
 
3811
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=3bdc3f65&
3818
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=079ba0f8&
3812
3819
 
3813
3820
  // EXTERNAL MODULE: ./src/config/api.js
3814
3821
  var api = __webpack_require__(1);
@@ -3835,6 +3842,9 @@ var util = __webpack_require__(0);
3835
3842
  // EXTERNAL MODULE: ./src/utils/store.js
3836
3843
  var store = __webpack_require__(8);
3837
3844
 
3845
+ // EXTERNAL MODULE: external "js-base64"
3846
+ var external_js_base64_ = __webpack_require__(24);
3847
+
3838
3848
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=script&lang=js&
3839
3849
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3840
3850
 
@@ -4023,6 +4033,7 @@ var _props;
4023
4033
 
4024
4034
 
4025
4035
 
4036
+
4026
4037
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
4027
4038
  name: 'EsUpload',
4028
4039
  components: {
@@ -4248,7 +4259,8 @@ var _props;
4248
4259
  source: '',
4249
4260
  excludeNames: '',
4250
4261
  previewAdjunct: api["gb" /* previewAdjunct */],
4251
- boxHeight: this.listHeight
4262
+ boxHeight: this.listHeight,
4263
+ kkfileview: null
4252
4264
  };
4253
4265
  },
4254
4266
 
@@ -4501,6 +4513,9 @@ var _props;
4501
4513
  return item;
4502
4514
  }).join(',');
4503
4515
  }
4516
+ if (res.results.kkViewRootPath) {
4517
+ _this2.kkfileview = res.results.kkViewRootPath;
4518
+ }
4504
4519
  _this2.fileSize = res.results.limitFileSize ? res.results.limitFileSize : 0;
4505
4520
  _this2.fileTotalSize = res.results.limitTotalSize;
4506
4521
  store["a" /* default */].set(_this2.code, {
@@ -4560,6 +4575,19 @@ var _props;
4560
4575
  handleUpload: function handleUpload() {
4561
4576
  this.$refs.upload.submit();
4562
4577
  },
4578
+ openKkfileview: function openKkfileview(file) {
4579
+ var host = util["a" /* default */].win.top.location.origin;
4580
+ if (this.host) {
4581
+ if (util["a" /* default */].startWith(this.host, 'http')) {
4582
+ host = this.host;
4583
+ } else {
4584
+ host += this.host;
4585
+ }
4586
+ }
4587
+ console.log(host);
4588
+ var url = encodeURIComponent(external_js_base64_["Base64"].encode(host + (typeof this.download === 'string' ? this.download : api["q" /* downloadByAdjunctId */]) + ('?adjunctId=' + (file.adjunctId || file.response.adjunctId) + '&fullfilename=' + file.originalName)));
4589
+ util["a" /* default */].win.top.open(this.kkfileview + '?url=' + url);
4590
+ },
4563
4591
  handlePreview: function handlePreview(res) {
4564
4592
  var _this4 = this;
4565
4593
 
@@ -4573,9 +4601,17 @@ var _props;
4573
4601
  var suffix = file.suffix;
4574
4602
  suffix = suffix.toLowerCase();
4575
4603
  if (suffix.includes('doc') || suffix.includes('docx') || suffix.includes('xls') || suffix.includes('xlsx') || suffix.includes('ppt')) {
4576
- util["a" /* default */].win.open(this.host + (url ? url : api["ib" /* previewAdjunctOffice */]) + '?cmd=view&bucketName=' + file.absolutePath + '&fileId=' + file.adjunctId + '&fileName=' + file.newName);
4604
+ if (this.kkfileview) {
4605
+ this.openKkfileview(file);
4606
+ } else {
4607
+ util["a" /* default */].win.top.open(this.host + (url ? url : api["ib" /* previewAdjunctOffice */]) + '?cmd=view&bucketName=' + file.absolutePath + '&fileId=' + file.adjunctId + '&fileName=' + file.newName);
4608
+ }
4577
4609
  } else if (suffix.includes('pdf')) {
4578
- util["a" /* default */].win.open(this.host + (url ? url : api["hb" /* previewAdjunct2 */]) + '/' + file.originalName + '?adjunctId=' + file.adjunctId);
4610
+ if (this.kkfileview) {
4611
+ this.openKkfileview(file);
4612
+ } else {
4613
+ util["a" /* default */].win.top.open(this.host + (url ? url : api["hb" /* previewAdjunct2 */]) + '/' + file.originalName + '?adjunctId=' + file.adjunctId);
4614
+ }
4579
4615
  } else if (suffix.includes('jpge') || suffix.includes('jpg') || suffix.includes('gif') || suffix.includes('png')) {
4580
4616
  this.imgUrl = res.url && util["a" /* default */].startWith(url, ['http', '/', true]) ? res.url : this.host + (url ? url : this.previewAdjunct) + '?adjunctId=' + file.adjunctId;
4581
4617
  this.title = file.originalName;
@@ -4590,10 +4626,14 @@ var _props;
4590
4626
  this.title = file.originalName;
4591
4627
  this.showVideo = true;
4592
4628
  } else {
4593
- util["a" /* default */].win.open(this.host + (url ? url : this.previewAdjunct) + '?adjunctId=' + file.adjunctId);
4629
+ if (this.kkfileview) {
4630
+ this.openKkfileview(file);
4631
+ } else {
4632
+ util["a" /* default */].win.top.open(this.host + (url ? url : this.previewAdjunct) + '?adjunctId=' + file.adjunctId);
4633
+ }
4594
4634
  }
4595
4635
  } else {
4596
- util["a" /* default */].win.open(URL.createObjectURL(file.raw));
4636
+ util["a" /* default */].win.top.open(URL.createObjectURL(file.raw));
4597
4637
  }
4598
4638
  }
4599
4639
  }
@@ -4874,7 +4914,7 @@ var componentNormalizer = __webpack_require__(3);
4874
4914
 
4875
4915
  var component = Object(componentNormalizer["a" /* default */])(
4876
4916
  src_mainvue_type_script_lang_js_,
4877
- mainvue_type_template_id_3bdc3f65_render,
4917
+ mainvue_type_template_id_079ba0f8_render,
4878
4918
  staticRenderFns,
4879
4919
  false,
4880
4920
  null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.96",
3
+ "version": "0.4.98",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -56,6 +56,7 @@
56
56
  "@interactjs/feedback": "^1.10.3",
57
57
  "axios": "^0.27.2",
58
58
  "interactjs": "^1.10.26",
59
+ "js-base64": "^3.7.5",
59
60
  "json-bigint": "^1.0.0",
60
61
  "net": "^1.0.2",
61
62
  "qrcode": "^1.5.1",
@@ -95,7 +96,7 @@
95
96
  "cp-cli": "^1.0.2",
96
97
  "cross-env": "^3.1.3",
97
98
  "css-loader": "^2.1.0",
98
- "eoss-element": "^0.2.74",
99
+ "eoss-element": "^0.2.75",
99
100
  "es6-promise": "^4.0.5",
100
101
  "eslint": "4.18.2",
101
102
  "eslint-config-elemefe": "0.1.1",
@@ -271,10 +271,28 @@
271
271
  v-on="{ ...item.events }"
272
272
  >
273
273
  </es-dialog>
274
+ <component
275
+ v-if="item.component"
276
+ :is="item.type"
277
+ v-bind="
278
+ handleExclAttribute({
279
+ data: item
280
+ })
281
+ "
282
+ ></component>
274
283
  </template>
275
284
  </template>
276
285
  </template>
277
286
  <template v-else>
287
+ <component
288
+ v-if="contents.component"
289
+ :is="contents.type"
290
+ v-bind="
291
+ handleExclAttribute({
292
+ data: contents
293
+ })
294
+ "
295
+ ></component>
278
296
  <es-form
279
297
  v-if="contents.type === 'form'"
280
298
  :show-button="false"
@@ -456,14 +474,16 @@ export default {
456
474
  width: {
457
475
  type: String,
458
476
  default: '360px'
459
- }
477
+ },
478
+ refs: String
460
479
  },
461
480
  data() {
462
481
  return {
463
482
  activeName: this.active,
464
483
  businessId: undefined,
465
484
  taskExamineAppId: this.appId,
466
- showMsg: true
485
+ showMsg: true,
486
+ formRefs: this.refs
467
487
  };
468
488
  },
469
489
  computed: {
@@ -515,6 +535,10 @@ export default {
515
535
  : true;
516
536
  },
517
537
  handleExclAttribute({ data, attrs }) {
538
+ if (!attrs || !attrs.length) {
539
+ this.ref && (this.formRefs = this.ref);
540
+ return data;
541
+ }
518
542
  return util.exclAttribute({
519
543
  data: data,
520
544
  attrs: attrs
@@ -561,7 +585,9 @@ export default {
561
585
  });
562
586
  },
563
587
  handleSubmit(res) {
564
- let esFlowForm = this.$refs.esFlowForm;
588
+ let esFlowForm = this.formRefs
589
+ ? this.$refs[this.formRefs]
590
+ : this.$refs.esFlowForm;
565
591
  if (Array.isArray(esFlowForm)) {
566
592
  esFlowForm = esFlowForm[0];
567
593
  }
@@ -530,6 +530,10 @@ export default {
530
530
  useResults: {
531
531
  type: Boolean,
532
532
  default: true
533
+ },
534
+ scanIntervalTime: {
535
+ type: Number,
536
+ default: 1500
533
537
  }
534
538
  },
535
539
  computed: {
@@ -1271,12 +1275,12 @@ export default {
1271
1275
  },
1272
1276
  //获取app登录信息
1273
1277
  loginInfo(res) {
1274
- clearInterval(this.interval);
1278
+ clearTimeout(this.interval);
1275
1279
  if (res) {
1276
1280
  //this.modifyPasswordfun();
1277
- this.interval = setInterval(() => {
1281
+ this.interval = setTimeout(() => {
1278
1282
  this.initRequestLoginInfo();
1279
- }, 1000);
1283
+ }, this.scanIntervalTime);
1280
1284
  }
1281
1285
  },
1282
1286
  initRequestLoginInfo() {
@@ -1295,7 +1299,7 @@ export default {
1295
1299
  }
1296
1300
  })
1297
1301
  .catch((err) => {
1298
- clearInterval(this.interval);
1302
+ clearTimeout(this.interval);
1299
1303
  if (err.message && err.message !== 'canceled') {
1300
1304
  this.$message.error(err.message);
1301
1305
  }
@@ -707,9 +707,6 @@ export default {
707
707
  }
708
708
  } else {
709
709
  this.getConfig();
710
- if (this.socket) {
711
- this.initWebSocket();
712
- }
713
710
  }
714
711
  break;
715
712
  case 1:
@@ -790,9 +787,6 @@ export default {
790
787
  .catch((e) => {});
791
788
  } else {
792
789
  this.getConfig();
793
- if (this.socket) {
794
- this.initWebSocket();
795
- }
796
790
  }
797
791
  },
798
792
  menuSuccess(res) {
@@ -1060,6 +1054,9 @@ export default {
1060
1054
  .then((res) => {
1061
1055
  if (res && res.rCode === 0) {
1062
1056
  this.setConfig(res.results, 1);
1057
+ if (this.socket) {
1058
+ this.initWebSocket();
1059
+ }
1063
1060
  if (this.remote) {
1064
1061
  this.getMenu();
1065
1062
  } else {
@@ -2,7 +2,6 @@
2
2
  import { findSysCode } from 'eoss-ui/src/config/api.js';
3
3
  import store from 'eoss-ui/src/utils/store';
4
4
  import util from 'eoss-ui/src/utils/util';
5
- import { string } from 'slate';
6
5
  export default {
7
6
  name: 'EsSelect',
8
7
  componentName: 'EsSelect',
@@ -143,7 +143,11 @@
143
143
  v-model="show"
144
144
  placement="bottom-start"
145
145
  trigger="manual"
146
+ popper-class="es-selector-popover"
146
147
  :width="minWidth"
148
+ :queryParent="true"
149
+ :reference="reference"
150
+ :arrow-offset="20"
147
151
  >
148
152
  <el-scrollbar
149
153
  tag="ul"
@@ -151,6 +155,7 @@
151
155
  view-class="es-selector-dropdown__list"
152
156
  ref="scrollbar"
153
157
  v-show="options.length"
158
+ maxHeight="228"
154
159
  >
155
160
  <li
156
161
  v-for="item in options"
@@ -326,7 +331,8 @@ export default {
326
331
  minWidth: '',
327
332
  options: '',
328
333
  show: false,
329
- focus: false
334
+ focus: false,
335
+ reference: undefined
330
336
  };
331
337
  },
332
338
  computed: {
@@ -402,7 +408,9 @@ export default {
402
408
  }
403
409
  }
404
410
  },
405
- created() {},
411
+ created() {
412
+ this.reference = this.$refs.esSelector;
413
+ },
406
414
  mounted() {
407
415
  this.resetInputHeight();
408
416
  if (this.filterable) {