eoss-ui 0.5.27 → 0.5.29

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/upload.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 35);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 36);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ([
@@ -3630,13 +3630,13 @@ window.__store = store;
3630
3630
  /* 22 */,
3631
3631
  /* 23 */,
3632
3632
  /* 24 */,
3633
- /* 25 */,
3634
- /* 26 */
3633
+ /* 25 */
3635
3634
  /***/ (function(module, exports) {
3636
3635
 
3637
3636
  module.exports = require("js-base64");
3638
3637
 
3639
3638
  /***/ }),
3639
+ /* 26 */,
3640
3640
  /* 27 */,
3641
3641
  /* 28 */,
3642
3642
  /* 29 */,
@@ -3645,7 +3645,8 @@ module.exports = require("js-base64");
3645
3645
  /* 32 */,
3646
3646
  /* 33 */,
3647
3647
  /* 34 */,
3648
- /* 35 */
3648
+ /* 35 */,
3649
+ /* 36 */
3649
3650
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3650
3651
 
3651
3652
  "use strict";
@@ -4064,7 +4065,7 @@ var util = __webpack_require__(0);
4064
4065
  var store = __webpack_require__(11);
4065
4066
 
4066
4067
  // EXTERNAL MODULE: external "js-base64"
4067
- var external_js_base64_ = __webpack_require__(26);
4068
+ var external_js_base64_ = __webpack_require__(25);
4068
4069
 
4069
4070
  // 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&
4070
4071
  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; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.5.27",
3
+ "version": "0.5.29",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -96,7 +96,7 @@
96
96
  "cp-cli": "^1.0.2",
97
97
  "cross-env": "^3.1.3",
98
98
  "css-loader": "^2.1.0",
99
- "eoss-element": "^0.2.80",
99
+ "eoss-element": "^0.2.81",
100
100
  "es6-promise": "^4.0.5",
101
101
  "eslint": "4.18.2",
102
102
  "eslint-config-elemefe": "0.1.1",
@@ -46,7 +46,8 @@ export default {
46
46
  syncKeys: Object,
47
47
  text: String,
48
48
  onClick: Function,
49
- badge: [Object, Number]
49
+ badge: [Object, Number],
50
+ float: String
50
51
  },
51
52
  computed: {
52
53
  _type() {
@@ -268,7 +269,8 @@ export default {
268
269
  clas = clas.concat([
269
270
  'el-button',
270
271
  this._type ? `el-button--${this._type}` : 'el-button--default',
271
- this.size ? `el-button--${this.size}` : ''
272
+ this.size ? `el-button--${this.size}` : '',
273
+ this.float ? `es-button--${this.float}` : ''
272
274
  ]);
273
275
  }
274
276
  if (this.badge) {
@@ -97,6 +97,7 @@
97
97
  label="操作"
98
98
  fixed="right"
99
99
  class="eoss-ui-eidt-column"
100
+ :button="headButton"
100
101
  :total="false"
101
102
  >
102
103
  <template slot-scope="scope">
@@ -108,7 +109,7 @@
108
109
  <i class="el-icon-circle-plus-outline"></i>
109
110
  </el-button>
110
111
  <el-button
111
- v-if="!scope.row.cantDelete"
112
+ v-if="!scope.row.cantDelete && !isLeast"
112
113
  type="text"
113
114
  @click="handleClickDeleteData(scope)"
114
115
  >
@@ -142,7 +143,6 @@ import sizer from './sizer.vue';
142
143
  import util from 'eoss-ui/src/utils/util';
143
144
  import bus from 'eoss-ui/src/utils/bus';
144
145
  import qs from 'qs';
145
- import itemVue from '../../layout/src/item.vue';
146
146
  export default {
147
147
  name: 'EsDataTable',
148
148
  inheritAttrs: false,
@@ -303,6 +303,10 @@ export default {
303
303
  type: Boolean,
304
304
  default: false
305
305
  },
306
+ theadAdd: {
307
+ type: Boolean,
308
+ default: true
309
+ },
306
310
  // 单元格点击事件
307
311
  click: {
308
312
  type: Boolean,
@@ -356,6 +360,11 @@ export default {
356
360
  default() {
357
361
  return [];
358
362
  }
363
+ },
364
+ rowData: [Object, Boolean],
365
+ least: {
366
+ type: Boolean,
367
+ default: false
359
368
  }
360
369
  },
361
370
  data() {
@@ -490,6 +499,18 @@ export default {
490
499
  set(val) {
491
500
  return val;
492
501
  }
502
+ },
503
+ headButton() {
504
+ return this.theadAdd
505
+ ? {
506
+ icon: 'el-icon-circle-plus-outline',
507
+ type: 'text',
508
+ event: this.handleClickAddData
509
+ }
510
+ : false;
511
+ },
512
+ isLeast() {
513
+ return this.data.length < 2 && this.least;
493
514
  }
494
515
  },
495
516
  watch: {
@@ -708,18 +729,43 @@ export default {
708
729
  this.$emit('row-click', row, column, event);
709
730
  },
710
731
  handleClickAddData(scope) {
711
- const data = JSON.parse(JSON.stringify(scope.row));
712
- let index = scope.$index + 1;
713
- if (this.page) {
714
- index += (this.config.pageNum - 1) * this.config.pageSize;
732
+ if (scope && scope.row) {
733
+ const data = JSON.parse(JSON.stringify(scope.row));
734
+ let index = scope.$index + 1;
735
+ if (this.page) {
736
+ index += (this.config.pageNum - 1) * this.config.pageSize;
737
+ }
738
+ this.data.splice(index, 0, data);
739
+ this.$emit('dataChange', 'add', data);
740
+ this.$emit('btnClick', {
741
+ event: 'addRow',
742
+ row: data,
743
+ index: index,
744
+ data: this.data
745
+ });
746
+ } else {
747
+ let index = this.data.length;
748
+ if (this.page) {
749
+ index += (this.config.pageNum - 1) * this.config.pageSize;
750
+ }
751
+ let rows = {};
752
+ if (this.rowData && typeof this.rowData == 'object') {
753
+ rows = this.rowData;
754
+ } else if (index && this.rowData === true) {
755
+ rows = JSON.parse(JSON.stringify(this.data[index - 1]));
756
+ } else {
757
+ this.getRow(this.thead, rows);
758
+ }
759
+ this.data.splice(index, 0, rows);
715
760
  }
716
- this.data.splice(index, 0, data);
717
- this.$emit('dataChange', 'add', data);
718
- this.$emit('btnClick', {
719
- event: 'addRow',
720
- row: data,
721
- index: index,
722
- data: this.data
761
+ },
762
+ getRow(thead, obj) {
763
+ thead.forEach((item) => {
764
+ if (item.field) {
765
+ obj[item['field']] = item.defaultValue || '';
766
+ } else if (item.children && item.children.length) {
767
+ this.getRow(item.children, obj);
768
+ }
723
769
  });
724
770
  },
725
771
  handleClickDeleteData(scope) {
@@ -1309,7 +1355,6 @@ export default {
1309
1355
  });
1310
1356
  },
1311
1357
  validate(callback) {
1312
- console.log(this);
1313
1358
  if (this.form) {
1314
1359
  let form = this.elForm || this.$children[0];
1315
1360
  form.validate((valid) => {
@@ -927,6 +927,9 @@ export default {
927
927
  if (i === 'subsystemName') {
928
928
  document.title = results[i];
929
929
  }
930
+ if (i === 'loginPage' && results[i]) {
931
+ util.setStorage('loginPage', results[i]);
932
+ }
930
933
  if (i === 'sysLogoIco' && results[i]) {
931
934
  sessionStorage.setItem('sysLogoIco', results[i]);
932
935
  util.setFavicon(results[i]);
@@ -938,6 +941,10 @@ export default {
938
941
  util.win.top.webPageWatermark = results[i].webPageWatermark;
939
942
  util.watermark(results[i].webPageWatermark);
940
943
  }
944
+
945
+ if (i === 'subsystemExtend' && results[i].loginPage) {
946
+ util.setStorage('loginPage', results[i].loginPage);
947
+ }
941
948
  store.set(i, results[i]);
942
949
  }
943
950
  this.userModel = results.userModel;
@@ -316,6 +316,7 @@ export default {
316
316
  key: 'userId',
317
317
  value: value.value
318
318
  });
319
+ util.removeStorage('mainConfig');
319
320
  this.$message({
320
321
  message: res.msg,
321
322
  type: 'success',
@@ -88,7 +88,6 @@
88
88
  :tabindex="multiple ? '-1' : null"
89
89
  v-popover:popover
90
90
  @dblclick.native="openDialog"
91
- @keyup.enter.native="handleSearch"
92
91
  @focus="handleFocus"
93
92
  @blur="handleBlur"
94
93
  >
@@ -106,6 +105,7 @@
106
105
  readonly
107
106
  :name="name"
108
107
  type="text"
108
+ wqwq
109
109
  v-show="false"
110
110
  ></el-input>
111
111
  </template>
@@ -131,7 +131,6 @@
131
131
  }"
132
132
  :tabindex="multiple ? '-1' : null"
133
133
  @dblclick.native="openDialog"
134
- @keyup.enter.native="handleSearch"
135
134
  @clear="handleClear"
136
135
  >
137
136
  <template slot="append">
@@ -211,6 +210,7 @@
211
210
  import util from 'eoss-ui/src/utils/util.js';
212
211
  import { getSelectorOrgDetail } from 'eoss-ui/src/config/api.js';
213
212
  import Clickoutside from 'eoss-element/src/utils/clickoutside';
213
+ import { debounce } from 'eoss-element/src/utils/util';
214
214
  export default {
215
215
  name: 'EsSelector',
216
216
  inheritAttrs: false,
@@ -326,6 +326,10 @@ export default {
326
326
  noMatchText: {
327
327
  type: String,
328
328
  default: '无匹配数据'
329
+ },
330
+ emptySerach: {
331
+ type: Boolean,
332
+ default: false
329
333
  }
330
334
  },
331
335
  data() {
@@ -340,7 +344,8 @@ export default {
340
344
  options: '',
341
345
  show: false,
342
346
  focus: false,
343
- reference: undefined
347
+ reference: undefined,
348
+ timer: null
344
349
  };
345
350
  },
346
351
  computed: {
@@ -386,7 +391,7 @@ export default {
386
391
  if (this.selected && this.selected.length) {
387
392
  return '';
388
393
  } else if (this.filterable) {
389
- return '输入关键字按回车搜索';
394
+ return '输入关键字搜索';
390
395
  } else {
391
396
  return this.placeholder;
392
397
  }
@@ -414,6 +419,12 @@ export default {
414
419
  this.resetInputHeight();
415
420
  }
416
421
  }
422
+ },
423
+ words(val) {
424
+ if (this.emptySerach || val !== '') {
425
+ clearTimeout(this.timer);
426
+ this.timer = setTimeout(this.handleSearch, 500);
427
+ }
417
428
  }
418
429
  },
419
430
  created() {
@@ -611,6 +622,9 @@ export default {
611
622
  : res.label || res[this.valueKey])
612
623
  );
613
624
  }
625
+ },
626
+ beforeDestroy() {
627
+ this.$el.removeEventListener('keyup', this.doSearch);
614
628
  }
615
629
  };
616
630
  </script>
@@ -28,6 +28,7 @@
28
28
  :inline="true"
29
29
  :model="form"
30
30
  class="es-selector-selection-toolbar"
31
+ v-if="multiple || isShowTree"
31
32
  >
32
33
  <el-form-item>
33
34
  <el-checkbox
@@ -38,7 +39,7 @@
38
39
  全选
39
40
  </el-checkbox>
40
41
  </el-form-item>
41
- <div class="es-float-right">
42
+ <div class="es-float-right" v-if="isShowTree">
42
43
  <el-form-item v-if="showSelect && activeName == 'enterprise'">
43
44
  <es-select
44
45
  v-model="selectValue"
@@ -1 +1 @@
1
- .el-button+.es-button-badge,.es-button-badge+.el-button{margin-left:10px}.es-button-badge{vertical-align:unset}
1
+ .el-button+.es-button-badge,.es-button-badge+.el-button{margin-left:10px}.es-button-badge{vertical-align:unset}.el-button[float=left],.el-button[float=right],.es-button--left,.es-button--right{float:left}