cnhis-design-vue 2.1.61 → 2.1.62

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +49 -47
  4. package/es/big-table/style.css +1 -1
  5. package/es/button/index.js +2 -2
  6. package/es/captcha/index.js +3 -3
  7. package/es/checkbox/index.js +1 -1
  8. package/es/color-picker/index.js +1 -1
  9. package/es/drag-layout/index.js +3 -3
  10. package/es/editor/index.js +1 -1
  11. package/es/ellipsis/index.js +1 -1
  12. package/es/fabric-chart/index.js +269 -203
  13. package/es/form-table/index.js +20 -20
  14. package/es/index/index.js +472 -407
  15. package/es/index/style.css +1 -1
  16. package/es/input/index.js +1 -1
  17. package/es/map/index.js +1 -1
  18. package/es/multi-chat/index.js +25 -25
  19. package/es/multi-chat-client/index.js +19 -19
  20. package/es/multi-chat-history/index.js +4 -4
  21. package/es/multi-chat-record/index.js +4 -4
  22. package/es/multi-chat-setting/index.js +20 -20
  23. package/es/multi-chat-sip/index.js +1 -1
  24. package/es/radio/index.js +1 -1
  25. package/es/scale-container/index.js +1 -1
  26. package/es/scale-view/index.js +27 -27
  27. package/es/select/index.js +4 -4
  28. package/es/select-label/index.js +3 -3
  29. package/es/select-person/index.js +2 -2
  30. package/es/shortcut-setter/index.js +2 -2
  31. package/es/table-filter/index.js +48 -44
  32. package/es/table-filter/style.css +1 -1
  33. package/es/tag/index.js +1 -1
  34. package/es/verification-code/index.js +2 -2
  35. package/lib/cui.common.js +518 -457
  36. package/lib/cui.umd.js +518 -457
  37. package/lib/cui.umd.min.js +12 -12
  38. package/package.json +2 -2
  39. package/packages/big-table/src/BigTable.vue +4 -2
  40. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +19 -7
  41. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +11 -3
  42. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +29 -17
  43. package/packages/fabric-chart/src/mixins/draw.js +1 -1
  44. package/packages/fabric-chart/src/mixins/eventCommon.js +8 -2
  45. package/packages/fabric-chart/src/utils/bus.js +2 -0
  46. package/packages/table-filter/src/quick-search/QuickSearch.vue +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.1.61",
3
+ "version": "2.1.62",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -107,4 +107,4 @@
107
107
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
108
108
  }
109
109
  }
