cui-print 1.0.28
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 +29 -0
- package/dist/font/iconfont.css +151 -0
- package/dist/font/iconfont.js +1 -0
- package/dist/font/iconfont.json +247 -0
- package/dist/font/iconfont.ttf +0 -0
- package/dist/font/iconfont.woff +0 -0
- package/dist/font/iconfont.woff2 +0 -0
- package/dist/index.css +1 -0
- package/dist/index.es.js +51053 -0
- package/dist/index.umd.js +1030 -0
- package/dist/print-designer-api/create-style/create-base-component-style.js +116 -0
- package/dist/print-designer-api/create-style/create-complex-table-style.js +472 -0
- package/dist/print-designer-api/create-style/create-form-component-style.js +78 -0
- package/dist/print-designer-api/create-style/create-form-item-style.js +144 -0
- package/dist/print-designer-api/create-style/create-grid-style.js +49 -0
- package/dist/print-designer-api/create-style/create-table-layout-style.js +128 -0
- package/dist/print-designer-api/create-style/create-table-style.js +93 -0
- package/dist/print-designer-api/print-designer-helper.js +912 -0
- package/dist/print-designer-api/print-designer-style-helper.js +96 -0
- package/dist/print-designer-api/print-designer-utils.js +27 -0
- package/dist/print-designer-api/print-global-style/base.less +20 -0
- package/dist/print-designer-api/print-global-style/common.less +3 -0
- package/dist/print-designer-api/print-global-style/custom.less +4 -0
- package/dist/print-designer-api/print-global-style/index.css +812 -0
- package/dist/print-designer-api/print-global-style/index.js +813 -0
- package/dist/print-designer-api/print-global-style/index.less +9 -0
- package/dist/print-designer-api/print-global-style/print-base-component.less +123 -0
- package/dist/print-designer-api/print-global-style/print-container.less +57 -0
- package/dist/print-designer-api/print-global-style/print-continue/index.less +14 -0
- package/dist/print-designer-api/print-global-style/print-continue/print-complex-table/auto-continue-not-span.less +61 -0
- package/dist/print-designer-api/print-global-style/print-continue/print-complex-table/auto-continue-preview.less +12 -0
- package/dist/print-designer-api/print-global-style/print-continue/print-complex-table/auto-continue-span.less +88 -0
- package/dist/print-designer-api/print-global-style/print-continue/print-complex-table/fixed-continue.less +37 -0
- package/dist/print-designer-api/print-global-style/print-continue/print-complex-table/index.less +96 -0
- package/dist/print-designer-api/print-global-style/print-continue/print-complex-table/pagination-preview.less +12 -0
- package/dist/print-designer-api/print-global-style/print-continue/print-complex-table/pagination.less +61 -0
- package/dist/print-designer-api/print-global-style/print-form-component.less +161 -0
- package/dist/print-designer-api/print-global-style/print-form-item.less +162 -0
- package/dist/print-designer-api/print-global-style/printing.less +16 -0
- package/dist/print-designer-api/print-soket.js +31 -0
- package/dist/print-designer-api/use-create-html/create-html-utils.js +43 -0
- package/dist/print-designer-api/use-create-html/index.js +287 -0
- package/dist/print-designer-api/use-create-html/use-base-component-helper.js +129 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/complex-table-tools.js +129 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/create-table-header.js +111 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/index.js +87 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/use-auto-height-preview.js +84 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/use-auto-height.js +379 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/use-default.js +75 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/use-fixed-height.js +220 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/use-pagination-preview.js +84 -0
- package/dist/print-designer-api/use-create-html/use-complex-table-helper/use-pagination.js +272 -0
- package/dist/print-designer-api/use-create-html/use-form-component-helper.js +164 -0
- package/dist/print-designer-api/use-create-html/use-format/index.js +102 -0
- package/dist/print-designer-api/use-create-html/use-format/use-complex-table-auto.js +337 -0
- package/dist/print-designer-api/use-create-html/use-format/use-complex-table-fiexd.js +233 -0
- package/dist/print-designer-api/use-create-html/use-format/use-complex-table-pagination.js +286 -0
- package/dist/print-designer-api/use-create-html/use-grid-helper.js +35 -0
- package/dist/print-designer-api/use-create-html/use-table-layout-helper.js +213 -0
- package/dist/print-designer-api/use-create-print-js/index.js +147 -0
- package/dist/print-designer-api/use-create-print-js/use-base-component-helper.js +54 -0
- package/dist/print-designer-api/use-create-print-js/use-form-component-helper.js +4 -0
- package/dist/print-designer-api/use-create-print-js/use-table-layout-helper.js +5 -0
- package/dist/print-designer-images/demo.jpg +0 -0
- package/dist/print-designer-images/demo02.jpg +0 -0
- package/dist/style/default-style.css +137 -0
- package/dist/style/main.less +66 -0
- package/dist/test/base/designer-config.js +594 -0
- package/dist/test/base/index.js +3 -0
- package/dist/test/base/print-data.js +40 -0
- package/dist/test/complex-table/designer-config.js +1668 -0
- package/dist/test/complex-table/index.js +3 -0
- package/dist/test/complex-table/print-data.js +294 -0
- package/dist/test/form/designer-config.js +2057 -0
- package/dist/test/form/index.js +3 -0
- package/dist/test/form/print-data.js +38 -0
- package/dist/test/index.js +4 -0
- package/dist/wui-print-designer-plugins/JsBarcode.all.min.js +2 -0
- package/dist/wui-print-designer-plugins/qrcode.min.js +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { deepCopy } from "../print-designer-utils";
|
|
2
|
+
export default ({ printData = {}, layoutConfig } = {}) => {
|
|
3
|
+
const createBarcodeJsString = (componentItem) => {
|
|
4
|
+
let componentItemProps = deepCopy(componentItem.props);
|
|
5
|
+
let notFormatKeyList = ["field"];
|
|
6
|
+
Object.keys(componentItemProps).forEach((key, index) => {
|
|
7
|
+
if (notFormatKeyList.indexOf(key) >= 0) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (typeof componentItemProps[key] == "string") {
|
|
11
|
+
componentItemProps[key] = `"${componentItemProps[key]}"`;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
let nowBarcodeValue = printData[componentItemProps.field];
|
|
15
|
+
if (!nowBarcodeValue && nowBarcodeValue !== 0) {
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
let barcodeJsString = `JsBarcode('[name="barcode_${componentItem.id}"]', ${printData[componentItemProps.field]},{
|
|
19
|
+
format: ${componentItemProps.format},
|
|
20
|
+
lineColor:${componentItemProps.lineColor},
|
|
21
|
+
background: ${componentItemProps.background},
|
|
22
|
+
width: ${componentItemProps.width},
|
|
23
|
+
height: ${componentItemProps.height},
|
|
24
|
+
displayValue: ${componentItemProps.displayValue},
|
|
25
|
+
fontSize: ${componentItemProps.fontSize},
|
|
26
|
+
margin: ${componentItemProps.margin},
|
|
27
|
+
textAlign: ${componentItemProps.textAlign},
|
|
28
|
+
textPosition: ${componentItemProps.textPosition}
|
|
29
|
+
});\n`;
|
|
30
|
+
return barcodeJsString;
|
|
31
|
+
};
|
|
32
|
+
const creatQrcodeJsString = (componentItem) => {
|
|
33
|
+
let componentItemProps = deepCopy(componentItem.props);
|
|
34
|
+
let notFormatKeyList = ["field"];
|
|
35
|
+
Object.keys(componentItemProps).forEach((key, index) => {
|
|
36
|
+
if (notFormatKeyList.indexOf(key) >= 0) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (typeof componentItemProps[key] == "string") {
|
|
40
|
+
componentItemProps[key] = `"${componentItemProps[key]}"`;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
let qrcodeJsString = `createQRCode('qrcode_${componentItem.id}',{
|
|
44
|
+
text: "${printData[componentItemProps.field]}",
|
|
45
|
+
width: ${componentItemProps.width},
|
|
46
|
+
height: ${componentItemProps.height}
|
|
47
|
+
});\n`;
|
|
48
|
+
return qrcodeJsString;
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
createBarcodeJsString,
|
|
52
|
+
creatQrcodeJsString
|
|
53
|
+
};
|
|
54
|
+
};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--wui-print-theme-color: #005089;
|
|
3
|
+
--wui-print-border-color: #d0d0d0;
|
|
4
|
+
--wui-print-border-color--light: #ececec;
|
|
5
|
+
--wui-print-border-color--dark: #b5b5b5;
|
|
6
|
+
--wui-print-color--info: #7a7a7a;
|
|
7
|
+
--wui-print-color--default: #333;
|
|
8
|
+
--wui-print-color--primary: #005089;
|
|
9
|
+
--wui-print-color--warning: #cf2600;
|
|
10
|
+
--wui-print-color--success: #0f8204;
|
|
11
|
+
--wui-print-placeholder-color: #a2a2a2;
|
|
12
|
+
}
|
|
13
|
+
.wui-print_common-form .el-form-item {
|
|
14
|
+
margin-bottom: 4px;
|
|
15
|
+
}
|
|
16
|
+
.wui-print_common-form .el-form-item.is-error {
|
|
17
|
+
margin-bottom: 18px;
|
|
18
|
+
}
|
|
19
|
+
.wui-print_common-form .el-form-item.is-required .el-form-item__label {
|
|
20
|
+
color: var(--wui-print-color--primary);
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
}
|
|
23
|
+
.wui-print_common-form .el-form-item.el-form-item--label-top .el-form-item__label {
|
|
24
|
+
width: 100%;
|
|
25
|
+
margin-bottom: 2px;
|
|
26
|
+
}
|
|
27
|
+
.wui-print_common-form .el-form-item .el-form-item__label {
|
|
28
|
+
padding-right: 5px !important;
|
|
29
|
+
}
|
|
30
|
+
.wui-print_common-form .el-form-item .el-form-item__label::before {
|
|
31
|
+
content: "" !important;
|
|
32
|
+
margin-right: 1px !important;
|
|
33
|
+
}
|
|
34
|
+
.wui-print_common-form .el-date-editor.el-input,
|
|
35
|
+
.wui-print_common-form .el-date-editor.el-input__wrapper {
|
|
36
|
+
width: 100% !important;
|
|
37
|
+
}
|
|
38
|
+
.wui-print_common-form .el-select {
|
|
39
|
+
width: 100% !important;
|
|
40
|
+
}
|
|
41
|
+
.wui-print_common-form .el-input-number {
|
|
42
|
+
width: 100% !important;
|
|
43
|
+
}
|
|
44
|
+
.wui-print_common-form .el-cascader {
|
|
45
|
+
width: 100% !important;
|
|
46
|
+
}
|
|
47
|
+
.wui-print_common-form .el-input,
|
|
48
|
+
.wui-print_common-form .el-textarea,
|
|
49
|
+
.wui-print_common-form .el-select {
|
|
50
|
+
--el-input-text-color: #000;
|
|
51
|
+
--el-disabled-text-color: #000;
|
|
52
|
+
}
|
|
53
|
+
.wui-print_common-form .el-checkbox {
|
|
54
|
+
--el-checkbox-text-color: #000;
|
|
55
|
+
}
|
|
56
|
+
.wui-print_common-form.wui-print_common-form--small .el-form-item {
|
|
57
|
+
margin-bottom: 2px;
|
|
58
|
+
}
|
|
59
|
+
.wui-print_common-form.wui-print_common-form--small .el-form-item.is-error {
|
|
60
|
+
margin-bottom: 16px;
|
|
61
|
+
}
|
|
62
|
+
.wui-print_common-form.wui-print_common-form--small .el-form-item .el-form-item__label {
|
|
63
|
+
padding-right: 2px !important;
|
|
64
|
+
}
|
|
65
|
+
.wui-print_common-form.wui-print_common-form--mini .el-form-item {
|
|
66
|
+
margin-bottom: 1px;
|
|
67
|
+
}
|
|
68
|
+
.wui-print_common-form.wui-print_common-form--mini .el-form-item.is-error {
|
|
69
|
+
margin-bottom: 16px;
|
|
70
|
+
}
|
|
71
|
+
.wui-print_common-form.wui-print_common-form--mini .el-form-item .el-form-item__label {
|
|
72
|
+
padding-right: 1px !important;
|
|
73
|
+
}
|
|
74
|
+
.wui-print-el {
|
|
75
|
+
--el-color-primary: #005089;
|
|
76
|
+
--el-color-primary-light-3: #1d7da5;
|
|
77
|
+
--el-color-primary-light-5: #218bb7;
|
|
78
|
+
--el-color-primary-light-7: #1494ca;
|
|
79
|
+
--el-color-primary-light-8: #67d0fb;
|
|
80
|
+
--el-color-primary-light-9: #ddf5ff;
|
|
81
|
+
--el-color-primary-dark-2: #02416d;
|
|
82
|
+
--el-border-color: #a5a5a5;
|
|
83
|
+
--el-text-color-placeholder: var(--wui-placeholder-color);
|
|
84
|
+
--el-disabled-text-color: #656565;
|
|
85
|
+
--el-color-success: #56a72e;
|
|
86
|
+
--el-color-success-light-9: #fbfff8;
|
|
87
|
+
--el-color-warning: #ef810e;
|
|
88
|
+
}
|
|
89
|
+
.wui-print-el .el-button,
|
|
90
|
+
.wui-print-el .el-button--primary,
|
|
91
|
+
.wui-print-el .el-button--success,
|
|
92
|
+
.wui-print-el .el-button--warning,
|
|
93
|
+
.wui-print-el .el-button--danger,
|
|
94
|
+
.wui-print-el .el-button--info {
|
|
95
|
+
--el-button-disabled-bg-color: #d3d3d3;
|
|
96
|
+
--el-button-disabled-border-color: #818181;
|
|
97
|
+
--el-button-disabled-text-color: #040404;
|
|
98
|
+
}
|
|
99
|
+
.wui-print_el-message-box .el-message-box__message p {
|
|
100
|
+
font-size: 16px;
|
|
101
|
+
line-height: 1.6 !important;
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
color: #000;
|
|
104
|
+
word-break: break-all;
|
|
105
|
+
}
|
|
106
|
+
.wui-print_el-message-box.wui-print_el-message-box--large {
|
|
107
|
+
font-size: 20px;
|
|
108
|
+
--el-messagebox-width: 600px;
|
|
109
|
+
}
|
|
110
|
+
.wui-print-color--info {
|
|
111
|
+
color: var(--wui-print-color--info);
|
|
112
|
+
}
|
|
113
|
+
.wui-print-color--default {
|
|
114
|
+
color: var(--wui-print-color--default);
|
|
115
|
+
}
|
|
116
|
+
.wui-print-color--primary {
|
|
117
|
+
color: var(--wui-print-color--primary);
|
|
118
|
+
}
|
|
119
|
+
.wui-print-color--warning {
|
|
120
|
+
color: var(--wui-print-color--warning);
|
|
121
|
+
}
|
|
122
|
+
.wui-print-color--success {
|
|
123
|
+
color: var(--wui-print-color--success);
|
|
124
|
+
}
|
|
125
|
+
.wui-print-hint {
|
|
126
|
+
display: inline-flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
font-weight: bold;
|
|
129
|
+
font-size: 14px;
|
|
130
|
+
}
|
|
131
|
+
.wui-print-hint.wui-print-hint--small {
|
|
132
|
+
font-size: 12px;
|
|
133
|
+
line-height: 14px;
|
|
134
|
+
}
|
|
135
|
+
.wui-print-hint span + span {
|
|
136
|
+
margin-left: 3px;
|
|
137
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
-moz-box-sizing: border-box;
|
|
6
|
+
/* Firefox */
|
|
7
|
+
-webkit-box-sizing: border-box;
|
|
8
|
+
/* Safari */
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
html,
|
|
12
|
+
body {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
color: var(--wui-print-text-color);
|
|
16
|
+
font-family: "Avenir", Helvetica, Arial, sans-serif;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
background: var(--wui-print-background);
|
|
21
|
+
font-size: 13px;
|
|
22
|
+
}
|
|
23
|
+
a {
|
|
24
|
+
text-decoration: none;
|
|
25
|
+
color: var(--wui-print-text-color);
|
|
26
|
+
transition: 0.4s;
|
|
27
|
+
}
|
|
28
|
+
a:hover {
|
|
29
|
+
color: var(--wui-print-hover-color);
|
|
30
|
+
}
|
|
31
|
+
ul {
|
|
32
|
+
list-style-type: none;
|
|
33
|
+
}
|
|
34
|
+
// 禁止图片拖动
|
|
35
|
+
img {
|
|
36
|
+
-webkit-user-drag: none;
|
|
37
|
+
}
|
|
38
|
+
// 设置placeholder样式
|
|
39
|
+
input::placeholder {
|
|
40
|
+
color: var(--wui-print-placeholder-color) !important;
|
|
41
|
+
}
|
|
42
|
+
input::-webkit-input-placeholder {
|
|
43
|
+
/* WebKit, Blink, Edge */
|
|
44
|
+
color: var(--wui-print-placeholder-color) !important;
|
|
45
|
+
}
|
|
46
|
+
:-moz-placeholder {
|
|
47
|
+
/* Mozilla Firefox 4 to 18 */
|
|
48
|
+
color: var(--wui-print-placeholder-color) !important;
|
|
49
|
+
}
|
|
50
|
+
::-moz-placeholder {
|
|
51
|
+
/* Mozilla Firefox 19+ */
|
|
52
|
+
color: var(--wui-print-placeholder-color) !important;
|
|
53
|
+
}
|
|
54
|
+
input:-ms-input-placeholder {
|
|
55
|
+
/* Internet Explorer 10-11 */
|
|
56
|
+
color: var(--wui-print-placeholder-color) !important;
|
|
57
|
+
}
|
|
58
|
+
input::-ms-input-placeholder {
|
|
59
|
+
/* Microsoft Edge */
|
|
60
|
+
color: var(--wui-print-placeholder-color) !important;
|
|
61
|
+
}
|
|
62
|
+
#app {
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
position: relative;
|
|
66
|
+
}
|