cnhis-design-vue 3.1.17-beta.10 → 3.1.17-beta.11

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 (28) hide show
  1. package/es/components/big-table/index.d.ts +0 -8
  2. package/es/components/big-table/src/BigTable.vue.d.ts +6 -37
  3. package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +2 -4
  4. package/es/components/big-table/src/components/edit-form/edit-date.js +10 -1
  5. package/es/components/big-table/src/components/edit-form/edit-input.js +10 -2
  6. package/es/components/big-table/src/components/edit-form/edit-select.d.ts +1 -1
  7. package/es/components/big-table/src/components/edit-form/edit-select.js +11 -2
  8. package/es/components/big-table/src/components/edit-form/edit-time.js +10 -1
  9. package/es/components/big-table/src/components/edit-form/useCommon.d.ts +4 -0
  10. package/es/components/big-table/src/components/edit-form/useCommon.js +19 -0
  11. package/es/components/big-table/src/hooks/useEdit.d.ts +1 -7
  12. package/es/components/big-table/src/hooks/useEdit.js +0 -20
  13. package/es/components/big-table/style/index.css +6 -0
  14. package/es/components/button-print/index.d.ts +9 -0
  15. package/es/components/button-print/src/ButtonPrint.vue.d.ts +9 -0
  16. package/es/components/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +19 -11
  17. package/es/components/fabric-chart/src/hooks/useCenter.js +7 -12
  18. package/es/components/fabric-chart/src/hooks/useLeft.js +12 -9
  19. package/es/components/field-set/index.d.ts +24 -26
  20. package/es/components/field-set/src/FieldSet.js +132 -54
  21. package/es/components/field-set/src/FieldSet.vue.d.ts +20 -26
  22. package/es/components/field-set/style/index.css +5 -5
  23. package/es/components/index.css +11 -5
  24. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -1
  25. package/es/components/select-label/index.d.ts +2 -2
  26. package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -1
  27. package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
  28. package/package.json +2 -12
@@ -2845,15 +2845,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
2845
2845
  row: any;
2846
2846
  rowIndex: any;
2847
2847
  };
2848
- initEditTable: () => Promise<void>;
2849
- activeMethod: ({ row, rowIndex, column, columnIndex }: {
2850
- row: any;
2851
- rowIndex: number;
2852
- column: any;
2853
- columnIndex: number;
2854
- }) => boolean;
2855
2848
  deleteRow: (row: any, col: any, index: number) => void;
