cnhis-design-vue 3.1.13-beta.1 → 3.1.13-beta.4

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 (61) hide show
  1. package/es/packages/big-table/src/BigTable.vue.d.ts +6 -16
  2. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +1 -1
  3. package/es/packages/big-table/style/index.css +5 -0
  4. package/es/packages/fabric-chart/src/hooks/useCenter.js +56 -10
  5. package/es/packages/fabric-chart/src/hooks/useDraw.d.ts +1 -1
  6. package/es/packages/fabric-chart/src/hooks/useDraw.js +70 -7
  7. package/es/packages/fabric-chart/src/hooks/useTop.js +6 -4
  8. package/es/packages/fabric-chart/src/interface.d.ts +1 -0
  9. package/es/packages/form-render/index.d.ts +9 -0
  10. package/es/packages/form-render/src/FormRender.vue.d.ts +9 -0
  11. package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.js +2 -1
  12. package/es/packages/form-render/src/components/renderer/formItem.d.ts +8 -293
  13. package/es/packages/form-render/src/components/renderer/formItem.js +135 -2
  14. package/es/packages/form-render/src/components/renderer/input.js +3 -3
  15. package/es/packages/form-render/src/components/renderer/simpleComponent.js +2 -15
  16. package/es/packages/form-render/src/constants/index.d.ts +2 -1
  17. package/es/packages/form-render/src/constants/index.js +2 -1
  18. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +3 -1
  19. package/es/packages/form-render/src/hooks/useFormContext.d.ts +2 -1
  20. package/es/packages/form-render/src/hooks/useFormContext.js +13 -2
  21. package/es/packages/form-render/src/utils/index.d.ts +5 -2
  22. package/es/packages/form-render/src/utils/index.js +16 -2
  23. package/es/packages/form-render/style/index.css +23 -0
  24. package/es/packages/index.css +39 -0
  25. package/es/packages/index.d.ts +4 -1
  26. package/es/packages/index.js +9 -1
  27. package/es/packages/scale-view/src/hooks/scaleview-init.js +1 -5
  28. package/es/packages/scale-view/src/hooks/scaleview-submit.js +1 -6
  29. package/es/packages/scale-view/src/hooks/scaleview-validate.js +0 -3
  30. package/es/packages/shortcut-provider/index.d.ts +17 -0
  31. package/es/packages/shortcut-provider/index.js +13 -0
  32. package/es/packages/shortcut-provider/src/ShortcutProvider.js +4 -0
  33. package/es/packages/shortcut-provider/src/ShortcutProvider.vue.d.ts +15 -0
  34. package/es/packages/shortcut-provider/src/ShortcutProvider.vue_vue_type_script_setup_true_lang.js +32 -0
  35. package/es/packages/shortcut-provider/src/constants/index.d.ts +7 -0
  36. package/es/packages/shortcut-provider/src/constants/index.js +8 -0
  37. package/es/packages/shortcut-provider/src/hooks/index.d.ts +2 -0
  38. package/es/packages/shortcut-provider/src/hooks/index.js +2 -0
  39. package/es/packages/shortcut-provider/src/hooks/useShortcutSignature.d.ts +4 -0
  40. package/es/packages/shortcut-provider/src/hooks/useShortcutSignature.js +12 -0
  41. package/es/packages/shortcut-provider/src/hooks/useShortcuts.d.ts +30 -0
  42. package/es/packages/shortcut-provider/src/hooks/useShortcuts.js +157 -0
  43. package/es/packages/shortcut-provider/src/types/index.d.ts +30 -0
  44. package/es/packages/shortcut-provider/src/types/index.js +1 -0
  45. package/es/packages/shortcut-provider/src/utils/index.d.ts +7 -0
  46. package/es/packages/shortcut-provider/src/utils/index.js +49 -0
  47. package/es/packages/shortcut-provider/style/index.css +3 -0
  48. package/es/packages/shortcut-setter/constant/index.d.ts +4 -0
  49. package/es/packages/shortcut-setter/constant/index.js +7 -0
  50. package/es/packages/shortcut-setter/index.d.ts +4258 -0
  51. package/es/packages/shortcut-setter/index.js +11 -0
  52. package/es/packages/shortcut-setter/src/ShortcutSetter.js +4 -0
  53. package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +4258 -0
  54. package/es/packages/shortcut-setter/src/ShortcutSetter.vue_vue_type_script_setup_true_lang.js +38 -0
  55. package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +4 -0
  56. package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +4238 -0
  57. package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue_vue_type_script_setup_true_lang.js +125 -0
  58. package/es/packages/shortcut-setter/style/index.css +8 -0
  59. package/es/src/types/index.d.ts +1 -0
  60. package/package.json +1 -1
  61. package/test.ts +0 -326
