cnhis-design-vue 3.1.17-beta.2 → 3.1.17-beta.5

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 (49) hide show
  1. package/es/packages/big-table/src/components/separate.js +1 -1
  2. package/es/packages/big-table/src/hooks/useSeparateRow.js +2 -2
  3. package/es/packages/button-print/index.d.ts +1 -1
  4. package/es/packages/button-print/src/ButtonPrint.vue.d.ts +1 -1
  5. package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +13 -17
  6. package/es/packages/fabric-chart/src/hooks/useLeft.js +3 -1
  7. package/es/packages/fabric-chart/src/hooks/useRight.js +8 -2
  8. package/es/packages/form-config/index.d.ts +8282 -6776
  9. package/es/packages/form-config/src/FormConfig.js +23 -26
  10. package/es/packages/form-config/src/FormConfig.vue.d.ts +8283 -6777
  11. package/es/packages/form-config/src/components/FormConfigCreator.js +3 -3
  12. package/es/packages/form-config/src/components/FormConfigDragDisplay.js +42 -0
  13. package/es/packages/form-config/src/components/FormConfigDragDisplay.vue.d.ts +106 -0
  14. package/es/packages/form-config/src/components/FormConfigEdit.js +1 -1
  15. package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +2 -0
  16. package/es/packages/form-config/src/components/index.d.ts +5 -0
  17. package/es/packages/form-config/src/components/index.js +6 -0
  18. package/es/packages/form-config/src/components/renderer/CloseButton.js +45 -0
  19. package/es/packages/form-config/src/components/renderer/CloseButton.vue.d.ts +1499 -0
  20. package/es/packages/form-config/src/components/renderer/ComplexNode.js +44 -0
  21. package/es/packages/form-config/src/components/renderer/ComplexNode.vue.d.ts +1641 -0
  22. package/es/packages/form-config/src/components/renderer/DefaultNode.js +59 -0
  23. package/es/packages/form-config/src/components/renderer/DefaultNode.vue.d.ts +3266 -0
  24. package/es/packages/form-config/src/components/renderer/index.d.ts +4 -0
  25. package/es/packages/form-config/src/components/renderer/index.js +3 -0
  26. package/es/packages/form-config/src/constants/index.d.ts +2 -0
  27. package/es/packages/form-config/src/constants/index.js +5 -2
  28. package/es/packages/form-config/src/hooks/index.d.ts +1 -1
  29. package/es/packages/form-config/src/hooks/index.js +1 -1
  30. package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -2
  31. package/es/packages/form-config/src/hooks/usePresetRenderer.js +5 -84
  32. package/es/packages/form-config/src/hooks/{useSortable.d.ts → useSortalbeConfig.d.ts} +2 -2
  33. package/es/packages/form-config/src/hooks/{useSortable.js → useSortalbeConfig.js} +7 -11
  34. package/es/packages/form-config/src/types/index.d.ts +2 -1
  35. package/es/packages/form-config/src/utils/index.d.ts +6 -1
  36. package/es/packages/form-config/src/utils/index.js +20 -9
  37. package/es/packages/form-config/style/index.css +35 -20
  38. package/es/packages/form-render/src/FormRender.js +5 -7
  39. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +1 -2
  40. package/es/packages/form-render/src/hooks/useFormContext.js +1 -4
  41. package/es/packages/form-render/src/hooks/useFormItemDeps.d.ts +1 -0
  42. package/es/packages/form-render/src/hooks/useFormItemDeps.js +5 -2
  43. package/es/packages/form-render/src/utils/index.js +1 -1
  44. package/es/packages/form-render/src/utils/schema.d.ts +0 -1
  45. package/es/packages/form-render/src/utils/schema.js +1 -12
  46. package/es/packages/form-render/style/index.css +1 -1
  47. package/es/packages/index.css +36 -21
  48. package/es/packages/shortcut-setter/src/ShortcutSetter.js +2 -1
  49. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { useSeparateMap } from '../../../../packages/big-table/src/hooks/useSepa
3
3
  import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
4
4
 
5
5
  const _hoisted_1 = { class: "big-table__separate" };
