@utogether/udp-core 1.0.1-beta.9 → 1.0.2

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 (168) hide show
  1. package/build/plugins.ts +37 -39
  2. package/dist/{403-BOzKHdlm.js → 403-B1rIjAAu.js} +6 -6
  3. package/dist/{404-uwgt4Nll.js → 404-mBqc2y4t.js} +4 -4
  4. package/dist/{500-4HBf6V9m.js → 500-BoI45Zdh.js} +2 -2
  5. package/dist/{AuthorityInfo-DvbIh1vT.js → AuthorityInfo-B08NBIIn.js} +1 -1
  6. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-BlCPvwXU.js → AuthorityInfo.vue_vue_type_style_index_0_lang-BLP1SaiH.js} +3 -3
  7. package/dist/{Company-D7Q9BFmr.js → Company-JGGyWEWH.js} +3 -3
  8. package/dist/{CompanyPanel-C0-PJlrt.js → CompanyPanel-BQ_cCmDx.js} +7 -7
  9. package/dist/{Department-h2hlXACv.js → Department-z2iO6hwM.js} +10 -10
  10. package/dist/{DepartmentPanel-B6hDEQpG.js → DepartmentPanel-BtQe7zwU.js} +108 -78
  11. package/dist/{DesignPanel-cS58-1v9.js → DesignPanel-7mhtVWas.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-LdvLC8VU.js → DesignPanel.vue_vue_type_style_index_0_lang-4EsHemj_.js} +6 -6
  13. package/dist/{DictView-T3TmpBa8.js → DictView-CjchV2Yk.js} +15 -16
  14. package/dist/InvOrganization-Pn1O_XP0.js +74 -0
  15. package/dist/{Org-CnCBDGKF.js → Org-BqytV_vi.js} +1 -1
  16. package/dist/{Preview-BaktKXB1.js → Preview-CLpUUMay.js} +2 -2
  17. package/dist/{ReportDefine-5Rb0PO9A.js → ReportDefine-Cz1KtEUF.js} +1 -1
  18. package/dist/{ReportDesign-DYdkVREA.js → ReportDesign-BaORYud4.js} +13 -13
  19. package/dist/{ReportQuery-BwhzIXMt.js → ReportQuery-CPCPXiXz.js} +1 -1
  20. package/dist/{ReportQueryFrom-PHtWwlOe.js → ReportQueryFrom-C_AcrfkJ.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-BE5yZNPM.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-Bm67ejay.js} +1 -1
  22. package/dist/{ReportTemplate-DaadVXIi.js → ReportTemplate-CFiNMz79.js} +11 -11
  23. package/dist/{Role-Dtg3nAmG.js → Role-B-XDoJd5.js} +3 -3
  24. package/dist/{RoleAssign-DEGtLssH.js → RoleAssign-BolW8YVs.js} +8 -8
  25. package/dist/{RolePanel-DpUzfE_o.js → RolePanel-2kfs5tw9.js} +1 -1
  26. package/dist/{RolePanel-CT7BTPmy.js → RolePanel-HilSuYns.js} +1 -1
  27. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Xyo0YEI0.js → RolePanel.vue_vue_type_script_setup_true_lang-CE4gApUY.js} +7 -7
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Dg2A6DJu.js → RolePanel.vue_vue_type_script_setup_true_lang-DPzgfAyV.js} +13 -13
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CyutzDZS.js → ScrollPanel.vue_vue_type_style_index_0_lang-CCTH4RkH.js} +4 -4
  30. package/dist/{Staff-_NlAGkrh.js → Staff-BTk3whFC.js} +3 -3
  31. package/dist/{StaffInfo-DVgUvVgd.js → StaffInfo-d3AuSzlA.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-C8hmlFgX.js → StaffInfo.vue_vue_type_script_setup_true_lang-eOL4VlfE.js} +5 -5
  33. package/dist/{StaffPanel-DKNZE3IE.js → StaffPanel-DV-D4jjz.js} +1 -1
  34. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-4sFq3CEo.js +135 -0
  35. package/dist/{SysUser-kQUf7XKz.js → SysUser-BnjYytws.js} +2 -2
  36. package/dist/{SysUserPanel-C191uX3U.js → SysUserPanel-CBoyD-Qi.js} +1 -1
  37. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-PrTlTZR-.js +341 -0
  38. package/dist/{SystemMenu-DwuSvHnj.js → SystemMenu-kYB_ZaUt.js} +36 -36
  39. package/dist/{UserInfo-DIsInFld.js → UserInfo-4dx97VBL.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-CnvGdbej.js → UserInfo.vue_vue_type_style_index_0_lang-BpbC_ZDm.js} +10 -10
  41. package/dist/{childView-3Bs2UBEw.js → childView-CHPNfTEb.js} +1 -1
  42. package/dist/{childView-BawyULD7.js → childView-CKA_JgVZ.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-YpWF-p2F.js → childView.vue_vue_type_style_index_0_lang-Bym2fQRd.js} +7 -7
  44. package/dist/childView.vue_vue_type_style_index_0_lang-W7bCtXeu.js +177 -0
  45. package/dist/{code-rule-DVaYcn8S.js → code-rule-CbxuZg0-.js} +40 -38
  46. package/dist/core.es.js +18 -12
  47. package/dist/{cron-task-xuzP-BpE.js → cron-task-nTOpqQYf.js} +7 -7
  48. package/dist/flow-task-B07st2aD.js +10 -0
  49. package/dist/{frameView-Cudt06qS.js → frameView-Z1tPUyCh.js} +1 -1
  50. package/dist/index-C3q8HoJM.js +4650 -0
  51. package/dist/{layoutView-BlFTV2jX.js → layoutView--MGA9zUB.js} +1766 -1760
  52. package/dist/{log-in-e7D5Ss1P.js → log-in-CSYJDA6m.js} +36 -29
  53. package/dist/log-out-DiwGCg7p.js +130 -0
  54. package/dist/login-C6Y0ajDp.js +251 -0
  55. package/dist/{login-log-kqKzKTto.js → login-log-C0V-_l3F.js} +5 -3
  56. package/dist/{lov-view-B2HaxyMs.js → lov-view-Cmv7wZZ9.js} +6 -6
  57. package/dist/{menuInfo-BxCTJ1VW.js → menuInfo-UeutJpOa.js} +1 -1
  58. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-CLOPNeUW.js → menuInfo.vue_vue_type_style_index_0_lang-CWX4Mu67.js} +118 -98
  59. package/dist/{pda-app-DPsAFNiw.js → pda-app-B6w99SJo.js} +10 -10
  60. package/dist/{resource-Dibb7t8u.js → resource-BybJvUv0.js} +4 -4
  61. package/dist/{su-welcome-DejR0KkM.js → su-welcome-C1bmxHoY.js} +119 -121
  62. package/dist/sys-config-BnmIDnCj.js +370 -0
  63. package/dist/udp-core.css +1 -9
  64. package/dist/utogether-MlnyYtNS.js +4 -0
  65. package/index.ts +49 -40
  66. package/package.json +18 -18
  67. package/src/App.vue +65 -65
  68. package/src/api/http.ts +1 -4
  69. package/src/api/index.ts +4 -2
  70. package/src/api/user.ts +2 -2
  71. package/src/components/SuCharts/src/UserInfo.vue +78 -78
  72. package/src/components/SuScrollTree/ScrollPanel.vue +1 -6
  73. package/src/components/udp/content/index.vue +88 -0
  74. package/src/components/udp/{form.vue → form/form.vue} +13 -16
  75. package/src/components/udp/{grid.vue → grid/index.vue} +56 -27
  76. package/src/components/udp/index.ts +4 -9
  77. package/src/components/udp/ut-stamp-badge/index.vue +271 -0
  78. package/src/components/udp/utils.ts +66 -105
  79. package/src/layout/components/lay-navbar/index.vue +8 -6
  80. package/src/layout/components/lay-panel/index.vue +150 -150
  81. package/src/layout/components/lay-search/index.vue +25 -25
  82. package/src/layout/components/lay-select-org/index.vue +4 -9
  83. package/src/layout/components/lay-setting/index.vue +503 -510
  84. package/src/layout/components/lay-sidebar/horizontal.vue +8 -6
  85. package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
  86. package/src/layout/components/lay-sidebar/sidebar-logo.vue +101 -98
  87. package/src/layout/components/lay-tag/index.vue +24 -51
  88. package/src/layout/hooks/useDataThemeChange.ts +1 -1
  89. package/src/layout/hooks/useNav.ts +176 -173
  90. package/src/layout/hooks/useTag.ts +227 -233
  91. package/src/layout/types.ts +93 -92
  92. package/src/main.ts +115 -119
  93. package/src/plugins/i18n/en.ts +302 -302
  94. package/src/plugins/i18n/module/u-workflow.ts +1 -1
  95. package/src/plugins/i18n/zh.ts +21 -6
  96. package/src/plugins/vxe-table/index.ts +116 -53
  97. package/src/plugins/vxe-table/render.tsx +945 -956
  98. package/src/router/index.ts +17 -17
  99. package/src/router/modules/flow.ts +35 -0
  100. package/src/router/modules/home.ts +32 -32
  101. package/src/router/modules/remaining.ts +58 -58
  102. package/src/router/utils.ts +420 -377
  103. package/src/store/modules/app.ts +2 -4
  104. package/src/store/modules/epTheme.ts +48 -49
  105. package/src/store/modules/multiTags.ts +15 -14
  106. package/src/store/modules/permission.ts +25 -15
  107. package/src/store/modules/system.ts +1 -3
  108. package/src/style/button.scss +85 -85
  109. package/src/style/login.css +1 -1
  110. package/src/style/vxetable.scss +61 -2
  111. package/src/utils/dataFormat/index.ts +223 -223
  112. package/src/utils/index.ts +3 -1
  113. package/src/utils/lifecycle.ts +39 -20
  114. package/src/utils/propTypes.ts +1 -6
  115. package/src/utils/storage/index.ts +2 -2
  116. package/src/utils/udp/http/index.ts +24 -11
  117. package/src/utils/udp/http/types.d.ts +3 -10
  118. package/src/views/login/login-view.vue +4 -18
  119. package/src/views/organization/company/CompanyPanel.vue +259 -259
  120. package/src/views/organization/department/Department.vue +58 -58
  121. package/src/views/organization/department/DepartmentPanel.vue +303 -283
  122. package/src/views/organization/inv-org/InvOrganization.vue +22 -7
  123. package/src/views/organization/staff/StaffInfo.vue +127 -133
  124. package/src/views/organization/staff/StaffPanel.vue +162 -145
  125. package/src/views/system/cron/cron-task.vue +2 -12
  126. package/src/views/system/menu/SystemMenu.vue +185 -183
  127. package/src/views/system/menu/menuInfo.vue +384 -363
  128. package/src/views/system/role/UserInfo.vue +195 -195
  129. package/src/views/system/role-assign/RoleAssign.vue +57 -57
  130. package/src/views/system/role-assign/RolePanel.vue +139 -139
  131. package/src/views/system/sys/sys-config.vue +69 -20
  132. package/src/views/system/sysUser/SysUserPanel.vue +97 -28
  133. package/src/views/uapp/pda/pda-app.vue +208 -208
  134. package/src/views/udev/coderule/code-rule.vue +132 -121
  135. package/src/views/udev/dict/DictView.vue +2 -2
  136. package/src/views/udev/dict/childView.vue +183 -222
  137. package/src/views/udev/lov/childView.vue +1 -7
  138. package/src/views/udev/lov/lov-view.vue +91 -91
  139. package/src/views/uhome/components/menu-favorite.vue +314 -331
  140. package/src/views/uhome/su-welcome.vue +319 -339
  141. package/src/views/ulogin/login.vue +325 -321
  142. package/src/views/upms/interface/log-in.vue +100 -106
  143. package/src/views/upms/interface/log-out.vue +104 -107
  144. package/src/views/upms/user/login-log.vue +54 -60
  145. package/src/views/urpt/design/DesignPanel.vue +507 -507
  146. package/src/views/urpt/design/Preview.vue +1 -0
  147. package/src/views/urpt/design/ReportDesign.vue +2 -4
  148. package/src/views/utask/flow-task.vue +18 -0
  149. package/types/global.d.ts +231 -236
  150. package/dist/InvOrganization-BVuOhzbt.js +0 -66
  151. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-BOOO6Cek.js +0 -111
  152. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-SwNbAEvW.js +0 -294
  153. package/dist/childView.vue_vue_type_style_index_0_lang-DWIFCX3X.js +0 -187
  154. package/dist/index-CKnq5xIa.js +0 -2623
  155. package/dist/log-out--RRncZhN.js +0 -120
  156. package/dist/login-CpKykfdf.js +0 -253
  157. package/dist/sys-config-DiySRWns.js +0 -277
  158. package/dist/utogether-Dct_14Zk.js +0 -182
  159. package/src/components/udp/count-down.vue +0 -536
  160. package/src/components/udp/flip-down/FlipCard/flip-card.vue +0 -251
  161. package/src/components/udp/flip-down/FlipCard/interfaces.ts +0 -4
  162. package/src/components/udp/flip-down/FlipClock/flip-clock.vue +0 -113
  163. package/src/components/udp/form-upload.vue +0 -482
  164. package/src/components/udp/lov.vue +0 -388
  165. package/src/components/udp/modal-form.vue +0 -189
  166. package/src/components/udp/modal-grid.vue +0 -288
  167. package/src/components/udp/upload.vue +0 -423
  168. package/src/utils/udp/useRender.ts +0 -431
@@ -1,507 +1,507 @@
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: 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>