@utogether/udp-core 2.0.0-beta.27 → 2.0.0-beta.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.
Files changed (100) hide show
  1. package/dist/{403-gdcH0-Bo.js → 403-CyoOD-Ik.js} +1 -1
  2. package/dist/{404-Se2SF97M.js → 404-Ch_OHTw0.js} +1 -1
  3. package/dist/{500-B6j9AqLo.js → 500-Cf9am7HK.js} +1 -1
  4. package/dist/{AuthorityInfo-CQ8ydZvr.js → AuthorityInfo-BJ427cqG.js} +1 -1
  5. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-C4NRvS8p.js → AuthorityInfo.vue_vue_type_style_index_0_lang-D9y7AwbB.js} +11 -12
  6. package/dist/{Company-BzSVBSC4.js → Company-qo-lKPkv.js} +3 -3
  7. package/dist/{CompanyPanel-DBjZB4aJ.js → CompanyPanel-DkKWAKvY.js} +7 -7
  8. package/dist/{Department-BkgseHo8.js → Department-CHUQByKX.js} +3 -3
  9. package/dist/{DepartmentPanel-Sen93_2M.js → DepartmentPanel-C742dfOO.js} +27 -28
  10. package/dist/{DesignPanel-pqDcwaFC.js → DesignPanel-D9oE5R7m.js} +1 -1
  11. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-BjtYyEw7.js → DesignPanel.vue_vue_type_style_index_0_lang-hYldVEbo.js} +192 -108
  12. package/dist/{DictView-CJLG4LlE.js → DictView-CrFXprP9.js} +1 -1
  13. package/dist/{InvOrganization-D0Jq1IAa.js → InvOrganization-Cz8SzIgs.js} +6 -7
  14. package/dist/{Org-CO_1WT39.js → Org-Bzt6yKox.js} +9 -10
  15. package/dist/{Preview-DLI4Bwel.js → Preview-jonigfMQ.js} +1 -1
  16. package/dist/{ReportDefine-Cw46OnJ_.js → ReportDefine-BpiM5Ovq.js} +1 -1
  17. package/dist/{ReportDesign-D4sHTXT7.js → ReportDesign-fp09cXJ7.js} +24 -25
  18. package/dist/{ReportQuery-DtOCvQSN.js → ReportQuery-52ZP1PYP.js} +1 -1
  19. package/dist/{ReportQueryFrom-QjL-ETPq.js → ReportQueryFrom-DSYavJb1.js} +1 -1
  20. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-Dj9ne87n.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-DBGYEp0u.js} +4 -4
  21. package/dist/{ReportTemplate-BxAgc_Aj.js → ReportTemplate-CA_UW0eD.js} +3 -3
  22. package/dist/{Role-Df77BBD-.js → Role-DqOt8Bk0.js} +3 -3
  23. package/dist/{RoleAssign-BrunouML.js → RoleAssign-BdxhefhQ.js} +3 -3
  24. package/dist/{RolePanel-HLA7XBlN.js → RolePanel-2gZ3H0ET.js} +1 -1
  25. package/dist/{RolePanel-DSVwqhiD.js → RolePanel-BsNd0svJ.js} +1 -1
  26. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CN0rUxKz.js → RolePanel.vue_vue_type_script_setup_true_lang-DLOwgF99.js} +9 -9
  27. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CKlbqRa5.js → RolePanel.vue_vue_type_script_setup_true_lang-DmzD9kab.js} +26 -27
  28. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-D_FeSXKv.js → ScrollPanel.vue_vue_type_style_index_0_lang-B9ptUMeI.js} +7 -7
  29. package/dist/{Staff-BeL1xcRf.js → Staff-D3L8fEoY.js} +3 -3
  30. package/dist/{StaffInfo-CIfnltyX.js → StaffInfo-DYRw6ZYJ.js} +1 -1
  31. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DbLFwWfG.js → StaffInfo.vue_vue_type_script_setup_true_lang-xqEOQnMs.js} +1 -1
  32. package/dist/{StaffPanel-BV2CHWac.js → StaffPanel-DkrNH6Px.js} +1 -1
  33. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-CvT-Vp2G.js → StaffPanel.vue_vue_type_script_setup_true_lang-BPBMnliy.js} +8 -9
  34. package/dist/{SysUser-DPfNvthk.js → SysUser-Bl1-cIpJ.js} +2 -2
  35. package/dist/{SysUserPanel-CoLKYlQE.js → SysUserPanel-yxNLaBwt.js} +1 -1
  36. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-lcO3Cjbq.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BDcsgSl5.js} +11 -12
  37. package/dist/{SystemMenu-sdj1dRDA.js → SystemMenu-C4_Arn12.js} +9 -10
  38. package/dist/{UserInfo-CTX4hhFl.js → UserInfo-QcNwJCUR.js} +1 -1
  39. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-ClhCd_8z.js → UserInfo.vue_vue_type_style_index_0_lang-DLIeUphX.js} +5 -6
  40. package/dist/{childView-BDmWwJO5.js → childView-B23DEO2u.js} +1 -1
  41. package/dist/{childView-Dx3ACtHa.js → childView-saDZQv9x.js} +1 -1
  42. package/dist/{childView.vue_vue_type_style_index_0_lang-CfKq_0FN.js → childView.vue_vue_type_style_index_0_lang-RsKR6CAC.js} +14 -15
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-DxZNtkhd.js → childView.vue_vue_type_style_index_0_lang-ZFEfavUY.js} +11 -12
  44. package/dist/{code-rule-cvN4gYC_.js → code-rule-2_Ihx_by.js} +12 -13
  45. package/dist/core.es.js +21 -19
  46. package/dist/{cron-task-B0TkxFdp.js → cron-task-BFOPJQIk.js} +3 -4
  47. package/dist/{frameView-5cy5BSgS.js → frameView-f7Ya0Knj.js} +1 -1
  48. package/dist/img/minicolors.png +0 -0
  49. package/dist/{index-C5WRTwvI.js → index-BpdTDaTk.js} +811 -604
  50. package/dist/{layout-home-DrARg-3o.js → layout-home-v3DPJ7rB.js} +12 -13
  51. package/dist/{layoutView-25v_ngk5.js → layoutView-DZHoQDH1.js} +186 -187
  52. package/dist/{log-in-Bmz5Uhbt.js → log-in-BPAMJTwH.js} +4 -5
  53. package/dist/{log-out-B-8m3oNj.js → log-out-DZACF0jg.js} +8 -9
  54. package/dist/{login-Cmp2RvvW.js → login-B8cwozax.js} +22 -23
  55. package/dist/{lov-view-BATtzw2X.js → lov-view-Ba7Y7xy0.js} +4 -5
  56. package/dist/{menuInfo-BIvrE7nm.js → menuInfo-BpRKFYK8.js} +1 -1
  57. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-B6USomit.js → menuInfo.vue_vue_type_style_index_0_lang-DJ5sUC6m.js} +17 -18
  58. package/dist/{pda-app-CzHVyeEa.js → pda-app-C0jJecrL.js} +7 -8
  59. package/dist/{resource-Y5lGB38n.js → resource-BG22Cw4P.js} +4 -4
  60. package/dist/su-welcome-DaxhbrC6.js +879 -0
  61. package/dist/{sys-config-CqO03LeC.js → sys-config-CG2fMtak.js} +22 -23
  62. package/dist/udp-core.css +1 -1
  63. package/dist/{useNav-C-rCgubt.js → useNav-_u2UAQWk.js} +24 -24
  64. package/index.ts +54 -51
  65. package/package.json +21 -21
  66. package/src/api/http.ts +10 -4
  67. package/src/api/index.ts +51 -51
  68. package/src/api/user.ts +64 -64
  69. package/src/components/udp/content/index.vue +93 -93
  70. package/src/components/udp/form-upload/form-upload.vue +496 -496
  71. package/src/components/udp/grid/index.vue +643 -544
  72. package/src/components/udp/index.ts +2 -1
  73. package/src/components/udp/modal-form/index.vue +326 -0
  74. package/src/components/udp/utils.ts +420 -420
  75. package/src/layout/components/lay-navbar/index.vue +240 -240
  76. package/src/layout/components/lay-search/components/SearchModal.vue +185 -185
  77. package/src/layout/components/lay-sidebar/mixNav.vue +261 -261
  78. package/src/layout/components/lay-sidebar/sidebarItem.vue +199 -195
  79. package/src/layout/components/lay-sidebar/vertical.vue +92 -92
  80. package/src/layout/layoutView.vue +1 -0
  81. package/src/main.ts +111 -111
  82. package/src/plugins/i18n/zh.ts +5 -1
  83. package/src/plugins/vxe-table/index.ts +116 -116
  84. package/src/router/index.ts +158 -156
  85. package/src/router/utils.ts +434 -430
  86. package/src/store/modules/permission.ts +1 -1
  87. package/src/store/modules/system.ts +193 -193
  88. package/src/style/print-lock.css +380 -375
  89. package/src/style/suprint.css +990 -985
  90. package/src/utils/authority/index.ts +46 -46
  91. package/src/utils/dataFormat/index.ts +309 -222
  92. package/src/utils/udp/http/index.ts +19 -11
  93. package/src/views/uhome/components/home-todo.vue +15 -3
  94. package/src/views/uhome/dynamic-card.vue +31 -31
  95. package/src/views/uhome/su-welcome.vue +310 -310
  96. package/src/views/ulogin/login.vue +292 -292
  97. package/src/views/urpt/design/DesignPanel.vue +538 -507
  98. package/src/views/urpt/design/print-data.ts +39 -59
  99. package/dist/await-to-js.es5-Bv3Eu4mi.js +0 -10
  100. package/dist/su-welcome-CXA6OzBw.js +0 -878
