iking-web-ui-pro 0.2.43 → 0.2.44
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/dist/IKPreviewFile/ik.index.es.js +352 -354
- package/dist/IKPreviewFile/ik.index.umd.js +44 -44
- package/dist/IKSearch/ik.index.es.js +111 -109
- package/dist/IKSearch/ik.index.umd.js +2 -2
- package/dist/IkApprovalProcess/ik.index.es.js +167 -158
- package/dist/IkApprovalProcess/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcess/style.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +359 -361
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +44 -44
- package/dist/IkCalendar/ik.index.es.js +355 -353
- package/dist/IkCalendar/ik.index.umd.js +1 -1
- package/dist/IkDescription/ik.index.es.js +299 -301
- package/dist/IkDescription/ik.index.umd.js +44 -44
- package/dist/IkDetailPreviewFiles/ik.index.es.js +307 -309
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +44 -44
- package/dist/IkOnlyOffice/ik.index.es.js +13 -19
- package/dist/IkOnlyOffice/ik.index.umd.js +1 -1
- package/dist/IkPageFull/ik.index.es.js +154 -152
- package/dist/IkPageFull/ik.index.umd.js +2 -2
- package/dist/IkPickerUser/ik.index.es.js +119 -117
- package/dist/IkPickerUser/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +343 -345
- package/dist/IkPreviewFileDialog/ik.index.umd.js +44 -44
- package/dist/IkTemplateOfficeConfig/ik.index.es.js +77 -78
- package/dist/IkTemplateOfficeConfig/ik.index.umd.js +1 -1
- package/dist/IkTinymce/ik.index.es.js +8803 -8741
- package/dist/IkTinymce/ik.index.umd.js +38 -38
- package/dist/IkTinymce/style.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +333 -335
- package/dist/IkUploadFile/ik.index.umd.js +46 -46
- package/dist/index.es.js +6738 -6729
- package/dist/index.umd.js +106 -106
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/IkOnlyOffice/style.css +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as q, openBlock as d, createElementBlock as w, ref as O, normalizeStyle as H, createVNode as E, unref as x, watch as U, resolveComponent as D, Fragment as T, renderList as F, createBlock as k, withCtx as m, createElementVNode as c, toDisplayString as R, createCommentVNode as C, normalizeClass as A, pushScopeId as N, popScopeId as j, useCssVars as W } from "vue";
|
|
2
|
+
const $ = (e, t) => {
|
|
3
3
|
if (e.install = (n) => {
|
|
4
4
|
for (const i of [e, ...Object.values(t ?? {})])
|
|
5
5
|
n.component(i.name, i);
|
|
@@ -18,15 +18,15 @@ function G(e, t, n, i) {
|
|
|
18
18
|
function f(h) {
|
|
19
19
|
try {
|
|
20
20
|
a(i.next(h));
|
|
21
|
-
} catch (
|
|
22
|
-
p(
|
|
21
|
+
} catch (v) {
|
|
22
|
+
p(v);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
function g(h) {
|
|
26
26
|
try {
|
|
27
27
|
a(i.throw(h));
|
|
28
|
-
} catch (
|
|
29
|
-
p(
|
|
28
|
+
} catch (v) {
|
|
29
|
+
p(v);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
function a(h) {
|
|
@@ -100,7 +100,7 @@ function z(e, t) {
|
|
|
100
100
|
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
var
|
|
103
|
+
var J = function(e, t) {
|
|
104
104
|
return G(void 0, void 0, void 0, function() {
|
|
105
105
|
return z(this, function(n) {
|
|
106
106
|
return [2, new Promise(function(i, s) {
|
|
@@ -114,12 +114,12 @@ var K = function(e, t) {
|
|
|
114
114
|
if (!g) {
|
|
115
115
|
if (clearInterval(p), window.DocsAPI)
|
|
116
116
|
return i(null);
|
|
117
|
-
var a =
|
|
117
|
+
var a = P(t, e, i, s);
|
|
118
118
|
o.remove(), document.body.appendChild(a);
|
|
119
119
|
}
|
|
120
120
|
}, 500);
|
|
121
121
|
else {
|
|
122
|
-
var f =
|
|
122
|
+
var f = P(t, e, i, s);
|
|
123
123
|
document.body.appendChild(f);
|
|
124
124
|
}
|
|
125
125
|
} catch (g) {
|
|
@@ -128,14 +128,14 @@ var K = function(e, t) {
|
|
|
128
128
|
})];
|
|
129
129
|
});
|
|
130
130
|
});
|
|
131
|
-
},
|
|
131
|
+
}, P = function(e, t, n, i) {
|
|
132
132
|
var s = document.createElement("script");
|
|
133
133
|
return s.id = e, s.type = "text/javascript", s.src = t, s.async = !0, s.onload = function() {
|
|
134
134
|
s.removeAttribute("loading"), n(null);
|
|
135
135
|
}, s.onerror = function(o) {
|
|
136
136
|
s.removeAttribute("loading"), i(o);
|
|
137
137
|
}, s.setAttribute("loading", ""), s;
|
|
138
|
-
}, V =
|
|
138
|
+
}, V = q({
|
|
139
139
|
name: "DocumentEditor",
|
|
140
140
|
props: {
|
|
141
141
|
id: {
|
|
@@ -190,7 +190,7 @@ var K = function(e, t) {
|
|
|
190
190
|
var e = this, t = this.documentServerUrl;
|
|
191
191
|
t.endsWith("/") || (t += "/");
|
|
192
192
|
var n = "".concat(t, "web-apps/apps/api/documents/api.js");
|
|
193
|
-
|
|
193
|
+
J(n, "onlyoffice-api-script").then(function() {
|
|
194
194
|
return e.onLoad();
|
|
195
195
|
}).catch(function() {
|
|
196
196
|
e.onError(-2);
|
|
@@ -304,13 +304,13 @@ var K = function(e, t) {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
|
-
const
|
|
307
|
+
const K = ["id"];
|
|
308
308
|
function X(e, t, n, i, s, o) {
|
|
309
|
-
return d(), w("div", { id: e.id }, null, 8,
|
|
309
|
+
return d(), w("div", { id: e.id }, null, 8, K);
|
|
310
310
|
}
|
|
311
311
|
V.render = X;
|
|
312
312
|
V.__file = "src/components/DocumentEditor.vue";
|
|
313
|
-
const Q = /* @__PURE__ */
|
|
313
|
+
const Q = /* @__PURE__ */ q({
|
|
314
314
|
__name: "IkOnlyOffice",
|
|
315
315
|
props: {
|
|
316
316
|
// 文件服务器的服务的地址
|
|
@@ -331,7 +331,7 @@ const Q = /* @__PURE__ */ I({
|
|
|
331
331
|
}
|
|
332
332
|
},
|
|
333
333
|
setup(e) {
|
|
334
|
-
const t = e, n =
|
|
334
|
+
const t = e, n = O({
|
|
335
335
|
width: "100%",
|
|
336
336
|
height: "100%",
|
|
337
337
|
...t.configOptions || {},
|
|
@@ -345,7 +345,7 @@ const Q = /* @__PURE__ */ I({
|
|
|
345
345
|
style: H({ height: t.officeHeight })
|
|
346
346
|
},
|
|
347
347
|
[
|
|
348
|
-
E(
|
|
348
|
+
E(x(V), {
|
|
349
349
|
id: `${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
350
350
|
ref: "editorRef",
|
|
351
351
|
"document-server-url": e.documentServerUrl,
|
|
@@ -357,25 +357,19 @@ const Q = /* @__PURE__ */ I({
|
|
|
357
357
|
/* STYLE */
|
|
358
358
|
));
|
|
359
359
|
}
|
|
360
|
-
})
|
|
361
|
-
const P = (e, t) => {
|
|
362
|
-
const n = e.__vccOpts || e;
|
|
363
|
-
for (const [i, s] of t)
|
|
364
|
-
n[i] = s;
|
|
365
|
-
return n;
|
|
366
|
-
}, Y = /* @__PURE__ */ P(Q, [["__scopeId", "data-v-98d51ef9"]]), Z = L(Y), ee = Z, M = (e) => (N("data-v-af8d674c"), e = e(), j(), e), te = { class: "template-data" }, ne = { class: "operate-btn" }, oe = ["onClick"], ie = ["onClick"], ae = { class: "m-12 point" }, se = { class: "flex" }, re = ["onClick"], le = /* @__PURE__ */ M(() => /* @__PURE__ */ c(
|
|
360
|
+
}), Y = $(Q), Z = Y, L = (e) => (N("data-v-af8d674c"), e = e(), j(), e), ee = { class: "template-data" }, te = { class: "operate-btn" }, ne = ["onClick"], oe = ["onClick"], ie = { class: "m-12 point" }, ae = { class: "flex" }, se = ["onClick"], re = /* @__PURE__ */ L(() => /* @__PURE__ */ c(
|
|
367
361
|
"i",
|
|
368
362
|
{ class: "icon-icon_particulars iconfont tips" },
|
|
369
363
|
null,
|
|
370
364
|
-1
|
|
371
365
|
/* HOISTED */
|
|
372
|
-
)),
|
|
366
|
+
)), le = /* @__PURE__ */ L(() => /* @__PURE__ */ c(
|
|
373
367
|
"p",
|
|
374
368
|
null,
|
|
375
369
|
"鼠标右键选择操作的数据类型",
|
|
376
370
|
-1
|
|
377
371
|
/* HOISTED */
|
|
378
|
-
)),
|
|
372
|
+
)), ce = { class: "flex data-block" }, de = { class: "operate-btn" }, ue = ["onClick"], pe = ["onClick"], he = { class: "operate-btn" }, fe = ["onClick"], ve = ["onClick"], _e = ["onClick"], me = ["onClick"], ge = /* @__PURE__ */ q({
|
|
379
373
|
__name: "templateOfficeData",
|
|
380
374
|
props: {
|
|
381
375
|
// 详情数据
|
|
@@ -413,12 +407,12 @@ const P = (e, t) => {
|
|
|
413
407
|
}, g = (l) => {
|
|
414
408
|
i("handleDataBlockDel", l);
|
|
415
409
|
}, a = (l, S) => {
|
|
416
|
-
for (const y of
|
|
410
|
+
for (const y of _.value)
|
|
417
411
|
y.children.forEach((u) => u.isChoose = !1);
|
|
418
412
|
S.isChoose = !0, i("handleChooseDataBlock", l, S);
|
|
419
413
|
}, h = (l, S) => {
|
|
420
414
|
i("handleDifferentTypeDataBlock", l, S);
|
|
421
|
-
},
|
|
415
|
+
}, v = (l) => {
|
|
422
416
|
let S = l.map((y) => ({
|
|
423
417
|
name: y[n.defaultProps.name],
|
|
424
418
|
children: y[n.defaultProps.children].map((u) => ({
|
|
@@ -426,24 +420,24 @@ const P = (e, t) => {
|
|
|
426
420
|
childId: u[n.defaultProps.childId]
|
|
427
421
|
}))
|
|
428
422
|
}));
|
|
429
|
-
|
|
430
|
-
},
|
|
423
|
+
_.value = S;
|
|
424
|
+
}, _ = O(n.data);
|
|
431
425
|
return U(
|
|
432
426
|
() => n.data,
|
|
433
427
|
(l) => {
|
|
434
|
-
|
|
428
|
+
v(l);
|
|
435
429
|
},
|
|
436
430
|
{ immediate: !0 }
|
|
437
431
|
), document.addEventListener("contextmenu", (l) => {
|
|
438
432
|
n.isShowTitleOperate && l.preventDefault();
|
|
439
433
|
}), (l, S) => {
|
|
440
434
|
const y = D("el-popover");
|
|
441
|
-
return d(), w("div",
|
|
435
|
+
return d(), w("div", ee, [
|
|
442
436
|
(d(!0), w(
|
|
443
|
-
|
|
437
|
+
T,
|
|
444
438
|
null,
|
|
445
|
-
F(
|
|
446
|
-
key:
|
|
439
|
+
F(_.value, (u, I) => (d(), w("div", {
|
|
440
|
+
key: I,
|
|
447
441
|
class: "mt-4"
|
|
448
442
|
}, [
|
|
449
443
|
e.isShowTitleOperate ? (d(), k(
|
|
@@ -459,24 +453,24 @@ const P = (e, t) => {
|
|
|
459
453
|
reference: m(() => [
|
|
460
454
|
c(
|
|
461
455
|
"span",
|
|
462
|
-
|
|
456
|
+
ie,
|
|
463
457
|
R(u.name),
|
|
464
458
|
1
|
|
465
459
|
/* TEXT */
|
|
466
460
|
)
|
|
467
461
|
]),
|
|
468
462
|
default: m(() => [
|
|
469
|
-
c("div",
|
|
463
|
+
c("div", te, [
|
|
470
464
|
c("p", {
|
|
471
465
|
class: "point",
|
|
472
466
|
style: { margin: "0" },
|
|
473
467
|
onClick: (r) => s(u)
|
|
474
|
-
}, "编辑", 8,
|
|
468
|
+
}, "编辑", 8, ne),
|
|
475
469
|
c("p", {
|
|
476
470
|
style: { color: "var(--ik-error)", margin: "0" },
|
|
477
471
|
class: "point",
|
|
478
472
|
onClick: (r) => o(u)
|
|
479
|
-
}, " 删除 ", 8,
|
|
473
|
+
}, " 删除 ", 8, oe)
|
|
480
474
|
])
|
|
481
475
|
]),
|
|
482
476
|
_: 2
|
|
@@ -485,15 +479,15 @@ const P = (e, t) => {
|
|
|
485
479
|
1024
|
|
486
480
|
/* DYNAMIC_SLOTS */
|
|
487
481
|
)) : (d(), w(
|
|
488
|
-
|
|
482
|
+
T,
|
|
489
483
|
{ key: 1 },
|
|
490
484
|
[
|
|
491
485
|
C(" 不能操作的标题 "),
|
|
492
|
-
c("div",
|
|
486
|
+
c("div", ae, [
|
|
493
487
|
c("p", {
|
|
494
488
|
class: "mb-2 point",
|
|
495
489
|
onClick: (r) => p(u)
|
|
496
|
-
}, R(u.name), 9,
|
|
490
|
+
}, R(u.name), 9, se),
|
|
497
491
|
u.resultType === "LIST" ? (d(), k(y, {
|
|
498
492
|
key: 0,
|
|
499
493
|
placement: "right",
|
|
@@ -501,10 +495,10 @@ const P = (e, t) => {
|
|
|
501
495
|
trigger: "hover"
|
|
502
496
|
}, {
|
|
503
497
|
reference: m(() => [
|
|
504
|
-
|
|
498
|
+
re
|
|
505
499
|
]),
|
|
506
500
|
default: m(() => [
|
|
507
|
-
|
|
501
|
+
le
|
|
508
502
|
]),
|
|
509
503
|
_: 1
|
|
510
504
|
/* STABLE */
|
|
@@ -515,9 +509,9 @@ const P = (e, t) => {
|
|
|
515
509
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
516
510
|
)),
|
|
517
511
|
C(" 标题下的内容 "),
|
|
518
|
-
c("div",
|
|
512
|
+
c("div", ce, [
|
|
519
513
|
(d(!0), w(
|
|
520
|
-
|
|
514
|
+
T,
|
|
521
515
|
null,
|
|
522
516
|
F(u.children, (r, B) => (d(), w("div", {
|
|
523
517
|
key: B,
|
|
@@ -546,17 +540,17 @@ const P = (e, t) => {
|
|
|
546
540
|
)
|
|
547
541
|
]),
|
|
548
542
|
default: m(() => [
|
|
549
|
-
c("div",
|
|
543
|
+
c("div", de, [
|
|
550
544
|
c("p", {
|
|
551
545
|
class: "point",
|
|
552
546
|
style: { margin: "0" },
|
|
553
547
|
onClick: (b) => h(r, "TABLE")
|
|
554
|
-
}, "表格", 8,
|
|
548
|
+
}, "表格", 8, ue),
|
|
555
549
|
c("p", {
|
|
556
550
|
class: "point",
|
|
557
551
|
style: { margin: "0" },
|
|
558
552
|
onClick: (b) => h(r, "LIST")
|
|
559
|
-
}, "列表", 8,
|
|
553
|
+
}, "列表", 8, pe)
|
|
560
554
|
])
|
|
561
555
|
]),
|
|
562
556
|
_: 2
|
|
@@ -579,15 +573,15 @@ const P = (e, t) => {
|
|
|
579
573
|
c("p", {
|
|
580
574
|
class: A([{ "choose-item": r.isChoose }, "item-block"]),
|
|
581
575
|
onClick: (b) => a(u, r)
|
|
582
|
-
}, R(r.childName), 11,
|
|
576
|
+
}, R(r.childName), 11, _e)
|
|
583
577
|
]),
|
|
584
578
|
default: m(() => [
|
|
585
|
-
c("div",
|
|
579
|
+
c("div", he, [
|
|
586
580
|
c("p", {
|
|
587
581
|
class: "point",
|
|
588
582
|
style: { margin: "0" },
|
|
589
583
|
onClick: (b) => f(r)
|
|
590
|
-
}, "编辑", 8,
|
|
584
|
+
}, "编辑", 8, fe),
|
|
591
585
|
c("p", {
|
|
592
586
|
style: { color: "var(--ik-error)", cursor: "pointer", margin: "0" },
|
|
593
587
|
onClick: (b) => g(r)
|
|
@@ -603,7 +597,7 @@ const P = (e, t) => {
|
|
|
603
597
|
key: 2,
|
|
604
598
|
class: A([{ "choose-item": r.isChoose }, "item-block"]),
|
|
605
599
|
onClick: (b) => a(u, r)
|
|
606
|
-
}, R(r.childName), 11,
|
|
600
|
+
}, R(r.childName), 11, me))
|
|
607
601
|
]))),
|
|
608
602
|
128
|
|
609
603
|
/* KEYED_FRAGMENT */
|
|
@@ -617,7 +611,12 @@ const P = (e, t) => {
|
|
|
617
611
|
};
|
|
618
612
|
}
|
|
619
613
|
});
|
|
620
|
-
const
|
|
614
|
+
const M = (e, t) => {
|
|
615
|
+
const n = e.__vccOpts || e;
|
|
616
|
+
for (const [i, s] of t)
|
|
617
|
+
n[i] = s;
|
|
618
|
+
return n;
|
|
619
|
+
}, ye = /* @__PURE__ */ M(ge, [["__scopeId", "data-v-af8d674c"]]), we = { class: "template-config" }, Se = { class: "template-config-data" }, ke = { class: "template-panel" }, Ce = /* @__PURE__ */ q({
|
|
621
620
|
__name: "IkTemplateOfficeConfig",
|
|
622
621
|
props: {
|
|
623
622
|
// 标题
|
|
@@ -690,35 +689,35 @@ const we = /* @__PURE__ */ P(ye, [["__scopeId", "data-v-af8d674c"]]), Se = { cla
|
|
|
690
689
|
},
|
|
691
690
|
emits: ["handleSearchDataBlock", "handleClickBlockData"],
|
|
692
691
|
setup(e, { expose: t, emit: n }) {
|
|
693
|
-
W((
|
|
692
|
+
W((v) => ({
|
|
694
693
|
f1632ab6: e.contentHeight
|
|
695
694
|
}));
|
|
696
|
-
const i = e, s = n, o =
|
|
697
|
-
f.value = "", o.value =
|
|
698
|
-
}, f =
|
|
695
|
+
const i = e, s = n, o = O(i.tabsData[0].id), p = (v) => {
|
|
696
|
+
f.value = "", o.value = v, v && s("handleSearchDataBlock", "", o.value);
|
|
697
|
+
}, f = O(""), g = () => {
|
|
699
698
|
s("handleSearchDataBlock", f.value, o.value);
|
|
700
|
-
}, a = (
|
|
701
|
-
s("handleClickBlockData",
|
|
699
|
+
}, a = (v, _) => {
|
|
700
|
+
s("handleClickBlockData", v, _);
|
|
702
701
|
};
|
|
703
|
-
return t({ handleSendMessage: (
|
|
704
|
-
window[0][0].postMessage(JSON.stringify({ type: "INSERT_TEXT", text:
|
|
705
|
-
} }), (
|
|
706
|
-
const l = D("el-tab-pane"), S = D("el-tabs"), y = D("el-input"), u = D("el-col"),
|
|
707
|
-
return d(), w("div",
|
|
708
|
-
E(
|
|
702
|
+
return t({ handleSendMessage: (v) => {
|
|
703
|
+
window[0][0].postMessage(JSON.stringify({ type: "INSERT_TEXT", text: v }), "*");
|
|
704
|
+
} }), (v, _) => {
|
|
705
|
+
const l = D("el-tab-pane"), S = D("el-tabs"), y = D("el-input"), u = D("el-col"), I = D("el-row");
|
|
706
|
+
return d(), w("div", we, [
|
|
707
|
+
E(I, { gutter: 10 }, {
|
|
709
708
|
default: m(() => [
|
|
710
709
|
E(u, { span: 6 }, {
|
|
711
710
|
default: m(() => [
|
|
712
|
-
c("div",
|
|
711
|
+
c("div", Se, [
|
|
713
712
|
i.isShowTabs ? (d(), k(S, {
|
|
714
713
|
key: 0,
|
|
715
714
|
modelValue: o.value,
|
|
716
|
-
"onUpdate:modelValue":
|
|
717
|
-
onTabClick:
|
|
715
|
+
"onUpdate:modelValue": _[0] || (_[0] = (r) => o.value = r),
|
|
716
|
+
onTabClick: _[1] || (_[1] = (r) => p(r.props.name))
|
|
718
717
|
}, {
|
|
719
718
|
default: m(() => [
|
|
720
719
|
(d(!0), w(
|
|
721
|
-
|
|
720
|
+
T,
|
|
722
721
|
null,
|
|
723
722
|
F(i.tabsData, (r, B) => (d(), k(l, {
|
|
724
723
|
key: B,
|
|
@@ -735,12 +734,12 @@ const we = /* @__PURE__ */ P(ye, [["__scopeId", "data-v-af8d674c"]]), Se = { cla
|
|
|
735
734
|
i.isShowSearchCondition ? (d(), k(y, {
|
|
736
735
|
key: 1,
|
|
737
736
|
modelValue: f.value,
|
|
738
|
-
"onUpdate:modelValue":
|
|
737
|
+
"onUpdate:modelValue": _[2] || (_[2] = (r) => f.value = r),
|
|
739
738
|
placeholder: "请输入关键字",
|
|
740
739
|
clearable: "",
|
|
741
|
-
onInput:
|
|
740
|
+
onInput: _[3] || (_[3] = (r) => g())
|
|
742
741
|
}, null, 8, ["modelValue"])) : C("v-if", !0),
|
|
743
|
-
E(
|
|
742
|
+
E(ye, {
|
|
744
743
|
data: i.tableData,
|
|
745
744
|
type: o.value,
|
|
746
745
|
defaultProps: i.defaultProps,
|
|
@@ -755,8 +754,8 @@ const we = /* @__PURE__ */ P(ye, [["__scopeId", "data-v-af8d674c"]]), Se = { cla
|
|
|
755
754
|
}),
|
|
756
755
|
E(u, { span: 18 }, {
|
|
757
756
|
default: m(() => [
|
|
758
|
-
c("div",
|
|
759
|
-
i.visible ? (d(), k(
|
|
757
|
+
c("div", ke, [
|
|
758
|
+
i.visible ? (d(), k(x(Z), {
|
|
760
759
|
key: 0,
|
|
761
760
|
"config-options": i.onlyOfficeConfig,
|
|
762
761
|
documentServerUrl: i.documentServerUrl,
|
|
@@ -775,8 +774,8 @@ const we = /* @__PURE__ */ P(ye, [["__scopeId", "data-v-af8d674c"]]), Se = { cla
|
|
|
775
774
|
};
|
|
776
775
|
}
|
|
777
776
|
});
|
|
778
|
-
const
|
|
777
|
+
const De = /* @__PURE__ */ M(Ce, [["__scopeId", "data-v-d31d0157"]]), Re = $(De);
|
|
779
778
|
export {
|
|
780
|
-
|
|
781
|
-
|
|
779
|
+
Re as IkTemplateOfficeConfig,
|
|
780
|
+
Re as default
|
|
782
781
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(k,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(k=typeof globalThis<"u"?globalThis:k||self,e(k.index={},k.vue))})(this,function(k,e){"use strict";const v=(t,n)=>{if(t.install=o=>{for(const i of[t,...Object.values(n??{})])o.component(i.name,i)},n)for(const[o,i]of Object.entries(n))t[o]=i;return t};function O(t,n,o,i){function r(a){return a instanceof o?a:new o(function(p){p(a)})}return new(o||(o=Promise))(function(a,p){function h(f){try{s(i.next(f))}catch(u){p(u)}}function _(f){try{s(i.throw(f))}catch(u){p(u)}}function s(f){f.done?a(f.value):r(f.value).then(h,_)}s((i=i.apply(t,n||[])).next())})}function V(t,n){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,p;return p={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function h(s){return function(f){return _([s,f])}}function _(s){if(i)throw new TypeError("Generator is already executing.");for(;p&&(p=0,s[0]&&(o=0)),o;)try{if(i=1,r&&(a=s[0]&2?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(s[0]===6&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(t,o)}catch(f){s=[6,f],r=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var T=function(t,n){return O(void 0,void 0,void 0,function(){return V(this,function(o){return[2,new Promise(function(i,r){try{if(window.DocsAPI)return i(null);var a=document.getElementById(n);if(a)var p=setInterval(function(){var _=a.getAttribute("loading");if(!_){if(clearInterval(p),window.DocsAPI)return i(null);var s=b(n,t,i,r);a.remove(),document.body.appendChild(s)}},500);else{var h=b(n,t,i,r);document.body.appendChild(h)}}catch(_){console.error(_)}})]})})},b=function(t,n,o,i){var r=document.createElement("script");return r.id=t,r.type="text/javascript",r.src=n,r.async=!0,r.onload=function(){r.removeAttribute("loading"),o(null)},r.onerror=function(a){r.removeAttribute("loading"),i(a)},r.setAttribute("loading",""),r},C=e.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var t=this,n=this.documentServerUrl;n.endsWith("/")||(n+="/");var o="".concat(n,"web-apps/apps/api/documents/api.js");T(o,"onlyoffice-api-script").then(function(){return t.onLoad()}).catch(function(){t.onError(-2)})},unmounted:function(){var t,n=this.id||"";!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0)},watch:{config:{handler:function(t,n){this.onChangeProps()},deep:!0},document_fileType:function(t,n){this.onChangeProps()},document_title:function(t,n){this.onChangeProps()},documentType:function(t,n){this.onChangeProps()},editorConfig_lang:function(t,n){this.onChangeProps()},height:function(t,n){this.onChangeProps()},type:function(t,n){this.onChangeProps()},width:function(t,n){this.onChangeProps()}},methods:{onLoad:function(){var t,n;try{var o=this.id||"";if(window.DocsAPI||this.onError(-3),!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances[o]){console.log("Skip loading. Instance already exists",o);return}!((n=window==null?void 0:window.DocEditor)===null||n===void 0)&&n.instances||(window.DocEditor={instances:{}});var i=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),r=window.DocsAPI.DocEditor(o,i);window.DocEditor.instances[o]=r}catch(a){console.error(a),this.onError(-1)}},onError:function(t){var n;switch(t){case-2:n="Error load DocsAPI from "+this.documentServerUrl;break;case-3:n="DocsAPI is not defined";break;default:n="Unknown error loading component",t=-1}typeof this.onLoadComponentError>"u"?console.error(n):this.onLoadComponentError(t,n)},onAppReady:function(){var t=this.id||"";this.events_onAppReady(window.DocEditor.instances[t])},onChangeProps:function(){var t,n=this.id||"";!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const I=["id"];function q(t,n,o,i,r,a){return e.openBlock(),e.createElementBlock("div",{id:t.id},null,8,I)}C.render=q,C.__file="src/components/DocumentEditor.vue";const N=e.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(t){const n=t,o=e.ref({width:"100%",height:"100%",...n.configOptions||{},...n.configOptions}),i=()=>{console.info("文档加载完成",n.configOptions)};return(r,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:n.officeHeight})},[e.createVNode(e.unref(C),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":t.documentServerUrl,config:o.value,events_onDocumentReady:i},null,8,["id","document-server-url","config"])],4))}}),se="",S=(t,n)=>{const o=t.__vccOpts||t;for(const[i,r]of n)o[i]=r;return o},x=v(S(N,[["__scopeId","data-v-98d51ef9"]])),B=t=>(e.pushScopeId("data-v-af8d674c"),t=t(),e.popScopeId(),t),F={class:"template-data"},A={class:"operate-btn"},P=["onClick"],$=["onClick"],L={class:"m-12 point"},M={class:"flex"},H=["onClick"],j=B(()=>e.createElementVNode("i",{class:"icon-icon_particulars iconfont tips"},null,-1)),U=B(()=>e.createElementVNode("p",null,"鼠标右键选择操作的数据类型",-1)),z={class:"flex data-block"},K={class:"operate-btn"},W=["onClick"],G=["onClick"],J={class:"operate-btn"},X=["onClick"],Q=["onClick"],Y=["onClick"],Z=["onClick"],ee=e.defineComponent({__name:"templateOfficeData",props:{data:{type:Array,default:()=>[]},isShowTitleOperate:{type:Boolean,default:!1},isShowContentOperate:{type:Boolean,default:!1},defaultProps:{type:Object,default:()=>{}}},emits:["handleTitleEdit","handleTitleDel","handleGetTitleData","handleDataBlockEdit","handleDataBlockDel","handleChooseDataBlock","handleDifferentTypeDataBlock"],setup(t,{emit:n}){const o=t,i=n,r=c=>{i("handleTitleEdit",c)},a=c=>{i("handleTitleDel",c)},p=c=>{i("handleGetTitleData",c)},h=c=>{i("handleDataBlockEdit",c)},_=c=>{i("handleDataBlockDel",c)},s=(c,y)=>{for(const g of m.value)g.children.forEach(d=>d.isChoose=!1);y.isChoose=!0,i("handleChooseDataBlock",c,y)},f=(c,y)=>{i("handleDifferentTypeDataBlock",c,y)},u=c=>{let y=c.map(g=>({name:g[o.defaultProps.name],children:g[o.defaultProps.children].map(d=>({childName:d[o.defaultProps.childName],childId:d[o.defaultProps.childId]}))}));m.value=y},m=e.ref(o.data);return e.watch(()=>o.data,c=>{u(c)},{immediate:!0}),document.addEventListener("contextmenu",c=>{o.isShowTitleOperate&&c.preventDefault()}),(c,y)=>{const g=e.resolveComponent("el-popover");return e.openBlock(),e.createElementBlock("div",F,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(d,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"mt-4"},[t.isShowTitleOperate?(e.openBlock(),e.createBlock(g,{key:0,"popper-class":"sort-popper",placement:"right",width:"60",trigger:"contextmenu"},{reference:e.withCtx(()=>[e.createElementVNode("span",L,e.toDisplayString(d.name),1)]),default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createElementVNode("p",{class:"point",style:{margin:"0"},onClick:l=>r(d)},"编辑",8,P),e.createElementVNode("p",{style:{color:"var(--ik-error)",margin:"0"},class:"point",onClick:l=>a(d)}," 删除 ",8,$)])]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 不能操作的标题 "),e.createElementVNode("div",M,[e.createElementVNode("p",{class:"mb-2 point",onClick:l=>p(d)},e.toDisplayString(d.name),9,H),d.resultType==="LIST"?(e.openBlock(),e.createBlock(g,{key:0,placement:"right",width:210,trigger:"hover"},{reference:e.withCtx(()=>[j]),default:e.withCtx(()=>[U]),_:1})):e.createCommentVNode("v-if",!0)])],2112)),e.createCommentVNode(" 标题下的内容 "),e.createElementVNode("div",z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.children,(l,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,style:{"flex-grow":"1"}},[o.isShowContentOperate&&d.resultType==="LIST"?(e.openBlock(),e.createBlock(g,{key:0,"popper-class":"operate-popper",placement:"bottom-end",width:"60",trigger:"contextmenu"},{reference:e.withCtx(()=>[e.createElementVNode("p",{class:e.normalizeClass([{"choose-item":l.isChoose},"item-block"]),title:"鼠标右键选择操作的数据类型"},e.toDisplayString(l.chileName),3)]),default:e.withCtx(()=>[e.createElementVNode("div",K,[e.createElementVNode("p",{class:"point",style:{margin:"0"},onClick:w=>f(l,"TABLE")},"表格",8,W),e.createElementVNode("p",{class:"point",style:{margin:"0"},onClick:w=>f(l,"LIST")},"列表",8,G)])]),_:2},1024)):e.createCommentVNode("v-if",!0),o.isShowContentOperate?(e.openBlock(),e.createBlock(g,{key:1,"popper-class":"operate-popper",placement:"bottom-end",width:"60",trigger:"contextmenu"},{reference:e.withCtx(()=>[e.createElementVNode("p",{class:e.normalizeClass([{"choose-item":l.isChoose},"item-block"]),onClick:w=>s(d,l)},e.toDisplayString(l.childName),11,Y)]),default:e.withCtx(()=>[e.createElementVNode("div",J,[e.createElementVNode("p",{class:"point",style:{margin:"0"},onClick:w=>h(l)},"编辑",8,X),e.createElementVNode("p",{style:{color:"var(--ik-error)",cursor:"pointer",margin:"0"},onClick:w=>_(l)}," 删除 ",8,Q)])]),_:2},1024)):(e.openBlock(),e.createElementBlock("p",{key:2,class:e.normalizeClass([{"choose-item":l.isChoose},"item-block"]),onClick:w=>s(d,l)},e.toDisplayString(l.childName),11,Z))]))),128))])]))),128))])}}}),ce="",te=S(ee,[["__scopeId","data-v-af8d674c"]]),ne={class:"template-config"},oe={class:"template-config-data"},ie={class:"template-panel"},ae=e.defineComponent({__name:"IkTemplateOfficeConfig",props:{title:{type:String,default:"模板配置"},visible:{type:Boolean,default:!1},onlyOfficeConfig:{type:Object,default:()=>{}},isShowTabs:{type:Boolean,default:!0},isShowSearchCondition:{type:Boolean,default:!0},tabsData:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},documentServerUrl:{type:String,default:""},jwtToken:{type:String,default:""},contentHeight:{type:String,default:"650px"},defaultProps:{type:Object,default:()=>{}},isShowTitleOperate:{type:Boolean,default:!1},isShowContentOperate:{type:Boolean,default:!1}},emits:["handleSearchDataBlock","handleClickBlockData"],setup(t,{expose:n,emit:o}){e.useCssVars(u=>({f1632ab6:t.contentHeight}));const i=t,r=o,a=e.ref(i.tabsData[0].id),p=u=>{h.value="",a.value=u,u&&r("handleSearchDataBlock","",a.value)},h=e.ref(""),_=()=>{r("handleSearchDataBlock",h.value,a.value)},s=(u,m)=>{r("handleClickBlockData",u,m)};return n({handleSendMessage:u=>{window[0][0].postMessage(JSON.stringify({type:"INSERT_TEXT",text:u}),"*")}}),(u,m)=>{const c=e.resolveComponent("el-tab-pane"),y=e.resolveComponent("el-tabs"),g=e.resolveComponent("el-input"),d=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(E,{gutter:10},{default:e.withCtx(()=>[e.createVNode(d,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",oe,[i.isShowTabs?(e.openBlock(),e.createBlock(y,{key:0,modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=l=>a.value=l),onTabClick:m[1]||(m[1]=l=>p(l.props.name))},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.tabsData,(l,D)=>(e.openBlock(),e.createBlock(c,{key:D,label:l.label,name:l.id},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("v-if",!0),i.isShowSearchCondition?(e.openBlock(),e.createBlock(g,{key:1,modelValue:h.value,"onUpdate:modelValue":m[2]||(m[2]=l=>h.value=l),placeholder:"请输入关键字",clearable:"",onInput:m[3]||(m[3]=l=>_())},null,8,["modelValue"])):e.createCommentVNode("v-if",!0),e.createVNode(te,{data:i.tableData,type:a.value,defaultProps:i.defaultProps,onHandleChooseDataBlock:s,isShowTitleOperate:i.isShowTitleOperate,isShowContentOperate:i.isShowContentOperate},null,8,["data","type","defaultProps","isShowTitleOperate","isShowContentOperate"])])]),_:1}),e.createVNode(d,{span:18},{default:e.withCtx(()=>[e.createElementVNode("div",ie,[i.visible?(e.openBlock(),e.createBlock(e.unref(x),{key:0,"config-options":i.onlyOfficeConfig,documentServerUrl:i.documentServerUrl,token:i.jwtToken},null,8,["config-options","documentServerUrl","token"])):e.createCommentVNode("v-if",!0)])]),_:1})]),_:1})])}}}),de="",R=v(S(ae,[["__scopeId","data-v-d31d0157"]]));k.IkTemplateOfficeConfig=R,k.default=R,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(w,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(w=typeof globalThis<"u"?globalThis:w||self,e(w.index={},w.vue))})(this,function(w,e){"use strict";const D=(t,n)=>{if(t.install=o=>{for(const i of[t,...Object.values(n??{})])o.component(i.name,i)},n)for(const[o,i]of Object.entries(n))t[o]=i;return t};function V(t,n,o,i){function r(a){return a instanceof o?a:new o(function(p){p(a)})}return new(o||(o=Promise))(function(a,p){function h(f){try{s(i.next(f))}catch(u){p(u)}}function _(f){try{s(i.throw(f))}catch(u){p(u)}}function s(f){f.done?a(f.value):r(f.value).then(h,_)}s((i=i.apply(t,n||[])).next())})}function T(t,n){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,p;return p={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function h(s){return function(f){return _([s,f])}}function _(s){if(i)throw new TypeError("Generator is already executing.");for(;p&&(p=0,s[0]&&(o=0)),o;)try{if(i=1,r&&(a=s[0]&2?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(s[0]===6&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(t,o)}catch(f){s=[6,f],r=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var O=function(t,n){return V(void 0,void 0,void 0,function(){return T(this,function(o){return[2,new Promise(function(i,r){try{if(window.DocsAPI)return i(null);var a=document.getElementById(n);if(a)var p=setInterval(function(){var _=a.getAttribute("loading");if(!_){if(clearInterval(p),window.DocsAPI)return i(null);var s=v(n,t,i,r);a.remove(),document.body.appendChild(s)}},500);else{var h=v(n,t,i,r);document.body.appendChild(h)}}catch(_){console.error(_)}})]})})},v=function(t,n,o,i){var r=document.createElement("script");return r.id=t,r.type="text/javascript",r.src=n,r.async=!0,r.onload=function(){r.removeAttribute("loading"),o(null)},r.onerror=function(a){r.removeAttribute("loading"),i(a)},r.setAttribute("loading",""),r},C=e.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var t=this,n=this.documentServerUrl;n.endsWith("/")||(n+="/");var o="".concat(n,"web-apps/apps/api/documents/api.js");O(o,"onlyoffice-api-script").then(function(){return t.onLoad()}).catch(function(){t.onError(-2)})},unmounted:function(){var t,n=this.id||"";!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0)},watch:{config:{handler:function(t,n){this.onChangeProps()},deep:!0},document_fileType:function(t,n){this.onChangeProps()},document_title:function(t,n){this.onChangeProps()},documentType:function(t,n){this.onChangeProps()},editorConfig_lang:function(t,n){this.onChangeProps()},height:function(t,n){this.onChangeProps()},type:function(t,n){this.onChangeProps()},width:function(t,n){this.onChangeProps()}},methods:{onLoad:function(){var t,n;try{var o=this.id||"";if(window.DocsAPI||this.onError(-3),!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances[o]){console.log("Skip loading. Instance already exists",o);return}!((n=window==null?void 0:window.DocEditor)===null||n===void 0)&&n.instances||(window.DocEditor={instances:{}});var i=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),r=window.DocsAPI.DocEditor(o,i);window.DocEditor.instances[o]=r}catch(a){console.error(a),this.onError(-1)}},onError:function(t){var n;switch(t){case-2:n="Error load DocsAPI from "+this.documentServerUrl;break;case-3:n="DocsAPI is not defined";break;default:n="Unknown error loading component",t=-1}typeof this.onLoadComponentError>"u"?console.error(n):this.onLoadComponentError(t,n)},onAppReady:function(){var t=this.id||"";this.events_onAppReady(window.DocEditor.instances[t])},onChangeProps:function(){var t,n=this.id||"";!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const q=["id"];function I(t,n,o,i,r,a){return e.openBlock(),e.createElementBlock("div",{id:t.id},null,8,q)}C.render=I,C.__file="src/components/DocumentEditor.vue";const N=D(e.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(t){const n=t,o=e.ref({width:"100%",height:"100%",...n.configOptions||{},...n.configOptions}),i=()=>{console.info("文档加载完成",n.configOptions)};return(r,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:n.officeHeight})},[e.createVNode(e.unref(C),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":t.documentServerUrl,config:o.value,events_onDocumentReady:i},null,8,["id","document-server-url","config"])],4))}})),b=t=>(e.pushScopeId("data-v-af8d674c"),t=t(),e.popScopeId(),t),x={class:"template-data"},F={class:"operate-btn"},A=["onClick"],P=["onClick"],$={class:"m-12 point"},L={class:"flex"},M=["onClick"],H=b(()=>e.createElementVNode("i",{class:"icon-icon_particulars iconfont tips"},null,-1)),j=b(()=>e.createElementVNode("p",null,"鼠标右键选择操作的数据类型",-1)),U={class:"flex data-block"},z={class:"operate-btn"},W=["onClick"],G=["onClick"],K={class:"operate-btn"},J=["onClick"],X=["onClick"],Q=["onClick"],Y=["onClick"],Z=e.defineComponent({__name:"templateOfficeData",props:{data:{type:Array,default:()=>[]},isShowTitleOperate:{type:Boolean,default:!1},isShowContentOperate:{type:Boolean,default:!1},defaultProps:{type:Object,default:()=>{}}},emits:["handleTitleEdit","handleTitleDel","handleGetTitleData","handleDataBlockEdit","handleDataBlockDel","handleChooseDataBlock","handleDifferentTypeDataBlock"],setup(t,{emit:n}){const o=t,i=n,r=c=>{i("handleTitleEdit",c)},a=c=>{i("handleTitleDel",c)},p=c=>{i("handleGetTitleData",c)},h=c=>{i("handleDataBlockEdit",c)},_=c=>{i("handleDataBlockDel",c)},s=(c,y)=>{for(const g of m.value)g.children.forEach(d=>d.isChoose=!1);y.isChoose=!0,i("handleChooseDataBlock",c,y)},f=(c,y)=>{i("handleDifferentTypeDataBlock",c,y)},u=c=>{let y=c.map(g=>({name:g[o.defaultProps.name],children:g[o.defaultProps.children].map(d=>({childName:d[o.defaultProps.childName],childId:d[o.defaultProps.childId]}))}));m.value=y},m=e.ref(o.data);return e.watch(()=>o.data,c=>{u(c)},{immediate:!0}),document.addEventListener("contextmenu",c=>{o.isShowTitleOperate&&c.preventDefault()}),(c,y)=>{const g=e.resolveComponent("el-popover");return e.openBlock(),e.createElementBlock("div",x,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(d,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"mt-4"},[t.isShowTitleOperate?(e.openBlock(),e.createBlock(g,{key:0,"popper-class":"sort-popper",placement:"right",width:"60",trigger:"contextmenu"},{reference:e.withCtx(()=>[e.createElementVNode("span",$,e.toDisplayString(d.name),1)]),default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("p",{class:"point",style:{margin:"0"},onClick:l=>r(d)},"编辑",8,A),e.createElementVNode("p",{style:{color:"var(--ik-error)",margin:"0"},class:"point",onClick:l=>a(d)}," 删除 ",8,P)])]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" 不能操作的标题 "),e.createElementVNode("div",L,[e.createElementVNode("p",{class:"mb-2 point",onClick:l=>p(d)},e.toDisplayString(d.name),9,M),d.resultType==="LIST"?(e.openBlock(),e.createBlock(g,{key:0,placement:"right",width:210,trigger:"hover"},{reference:e.withCtx(()=>[H]),default:e.withCtx(()=>[j]),_:1})):e.createCommentVNode("v-if",!0)])],2112)),e.createCommentVNode(" 标题下的内容 "),e.createElementVNode("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.children,(l,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,style:{"flex-grow":"1"}},[o.isShowContentOperate&&d.resultType==="LIST"?(e.openBlock(),e.createBlock(g,{key:0,"popper-class":"operate-popper",placement:"bottom-end",width:"60",trigger:"contextmenu"},{reference:e.withCtx(()=>[e.createElementVNode("p",{class:e.normalizeClass([{"choose-item":l.isChoose},"item-block"]),title:"鼠标右键选择操作的数据类型"},e.toDisplayString(l.chileName),3)]),default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createElementVNode("p",{class:"point",style:{margin:"0"},onClick:k=>f(l,"TABLE")},"表格",8,W),e.createElementVNode("p",{class:"point",style:{margin:"0"},onClick:k=>f(l,"LIST")},"列表",8,G)])]),_:2},1024)):e.createCommentVNode("v-if",!0),o.isShowContentOperate?(e.openBlock(),e.createBlock(g,{key:1,"popper-class":"operate-popper",placement:"bottom-end",width:"60",trigger:"contextmenu"},{reference:e.withCtx(()=>[e.createElementVNode("p",{class:e.normalizeClass([{"choose-item":l.isChoose},"item-block"]),onClick:k=>s(d,l)},e.toDisplayString(l.childName),11,Q)]),default:e.withCtx(()=>[e.createElementVNode("div",K,[e.createElementVNode("p",{class:"point",style:{margin:"0"},onClick:k=>h(l)},"编辑",8,J),e.createElementVNode("p",{style:{color:"var(--ik-error)",cursor:"pointer",margin:"0"},onClick:k=>_(l)}," 删除 ",8,X)])]),_:2},1024)):(e.openBlock(),e.createElementBlock("p",{key:2,class:e.normalizeClass([{"choose-item":l.isChoose},"item-block"]),onClick:k=>s(d,l)},e.toDisplayString(l.childName),11,Y))]))),128))])]))),128))])}}}),re="",B=(t,n)=>{const o=t.__vccOpts||t;for(const[i,r]of n)o[i]=r;return o},ee=B(Z,[["__scopeId","data-v-af8d674c"]]),te={class:"template-config"},ne={class:"template-config-data"},oe={class:"template-panel"},ie=e.defineComponent({__name:"IkTemplateOfficeConfig",props:{title:{type:String,default:"模板配置"},visible:{type:Boolean,default:!1},onlyOfficeConfig:{type:Object,default:()=>{}},isShowTabs:{type:Boolean,default:!0},isShowSearchCondition:{type:Boolean,default:!0},tabsData:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},documentServerUrl:{type:String,default:""},jwtToken:{type:String,default:""},contentHeight:{type:String,default:"650px"},defaultProps:{type:Object,default:()=>{}},isShowTitleOperate:{type:Boolean,default:!1},isShowContentOperate:{type:Boolean,default:!1}},emits:["handleSearchDataBlock","handleClickBlockData"],setup(t,{expose:n,emit:o}){e.useCssVars(u=>({f1632ab6:t.contentHeight}));const i=t,r=o,a=e.ref(i.tabsData[0].id),p=u=>{h.value="",a.value=u,u&&r("handleSearchDataBlock","",a.value)},h=e.ref(""),_=()=>{r("handleSearchDataBlock",h.value,a.value)},s=(u,m)=>{r("handleClickBlockData",u,m)};return n({handleSendMessage:u=>{window[0][0].postMessage(JSON.stringify({type:"INSERT_TEXT",text:u}),"*")}}),(u,m)=>{const c=e.resolveComponent("el-tab-pane"),y=e.resolveComponent("el-tabs"),g=e.resolveComponent("el-input"),d=e.resolveComponent("el-col"),S=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",te,[e.createVNode(S,{gutter:10},{default:e.withCtx(()=>[e.createVNode(d,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ne,[i.isShowTabs?(e.openBlock(),e.createBlock(y,{key:0,modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=l=>a.value=l),onTabClick:m[1]||(m[1]=l=>p(l.props.name))},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.tabsData,(l,E)=>(e.openBlock(),e.createBlock(c,{key:E,label:l.label,name:l.id},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("v-if",!0),i.isShowSearchCondition?(e.openBlock(),e.createBlock(g,{key:1,modelValue:h.value,"onUpdate:modelValue":m[2]||(m[2]=l=>h.value=l),placeholder:"请输入关键字",clearable:"",onInput:m[3]||(m[3]=l=>_())},null,8,["modelValue"])):e.createCommentVNode("v-if",!0),e.createVNode(ee,{data:i.tableData,type:a.value,defaultProps:i.defaultProps,onHandleChooseDataBlock:s,isShowTitleOperate:i.isShowTitleOperate,isShowContentOperate:i.isShowContentOperate},null,8,["data","type","defaultProps","isShowTitleOperate","isShowContentOperate"])])]),_:1}),e.createVNode(d,{span:18},{default:e.withCtx(()=>[e.createElementVNode("div",oe,[i.visible?(e.openBlock(),e.createBlock(e.unref(N),{key:0,"config-options":i.onlyOfficeConfig,documentServerUrl:i.documentServerUrl,token:i.jwtToken},null,8,["config-options","documentServerUrl","token"])):e.createCommentVNode("v-if",!0)])]),_:1})]),_:1})])}}}),le="",R=D(B(ie,[["__scopeId","data-v-d31d0157"]]));w.IkTemplateOfficeConfig=R,w.default=R,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|