cnhis-design-vue 3.1.16-beta.10 → 3.1.16-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.
@@ -2537,7 +2537,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
2537
2537
  modelValue: boolean;
2538
2538
  };
2539
2539
  emit: (event: "success" | "update:modelValue", ...args: any[]) => void;
2540
- form: any;
2540
+ form: {
2541
+ account: string;
2542
+ password: string;
2543
+ };
2541
2544
  rules: import("naive-ui").FormRules;
2542
2545
  style: {
2543
2546
  width: string;
@@ -2541,7 +2541,10 @@ declare const _default: import("vue").DefineComponent<{
2541
2541
  modelValue: boolean;
2542
2542
  };
2543
2543
  emit: (event: "success" | "update:modelValue", ...args: any[]) => void;
2544
- form: any;
2544
+ form: {
2545
+ account: string;
2546
+ password: string;
2547
+ };
2545
2548
  rules: import("naive-ui").FormRules;
2546
2549
  style: {
2547
2550
  width: string;
@@ -1,4 +1,4 @@
1
- import { defineComponent, reactive, ref, onMounted, watch, openBlock, createBlock, unref, normalizeStyle, withCtx, createElementVNode, createVNode, createTextVNode } from 'vue';
1
+ import { defineComponent, reactive, ref, watch, openBlock, createBlock, unref, normalizeStyle, withCtx, createElementVNode, createVNode, createTextVNode } from 'vue';
2
2
  import { useMessage, NModal, NForm, NFormItem, NInput, NButton } from 'naive-ui';
3
3
  import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
4
4
 
@@ -19,7 +19,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
19
19
  account: "",
20
20
  password: ""
21
21
  };
22
- let form = reactive(JSON.parse(JSON.stringify(DEFAULT_FORM)));
22
+ let form = reactive({ ...DEFAULT_FORM });
23
23
  const rules = {
24
24
  account: { required: true, message: "\u8BF7\u8F93\u5165\u8D26\u53F7" },
25
25
  password: { required: true, message: "\u8BF7\u8F93\u5165\u5BC6\u7801" }
@@ -33,9 +33,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  };
34
34
  const submit = async () => {
35
35
  var _a;
36
- const { data = {} } = await props.verifyUser(form);
36
+ const { data = {} } = await props.verifyUser(form) || {};
37
37
  if (data.result !== "SUCCESS") {
38
- $message.error(data.resultMsg);
38
+ $message.error(data.resultMsg || "\u8BF7\u6DFB\u52A0\u8EAB\u4EFD\u6821\u9A8C\u63A5\u53E3\u914D\u7F6E");
39
39
  return false;
40
40
  }
41
41
  emit("success", (_a = data.map) == null ? void 0 : _a.token);
@@ -51,12 +51,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
51
  }
52
52
  });
53
53
  };
54
- onMounted(() => {
55
- });
56
54
  watch(() => props.modelValue, (val) => {
57
55
  if (val)
58
56
  return;
59
- form = JSON.parse(JSON.stringify(DEFAULT_FORM));
57
+ Object.assign(form, DEFAULT_FORM);
60
58
  });
