cnhis-design-vue 3.1.20-beta.1 → 3.1.20-beta.3

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.
@@ -178,7 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
178
178
  originY: endY.value,
179
179
  endY: endY.value
180
180
  };
181
- if (painIndex.value === 0) {
181
+ if (painIndex.value === 0 && left.yScaleValue.length > 1) {
182
182
  obj.originY = originYLimit.value;
183
183
  obj.endY = originYLimit.value + painHeight.value;
184
184
  } else if (painIndex.value === left.yScaleValue.length - 1) {
@@ -193,7 +193,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
193
193
  originY: originY.value,
194
194
  endY: endY.value
195
195
  };
196
- if (painIndex.value === 0) {
196
+ if (painIndex.value === 0 && left.yScaleValue.length > 1) {
197
197
  obj.originY = originYLimit.value + painHeight.value;
198
198
  obj.endY = endY.value;
199
199
  } else if (painIndex.value === left.yScaleValue.length - 1) {
@@ -458,7 +458,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
458
458
  pointTipProps.list = [getListValue(), `\u65F6\u95F4 ${((data == null ? void 0 : data.time) || getXValue(point.left)).slice(-5)}`];
459
459
  pointTipProps.show = true;
460
460
  function getListValue() {
461
- const { value, drugReduce, physicsReduce } = data;
461
+ const { value = getYValue(type, point.top), drugReduce, physicsReduce } = data || {};
462
462
  if (drugReduce) {
463
463
  return `\u836F\u7269\u964D${type == "pain" ? "\u75DB" : "\u6E29"} ${value}\u2014>${drugReduce}${unit || ""}`;
464
464
  }
@@ -51,16 +51,21 @@ function useCanvasEvent(canvas, propItems, emits) {
51
51
  top: topY + 1,
52
52
  height: propItems[`${item.key}Height`] - 1
53
53
  };
54
+ selections2.push(drawRect({
55
+ left: iconsWidth,
56
+ width: endX - iconsWidth,
57
+ ...commonOptions
58
+ }, item.key + "All"));
54
59
  selections2.push(drawRect({
55
60
  left: iconsWidth,
56
61
  width: originX - iconsWidth,
57
62
  ...commonOptions
58
- }, item.key));
63
+ }, item.key + "Title"));
59
64
  selections2.push(drawRect({
60
65
  left: originX,
61
66
  width: endX - originX,
62
67
  ...commonOptions
63
- }, item.key + "Title"));
68
+ }, item.key));
64
69
  });
65
70
  selections2.push(drawRect({
66
71
  left: originX,
@@ -17,6 +17,8 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
17
17
  itemList,
18
18
  painIndex,
19
19
  right,
20
+ canvasWidth,
21
+ canvasHeight,
20
22
  getRightInfo
21
23
  } = propItems;
22
24
  const mainScaleWidth = 9;
@@ -267,6 +269,16 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
267
269
  }
268
270
  });
269
271
  }
272
+ function drawBorder() {
273
+ canvas.value.add(new fabric.Rect({
274
+ left: iconsWidth,
275
+ top: 0,
276
+ width: canvasWidth - iconsWidth,
277
+ height: canvasHeight - 1,
278
+ fill: "transparent",
279
+ ...defaultBorderStyle
280
+ }));
281
+ }
270
282
  onMounted(() => {
271
283
  nextTick(() => {
272
284
  var _a;
@@ -275,9 +287,10 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
275
287
  if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "left") {
276
288
  yScaleValueList.push(getRightInfo);
277
289
  }
278
- painIndex == 0 && yScaleValueList.unshift(left.yScaleValue[painIndex]);
290
+ painIndex == 0 && left.yScaleValue.length > 1 && yScaleValueList.unshift(left.yScaleValue[painIndex]);
279
291
  painIndex == left.yScaleValue.length - 1 && yScaleValueList.push(left.yScaleValue[painIndex]);
280
292
  drawScaleValue(yScaleValueList);
293
+ drawBorder();
281
294
  canvas.value.renderAll();
282
295
  });
283
296
  });
@@ -4,6 +4,7 @@ import { defaultStyle } from './useDraw2.js';
4
4
 
5
5
  function useOther(canvas, propItems, cumputedX) {
6
6
  const { other, vitalSignsOriginY, xCellWidth, yCellHeight } = propItems;
7
+ let textDiff = 0;
7
8
  function drawOther() {
8
9
  if (!(other == null ? void 0 : other.list))
9
10
  return false;
@@ -71,8 +72,9 @@ function useOther(canvas, propItems, cumputedX) {
71
72
  group && canvas.value.add(group);
72
73
  function hasNode(x, y, currentLenght) {
73
74
  return list.find((v) => {
74
- const condition1 = y < v.top + v.trueHeight;
75
- const condition2 = y + currentLenght * yCellHeight < v.top + v.trueHeight;
75
+ const trueY = y + textDiff;
76
+ const condition1 = trueY < v.top + v.trueHeight;
77
+ const condition2 = trueY + currentLenght * yCellHeight < v.top + v.trueHeight;
76
78
  return v.left === x && (condition1 || condition2);
77
79
  });
78
80
  }
@@ -87,12 +89,13 @@ function useOther(canvas, propItems, cumputedX) {
87
89
  ...defaultStyle,
88
90
  ...v.style || {}
89
91
  });
92
+ textDiff = (yCellHeight - (text.height || 0)) / 2;
90
93
  texts.push(text);
91
94
  });
92
95
  return new fabric.Group(texts, {
93
96
  originX: "center",
94
97
  left: x,
95
- top: y,
98
+ top: y + textDiff,
96
99
  baseTop: v.baseTop,
97
100
  trueHeight: texts.length * yCellHeight
98
101
  });
@@ -70,6 +70,7 @@ function useFieldListAdaptor(collector) {
70
70
  const multiple = item2.multi_select === "0";
71
71
  Object.assign(schema2["x-component-props"], {
72
72
  multiple,
73
+ options: item2.option,
73
74
  maxTagCount: parseNumberFromMaybeString(item2.multi_select_value)
74
75
  });
75
76
  multiple && (schema2.type = "array");
@@ -83,8 +84,7 @@ function useFieldListAdaptor(collector) {
83
84
  }
84
85
  function bindUrlProps(schema2, item2) {
85
86
  Object.assign(schema2["x-component-props"], {
86
- ...pick(item2, ["lazyRequest", "urlConfig"]),
87
- options: item2.option
87
+ ...pick(item2, ["lazyRequest", "urlConfig"])
88
88
  });
89
89
  }
90
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.20-beta.1",
3
+ "version": "3.1.20-beta.3",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -66,5 +66,5 @@
66
66
  "iOS 7",
67
67
  "last 3 iOS versions"
68
68
  ],
69
- "gitHead": "2a197511d35c7dc055d301d16d929f9da1850e20"
69
+ "gitHead": "0036e68fe20366c90758a8afe964be6a201b61d1"
70
70
  }