@utogether/udp-core 2.0.0-beta.26 → 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 (183) hide show
  1. package/dist/403-CyoOD-Ik.js +65 -0
  2. package/dist/404-Ch_OHTw0.js +65 -0
  3. package/dist/500-Cf9am7HK.js +67 -0
  4. package/dist/AuthorityInfo-BJ427cqG.js +4 -0
  5. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-D9y7AwbB.js +99 -0
  6. package/dist/AuthorityPanel-lVnZ5bce.js +4 -0
  7. package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-nsfhDlvV.js +113 -0
  8. package/dist/Company-qo-lKPkv.js +25 -0
  9. package/dist/CompanyPanel-DkKWAKvY.js +204 -0
  10. package/dist/DataSet-iBHzs75s.js +147 -0
  11. package/dist/Department-CHUQByKX.js +25 -0
  12. package/dist/DepartmentPanel-C742dfOO.js +248 -0
  13. package/dist/DesignPanel-D9oE5R7m.js +4 -0
  14. package/dist/DesignPanel.vue_vue_type_style_index_0_lang-hYldVEbo.js +1097 -0
  15. package/dist/DictView-CrFXprP9.js +110 -0
  16. package/dist/InvOrganization-Cz8SzIgs.js +73 -0
  17. package/dist/Org-Bzt6yKox.js +38 -0
  18. package/dist/Preview-jonigfMQ.js +48 -0
  19. package/dist/ReportDefine-BpiM5Ovq.js +10 -0
  20. package/dist/ReportDesign-fp09cXJ7.js +164 -0
  21. package/dist/ReportQuery-52ZP1PYP.js +74 -0
  22. package/dist/ReportQueryFrom-DSYavJb1.js +4 -0
  23. package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-DBGYEp0u.js +177 -0
  24. package/dist/ReportTemplate-CA_UW0eD.js +161 -0
  25. package/dist/Role-DqOt8Bk0.js +25 -0
  26. package/dist/RoleAssign-BdxhefhQ.js +26 -0
  27. package/dist/RolePanel-2gZ3H0ET.js +4 -0
  28. package/dist/RolePanel-BsNd0svJ.js +4 -0
  29. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DLOwgF99.js +152 -0
  30. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DmzD9kab.js +131 -0
  31. package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-B9ptUMeI.js +99 -0
  32. package/dist/Staff-D3L8fEoY.js +26 -0
  33. package/dist/StaffInfo-DYRw6ZYJ.js +4 -0
  34. package/dist/StaffInfo.vue_vue_type_script_setup_true_lang-xqEOQnMs.js +107 -0
  35. package/dist/StaffPanel-DkrNH6Px.js +4 -0
  36. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-BPBMnliy.js +152 -0
  37. package/dist/SysUser-Bl1-cIpJ.js +15 -0
  38. package/dist/SysUserPanel-yxNLaBwt.js +4 -0
  39. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BDcsgSl5.js +352 -0
  40. package/dist/SystemMenu-C4_Arn12.js +155 -0
  41. package/dist/UserInfo-QcNwJCUR.js +4 -0
  42. package/dist/UserInfo.vue_vue_type_style_index_0_lang-DLIeUphX.js +159 -0
  43. package/dist/childView-B23DEO2u.js +4 -0
  44. package/dist/childView-saDZQv9x.js +4 -0
  45. package/dist/childView.vue_vue_type_style_index_0_lang-RsKR6CAC.js +182 -0
  46. package/dist/childView.vue_vue_type_style_index_0_lang-ZFEfavUY.js +142 -0
  47. package/dist/code-rule-2_Ihx_by.js +147 -0
  48. package/dist/core.es.js +26 -6
  49. package/dist/cron-task-BFOPJQIk.js +134 -0
  50. package/dist/flow-task-PoDnE_kE.js +10 -0
  51. package/dist/frameView-f7Ya0Knj.js +43 -0
  52. package/dist/index-BpdTDaTk.js +3213 -0
  53. package/dist/layout-home-v3DPJ7rB.js +231 -0
  54. package/dist/layoutView-DZHoQDH1.js +3190 -0
  55. package/dist/log-in-BPAMJTwH.js +115 -0
  56. package/dist/log-out-DZACF0jg.js +129 -0
  57. package/dist/login-B8cwozax.js +216 -0
  58. package/dist/login-log-CVvRgZSu.js +70 -0
  59. package/dist/lov-view-Ba7Y7xy0.js +98 -0
  60. package/dist/menuInfo-BpRKFYK8.js +4 -0
  61. package/dist/menuInfo.vue_vue_type_style_index_0_lang-DJ5sUC6m.js +359 -0
  62. package/dist/pda-app-C0jJecrL.js +706 -0
  63. package/dist/redirect-DTz8GSnv.js +15 -0
  64. package/dist/resource-BG22Cw4P.js +97 -0
  65. package/dist/su-welcome-DaxhbrC6.js +879 -0
  66. package/dist/sys-config-CG2fMtak.js +384 -0
  67. package/dist/udp-core.css +1 -2
  68. package/dist/useNav-_u2UAQWk.js +84 -0
  69. package/dist/utogether-MlnyYtNS.js +4 -0
  70. package/dist/wecom-push-B75FLee5.js +70 -0
  71. package/index.ts +54 -50
  72. package/package.json +21 -21
  73. package/src/App.vue +79 -78
  74. package/src/api/http.ts +10 -4
  75. package/src/api/index.ts +51 -51
  76. package/src/api/user.ts +64 -64
  77. package/src/components/SuQrcode/src/index.tsx +231 -236
  78. package/src/components/udp/content/index.vue +93 -93
  79. package/src/components/udp/form-upload/form-upload.vue +496 -496
  80. package/src/components/udp/grid/index.vue +643 -544
  81. package/src/components/udp/index.ts +2 -1
  82. package/src/components/udp/modal-form/index.vue +326 -0
  83. package/src/components/udp/utils.ts +420 -420
  84. package/src/layout/components/lay-navbar/index.vue +240 -240
  85. package/src/layout/components/lay-panel/index.vue +2 -6
  86. package/src/layout/components/lay-search/components/SearchModal.vue +185 -181
  87. package/src/layout/components/lay-sidebar/mixNav.vue +261 -261
  88. package/src/layout/components/lay-sidebar/sidebarItem.vue +199 -195
  89. package/src/layout/components/lay-sidebar/vertical.vue +92 -92
  90. package/src/layout/layoutView.vue +1 -0
  91. package/src/main.ts +111 -109
  92. package/src/plugins/i18n/zh.ts +5 -1
  93. package/src/plugins/vxe-table/index.ts +116 -116
  94. package/src/router/index.ts +5 -34
  95. package/src/router/utils.ts +434 -430
  96. package/src/store/modules/permission.ts +1 -1
  97. package/src/store/modules/system.ts +193 -186
  98. package/src/style/print-lock.css +380 -375
  99. package/src/style/suprint.css +990 -985
  100. package/src/style/vxetable.scss +372 -364
  101. package/src/utils/authority/index.ts +19 -2
  102. package/src/utils/dataFormat/index.ts +309 -222
  103. package/src/utils/udp/http/index.ts +126 -67
  104. package/src/utils/udp/http/types.d.ts +15 -14
  105. package/src/views/login/login-view.vue +4 -21
  106. package/src/views/organization/department/DepartmentPanel.vue +3 -4
  107. package/src/views/system/sys/sys-config.vue +344 -344
  108. package/src/views/uhome/components/home-todo.vue +191 -178
  109. package/src/views/uhome/dynamic-card.vue +31 -31
  110. package/src/views/uhome/su-welcome.vue +310 -310
  111. package/src/views/ulogin/login.vue +292 -296
  112. package/src/views/urpt/design/DesignPanel.vue +538 -507
  113. package/src/views/urpt/design/print-data.ts +39 -59
  114. package/tsconfig.json +2 -3
  115. package/types/global.d.ts +234 -234
  116. package/vite.config.ts +2 -1
  117. package/dist/403-D6Wb3JJh.js +0 -72
  118. package/dist/404-B_HNbPNV.js +0 -72
  119. package/dist/500-BMemTTy1.js +0 -77
  120. package/dist/AuthorityInfo-6wHxwiFM.js +0 -91
  121. package/dist/AuthorityPanel-OqF_DvXA.js +0 -98
  122. package/dist/Company-BLXSfow0.js +0 -21
  123. package/dist/CompanyPanel-B4kRZ5Cg.js +0 -199
  124. package/dist/DataSet-CuGZcKC-.js +0 -141
  125. package/dist/Department-oFhsa7cd.js +0 -21
  126. package/dist/DepartmentPanel-B1UGpu-r.js +0 -242
  127. package/dist/DepartmentPanel-BL58AdoT.js +0 -2
  128. package/dist/DesignPanel-DmkFVw1N.js +0 -1196
  129. package/dist/DictView-CC5yMzOq.js +0 -100
  130. package/dist/File-WJXjGYxr.js +0 -89
  131. package/dist/InvOrganization-BwMmD8Ua.js +0 -76
  132. package/dist/Org-HgnOWubi.js +0 -76
  133. package/dist/Preview-CAzWxLmP.js +0 -45
  134. package/dist/ReIcon-DecitXmg.js +0 -413
  135. package/dist/ReportDefine-BgLM-Rjk.js +0 -10
  136. package/dist/ReportDesign-DwchGG2P.js +0 -158
  137. package/dist/ReportQuery-D5jaRJEn.js +0 -101
  138. package/dist/ReportQueryFrom-CNlmtYey.js +0 -198
  139. package/dist/ReportTemplate-CNcTmccs.js +0 -162
  140. package/dist/Role-Be8WfdCA.js +0 -21
  141. package/dist/RoleAssign-CtehGAUf.js +0 -22
  142. package/dist/RolePanel-CAwITg_q.js +0 -131
  143. package/dist/RolePanel-SN0FGFZ7.js +0 -176
  144. package/dist/ScrollPanel-DW30pGz1.js +0 -88
  145. package/dist/Staff-V2YsNKcj.js +0 -22
  146. package/dist/StaffInfo-CKRPW0r4.js +0 -149
  147. package/dist/StaffPanel-BxcgMg7u.js +0 -143
  148. package/dist/SysUser-Dxyj5w5m.js +0 -12
  149. package/dist/SysUserPanel-DI6CWcZo.js +0 -365
  150. package/dist/SystemMenu-BBHREM8T.js +0 -154
  151. package/dist/UserInfo-BMVQ0xwE.js +0 -194
  152. package/dist/_plugin-vue_export-helper-C6QCLu9I.js +0 -8
  153. package/dist/api-BFNxcxSN.js +0 -30
  154. package/dist/authority-BJFEUdrh.js +0 -20
  155. package/dist/await-to-js.es5-DkWYmPXW.js +0 -10
  156. package/dist/childView-BBjPEraB.js +0 -184
  157. package/dist/childView-DNqG2UVm.js +0 -181
  158. package/dist/code-rule-QFrhqFrW.js +0 -151
  159. package/dist/contant-Q77dU_V3.js +0 -4
  160. package/dist/cron-task-BpUDKEAU.js +0 -131
  161. package/dist/flow-task-DAc2NrDU.js +0 -11
  162. package/dist/frameView-Di0zJZUR.js +0 -39
  163. package/dist/layout-home-BVp7vYLR.js +0 -239
  164. package/dist/layoutView-B6Mx2ERA.js +0 -2662
  165. package/dist/log-in-BrNB0mLz.js +0 -117
  166. package/dist/log-out-dYfqvzy6.js +0 -111
  167. package/dist/login-D_Hjy3Jd.js +0 -231
  168. package/dist/login-log-CJak-ANA.js +0 -79
  169. package/dist/lov-view-DM5Nm5tW.js +0 -95
  170. package/dist/menuInfo-BlOY1KZW.js +0 -346
  171. package/dist/mitt-CQgI7DYU.js +0 -27
  172. package/dist/pda-app-CA7YI37u.js +0 -589
  173. package/dist/redirect-N0k4tImU.js +0 -16
  174. package/dist/resource-CfQTHFcs.js +0 -94
  175. package/dist/su-welcome-DVD3S_du.js +0 -799
  176. package/dist/sys-config-Ddb3vBpK.js +0 -316
  177. package/dist/system-Cm3lyBas.js +0 -1528
  178. package/dist/udp-core-DaQd5CF1.js +0 -2028
  179. package/dist/useDataThemeChange-DJ4K3VGp.js +0 -226
  180. package/dist/useNav-BhOJIdrJ.js +0 -106
  181. package/dist/utogether-l7JXs4Lv.js +0 -4
  182. package/dist/water-mark-WDQZ9YqB.js +0 -119
  183. package/dist/wecom-push-kWkAVRCj.js +0 -77
@@ -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>