cnhis-design-vue 3.1.16-beta.1 → 3.1.16-beta.12
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/big-table/index.d.ts +652 -430
- package/es/packages/big-table/src/BigTable.vue.d.ts +655 -457
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +106 -112
- package/es/packages/big-table/src/bigTableProps.d.ts +4 -0
- package/es/packages/big-table/src/bigTableProps.js +2 -1
- package/es/packages/big-table/src/bigTableState.d.ts +2 -0
- package/es/packages/big-table/src/bigTableState.js +3 -1
- package/es/packages/big-table/src/components/edit-form/edit-time.js +1 -1
- package/es/packages/big-table/src/hooks/index.d.ts +9 -0
- package/es/packages/big-table/src/hooks/index.js +9 -0
- package/es/packages/big-table/src/hooks/useAnchor.d.ts +7 -0
- package/es/packages/big-table/src/hooks/useAnchor.js +49 -0
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +24 -8
- package/es/packages/big-table/src/hooks/useEdit.js +1 -1
- package/es/packages/big-table/src/hooks/useEvent.d.ts +1 -1
- package/es/packages/big-table/src/hooks/useEvent.js +3 -2
- package/es/packages/big-table/style/index.css +1 -2
- package/es/packages/button-print/index.d.ts +7 -4
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +7 -4
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +5 -16
- package/es/packages/button-print/src/components/IdentityVerification.js +5 -7
- package/es/packages/button-print/src/components/IdentityVerification.vue.d.ts +6 -3
- package/es/packages/drag-layout/index.d.ts +2 -2
- package/es/packages/drag-layout/src/DragLayout.vue.d.ts +2 -2
- package/es/packages/fabric-chart/src/FabricChart.js +3 -2
- package/es/packages/fabric-chart/src/hooks/constant.js +5 -5
- package/es/packages/fabric-chart/src/hooks/useCenter.js +20 -23
- package/es/packages/fabric-chart/src/hooks/useDraw.js +11 -4
- package/es/packages/fabric-chart/src/hooks/useEvent.js +11 -3
- package/es/packages/fabric-chart/src/hooks/useLeft.js +8 -4
- package/es/packages/fabric-chart/src/hooks/useOther.js +63 -13
- package/es/packages/fabric-chart/src/hooks/useTop.js +5 -8
- package/es/packages/field-set/index.d.ts +1 -1
- package/es/packages/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/packages/form-config/index.d.ts +110 -3367
- package/es/packages/form-config/src/FormConfig.js +42 -34
- package/es/packages/form-config/src/FormConfig.vue.d.ts +147 -3404
- package/es/packages/form-config/src/components/FormConfigCreator.js +13 -11
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +23 -22
- package/es/packages/form-config/src/components/FormConfigEdit.js +2 -2
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +75 -49
- package/es/packages/form-config/src/constants/index.d.ts +58 -24
- package/es/packages/form-config/src/constants/index.js +52 -23
- package/es/packages/form-config/src/hooks/index.d.ts +1 -0
- package/es/packages/form-config/src/hooks/index.js +1 -0
- package/es/packages/form-config/src/hooks/useConfigurationField.d.ts +2 -1
- package/es/packages/form-config/src/hooks/useConfigurationField.js +29 -80
- package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -3
- package/es/packages/form-config/src/hooks/usePresetRenderer.js +16 -19
- package/es/packages/form-config/src/hooks/useSortable.js +1 -1
- package/es/packages/form-config/src/types/index.d.ts +22 -4
- package/es/packages/form-config/src/utils/index.d.ts +2 -0
- package/es/packages/form-config/src/utils/index.js +15 -0
- package/es/packages/form-config/style/index.css +27 -3
- package/es/packages/form-render/index.d.ts +13 -15
- package/es/packages/form-render/src/FormRender.js +11 -8
- package/es/packages/form-render/src/FormRender.vue.d.ts +14 -16
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +2 -14
- package/es/packages/form-render/src/components/renderer/cascader.js +3 -3
- package/es/packages/form-render/src/components/renderer/checkbox.js +1 -1
- package/es/packages/form-render/src/components/renderer/combination/index.js +2 -1
- package/es/packages/form-render/src/components/renderer/complex.js +1 -1
- package/es/packages/form-render/src/components/renderer/date.d.ts +20 -4
- package/es/packages/form-render/src/components/renderer/date.js +36 -20
- package/es/packages/form-render/src/components/renderer/input.js +2 -1
- package/es/packages/form-render/src/components/renderer/inputNumber.js +2 -1
- package/es/packages/form-render/src/components/renderer/linebar.js +1 -4
- package/es/packages/form-render/src/components/renderer/radio.js +1 -1
- package/es/packages/form-render/src/components/renderer/select.d.ts +1 -10
- package/es/packages/form-render/src/components/renderer/select.js +26 -17
- package/es/packages/form-render/src/components/renderer/slider.d.ts +8 -344
- package/es/packages/form-render/src/components/renderer/slider.js +24 -2
- package/es/packages/form-render/src/components/renderer/switch.js +1 -1
- package/es/packages/form-render/src/components/renderer/textarea.js +1 -1
- package/es/packages/form-render/src/hooks/useAnchor.js +7 -4
- package/es/packages/form-render/src/hooks/useBusinessBinding.d.ts +15 -9
- package/es/packages/form-render/src/hooks/useBusinessBinding.js +62 -58
- package/es/packages/form-render/src/hooks/useChangeContext.d.ts +4 -2
- package/es/packages/form-render/src/hooks/useChangeContext.js +4 -7
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +17 -7
- package/es/packages/form-render/src/hooks/useFormContext.d.ts +2 -1
- package/es/packages/form-render/src/hooks/useFormContext.js +2 -2
- package/es/packages/form-render/src/hooks/useFormValidator.js +13 -3
- package/es/packages/form-render/src/hooks/useInitialData.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useInitialData.js +9 -4
- package/es/packages/form-render/src/hooks/useTypeNormalize.js +3 -2
- package/es/packages/form-render/src/types/fieldItem.d.ts +11 -12
- package/es/packages/form-render/src/types/index.d.ts +7 -8
- package/es/packages/form-render/src/utils/business.d.ts +12 -0
- package/es/packages/form-render/src/utils/business.js +78 -0
- package/es/packages/form-render/src/utils/dom.d.ts +6 -0
- package/es/packages/form-render/src/utils/dom.js +14 -0
- package/es/packages/form-render/src/utils/index.d.ts +6 -26
- package/es/packages/form-render/src/utils/index.js +9 -138
- package/es/packages/form-render/src/utils/schema.d.ts +16 -0
- package/es/packages/form-render/src/utils/schema.js +94 -0
- package/es/packages/index.css +28 -5
- package/es/packages/scale-view/src/hooks/use-component.d.ts +7 -7
- package/es/packages/select-label/index.d.ts +10 -10
- package/es/packages/select-label/src/LabelFormContent.vue.d.ts +3 -3
- package/es/packages/select-label/src/SelectLabel.vue.d.ts +7 -7
- package/es/packages/shortcut-setter/index.d.ts +18 -20
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -20
- package/es/packages/time-line/index.d.ts +2 -2
- package/es/packages/time-line/src/TimeLine.vue.d.ts +2 -2
- package/global.d.ts +8 -8
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ function useColumnConfigAdaptor() {
|
|
|
28
28
|
type,
|
|
29
29
|
"select"
|
|
30
30
|
]),
|
|
31
|
+
...["DATE"].map((type) => [type, "date"]),
|
|
31
32
|
...["INPUT"].map((type) => [type, "input"]),
|
|
32
33
|
...["DIGITAL"].map((type) => [type, "number"])
|
|
33
34
|
]);
|
|
@@ -40,13 +41,17 @@ function useColumnConfigAdaptor() {
|
|
|
40
41
|
const validateHandler = (value, result) => {
|
|
41
42
|
if (!isObject(value))
|
|
42
43
|
return;
|
|
43
|
-
|
|
44
|
-
maxlength:
|
|
45
|
-
minlength:
|
|
46
|
-
max:
|
|
47
|
-
min:
|
|
48
|
-
precision:
|
|
49
|
-
}
|
|
44
|
+
const keyMap = {
|
|
45
|
+
maxlength: "max_length",
|
|
46
|
+
minlength: "min_length",
|
|
47
|
+
max: "max_value",
|
|
48
|
+
min: "min_value",
|
|
49
|
+
precision: "decimal_length"
|
|
50
|
+
};
|
|
51
|
+
result.componentProps = Object.assign({}, result.comonentProps, Object.entries(keyMap).reduce((res, [k, v]) => {
|
|
52
|
+
res[k] = value[v];
|
|
53
|
+
return res;
|
|
54
|
+
}, {}));
|
|
50
55
|
};
|
|
51
56
|
const dateRangeValidate = (value, result) => {
|
|
52
57
|
if (!isObject(value))
|
|
@@ -71,14 +76,25 @@ function useColumnConfigAdaptor() {
|
|
|
71
76
|
const option = { label: value.describe, ...value };
|
|
72
77
|
result.options = isArray(result.options) ? [...result.options, option] : [option];
|
|
73
78
|
};
|
|
79
|
+
const htmlTypeHandler = (value, result, fieldItem) => {
|
|
80
|
+
var _a;
|
|
81
|
+
if (!isString(value))
|
|
82
|
+
return;
|
|
83
|
+
if (value === "DATE") {
|
|
84
|
+
result.formType = isString(fieldItem.date_format) && fieldItem.date_format.startsWith("HH:mm") ? "time" : "date";
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
result.formType = (_a = htmlTypeValueMap.get(value)) != null ? _a : value;
|
|
88
|
+
};
|
|
74
89
|
const settingMap = new Map([
|
|
75
90
|
["multi_select_value", { property: "multiple", valueMap: multipleValueMap }],
|
|
76
91
|
["is_null", isNullHandler],
|
|
77
92
|
["validate", validateHandler],
|
|
78
93
|
["dateValidate", dateRangeValidate],
|
|
94
|
+
["date_format", "valueFormat"],
|
|
79
95
|
...["open", "close"].map((key) => [key, switchOptionHandler]),
|
|
80
96
|
["is_edit", { property: "isEdit", valueMap: isEditValueMap }],
|
|
81
|
-
["html_type",
|
|
97
|
+
["html_type", htmlTypeHandler],
|
|
82
98
|
["option", { property: "options", fieldMap: /* @__PURE__ */ new Map([["text", "label"]]) }],
|
|
83
99
|
[
|
|
84
100
|
"alias",
|
|
@@ -100,7 +100,7 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
100
100
|
} else {
|
|
101
101
|
row[column.columnName] = value;
|
|
102
102
|
}
|
|
103
|
-
if ((column == null ? void 0 : column.formType) === "date" && !value) {
|
|
103
|
+
if (((column == null ? void 0 : column.formType) === "date" || (column == null ? void 0 : column.formType) === "time") && !value) {
|
|
104
104
|
row[column.columnName] = void 0;
|
|
105
105
|
}
|
|
106
106
|
emit("formChange", { value, row, column, index, oldValue });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vexutils from '../../../../src/utils/vexutils';
|
|
2
2
|
import { hideFilterWrap } from '../utils.js';
|
|
3
3
|
|
|
4
|
-
const useEvent = (props, state, emit, xGrid) => {
|
|
4
|
+
const useEvent = (props, state, emit, xGrid, anchorEvent) => {
|
|
5
5
|
function keyDown({ $event }) {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
let activeRow = null;
|
|
@@ -29,7 +29,7 @@ const useEvent = (props, state, emit, xGrid) => {
|
|
|
29
29
|
if ($event.key === "ArrowDown" && index < ((_b = props.data) == null ? void 0 : _b.length) - 1) {
|
|
30
30
|
activeIndex = index + 1;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
const row = xGridRef.getData(activeIndex);
|
|
33
33
|
xGridRef.setCurrentRow(row);
|
|
34
34
|
xGridRef.scrollToRow(row);
|
|
35
35
|
emitKeyBoard();
|
|
@@ -60,6 +60,7 @@ const useEvent = (props, state, emit, xGrid) => {
|
|
|
60
60
|
hideFilterWrap(state, props);
|
|
61
61
|
}
|
|
62
62
|
scrollEvent(params);
|
|
63
|
+
anchorEvent(params);
|
|
63
64
|
};
|
|
64
65
|
return {
|
|
65
66
|
keyDown,
|
|
@@ -282,7 +282,7 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
282
282
|
height: 30px;
|
|
283
283
|
line-height: 30px;
|
|
284
284
|
}
|
|
285
|
-
.custom-big-table .vxe-table .vxe-cell--checkbox
|
|
285
|
+
.custom-big-table .vxe-table .vxe-cell--checkbox .vxe-checkbox--label {
|
|
286
286
|
display: none;
|
|
287
287
|
}
|
|
288
288
|
.custom-big-table .filter-box {
|
|
@@ -307,7 +307,6 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
307
307
|
}
|
|
308
308
|
.custom-big-table .disabled-checked-tips {
|
|
309
309
|
position: absolute;
|
|
310
|
-
left: 6px;
|
|
311
310
|
top: 50%;
|
|
312
311
|
bottom: 0;
|
|
313
312
|
right: 0;
|
|
@@ -161,7 +161,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
161
161
|
init: () => Promise<boolean>;
|
|
162
162
|
handleClickBtn: () => Promise<false | undefined>;
|
|
163
163
|
reformatPrintParams: () => void;
|
|
164
|
-
verifiySuccess: (
|
|
164
|
+
verifiySuccess: () => void;
|
|
165
165
|
NDropdown: import("vue").DefineComponent<{
|
|
166
166
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Dropdown", {
|
|
167
167
|
optionHeightSmall: string;
|
|
@@ -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;
|
|
@@ -4016,7 +4019,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4016
4019
|
type: BooleanConstructor;
|
|
4017
4020
|
default: boolean;
|
|
4018
4021
|
};
|
|
4019
|
-
preset: import("vue").PropType<"dialog" | "
|
|
4022
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
4020
4023
|
to: import("vue").PropType<string | HTMLElement>;
|
|
4021
4024
|
displayDirective: {
|
|
4022
4025
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -4978,7 +4981,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4978
4981
|
type: BooleanConstructor;
|
|
4979
4982
|
default: boolean;
|
|
4980
4983
|
};
|
|
4981
|
-
preset: import("vue").PropType<"dialog" | "
|
|
4984
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
4982
4985
|
to: import("vue").PropType<string | HTMLElement>;
|
|
4983
4986
|
displayDirective: {
|
|
4984
4987
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -165,7 +165,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
165
165
|
init: () => Promise<boolean>;
|
|
166
166
|
handleClickBtn: () => Promise<false | undefined>;
|
|
167
167
|
reformatPrintParams: () => void;
|
|
168
|
-
verifiySuccess: (
|
|
168
|
+
verifiySuccess: () => void;
|
|
169
169
|
NDropdown: import("vue").DefineComponent<{
|
|
170
170
|
readonly theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Dropdown", {
|
|
171
171
|
optionHeightSmall: 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;
|
|
@@ -4020,7 +4023,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4020
4023
|
type: BooleanConstructor;
|
|
4021
4024
|
default: boolean;
|
|
4022
4025
|
};
|
|
4023
|
-
preset: import("vue").PropType<"dialog" | "
|
|
4026
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
4024
4027
|
to: import("vue").PropType<string | HTMLElement>;
|
|
4025
4028
|
displayDirective: {
|
|
4026
4029
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -4982,7 +4985,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4982
4985
|
type: BooleanConstructor;
|
|
4983
4986
|
default: boolean;
|
|
4984
4987
|
};
|
|
4985
|
-
preset: import("vue").PropType<"dialog" | "
|
|
4988
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
4986
4989
|
to: import("vue").PropType<string | HTMLElement>;
|
|
4987
4990
|
displayDirective: {
|
|
4988
4991
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -228,7 +228,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
228
228
|
templateId: getTemplateIdByFormatId(state.currentFormatId),
|
|
229
229
|
print: {
|
|
230
230
|
print: "1",
|
|
231
|
-
type: "1"
|
|
231
|
+
type: "1",
|
|
232
|
+
callback: "1"
|
|
232
233
|
},
|
|
233
234
|
params
|
|
234
235
|
};
|
|
@@ -239,16 +240,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
239
240
|
state.visible = false;
|
|
240
241
|
});
|
|
241
242
|
};
|
|
242
|
-
const handleClickEdit = () => {
|
|
243
|
-
props.prevFn().catch(() => {
|
|
244
|
-
prevFnError();
|
|
245
|
-
return Promise.reject();
|
|
246
|
-
}).then(() => {
|
|
247
|
-
state.identityVerification.visible = true;
|
|
248
|
-
}).finally(() => {
|
|
249
|
-
state.visible = false;
|
|
250
|
-
});
|
|
251
|
-
};
|
|
252
243
|
const handleSelect = (key) => {
|
|
253
244
|
switch (key) {
|
|
254
245
|
case "printText":
|
|
@@ -258,7 +249,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
258
249
|
handleClickPreview();
|
|
259
250
|
break;
|
|
260
251
|
case "formatEditText":
|
|
261
|
-
|
|
252
|
+
verifiySuccess();
|
|
262
253
|
break;
|
|
263
254
|
case "downloadPdf":
|
|
264
255
|
handleClickPdf();
|
|
@@ -415,13 +406,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
415
406
|
}
|
|
416
407
|
state.printParams = formatParams(state.templateParams, props.params);
|
|
417
408
|
};
|
|
418
|
-
const verifiySuccess = (
|
|
419
|
-
state.identityVerification.visible = false;
|
|
409
|
+
const verifiySuccess = () => {
|
|
420
410
|
const queryParams = {
|
|
421
411
|
formatId: state.currentFormatId,
|
|
422
412
|
templateId: getTemplateIdByFormatId(state.currentFormatId),
|
|
423
|
-
params: getPrintParams()
|
|
424
|
-
token
|
|
413
|
+
params: getPrintParams()
|
|
425
414
|
};
|
|
426
415
|
printInstance.editPrintFormat(queryParams, (res) => {
|
|
427
416
|
callLocalServicesSuccessCb(res, "edit");
|
|
@@ -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;
|
|
@@ -1505,7 +1508,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1505
1508
|
type: BooleanConstructor;
|
|
1506
1509
|
default: boolean;
|
|
1507
1510
|
};
|
|
1508
|
-
preset: import("vue").PropType<"dialog" | "
|
|
1511
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
1509
1512
|
to: import("vue").PropType<string | HTMLElement>;
|
|
1510
1513
|
displayDirective: {
|
|
1511
1514
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -2467,7 +2470,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2467
2470
|
type: BooleanConstructor;
|
|
2468
2471
|
default: boolean;
|
|
2469
2472
|
};
|
|
2470
|
-
preset: import("vue").PropType<"dialog" | "
|
|
2473
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
2471
2474
|
to: import("vue").PropType<string | HTMLElement>;
|
|
2472
2475
|
displayDirective: {
|
|
2473
2476
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -1888,7 +1888,7 @@ declare const DragLayout: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1888
1888
|
type: BooleanConstructor;
|
|
1889
1889
|
default: boolean;
|
|
1890
1890
|
};
|
|
1891
|
-
preset: import("vue").PropType<"dialog" | "
|
|
1891
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
1892
1892
|
to: import("vue").PropType<string | HTMLElement>;
|
|
1893
1893
|
displayDirective: {
|
|
1894
1894
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -2850,7 +2850,7 @@ declare const DragLayout: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2850
2850
|
type: BooleanConstructor;
|
|
2851
2851
|
default: boolean;
|
|
2852
2852
|
};
|
|
2853
|
-
preset: import("vue").PropType<"dialog" | "
|
|
2853
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
2854
2854
|
to: import("vue").PropType<string | HTMLElement>;
|
|
2855
2855
|
displayDirective: {
|
|
2856
2856
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -1888,7 +1888,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1888
1888
|
type: BooleanConstructor;
|
|
1889
1889
|
default: boolean;
|
|
1890
1890
|
};
|
|
1891
|
-
preset: import("vue").PropType<"dialog" | "
|
|
1891
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
1892
1892
|
to: import("vue").PropType<string | HTMLElement>;
|
|
1893
1893
|
displayDirective: {
|
|
1894
1894
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -2850,7 +2850,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2850
2850
|
type: BooleanConstructor;
|
|
2851
2851
|
default: boolean;
|
|
2852
2852
|
};
|
|
2853
|
-
preset: import("vue").PropType<"dialog" | "
|
|
2853
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
2854
2854
|
to: import("vue").PropType<string | HTMLElement>;
|
|
2855
2855
|
displayDirective: {
|
|
2856
2856
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -115,7 +115,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
115
|
const times = top.xScalevalue.times;
|
|
116
116
|
let left = originX.value - xCellWidth.value;
|
|
117
117
|
function getDate(date) {
|
|
118
|
-
|
|
118
|
+
const [year = "2022", month = "01", day = "01"] = String(date).match(/\d+/g) || [];
|
|
119
|
+
return `20${year}`.slice(-4) + "-" + `00${month}`.slice(-2) + "-" + `00${day}`.slice(-2);
|
|
119
120
|
}
|
|
120
121
|
const timeList = dateList.map((item) => {
|
|
121
122
|
return times.map((v) => {
|
|
@@ -259,7 +260,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
259
260
|
const list = (item == null ? void 0 : item.list) || [];
|
|
260
261
|
if (!list.length)
|
|
261
262
|
return 0;
|
|
262
|
-
return yCellHeight.value / ((
|
|
263
|
+
return yCellHeight.value / ((list[1] - list[0]) / item.spaceGridNumber);
|
|
263
264
|
}
|
|
264
265
|
const { cumputedX, cumputedY, getXValue, getYValue } = useCumputedPoint(propItems);
|
|
265
266
|
useTop(canvas, propItems);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
const TEMPERATURE_MENU = [
|
|
2
2
|
{
|
|
3
3
|
label: "\u5347\u6E29",
|
|
4
|
-
value:
|
|
4
|
+
value: true,
|
|
5
5
|
type: "rise"
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
label: "\u836F\u7269\u964D\u6E29",
|
|
9
9
|
value: void 0,
|
|
10
|
-
type: "
|
|
10
|
+
type: "drugReduce"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
label: "\u7269\u7406\u964D\u6E29",
|
|
14
14
|
value: void 0,
|
|
15
|
-
type: "
|
|
15
|
+
type: "physicsReduce"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
label: "\u4E0D\u5347",
|
|
@@ -24,12 +24,12 @@ const PAIN_MENU = [
|
|
|
24
24
|
{
|
|
25
25
|
label: "\u836F\u7269\u964D\u75DB",
|
|
26
26
|
value: void 0,
|
|
27
|
-
type: "
|
|
27
|
+
type: "drugReduce"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
label: "\u7269\u7406\u964D\u75DB",
|
|
31
31
|
value: void 0,
|
|
32
|
-
type: "
|
|
32
|
+
type: "physicsReduce"
|
|
33
33
|
}
|
|
34
34
|
];
|
|
35
35
|
|
|
@@ -234,19 +234,19 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
234
234
|
lineAttr = {},
|
|
235
235
|
noRiseStyle = {},
|
|
236
236
|
verifiedStyle = {},
|
|
237
|
-
|
|
237
|
+
reduceStyle = {},
|
|
238
238
|
type = "circle"
|
|
239
239
|
} = item;
|
|
240
240
|
const pointList = [];
|
|
241
241
|
const lineList = [];
|
|
242
242
|
const otherList = [];
|
|
243
243
|
item.list.forEach((v, index) => {
|
|
244
|
-
var _a;
|
|
244
|
+
var _a, _b;
|
|
245
245
|
const points = getPointer(v, scaleValue);
|
|
246
246
|
const nextV = item.list[index + 1];
|
|
247
247
|
const nextPoint = getPointer(nextV, scaleValue);
|
|
248
|
-
let
|
|
249
|
-
if (points && scaleValue.type === "temperature") {
|
|
248
|
+
let reduceLine, reducePoint, noRiseText, arrowGroup, verifiedText;
|
|
249
|
+
if ((points == null ? void 0 : points.length) && (scaleValue.type === "temperature" || scaleValue.type === "pain")) {
|
|
250
250
|
if (v.noRise) {
|
|
251
251
|
if (typeof v.noRise === "string") {
|
|
252
252
|
noRiseText = drawText([points[0], points[1] + 5], {
|
|
@@ -285,24 +285,21 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
285
285
|
});
|
|
286
286
|
otherList.push(verifiedText);
|
|
287
287
|
}
|
|
288
|
-
if (v.
|
|
289
|
-
const
|
|
288
|
+
if (v.physicsReduce || v.drugReduce) {
|
|
289
|
+
const reduceY = cumputedY(scaleValue.type, scaleValue.list, v.physicsReduce || v.drugReduce);
|
|
290
|
+
reduceLine = drawLine([...points, points[0], reduceY], {
|
|
290
291
|
...lineAttr,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
};
|
|
294
|
-
const coolY = cumputedY(scaleValue.type, scaleValue.list, v.physicalCooling || v.drugCooling);
|
|
295
|
-
coolLine = drawLine([...points, points[0], coolY], {
|
|
296
|
-
...coolingLineStyle
|
|
292
|
+
...reduceStyle.line,
|
|
293
|
+
...defaultStyle
|
|
297
294
|
});
|
|
298
|
-
|
|
295
|
+
reducePoint = drawPoint(((_a = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _a.type) || "circle", {
|
|
299
296
|
left: points[0],
|
|
300
|
-
top:
|
|
301
|
-
...
|
|
297
|
+
top: reduceY,
|
|
298
|
+
...reduceStyle.point,
|
|
302
299
|
...defaultStyle
|
|
303
300
|
});
|
|
304
|
-
|
|
305
|
-
|
|
301
|
+
reduceLine && otherList.push(reduceLine);
|
|
302
|
+
reducePoint && otherList.push(reducePoint);
|
|
306
303
|
}
|
|
307
304
|
}
|
|
308
305
|
let point;
|
|
@@ -312,7 +309,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
312
309
|
...lineAttr
|
|
313
310
|
});
|
|
314
311
|
} else if (points && !nextPoint && !v.breakpoint && scaleValue.type === "temperature" && dataIndex < scaleValue.dataList.length - 1 && index === item.list.length - 1) {
|
|
315
|
-
const nextV2 = (
|
|
312
|
+
const nextV2 = (_b = scaleValue.dataList[dataIndex + 1].list) == null ? void 0 : _b[0];
|
|
316
313
|
const nextLinePoint = getPointer(nextV2, scaleValue);
|
|
317
314
|
line = nextLinePoint ? drawLine([...points, ...nextLinePoint], {
|
|
318
315
|
...lineAttr
|
|
@@ -338,8 +335,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
338
335
|
verifiedText,
|
|
339
336
|
leftLine: previousLine,
|
|
340
337
|
rightLine: line,
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
reduceLine,
|
|
339
|
+
reducePoint,
|
|
343
340
|
lockMovementX: true,
|
|
344
341
|
...pointAttr,
|
|
345
342
|
...propItems.event
|
|
@@ -456,9 +453,9 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
456
453
|
point.rightLine.setCoords();
|
|
457
454
|
point.rightLine.set({ x1: point.left, y1: point.top });
|
|
458
455
|
}
|
|
459
|
-
if (point.
|
|
460
|
-
point.
|
|
461
|
-
point.
|
|
456
|
+
if (point.reduceLine) {
|
|
457
|
+
point.reduceLine.setCoords();
|
|
458
|
+
point.reduceLine.set({ x1: point.left, y1: point.top });
|
|
462
459
|
}
|
|
463
460
|
if (point.noRiseText) {
|
|
464
461
|
point.noRiseText.setCoords();
|
|
@@ -44,12 +44,19 @@ function drawTextGroup(rectStyle, fontStyle, groupStyle) {
|
|
|
44
44
|
...defaultRectStyle,
|
|
45
45
|
...rectStyle
|
|
46
46
|
});
|
|
47
|
-
const
|
|
47
|
+
const { value = "\u6807\u9898", textAlign = "center", verticalAlign = "center" } = fontStyle;
|
|
48
|
+
const textLeft = rectStyle.width / 2;
|
|
49
|
+
const textTop = rectStyle.height / 2;
|
|
50
|
+
const texts = new fabric.Text(String(value), {
|
|
48
51
|
...defaultTextStyle,
|
|
49
52
|
...fontStyle,
|
|
50
|
-
...
|
|
51
|
-
originX:
|
|
52
|
-
left: -
|
|
53
|
+
...textAlign == "left" || textAlign == "right" ? {
|
|
54
|
+
originX: textAlign,
|
|
55
|
+
left: textAlign == "left" ? -textLeft : textLeft
|
|
56
|
+
} : {},
|
|
57
|
+
...verticalAlign == "top" || verticalAlign == "bottom" ? {
|
|
58
|
+
originY: verticalAlign,
|
|
59
|
+
top: verticalAlign == "top" ? -textTop : textTop
|
|
53
60
|
} : {}
|
|
54
61
|
});
|
|
55
62
|
return new fabric.Group([rect, texts], {
|
|
@@ -47,12 +47,20 @@ function useCanvasEvent(canvas, propItems, emits) {
|
|
|
47
47
|
if (index > 0) {
|
|
48
48
|
topY += propItems[`${topList[index - 1].key}Height`];
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
left: iconsWidth,
|
|
50
|
+
const commonOptions = {
|
|
52
51
|
top: topY + 1,
|
|
53
|
-
width: endX - iconsWidth,
|
|
54
52
|
height: propItems[`${item.key}Height`] - 1
|
|
53
|
+
};
|
|
54
|
+
selections2.push(drawRect({
|
|
55
|
+
left: iconsWidth,
|
|
56
|
+
width: originX - iconsWidth,
|
|
57
|
+
...commonOptions
|
|
55
58
|
}, item.key));
|
|
59
|
+
selections2.push(drawRect({
|
|
60
|
+
left: originX,
|
|
61
|
+
width: endX - originX,
|
|
62
|
+
...commonOptions
|
|
63
|
+
}, item.key + "Title"));
|
|
56
64
|
});
|
|
57
65
|
selections2.push(drawRect({
|
|
58
66
|
left: originX,
|
|
@@ -65,12 +65,14 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
65
65
|
const list = [];
|
|
66
66
|
if (item.showScale || item.showNumber) {
|
|
67
67
|
const { lineXMain, textLeft } = getScaleInfo(item.position, iconsWidth, originX - iconsWidth);
|
|
68
|
+
const listLen = item.list.length;
|
|
68
69
|
item.list.forEach((v, i) => {
|
|
69
70
|
let top = painOriginY.endY - i * yCellHeight * item.spaceGridNumber;
|
|
70
71
|
if (i === 0) {
|
|
71
72
|
top = endY - 5;
|
|
72
73
|
}
|
|
73
|
-
|
|
74
|
+
const isMaxMinNumber = i === 0 || i === listLen - 1;
|
|
75
|
+
if (item.showNumber && (isMaxMinNumber ? item.showMaxMinNumber : true)) {
|
|
74
76
|
list.push(drawScaleNumber(v, item, textLeft, top));
|
|
75
77
|
}
|
|
76
78
|
if (item.showScale && i !== 0) {
|
|
@@ -117,20 +119,22 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
117
119
|
const spaceScale = spaceGridNumber * yCellHeight / 5;
|
|
118
120
|
const position = item.position || "center";
|
|
119
121
|
const { lineXMain, lineXSub, textLeft } = getScaleInfo(item.position, rectLeft, rectWidth);
|
|
122
|
+
const listLen = item.list.length;
|
|
120
123
|
item.list.forEach((v, i) => {
|
|
121
124
|
const top = vitalSignsOriginY.endY - i * yCellHeight * spaceGridNumber;
|
|
122
|
-
|
|
125
|
+
const isMaxMinNumber = i === 0 || i === listLen - 1;
|
|
126
|
+
if (item.showNumber && (isMaxMinNumber ? item.showMaxMinNumber : true)) {
|
|
123
127
|
const text = drawScaleNumber(v, item, textLeft, i === 0 ? top - 5 : top);
|
|
124
128
|
list.push(text);
|
|
125
129
|
}
|
|
126
|
-
if (item.showScale && i !==
|
|
130
|
+
if (item.showScale && i !== listLen - 1) {
|
|
127
131
|
for (let j = 0; j < 5; j++) {
|
|
128
132
|
if (j > 0 || !item.showNumber || position !== "center") {
|
|
129
133
|
const x1 = j == 0 ? lineXMain[0] : lineXSub[0];
|
|
130
134
|
const x2 = j == 0 ? lineXMain[1] : lineXSub[1];
|
|
131
135
|
const y = top - j * spaceScale;
|
|
132
136
|
createLine([x1, y, x2, y]);
|
|
133
|
-
if (i ==
|
|
137
|
+
if (i == listLen - 2 && j == 4) {
|
|
134
138
|
createLine([lineXMain[0], y - spaceScale, lineXMain[1], y - spaceScale]);
|
|
135
139
|
}
|
|
136
140
|
}
|