6
- const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", { class: "big-table__separatePlaceholder" }, "p", -1);
6
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", { class: "big-table__separatePlaceholder" }, /* @__PURE__ */ toDisplayString(` `), -1);
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "separate",
9
9
  props: {
@@ -89,7 +89,7 @@ function useSeparateRow(getColumnConfig, getFieldItem, $VXETable) {
89
89
  separateDataMap.value.set(row, {
90
90
  row,
91
91
  rawRow: rawData[dataIndex],
92
- index,
92
+ index: dataIndex,
93
93
  separateData
94
94
  });
95
95
  row.$__SEPARATE_DATA = [separateData];
@@ -99,7 +99,7 @@ function useSeparateRow(getColumnConfig, getFieldItem, $VXETable) {
99
99
  separateDataMap.value.set(data2, {
100
100
  row: data2,
101
101
  rawRow: rawData[dataIndex],
102
- index,
102
+ index: dataIndex,
103
103
  separateData
104
104
  });
105
105
  row.$__SEPARATE_DATA.push(separateData);
@@ -133,8 +133,8 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
133
133
  }[];
134
134
  currentFormatItem: import("vue").ComputedRef<{} | undefined>;
135
135
  formatTitle: import("vue").ComputedRef<any>;
136
+ getTemplateIdByFormatId: import("vue").ComputedRef<any>;
136
137
  renderLabel: (option: any) => any;
137
- getTemplateIdByFormatId: (id: any) => any;
138
138
  callLocalServicesSuccessCb: (res: any, type: any) => void;
139
139
  callLocalServicesErrorCb: (res: any) => void;
140
140
  prevFnError: () => void;
@@ -137,8 +137,8 @@ declare const _default: import("vue").DefineComponent<{
137
137
  }[];
138
138
  currentFormatItem: import("vue").ComputedRef<{} | undefined>;
139
139
  formatTitle: import("vue").ComputedRef<any>;
140
+ getTemplateIdByFormatId: import("vue").ComputedRef<any>;
140
141
  renderLabel: (option: any) => any;
141
- getTemplateIdByFormatId: (id: any) => any;
142
142
  callLocalServicesSuccessCb: (res: any, type: any) => void;
143
143
  callLocalServicesErrorCb: (res: any) => void;
144
144
  prevFnError: () => void;
@@ -102,6 +102,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
102
102
  return state.formatList.find((item) => item.id === id);
103
103
  });
104
104
  const formatTitle = computed(() => currentFormatItem.value.name || "\u683C\u5F0F\u9009\u62E9");
105
+ const getTemplateIdByFormatId = computed(() => {
106
+ let find = state.formatList.find((item) => item.id === state.currentFormatId);
107
+ return find == null ? void 0 : find.templateId;
108
+ });
105
109
  const renderLabel = (option) => {
106
110
  return createVNode("span", {
107
111
  "class": {
@@ -109,15 +113,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
109
113
  }
110
114
  }, [option.label]);
111
115
  };
112
- const getTemplateIdByFormatId = (id) => {
113
- let find = state.formatList.find((item) => item.id === id);
114
- return find.templateId;
115
- };
116
116
  const callLocalServicesSuccessCb = (res, type) => {
117
117
  let info = {
118
118
  type,
119
119
  formatId: state.currentFormatId,
120
- templateId: getTemplateIdByFormatId(state.currentFormatId)
120
+ templateId: getTemplateIdByFormatId.value
121
121
  };
122
122
  emit("success", res, info);
123
123
  };