61
59
  return (_ctx, _cache) => {
62
60
  return openBlock(), createBlock(unref(NModal), {
@@ -26,7 +26,10 @@ declare const _default: import("vue").DefineComponent<{
26
26
  modelValue: boolean;
27
27
  };
28
28
  emit: (event: "success" | "update:modelValue", ...args: any[]) => void;
29
- form: any;
29
+ form: {
30
+ account: string;
31
+ password: string;
32
+ };
30
33
  rules: FormRules;
31
34
  style: {
32
35
  width: string;
@@ -1,7 +1,7 @@
1
1
  const TEMPERATURE_MENU = [
2
2
  {
3
3
  label: "\u5347\u6E29",
4
- value: false,
4
+ value: true,
5
5
  type: "rise"
6
6
  },
7
7
  {
@@ -3,25 +3,75 @@ import { fabric } from '../utils/index.js';
3
3
  import { defaultStyle } from './useDraw.js';
4
4
 
5
5
  function useOther(canvas, propItems, cumputedX) {
6
- const { originY, other, vitalSignsOriginY } = propItems;
6
+ const { other, vitalSignsOriginY } = propItems;
7
7
  function drawOther() {
8
- if (!other || !other.list)
8
+ if (!(other == null ? void 0 : other.list))
9
9
  return false;
10
10
  const list = [];
11
- other.list.forEach((v, i) => {
12
- var _a;
13
- const text = new fabric.Text(String(v.value.toString().split("").join("\n")), {
14
- originX: "center",
15
- top: (((_a = v.style) == null ? void 0 : _a.baseTop) || 0) + vitalSignsOriginY.originY,
16
- left: cumputedX(v.time),
17
- textAlign: "center",
18
- ...defaultStyle,
19
- ...v.style || {}
11
+ const otherList = [];
12
+ other.list.forEach((item) => {
13
+ const align = item.align || "vertical";
14
+ const left = cumputedX(item.time);
15
+ const obj = otherList.find((v) => v.left == left);
16
+ if (obj) {
17
+ obj[align].push(item);
18
+ } else {
19
+ const initObj = {
20
+ left,
21
+ vertical: [],
22
+ horizontal: []
23
+ };
24
+ initObj[align].push(item);
25
+ otherList.push(initObj);
26
+ }
27
+ });
28
+ let textWidth = 0;
29
+ otherList.forEach((item) => {
30
+ let topY = vitalSignsOriginY.originY;
31
+ let leftX = item.left;
32
+ let textHeight = 0;
33
+ item.vertical.forEach((v) => {
34
+ const { commonOptions, value } = getTextData(v);
35
+ topY += (v.baseTop || 0) + textHeight;
36
+ const text = new fabric.Text(value, {
37
+ top: topY,
38
+ left: item.left,
39
+ ...commonOptions
40
+ });
41
+ textHeight = text.height || 0;
42
+ setTextWidth(text);
43
+ });
44
+ item.horizontal.forEach((v, i) => {
45
+ if (i > 0 || item.vertical.length) {
46
+ leftX += textWidth;
47
+ }
48
+ const { commonOptions, value } = getTextData(v);
49
+ const text = new fabric.Text(value, {
50
+ top: vitalSignsOriginY.originY,
51
+ left: leftX,
52
+ ...commonOptions
53
+ });
54
+ setTextWidth(text);
20
55
  });
21
- list.push(text);
22
56
  });
57
+ function setTextWidth(text) {
58
+ if (!textWidth) {
59
+ textWidth = text.width || 0;
60
+ }
61
+ list.push(text);
62
+ }
63
+ function getTextData(v) {
64
+ return {
65
+ commonOptions: {
66
+ originX: "center",
67
+ textAlign: "center",
68
+ ...defaultStyle,
69
+ ...v.style || {}
70
+ },
71
+ value: String(v.value.toString().split("").join("\n"))
72
+ };
73
+ }
23
74
  const group = list.length > 0 ? new fabric.Group([...list], { ...defaultStyle }) : null;
24
- group && group.sendToBack();
25
75
  group && canvas.value.add(group);
26
76
  }
27
77
  onMounted(() => {
@@ -69,7 +69,7 @@
69
69
  padding: 16px;
70
70
  box-sizing: border-box;
71
71
  flex-shrink: 0;
72
- width: 220px;
72
+ width: 240px;
73
73
  background: white;
74
74
  }
75
75
  .form-config__configHeader {
@@ -3248,7 +3248,7 @@ body > .vxe-table--tooltip-wrapper {
3248
3248
  padding: 16px;
3249
3249
  box-sizing: border-box;
3250
3250
  flex-shrink: 0;
3251
- width: 220px;
3251
+ width: 240px;
3252
3252
  background: white;
3253
3253
  }
3254
3254
  .form-config__configHeader {
package/global.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import * as NaiveUI from 'naive-ui';
2
-
3
- declare module 'naive-ui' {
4
- // @ts-ignore
5
- export const NTree: any;
6
- }
7
-
8
- export {};
1
+ import * as NaiveUI from 'naive-ui';
2
+
3
+ declare module 'naive-ui' {
4
+ // @ts-ignore
5
+ export const NTree: any;
6
+ }
7
+
8
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.16-beta.10",
4
+ "version": "3.1.16-beta.11",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.js",
7
7
  "main": "es/packages/index.js",