ol-base-components 2.9.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol-base-components",
3
- "version": "2.9.3",
3
+ "version": "3.0.0",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "bin": {
@@ -17,7 +17,6 @@
17
17
  "openCloseloop": "node src/bin/openCloseloop.js",
18
18
  "openLoop": "node src/bin/openLoop.js",
19
19
  "news": "node src/bin/news.js"
20
-
21
20
  },
22
21
  "dependencies": {
23
22
  "commander": "^14.0.0",
@@ -27,11 +26,13 @@
27
26
  "eslint-plugin-vue": "^10.3.0",
28
27
  "inquirer": "^8.2.6",
29
28
  "swagger-client": "^3.0.1",
30
- "vue": "^2.6.14"
29
+ "vue": "^2.6.14",
30
+ "vue-plugin-hiprint": "^0.0.60"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@babel/core": "^7.12.16",
34
34
  "@babel/eslint-parser": "^7.12.16",
35
+ "@types/vscode": "^1.60.0",
35
36
  "@vue/cli-plugin-babel": "~5.0.0",
36
37
  "@vue/cli-plugin-eslint": "~5.0.0",
37
38
  "@vue/cli-service": "~5.0.0",
@@ -40,8 +41,7 @@
40
41
  "prettier": "^2.8.8",
41
42
  "sass": "^1.89.2",
42
43
  "sass-loader": "^16.0.5",
43
- "vue-template-compiler": "^2.6.14",
44
- "@types/vscode": "^1.60.0"
44
+ "vue-template-compiler": "^2.6.14"
45
45
  },