@@ -1,507 +1,538 @@
1
- <!--
2
- * @Author: wei.li
3
- * @Date: 2022-03-21 10:36:15
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-08-12 09:57:22
6
- * @Description: 设计面板
7
- -->
8
- <template>
9
- <div v-spinning="loading" class="ut-design-panel">
10
- <el-card class="design-panel-contain">
11
- <el-space style="margin-bottom: 10px" fill>
12
- <div class="flex justify-between">
13
- <div>
14
- <ut-button icon="ri-eye-line ri-1x" content="preview" @tap="handlePreView" />
15
- <el-select
16
- v-model="currentRecord.paperType"
17
- size="small"
18
- placeholder="Select Paper"
19
- class="ml-1 mr-1"
20
- style="width: 100px !important"
21
- @change="handlePaperChange(currentRecord.paperType)"
22
- >
23
- <el-option
24
- v-for="item in dataDict['SU.PRINT.PAPER'].children"
25
- :key="item.dictCode"
26
- :label="item.dictName"
27
- :value="item.dictCode"
28
- >
29
- <span style="float: left">{{ item.dictName }}</span>
30
- <span style="float: right; font-size: 13px; color: var(--el-text-color-secondary)">{{
31
- item.dictDesc
32
- }}</span>
33
- </el-option>
34
- </el-select>
35
- <el-popover
36
- v-if="currentRecord.paperType === 'customize'"
37
- v-model:visible="paperPopVisible"
38
- title="设置纸张宽高(mm)"
39
- width="300"
40
- size="small"
41
- effect="light"
42
- trigger="click"
43
- >
44
- <div>
45
- <div class="flex justify-center mb-1" style="width: 100%">
46
- <vxe-input v-model="paperSize.width" type="number" class="w-40" placeholder="宽(mm)" />
47
- <div class="flex items-center justify-center w-8">~</div>
48
- <vxe-input v-model="paperSize.height" type="number" class="w-40" placeholder="高(mm)" />
49
- </div>
50
- <ut-button style="width: 100%" content="confirm" @tap="handleCustomSize" />
51
- </div>
52
- <template #reference>
53
- <ut-button icon="ri-font-size" content="customSize" @tap.stop="paperPopVisible = true" />
54
- </template>
55
- </el-popover>
56
- <ut-button
57
- status="u-cyan"
58
- icon="ri-upload-2-line"
59
- content="importJSON"
60
- auth="import"
61
- @tap="handleShowImport()"
62
- />
63
- <vxe-button icon="ri-indeterminate-circle-line " class="design-custom-button" @click="handleScale('N')" />
64
- <vxe-input v-model="scale.ration" disabled align="center" style="width: 70px; margin-left: 10px" />
65
- <vxe-button icon="ri-add-circle-fill " class="design-custom-button" @click="handleScale('Y')" />
66
- <ut-button
67
- status="danger"
68
- icon="ri-delete-bin-5-fill"
69
- content="repaint"
70
- auth="repaint"
71
- @tap="handleClearPaper()"
72
- />
73
- </div>
74
- <div>
75
- <ut-button icon="ri-save-3-fill" content="save" @tap="handleSave()" />
76
- <ut-button status="info" icon="ri-reply-fill" content="back" @tap="handleClose" />
77
- </div>
78
- </div>
79
- <div style="font-size: 12px; color: red; text-align: center">
80
- 温馨提示: 蓝色线(页眉)以下,每张纸打印都会重复打印到页面底部;红色线(页尾)以下,每张纸打印都会重复打印到页面底部
81
- </div>
82
- </el-space>
83
- <el-row>
84
- <el-col :span="3">
85
- <el-card class="ut-design-item">
86
- <el-row>
87
- <el-col :span="24" class="rect-printElement-types hiprintEpContainer">
88
- <el-row class="drag_item_title">拖拽组件列表</el-row>
89
- <el-row style="height: 60px">
90
- <el-col :span="12" class="drag_item_box">
91
- <div>
92
- <a class="ep-draggable-item" tid="defaultModule.text">
93
- <span class="ri-text" ariel-hidden="true" />
94
- <p class="glyphicon-class">文本</p>
95
- </a>
96
- </div>
97
- </el-col>
98
- <el-col :span="12" class="drag_item_box">
99
- <div>
100
- <a class="ep-draggable-item" tid="defaultModule.image">
101
- <span class="ri-image-line" ariel-hidden="true" />
102
- <p class="glyphicon-class">图片</p>
103
- </a>
104
- </div>
105
- </el-col>
106
- </el-row>
107
- <el-row style="height: 60px">
108
- <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
109
- <div>
110
- <a class="ep-draggable-item" tid="defaultModule.longText">
111
- <span class="ri-line-height" ariel-hidden="true" />
112
- <p class="glyphicon-class">长文</p>
113
- </a>
114
- </div>
115
- </el-col>
116
- <el-col :span="12" class="drag_item_box">
117
- <div>
118
- <a class="ep-draggable-item" tid="defaultModule.table">
119
- <span class="ri-table-line" ariel-hidden="true" />
120
- <p class="glyphicon-class">表格</p>
121
- </a>
122
- </div>
123
- </el-col>
124
- </el-row>
125
- <el-row class="drag_item_title">辅助</el-row>
126
- <el-row style="height: 60px">
127
- <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
128
- <div>
129
- <a class="ep-draggable-item" tid="defaultModule.hline">
130
- <span class="ri-expand-horizontal-s-fill" ariel-hidden="true" />
131
- <p class="glyphicon-class">横线</p>
132
- </a>
133
- </div>
134
- </el-col>
135
- <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
136
- <div>
137
- <a class="ep-draggable-item" tid="defaultModule.vline">
138
- <span class="ri-expand-vertical-s-fill" ariel-hidden="true" />
139
- <p class="glyphicon-class">竖线</p>
140
- </a>
141
- </div>
142
- </el-col>
143
- </el-row>
144
- <el-row style="height: 60px">
145
- <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
146
- <div>
147
- <a class="ep-draggable-item" tid="defaultModule.rect">
148
- <span class="ri-square-line" ariel-hidden="true" />
149
- <p class="glyphicon-class">矩形</p>
150
- </a>
151
- </div>
152
- </el-col>
153
- <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
154
- <div>
155
- <a class="ep-draggable-item" tid="defaultModule.oval">
156
- <span class="ri-checkbox-blank-circle-line" ariel-hidden="true" />
157
- <p class="glyphicon-class">椭圆</p>
158
- </a>
159
- </div>
160
- </el-col>
161
- </el-row>
162
- </el-col>
163
- </el-row>
164
- </el-card>
165
- </el-col>
166
- <el-col :xs="15" :sm="15" :md="15" :lg="16" :xl="18">
167
- <el-card class="card-design">
168
- <div id="hiprint-printTemplate" class="hiprint-printTemplate" />
169
- </el-card>
170
- </el-col>
171
- <el-col :xs="6" :sm="6" :md="6" :lg="5" :xl="3">
172
- <el-card class="design-setting-panel">
173
- <el-row class="hinnn-layout-sider">
174
- <div id="PrintElementOptionSetting" />
175
- </el-row>
176
- </el-card>
177
- </el-col>
178
- </el-row>
179
- </el-card>
180
- <vxe-modal v-model="showImportView" title="导入模板JSON数据" height="320" width="450" show-footer>
181
- <template #default>
182
- <p style="color: red">切勿随意修改JSON数据,可能导致模板加载出错</p>
183
- <vxe-textarea v-model="templateContent" :rows="10" size="mini" />
184
- </template>
185
- <template #footer>
186
- <ut-button icon="ri-close-fill" content="cancel" @tap="showImportView = false" />
187
- <ut-button icon="ri-save-3-fill" status="u-cyan" content="confirm" @tap="handleImportJson" />
188
- </template>
189
- </vxe-modal>
190
- <preview v-if="showPreviewModal" ref="previewRef" />
191
- </div>
192
- </template>
193
-
194
- <script setup lang="ts">
195
- import { onMounted, reactive, ref, nextTick, onBeforeUnmount } from 'vue';
196
- import { VxeUI } from 'vxe-pc-ui';
197
- import { useGlobal } from '@utogether/utils';
198
- import to from 'await-to-js';
199
- import { clone } from 'xe-utils';
200
- import { useSystemStoreHook } from '../../../store/modules/system';
201
- import panel from './panel';
202
- import Preview from './Preview.vue';
203
- // import printData from './print-data';
204
- import { getServiceApi } from '../../../api';
205
- // import { errorMessage } from '@utogether/utils';
206
-
207
- import '../../../style/suprint.css';
208
- import '../../../style/print-lock.css';
209
-
210
- interface IProps {
211
- record: IRecord;
212
- }
213
- const props = withDefaults(defineProps<IProps>(), {
214
- record: (): IRecord => {
215
- return {};
216
- }
217
- });
218
-
219
- let { $printPlugin } = useGlobal();
220
-
221
- const systemStoreHook = useSystemStoreHook();
222
- const dataDict = systemStoreHook.getDataDict;
223
-
224
- const serviceApi = getServiceApi();
225
- let hiprintTemplate = null;
226
- const showPreviewModal = ref(false);
227
- const paperPopVisible = ref(false);
228
- const showImportView = ref(false);
229
- const loading = ref(false);
230
- const previewRef = ref(null);
231
- const templateContent = ref('');
232
- const currentRecord = ref<IRecord>({});
233
- const paperSize = reactive<IRecord>({});
234
- const scale = reactive({ max: 5, min: 0.5, value: 1, ration: '100%' });
235
-
236
- const handleCustomSize = () => {
237
- paperPopVisible.value = false;
238
- hiprintTemplate.setPaper(paperSize.width || 210, paperSize.height || 296.6);
239
- };
240
- // 直接打印(静默打印)
241
- // const handlePictBridge = async () => {
242
- // if (window.hiwebSocket.opened) {
243
- // const data = await serviceApi('CUS003', {});
244
- // const printerList = hiprintTemplate.getPrinterList();
245
- // hiprintTemplate.print2(data, { printer: '', title: 'hiprint测试打印' });
246
- // return;
247
- // }
248
- // errorMessage('客户端未连接,无法直接打印');
249
- // };
250
-
251
- const handleSave = async (cb?) => {
252
- const body = currentRecord.value;
253
- let bt = templateContent.value;
254
- if (!bt) {
255
- const template = hiprintTemplate.getJson();
256
- bt = JSON.stringify(template);
257
- }
258
- body.templateContent = bt;
259
- loading.value = true;
260
- const [err, data] = await to(serviceApi.put('/urpt/v1/printTemplate', [body]));
261
- loading.value = false;
262
- if (!err) {
263
- templateContent.value = '';
264
- currentRecord.value = data[0];
265
- }
266
- cb && cb();
267
- };
268
-
269
- const handleClose = () => {
270
- // hiprint = null
271
- emit('onClose');
272
- };
273
-
274
- const emit = defineEmits<{ (e: 'onClose'): void }>();
275
-
276
- // 放大缩小值
277
- const handleScale = max => {
278
- let scaleValue = scale.value;
279
- if (max === 'Y') {
280
- scaleValue += 0.1;
281
- if (scaleValue > scale.max) scaleValue = 5;
282
- } else {
283
- scaleValue -= 0.1;
284
- if (scaleValue < scale.min) scaleValue = 0.5;
285
- }
286
- if (hiprintTemplate) {
287
- // scaleValue: 放大缩小值, false: 不保存(不传也一样), 如果传 true, 打印时也会放大
288
- hiprintTemplate.zoom(scaleValue);
289
- scale.value = scaleValue;
290
- scale.ration = `${(scaleValue * 100).toFixed(0)}%`;
291
- }
292
- };
293
-
294
- /**
295
- * @Author: liwei
296
- * @Date: 2021-09-01 11:21:05
297
- * @Desc: 参数设置drawer回调,将参数设置dom添加到弹出层中
298
- */
299
- const handleClearPaper = async () => {
300
- const type = await VxeUI.modal.confirm('重绘操作不可逆,您确定继续吗?', '温馨提示');
301
- if (type === 'confirm') {
302
- hiprintTemplate.clear();
303
- }
304
- };
305
- const handleShowImport = async () => {
306
- showImportView.value = true;
307
- };
308
- const handleImportJson = async () => {
309
- const type = await VxeUI.modal.confirm('导入后将覆盖原有的模板,您确定继续吗?', '温馨提示');
310
- if (type === 'confirm') {
311
- handleSave(handleClose);
312
- showImportView.value = false;
313
- }
314
- };
315
- const handlePreView = async () => {
316
- showPreviewModal.value = true;
317
- // const data = await serviceApi('CUS003', {});
318
- const data = {};
319
- // data.pageSize = 6789;
320
- nextTick(() => {
321
- previewRef.value.show(hiprintTemplate, data, paperSize.width || 220);
322
- });
323
- };
324
- // 纸张切换
325
- const handlePaperChange = code => {
326
- if ('customize' !== code) {
327
- const { width, height } = getPaperSize(code);
328
- paperSize.width = width;
329
- paperSize.height = height;
330
- hiprintTemplate.setPaper(paperSize.width, paperSize.height);
331
- } else {
332
- paperPopVisible.value = true;
333
- }
334
- };
335
- const getPaperSize = code => {
336
- const paper = {
337
- A3: { width: 420, height: 296.6 },
338
- A4: { width: 210, height: 296.6 },
339
- A5: { width: 210, height: 147.6 },
340
- bisect: { width: 241, height: 140 },
341
- trisection: { width: 241, height: 93 }
342
- };
343
- return paper[code];
344
- };
345
-
346
- onMounted(() => {
347
- const { record } = props;
348
- loading.value = true;
349
- currentRecord.value = clone(record, true);
350
- const template = record.templateContent ? JSON.parse(record.templateContent) : panel;
351
- $('#hiprint-printTemplate').empty();
352
- $printPlugin.print.init({
353
- providers: [new $printPlugin.provider()]
354
- });
355
- // 还原配置
356
- $printPlugin.print.setConfig();
357
- // 替换配置
358
- $printPlugin.print.setConfig({
359
- movingDistance: 2.5,
360
- text: {
361
- supportOptions: [
362
- { name: 'styler', hidden: true },
363
- { name: 'formatter', hidden: true }
364
- ]
365
- }
366
- });
367
-
368
- $printPlugin.print.PrintElementTypeManager.buildByHtml($('.ep-draggable-item'));
369
- hiprintTemplate = new $printPlugin.print.PrintTemplate({
370
- template,
371
- settingContainer: '#PrintElementOptionSetting',
372
- paginationContainer: '.hiprint-printPagination',
373
- history: false // 是否需要 撤销重做功能
374
- });
375
- hiprintTemplate.design('#hiprint-printTemplate', { grid: true });
376
- scale.value = hiprintTemplate.editingPanel.scale || 1;
377
- loading.value = false;
378
- });
379
- onBeforeUnmount(() => {
380
- $printPlugin = null;
381
- hiprintTemplate = null;
382
- });
383
- </script>
384
-
385
- <style lang="scss">
386
- .ut-design-panel {
387
- // .design-panel-contain > .el-card__body {
388
- // height: 85vh;
389
- // padding: 3px !important;
390
- // }
391
-
392
- // .card-design {
393
- // display: flex;
394
- // justify-content: center;
395
- // background: url('./bg.png');
396
- // }
397
-
398
- // ::v-deep(.ut-design-item > .el-card__body) {
399
- // padding: 3px;
400
- // }
401
-
402
- // ::v-deep(.card-design > .el-card__body) {
403
- // height: 75vh;
404
- // overflow: auto;
405
- // }
406
-
407
- ::v-deep(.design-setting-panel > .el-card__body) {
408
- height: 75vh;
409
- padding: 3px;
410
- overflow: auto;
411
- }
412
-
413
- // .el-space {
414
- // width: 100%;
415
- // margin: 5px 0 0 !important;
416
- // }
417
-
418
- // ::v-deep(.el-space__item) {
419
- // width: 100%;
420
- // padding-right: 10px;
421
- // padding-bottom: 0 !important;
422
- // }
423
- }
424
- // 拖拽
425
- .drag_item_box {
426
- height: 100%;
427
- padding: 6px;
428
- }
429
-
430
- .drag_item_box > div {
431
- display: flex;
432
- align-items: center;
433
- justify-content: center;
434
- width: 100%;
435
- height: 100%;
436
- background-color: #fff;
437
- }
438
-
439
- .drag_item_box > div > a {
440
- text-align: center;
441
- text-decoration-line: none;
442
- }
443
-
444
- .drag_item_box > div > a > span {
445
- font-size: 28px;
446
- }
447
-
448
- .drag_item_box > div > a > p {
449
- margin: 0;
450
- }
451
-
452
- .drag_item_title {
453
- padding: 12px 6px 0;
454
- font-size: 14px;
455
- font-weight: bold;
456
- }
457
-
458
- // 默认图片
459
- .design-custom-button {
460
- font-size: 16px;
461
- }
462
-
463
- .el-card__body {
464
- padding: 16px;
465
- }
466
-
467
- .design-setting-panel > .el-card__body {
468
- height: 75vh;
469
- padding: 3px;
470
- overflow: auto;
471
- }
472
-
473
- .design-custom-button:not(.is--disabled):hover {
474
- color: inherit !important;
475
- }
476
-
477
- // 辅助线样式
478
- .toplineOfPosition {
479
- border: 0;
480
- border-top: 1px dashed purple;
481
- }
482
-
483
- .bottomlineOfPosition {
484
- border: 0;
485
- border-top: 1px dashed purple;
486
- }
487
-
488
- .leftlineOfPosition {
489
- border: 0;
490
- border-left: 1px dashed purple;
491
- }
492
-
493
- .rightlineOfPosition {
494
- border: 0;
495
- border-left: 1px dashed purple;
496
- }
497
-
498
- // 设计容器
499
- .card-design {
500
- overflow: hidden;
501
- overflow: auto;
502
- }
503
-
504
- .hiprint-printElement-image-content img {
505
- content: url('/logo.png');
506
- }
507
- </style>
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2022-03-21 10:36:15
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2026-07-09 11:01:16
6
+ * @Description: 设计面板
7
+ -->
8
+ <template>
9
+ <div v-spinning="loading" class="ut-design-panel">
10
+ <el-card class="design-panel-contain">
11
+ <el-space style="margin-bottom: 10px" fill>
12
+ <div class="flex justify-between">
13
+ <div>
14
+ <ut-button icon="ri-eye-line ri-1x" content="preview" @tap="handlePreView" />
15
+ <el-select
16
+ v-model="currentRecord.paperType"
17
+ size="small"
18
+ placeholder="Select Paper"
19
+ class="ml-1 mr-1"
20
+ style="width: 100px !important"
21
+ @change="handlePaperChange(currentRecord.paperType)"
22
+ >
23
+ <el-option
24
+ v-for="item in dataDict['SU.PRINT.PAPER'].children"
25
+ :key="item.dictCode"
26
+ :label="item.dictName"
27
+ :value="item.dictCode"
28
+ >
29
+ <span style="float: left">{{ item.dictName }}</span>
30
+ <span style="float: right; font-size: 13px; color: var(--el-text-color-secondary)">{{
31
+ item.dictDesc
32
+ }}</span>
33
+ </el-option>
34
+ </el-select>
35
+ <el-popover
36
+ v-if="currentRecord.paperType === 'customize'"
37
+ v-model:visible="paperPopVisible"
38
+ title="设置纸张宽高(mm)"
39
+ width="300"
40
+ size="small"
41
+ effect="light"
42
+ trigger="click"
43
+ >
44
+ <div>
45
+ <div class="flex justify-center mb-1" style="width: 100%">
46
+ <vxe-input v-model="paperSize.width" type="number" class="w-40" placeholder="宽(mm)" />
47
+ <div class="flex items-center justify-center w-8">~</div>
48
+ <vxe-input v-model="paperSize.height" type="number" class="w-40" placeholder="高(mm)" />
49
+ </div>
50
+ <ut-button style="width: 100%" content="confirm" @tap="handleCustomSize" />
51
+ </div>
52
+ <template #reference>
53
+ <ut-button icon="ri-font-size" content="customSize" @tap.stop="paperPopVisible = true" />
54
+ </template>
55
+ </el-popover>
56
+ <ut-button
57
+ status="u-cyan"
58
+ icon="ri-upload-2-line"
59
+ content="importJSON"
60
+ auth="import"
61
+ @tap="handleShowImport()"
62
+ />
63
+ <vxe-button icon="ri-indeterminate-circle-line " class="design-custom-button" @click="handleScale('N')" />
64
+ <vxe-input v-model="scale.ration" disabled align="center" style="width: 70px; margin-left: 10px" />
65
+ <vxe-button icon="ri-add-circle-fill " class="design-custom-button" @click="handleScale('Y')" />
66
+ <ut-button
67
+ status="danger"
68
+ icon="ri-delete-bin-5-fill"
69
+ content="repaint"
70
+ auth="repaint"
71
+ @tap="handleClearPaper()"
72
+ />
73
+ </div>
74
+ <div>
75
+ <ut-button icon="ri-save-3-fill" content="save" @tap="handleSave()" />
76
+ <ut-button status="info" icon="ri-reply-fill" content="back" @tap="handleClose" />
77
+ </div>
78
+ </div>
79
+ <div style="font-size: 12px; color: red; text-align: center">
80
+ 温馨提示: 蓝色线(页眉)以下,每张纸打印都会重复打印到页面底部;红色线(页尾)以下,每张纸打印都会重复打印到页面底部
81
+ </div>
82
+ </el-space>
83
+ <el-row>
84
+ <el-col :span="3">
85
+ <el-card class="ut-design-item">
86
+ <el-row>
87
+ <el-col :span="24" class="rect-printElement-types hiprintEpContainer">
88
+ <el-row class="drag_item_title">拖拽组件列表</el-row>
89
+ <el-row style="height: 60px">
90
+ <el-col :span="12" class="drag_item_box">
91
+ <div>
92
+ <a class="ep-draggable-item" tid="defaultModule.text">
93
+ <span class="ri-text" ariel-hidden="true" />
94
+ <p class="glyphicon-class">文本</p>
95
+ </a>
96
+ </div>
97
+ </el-col>
98
+ <el-col :span="12" class="drag_item_box">
99
+ <div>
100
+ <a class="ep-draggable-item" tid="defaultModule.image">
101
+ <span class="ri-image-line" ariel-hidden="true" />
102
+ <p class="glyphicon-class">图片</p>
103
+ </a>
104
+ </div>
105
+ </el-col>
106
+ </el-row>
107
+ <el-row style="height: 60px">
108
+ <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
109
+ <div>
110
+ <a class="ep-draggable-item" tid="defaultModule.longText">
111
+ <span class="ri-line-height" ariel-hidden="true" />
112
+ <p class="glyphicon-class">长文</p>
113
+ </a>
114
+ </div>
115
+ </el-col>
116
+ <el-col :span="12" class="drag_item_box">
117
+ <div>
118
+ <a class="ep-draggable-item" tid="defaultModule.table">
119
+ <span class="ri-table-line" ariel-hidden="true" />
120
+ <p class="glyphicon-class">表格</p>
121
+ </a>
122
+ </div>
123
+ </el-col>
124
+ </el-row>
125
+ <el-row class="drag_item_title">辅助</el-row>
126
+ <el-row style="height: 60px">
127
+ <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
128
+ <div>
129
+ <a class="ep-draggable-item" tid="defaultModule.hline">
130
+ <span class="ri-expand-horizontal-s-fill" ariel-hidden="true" />
131
+ <p class="glyphicon-class">横线</p>
132
+ </a>
133
+ </div>
134
+ </el-col>
135
+ <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
136
+ <div>
137
+ <a class="ep-draggable-item" tid="defaultModule.vline">
138
+ <span class="ri-expand-vertical-s-fill" ariel-hidden="true" />
139
+ <p class="glyphicon-class">竖线</p>
140
+ </a>
141
+ </div>
142
+ </el-col>
143
+ </el-row>
144
+ <el-row style="height: 60px">
145
+ <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
146
+ <div>
147
+ <a class="ep-draggable-item" tid="defaultModule.rect">
148
+ <span class="ri-square-line" ariel-hidden="true" />
149
+ <p class="glyphicon-class">矩形</p>
150
+ </a>
151
+ </div>
152
+ </el-col>
153
+ <el-col :span="12" class="drag_item_box" tid="defaultModule.text">
154
+ <div>
155
+ <a class="ep-draggable-item" tid="defaultModule.oval">
156
+ <span class="ri-checkbox-blank-circle-line" ariel-hidden="true" />
157
+ <p class="glyphicon-class">椭圆</p>
158
+ </a>
159
+ </div>
160
+ </el-col>
161
+ </el-row>
162
+
163
+ <el-row style="height: 60px">
164
+ <el-col :span="12" class="drag_item_box" tid="defaultModule.barcode">
165
+ <div>
166
+ <a class="ep-draggable-item" tid="defaultModule.barcode">
167
+ <span class="ri-barcode-line" ariel-hidden="true" />
168
+ <p class="glyphicon-class">条形码</p>
169
+ </a>
170
+ </div>
171
+ </el-col>
172
+ <el-col :span="12" class="drag_item_box" tid="defaultModule.qrcode">
173
+ <div>
174
+ <a class="ep-draggable-item" tid="defaultModule.qrcode">
175
+ <span class="ri-qr-code-line" ariel-hidden="true" />
176
+ <p class="glyphicon-class">二维码</p>
177
+ </a>
178
+ </div>
179
+ </el-col>
180
+ </el-row>
181
+ </el-col>
182
+ </el-row>
183
+ </el-card>
184
+ </el-col>
185
+ <el-col :xs="15" :sm="15" :md="15" :lg="16" :xl="18">
186
+ <el-card class="card-design">
187
+ <div id="hiprint-printTemplate" class="hiprint-printTemplate" />
188
+ </el-card>
189
+ </el-col>
190
+ <el-col :xs="6" :sm="6" :md="6" :lg="5" :xl="3">
191
+ <el-card class="design-setting-panel">
192
+ <el-row class="hinnn-layout-sider">
193
+ <div id="PrintElementOptionSetting" />
194
+ </el-row>
195
+ </el-card>
196
+ </el-col>
197
+ </el-row>
198
+ </el-card>
199
+ <vxe-modal v-model="showImportView" title="导入模板JSON数据" height="320" width="450" show-footer>
200
+ <template #default>
201
+ <p style="color: red">切勿随意修改JSON数据,可能导致模板加载出错</p>
202
+ <vxe-textarea v-model="templateContent" :rows="10" size="mini" />
203
+ </template>
204
+ <template #footer>
205
+ <ut-button icon="ri-close-fill" content="cancel" @tap="showImportView = false" />
206
+ <ut-button icon="ri-save-3-fill" status="u-cyan" content="confirm" @tap="handleImportJson" />
207
+ </template>
208
+ </vxe-modal>
209
+ <preview v-if="showPreviewModal" ref="previewRef" />
210
+ </div>
211
+ </template>
212
+
213
+ <script setup lang="ts">
214
+ import { onMounted, reactive, ref, nextTick, onBeforeUnmount } from 'vue';
215
+ import { VxeUI } from 'vxe-pc-ui';
216
+ import { useGlobal } from '@utogether/utils';
217
+ import to from 'await-to-js';
218
+ import { clone } from 'xe-utils';
219
+ import { useSystemStoreHook } from '../../../store/modules/system';
220
+ import panel from './panel';
221
+ import Preview from './Preview.vue';
222
+ import previewData from './print-data';
223
+ import { getServiceApi } from '../../../api';
224
+ // import { errorMessage } from '@utogether/utils';
225
+
226
+ import '../../../style/suprint.css';
227
+ // import '../../../style/print-lock.css';
228
+
229
+ interface IProps {
230
+ record: IRecord;
231
+ }
232
+ const props = withDefaults(defineProps<IProps>(), {
233
+ record: (): IRecord => {
234
+ return {};
235
+ }
236
+ });
237
+
238
+ let { $printPlugin } = useGlobal();
239
+
240
+ const systemStoreHook = useSystemStoreHook();
241
+ const dataDict = systemStoreHook.getDataDict;
242
+
243
+ const serviceApi = getServiceApi();
244
+ let hiprintTemplate = null;
245
+ const showPreviewModal = ref(false);
246
+ const paperPopVisible = ref(false);
247
+ const showImportView = ref(false);
248
+ const loading = ref(false);
249
+ const previewRef = ref(null);
250
+ const templateContent = ref('');
251
+ const currentRecord = ref<IRecord>({});
252
+ const paperSize = reactive<IRecord>({});
253
+ const scale = reactive({ max: 5, min: 0.5, value: 1, ration: '100%' });
254
+
255
+ const handleCustomSize = () => {
256
+ paperPopVisible.value = false;
257
+ hiprintTemplate.setPaper(paperSize.width || 210, paperSize.height || 296.6);
258
+ };
259
+ // 直接打印(静默打印)
260
+ // const handlePictBridge = async () => {
261
+ // if (window.hiwebSocket.opened) {
262
+ // const data = await serviceApi('CUS003', {});
263
+ // const printerList = hiprintTemplate.getPrinterList();
264
+ // hiprintTemplate.print2(data, { printer: '', title: 'hiprint测试打印' });
265
+ // return;
266
+ // }
267
+ // errorMessage('客户端未连接,无法直接打印');
268
+ // };
269
+
270
+ const handleSave = async (cb?) => {
271
+ const body = currentRecord.value;
272
+ let bt = templateContent.value;
273
+ if (!bt) {
274
+ const template = hiprintTemplate.getJson();
275
+ bt = JSON.stringify(template);
276
+ }
277
+ body.templateContent = bt;
278
+ loading.value = true;
279
+ const [err, data] = await to(serviceApi.put('/urpt/v1/printTemplate', [body]));
280
+ loading.value = false;
281
+ if (!err) {
282
+ templateContent.value = '';
283
+ currentRecord.value = data[0];
284
+ }
285
+ cb && cb();
286
+ };
287
+
288
+ const handleClose = () => {
289
+ // hiprint = null
290
+ emit('onClose');
291
+ };
292
+
293
+ const emit = defineEmits<{ (e: 'onClose'): void }>();
294
+
295
+ // 放大缩小值
296
+ const handleScale = max => {
297
+ let scaleValue = scale.value;
298
+ if (max === 'Y') {
299
+ scaleValue += 0.1;
300
+ if (scaleValue > scale.max) scaleValue = 5;
301
+ } else {
302
+ scaleValue -= 0.1;
303
+ if (scaleValue < scale.min) scaleValue = 0.5;
304
+ }
305
+ if (hiprintTemplate) {
306
+ // scaleValue: 放大缩小值, false: 不保存(不传也一样), 如果传 true, 打印时也会放大
307
+ hiprintTemplate.zoom(scaleValue);
308
+ scale.value = scaleValue;
309
+ scale.ration = `${(scaleValue * 100).toFixed(0)}%`;
310
+ }
311
+ };
312
+
313
+ /**
314
+ * @Author: liwei
315
+ * @Date: 2021-09-01 11:21:05
316
+ * @Desc: 参数设置drawer回调,将参数设置dom添加到弹出层中
317
+ */
318
+ const handleClearPaper = async () => {
319
+ const type = await VxeUI.modal.confirm('重绘操作不可逆,您确定继续吗?', '温馨提示');
320
+ if (type === 'confirm') {
321
+ hiprintTemplate.clear();
322
+ }
323
+ };
324
+ const handleShowImport = async () => {
325
+ showImportView.value = true;
326
+ };
327
+ const handleImportJson = async () => {
328
+ const type = await VxeUI.modal.confirm('导入后将覆盖原有的模板,您确定继续吗?', '温馨提示');
329
+ if (type === 'confirm') {
330
+ handleSave(handleClose);
331
+ showImportView.value = false;
332
+ }
333
+ };
334
+ const handlePreView = async () => {
335
+ showPreviewModal.value = true;
336
+ nextTick(() => {
337
+ previewRef.value.show(hiprintTemplate, previewData(), paperSize.width || 220);
338
+ });
339
+ };
340
+ // 纸张切换
341
+ const handlePaperChange = code => {
342
+ if ('customize' !== code) {
343
+ const { width, height } = getPaperSize(code);
344
+ paperSize.width = width;
345
+ paperSize.height = height;
346
+ hiprintTemplate.setPaper(paperSize.width, paperSize.height);
347
+ } else {
348
+ paperPopVisible.value = true;
349
+ }
350
+ };
351
+ const getPaperSize = code => {
352
+ const paper = {
353
+ A3: { width: 420, height: 296.6 },
354
+ A4: { width: 210, height: 296.6 },
355
+ A5: { width: 210, height: 147.6 },
356
+ bisect: { width: 241, height: 140 },
357
+ trisection: { width: 241, height: 93 }
358
+ };
359
+ return paper[code];
360
+ };
361
+
362
+ onMounted(() => {
363
+ const { record } = props;
364
+ loading.value = true;
365
+ currentRecord.value = clone(record, true);
366
+ const template = record.templateContent ? JSON.parse(record.templateContent) : panel;
367
+ $('#hiprint-printTemplate').empty();
368
+ $printPlugin.print.init({
369
+ providers: [new $printPlugin.provider()],
370
+ // host: 'http://localhost:17521', // 可在此处设置连接地址与端口号
371
+ // token: 'token', // 可在此处设置连接 token
372
+ // lang: 'en',
373
+ fontList: [
374
+ // { title: '微软雅黑', value: 'Microsoft YaHei' },
375
+ { title: '黑体', value: 'STHeitiSC-Light' },
376
+ { title: '思源黑体', value: 'SourceHanSansCN-Normal' },
377
+ { title: '王羲之书法体', value: '王羲之书法体' },
378
+ { title: '宋体', value: 'SimSun' },
379
+ { title: '华为楷体', value: 'STKaiti' },
380
+ { title: 'cursive', value: 'cursive' }
381
+ ],
382
+
383
+ willOutOfBounds: true, // 是否允许组件内的控件超出范围
384
+ qtDesigner: true // 是否开启类似QT Designer的唯一field生成模式
385
+ });
386
+ // 还原配置
387
+ $printPlugin.print.setConfig();
388
+ // 替换配置
389
+ $printPlugin.print.setConfig({
390
+ movingDistance: 2.5,
391
+ text: {
392
+ supportOptions: [
393
+ { name: 'styler', hidden: true },
394
+ { name: 'formatter', hidden: true }
395
+ ]
396
+ }
397
+ });
398
+
399
+ $printPlugin.print.PrintElementTypeManager.buildByHtml($('.ep-draggable-item'));
400
+ hiprintTemplate = new $printPlugin.print.PrintTemplate({
401
+ template,
402
+ settingContainer: '#PrintElementOptionSetting',
403
+ paginationContainer: '.hiprint-printPagination',
404
+ history: false // 是否需要 撤销重做功能
405
+ });
406
+ hiprintTemplate.design('#hiprint-printTemplate', { grid: true });
407
+ scale.value = hiprintTemplate.editingPanel.scale || 1;
408
+ loading.value = false;
409
+ });
410
+ onBeforeUnmount(() => {
411
+ $printPlugin = null;
412
+ hiprintTemplate = null;
413
+ });
414
+ </script>
415
+
416
+ <style lang="scss">
417
+ .ut-design-panel {
418
+ // .design-panel-contain > .el-card__body {
419
+ // height: 85vh;
420
+ // padding: 3px !important;
421
+ // }
422
+
423
+ // .card-design {
424
+ // display: flex;
425
+ // justify-content: center;
426
+ // background: url('./bg.png');
427
+ // }
428
+
429
+ // ::v-deep(.ut-design-item > .el-card__body) {
430
+ // padding: 3px;
431
+ // }
432
+
433
+ // ::v-deep(.card-design > .el-card__body) {
434
+ // height: 75vh;
435
+ // overflow: auto;
436
+ // }
437
+
438
+ ::v-deep(.design-setting-panel > .el-card__body) {
439
+ height: 75vh;
440
+ padding: 3px;
441
+ overflow: auto;
442
+ }
443
+
444
+ // .el-space {
445
+ // width: 100%;
446
+ // margin: 5px 0 0 !important;
447
+ // }
448
+
449
+ // ::v-deep(.el-space__item) {
450
+ // width: 100%;
451
+ // padding-right: 10px;
452
+ // padding-bottom: 0 !important;
453
+ // }
454
+ }
455
+ // 拖拽
456
+ .drag_item_box {
457
+ height: 100%;
458
+ padding: 6px;
459
+ }
460
+
461
+ .drag_item_box > div {
462
+ display: flex;
463
+ align-items: center;
464
+ justify-content: center;
465
+ width: 100%;
466
+ height: 100%;
467
+ background-color: #fff;
468
+ }
469
+
470
+ .drag_item_box > div > a {
471
+ text-align: center;
472
+ text-decoration-line: none;
473
+ }
474
+
475
+ .drag_item_box > div > a > span {
476
+ font-size: 28px;
477
+ }
478
+
479
+ .drag_item_box > div > a > p {
480
+ margin: 0;
481
+ }
482
+
483
+ .drag_item_title {
484
+ padding: 12px 6px 0;
485
+ font-size: 14px;
486
+ font-weight: bold;
487
+ }
488
+
489
+ // 默认图片
490
+ .design-custom-button {
491
+ font-size: 16px;
492
+ }
493
+
494
+ .el-card__body {
495
+ padding: 16px;
496
+ }
497
+
498
+ .design-setting-panel > .el-card__body {
499
+ height: 75vh;
500
+ padding: 3px;
501
+ overflow: auto;
502
+ }
503
+
504
+ .design-custom-button:not(.is--disabled):hover {
505
+ color: inherit !important;
506
+ }
507
+
508
+ // 辅助线样式
509
+ .toplineOfPosition {
510
+ border: 0;
511
+ border-top: 1px dashed purple;
512
+ }
513
+
514
+ .bottomlineOfPosition {
515
+ border: 0;
516
+ border-top: 1px dashed purple;
517
+ }
518
+
519
+ .leftlineOfPosition {
520
+ border: 0;
521
+ border-left: 1px dashed purple;
522
+ }
523
+
524
+ .rightlineOfPosition {
525
+ border: 0;
526
+ border-left: 1px dashed purple;
527
+ }
528
+
529
+ // 设计容器
530
+ .card-design {
531
+ overflow: hidden;
532
+ overflow: auto;
533
+ }
534
+
535
+ .hiprint-printElement-image-content img {
536
+ content: url('/logo.png');
537
+ }
538
+ </style>