eoss-ui 0.4.68 → 0.4.70

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.
@@ -13,20 +13,14 @@
13
13
  >
14
14
  <div class="es-flow-list-box">
15
15
  <es-data-table
16
+ v-if="show"
16
17
  :class="{ 'es-flow-group-data-table': item.type !== 'sign' }"
18
+ :display="display"
17
19
  number
18
20
  @cell-click="handleCellClick"
19
21
  full
20
22
  v-bind="item"
21
- :data="
22
- item.type === 'preset'
23
- ? presetData
24
- : item.type === 'sign'
25
- ? signData
26
- : item.type === 'splitReading'
27
- ? splitReadingData
28
- : flowData
29
- "
23
+ :data="returnData(item.type)"
30
24
  @btn-click="handleBtnClick"
31
25
  ></es-data-table>
32
26
  </div>
@@ -56,6 +50,7 @@
56
50
  >
57
51
  <div style="height: 400px" v-loading="pressLoading">
58
52
  <es-data-table
53
+ v-if="show"
59
54
  :data="pressTableList"
60
55
  :thead="pressThead"
61
56
  @page-size-change="handleSizeChange"
@@ -85,7 +80,6 @@
85
80
  >
86
81
  </es-form>
87
82
  </es-dialog>
88
-
89
83
  </div>
90
84
  </template>
91
85
 
@@ -123,7 +117,8 @@ export default {
123
117
  default() {
124
118
  return ['flow', 'splitReading', 'preset'];
125
119
  }
126
- }
120
+ },
121
+ display: Boolean
127
122
  },
128
123
  inheritAttrs: false,
129
124
  data() {
@@ -607,7 +602,7 @@ export default {
607
602
  };
608
603
  },
