cnhis-design-vue 3.1.31-beta.7 → 3.1.31-beta.9
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/README.md +123 -123
- package/es/components/button-print/index.d.ts +64 -45
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +64 -45
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +65 -46
- package/es/components/button-print/src/components/EditFormat.vue.js +108 -88
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +64 -45
- package/es/components/button-print/src/components/IdentityVerification.vue.js +7 -4
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/fabric-chart/src/hooks/useCenter.js +5 -6
- package/es/components/fabric-chart/src/hooks/useGrid.js +3 -3
- package/es/components/fabric-chart/src/interface.d.ts +1 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +3 -3
- package/es/components/form-render/src/hooks/useAutographOptions.js +2 -2
- package/es/components/form-render/src/utils/index.d.ts +2 -2
- package/es/components/form-render/src/utils/index.js +27 -3
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/keyboard/index.d.ts +26 -16
- package/es/components/keyboard/src/Keyboard.vue.d.ts +27 -8
- package/es/components/keyboard/src/Keyboard.vue.js +8 -2
- package/es/components/steps-wheel/index.d.ts +3 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +3 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.js +38 -9
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/index.d.ts +0 -207
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +0 -208
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode,
|
|
1
|
+
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createTextVNode } from 'vue';
|
|
2
2
|
import { useMessage, NForm, NFormItem, NSpace, NUpload, NUploadDragger, NIcon, NText, NP } from 'naive-ui';
|
|
3
3
|
import { Archive } from '@vicons/ionicons5';
|
|
4
4
|
import axios from 'axios';
|
|
@@ -7,48 +7,75 @@ import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
|
7
7
|
const _hoisted_1 = { style: { "margin-bottom": "12px" } };
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "EditFormat",
|
|
10
|
+
props: {
|
|
11
|
+
formatId: null,
|
|
12
|
+
token: null
|
|
13
|
+
},
|
|
10
14
|
setup(__props, { expose }) {
|
|
15
|
+
const props = __props;
|
|
11
16
|
const PROTOCOL = window.location.protocol;
|
|
12
17
|
const HOST = window.location.host;
|
|
13
|
-
const
|
|
18
|
+
const BASEURL = `${PROTOCOL}//${HOST}/bi-api`;
|
|
19
|
+
const SAVEIREPORT = `${BASEURL}/reprot/print/open/client/saveIReportFormat`;
|
|
20
|
+
const QUERYFILELIST = `${BASEURL}/reprot/print/open/client/getIReportFiles`;
|
|
21
|
+
const DELETEFILE = `${BASEURL}/reprot/print/open/client/delIReportFiles`;
|
|
14
22
|
const instance = axios.create({});
|
|
15
23
|
const $message = useMessage();
|
|
16
|
-
const fileList = ref([
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const fileList = ref([]);
|
|
25
|
+
queryFileList();
|
|
26
|
+
function queryFileList() {
|
|
27
|
+
var _a;
|
|
28
|
+
instance.get(`${QUERYFILELIST}?formatId=${(_a = props.formatId) == null ? void 0 : _a.split("_")[1]}&authorizationKey=${props.token}`).then(({ data }) => {
|
|
29
|
+
(data.list || []).forEach((file) => {
|
|
30
|
+
fileList.value.push({
|
|
31
|
+
id: Date.now().toString(),
|
|
32
|
+
name: file,
|
|
33
|
+
status: "finished"
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function onRemove(options) {
|
|
39
|
+
return new Promise((resolve, reject) => {
|
|
40
|
+
var _a;
|
|
41
|
+
instance.get(
|
|
42
|
+
`${DELETEFILE}?formatId=${(_a = props.formatId) == null ? void 0 : _a.split("_")[1]}&authorizationKey=${props.token}&fileName=${options.file.name}`
|
|
43
|
+
).then(({ data }) => {
|
|
44
|
+
if ((data == null ? void 0 : data.result) !== "SUCCESS") {
|
|
45
|
+
$message.error((data == null ? void 0 : data.resultMsg) || "\u5220\u9664\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01");
|
|
46
|
+
reject();
|
|
47
|
+
} else {
|
|
48
|
+
$message.success("\u5220\u9664\u6587\u4EF6\u6210\u529F\uFF01");
|
|
49
|
+
resolve("SUCCESS");
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
26
54
|
function submit(datas) {
|
|
27
55
|
return new Promise((resolve, reject) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
56
|
+
if (!validateFormat()) {
|
|
57
|
+
$message.warning("\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2Ajrxml\u6587\u4EF6\u548C\u4E00\u4E2Ajasper\u6587\u4EF6\uFF01");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const files = fileList.value.filter((file) => file.file);
|
|
61
|
+
if (files.length === 0) {
|
|
62
|
+
$message.warning("\u672C\u6B21\u65E0\u65B0\u6587\u4EF6\u589E\u52A0\uFF0C\u8BF7\u5148\u6DFB\u52A0\u65B0\u6587\u4EF6\uFF01");
|
|
32
63
|
return;
|
|
33
64
|
}
|
|
34
|
-
const jrxml = (_b = (_a = fileList.value.find((file) => file.key === "jrxml")) == null ? void 0 : _a.value) == null ? void 0 : _b[0];
|
|
35
|
-
const jasper = (_d = (_c = fileList.value.find((file) => file.key === "jasper")) == null ? void 0 : _c.value) == null ? void 0 : _d[0];
|
|
36
|
-
const data = {
|
|
37
|
-
jrxml: jrxml == null ? void 0 : jrxml.file,
|
|
38
|
-
jasper: jasper == null ? void 0 : jasper.file,
|
|
39
|
-
...datas
|
|
40
|
-
};
|
|
41
65
|
const params = new FormData();
|
|
42
|
-
Object.keys(
|
|
43
|
-
params.append(v,
|
|
66
|
+
Object.keys(datas).forEach((v) => {
|
|
67
|
+
params.append(v, datas[v]);
|
|
68
|
+
});
|
|
69
|
+
fileList.value.forEach((file) => {
|
|
70
|
+
file.file && params.append("files", file.file);
|
|
44
71
|
});
|
|
45
72
|
instance.post(SAVEIREPORT, params, {
|
|
46
73
|
headers: {
|
|
47
74
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
48
75
|
}
|
|
49
|
-
}).then(({ data
|
|
50
|
-
if ((
|
|
51
|
-
$message.error((
|
|
76
|
+
}).then(({ data }) => {
|
|
77
|
+
if ((data == null ? void 0 : data.result) !== "SUCCESS") {
|
|
78
|
+
$message.error((data == null ? void 0 : data.resultMsg) || "\u4E0A\u4F20\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01");
|
|
52
79
|
reject();
|
|
53
80
|
} else {
|
|
54
81
|
resolve("SUCCESS");
|
|
@@ -56,29 +83,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
83
|
});
|
|
57
84
|
});
|
|
58
85
|
}
|
|
59
|
-
function
|
|
60
|
-
fileList.value
|
|
61
|
-
}
|
|
62
|
-
async function onBeforeUpload(data) {
|
|
63
|
-
if (!validateFormat(data.file, ".jrxml,.jasper")) {
|
|
64
|
-
$message.warning("\u53EA\u80FD\u4E0A\u4F20.jrxml\u6216\u8005.jasper\u683C\u5F0F\u7684\u6587\u4EF6\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20");
|
|
86
|
+
function validateFormat() {
|
|
87
|
+
if (fileList.value.length < 2)
|
|
65
88
|
return false;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
89
|
+
let isJrxml = false;
|
|
90
|
+
let isJasper = false;
|
|
91
|
+
const rExt = /\.([^.]+)$/;
|
|
92
|
+
fileList.value.forEach((file) => {
|
|
93
|
+
var _a;
|
|
94
|
+
const name = ((_a = file.file) == null ? void 0 : _a.name) || file.name || "";
|
|
95
|
+
const ext = rExt.exec(name) ? RegExp.$1.toLowerCase() : "";
|
|
96
|
+
if (ext && ".jrxml".includes(ext))
|
|
97
|
+
isJrxml = true;
|
|
98
|
+
if (ext && ".jasper".includes(ext))
|
|
99
|
+
isJasper = true;
|
|
100
|
+
});
|
|
101
|
+
if (isJrxml && isJasper)
|
|
76
102
|
return true;
|
|
77
|
-
|
|
78
|
-
let rExt = /\.([^.]+)$/;
|
|
79
|
-
let ext = rExt.exec(file.name) ? RegExp.$1.toLowerCase() : "";
|
|
80
|
-
res = format.includes(ext);
|
|
81
|
-
return res;
|
|
103
|
+
return false;
|
|
82
104
|
}
|
|
83
105
|
expose({
|
|
84
106
|
submit
|
|
@@ -96,46 +118,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
118
|
default: withCtx(() => [
|
|
97
119
|
createVNode(unref(NSpace), { vertical: "" }, {
|
|
98
120
|
default: withCtx(() => [
|
|
99
|
-
(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}, null, 8, ["component"])
|
|
116
|
-
]),
|
|
117
|
-
createVNode(unref(NText), { style: { "font-size": "14px" } }, {
|
|
118
|
-
default: withCtx(() => [
|
|
119
|
-
createTextVNode("\u70B9\u51FB\u6216\u8005\u62D6\u52A8\u6587\u4EF6\u5230\u8BE5\u533A\u57DF\u6765\u4E0A\u4F20")
|
|
120
|
-
]),
|
|
121
|
-
_: 1
|
|
122
|
-
}),
|
|
123
|
-
createVNode(unref(NP), {
|
|
124
|
-
depth: "3",
|
|
125
|
-
style: { "margin": "5px 0 0 0" }
|
|
126
|
-
}, {
|
|
127
|
-
default: withCtx(() => [
|
|
128
|
-
createTextVNode("xxxxxx." + toDisplayString(file.key), 1)
|
|
129
|
-
]),
|
|
130
|
-
_: 2
|
|
131
|
-
}, 1024)
|
|
121
|
+
createVNode(unref(NUpload), {
|
|
122
|
+
multiple: "",
|
|
123
|
+
"directory-dnd": "",
|
|
124
|
+
"file-list": fileList.value,
|
|
125
|
+
"onUpdate:file-list": _cache[0] || (_cache[0] = ($event) => fileList.value = $event),
|
|
126
|
+
onRemove
|
|
127
|
+
}, {
|
|
128
|
+
default: withCtx(() => [
|
|
129
|
+
createVNode(unref(NUploadDragger), null, {
|
|
130
|
+
default: withCtx(() => [
|
|
131
|
+
createElementVNode("div", _hoisted_1, [
|
|
132
|
+
createVNode(unref(NIcon), {
|
|
133
|
+
size: "36",
|
|
134
|
+
depth: 3,
|
|
135
|
+
component: unref(Archive)
|
|
136
|
+
}, null, 8, ["component"])
|
|
132
137
|
]),
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
createVNode(unref(NText), { style: { "font-size": "12px" } }, {
|
|
139
|
+
default: withCtx(() => [
|
|
140
|
+
createTextVNode("\u70B9\u51FB\u6216\u8005\u62D6\u52A8\u6587\u4EF6\u5230\u8BE5\u533A\u57DF\u6765\u4E0A\u4F20")
|
|
141
|
+
]),
|
|
142
|
+
_: 1
|
|
143
|
+
}),
|
|
144
|
+
createVNode(unref(NP), {
|
|
145
|
+
depth: "3",
|
|
146
|
+
style: { "margin": "5px 0 0 0", "font-size": "13px" }
|
|
147
|
+
}, {
|
|
148
|
+
default: withCtx(() => [
|
|
149
|
+
createTextVNode("\u81F3\u5C11\u5305\u542B\u4E00\u4E2Ajxml\u6587\u4EF6\u548C\u4E00\u4E2Ajasper\u6587\u4EF6")
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
})
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
})
|
|
156
|
+
]),
|
|
157
|
+
_: 1
|
|
158
|
+
}, 8, ["file-list"])
|
|
139
159
|
]),
|
|
140
160
|
_: 1
|
|
141
161
|
})
|
|
@@ -358,59 +358,69 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
358
358
|
readonly ignorePathChange: boolean;
|
|
359
359
|
}>;
|
|
360
360
|
NInput: any;
|
|
361
|
-
EditFormat: import("vue").DefineComponent<{
|
|
361
|
+
EditFormat: import("vue").DefineComponent<{
|
|
362
|
+
formatId: {
|
|
363
|
+
type: StringConstructor;
|
|
364
|
+
required: false;
|
|
365
|
+
};
|
|
366
|
+
token: {
|
|
367
|
+
type: StringConstructor;
|
|
368
|
+
required: true;
|
|
369
|
+
};
|
|
370
|
+
}, {
|
|
362
371
|
PROTOCOL: string;
|
|
363
372
|
HOST: string;
|
|
373
|
+
BASEURL: string;
|
|
364
374
|
SAVEIREPORT: string;
|
|
375
|
+
QUERYFILELIST: string;
|
|
376
|
+
DELETEFILE: string;
|
|
365
377
|
instance: import("axios").AxiosInstance;
|
|
366
378
|
$message: import("naive-ui").MessageApi;
|
|
379
|
+
props: {
|
|
380
|
+
formatId?: string | undefined;
|
|
381
|
+
token: string;
|
|
382
|
+
};
|
|
367
383
|
fileList: import("vue").Ref<{
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
type?: string | null | undefined;
|
|
401
|
-
fullPath?: string | null | undefined;
|
|
402
|
-
}[];
|
|
384
|
+
id: string;
|
|
385
|
+
name: string;
|
|
386
|
+
batchId?: string | null | undefined;
|
|
387
|
+
percentage?: number | null | undefined;
|
|
388
|
+
status: "error" | "pending" | "uploading" | "finished" | "removed";
|
|
389
|
+
url?: string | null | undefined;
|
|
390
|
+
file?: {
|
|
391
|
+
readonly lastModified: number;
|
|
392
|
+
readonly name: string;
|
|
393
|
+
readonly webkitRelativePath: string;
|
|
394
|
+
readonly size: number;
|
|
395
|
+
readonly type: string;
|
|
396
|
+
arrayBuffer: {
|
|
397
|
+
(): Promise<ArrayBuffer>;
|
|
398
|
+
(): Promise<ArrayBuffer>;
|
|
399
|
+
};
|
|
400
|
+
slice: {
|
|
401
|
+
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
402
|
+
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
403
|
+
};
|
|
404
|
+
stream: {
|
|
405
|
+
(): ReadableStream<Uint8Array>;
|
|
406
|
+
(): NodeJS.ReadableStream;
|
|
407
|
+
};
|
|
408
|
+
text: {
|
|
409
|
+
(): Promise<string>;
|
|
410
|
+
(): Promise<string>;
|
|
411
|
+
};
|
|
412
|
+
} | null | undefined;
|
|
413
|
+
thumbnailUrl?: string | null | undefined;
|
|
414
|
+
type?: string | null | undefined;
|
|
415
|
+
fullPath?: string | null | undefined;
|
|
403
416
|
}[]>;
|
|
404
|
-
|
|
405
|
-
|
|
417
|
+
queryFileList: () => void;
|
|
418
|
+
onRemove: (options: {
|
|
406
419
|
file: import("naive-ui").UploadFileInfo;
|
|
407
420
|
fileList: import("naive-ui").UploadFileInfo[];
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
fileList: import("naive-ui").UploadFileInfo[];
|
|
412
|
-
}) => Promise<boolean>;
|
|
413
|
-
validateFormat: (file: import("naive-ui").UploadFileInfo, format: string) => boolean;
|
|
421
|
+
}) => Promise<unknown>;
|
|
422
|
+
submit: (datas: import("../../../../shared/types").AnyObject) => Promise<unknown>;
|
|
423
|
+
validateFormat: () => boolean;
|
|
414
424
|
NForm: any;
|
|
415
425
|
NFormItem: import("vue").DefineComponent<{
|
|
416
426
|
readonly label: StringConstructor;
|
|
@@ -1578,7 +1588,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1578
1588
|
}>;
|
|
1579
1589
|
NSpace: any;
|
|
1580
1590
|
Archive: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1581
|
-
},
|
|
1591
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1592
|
+
formatId: {
|
|
1593
|
+
type: StringConstructor;
|
|
1594
|
+
required: false;
|
|
1595
|
+
};
|
|
1596
|
+
token: {
|
|
1597
|
+
type: StringConstructor;
|
|
1598
|
+
required: true;
|
|
1599
|
+
};
|
|
1600
|
+
}>>, {}>;
|
|
1582
1601
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "success" | "update:modelValue")[], "close" | "success" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1583
1602
|
verifyUser: {
|
|
1584
1603
|
type: FunctionConstructor;
|
|
@@ -71,12 +71,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
73
|
const submitEditFile = async () => {
|
|
74
|
-
var _a;
|
|
74
|
+
var _a, _b;
|
|
75
75
|
try {
|
|
76
76
|
loading.value = true;
|
|
77
|
-
const data = await ((
|
|
77
|
+
const data = await ((_b = editFormRef.value) == null ? void 0 : _b.submit({
|
|
78
78
|
authorizationKey: token.value,
|
|
79
|
-
id: props.formatId,
|
|
79
|
+
id: (_a = props.formatId) == null ? void 0 : _a.split("_")[1],
|
|
80
80
|
templateId: props.templateId,
|
|
81
81
|
datasourceName: null,
|
|
82
82
|
dataSourceId: null
|
|
@@ -117,7 +117,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
117
117
|
key: 0,
|
|
118
118
|
ref_key: "editFormRef",
|
|
119
119
|
ref: editFormRef
|
|
120
|
-
}, _ctx.$attrs
|
|
120
|
+
}, _ctx.$attrs, {
|
|
121
|
+
formatId: __props.formatId,
|
|
122
|
+
token: token.value
|
|
123
|
+
}), null, 16, ["formatId", "token"])) : (openBlock(), createBlock(unref(NForm), {
|
|
121
124
|
key: 1,
|
|
122
125
|
class: "login-form-button-print",
|
|
123
126
|
ref_key: "formRef",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.dropdown-button{border-color:#d5d5d5!important;color:#212121}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.c-button-preview-modal{max-width:none}.c-button-preview-modal .n-dialog__content{height:98%}
|
|
1
|
+
.dropdown-button{border-color:#d5d5d5!important;color:#212121}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}.n-dialog.n-modal.c-button-preview-modal{max-width:none}.n-dialog.n-modal.c-button-preview-modal .n-dialog__content{height:98%}
|
|
@@ -250,6 +250,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
function drawPolyLine(item, dataIndex, scaleValue) {
|
|
253
|
+
var _a;
|
|
253
254
|
const {
|
|
254
255
|
type,
|
|
255
256
|
riseStyle = {},
|
|
@@ -264,7 +265,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
264
265
|
const pointList = [];
|
|
265
266
|
const lineList = [];
|
|
266
267
|
const otherList = [];
|
|
267
|
-
item.list.forEach((v, index) => {
|
|
268
|
+
(_a = item.list) == null ? void 0 : _a.forEach((v, index) => {
|
|
268
269
|
const _item = type !== "temperature" ? item : dataList.find((_v) => _v.key === v.key);
|
|
269
270
|
const points = getPointer(v, scaleValue);
|
|
270
271
|
const otherObj = {};
|
|
@@ -311,7 +312,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
311
312
|
};
|
|
312
313
|
}
|
|
313
314
|
function drawOther(points, v, _item, otherObj) {
|
|
314
|
-
var
|
|
315
|
+
var _a2;
|
|
315
316
|
if (!(points == null ? void 0 : points.length) || !["temperature", "pain"].includes(type))
|
|
316
317
|
return;
|
|
317
318
|
const { lineAttr = {} } = _item;
|
|
@@ -355,7 +356,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
355
356
|
...reduceStyle.line,
|
|
356
357
|
...defaultStyle
|
|
357
358
|
});
|
|
358
|
-
reducePoint = drawPoint(((
|
|
359
|
+
reducePoint = drawPoint(((_a2 = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _a2.type) || "circle", {
|
|
359
360
|
left: points[0],
|
|
360
361
|
top: reduceY,
|
|
361
362
|
...reduceStyle.point,
|
|
@@ -658,9 +659,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
658
659
|
}
|
|
659
660
|
function redrawPoints() {
|
|
660
661
|
var _a;
|
|
661
|
-
|
|
662
|
-
return;
|
|
663
|
-
(_a = canvas.value) == null ? void 0 : _a.remove(...getRemovePoints([...gridPoints]));
|
|
662
|
+
gridPoints.size && ((_a = canvas.value) == null ? void 0 : _a.remove(...getRemovePoints([...gridPoints])));
|
|
664
663
|
shadowPointCache = [];
|
|
665
664
|
gridPoints.clear();
|
|
666
665
|
maiboPoints.clear();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onMounted, nextTick } from 'vue';
|
|
2
2
|
import { fabric } from '../utils/index.js';
|
|
3
|
-
import { drawLine } from './useDraw.js';
|
|
3
|
+
import { drawLine, defaultBorderStyle } from './useDraw.js';
|
|
4
4
|
|
|
5
5
|
function useGrid(canvas, propItems) {
|
|
6
6
|
var _a, _b;
|
|
@@ -25,10 +25,10 @@ function useGrid(canvas, propItems) {
|
|
|
25
25
|
style = grid.subSecondLineStyle || {};
|
|
26
26
|
}
|
|
27
27
|
if (i % grid.subXCell === 0) {
|
|
28
|
-
style = ((_b = grid.mainLineStyle) == null ? void 0 : _b.y) || {};
|
|
28
|
+
style = i !== 0 && i !== gridXNumber ? ((_b = grid.mainLineStyle) == null ? void 0 : _b.y) || {} : defaultBorderStyle;
|
|
29
29
|
}
|
|
30
30
|
const line = drawLine([x, originY, x, endY], style);
|
|
31
|
-
if (i % grid.subXCell === 0) {
|
|
31
|
+
if (i % grid.subXCell === 0 && i !== 0 && i !== gridXNumber) {
|
|
32
32
|
mainList.add(line);
|
|
33
33
|
} else {
|
|
34
34
|
xList.push(line);
|
|
@@ -16,7 +16,7 @@ export { useAnchor } from './src/hooks/useAnchor.js';
|
|
|
16
16
|
export { useAutographOptions } from './src/hooks/useAutographOptions.js';
|
|
17
17
|
export { useFormContext } from './src/hooks/useFormContext.js';
|
|
18
18
|
export { useCommonInjection, useSelectOptionProps } from './src/hooks/useCommonInjection.js';
|
|
19
|
-
export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, formRenderLog, injectOrProvide, isNestedFieldType, isNestedType, mergeDeepProperties,
|
|
19
|
+
export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, formRenderLog, injectOrProvide, isNestedFieldType, isNestedType, mergeDeepProperties, optionMatcherWithKeyword, parseNumberFromMaybeString, presetRequestHandler, splitExtendKey, validateMessageParser } from './src/utils/index.js';
|
|
20
20
|
export * from '@formily/core';
|
|
21
21
|
export { businessDateParser, isIdCard, isMobile, parseAge2Birthday, parseAge2FromContext, parseBirthday, parseIdCard, transformDateFormat } from './src/utils/business.js';
|
|
22
22
|
export { findNextWidget, queryDecorator, queryInput } from './src/utils/dom.js';
|
|
@@ -5,7 +5,7 @@ import { useCommonInjection, useSelectOptionProps } from '../../hooks/useCommonI
|
|
|
5
5
|
import { InjectionAsyncQueue, InjectionChangeContextCollector, InjectionFormItemDepsCollector } from '../../constants/index.js';
|
|
6
6
|
import '../../../../../shared/utils/index.js';
|
|
7
7
|
import '../../../index.js';
|
|
8
|
-
import { createUrlConfigParams, formRenderLog,
|
|
8
|
+
import { createUrlConfigParams, formRenderLog, optionMatcherWithKeyword } from '../../utils/index.js';
|
|
9
9
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
10
10
|
import '../../../../../shared/utils/tapable/SyncHook.js';
|
|
11
11
|
import '../../../../../shared/utils/tapable/SyncBailHook.js';
|
|
@@ -91,10 +91,10 @@ const script = defineComponent({
|
|
|
91
91
|
}, 300);
|
|
92
92
|
const parsedOptions = computed(() => {
|
|
93
93
|
if (remoteOptions.value)
|
|
94
|
-
return
|
|
94
|
+
return optionMatcherWithKeyword(remoteOptions.value, lastSearch.value, labelKey.value);
|
|
95
95
|
if (!Array.isArray(props.options))
|
|
96
96
|
return [];
|
|
97
|
-
return
|
|
97
|
+
return optionMatcherWithKeyword(props.options, lastSearch.value, labelKey.value);
|
|
98
98
|
});
|
|
99
99
|
const changeContextCollector = inject(InjectionChangeContextCollector);
|
|
100
100
|
changeContextCollector.setContext(fieldKey.value, (v) => {
|
|
@@ -3,7 +3,7 @@ import { isString, isEqual } from 'lodash-es';
|
|
|
3
3
|
import { getCurrentInstance, inject, computed, ref, watch } from 'vue';
|
|
4
4
|
import '../../index.js';
|
|
5
5
|
import { InjectionAsyncQueue } from '../constants/index.js';
|
|
6
|
-
import { formRenderLog,
|
|
6
|
+
import { formRenderLog, optionMatcherWithKeyword } from '../utils/index.js';
|
|
7
7
|
import { useFormField } from './useFormField.js';
|
|
8
8
|
import { useFormRequest } from './useFormRequest.js';
|
|
9
9
|
|
|
@@ -50,7 +50,7 @@ function useAutographOptions(props, valueRef) {
|
|
|
50
50
|
}, 300);
|
|
51
51
|
const options = computed(() => {
|
|
52
52
|
var _a;
|
|
53
|
-
return remoteOptions.value ?
|
|
53
|
+
return remoteOptions.value ? optionMatcherWithKeyword(remoteOptions.value, lastSearch.value, labelKey.value) : (_a = props.options) != null ? _a : [];
|
|
54
54
|
});
|
|
55
55
|
watch(
|
|
56
56
|
() => props.wordbook,
|
|
@@ -13,8 +13,8 @@ export declare function createSlot(renderer: unknown, props: AnyObject, defaultR
|
|
|
13
13
|
default(): any;
|
|
14
14
|
};
|
|
15
15
|
export declare function createInputSlot(props: AnyObject, defaultRenderer?: (v: unknown) => unknown[]): import("vue").ComputedRef<Record<string, FunctionalComponent<{}, {}>>>;
|
|
16
|
-
export declare function presetRequestHandler(res: unknown):
|
|
17
|
-
export declare function
|
|
16
|
+
export declare function presetRequestHandler(res: unknown): AnyObject[];
|
|
17
|
+
export declare function optionMatcherWithKeyword(options: AnyObject[], input: Nullable<string>, key: string, matcherOption?: {
|
|
18
18
|
keyword?: string;
|
|
19
19
|
}): AnyObject[];
|
|
20
20
|
export declare function validateMessageParser(message: string, fieldItem: Omit<FieldItem, 'reactions'>): string;
|
|
@@ -83,7 +83,10 @@ function createInputSlot(props, defaultRenderer) {
|
|
|
83
83
|
function presetRequestHandler(res) {
|
|
84
84
|
if (!isObject(res))
|
|
85
85
|
throw res;
|
|
86
|
-
return res
|
|
86
|
+
return isSearchResult(res) ? handlerSearch(res) : isRecommendResult(res) ? handlerRecommend(res) : isSelectResult(res) ? handlerSelect(res) : [];
|
|
87
|
+
function isSelectResult(res2) {
|
|
88
|
+
return Reflect.has(res2, "data") && Reflect.has(res2, "success");
|
|
89
|
+
}
|
|
87
90
|
function handlerSelect(res2) {
|
|
88
91
|
const {
|
|
89
92
|
data,
|
|
@@ -93,6 +96,9 @@ function presetRequestHandler(res) {
|
|
|
93
96
|
throw res2;
|
|
94
97
|
return data;
|
|
95
98
|
}
|
|
99
|
+
function isSearchResult(res2) {
|
|
100
|
+
return Reflect.has(res2, "map") && Reflect.has(res2, "result");
|
|
101
|
+
}
|
|
96
102
|
function handlerSearch(res2) {
|
|
97
103
|
const {
|
|
98
104
|
result,
|
|
@@ -102,6 +108,24 @@ function presetRequestHandler(res) {
|
|
|
102
108
|
throw res2;
|
|
103
109
|
return map.rows;
|
|
104
110
|
}
|
|
111
|
+
function isRecommendResult(res2) {
|
|
112
|
+
return Reflect.has(res2, "result") && Reflect.has(res2, "obj");
|
|
113
|
+
}
|
|
114
|
+
function handlerRecommend(res2) {
|
|
115
|
+
const {
|
|
116
|
+
obj,
|
|
117
|
+
result
|
|
118
|
+
} = res2;
|
|
119
|
+
if (result !== "SUCCESS" || !isObject(obj))
|
|
120
|
+
throw res2;
|
|
121
|
+
return Object.entries(obj).reduce((res3, [type, list]) => {
|
|
122
|
+
list.forEach((item) => res3.push({
|
|
123
|
+
...item,
|
|
124
|
+
type
|
|
125
|
+
}));
|
|
126
|
+
return res3;
|
|
127
|
+
}, []);
|
|
128
|
+
}
|
|
105
129
|
}
|
|
106
130
|
const keywordMatcher = useMemoize(function(text, keyword) {
|
|
107
131
|
if (!isString(keyword) || !isString(text))
|
|
@@ -114,7 +138,7 @@ const keywordMatcher = useMemoize(function(text, keyword) {
|
|
|
114
138
|
}, "");
|
|
115
139
|
}
|
|
116
140
|
});
|
|
117
|
-
function
|
|
141
|
+
function optionMatcherWithKeyword(options, input, key, matcherOption = {
|
|
118
142
|
keyword: "keyword"
|
|
119
143
|
}) {
|
|
120
144
|
if (!input)
|
|
@@ -228,4 +252,4 @@ async function createUrlConfigParams({
|
|
|
228
252
|
};
|
|
229
253
|
}
|
|
230
254
|
|
|
231
|
-
export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, formRenderLog, injectOrProvide, isNestedFieldType, isNestedType, mergeDeepProperties,
|
|
255
|
+
export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, formRenderLog, injectOrProvide, isNestedFieldType, isNestedType, mergeDeepProperties, optionMatcherWithKeyword, parseNumberFromMaybeString, presetRequestHandler, splitExtendKey, validateMessageParser };
|