110
- }
110
+ }
@@ -2290,6 +2290,8 @@ export default create({
2290
2290
  if (this.isScanMultiTable || this.isInlineOperating) return false;
2291
2291
  if (vexutils.has(row, GROUP_TITLE_KEY)) return false;
2292
2292
  this.$emit('setNestTableClick', this.isNestTable);
2293
+ let table = this.$refs.xGrid;
2294
+ this.setTableCurrentRow(table, row, true)
2293
2295
  this.$emit('rowdblclick', row, column, true, true);
2294
2296
  },
2295
2297
  // 行单击
@@ -2585,8 +2587,8 @@ export default create({
2585
2587
  this.pubCheckChange(records);
2586
2588
  return true;
2587
2589
  },
2588
- setTableCurrentRow(table, row) {
2589
- if(!this.aboutPositionBtm) return
2590
+ setTableCurrentRow(table, row, isSet) {
2591
+ if(!this.aboutPositionBtm && !isSet) return
2590
2592
  setTimeout(() => {
2591
2593
  table.setCurrentRow(row);
2592
2594
  }, 30)
@@ -35,7 +35,6 @@ export default {
35
35
  },
36
36
  data() {
37
37
  return {
38
- isRightVisible: false,
39
38
  rightPos: { clientX: 0, clientY: 0 },
40
39
  rightClickNode: [],
41
40
  activeEvent: null, // 当前可右键活动的对象
@@ -178,12 +177,11 @@ export default {
178
177
  let x2 = this.cumputedX(item[1]);
179
178
  // 数字文字
180
179
  const textObj = item[3] || {};
181
- const textContent = textObj.content || '';
182
-
180
+ const { content: textContent, continue: isContinue } = textObj;
183
181
  // 左边手柄竖线
184
182
  let leftLine;
185
183
  if (x1 && x1 >= originX && x1 <= endX) {
186
- leftLine = await this.drawGroup(x1, x2, y1 + spaceHeight, y2 - spaceHeight, i, j, { position: 'left', customIcon: !endMinute ? true : false });
184
+ leftLine = await this.drawGroup(x1, x2, y1 + spaceHeight, y2 - spaceHeight, i, j, { position: 'left', customIcon: !endMinute && !isContinue ? true : false, isContinue });
187
185
  lineItemList.push(leftLine);
188
186
  } else if (x1 < originX) {
189
187
  x1 = originX;
@@ -348,7 +346,7 @@ export default {
348
346
  const id = '_lineGroup_' + Date.now();
349
347
  let point;
350
348
  let left;
351
- const { position, customIcon } = others;
349
+ const { position, customIcon, isContinue } = others;
352
350
  if (position === 'left') {
353
351
  point = [x1, y1, x1, y2];
354
352
  left = x1 - this.propItems.xCellWidth / 2;
@@ -357,6 +355,7 @@ export default {
357
355
  left = x2 - this.propItems.xCellWidth / 2;
358
356
  }
359
357
  let line;
358
+ let arrow;
360
359
  const common = {
361
360
  selectable: false,
362
361
  evented: false
@@ -385,6 +384,19 @@ export default {
385
384
  ...dataLineStyle,
386
385
  ...common
387
386
  });
387
+ arrow = isContinue
388
+ ? await this.ceateLineArrow({
389
+ left: x1,
390
+ top: y1 + (y2 - y1) / 2,
391
+ originY: 'center',
392
+ width: 14,
393
+ height: 5,
394
+ arrowwidth: 6,
395
+ arrowheight: 5,
396
+ ...dataLineStyle,
397
+ ...common
398
+ })
399
+ : null;
388
400
  }
389
401
  const rect = new this.fabric.Rect({
390
402
  width: this.propItems.xCellWidth,
@@ -396,7 +408,7 @@ export default {
396
408
  evented: false
397
409
  });
398
410
 
399
- return new this.fabric.Group([line, rect], {
411
+ return new this.fabric.Group([line, rect, ...(arrow ? [arrow] : [])], {
400
412
  selectable: true,
401
413
  evented: true,
402
414
  originX: 'center',
@@ -554,7 +566,7 @@ export default {
554
566
  v = left + (centerLine.width / 2) * (line.line2 ? -1 : 1);
555
567
  originX = 'center';
556
568
  } else {
557
- v = this.textMarginLeft + (centerLine ? centerLine.x2 : left);
569
+ v = this.textMarginLeft + (centerLine ? centerLine.x2 : left + 3);
558
570
  originX = 'left';
559
571
  // 移动到最右边界时候文字超出当前线段可拖动的右边界的情况
560
572
  if (line.textLimitRight && v + limitWidth > line.textLimitRight) {
@@ -13,6 +13,7 @@ import eventCommon from '../mixins/eventCommon';
13
13
  import MouseRightClick from '../components/MouseRightClick';
14
14
  import DropPopup from '../components/DropPopup';
15
15
  import defaultVaule from '../const/defaultVaule';
16
+ import Bus from '../utils/bus';
16
17
 
17
18
  /**
18
19
  * @description: 递归遍历节点,设置颜色属性
@@ -75,7 +76,6 @@ export default {
75
76
  isDropVisible: false,
76
77
  dropVal: {},
77
78
  dropPos: { clientX: 0, clientY: 0 },
78
- isRightVisible: false,
79
79
  rightPos: { clientX: 0, clientY: 0 },
80
80
  rightClickNode: [],
81
81
  activeEvent: null, // 当前可右键活动的对象
@@ -84,7 +84,8 @@ export default {
84
84
  isSelectArea: false, // 是否正在选区
85
85
  selectArea: null, // 选区矩形对象
86
86
  currentDelPoint: null, // 缓存当前可批量删除的项目线段上的点
87
- polylinePointList: [] // 缓存折线项目节点
87
+ polylinePointList: [], // 缓存折线项目节点
88
+ isMovingToOtherTarget: false
88
89
  };
89
90
  },
90
91
  computed: {
@@ -102,7 +103,12 @@ export default {
102
103
 
103
104
  watch: {},
104
105
 
105
- mounted() {},
106
+ mounted() {
107
+ Bus.$on('mouseoverTarget', isMovingToOtherTarget => {
108
+ this.isMovingToOtherTarget = isMovingToOtherTarget;
109
+ if (isMovingToOtherTarget) this.isDropVisible = false;
110
+ });
111
+ },
106
112
 
107
113
  methods: {
108
114
  init() {
@@ -150,6 +156,8 @@ export default {
150
156
  });
151
157
  },
152
158
  handleMoving(event) {
159
+ // 如果移动到其他节点如气血分析、标记位节点上时需要隐藏折线组件中的提示弹框
160
+ if (this.isMovingToOtherTarget) return;
153
161
  const { pointer } = event;
154
162
  const { x, y } = pointer;
155
163
  this.dropPointer = { ...pointer };
@@ -12,6 +12,7 @@ import defaultVaule from '../const/defaultVaule';
12
12
  import DropPopup from '../components/DropPopup';
13
13
  import MouseRightClick from '../components/MouseRightClick';
14
14
  import eventCommon from '../mixins/eventCommon';
15
+ import Bus from '../utils/bus';
15
16
 
16
17
  const rightClickNode = [
17
18
  { name: '修改', type: 'edit' },
@@ -55,6 +56,11 @@ export default {
55
56
  }
56
57
  },
57
58
  deep: true
59
+ },
60
+ isRightVisible: {
61
+ handler(value) {
62
+ Bus.$emit('mouseoverTarget', value);
63
+ }
58
64
  }
59
65
  },
60
66
  data() {
@@ -63,7 +69,6 @@ export default {
63
69
  isDropVisible: false,
64
70
  dropVal: {},
65
71
  dropPos: { clientX: 0, clientY: 0 },
66
- isRightVisible: false,
67
72
  rightPos: { clientX: 0, clientY: 0 },
68
73
  rightClickNode: [],
69
74
  activeEvent: null // 当前可右键活动的对象
@@ -276,33 +281,39 @@ export default {
276
281
  for (let i = 0, len = dataList.length; i < len; i++) {
277
282
  const v = dataList[i];
278
283
  if (this.isLimit(v.time)) {
284
+ const commonOptions = {
285
+ originY: 'center',
286
+ top,
287
+ dataIndex: index,
288
+ index: i,
289
+ type: 'list'
290
+ };
279
291
  const icon = await this.createPoint(_icon.type, {
292
+ originX: 'center',
280
293
  left: this.cumputedX(v.time),
281
- top,
282
- originY: 'center',
283
294
  ...item.style,
284
295
  ...(item.style ? { stroke: item.style.fill } : {}),
285
296
  ...(_icon.style || {}),
286
- lockMovementX: true,
287
- lockMovementY: true,
288
- ...this.eventStyle
297
+ ...commonOptions
289
298
  });
290
299
  const text = new this.fabric.Text(String(v.value), {
291
300
  ...defaultVaule.style,
292
301
  ...defaultVaule.textStyle,
293
302
  ...item.style,
294
- originY: 'center',
295
- left: icon.left + icon.width,
296
- top,
297
- dataIndex: index,
298
- index: i,
299
- type: 'list',
303
+ left: icon.left + icon.width / 2,
304
+ name: v.value,
305
+ ...commonOptions
306
+ });
307
+ const groupObj = new this.fabric.Group([icon, text], {
300
308
  id: `${index}_${i}_other_${Date.now()}`,
301
- name: v.value
309
+ lockMovementX: true,
310
+ lockMovementY: true,
311
+ ...commonOptions,
312
+ ...this.eventStyle
302
313
  });
303
- icon.hasControls = icon.hasBorders = false;
304
- this.setPopup(icon);
305
- textList.push(icon, text);
314
+ groupObj.hasControls = groupObj.hasBorders = false;
315
+ this.setPopup(groupObj);
316
+ textList.push(groupObj);
306
317
  }
307
318
  }
308
319
  }
@@ -310,9 +321,11 @@ export default {
310
321
  },
311
322
  setPopup(point) {
312
323
  point.on('mouseover', () => {
324
+ Bus.$emit('mouseoverTarget', true);
313
325
  this.showDrapPopup(point, true);
314
326
  });
315
327
  point.on('mouseout', () => {
328
+ !this.isRightVisible && Bus.$emit('mouseoverTarget', false);
316
329
  this.isDropVisible = false;
317
330
  });
318
331
  },
@@ -527,7 +540,6 @@ export default {
527
540
  }
528
541
  },
529
542
  showDrapPopup(point) {
530
- // 第二个参数表示需要展示提供的viewTime时间
531
543
  this.isDropVisible = true;
532
544
  this.dropPos = {
533
545
  left: point.left,
@@ -201,7 +201,7 @@ export default {
201
201
  stroke: data.stroke,
202
202
  originX: 'center',
203
203
  originY: 'center',
204
- left: data.left + data.width - data.arrowwidth,
204
+ left: data.left + data.width - data.arrowwidth + 1,
205
205
  top: data.top,
206
206
  angle: 270
207
207
  });
@@ -6,13 +6,14 @@ export default {
6
6
  x: 0,
7
7
  y: 0
8
8
  },
9
- dropTimer: null
9
+ dropTimer: null,
10
+ isRightVisible: false
10
11
  };
11
12
  },
12
13
  watch: {
13
14
  dropPointer: {
14
15
  handler(value) {
15
- if (value) {
16
+ if (value && !this.isMovingToOtherTarget && !this.isRightVisible) {
16
17
  this.isDropVisible = true;
17
18
  clearTimeout(this.dropTimer);
18
19
  this.dropTimer = setTimeout(() => {
@@ -21,6 +22,11 @@ export default {
21
22
  }
22
23
  },
23
24
  deep: true
25
+ },
26
+ isRightVisible: {
27
+ handler(value) {
28
+ if (value) this.isDropVisible = false;
29
+ }
24
30
  }
25
31
  },
26
32
  mounted() {
@@ -0,0 +1,2 @@
1
+ import Vue from 'vue';
2
+ export default new Vue();
@@ -1390,7 +1390,11 @@ export default create({
1390
1390
  value = cval.join("|#|");
1391
1391
  }
1392
1392
  } else {
1393
- value = optionSetting0? item.value : item.value.join("|#|");
1393
+ value = item.value
1394
+ // 多选有时候数据类型是string join会报错
1395
+ if (item.value && Array.isArray(item.value) && !optionSetting0) {
1396
+ value = item.value.join("|#|");
1397
+ }
1394
1398
  }
1395
1399
  } else if (vexutils.anyNotEmpty(item.CONVERT) && Array.isArray(item.CONVERT)) {
1396
1400
  value = item.CONVERT.map(item => {