2856
- onClickSelectTable: (row: any) => Promise<void>;
2857
2849
  onFormChange: ({ value, row, column, index }: {
2858
2850
  value: string | number | null;
2859
2851
  row: any;
@@ -1153,14 +1153,7 @@ declare const _default: import("vue").DefineComponent<{
1153
1153
  textColorGhostPressedError: string;
1154
1154
  textColorGhostFocusError: string;
1155
1155
  textColorGhostDisabledError: string;
1156
- borderError: string; /**
1157
- * 初始化props
1158
- * @param {*} unionItem
1159
- * @param {*} row
1160
- * @param {*} column
1161
- * @param {*} $rowIndex
1162
- * @returns
1163
- */
1156
+ borderError: string;
1164
1157
  borderHoverError: string;
1165
1158
  borderPressedError: string;
1166
1159
  borderFocusError: string;
@@ -1212,10 +1205,6 @@ declare const _default: import("vue").DefineComponent<{
1212
1205
  colorTertiaryPressed: string;
1213
1206
  colorQuaternary: string;
1214
1207
  colorQuaternaryHover: string;
1215
- /**
1216
- * 单个form提交成功数据
1217
- * @param {*} obj formData
1218
- */
1219
1208
  colorQuaternaryPressed: string;
1220
1209
  color: string;
1221
1210
  colorHover: string;
@@ -1258,7 +1247,9 @@ declare const _default: import("vue").DefineComponent<{
1258
1247
  textColorTextHoverPrimary: string;
1259
1248
  textColorTextPressedPrimary: string;
1260
1249
  textColorTextFocusPrimary: string;
1261
- textColorTextDisabledPrimary: string;
1250
+ textColorTextDisabledPrimary: string; /**
1251
+ * tsx渲染表格
1252
+ */
1262
1253
  textColorGhostPrimary: string;
1263
1254
  textColorGhostHoverPrimary: string;
1264
1255
  textColorGhostPressedPrimary: string;
@@ -1337,6 +1328,7 @@ declare const _default: import("vue").DefineComponent<{
1337
1328
  textColorTextPressedWarning: string;
1338
1329
  textColorTextFocusWarning: string;
1339
1330
  textColorTextDisabledWarning: string;
1331
+ /** string */
1340
1332
  textColorGhostWarning: string;
1341
1333
  textColorGhostHoverWarning: string;
1342
1334
  textColorGhostPressedWarning: string;
@@ -2855,15 +2847,7 @@ declare const _default: import("vue").DefineComponent<{
2855
2847
  row: any;
2856
2848
  rowIndex: any;
2857
2849
  };
2858
- initEditTable: () => Promise<void>;
2859
- activeMethod: ({ row, rowIndex, column, columnIndex }: {
2860
- row: any;
2861
- rowIndex: number;
2862
- column: any;
2863
- columnIndex: number;
2864
- }) => boolean;
2865
2850
  deleteRow: (row: any, col: any, index: number) => void;
2866
- onClickSelectTable: (row: any) => Promise<void>;
2867
2851
  onFormChange: ({ value, row, column, index }: {
2868
2852
  value: string | number | null;
2869
2853
  row: any;
@@ -3299,22 +3283,7 @@ declare const _default: import("vue").DefineComponent<{
3299
3283
  errorColor: string;
3300
3284
  errorColorHover: string;
3301
3285
  errorColorPressed: string;
3302
- errorColorSuppl: string; /**
3303
- * 针对 bigTable 的设置列
3304
- * type: 列的类型
3305
- * field: 列字段名(注:属性层级越深,渲染性能将直线下降)
3306
- * title: 列标题(支持开启国际化)
3307
- * width: 列宽度(如果为空则均匀分配剩余宽度,如果全部列固定了,可能会存在宽屏下不会铺满,可以配合 "%" 或者 "min-width" 布局)
3308
- * minWidth: 最小列宽度;会自动将剩余空间按比例分配
3309
- * resizable: 列是否允许拖动列宽调整大小
3310
- * visible: 列是否显示
3311
- * fixed: 将列固定在左侧或者右侧(注意:固定列应该放在左右两侧的位置)
3312
- * align: 列对齐方式
3313
- * headerAlign: 表头列的对齐方式
3314
- * footerAlign: 表尾列的对齐方式
3315
- * formatter: 格式化显示内容 Function({cellValue, row, column})
3316
- * sortable: 是否允许列排序
3317
- */
3286
+ errorColorSuppl: string;
3318
3287
  textColorBase: string;
3319
3288
  textColor1: string;
3320
3289
  textColor2: string;
@@ -83,10 +83,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
83
83
  getInlineOpreateRow
84
84
  } = useBatchEditing(props, state, emit, xGrid);
85
85
  const {
86
- initEditTable,
87
- activeMethod,
88
86
  deleteRow,
89
- onClickSelectTable,
90
87
  onFormChange,
91
88
  getDefaultValue
92
89
  } = useEdit(props, state, emit, xGrid);
@@ -542,7 +539,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
542
539
  column: col,
543
540
  index: $rowIndex
544
541
  });
545
- }
542
+ },
543
+ editTrigger: state.editConfig.trigger
546
544
  };
547
545
  if (formType === "date" || formType === "time") {
548
546
  propsData.formattedValue = row[col.columnName];
@@ -2,6 +2,7 @@ import { defineComponent, computed, createVNode, mergeProps } from 'vue';
2
2
  import { generateTimeFormat } from '../../../../../shared/utils/index.js';
3
3
  import { isFunction } from 'lodash-es';
4
4
  import { NDatePicker } from 'naive-ui';
5
+ import { useCommon } from './useCommon.js';
5
6
 
6
7
  var EditDate = defineComponent({
7
8
  name: "EditDate",
@@ -28,6 +29,10 @@ var EditDate = defineComponent({
28
29
  attrs,
29
30
  emit
30
31
  }) {
32
+ const {
33
+ formRef,
34
+ isShow
35
+ } = useCommon(props, attrs);
31
36
  const onConfirm = (value) => {
32
37
  emit("formChange", {
33
38
  value,
@@ -124,7 +129,11 @@ var EditDate = defineComponent({
124
129
  if (config.type.includes("time")) {
125
130
  config.isTimeDisabled = customDateDisabledDecorator(props.col.isTimeDisabled) || isTimeDisabled;
126
131
  }
127
- return () => createVNode(NDatePicker, mergeProps(attrs, config, {
132
+ return () => createVNode(NDatePicker, mergeProps({
133
+ "ref": formRef,
134
+ "show": isShow.value,
135
+ "onUpdate:show": ($event) => isShow.value = $event
136
+ }, attrs, config, {
128
137
  "onUpdateFormattedValue": onConfirm
129
138
  }), null);
130
139
  }
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, ref, createVNode, mergeProps } from 'vue';
2
2
  import { NInput, NInputNumber } from 'naive-ui';
3
+ import { useCommon } from './useCommon.js';
3
4
 
4
5
  var EditInput = defineComponent({
5
6
  name: "EditInput",
@@ -31,6 +32,9 @@ var EditInput = defineComponent({
31
32
  attrs,
32
33
  emit
33
34
  }) {
35
+ const {
36
+ formRef
37
+ } = useCommon(props, attrs);
34
38
  const __value = ref(attrs.value);
35
39
  const onUpdateValue = (value) => {
36
40
  emit("formChange", {
@@ -52,11 +56,15 @@ var EditInput = defineComponent({
52
56
  placeholder: props.col.placeholder || "\u8BF7\u8F93\u5165",
53
57
  ...props.col.componentProps || {}
54
58
  };
55
- return () => props.type === "input" ? createVNode(NInput, mergeProps(attrs, config, {
59
+ return () => props.type === "input" ? createVNode(NInput, mergeProps({
60
+ "ref": formRef
61
+ }, attrs, config, {
56
62
  "value": __value.value,
57
63
  "onUpdate:value": ($event) => __value.value = $event,
58
64
  "onBlur": onBlur
59
- }), null) : createVNode(NInputNumber, mergeProps(attrs, config, {
65
+ }), null) : createVNode(NInputNumber, mergeProps({
66
+ "ref": formRef
67
+ }, attrs, config, {
60
68
  "onUpdateValue": onUpdateValue
61
69
  }), null);
62
70
  }
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<{
11
11
  type: (NumberConstructor | ObjectConstructor)[];
12
12
  default: number;
13
13
  };
14
- }, () => JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "setOptions")[], "formChange" | "setOptions", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "setOptions")[], "formChange" | "setOptions", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
15
  col: {
16
16
  type: ObjectConstructor;
17
17
  default: () => {};
@@ -2,6 +2,7 @@ import { defineComponent, reactive, createVNode, mergeProps } from 'vue';
2
2
  import { NSelect } from 'naive-ui';
3
3
  import XEUtils from 'xe-utils';
4
4
  import 'moment';
5
+ import { useCommon } from './useCommon.js';
5
6
 
6
7
  var EditSelect = defineComponent({
7
8
  name: "EditSelect",
@@ -29,6 +30,10 @@ var EditSelect = defineComponent({
29
30
  slots,
30
31
  emit
31
32
  }) {
33
+ const {
34
+ formRef,
35
+ isShow
36
+ } = useCommon(props, attrs);
32
37
  const state = reactive({
33
38
  options: [],
34
39
  loading: false,
@@ -78,7 +83,11 @@ var EditSelect = defineComponent({
78
83
  }
79
84
  };
80
85
  init();
81
- return () => [createVNode(NSelect, mergeProps(attrs, state.config, {
86
+ return () => createVNode(NSelect, mergeProps({
87
+ "ref": formRef,
88
+ "show": isShow.value,
89
+ "onUpdate:show": ($event) => isShow.value = $event
90
+ }, attrs, state.config, {
82
91
  "options": state.options,
83
92
  "consistentMenuWidth": false,
84
93
  "clearable": true,
@@ -86,7 +95,7 @@ var EditSelect = defineComponent({
86
95
  "placeholder": props.col.placeholder || "\u8BF7\u9009\u62E9",
87
96
  "loading": state.loading,
88
97
  "onUpdateValue": onUpdateValue
89
- }), null)];
98
+ }), null);
90
99
  }
91
100
  });
92
101
 
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, createVNode, mergeProps } from 'vue';
2
2
  import { NTimePicker } from 'naive-ui';
3
+ import { useCommon } from './useCommon.js';
3
4
 
4
5
  var EditTime = defineComponent({
5
6
  name: "EditTime",
@@ -30,6 +31,10 @@ var EditTime = defineComponent({
30
31
  attrs,
31
32
  emit
32
33
  }) {
34
+ const {
35
+ formRef,
36
+ isShow
37
+ } = useCommon(props, attrs);
33
38
  const onUpdateValue = (value) => {
34
39
  emit("formChange", {
35
40
  value,
@@ -44,7 +49,11 @@ var EditTime = defineComponent({
44
49
  format: props.col.valueFormat || "yyyy-MM-dd HH:mm:ss",
45
50
  ...props.col.componentProps || {}
46
51
  };
47
- return () => createVNode(NTimePicker, mergeProps(attrs, config, {
52
+ return () => createVNode(NTimePicker, mergeProps({
53
+ "ref": formRef,
54
+ "show": isShow.value,
55
+ "onUpdate:show": ($event) => isShow.value = $event
56
+ }, attrs, config, {
48
57
  "onUpdateFormattedValue": onUpdateValue
49
58
  }), null);
50
59
  }
@@ -0,0 +1,4 @@
1
+ export declare const useCommon: (props: any, attrs: any) => {
2
+ formRef: import("vue").Ref<HTMLElement | null>;
3
+ isShow: import("vue").Ref<boolean>;
4
+ };
@@ -0,0 +1,19 @@
1
+ import { ref, onMounted } from 'vue';
2
+
3
+ const useCommon = (props, attrs) => {
4
+ const formRef = ref(null);
5
+ const isShow = ref(false);
6
+ onMounted(() => {
7
+ var _a;
8
+ if (attrs.editTrigger !== "manual") {
9
+ (_a = formRef.value) == null ? void 0 : _a.focus();
10
+ isShow.value = true;
11
+ }
12
+ });
13
+ return {
14
+ formRef,
15
+ isShow
16
+ };
17
+ };
18
+
19
+ export { useCommon };
@@ -96,7 +96,7 @@ export declare const comps: {
96
96
  type: (NumberConstructor | ObjectConstructor)[];
97
97
  default: number;
98
98
  };
99
- }, () => JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "setOptions")[], "formChange" | "setOptions", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
99
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "setOptions")[], "formChange" | "setOptions", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
100
100
  col: {
101
101
  type: ObjectConstructor;
102
102
  default: () => {};
@@ -1470,12 +1470,6 @@ export declare const comps: {
1470
1470
  };
1471
1471
  export declare const useEdit: (props: any, state: any, emit: any, xGrid: any) => {
1472
1472
  initEditTable: () => Promise<void>;
1473
- activeMethod: ({ row, rowIndex, column, columnIndex }: {
1474
- row: any;
1475
- rowIndex: number;
1476
- column: any;
1477
- columnIndex: number;
1478
- }) => boolean;
1479
1473
  deleteRow: (row: any, col: any, index: number) => void;
1480
1474
  onClickSelectTable: (row: any) => Promise<void>;
1481
1475
  onFormChange: ({ value, row, column, index }: {
@@ -34,25 +34,6 @@ const useEdit = (props, state, emit, xGrid) => {
34
34
  xGrid.value.remove(row);
35
35
  emit("clickBtn", { row, column: col, index });
36
36
  };
37
- const activeMethod = ({
38
- row,
39
- rowIndex,
40
- column,
41
- columnIndex
42
- }) => {
43
- var _a;
44
- const { isEdit, fieldList } = props.columnConfig;
45
- if (isEdit) {
46
- const isEditCol = ((_a = fieldList.find((v) => v.columnName === column.field)) == null ? void 0 : _a.isEdit) || false;
47
- if (isEditCol) {
48
- return true;
49
- } else {
50
- return false;
51
- }
52
- } else {
53
- return false;
54
- }
55
- };
56
37
  const onClickSelectTable = async (row) => {
57
38
  emit("clickSelectTable", { row });
58
39
  const record = {
@@ -131,7 +112,6 @@ const useEdit = (props, state, emit, xGrid) => {
131
112
  };
132
113
  return {
133
114
  initEditTable,
134
- activeMethod,
135
115
  deleteRow,
136
116
  onClickSelectTable,
137
117
  onFormChange,
@@ -538,6 +538,12 @@ body > .vxe-table--tooltip-wrapper {
538
538
  margin-right: 6px;
539
539
  box-shadow: 0px 2px 4px 0px rgba(99, 129, 249, 0.5);
540
540
  }
541
+ .custom-big-table .vxe-table--render-default .vxe-table--fixed-left-wrapper.scrolling--middle {
542
+ box-shadow: 4px 0 4px 0 rgba(0, 0, 0, 0.12);
543
+ }
544
+ .custom-big-table .vxe-table--render-default .vxe-table--fixed-right-wrapper.scrolling--middle {
545
+ box-shadow: -4px 0 4px 0 rgba(0, 0, 0, 0.12);
546
+ }
541
547
  .annotation-edit {
542
548
  cursor: pointer;
543
549
  color: #0067ee;
@@ -52,6 +52,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
52
52
  default: string;
53
53
  type: StringConstructor;
54
54
  };
55
+ token: {
56
+ type: StringConstructor;
57
+ };
55
58
  }, {
56
59
  $message: import("naive-ui").MessageApi;
57
60
  printInstance: any;
@@ -107,6 +110,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
107
110
  default: string;
108
111
  type: StringConstructor;
109
112
  };
113
+ token: {
114
+ type: StringConstructor;
115
+ };
110
116
  }>> & {
111
117
  onError?: ((...args: any[]) => any) | undefined;
112
118
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -7356,6 +7362,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
7356
7362
  default: string;
7357
7363
  type: StringConstructor;
7358
7364
  };
7365
+ token: {
7366
+ type: StringConstructor;
7367
+ };
7359
7368
  }>> & {
7360
7369
  onError?: ((...args: any[]) => any) | undefined;
7361
7370
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -53,6 +53,9 @@ declare const _default: import("vue").DefineComponent<{
53
53
  default: string;
54
54
  type: StringConstructor;
55
55
  };
56
+ token: {
57
+ type: StringConstructor;
58
+ };
56
59
  }, {
57
60
  $message: import("naive-ui").MessageApi;
58
61
  printInstance: any;
@@ -111,6 +114,9 @@ declare const _default: import("vue").DefineComponent<{
111
114
  default: string;
112
115
  type: StringConstructor;
113
116
  };
117
+ token: {
118
+ type: StringConstructor;
119
+ };
114
120
  }>> & {
115
121
  onError?: ((...args: any[]) => any) | undefined;
116
122
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -7363,6 +7369,9 @@ declare const _default: import("vue").DefineComponent<{
7363
7369
  default: string;
7364
7370
  type: StringConstructor;
7365
7371
  };
7372
+ token: {
7373
+ type: StringConstructor;
7374
+ };
7366
7375
  }>> & {
7367
7376
  onError?: ((...args: any[]) => any) | undefined;
7368
7377
  onClickoutside?: ((...args: any[]) => any) | undefined;
@@ -59,6 +59,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  noDataMsg: {
60
60
  default: "\u8BF7\u9009\u4E2D\u9700\u8981\u6253\u5370\u7684\u6570\u636E",
61
61
  type: String
62
+ },
63
+ token: {
64
+ type: String
62
65
  }
63
66
  },
64
67
  emits: ["success", "error", "clickoutside"],
@@ -136,7 +139,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
136
139
  const getPrintParams = (index = 0) => {
137
140
  var _a;
138
141
  const params = ((_a = props.printParams) == null ? void 0 : _a.length) ? props.printParams[index] : state.printParams[index];
139
- return JSON.stringify(params);
142
+ return JSON.stringify({
143
+ ...params || {},
144
+ ...props.token ? {
145
+ token: props.token
146
+ } : {}
147
+ });
140
148
  };
141
149
  const getOnceParams = () => {
142
150
  var _a, _b;
@@ -176,22 +184,22 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
176
184
  prevFnError();
177
185
  return Promise.reject();
178
186
  }).then(() => {
187
+ const queryParams = {
188
+ formatId: state.currentFormatId,
189
+ templateId: getTemplateIdByFormatId.value
190
+ };
179
191
  if (props.strategy === "MULTI") {
180
192
  for (let i = 0; i < state.printParams.length; i++) {
181
- const queryParams = {
182
- formatId: state.currentFormatId,
183
- templateId: getTemplateIdByFormatId.value,
193
+ printInstance.printDirect({
194
+ ...queryParams,
184
195
  params: getPrintParams(i)
185
- };
186
- printInstance.printDirect(queryParams, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
196
+ }, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
187
197
  }
188
198
  } else {
189
- const queryParams = {
190
- formatId: state.currentFormatId,
191
- templateId: getTemplateIdByFormatId.value,
199
+ printInstance.printDirect({
200
+ ...queryParams,
192
201
  params: getOnceParams()
193
- };
194
- printInstance.printDirect(queryParams, (res) => {
202
+ }, (res) => {
195
203
  callLocalServicesSuccessCb(res, "print");
196
204
  }, callLocalServicesErrorCb);
197
205
  }
@@ -228,14 +228,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
228
228
  });
229
229
  }
230
230
  function drawPolyLine(item, dataIndex, scaleValue) {
231
- const {
232
- pointAttr = {},
233
- lineAttr = {},
234
- noRiseStyle = {},
235
- verifiedStyle = {},
236
- reduceStyle = {},
237
- type = "circle"
238
- } = item;
231
+ const { pointAttr = {}, lineAttr = {}, type = "circle" } = item;
232
+ const { noRiseStyle = {}, verifiedStyle = {}, reduceStyle = {}, pacemaker = {} } = scaleValue;
239
233
  const pointList = [];
240
234
  const lineList = [];
241
235
  const otherList = [];
@@ -337,11 +331,12 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
337
331
  reduceLine,
338
332
  reducePoint,
339
333
  lockMovementX: true,
340
- ...pointAttr,
334
+ ...pacemaker.show && scaleValue.type == "pulse" ? pacemaker.style : pointAttr,
341
335
  ...propItems.event
342
336
  };
337
+ const pointType = pacemaker.show && scaleValue.type == "pulse" ? pacemaker.value : type;
343
338
  if (previousLine) {
344
- point = drawPoint(type, {
339
+ point = drawPoint(pointType, {
345
340
  left: previousLine.get("x2"),
346
341
  top: previousLine.get("y2"),
347
342
  ...pointAttrNew
@@ -349,13 +344,13 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
349
344
  } else {
350
345
  if (points) {
351
346
  pointAttrNew.leftLine = null;
352
- if (scaleValue.type === "temperature" && index === 0) {
347
+ if (scaleValue.type == "temperature" && index === 0) {
353
348
  const objLine = [...prevLines].find((v2) => v2.dataIndex === dataIndex - 1);
354
349
  if (objLine) {
355
350
  pointAttrNew.leftLine = objLine.line;
356
351
  }
357
352
  }
358
- point = drawPoint(type, {
353
+ point = drawPoint(pointType, {
359
354
  left: points[0],
360
355
  top: points[1],
361
356
  ...pointAttrNew
@@ -22,9 +22,10 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
22
22
  const mainScaleWidth = 9;
23
23
  const subScaleWidth = 5;
24
24
  function drawScaleNumber(text, item, left2, top) {
25
+ const { position } = item;
25
26
  return new fabric.Text(String(text), {
26
27
  ...defaultTextStyle,
27
- originX: item.position || "center",
28
+ originX: position == "left" ? "right" : position == "right" ? "left" : "center",
28
29
  left: left2,
29
30
  top,
30
31
  ...item.style
@@ -35,13 +36,13 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
35
36
  let lineXMain = [scaleLeft - mainScaleWidth / 2, scaleLeft + mainScaleWidth / 2];
36
37
  let lineXSub = [scaleLeft - subScaleWidth / 2, scaleLeft + subScaleWidth / 2];
37
38
  let textLeft = scaleLeft;
38
- if (position === "left") {
39
+ if (position === "right") {
39
40
  scaleLeft = x;
40
41
  lineXMain = [scaleLeft, scaleLeft + mainScaleWidth];
41
42
  lineXSub = [scaleLeft, scaleLeft + subScaleWidth];
42
43
  textLeft = lineXMain[1];
43
44
  }
44
- if (position === "right") {
45
+ if (position === "left") {
45
46
  scaleLeft = x + width;
46
47
  lineXMain = [scaleLeft - mainScaleWidth, scaleLeft];
47
48
  lineXSub = [scaleLeft - subScaleWidth, scaleLeft];
@@ -119,7 +120,7 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
119
120
  }
120
121
  const rectWidth = index === 0 ? firstColWidth : colWidth;
121
122
  const rectLeft = index === 0 ? start : firstColWidth + start + (index - 1) * colWidth;
122
- const line = index > 0 ? new fabric.Line([rectLeft, painIndex == 0 ? vitalSignsOriginY.originY : originY, rectLeft, vitalSignsOriginY.endY], {
123
+ const line = index > 0 ? new fabric.Line([rectLeft, vitalSignsOriginY.originY, rectLeft, vitalSignsOriginY.endY], {
123
124
  ...defaultBorderStyle
124
125
  }) : null;
125
126
  line && list.push(line);
@@ -134,8 +135,8 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
134
135
  const top = vitalSignsOriginY.endY - i * yCellHeight * spaceGridNumber;
135
136
  const isMaxMinNumber = i === 0 || i === listLen - 1;
136
137
  if (item.showNumber && (isMaxMinNumber ? item.showMaxMinNumber : true)) {
137
- const text = drawScaleNumber(v, item, textLeft, i === 0 ? top - 5 : top);
138
- list.push(text);
138
+ const y = i == 0 ? top - 5 : top;
139
+ y > vitalSignsOriginY.originY && list.push(drawScaleNumber(v, item, textLeft, y));
139
140
  }
140
141
  if (item.showScale && i !== listLen - 1) {
141
142
  for (let j = 0; j < 5; j++) {
@@ -143,9 +144,11 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
143
144
  const x1 = j == 0 ? lineXMain[0] : lineXSub[0];
144
145
  const x2 = j == 0 ? lineXMain[1] : lineXSub[1];
145
146
  const y = top - j * spaceScale;
146
- createLine([x1, y, x2, y]);
147
- if (i == listLen - 2 && j == 4) {
148
- createLine([lineXMain[0], y - spaceScale, lineXMain[1], y - spaceScale]);
147
+ if (y > vitalSignsOriginY.originY) {
148
+ createLine([x1, y, x2, y]);
149
+ if (i == listLen - 2 && j == 4) {
150
+ createLine([lineXMain[0], y - spaceScale, lineXMain[1], y - spaceScale]);
151
+ }
149
152
  }
150
153
  }
151
154
  }