qsyx-element 1.0.1

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 (83) hide show
  1. package/dist/es/Button-OBW9FK8V.js +13 -0
  2. package/dist/es/Dialog-lE9CYwyT.js +67 -0
  3. package/dist/es/Form-GllMGZ5L.js +658 -0
  4. package/dist/es/Table-BrzOxcFz.js +122 -0
  5. package/dist/es/cdn/iconfont.css +457 -0
  6. package/dist/es/cdn/luckysheet.css +1 -0
  7. package/dist/es/cdn/luckysheet.umd.js +27 -0
  8. package/dist/es/cdn/plugin.js +1 -0
  9. package/dist/es/cdn/plugins.css +10 -0
  10. package/dist/es/cdn/pluginsCss.css +1 -0
  11. package/dist/es/excelSee-DNbR9hdn.js +346 -0
  12. package/dist/es/exportExcel-rMHaYDUw.js +326 -0
  13. package/dist/es/exportWord-zS-yn0r2.js +615 -0
  14. package/dist/es/imToText-nJqaYhI_.js +38 -0
  15. package/dist/es/index.js +39 -0
  16. package/dist/es/insertExcel-BYsef8on.js +23155 -0
  17. package/dist/es/onlineExcel-DJeuDI97.js +371 -0
  18. package/dist/es/pdfSee-BJvVkNxS.js +113 -0
  19. package/dist/es/utils-DsWIZ76j.js +14 -0
  20. package/dist/es/vendor-P2JMGdqH.js +157444 -0
  21. package/dist/es/wordSee-oMFtPj-S.js +73 -0
  22. package/dist/index.css +1 -0
  23. package/dist/types/components/Button/Button.vue.d.ts +2 -0
  24. package/dist/types/components/Button/index.d.ts +13 -0
  25. package/dist/types/components/Dialog/Dialog.vue.d.ts +35 -0
  26. package/dist/types/components/Dialog/index.d.ts +60 -0
  27. package/dist/types/components/Form/Form.vue.d.ts +34 -0
  28. package/dist/types/components/Table/Table.vue.d.ts +30 -0
  29. package/dist/types/components/Table/index.d.ts +43 -0
  30. package/dist/types/components/excelSee/color.d.ts +2 -0
  31. package/dist/types/components/excelSee/excel.d.ts +7 -0
  32. package/dist/types/components/excelSee/hack.d.ts +1 -0
  33. package/dist/types/components/excelSee/index.d.ts +1 -0
  34. package/dist/types/components/excelSee/media.d.ts +2 -0
  35. package/dist/types/components/exportExcel/index.d.ts +53 -0
  36. package/dist/types/components/exportExcel/index.vue.d.ts +22 -0
  37. package/dist/types/components/exportWord/index.d.ts +86 -0
  38. package/dist/types/components/exportWord/index.vue.d.ts +37 -0
  39. package/dist/types/components/exportWordEcharts/index.d.ts +1 -0
  40. package/dist/types/components/exportWordImage/index.d.ts +1 -0
  41. package/dist/types/components/foundationComponents/qsyxCheckBox/index.d.ts +83 -0
  42. package/dist/types/components/foundationComponents/qsyxCheckBox/index.vue.d.ts +25 -0
  43. package/dist/types/components/foundationComponents/qsyxDate/index.d.ts +67 -0
  44. package/dist/types/components/foundationComponents/qsyxDate/index.vue.d.ts +23 -0
  45. package/dist/types/components/foundationComponents/qsyxDateInterval/index.d.ts +67 -0
  46. package/dist/types/components/foundationComponents/qsyxDateInterval/index.vue.d.ts +23 -0
  47. package/dist/types/components/foundationComponents/qsyxInput/index.d.ts +83 -0
  48. package/dist/types/components/foundationComponents/qsyxInput/index.vue.d.ts +25 -0
  49. package/dist/types/components/foundationComponents/qsyxInputMoney/index.d.ts +67 -0
  50. package/dist/types/components/foundationComponents/qsyxInputMoney/index.vue.d.ts +23 -0
  51. package/dist/types/components/foundationComponents/qsyxRadio/index.d.ts +83 -0
  52. package/dist/types/components/foundationComponents/qsyxRadio/index.vue.d.ts +25 -0
  53. package/dist/types/components/foundationComponents/qsyxSelect/index.d.ts +99 -0
  54. package/dist/types/components/foundationComponents/qsyxSelect/index.vue.d.ts +27 -0
  55. package/dist/types/components/foundationComponents/qsyxTextArea/index.d.ts +83 -0
  56. package/dist/types/components/foundationComponents/qsyxTextArea/index.vue.d.ts +25 -0
  57. package/dist/types/components/imToText/index.d.ts +1 -0
  58. package/dist/types/components/index.d.ts +22 -0
  59. package/dist/types/components/insertExcel/index.d.ts +39 -0
  60. package/dist/types/components/insertExcel/index.vue.d.ts +14 -0
  61. package/dist/types/components/onlineExcel/export.d.ts +2 -0
  62. package/dist/types/components/onlineExcel/index.d.ts +1 -0
  63. package/dist/types/components/onlineExcel/is.d.ts +2 -0
  64. package/dist/types/components/pdfSee/index.d.ts +1 -0
  65. package/dist/types/components/pdfSee/pdf.d.ts +1 -0
  66. package/dist/types/components/pdfSee/worker.d.ts +1 -0
  67. package/dist/types/components/utils/baseToFile.d.ts +6 -0
  68. package/dist/types/components/utils/debounceRef.d.ts +1 -0
  69. package/dist/types/components/utils/downloadFile.d.ts +2 -0
  70. package/dist/types/components/utils/exportWord.d.ts +14 -0
  71. package/dist/types/components/utils/htmlToPdf.d.ts +4 -0
  72. package/dist/types/components/utils/index.d.ts +0 -0
  73. package/dist/types/components/utils/showMsg.d.ts +2 -0
  74. package/dist/types/components/utils/test.d.ts +1 -0
  75. package/dist/types/components/utils/url.d.ts +2 -0
  76. package/dist/types/components/wordSee/docx.d.ts +7 -0
  77. package/dist/types/components/wordSee/index.d.ts +1 -0
  78. package/dist/types/core/index.d.ts +4 -0
  79. package/dist/types/utils/index.d.ts +1 -0
  80. package/dist/types/utils/install.d.ts +6 -0
  81. package/dist/umd/index.css +1 -0
  82. package/dist/umd/index.umd.cjs +668 -0
  83. package/package.json +45 -0
