cnhis-design-vue 3.1.16-beta.10 → 3.1.16-beta.13
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.
- package/es/packages/button-print/index.d.ts +4 -1
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +4 -1
- package/es/packages/button-print/src/components/IdentityVerification.js +5 -7
- package/es/packages/button-print/src/components/IdentityVerification.vue.d.ts +4 -1
- package/es/packages/fabric-chart/src/FabricChart.js +1 -1
- package/es/packages/fabric-chart/src/hooks/constant.js +1 -1
- package/es/packages/fabric-chart/src/hooks/useOther.js +63 -13
- package/es/packages/form-config/style/index.css +1 -1
- package/es/packages/form-render/src/FormRender.js +2 -2
- package/es/packages/form-render/src/hooks/useTypeNormalize.js +2 -1
- package/es/packages/index.css +1 -1
- package/package.json +4 -4
|
@@ -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:
|
|
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:
|
|
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,
|
|
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(
|
|
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
|
|
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:
|
|
29
|
+
form: {
|
|
30
|
+
account: string;
|
|
31
|
+
password: string;
|
|
32
|
+
};
|
|
30
33
|
rules: FormRules;
|
|
31
34
|
style: {
|
|
32
35
|
width: string;
|
|
@@ -260,7 +260,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
260
260
|
const list = (item == null ? void 0 : item.list) || [];
|
|
261
261
|
if (!list.length)
|
|
262
262
|
return 0;
|
|
263
|
-
return yCellHeight.value / ((
|
|
263
|
+
return yCellHeight.value / ((list[1] - list[0]) / item.spaceGridNumber);
|
|
264
264
|
}
|
|
265
265
|
const { cumputedX, cumputedY, getXValue, getYValue } = useCumputedPoint(propItems);
|
|
266
266
|
useTop(canvas, propItems);
|
|
@@ -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 {
|
|
6
|
+
const { other, vitalSignsOriginY } = propItems;
|
|
7
7
|
function drawOther() {
|
|
8
|
-
if (!other
|
|
8
|
+
if (!(other == null ? void 0 : other.list))
|
|
9
9
|
return false;
|
|
10
10
|
const list = [];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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(() => {
|
|
@@ -54,6 +54,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
54
|
effects() {
|
|
55
55
|
onFieldValueChange("*", async (field) => {
|
|
56
56
|
const fieldKey = field.props.name.toString();
|
|
57
|
+
businessCollector.trigger(fieldKey);
|
|
58
|
+
formItemDepsCollector.trigger(fieldKey);
|
|
57
59
|
emit("formChange", {
|
|
58
60
|
fieldInstance: field,
|
|
59
61
|
fieldKey,
|
|
@@ -61,8 +63,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
63
|
value: field.value,
|
|
62
64
|
context: await changeContextCollector.getContext(fieldKey)
|
|
63
65
|
});
|
|
64
|
-
businessCollector.trigger(fieldKey);
|
|
65
|
-
formItemDepsCollector.trigger(fieldKey);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
});
|
package/es/packages/index.css
CHANGED
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.
|
|
4
|
+
"version": "3.1.16-beta.13",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"module": "es/packages/index.js",
|
|
7
7
|
"main": "es/packages/index.js",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"vue": "^3.2.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@formily/core": "
|
|
35
|
-
"@formily/path": "
|
|
36
|
-
"@formily/vue": "
|
|
34
|
+
"@formily/core": "2.1.9",
|
|
35
|
+
"@formily/path": "2.1.9",
|
|
36
|
+
"@formily/vue": "2.1.9",
|
|
37
37
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
38
38
|
"@vicons/ionicons5": "^0.12.0",
|
|
39
39
|
"@vueuse/core": "^8.6.0",
|