46
46
  "eslintConfig": {
47
47
  "root": true,
package/public/index.html CHANGED
@@ -6,6 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
7
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
8
  <title><%= htmlWebpackPlugin.options.title %></title>
9
+ <link rel="stylesheet" type="text/css" media="print" href="./print-lock.css">
9
10
  </head>
10
11
  <body>
11
12
  <noscript>
@@ -0,0 +1,352 @@
1
+ @media print {
2
+ body {
3
+ margin: 0px;
4
+ padding: 0px;
5
+ }
6
+ }
7
+
8
+ @page {
9
+ margin: 0;
10
+ }
11
+
12
+ .hiprint-printPaper * {
13
+ box-sizing: border-box;
14
+ -moz-box-sizing: border-box; /* Firefox */
15
+ -webkit-box-sizing: border-box; /* Safari */
16
+ }
17
+
18
+ .hiprint-printPaper *:focus {
19
+ outline: -webkit-focus-ring-color auto 0px;
20
+ }
21
+
22
+ .hiprint-printPaper {
23
+ position: relative;
24
+ padding: 0 0 0 0;
25
+ page-break-after: always;
26
+ -webkit-user-select: none; /* Chrome/Safari/Opera */
27
+ -moz-user-select: none; /* Firefox */
28
+ user-select: none;
29
+ overflow-x: hidden;
30
+ overflow: hidden;
31
+ }
32
+
33
+ .hiprint-printPaper .hiprint-printPaper-content {
34
+ position: relative;
35
+ }
36
+
37
+ /* 火狐浏览器打印 第一页过后 重叠问题 */
38
+ @-moz-document url-prefix() {
39
+ .hiprint-printPaper .hiprint-printPaper-content {
40
+ position: relative;
41
+ margin-top: 20px;
42
+ top: -20px
43
+ }
44
+ }
45
+
46
+ .hiprint-printPaper.design {
47
+ overflow: visible;
48
+ }
49
+
50
+
51
+ .hiprint-printTemplate .hiprint-printPanel {
52
+ page-break-after: always;
53
+ }
54
+
55
+ .hiprint-printPaper, hiprint-printPanel {
56
+ box-sizing: border-box;
57
+ border: 0px;
58
+ }
59
+
60
+ .hiprint-printPanel .hiprint-printPaper:last-child {
61
+ page-break-after: avoid;
62
+ }
63
+
64
+ .hiprint-printTemplate .hiprint-printPanel:last-child {
65
+ page-break-after: avoid;
66
+ }
67
+
68
+ .hiprint-printPaper .hideheaderLinetarget {
69
+ border-top: 0px dashed rgb(201, 190, 190) !important;
70
+ }
71
+
72
+ .hiprint-printPaper .hidefooterLinetarget {
73
+ border-top: 0px dashed rgb(201, 190, 190) !important;
74
+ }
75
+
76
+ .hiprint-printPaper.design {
77
+ border: 1px dashed rgba(170, 170, 170, 0.7);
78
+ }
79
+
80
+ .design .hiprint-printElement-table-content, .design .hiprint-printElement-longText-content {
81
+ overflow: hidden;
82
+ box-sizing: border-box;
83
+ }
84
+
85
+ .design .resize-panel {
86
+ box-sizing: border-box;
87
+ border: 1px dotted;
88
+ }
89
+
90
+ .hiprint-printElement-text {
91
+ background-color: transparent;
92
+ background-repeat: repeat;
93
+ padding: 0 0 0 0;
94
+ border: 0.75pt none rgb(0, 0, 0);
95
+ direction: ltr;
96
+ font-family: 'SimSun';
97
+ font-size: 9pt;
98
+ font-style: normal;
99
+ font-weight: normal;
100
+ padding-bottom: 0pt;
101
+ padding-left: 0pt;
102
+ padding-right: 0pt;
103
+ padding-top: 0pt;
104
+ text-align: left;
105
+ text-decoration: none;
106
+ line-height: 9.75pt;
107
+ box-sizing: border-box;
108
+ word-wrap: break-word;
109
+ word-break: break-all;
110
+ }
111
+
112
+ .design .hiprint-printElement-text-content {
113
+ border: 1px dashed rgb(206, 188, 188);
114
+ box-sizing: border-box;
115
+ }
116
+
117
+ .hiprint-printElement-longText {
118
+ background-color: transparent;
119
+ background-repeat: repeat;
120
+ border: 0.75pt none rgb(0, 0, 0);
121
+ direction: ltr;
122
+ font-family: 'SimSun';
123
+ font-size: 9pt;
124
+ font-style: normal;
125
+ font-weight: normal;
126
+ padding-bottom: 0pt;
127
+ padding-left: 0pt;
128
+ padding-right: 0pt;
129
+ padding-top: 0pt;
130
+ text-align: left;
131
+ text-decoration: none;
132
+ line-height: 9.75pt;
133
+ box-sizing: border-box;
134
+ word-wrap: break-word;
135
+ word-break: break-all;
136
+ /*white-space: pre-wrap*/
137
+ }
138
+
139
+
140
+ .hiprint-printElement-table {
141
+ background-color: transparent;
142
+ background-repeat: repeat;
143
+ color: rgb(0, 0, 0);
144
+ border-color: rgb(0, 0, 0);
145
+ border-style: none;
146
+ direction: ltr;
147
+ font-family: 'SimSun';
148
+ font-size: 9pt;
149
+ font-style: normal;
150
+ font-weight: normal;
151
+ padding-bottom: 0pt;
152
+ padding-left: 0pt;
153
+ padding-right: 0pt;
154
+ padding-top: 0pt;
155
+ text-align: left;
156
+ text-decoration: none;
157
+ padding: 0 0 0 0;
158
+ box-sizing: border-box;
159
+ line-height: 9.75pt;
160
+ }
161
+
162
+ .hiprint-printElement-table thead {
163
+ background: #e8e8e8;
164
+ font-weight: 700;
165
+ }
166
+
167
+ table.hiprint-printElement-tableTarget {
168
+ width: 100%;
169
+ }
170
+
171
+ .hiprint-printElement-tableTarget, .hiprint-printElement-tableTarget tr, .hiprint-printElement-tableTarget td {
172
+ border-color: rgb(0, 0, 0);
173
+ /*border-style: none;*/
174
+ /*border: 1px solid rgb(0, 0, 0);*/
175
+ font-weight: normal;
176
+ direction: ltr;
177
+ padding-bottom: 0pt;
178
+ padding-left: 4pt;
179
+ padding-right: 4pt;
180
+ padding-top: 0pt;
181
+ text-decoration: none;
182
+ vertical-align: middle;
183
+ box-sizing: border-box;
184
+ word-wrap: break-word;
185
+ word-break: break-all;
186
+ /*line-height: 9.75pt;
187
+ font-size: 9pt;*/
188
+ }
189
+
190
+ .hiprint-printElement-tableTarget-border-all {
191
+ border: 1px solid;
192
+ }
193
+ .hiprint-printElement-tableTarget-border-none {
194
+ border: 0px solid;
195
+ }
196
+ .hiprint-printElement-tableTarget-border-lr {
197
+ border-left: 1px solid;
198
+ border-right: 1px solid;
199
+ }
200
+ .hiprint-printElement-tableTarget-border-left {
201
+ border-left: 1px solid;
202
+ }
203
+ .hiprint-printElement-tableTarget-border-right {
204
+ border-right: 1px solid;
205
+ }
206
+ .hiprint-printElement-tableTarget-border-tb {
207
+ border-top: 1px solid;
208
+ border-bottom: 1px solid;
209
+ }
210
+ .hiprint-printElement-tableTarget-border-top {
211
+ border-top: 1px solid;
212
+ }
213
+ .hiprint-printElement-tableTarget-border-bottom {
214
+ border-bottom: 1px solid;
215
+ }
216
+
217
+ .hiprint-printElement-tableTarget-border-td-none td {
218
+ border: 0px solid;
219
+ }
220
+ .hiprint-printElement-tableTarget-border-td-all td:not(:nth-last-child(-n+2)) {
221
+ border-right: 1px solid;
222
+ }
223
+ .hiprint-printElement-tableTarget-border-td-all td:not(last-child) {
224
+ border-right: 1px solid;
225
+ }
226
+ .hiprint-printElement-tableTarget-border-td-all td:last-child {
227
+ border-left: 1px solid;
228
+ }
229
+ .hiprint-printElement-tableTarget-border-td-all td:last-child:first-child {
230
+ border-left: none;
231
+ }
232
+
233
+ /*.hiprint-printElement-tableTarget tr,*/
234
+ .hiprint-printElement-tableTarget td {
235
+ height: 18pt;
236
+ }
237
+
238
+ .hiprint-printPaper .hiprint-paperNumber {
239
+ font-size: 9pt;
240
+ }
241
+
242
+ .design .hiprint-printElement-table-handle {
243
+ position: absolute;
244
+ height: 21pt;
245
+ width: 21pt;
246
+ background: red;
247
+ z-index: 1;
248
+ }
249
+
250
+ .hiprint-printPaper .hiprint-paperNumber-disabled {
251
+ float: right !important;
252
+ right: 0 !important;
253
+ color: gainsboro !important;
254
+ }
255
+
256
+ .hiprint-printElement-vline, .hiprint-printElement-hline {
257
+ border: 0px none rgb(0, 0, 0);
258
+
259
+ }
260
+
261
+ .hiprint-printElement-vline {
262
+ border-left: 0.75pt solid #000;
263
+ border-right: 0px none rgb(0, 0, 0) !important;
264
+ border-bottom: 0px none rgb(0, 0, 0) !important;
265
+ border-top: 0px none rgb(0, 0, 0) !important;
266
+ }
267
+
268
+ .hiprint-printElement-hline {
269
+ border-top: 0.75pt solid #000;
270
+ border-right: 0px none rgb(0, 0, 0) !important;
271
+ border-bottom: 0px none rgb(0, 0, 0) !important;
272
+ border-left: 0px none rgb(0, 0, 0) !important;
273
+ }
274
+
275
+ .hiprint-printElement-oval, .hiprint-printElement-rect {
276
+ border: 0.75pt solid #000;
277
+ }
278
+
279
+ .hiprint-text-content-middle {
280
+ }
281
+
282
+ .hiprint-text-content-middle > div {
283
+ display: grid;
284
+ align-items: center;
285
+ }
286
+
287
+ .hiprint-text-content-bottom {
288
+ }
289
+
290
+ .hiprint-text-content-bottom > div {
291
+ display: grid;
292
+ align-items: flex-end;
293
+ }
294
+
295
+ .hiprint-text-content-wrap {
296
+ }
297
+
298
+ .hiprint-text-content-wrap .hiprint-text-content-wrap-nowrap {
299
+ white-space: nowrap;
300
+ }
301
+
302
+ .hiprint-text-content-wrap .hiprint-text-content-wrap-clip {
303
+ white-space: nowrap;
304
+ overflow: hidden;
305
+ text-overflow: clip;
306
+ }
307
+
308
+ .hiprint-text-content-wrap .hiprint-text-content-wrap-ellipsis {
309
+ white-space: nowrap;
310
+ overflow: hidden;
311
+ text-overflow: ellipsis;
312
+ }
313
+
314
+ /*hi-grid-row */
315
+ .hi-grid-row {
316
+ position: relative;
317
+ height: auto;
318
+ margin-right: 0;
319
+ margin-left: 0;
320
+ zoom: 1;
321
+ display: block;
322
+ box-sizing: border-box;
323
+ }
324
+
325
+ .hi-grid-row::after, .hi-grid-row::before {
326
+ display: table;
327
+ content: '';
328
+ box-sizing: border-box;
329
+ }
330
+
331
+ .hi-grid-col {
332
+ display: block;
333
+ box-sizing: border-box;
334
+ position: relative;
335
+ float: left;
336
+ flex: 0 0 auto;
337
+ }
338
+
339
+ .table-grid-row {
340
+ margin-left: -0pt;
341
+ margin-right: -0pt;
342
+ }
343
+
344
+ .tableGridColumnsGutterRow {
345
+ padding-left: 0pt;
346
+ padding-right: 0pt;
347
+ }
348
+
349
+ .hiprint-gridColumnsFooter {
350
+ text-align: left;
351
+ clear: both;
352
+ }
package/src/App.vue CHANGED
@@ -1,14 +1,13 @@
1
1
  <template>
2
2
  <div id="app">
3
- <div>table组件案例</div>
4
- <ol-search
3
+ <!-- <div>table组件案例</div> -->
4
+ <!-- <ol-search
5
5
  :form-search-data="formSearchData"
6
6
  @handleSearch="handleSearch"
7
7
  @handleReset="handleReset"
8
8
  url="/api/app/admission-info/paged-result"
9
- />
10
- <!-- url="/api/app/admission-info/paged-result" -->
11
-
9
+ /> -->
10
+ <button @click="aaa">123</button>
12
11
  <ol-table
13
12
  :paginations="paginations"
14
13
  :empty-img="tableData.emptyImg"
@@ -24,8 +23,7 @@
24
23
  <el-button @click="onAdd">新建</el-button>
25
24
  <el-button @click="onEdit">编辑</el-button>
26
25
 
27
- <!-- 编辑,查看弹窗 -->
28
- <el-dialog :title="`${this.form.title}`" :visible.sync="dialogVisible" width="80%">
26
+ <!-- <el-dialog :title="`${this.form.title}`" :visible.sync="dialogVisible" width="80%">
29
27
  <ol-form
30
28
  v-if="dialogVisible"
31
29
  url="/api/app/admission-info/admission-info"
@@ -33,32 +31,8 @@
33
31
  @onCancel="dialogVisible = false"
34
32
  @onSubmit="onSubmit"
35
33
  />
36
- </el-dialog>
37
-
38
- <!-- <el-button @click="handlePrint">接口</el-button>
39
-
40
- <div
41
- class="ellipsis-container"
42
- id="ellipsis-container"
43
- v-for="item in 5"
44
- :key="item"
45
- >如何处理文本溢出如何实现单行文本溢出显示省略号</div>
46
-
47
- <div class="triangle-up"></div>
48
- <div class="grid-content">
49
- <div>11</div>
50
- <div>11</div>
51
- </div>
52
-
53
- <div class="container">
54
- <div class="item">1</div>
55
- <div class="item item2">2</div>
56
- <div class="item">3</div>
57
- </div>
58
-
59
- <div class="square-container">
60
- <div class="square"></div>
61
- </div> -->
34
+ </el-dialog> -->
35
+ <!-- <ol-print /> -->
62
36
  </div>
63
37
  </template>
64
38
 
@@ -527,6 +501,25 @@ export default {
527
501
  });
528
502
  }
529
503
  },
504
+ aaa() {
505
+ this.$hiprint(
506
+ {
507
+ name: "CcSimple",
508
+ barcode: "33321323",
509
+ table: [
510
+ { id: "1", name: "王小可", gender: "男", count: "120", amount: "9089元" },
511
+ { id: "2", name: "梦之遥", gender: "女", count: "20", amount: "89元" },
512
+ ],
513
+ table1: [
514
+ { id: "1", name: "王小可11", gender: "男", count: "120", amount: "9089元" },
515
+ { id: "2", name: "梦之遥", gender: "女", count: "20", amount: "89元" },
516
+ ],
517
+ },
518
+ () => {
519
+ console.log(123);
520
+ }
521
+ );
522
+ },
530
523
  },
531
524
  };
532
525
  </script>