@@ -0,0 +1,615 @@
1
+ import { defineComponent as A, openBlock as c, createElementBlock as y, createElementVNode as e, resolveComponent as v, createVNode as h, withCtx as w, createTextVNode as g, withDirectives as m, vModelText as f, Fragment as O, renderList as D, renderSlot as W } from "vue";
2
+ import { J as U, P as S, s as C, F as E, u as B, I, v as _ } from "./vendor-P2JMGdqH.js";
3
+ import { w as V } from "./utils-DsWIZ76j.js";
4
+ import { _ as k } from "./Form-GllMGZ5L.js";
5
+ const N = /* @__PURE__ */ A({
6
+ name: "QsyxExportWord",
7
+ __name: "index",
8
+ props: {
9
+ fileName: {
10
+ type: String,
11
+ default: "导出的aa"
12
+ },
13
+ // word模板名称
14
+ fileTemplete: {
15
+ type: String,
16
+ default: "aa"
17
+ },
18
+ demoUrl: {
19
+ type: String,
20
+ required: !0
21
+ },
22
+ // word数据
23
+ wordData: {
24
+ type: Object
25
+ }
26
+ },
27
+ setup(r) {
28
+ const t = r, p = () => {
29
+ let n = t.wordData;
30
+ U.getBinaryContent(
31
+ t.demoUrl,
32
+ function(o, a) {
33
+ if (o)
34
+ throw o;
35
+ let l = new S(a);
36
+ console.log("zip");
37
+ let i = new C().loadZip(l);
38
+ i.setOptions({
39
+ nullGetter: function() {
40
+ return "123";
41
+ }
42
+ }), i.setData({
43
+ ...n
44
+ });
45
+ try {
46
+ i.render();
47
+ } catch (u) {
48
+ let d = {
49
+ message: u.message,
50
+ name: u.name,
51
+ stack: u.stack,
52
+ properties: u.properties
53
+ };
54
+ throw console.log(JSON.stringify({ error: d })), u;
55
+ }
56
+ let s = i.getZip().generate({
57
+ type: "blob",
58
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
59
+ });
60
+ E.saveAs(s, t.fileName);
61
+ }
62
+ );
63
+ };
64
+ return (n, o) => (c(), y("div", null, [
65
+ e("div", {
66
+ class: "word-box",
67
+ onClick: p
68
+ }, "导出word")
69
+ ]));
70
+ }
71
+ }), xt = V(N);
72
+ function T(r) {
73
+ const t = /^data:image\/(png|jpg|jpeg|svg|svg\+xml);base64,/;
74
+ if (!t.test(r))
75
+ return !1;
76
+ const p = r.replace(t, "");
77
+ let n;
78
+ typeof window < "u" ? n = window.atob(p) : n = new Buffer(p, "base64").toString("binary");
79
+ const o = n.length, a = new Uint8Array(o);
80
+ for (let l = 0; l < o; l++) {
81
+ const i = n.charCodeAt(l);
82
+ a[l] = i;
83
+ }
84
+ return a.buffer;
85
+ }
86
+ const z = (r, t, p, n) => {
87
+ U.getBinaryContent(r, function(o, a) {
88
+ if (o)
89
+ throw o;
90
+ B.filters.size = function(d, x, b) {
91
+ return {
92
+ data: d,
93
+ size: [x, b]
94
+ };
95
+ };
96
+ let l = {};
97
+ l = {
98
+ //图像是否居中
99
+ centered: !0
100
+ }, l.getImage = (d) => T(d), l.getSize = function(d, x, b) {
101
+ return n.hasOwnProperty(b) ? n[b] : [300, 300];
102
+ };
103
+ let i = new S(a), s = new C();
104
+ s.attachModule(new I(l)), s.loadZip(i), s.setData(t);
105
+ try {
106
+ s.render();
107
+ } catch (d) {
108
+ let x = {
109
+ message: d.message,
110
+ name: d.name,
111
+ stack: d.stack,
112
+ properties: d.properties
113
+ };
114
+ throw console.log(JSON.stringify({
115
+ error: x
116
+ })), d;
117
+ }
118
+ let u = s.getZip().generate({
119
+ type: "blob",
120
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
121
+ });
122
+ E.saveAs(u, p);
123
+ });
124
+ };
125
+ function F(r) {
126
+ return new Promise(function(t, p) {
127
+ let n = new Image();
128
+ n.src = r, n.setAttribute("crossOrigin", "*"), n.onload = function() {
129
+ let o = document.createElement("canvas");
130
+ o.width = n.width, o.height = n.height, o.getContext("2d").drawImage(n, 0, 0, n.width, n.height);
131
+ let l = n.src.substring(n.src.lastIndexOf(".") + 1).toLowerCase(), s = o.toDataURL("image/" + l, 0.8);
132
+ t(s);
133
+ };
134
+ });
135
+ }
136
+ const j = {
137
+ name: "QsyxExportWordImage",
138
+ props: {
139
+ // 文件名
140
+ fileUrl: {
141
+ type: String
142
+ }
143
+ // word模板名称
144
+ },
145
+ data() {
146
+ return {
147
+ editVisible: !1,
148
+ user: "",
149
+ area: "",
150
+ annualrent: "",
151
+ purpose: "",
152
+ purpose1: "",
153
+ purpose2: "",
154
+ purpose3: "",
155
+ purpose4: "",
156
+ purpose5: "",
157
+ purpose6: "",
158
+ purpose7: "",
159
+ purpose8: "",
160
+ imglist: [
161
+ {
162
+ imgUrl: "https://img2.baidu.com/it/u=2709954499,581919391&fm=253&fmt=auto&app=138&f=JPEG?w=468&h=518"
163
+ },
164
+ {
165
+ imgUrl: "https://img2.baidu.com/it/u=2709954499,581919391&fm=253&fmt=auto&app=138&f=JPEG?w=468&h=518"
166
+ },
167
+ {
168
+ imgUrl: "https://img0.baidu.com/it/u=1462004956,1440895436&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=353"
169
+ }
170
+ ]
171
+ };
172
+ },
173
+ methods: {
174
+ async exportWordFile() {
175
+ for (let p in this.imglist)
176
+ this.imglist[p].imgUrl = await F(this.imglist[p].imgUrl);
177
+ let r = {
178
+ user: this.user,
179
+ area: this.area,
180
+ annualrent: this.annualrent,
181
+ purpose: this.purpose,
182
+ purpose1: this.purpose1,
183
+ purpose2: this.purpose2,
184
+ purpose3: this.purpose3,
185
+ purpose4: this.purpose4,
186
+ purpose5: this.purpose5,
187
+ purpose6: this.purpose6,
188
+ purpose7: this.purpose7,
189
+ purpose8: this.purpose8,
190
+ imglist: this.imglist
191
+ }, t = {
192
+ //控制导出的word图片大小
193
+ imgurl: [200, 200]
194
+ };
195
+ z(this.fileUrl, r, "房屋出租审批表.docx", t);
196
+ },
197
+ open() {
198
+ console.log("111", 111), this.editVisible = !0;
199
+ }
200
+ }
201
+ }, J = { class: "page-css" }, Z = { class: "search-data" }, L = {
202
+ class: "tb",
203
+ border: "1"
204
+ }, P = {
205
+ colspan: "2",
206
+ width: "180"
207
+ }, Q = {
208
+ colspan: "2",
209
+ width: "175"
210
+ }, M = { colspan: "2" }, R = { colspan: "2" }, G = { colspan: "2" }, q = { colspan: "2" }, H = { colspan: "2" }, X = { colspan: "2" }, Y = { colspan: "2" }, K = { colspan: "2" }, $ = { colspan: "2" }, tt = { colspan: "2" }, et = { colspan: "6" }, ot = ["src"], st = { class: "dialog-footer" };
211
+ function nt(r, t, p, n, o, a) {
212
+ const l = v("el-button"), i = v("el-card");
213
+ return c(), y("div", J, [
214
+ h(i, {
215
+ class: "box-card",
216
+ shadow: "never"
217
+ }, {
218
+ default: w(() => [
219
+ e("div", Z, [
220
+ h(l, {
221
+ type: "success",
222
+ onClick: a.open
223
+ }, {
224
+ default: w(() => t[13] || (t[13] = [
225
+ g("填写审批表")
226
+ ])),
227
+ _: 1
228
+ }, 8, ["onClick"])
229
+ ])
230
+ ]),
231
+ _: 1
232
+ }),
233
+ e("div", null, [
234
+ e("div", null, [
235
+ t[33] || (t[33] = e("div", { class: "tablename" }, [
236
+ e("h2", null, "房屋出租审批表")
237
+ ], -1)),
238
+ e("table", L, [
239
+ e("tr", null, [
240
+ t[15] || (t[15] = e("td", { height: "60" }, "承租人", -1)),
241
+ e("td", P, [
242
+ m(e("input", {
243
+ class: "inputone",
244
+ "onUpdate:modelValue": t[0] || (t[0] = (s) => o.user = s)
245
+ }, null, 512), [
246
+ [f, o.user]
247
+ ])
248
+ ]),
249
+ t[16] || (t[16] = e("td", {
250
+ colspan: "2",
251
+ width: "125"
252
+ }, "房屋面积", -1)),
253
+ e("td", Q, [
254
+ m(e("input", {
255
+ class: "inputtwo",
256
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => o.area = s)
257
+ }, null, 512), [
258
+ [f, o.area]
259
+ ]),
260
+ t[14] || (t[14] = g(" 平方米 "))
261
+ ])
262
+ ]),
263
+ e("tr", null, [
264
+ t[18] || (t[18] = e("td", { height: "60" }, "年租金", -1)),
265
+ e("td", M, [
266
+ m(e("input", {
267
+ class: "inputtwo",
268
+ "onUpdate:modelValue": t[2] || (t[2] = (s) => o.annualrent = s)
269
+ }, null, 512), [
270
+ [f, o.annualrent]
271
+ ]),
272
+ t[17] || (t[17] = g(" 元/年 "))
273
+ ]),
274
+ t[19] || (t[19] = e("td", { colspan: "2" }, "出租用途", -1)),
275
+ e("td", R, [
276
+ m(e("input", {
277
+ class: "inputone",
278
+ "onUpdate:modelValue": t[3] || (t[3] = (s) => o.purpose = s)
279
+ }, null, 512), [
280
+ [f, o.purpose]
281
+ ])
282
+ ])
283
+ ]),
284
+ e("tr", null, [
285
+ t[21] || (t[21] = e("td", { height: "60" }, "年租金", -1)),
286
+ e("td", G, [
287
+ m(e("input", {
288
+ class: "inputtwo",
289
+ "onUpdate:modelValue": t[4] || (t[4] = (s) => o.purpose1 = s)
290
+ }, null, 512), [
291
+ [f, o.purpose1]
292
+ ]),
293
+ t[20] || (t[20] = g(" 元/年 "))
294
+ ]),
295
+ t[22] || (t[22] = e("td", { colspan: "2" }, "出租用途", -1)),
296
+ e("td", q, [
297
+ m(e("input", {
298
+ class: "inputone",
299
+ "onUpdate:modelValue": t[5] || (t[5] = (s) => o.purpose2 = s)
300
+ }, null, 512), [
301
+ [f, o.purpose2]
302
+ ])
303
+ ])
304
+ ]),
305
+ e("tr", null, [
306
+ t[24] || (t[24] = e("td", { height: "60" }, "年租金", -1)),
307
+ e("td", H, [
308
+ m(e("input", {
309
+ class: "inputtwo",
310
+ "onUpdate:modelValue": t[6] || (t[6] = (s) => o.purpose3 = s)
311
+ }, null, 512), [
312
+ [f, o.purpose3]
313
+ ]),
314
+ t[23] || (t[23] = g(" 元/年 "))
315
+ ]),
316
+ t[25] || (t[25] = e("td", { colspan: "2" }, "出租用途", -1)),
317
+ e("td", X, [
318
+ m(e("input", {
319
+ class: "inputone",
320
+ "onUpdate:modelValue": t[7] || (t[7] = (s) => o.purpose4 = s)
321
+ }, null, 512), [
322
+ [f, o.purpose4]
323
+ ])
324
+ ])
325
+ ]),
326
+ e("tr", null, [
327
+ t[27] || (t[27] = e("td", { height: "60" }, "年租金", -1)),
328
+ e("td", Y, [
329
+ m(e("input", {
330
+ class: "inputtwo",
331
+ "onUpdate:modelValue": t[8] || (t[8] = (s) => o.purpose5 = s)
332
+ }, null, 512), [
333
+ [f, o.purpose5]
334
+ ]),
335
+ t[26] || (t[26] = g(" 元/年 "))
336
+ ]),
337
+ t[28] || (t[28] = e("td", { colspan: "2" }, "出租用途", -1)),
338
+ e("td", K, [
339
+ m(e("input", {
340
+ class: "inputone",
341
+ "onUpdate:modelValue": t[9] || (t[9] = (s) => o.purpose6 = s)
342
+ }, null, 512), [
343
+ [f, o.purpose6]
344
+ ])
345
+ ])
346
+ ]),
347
+ e("tr", null, [
348
+ t[30] || (t[30] = e("td", { height: "60" }, "年租金", -1)),
349
+ e("td", $, [
350
+ m(e("input", {
351
+ class: "inputtwo",
352
+ "onUpdate:modelValue": t[10] || (t[10] = (s) => o.purpose7 = s)
353
+ }, null, 512), [
354
+ [f, o.purpose7]
355
+ ]),
356
+ t[29] || (t[29] = g(" 元/年 "))
357
+ ]),
358
+ t[31] || (t[31] = e("td", { colspan: "2" }, "出租用途", -1)),
359
+ e("td", tt, [
360
+ m(e("input", {
361
+ class: "inputone",
362
+ "onUpdate:modelValue": t[11] || (t[11] = (s) => o.purpose8 = s)
363
+ }, null, 512), [
364
+ [f, o.purpose8]
365
+ ])
366
+ ])
367
+ ]),
368
+ e("tr", null, [
369
+ t[32] || (t[32] = e("td", { height: "300" }, "房屋平面示意图", -1)),
370
+ e("td", et, [
371
+ (c(!0), y(O, null, D(o.imglist, (s, u) => (c(), y("div", { key: u }, [
372
+ e("img", {
373
+ style: { width: "60%" },
374
+ src: s.imgUrl
375
+ }, null, 8, ot)
376
+ ]))), 128))
377
+ ])
378
+ ])
379
+ ])
380
+ ]),
381
+ e("span", st, [
382
+ h(l, {
383
+ type: "info",
384
+ onClick: t[12] || (t[12] = (s) => o.editVisible = !1)
385
+ }, {
386
+ default: w(() => t[34] || (t[34] = [
387
+ g("取消")
388
+ ])),
389
+ _: 1
390
+ }),
391
+ h(l, {
392
+ type: "primary",
393
+ onClick: a.exportWordFile
394
+ }, {
395
+ default: w(() => t[35] || (t[35] = [
396
+ g("导出")
397
+ ])),
398
+ _: 1
399
+ }, 8, ["onClick"])
400
+ ])
401
+ ])
402
+ ]);
403
+ }
404
+ const rt = /* @__PURE__ */ k(j, [["render", nt], ["__scopeId", "data-v-9ce0f389"]]), bt = V(rt), it = {
405
+ name: "HelloWorld",
406
+ props: {
407
+ options: {
408
+ type: Object
409
+ }
410
+ // echarsId: {
411
+ // type: String
412
+ // },
413
+ // yList: {
414
+ // type: Array
415
+ // },
416
+ // xList: {
417
+ // type: Object
418
+ // }
419
+ },
420
+ data() {
421
+ return {
422
+ myChart: {},
423
+ mySeries: [
424
+ {
425
+ type: "line",
426
+ smooth: !0,
427
+ showSymbol: !1,
428
+ //是否显示点
429
+ clip: !0,
430
+ itemStyle: {
431
+ normal: {
432
+ lineStyle: {
433
+ color: "#07F3E0",
434
+ //改变折线颜色
435
+ width: 4
436
+ }
437
+ }
438
+ }
439
+ }
440
+ ],
441
+ myXAxis: {
442
+ type: "category",
443
+ name: "月",
444
+ axisLabel: {
445
+ textStyle: {
446
+ color: "#ffffff"
447
+ //坐标的字体颜色
448
+ }
449
+ }
450
+ },
451
+ myYAxis: {
452
+ name: "故障数",
453
+ type: "value",
454
+ axisLabel: {
455
+ textStyle: {
456
+ color: "#ffffff"
457
+ //坐标的字体颜色
458
+ }
459
+ }
460
+ }
461
+ };
462
+ },
463
+ mounted() {
464
+ console.log("this.options", this.options), setTimeout(() => {
465
+ this.init();
466
+ }, 300);
467
+ },
468
+ methods: {
469
+ // 往数组中添加data ,a是传过来的data,b是没有data的
470
+ mergeArray(r, t) {
471
+ for (let p = 0; p < t.length; p++)
472
+ t[p].data = r[p].data;
473
+ },
474
+ getChartImg(r) {
475
+ r(this.myChart.getDataURL());
476
+ },
477
+ // 往对象中添加data ,a是传过来的data,b是没有data的
478
+ mergeObject(r, t) {
479
+ t.data = r.data;
480
+ },
481
+ init() {
482
+ this.myChart = _(document.getElementById("echarts")), this.myChart.setOption(this.options), console.log("1");
483
+ }
484
+ }
485
+ }, lt = { class: "echarts-outer-box" };
486
+ function pt(r, t, p, n, o, a) {
487
+ return c(), y("div", lt, t[0] || (t[0] = [
488
+ e("div", {
489
+ id: "echarts",
490
+ class: "echarts"
491
+ }, null, -1)
492
+ ]));
493
+ }
494
+ const at = /* @__PURE__ */ k(it, [["render", pt], ["__scopeId", "data-v-75703953"]]), ut = {
495
+ name: "QsyxExportWordEcharts",
496
+ components: { Echart: at },
497
+ data() {
498
+ return {};
499
+ },
500
+ props: {
501
+ // 文档数据
502
+ wordData: {
503
+ type: Object,
504
+ default: () => ({})
505
+ },
506
+ // 导出文件名字
507
+ exportFileName: {
508
+ type: String,
509
+ default: "word"
510
+ },
511
+ // 模版文件名字(文件需放在public目录下,文件格式为docx)
512
+ templateFileName: {
513
+ type: String,
514
+ default: "aa"
515
+ },
516
+ // 图表option 数组,可多个图表
517
+ chartOptions: {
518
+ type: Array,
519
+ default: () => []
520
+ }
521
+ },
522
+ mounted() {
523
+ console.log("this.chartOptions", this.chartOptions);
524
+ },
525
+ methods: {
526
+ // 导出echarts图片,格式转换
527
+ base64DataURLToArrayBuffer(r) {
528
+ const t = /^data:image\/(png|jpg|svg|svg\+xml);base64,/;
529
+ if (!t.test(r))
530
+ return !1;
531
+ const p = r.replace(t, "");
532
+ let n;
533
+ typeof window < "u" ? n = window.atob(p) : n = new Buffer(p, "base64").toString("binary");
534
+ const o = n.length, a = new Uint8Array(o);
535
+ for (let l = 0; l < o; l++) {
536
+ const i = n.charCodeAt(l);
537
+ a[l] = i;
538
+ }
539
+ return a.buffer;
540
+ },
541
+ // 导出文档
542
+ exportWord() {
543
+ const r = this, t = [];
544
+ U.getBinaryContent(
545
+ `${r.templateFileName}`,
546
+ (p, n) => {
547
+ if (p)
548
+ throw p;
549
+ const o = new S(n), a = new C();
550
+ if (a.loadZip(o), r.chartOptions.length > 0) {
551
+ for (const u of r.$refs.chart)
552
+ u.getChartImg((d) => {
553
+ t.push({ image: d });
554
+ });
555
+ const i = {};
556
+ i.centered = !0, i.fileType = "docx", i.getImage = (u) => r.base64DataURLToArrayBuffer(u), i.getSize = () => [600, 300];
557
+ const s = new I(i);
558
+ a.attachModule(s);
559
+ }
560
+ a.setData({ ...r.wordData, chartlist: t });
561
+ try {
562
+ a.render();
563
+ } catch (i) {
564
+ const s = {
565
+ message: i.message,
566
+ name: i.name,
567
+ stack: i.stack,
568
+ properties: i.properties
569
+ };
570
+ throw console.log(JSON.stringify({ error: s })), i;
571
+ }
572
+ const l = a.getZip().generate({
573
+ type: "blob",
574
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
575
+ });
576
+ E.saveAs(l, `${r.exportFileName}.docx`);
577
+ }
578
+ );
579
+ }
580
+ }
581
+ }, dt = { class: "approvalNo-or-opinionNo-list" }, mt = { id: "pdfDom" };
582
+ function ft(r, t, p, n, o, a) {
583
+ const l = v("el-button"), i = v("Echart");
584
+ return c(), y("div", dt, [
585
+ h(l, {
586
+ type: "primary",
587
+ size: "small",
588
+ onClick: a.exportWord
589
+ }, {
590
+ default: w(() => t[0] || (t[0] = [
591
+ g("点击下载")
592
+ ])),
593
+ _: 1
594
+ }, 8, ["onClick"]),
595
+ e("div", mt, [
596
+ W(r.$slots, "table")
597
+ ]),
598
+ (c(!0), y(O, null, D(p.chartOptions, (s, u) => (c(), y("div", {
599
+ style: { width: "600px", height: "300px", margin: "0 auto" },
600
+ key: u
601
+ }, [
602
+ h(i, {
603
+ options: s,
604
+ ref_for: !0,
605
+ ref: "chart"
606
+ }, null, 8, ["options"])
607
+ ]))), 128))
608
+ ]);
609
+ }
610
+ const gt = /* @__PURE__ */ k(ut, [["render", ft]]), vt = V(gt);
611
+ export {
612
+ xt as Q,
613
+ bt as a,
614
+ vt as b
615
+ };
@@ -0,0 +1,38 @@
1
+ import { w as t } from "./vendor-P2JMGdqH.js";
2
+ import { openBlock as i, createElementBlock as r, createElementVNode as n } from "vue";
3
+ import { _ as c } from "./Form-GllMGZ5L.js";
4
+ import { w as m } from "./utils-DsWIZ76j.js";
5
+ const e = t.createWorker({
6
+ // logger: m => console.log(m),
7
+ }), g = {
8
+ name: "QsyxImgToText",
9
+ props: {
10
+ src: String
11
+ },
12
+ methods: {
13
+ recognize: async () => {
14
+ const o = document.getElementById("text-img");
15
+ await e.load(), await e.loadLanguage("chi_sim+eng"), await e.initialize("chi_sim+eng", t.OEM.LSTM_ONLY), await e.setParameters({
16
+ tessedit_pageseg_mode: t.PSM.SINGLE_BLOCK
17
+ });
18
+ const { data: { text: s } } = await e.recognize(o);
19
+ console.log(s);
20
+ }
21
+ },
22
+ mounted() {
23
+ this.recognize();
24
+ }
25
+ }, _ = { id: "app" }, d = ["src"];
26
+ function l(o, s, a, x, w, f) {
27
+ return i(), r("div", _, [
28
+ n("img", {
29
+ id: "text-img",
30
+ alt: "Vue logo",
31
+ src: a.src
32
+ }, null, 8, d)
33
+ ]);
34
+ }
35
+ const p = /* @__PURE__ */ c(g, [["render", l]]), E = m(p);
36
+ export {
37
+ E as Q
38
+ };
@@ -0,0 +1,39 @@
1
+ import { w as s, m as o } from "./utils-DsWIZ76j.js";
2
+ import { Q as a } from "./Button-OBW9FK8V.js";
3
+ import { a as t, b as r, c as m, d as x, e as Q, f as n, Q as c, g as e, h as i } from "./Form-GllMGZ5L.js";
4
+ import { Q as y } from "./Dialog-lE9CYwyT.js";
5
+ import { Q as f } from "./Table-BrzOxcFz.js";
6
+ import { Q as p } from "./wordSee-oMFtPj-S.js";
7
+ import { Q as l } from "./excelSee-DNbR9hdn.js";
8
+ import { Q as _ } from "./pdfSee-BJvVkNxS.js";
9
+ import { Q as E, a as I, b as d } from "./exportWord-zS-yn0r2.js";
10
+ import { Q as $ } from "./insertExcel-BYsef8on.js";
11
+ import { Q as g } from "./exportExcel-rMHaYDUw.js";
12
+ import { Q as h } from "./imToText-nJqaYhI_.js";
13
+ import { Q as u } from "./onlineExcel-DJeuDI97.js";
14
+ const R = s(t), j = s(r), q = s(m), z = s(x), A = s(Q), G = s(n), H = s(c), J = s(e), D = [a, y, f, i, p, _, l, E, $, I, d, g, h, u], K = o(D);
15
+ export {
16
+ a as QsyxButton,
17
+ R as QsyxCheckBox,
18
+ q as QsyxDateInterval,
19
+ j as QsyxDatePicker,
20
+ y as QsyxDialog,
21
+ p as QsyxDocx,
22
+ l as QsyxExcel,
23
+ g as QsyxExportExcel,
24
+ E as QsyxExportWord,
25
+ d as QsyxExportWordEcharts,
26
+ I as QsyxExportWordImage,
27
+ i as QsyxForm,
28
+ h as QsyxImgToText,
29
+ z as QsyxInput,
30
+ A as QsyxInputMoney,
31
+ $ as QsyxInsertExcel,
32
+ u as QsyxOnlineExcel,
33
+ _ as QsyxPdf,
34
+ G as QsyxRadio,
35
+ H as QsyxSelect,
36
+ f as QsyxTable,
37
+ J as QsyxTextarea,
38
+ K as default
39
+ };