cnhis-design-vue 3.1.30-beta.7 → 3.1.30
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/components/button-print/index.d.ts +1268 -0
- package/es/components/button-print/index.js +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1269 -3
- package/es/components/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +86 -44
- package/es/components/button-print/src/components/IdentityVerification.js +42 -11
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1253 -0
- package/es/components/button-print/src/components/edit.js +142 -0
- package/es/components/button-print/src/components/edit.vue.d.ts +1237 -0
- package/es/components/button-print/src/utils/browserPrint.d.ts +1 -0
- package/es/components/button-print/src/utils/browserPrint.js +40 -0
- package/es/components/button-print/src/utils/index.d.ts +1 -0
- package/es/components/button-print/src/utils/index.js +1 -0
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +6 -2
- package/es/components/iho-table/index.js +1 -0
- package/es/components/iho-table/src/IhoTable.js +8 -4
- package/es/components/iho-table/src/IhoTable.vue.d.ts +6 -2
- package/es/components/iho-table/src/components/IhoTableColumn.js +3 -3
- package/es/components/iho-table/src/constants/index.d.ts +1 -1
- package/es/components/iho-table/src/constants/index.js +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterPlugin/filter.d.ts +23 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.js +99 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +80 -0
- package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +14 -0
- package/es/components/iho-table/src/plugins/filterPlugin/types.js +8 -0
- package/es/components/iho-table/src/plugins/index.js +14 -12
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +4 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +14 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +12 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +5 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +14 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +15 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +12 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +8 -2
- package/es/components/iho-table/src/types/index.d.ts +28 -10
- package/es/components/iho-table/src/utils/index.d.ts +4 -1
- package/es/components/iho-table/src/utils/index.js +7 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -0
- package/es/shared/types/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode, createElementBlock, Fragment, renderList, createElementVNode, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { useMessage, NForm, NFormItem, NSpace, NUpload, NUploadDragger, NIcon, NText, NP } from 'naive-ui';
|
|
3
|
+
import { Archive } from '@vicons/ionicons5';
|
|
4
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
5
|
+
|
|
6
|
+
const _hoisted_1 = { style: { "margin-bottom": "12px" } };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "edit",
|
|
9
|
+
props: {
|
|
10
|
+
saveIReportFormat: { type: Function, default: () => Promise.resolve() }
|
|
11
|
+
},
|
|
12
|
+
setup(__props, { expose }) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const $message = useMessage();
|
|
15
|
+
const fileList = ref([
|
|
16
|
+
{
|
|
17
|
+
key: "jrxml",
|
|
18
|
+
value: []
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
key: "jasper",
|
|
22
|
+
value: []
|
|
23
|
+
}
|
|
24
|
+
]);
|
|
25
|
+
function submit(token) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
var _a, _b, _c, _d;
|
|
28
|
+
const isOk = fileList.value.every((file) => file.value.length > 0);
|
|
29
|
+
if (!isOk) {
|
|
30
|
+
$message.warning("\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const params = {
|
|
34
|
+
jrxml: (_b = (_a = fileList.value.find((file) => file.key === "jrxml")) == null ? void 0 : _a.value) == null ? void 0 : _b[0],
|
|
35
|
+
jasper: (_d = (_c = fileList.value.find((file) => file.key === "jasper")) == null ? void 0 : _c.value) == null ? void 0 : _d[0],
|
|
36
|
+
authorizationKey: token
|
|
37
|
+
};
|
|
38
|
+
props.saveIReportFormat(params).then((data = {}) => {
|
|
39
|
+
if ((data == null ? void 0 : data.result) !== "SUCCESS") {
|
|
40
|
+
$message.error((data == null ? void 0 : data.resultMsg) || "\u4E0A\u4F20\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01");
|
|
41
|
+
reject();
|
|
42
|
+
} else {
|
|
43
|
+
resolve("SUCCESS");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function onChange(data, index) {
|
|
49
|
+
fileList.value[index].value = data.fileList;
|
|
50
|
+
}
|
|
51
|
+
async function onBeforeUpload(data) {
|
|
52
|
+
if (!validateFormat(data.file, ".jrxml,.jasper")) {
|
|
53
|
+
$message.warning("\u53EA\u80FD\u4E0A\u4F20.jrxml\u6216\u8005.jasper\u683C\u5F0F\u7684\u6587\u4EF6\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20");
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
function validateFormat(file, format) {
|
|
59
|
+
let res = false;
|
|
60
|
+
if (!format || format.includes("*")) {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
let list = format.split(",");
|
|
64
|
+
if (!list.length) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
let rExt = /\.([^.]+)$/;
|
|
68
|
+
let ext = rExt.exec(file.name) ? RegExp.$1.toLowerCase() : "";
|
|
69
|
+
res = format.includes(ext);
|
|
70
|
+
return res;
|
|
71
|
+
}
|
|
72
|
+
expose({
|
|
73
|
+
submit
|
|
74
|
+
});
|
|
75
|
+
return (_ctx, _cache) => {
|
|
76
|
+
return openBlock(), createBlock(unref(NForm), {
|
|
77
|
+
"label-placement": "left",
|
|
78
|
+
"label-width": 75
|
|
79
|
+
}, {
|
|
80
|
+
default: withCtx(() => [
|
|
81
|
+
createVNode(unref(NFormItem), {
|
|
82
|
+
label: "\u683C\u5F0F\u6587\u4EF6:",
|
|
83
|
+
path: "file"
|
|
84
|
+
}, {
|
|
85
|
+
default: withCtx(() => [
|
|
86
|
+
createVNode(unref(NSpace), { vertical: "" }, {
|
|
87
|
+
default: withCtx(() => [
|
|
88
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (file, index) => {
|
|
89
|
+
return openBlock(), createBlock(unref(NUpload), {
|
|
90
|
+
"directory-dnd": "",
|
|
91
|
+
max: 1,
|
|
92
|
+
key: file.key,
|
|
93
|
+
onBeforeUpload,
|
|
94
|
+
onChange: (data) => onChange(data, index)
|
|
95
|
+
}, {
|
|
96
|
+
default: withCtx(() => [
|
|
97
|
+
createVNode(unref(NUploadDragger), null, {
|
|
98
|
+
default: withCtx(() => [
|
|
99
|
+
createElementVNode("div", _hoisted_1, [
|
|
100
|
+
createVNode(unref(NIcon), {
|
|
101
|
+
size: "36",
|
|
102
|
+
depth: 3,
|
|
103
|
+
component: unref(Archive)
|
|
104
|
+
}, null, 8, ["component"])
|
|
105
|
+
]),
|
|
106
|
+
createVNode(unref(NText), { style: { "font-size": "14px" } }, {
|
|
107
|
+
default: withCtx(() => [
|
|
108
|
+
createTextVNode("\u70B9\u51FB\u6216\u8005\u62D6\u52A8\u6587\u4EF6\u5230\u8BE5\u533A\u57DF\u6765\u4E0A\u4F20")
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
}),
|
|
112
|
+
createVNode(unref(NP), {
|
|
113
|
+
depth: "3",
|
|
114
|
+
style: { "margin": "5px 0 0 0" }
|
|
115
|
+
}, {
|
|
116
|
+
default: withCtx(() => [
|
|
117
|
+
createTextVNode("xxxxxx." + toDisplayString(file.key), 1)
|
|
118
|
+
]),
|
|
119
|
+
_: 2
|
|
120
|
+
}, 1024)
|
|
121
|
+
]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, 1024)
|
|
124
|
+
]),
|
|
125
|
+
_: 2
|
|
126
|
+
}, 1032, ["onChange"]);
|
|
127
|
+
}), 128))
|
|
128
|
+
]),
|
|
129
|
+
_: 1
|
|
130
|
+
})
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
})
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
var EditForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "edit.vue"]]);
|
|
141
|
+
|
|
142
|
+
export { EditForm as default };
|