609
604
  content() {
610
- return this.contents.map((item) => {
605
+ let contents = this.contents.map((item) => {
611
606
  if (typeof item === 'string') {
612
607
  return {
613
608
  type: item,
@@ -627,6 +622,7 @@ export default {
627
622
  return item;
628
623
  }
629
624
  });
625
+ return contents;
630
626
  },
631
627
  newToolbar() {
632
628
  if (this.toolbar && this.toolbar.length > 0) {
@@ -746,12 +742,22 @@ export default {
746
742
  this.getFlowList();
747
743
  this.getSysInfo('preset_type');
748
744
  this.getSysInfo('is_edit');
749
- this.$nextTick(() => {
750
- this.getListInfo();
751
- });
745
+ this.getListInfo();
752
746
  },
753
747
 
754
748
  methods: {
749
+ returnData(type) {
750
+ switch (type) {
751
+ case 'preset':
752
+ return this.presetData;
753
+ case 'sign':
754
+ return this.signData;
755
+ case 'splitReading':
756
+ return this.splitReadingData;
757
+ default:
758
+ return this.flowData;
759
+ }
760
+ },
755
761
  handleCellClick(row, column) {
756
762
  if (column.property == 'hasAdjunct' && row.hasAdjunct) {
757
763
  this.showFile(row.wfpendingid);
@@ -954,10 +960,10 @@ export default {
954
960
  this.flowData = wfHistoryList;
955
961
  this.splitReadingData = fyHistoryList;
956
962
  this.modify = modify;
963
+ this.show = true;
957
964
  } else {
958
965
  this.$message.error(message || '系统错误,请联系管理员!');
959
966
  }
960
- this.show = true;
961
967
  })
962
968
  .catch((err) => {
963
969
  this.loading.close();
@@ -357,16 +357,6 @@
357
357
  v-model="models[item.name]"
358
358
  :plain="item.plain || item.name === undefined"
359
359
  :readonly="readonly ? readonly : item.readonly"
360
- @blur="
361
- (event) => {
362
- handleBlur(item, event);
363
- }
364
- "
365
- @focus="
366
- (event) => {
367
- handleFocus(item, event);
368
- }
369
- "
370
360
  @change="
371
361
  (val) => {
372
362
  handleChange(item, val);
@@ -98,7 +98,6 @@ export default {
98
98
  return this.msgs.length >= this.count;
99
99
  },
100
100
  disabled() {
101
- console.log(this.loading, this.noMore);
102
101
  return this.loading || this.noMore;
103
102
  }
104
103
  },
@@ -37,7 +37,9 @@
37
37
  </span>
38
38
  </template>
39
39
  <es-tabs-panel v-bind="items" :show="activeName === String(indexs)">
40
- <template slot-scope="{ contents, average, data, title, show }">
40
+ <template
41
+ slot-scope="{ contents, average, data, title, show, isShow }"
42
+ >
41
43
  <template v-if="Array.isArray(contents)">
42
44
  <template v-for="(item, index) in contents">
43
45
  <div class="es-tab-pane-list" :key="index" v-if="average">
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="es-tabs-panel">
3
- <slot v-bind="$attrs"></slot>
3
+ <slot v-bind="$attrs" :show="show" :isShow="isShow"></slot>
4
4
  </div>
5
5
  </template>
6
6
 
@@ -8,10 +8,21 @@
8
8
  export default {
9
9
  name: 'EsTabsPanel',
10
10
  inheritAttrs: false,
11
- props: {},
12
- watch: {},
11
+ props: {
12
+ show: Boolean
13
+ },
14
+ watch: {
15
+ show: {
16
+ immediate: true,
17
+ handler(val) {
18
+ val && (this.isShow = true);
19
+ }
20
+ }
21
+ },
13
22
  data() {
14
- return {};
23
+ return {
24
+ isShow: false
25
+ };
15
26
  },
16
27
  mounted() {}
17
28
  };
@@ -61,6 +61,7 @@
61
61
  :expand-on-click-node="false"
62
62
  :highlight-current="true"
63
63
  :show-checkbox="showCheckbox"
64
+ :default-checked-keys="defaultCheckeds"
64
65
  :current-node-key="currentNodeKey"
65
66
  v-on="{
66
67
  ...$listeners,
@@ -160,7 +161,9 @@ export default {
160
161
  },
161
162
  // 选择项本地数据
162
163
  data: Array,
164
+ //是否选中首级节点
163
165
  currentFirst: Boolean,
166
+ //当前选中的节点
164
167
  currentNodeKey: [String, Number],
165
168
  icon: {
166
169
  type: Boolean,
@@ -240,10 +243,20 @@ export default {
240
243
  return {};
241
244
  }
242
245
  },
246
+ //节点是否可被选择
243
247
  showCheckbox: {
244
248
  type: Boolean,
245
249
  default: false
246
250
  },
251
+ //是否勾选首级节点
252
+ checkedFirst: Boolean,
253
+ //默认勾选的节点的 key 的数组
254
+ defaultCheckedKeys: {
255
+ type: Array,
256
+ default() {
257
+ return [];
258
+ }
259
+ },
247
260
  multiple: {
248
261
  type: Boolean,
249
262
  default: false
@@ -311,7 +324,8 @@ export default {
311
324
  loading: false,
312
325
  searchValue: '',
313
326
  expandedKeys: [],
314
- treeList: []
327
+ treeList: [],
328
+ checkedKeys: this.defaultCheckedKeys
315
329
  };
316
330
  },
317
331
  computed: {
@@ -337,6 +351,9 @@ export default {
337
351
  return false;
338
352
  }
339
353
  return this.remote;
354
+ },
355
+ defaultCheckeds() {
356
+ return [...this.defaultCheckedKeys, ...this.checkedKeys];
340
357
  }
341
358
  },
342
359
  watch: {
@@ -383,21 +400,31 @@ export default {
383
400
  .then((res) => {
384
401
  this.loading = false;
385
402
  if (res.rCode === 0) {
386
- this.treeList = JSON.parse(JSON.stringify(res.results));
403
+ let treeList = JSON.parse(JSON.stringify(res.results));
404
+ this.$emit('results', treeList);
387
405
  if (this.currentFirst) {
388
- let currentNode = this.treeList[0].id;
389
- this.$emit('current-first', this.treeList[0]);
390
- if (!this.currentNodeKey) {
406
+ let currentNode = treeList[0].id;
407
+ if (!this.currentNodeKey && this.currentNodeKey != 0) {
391
408
  this.$nextTick(() => {
392
409
  this.$refs.oaTree.setCurrentKey(currentNode);
393
410
  });
394
411
  }
395
412
  }
396
- this.expandedKeys = this.treeList.filter((item) => {
413
+ if (this.checkedFirst) {
414
+ let checkedNode = treeList[0].id;
415
+ if (
416
+ this.defaultCheckedKeys &&
417
+ this.defaultCheckedKeys.indexOf(checkedNode) == -1
418
+ ) {
419
+ this.checkedKeys = [checkedNode];
420
+ }
421
+ }
422
+ this.expandedKeys = treeList.filter((item) => {
397
423
  if (item.open) {
398
424
  return item.id;
399
425
  }
400
426
  });
427
+ this.treeList = treeList;
401
428
  }
402
429
  })
403
430
  .catch((err) => {
@@ -437,6 +464,7 @@ export default {
437
464
  if (res.rCode === 0) {
438
465
  this.loading = false;
439
466
  let results = JSON.parse(JSON.stringify(res.results));
467
+ this.$emit('sub-results', results);
440
468
  if (Array.isArray(results)) {
441
469
  if (data.id === results[0].id) {
442
470
  this.$set(data, 'children', results[0].children);
package/src/index.js CHANGED
@@ -115,7 +115,7 @@ if (typeof window !== 'undefined' && window.Vue) {
115
115
  }
116
116
 
117
117
  export default {
118
- version: '0.4.68',
118
+ version: '0.4.70',
119
119
  install,
120
120
  Button,
121
121
  ButtonGroup,