@@ -180,7 +180,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
180
180
  for (let i = 0; i < state.printParams.length; i++) {
181
181
  const queryParams = {
182
182
  formatId: state.currentFormatId,
183
- templateId: getTemplateIdByFormatId(state.currentFormatId),
183
+ templateId: getTemplateIdByFormatId.value,
184
184
  params: getPrintParams(i)
185
185
  };
186
186
  printInstance.printDirect(queryParams, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
@@ -188,7 +188,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
188
188
  } else {
189
189
  const queryParams = {
190
190
  formatId: state.currentFormatId,
191
- templateId: getTemplateIdByFormatId(state.currentFormatId),
191
+ templateId: getTemplateIdByFormatId.value,
192
192
  params: getOnceParams()
193
193
  };
194
194
  printInstance.printDirect(queryParams, (res) => {
@@ -207,7 +207,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
207
207
  const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
208
208
  const queryParams = {
209
209
  formatId: state.currentFormatId,
210
- templateId: getTemplateIdByFormatId(state.currentFormatId),
210
+ templateId: getTemplateIdByFormatId.value,
211
211
  params
212
212
  };
213
213
  printInstance.preview(queryParams, (res) => {
@@ -225,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
225
225
  const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
226
226
  const queryParams = {
227
227
  formatId: state.currentFormatId,
228
- templateId: getTemplateIdByFormatId(state.currentFormatId),
228
+ templateId: getTemplateIdByFormatId.value,
229
229
  print: {
230
230
  print: "1",
231
231
  type: "1",
@@ -357,7 +357,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
357
357
  };
358
358
  const initCRM = async (formatListResult) => {
359
359
  var _a;
360
- console.log("formatListResult", formatListResult);
361
360
  state.formatList = formatListResult ? formatFormatList(formatListResult.obj) : [];
362
361
  state.currentFormatId = getDefaultFormatId(state.formatList, "defaultFlag");
363
362
  if (!state.currentFormatId) {
@@ -365,14 +364,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
365
364
  return requestError();
366
365
  }
367
366
  setOptions();
368
- if (!state.currentFormatId) {
369
- requestError();
370
- return;
371
- }
372
- let templateParamsResult = ((_a = await props.queryTemplateParams()) == null ? void 0 : _a.obj) || {};
373
- if (templateParamsResult) {
367
+ let templateParamsResult = (_a = await props.queryTemplateParams()) == null ? void 0 : _a.obj;
368
+ if (templateParamsResult && getTemplateIdByFormatId.value) {
374
369
  state.templateParams = templateParamsResult;
375
370
  } else {
371
+ $message.error("\u83B7\u53D6\u6253\u5370\u6A21\u677F\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01");
376
372
  return requestError();
377
373
  }
378
374
  state.printParams = formatParams(state.templateParams, props.params);
@@ -420,7 +416,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
420
416
  state.identityVerification.visible = false;
421
417
  const queryParams = {
422
418
  formatId: state.currentFormatId,
423
- templateId: getTemplateIdByFormatId(state.currentFormatId),
419
+ templateId: getTemplateIdByFormatId.value,
424
420
  params: getPrintParams(),
425
421
  token
426
422
  };
@@ -261,10 +261,12 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
261
261
  nextTick(() => {
262
262
  var _a;
263
263
  iconsWidth && drawIcons();
264
- const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "left" || v.type === "pain");
264
+ const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "left" && v.type !== "pain");
265
265
  if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "left") {
266
266
  yScaleValueList.push(getRightInfo);
267
267
  }
268
+ painIndex == 0 && yScaleValueList.unshift(left.yScaleValue[painIndex]);
269
+ painIndex == left.yScaleValue.length - 1 && yScaleValueList.push(left.yScaleValue[painIndex]);
268
270
  drawScaleValue(yScaleValueList);
269
271
  canvas.value.renderAll();
270
272
  });
@@ -3,15 +3,21 @@ import { fabric } from '../utils/index.js';
3
3
  import { defaultBorderStyle } from './useDraw.js';
4
4
 
5
5
  function useRight(canvas, propItems, drawScaleValue) {
6
- const { left, right, getRightInfo, canvasWidth, endY } = propItems;
6
+ const { left, right, getRightInfo, canvasWidth, endY, endX, originY } = propItems;
7
7
  onMounted(() => {
8
8
  nextTick(() => {
9
9
  var _a;
10
10
  const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "right");
11
11
  if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "right") {
12
12
  yScaleValueList.push(getRightInfo);
13
+ }
14
+ if ((right == null ? void 0 : right.width) || yScaleValueList.length > 0) {
13
15
  const rightBorderLine = new fabric.Line([canvasWidth - 1, 0, canvasWidth - 1, endY], defaultBorderStyle);
14
- canvas.value.add(rightBorderLine);
16
+ const rightBorderLine2 = new fabric.Line([endX + 1, originY, canvasWidth - 1, originY], {
17
+ ...defaultBorderStyle,
18
+ stroke: "#fff"
19
+ });
20
+ canvas.value.add(rightBorderLine, rightBorderLine2);
15
21
  }
16
22
  drawScaleValue(yScaleValueList);
17
23
  });