@@ -1115,14 +1115,6 @@ declare const _default: import("vue").DefineComponent<{
1115
1115
  textColorTextDisabledWarning: string;
1116
1116
  textColorGhostWarning: string;
1117
1117
  textColorGhostHoverWarning: string;
1118
- /**
1119
- * 初始化props
1120
- * @param {*} unionItem
1121
- * @param {*} row
1122
- * @param {*} column
1123
- * @param {*} $rowIndex
1124
- * @returns
1125
- */
1126
1118
  textColorGhostPressedWarning: string;
1127
1119
  textColorGhostFocusWarning: string;
1128
1120
  textColorGhostDisabledWarning: string;
@@ -1181,7 +1173,10 @@ declare const _default: import("vue").DefineComponent<{
1181
1173
  }, any>>;
1182
1174
  readonly themeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Button", {
1183
1175
  heightTiny: string;
1184
- heightSmall: string;
1176
+ heightSmall: string; /**
1177
+ * 单个form提交失败
1178
+ * @param {*} obj
1179
+ */
1185
1180
  heightMedium: string;
1186
1181
  heightLarge: string;
1187
1182
  borderRadiusTiny: string;
@@ -1192,10 +1187,7 @@ declare const _default: import("vue").DefineComponent<{
1192
1187
  fontSizeSmall: string;
1193
1188
  fontSizeMedium: string;
1194
1189
  fontSizeLarge: string;
1195
- opacityDisabled: string; /**
1196
- * 避免每次点击都查询
1197
- * 初始化查一次 行编辑 表单search用
1198
- */
1190
+ opacityDisabled: string;
1199
1191
  colorOpacitySecondary: string;
1200
1192
  colorOpacitySecondaryHover: string;
1201
1193
  colorOpacitySecondaryPressed: string;
@@ -1218,9 +1210,7 @@ declare const _default: import("vue").DefineComponent<{
1218
1210
  textColorHover: string;
1219
1211
  textColorPressed: string;
1220
1212
  textColorFocus: string;
1221
- textColorDisabled: string; /**
1222
- * tsx渲染表格
1223
- */
1213
+ textColorDisabled: string;
1224
1214
  textColorText: string;
1225
1215
  textColorTextHover: string;
1226
1216
  textColorTextPressed: string;
@@ -349,7 +349,7 @@ var script = /* @__PURE__ */ defineComponent({
349
349
  state.editConfig = Object.assign(state.editConfig, editConfig);
350
350
  state.rowConfig.height = 48;
351
351
  }
352
- state.rowConfig.height = Object.assign(state.rowConfig.height, rowConfig);
352
+ state.rowConfig = Object.assign(state.rowConfig, rowConfig);
353
353
  state.rowConfig.keyField = handleRowId.value;
354
354
  if (selectType) {
355
355
  isBatchSelect = 1;
@@ -249,6 +249,11 @@ body > .vxe-table--tooltip-wrapper {
249
249
  height: 100%;
250
250
  line-height: unset;
251
251
  width: 100%;
252
+ display: inline-flex;
253
+ }
254
+ .custom-big-table .vxe-table .vxe-table--header .col--seq .vxe-cell--title,
255
+ .custom-big-table .vxe-table .vxe-table--header .col--checkbox .vxe-cell--title {
256
+ display: inline-block;
252
257
  }
253
258
  .custom-big-table .vxe-table .vxe-table--footer-wrapper.body--wrapper::-webkit-scrollbar,
254
259
  .custom-big-table .vxe-table .vxe-table--body-wrapper::-webkit-scrollbar {
@@ -1,6 +1,6 @@
1
1
  import { reactive, onMounted, nextTick } from 'vue';
2
2
  import { fabric } from '../utils/index.js';
3
- import { defaultStyle, drawLine, drawPoint, defaultTextStyle } from './useDraw.js';
3
+ import { defaultStyle, drawPoint, drawLine, defaultTextStyle } from './useDraw.js';
4
4
  import useGrid from './useGrid.js';
5
5
  import { useShadow } from './useShadow.js';
6
6
  import { TEMPERATURE_MENU, PAIN_MENU } from './constant.js';
@@ -36,6 +36,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
36
36
  target: null
37
37
  });
38
38
  const shadowLinesCache = /* @__PURE__ */ new Set();
39
+ const maiboPoints = /* @__PURE__ */ new Set();
40
+ const otherPoints = /* @__PURE__ */ new Set();
39
41
  onMounted(() => {
40
42
  nextTick(() => {
41
43
  init();
@@ -48,6 +50,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
48
50
  drawPolyLine(item, dataIndex, scaleValue);
49
51
  });
50
52
  });
53
+ drawOverlapPoint();
51
54
  setCanvasEvent();
52
55
  }
53
56
  function drawShaDow(target) {
@@ -95,13 +98,15 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
95
98
  if (itemPrev && points1.length === 1) {
96
99
  const point = getPoint(itemPrev);
97
100
  points1.unshift(point);
98
- points2.unshift(point);
99
101
  }
100
- const pointNext = getPoint(itemNext);
101
- const pointNext2 = itemNext2 ? getPoint(itemNext2) : null;
102
- if (itemNext && pointNext2 && pointNext.x === pointNext2.x && pointNext.y === pointNext2.y) {
103
- points1.push(pointNext);
104
- points2.push(pointNext);
102
+ if (itemNext && itemNext2) {
103
+ const pointNext = getPoint(itemNext);
104
+ const pointNext2 = getPoint(itemNext2);
105
+ if (pointNext.x === pointNext2.x && pointNext.y === pointNext2.y) {
106
+ points1.push(pointNext);
107
+ }
108
+ } else {
109
+ data.push({ points1, points2 });
105
110
  }
106
111
  } else {
107
112
  if (points1.length && points2.length) {
@@ -116,8 +121,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
116
121
  const newData = data.reduce((pre, cur) => {
117
122
  const arr1 = cur.points1.map((v) => [v.x, v.y]);
118
123
  const arr2 = cur.points2.map((v) => [v.x, v.y]);
119
- const [, ...newArr2] = arr2;
120
- return pre.concat([[...arr1, ...newArr2.reverse()]]);
124
+ return pre.concat([[...arr1, ...arr2.reverse()]]);
121
125
  }, []);
122
126
  const { createShadowLines } = useShadow();
123
127
  newData.forEach((item) => {
@@ -180,13 +184,49 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
180
184
  }
181
185
  function getEqualXTypes(pointX) {
182
186
  const types = [];
187
+ const left2 = cumputedX(getXValue(pointX));
183
188
  canvas.value.forEachObject((obj) => {
184
- if (obj.origin && cumputedX(getXValue(pointX)) === obj.left) {
189
+ if (obj.origin && left2 === obj.left) {
185
190
  types.push(obj.origin.type);
186
191
  }
187
192
  });
188
193
  return [...new Set(types)];
189
194
  }
195
+ function drawOverlapPoint() {
196
+ var _a;
197
+ const pulseObj = left.yScaleValue.find((item) => item.type === "pulse");
198
+ if (!pulseObj || !((_a = pulseObj.dataList) == null ? void 0 : _a.length))
199
+ return;
200
+ if (!pulseObj.dataList.some((item) => item.title.includes("\u8109\u640F")))
201
+ return;
202
+ const overlap = left.overlap || {};
203
+ maiboPoints.size && [...maiboPoints].forEach((item) => {
204
+ [...otherPoints].forEach((obj) => {
205
+ if (obj.origin && item.left === obj.left && item.top === obj.top) {
206
+ const key = obj.origin.key;
207
+ if (key) {
208
+ console.log(333, key);
209
+ const pointer = {
210
+ left: obj.left,
211
+ top: obj.top,
212
+ defaultStyle
213
+ };
214
+ let type = "koumai";
215
+ if (key === "yemai") {
216
+ type = key;
217
+ }
218
+ if (key === "humai") {
219
+ type = "circle";
220
+ }
221
+ drawPoint(type, {
222
+ ...overlap[key] || {},
223
+ ...pointer
224
+ });
225
+ }
226
+ }
227
+ });
228
+ });
229
+ }
190
230
  function drawPolyLine(item, dataIndex, scaleValue) {
191
231
  const {
192
232
  pointAttr = {},
@@ -289,6 +329,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
289
329
  origin: {
290
330
  data: v,
291
331
  title: item.title,
332
+ key: item.key || "",
292
333
  unit: scaleValue.unit,
293
334
  type: scaleValue.type,
294
335
  dataIndex,
@@ -322,6 +363,11 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
322
363
  }
323
364
  lineList.push(line);
324
365
  if (point) {
366
+ if (item.title.includes("\u8109\u640F")) {
367
+ maiboPoints.add(point);
368
+ } else {
369
+ otherPoints.add(point);
370
+ }
325
371
  setPointEvent(point);
326
372
  pointList.push(point);
327
373
  }
@@ -39,4 +39,4 @@ export declare const defaultTextStyle: {
39
39
  };
40
40
  export declare function drawLine(points: number[], style: Partial<ILineOptions>): fabric.Line;
41
41
  export declare function drawTextGroup(rectStyle: Partial<fabric.IRectOptions>, fontStyle: Partial<ITextOptions>, groupStyle: Partial<fabric.IGroupOptions>): fabric.Group;
42
- export declare function drawPoint(type: string | undefined, style: any): fabric.Circle | fabric.Triangle;
42
+ export declare function drawPoint(type: string | undefined, style: any): fabric.Object;
@@ -46,14 +46,17 @@ function drawTextGroup(rectStyle, fontStyle, groupStyle) {
46
46
  });
47
47
  const texts = new fabric.Text(String(fontStyle.value), {
48
48
  ...defaultTextStyle,
49
- ...fontStyle
49
+ ...fontStyle,
50
+ ...fontStyle.textAlign == "left" ? {
51
+ originX: "left",
52
+ left: -(rectStyle.width / 2)
53
+ } : {}
50
54
  });
51
55
  return new fabric.Group([rect, texts], {
52
56
  ...groupStyle
53
57
  });
54
58
  }
55
59
  function drawPoint(type = "circle", style) {
56
- let point = null;
57
60
  const newStyle = {
58
61
  originX: "center",
59
62
  originY: "center",
@@ -61,27 +64,87 @@ function drawPoint(type = "circle", style) {
61
64
  hasBorders: false,
62
65
  ...style
63
66
  };
67
+ const createCircleBorder = (data) => {
68
+ return new fabric.Circle({
69
+ objectCaching: false,
70
+ strokeWidth: 1,
71
+ radius: 5,
72
+ scale: 1,
73
+ fill: "#fff",
74
+ ...data
75
+ });
76
+ };
64
77
  switch (type) {
65
78
  case "triangle":
66
- point = new fabric.Triangle({
79
+ return new fabric.Triangle({
67
80
  width: 20,
68
81
  height: 20,
69
82
  strokeWidth: 1,
70
83
  scale: 1,
71
84
  ...newStyle
72
85
  });
73
- break;
74
86
  case "circle":
75
- point = new fabric.Circle({
87
+ return new fabric.Circle({
76
88
  objectCaching: false,
77
89
  strokeWidth: 1,
78
90
  radius: 5,
79
91
  scale: 1,
80
92
  ...newStyle
81
93
  });
82
- break;
94
+ case "image":
95
+ if (style == null ? void 0 : style.url) ; else {
96
+ return new fabric.Image(style.element, {
97
+ ...newStyle,
98
+ scale: 1
99
+ });
100
+ }
101
+ case "yemai":
102
+ const createAdd = (data) => {
103
+ const width = (data.radius || 5) * 2;
104
+ const line1 = new fabric.Line([0, width / 2, width, width / 2], {
105
+ ...data,
106
+ stroke: data.strokeX,
107
+ strokeWidth: data.strokeWidth,
108
+ angle: 0
109
+ });
110
+ const line2 = new fabric.Line([width / 2, 0, width / 2, width], {
111
+ ...data,
112
+ angle: 0
113
+ });
114
+ return new fabric.Group([line1, line2], {
115
+ scale: 1,
116
+ ...data
117
+ });
118
+ };
119
+ return new fabric.Group([createCircleBorder(style), createAdd(style)], {
120
+ scale: 1,
121
+ ...style,
122
+ angle: 0
123
+ });
124
+ case "koumai":
125
+ const circle = new fabric.Circle({
126
+ objectCaching: false,
127
+ radius: style.radiusCircle || 2,
128
+ fill: style.fillCircle || "#000",
129
+ originX: "center",
130
+ originY: "center",
131
+ left: style.left,
132
+ top: style.top
133
+ });
134
+ return new fabric.Group([createCircleBorder(style), circle], {
135
+ scale: 1,
136
+ ...style
137
+ });
138
+ default:
139
+ style && Reflect.deleteProperty(style, "stroke");
140
+ return new fabric.Text(String(type), {
141
+ fontFamily: "\u5FAE\u8F6F\u96C5\u9ED1",
142
+ scale: 1,
143
+ fontSize: 14,
144
+ fill: "#000",
145
+ ...newStyle
146
+ });
83
147
  }
84
- return point;
85
148
  }
86
149
 
87
150
  export { defaultBorderStyle, defaultLineStyle, defaultRectStyle, defaultStyle, defaultTextStyle, drawLine, drawPoint, drawTextGroup };
@@ -35,7 +35,7 @@ function useTop(canvas, propItems) {
35
35
  }
36
36
  if (item.key == "xScalevalue") {
37
37
  drawDay(list, topY);
38
- drawTime(list, topY);
38
+ drawTime(item, list, topY);
39
39
  } else {
40
40
  propItems[`${item.key}Height`] && drawDate(item, list, topY);
41
41
  }
@@ -44,7 +44,7 @@ function useTop(canvas, propItems) {
44
44
  group && group.sendToBack();
45
45
  group && canvas.value.add(group);
46
46
  }
47
- function drawTime(list, topY) {
47
+ function drawTime(item, list, topY) {
48
48
  var _a;
49
49
  const dayHeight = top.xScalevalue.show ? top.dayHeight || 0 : 0;
50
50
  const height = xScalevalueHeight - dayHeight;
@@ -55,7 +55,8 @@ function useTop(canvas, propItems) {
55
55
  }, {
56
56
  value: top.xScalevalue.title,
57
57
  ...defaultTextStyle,
58
- ...((_a = top.date) == null ? void 0 : _a.style) || {}
58
+ ...((_a = top.date) == null ? void 0 : _a.style) || {},
59
+ ...item.titleStyle || {}
59
60
  }, {
60
61
  left: iconsWidth,
61
62
  top: topY
@@ -115,7 +116,8 @@ function useTop(canvas, propItems) {
115
116
  }, {
116
117
  value: item.title,
117
118
  ...defaultTextStyle,
118
- ...(item == null ? void 0 : item.style) || {}
119
+ ...(item == null ? void 0 : item.style) || {},
120
+ ...item.titleStyle || {}
119
121
  }, {
120
122
  left: iconsWidth,
121
123
  top: topY
@@ -80,6 +80,7 @@ export interface ITop {
80
80
  operationDays?: IDate;
81
81
  }
82
82
  interface ILeft {
83
+ overlap?: any;
83
84
  spaceGridNumber?: number;
84
85
  yScaleValue: Array<any>;
85
86
  icons?: any;
@@ -99,6 +99,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
99
99
  type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
100
100
  default: () => {};
101
101
  };
102
+ annotation: {
103
+ type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
104
+ };
102
105
  consumer: {
103
106
  type: BooleanConstructor;
104
107
  default: boolean;
@@ -204,6 +207,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
204
207
  type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
205
208
  default: () => {};
206
209
  };
210
+ annotation: {
211
+ type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
212
+ };
207
213
  consumer: {
208
214
  type: BooleanConstructor;
209
215
  default: boolean;
@@ -1396,6 +1402,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
1396
1402
  type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
1397
1403
  default: () => {};
1398
1404
  };
1405
+ annotation: {
1406
+ type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
1407
+ };
1399
1408
  consumer: {
1400
1409
  type: BooleanConstructor;
1401
1410
  default: boolean;
@@ -99,6 +99,9 @@ declare const _default: import("vue").DefineComponent<{
99
99
  type: PropType<AnyObject>;
100
100
  default: () => {};
101
101
  };
102
+ annotation: {
103
+ type: PropType<AnyObject>;
104
+ };
102
105
  consumer: {
103
106
  type: BooleanConstructor;
104
107
  default: boolean;
@@ -204,6 +207,9 @@ declare const _default: import("vue").DefineComponent<{
204
207
  type: PropType<AnyObject>;
205
208
  default: () => {};
206
209
  };
210
+ annotation: {
211
+ type: PropType<AnyObject>;
212
+ };
207
213
  consumer: {
208
214
  type: BooleanConstructor;
209
215
  default: boolean;
@@ -1396,6 +1402,9 @@ declare const _default: import("vue").DefineComponent<{
1396
1402
  type: PropType<AnyObject>;
1397
1403
  default: () => {};
1398
1404
  };
1405
+ annotation: {
1406
+ type: PropType<AnyObject>;
1407
+ };
1399
1408
  consumer: {
1400
1409
  type: BooleanConstructor;
1401
1410
  default: boolean;
@@ -31,6 +31,7 @@ var script = /* @__PURE__ */ defineComponent({
31
31
  },
32
32
  businessFilter: { type: Function },
33
33
  scope: { type: Object, default: () => ({}) },
34
+ annotation: { type: Object },
34
35
  consumer: { type: Boolean, default: false },
35
36
  uuid: { type: String }
36
37
  },
@@ -104,7 +105,7 @@ var script = /* @__PURE__ */ defineComponent({
104
105
  }
105
106
  });
106
107
  return (_ctx, _cache) => {
107
- return openBlock(), createBlock(unref(NForm), null, {
108
+ return openBlock(), createBlock(unref(NForm), { class: "form-render" }, {
108
109
  default: withCtx(() => [
109
110
  __props.anchor ? (openBlock(), createElementBlock("section", _hoisted_1, [
110
111
  createVNode(unref(NTabs), {