@opentiny/tiny-engine-plugin-page 2.6.0-rc.1 → 2.6.0-rc.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.
- package/dist/index.js +692 -677
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { ref as
|
|
3
|
-
import { getMetaApi as
|
|
4
|
-
import { BlockHistoryList as
|
|
5
|
-
import { isEqual as
|
|
6
|
-
import { Checkbox as
|
|
2
|
+
import { ref as X, watchEffect as Ie, resolveComponent as h, createBlock as U, openBlock as S, computed as $, createElementBlock as q, createVNode as P, createElementVNode as V, withCtx as v, onActivated as Pt, onDeactivated as mt, reactive as oe, createCommentVNode as J, resolveDynamicComponent as Ze, createTextVNode as be, defineComponent as $e, Fragment as de, renderList as we, watch as qe, normalizeClass as Ne, withDirectives as yt, renderSlot as _t, unref as je, toDisplayString as re, vShow as ht, onMounted as Dt, onUnmounted as Je, provide as Ke } from "vue";
|
|
3
|
+
import { getMetaApi as A, META_SERVICE as B, usePage as ee, useBlock as St, useModal as ce, useNotify as H, useCanvas as se, getMergeRegistry as et, useLayout as le, useMessage as ve, getOptions as Ee, useHelp as vt, useBreadcrumb as Ct, HOOK_NAME as bt } from "@opentiny/tiny-engine-meta-register";
|
|
4
|
+
import { BlockHistoryList as wt, MetaCodeEditor as Nt, ButtonGroup as tt, SvgButton as Te, PluginSetting as at, LifeCycles as It, PluginPanel as Tt } from "@opentiny/tiny-engine-common";
|
|
5
|
+
import { isEqual as ue, extend as pe } from "@opentiny/vue-renderless/common/object";
|
|
6
|
+
import { Checkbox as kt, CollapseItem as Oe, Collapse as xe, Button as nt, Input as ot, Popover as Ft, Search as Et, Radio as Ot, Select as xt, FormItem as Gt, Form as Vt } from "@opentiny/vue";
|
|
7
7
|
import { constants as Ge } from "@opentiny/tiny-engine-utils";
|
|
8
8
|
import { isVsCodeEnv as Rt } from "@opentiny/tiny-engine-common/js/environments";
|
|
9
|
-
import { handlePageUpdate as
|
|
9
|
+
import { handlePageUpdate as st } from "@opentiny/tiny-engine-common/js/http";
|
|
10
10
|
import { generatePage as At } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
|
|
11
11
|
import { previewPage as Bt } from "@opentiny/tiny-engine-common/js/preview";
|
|
12
12
|
import Mt from "@opentiny/vue-renderless/common/deps/throttle";
|
|
13
|
-
import { IconSearch as
|
|
14
|
-
import { getCanvasStatus as
|
|
15
|
-
import { REGEXP_ROUTE as
|
|
16
|
-
const Kt = (t) => B
|
|
13
|
+
import { IconSearch as Lt, IconFolderClosed as Ht, IconFolderOpened as Ut, iconFile as qt } from "@opentiny/vue-icon";
|
|
14
|
+
import { getCanvasStatus as rt } from "@opentiny/tiny-engine-common/js/canvas";
|
|
15
|
+
import { REGEXP_ROUTE as We, REGEXP_FOLDER_NAME as jt, REGEXP_PAGE_NAME as Jt } from "@opentiny/tiny-engine-common/js/verification";
|
|
16
|
+
const Kt = (t) => A(B.Http).get(`/app-center/api/pages/list/${t}`), Ve = (t) => A(B.Http).get(`/app-center/api/pages/detail/${t}`), Wt = (t) => A(B.Http).get(`/app-center/api/pages/delete/${t}`), Xt = (t) => A(B.Http).post("/app-center/api/pages/create", t), lt = (t, a) => A(B.Http).post(`/app-center/api/pages/update/${t}`, a), zt = (t) => A(B.Http).post("/app-center/api/pages/copy", t), ct = (t) => A(B.Http).get(`/app-center/api/pages/histories?page=${t}`), Qt = (t) => A(B.Http).post("/app-center/api/pageHistory/restore", t), Yt = (t) => A(B.Http).get(`/app-center/api/pages/histories/${t}`), Zt = (t, a) => A(B.Http).post(`/app-center/api/pages/update/${t}`, a), Pe = {
|
|
17
17
|
fetchPageList: Kt,
|
|
18
18
|
fetchPageDetail: Ve,
|
|
19
19
|
requestDeletePage: Wt,
|
|
20
20
|
requestCreatePage: Xt,
|
|
21
21
|
requestCopyPage: zt,
|
|
22
|
-
fetchPageHistory:
|
|
22
|
+
fetchPageHistory: ct,
|
|
23
23
|
fetchHistoryDetail: Yt,
|
|
24
|
-
handleRouteHomeUpdate:
|
|
24
|
+
handleRouteHomeUpdate: lt,
|
|
25
25
|
requestRestorePageHistory: Qt,
|
|
26
26
|
requestUpdatePage: Zt
|
|
27
27
|
}, $t = {
|
|
28
28
|
components: {
|
|
29
|
-
BlockHistoryList:
|
|
29
|
+
BlockHistoryList: wt
|
|
30
30
|
},
|
|
31
31
|
props: {
|
|
32
32
|
curPageData: {
|
|
@@ -36,88 +36,88 @@ const Kt = (t) => B(M.Http).get(`/app-center/api/pages/list/${t}`), Ve = (t) =>
|
|
|
36
36
|
},
|
|
37
37
|
emits: ["restorePage"],
|
|
38
38
|
setup(t, { emit: a }) {
|
|
39
|
-
const { pageSettingState: n, getFamily: e } =
|
|
40
|
-
const { id: b, version:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}), r.value =
|
|
39
|
+
const { pageSettingState: n, getFamily: e } = ee(), { getDateFromNow: s } = St(), { confirm: o } = ce(), r = X([]), c = (_) => {
|
|
40
|
+
const { id: b, version: f } = A(B.GlobalService).getBaseInfo(), I = f ? `&app=${b}&version=${f}` : "";
|
|
41
|
+
_ ? ct(_ + I).then((E) => {
|
|
42
|
+
E && (E.forEach((T) => {
|
|
43
|
+
T.backupTitle = T.message, T.backupTime = s(new Date(T.time));
|
|
44
|
+
}), r.value = E.reverse());
|
|
45
45
|
}) : r.value = [];
|
|
46
46
|
};
|
|
47
|
-
return
|
|
47
|
+
return Ie(() => {
|
|
48
48
|
var b;
|
|
49
|
-
const
|
|
50
|
-
c(
|
|
49
|
+
const _ = ((b = n.currentPageData) == null ? void 0 : b.id) || "";
|
|
50
|
+
c(_);
|
|
51
51
|
}), {
|
|
52
52
|
list: r,
|
|
53
|
-
previewHistory: async (
|
|
54
|
-
if (
|
|
53
|
+
previewHistory: async (_) => {
|
|
54
|
+
if (_) {
|
|
55
55
|
const b = {
|
|
56
|
-
...
|
|
57
|
-
id: Number(
|
|
58
|
-
history:
|
|
56
|
+
..._,
|
|
57
|
+
id: Number(_.page),
|
|
58
|
+
history: _.id
|
|
59
59
|
};
|
|
60
60
|
b.ancestors = await e(b), Bt(b, !0);
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
restoreHistory: (
|
|
64
|
-
|
|
63
|
+
restoreHistory: (_) => {
|
|
64
|
+
o({
|
|
65
65
|
title: "提示",
|
|
66
66
|
message: "您即将还原历史页面,是否继续还原?",
|
|
67
67
|
exec: () => {
|
|
68
|
-
a("restorePage",
|
|
68
|
+
a("restorePage", _);
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, te = (t, a) => {
|
|
75
75
|
const n = t.__vccOpts || t;
|
|
76
|
-
for (const [e,
|
|
77
|
-
n[e] =
|
|
76
|
+
for (const [e, s] of a)
|
|
77
|
+
n[e] = s;
|
|
78
78
|
return n;
|
|
79
79
|
};
|
|
80
|
-
function ea(t, a, n, e,
|
|
81
|
-
const r =
|
|
80
|
+
function ea(t, a, n, e, s, o) {
|
|
81
|
+
const r = h("block-history-list");
|
|
82
82
|
return S(), U(r, {
|
|
83
83
|
history: e.list,
|
|
84
84
|
onPreview: e.previewHistory,
|
|
85
85
|
onRestore: e.restoreHistory
|
|
86
86
|
}, null, 8, ["history", "onPreview", "onRestore"]);
|
|
87
87
|
}
|
|
88
|
-
const ta = /* @__PURE__ */
|
|
88
|
+
const ta = /* @__PURE__ */ te($t, [["render", ea]]), aa = {
|
|
89
89
|
components: {
|
|
90
|
-
MetaCodeEditor:
|
|
91
|
-
TinyCheckbox:
|
|
90
|
+
MetaCodeEditor: Nt,
|
|
91
|
+
TinyCheckbox: kt
|
|
92
92
|
},
|
|
93
93
|
setup() {
|
|
94
|
-
const t =
|
|
95
|
-
return
|
|
96
|
-
var c,
|
|
97
|
-
t.value = ((c = n.currentPageData.page_content) == null ? void 0 : c.inputs) || "", a.value = ((
|
|
94
|
+
const t = X(""), a = X(""), { pageSettingState: n } = ee(), e = $(() => n.currentPageData);
|
|
95
|
+
return Ie(() => {
|
|
96
|
+
var c, u;
|
|
97
|
+
t.value = ((c = n.currentPageData.page_content) == null ? void 0 : c.inputs) || "", a.value = ((u = n.currentPageData.page_content) == null ? void 0 : u.outputs) || "";
|
|
98
98
|
}), {
|
|
99
99
|
inputValue: t,
|
|
100
100
|
outputValue: a,
|
|
101
101
|
saveInputValue: (c) => {
|
|
102
102
|
try {
|
|
103
|
-
const
|
|
104
|
-
t.value = c.content, e.value.page_content.inputs =
|
|
105
|
-
} catch (
|
|
106
|
-
|
|
103
|
+
const u = JSON.parse(c.content);
|
|
104
|
+
t.value = c.content, e.value.page_content.inputs = u;
|
|
105
|
+
} catch (u) {
|
|
106
|
+
H({
|
|
107
107
|
title: "输入配置保存失败(必须符合JSON格式)",
|
|
108
|
-
message: `${(
|
|
108
|
+
message: `${(u == null ? void 0 : u.message) || u}`,
|
|
109
109
|
type: "error"
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
saveOutputValue: (c) => {
|
|
114
114
|
try {
|
|
115
|
-
const
|
|
116
|
-
a.value = c.content, e.value.page_content.outputs =
|
|
117
|
-
} catch (
|
|
118
|
-
|
|
115
|
+
const u = JSON.parse(c.content);
|
|
116
|
+
a.value = c.content, e.value.page_content.outputs = u;
|
|
117
|
+
} catch (u) {
|
|
118
|
+
H({
|
|
119
119
|
title: "输出配置保存失败(必须符合JSON格式)",
|
|
120
|
-
message: `${(
|
|
120
|
+
message: `${(u == null ? void 0 : u.message) || u}`,
|
|
121
121
|
type: "error"
|
|
122
122
|
});
|
|
123
123
|
}
|
|
@@ -127,10 +127,10 @@ const ta = /* @__PURE__ */ ee($t, [["render", ea]]), aa = {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
}, na = { class: "input-or-output" };
|
|
130
|
-
function oa(t, a, n, e,
|
|
131
|
-
const r =
|
|
130
|
+
function oa(t, a, n, e, s, o) {
|
|
131
|
+
const r = h("svg-icon"), c = h("meta-code-editor"), u = h("tiny-checkbox");
|
|
132
132
|
return S(), q("div", na, [
|
|
133
|
-
|
|
133
|
+
P(c, {
|
|
134
134
|
modelValue: e.inputValue,
|
|
135
135
|
title: "输入配置",
|
|
136
136
|
"button-text": "输入配置",
|
|
@@ -140,15 +140,15 @@ function oa(t, a, n, e, o, s) {
|
|
|
140
140
|
onSave: e.saveInputValue
|
|
141
141
|
}, {
|
|
142
142
|
icon: v(() => [
|
|
143
|
-
|
|
143
|
+
P(r, {
|
|
144
144
|
class: "edit-btn-icon",
|
|
145
145
|
name: "to-edit"
|
|
146
146
|
})
|
|
147
147
|
]),
|
|
148
148
|
_: 1
|
|
149
149
|
}, 8, ["modelValue", "buttonShowContent", "onSave"]),
|
|
150
|
-
a[2] || (a[2] =
|
|
151
|
-
|
|
150
|
+
a[2] || (a[2] = V("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
|
|
151
|
+
P(c, {
|
|
152
152
|
modelValue: e.outputValue,
|
|
153
153
|
title: "输出配置",
|
|
154
154
|
"button-text": "输出配置",
|
|
@@ -158,29 +158,29 @@ function oa(t, a, n, e, o, s) {
|
|
|
158
158
|
onSave: e.saveOutputValue
|
|
159
159
|
}, {
|
|
160
160
|
icon: v(() => [
|
|
161
|
-
|
|
161
|
+
P(r, {
|
|
162
162
|
class: "edit-btn-icon",
|
|
163
163
|
name: "to-edit"
|
|
164
164
|
})
|
|
165
165
|
]),
|
|
166
166
|
_: 1
|
|
167
167
|
}, 8, ["modelValue", "buttonShowContent", "onSave"]),
|
|
168
|
-
a[3] || (a[3] =
|
|
169
|
-
|
|
168
|
+
a[3] || (a[3] = V("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
|
|
169
|
+
P(u, {
|
|
170
170
|
class: "selectHome",
|
|
171
171
|
modelValue: e.pageSettingState.currentPageData.isBody,
|
|
172
172
|
"onUpdate:modelValue": a[0] || (a[0] = (N) => e.pageSettingState.currentPageData.isBody = N)
|
|
173
173
|
}, {
|
|
174
174
|
default: v(() => a[1] || (a[1] = [
|
|
175
|
-
|
|
175
|
+
V("span", null, "设为根元素为Body", -1)
|
|
176
176
|
])),
|
|
177
177
|
_: 1,
|
|
178
178
|
__: [1]
|
|
179
179
|
}, 8, ["modelValue"]),
|
|
180
|
-
a[4] || (a[4] =
|
|
180
|
+
a[4] || (a[4] = V("div", { class: "input-output-div" }, "默认为div", -1))
|
|
181
181
|
]);
|
|
182
182
|
}
|
|
183
|
-
const sa = /* @__PURE__ */
|
|
183
|
+
const sa = /* @__PURE__ */ te(aa, [["render", oa], ["__scopeId", "data-v-c7b79c9b"]]), fe = {
|
|
184
184
|
id: "engine.plugins.appmanage",
|
|
185
185
|
title: "页面",
|
|
186
186
|
type: "plugins",
|
|
@@ -188,30 +188,30 @@ const sa = /* @__PURE__ */ ee(aa, [["render", oa], ["__scopeId", "data-v-c7b79c9
|
|
|
188
188
|
align: "leftTop"
|
|
189
189
|
}, {
|
|
190
190
|
COMPONENT_NAME: ra
|
|
191
|
-
} = Ge, Re =
|
|
191
|
+
} = Ge, Re = X(!1), Ce = () => {
|
|
192
192
|
Re.value = !0;
|
|
193
193
|
}, Z = () => {
|
|
194
194
|
Re.value = !1;
|
|
195
195
|
const {
|
|
196
196
|
resetPageData: t
|
|
197
|
-
} =
|
|
197
|
+
} = ee();
|
|
198
198
|
t();
|
|
199
|
-
},
|
|
199
|
+
}, Xe = {
|
|
200
200
|
general: "general",
|
|
201
201
|
inputOutput: "inputOutput",
|
|
202
202
|
lifeCycles: "lifeCycles",
|
|
203
203
|
history: "history"
|
|
204
204
|
}, la = {
|
|
205
205
|
components: {
|
|
206
|
-
TinyButton:
|
|
206
|
+
TinyButton: nt,
|
|
207
207
|
TinyCollapse: xe,
|
|
208
208
|
TinyCollapseItem: Oe,
|
|
209
209
|
PageInputOutput: sa,
|
|
210
210
|
LifeCycles: It,
|
|
211
211
|
PageHistory: ta,
|
|
212
|
-
PluginSetting:
|
|
213
|
-
SvgButton:
|
|
214
|
-
ButtonGroup:
|
|
212
|
+
PluginSetting: at,
|
|
213
|
+
SvgButton: Te,
|
|
214
|
+
ButtonGroup: tt
|
|
215
215
|
},
|
|
216
216
|
props: {
|
|
217
217
|
isFolder: {
|
|
@@ -223,224 +223,224 @@ const sa = /* @__PURE__ */ ee(aa, [["render", oa], ["__scopeId", "data-v-c7b79c9
|
|
|
223
223
|
setup(t, {
|
|
224
224
|
emit: a
|
|
225
225
|
}) {
|
|
226
|
-
var
|
|
226
|
+
var he;
|
|
227
227
|
const {
|
|
228
228
|
requestCreatePage: n,
|
|
229
229
|
requestDeletePage: e
|
|
230
|
-
} =
|
|
231
|
-
getDefaultPage:
|
|
232
|
-
pageSettingState:
|
|
230
|
+
} = Pe, {
|
|
231
|
+
getDefaultPage: s,
|
|
232
|
+
pageSettingState: o,
|
|
233
233
|
changeTreeData: r,
|
|
234
234
|
isCurrentDataSame: c,
|
|
235
|
-
initCurrentPageData:
|
|
235
|
+
initCurrentPageData: u,
|
|
236
236
|
isTemporaryPage: N,
|
|
237
|
-
STATIC_PAGE_GROUP_ID:
|
|
237
|
+
STATIC_PAGE_GROUP_ID: _,
|
|
238
238
|
updatePageSettingAfterSave: b
|
|
239
|
-
} =
|
|
240
|
-
pageState:
|
|
241
|
-
initData:
|
|
242
|
-
} =
|
|
243
|
-
confirm:
|
|
244
|
-
} = ce(),
|
|
245
|
-
PLUGIN_NAME:
|
|
246
|
-
getPluginByLayout:
|
|
247
|
-
} = le(), D =
|
|
248
|
-
subscribe:
|
|
249
|
-
unsubscribe:
|
|
250
|
-
} =
|
|
251
|
-
let
|
|
252
|
-
|
|
253
|
-
|
|
239
|
+
} = ee(), {
|
|
240
|
+
pageState: f,
|
|
241
|
+
initData: I
|
|
242
|
+
} = se(), {
|
|
243
|
+
confirm: E
|
|
244
|
+
} = ce(), T = et(fe.type, fe.id), M = T.components.PageGeneral, z = (he = T == null ? void 0 : T.options) == null ? void 0 : he.beforeCreatePage, x = X(null), {
|
|
245
|
+
PLUGIN_NAME: d,
|
|
246
|
+
getPluginByLayout: G
|
|
247
|
+
} = le(), D = $(() => G(d.AppManage)), {
|
|
248
|
+
subscribe: O,
|
|
249
|
+
unsubscribe: L
|
|
250
|
+
} = ve();
|
|
251
|
+
let Q = null;
|
|
252
|
+
Pt(() => {
|
|
253
|
+
Q = O({
|
|
254
254
|
topic: "page-saved",
|
|
255
255
|
callback: () => {
|
|
256
256
|
b();
|
|
257
257
|
}
|
|
258
258
|
});
|
|
259
|
-
}),
|
|
260
|
-
|
|
259
|
+
}), mt(() => {
|
|
260
|
+
Q && L(Q);
|
|
261
261
|
});
|
|
262
|
-
const
|
|
263
|
-
activeName: Object.values(
|
|
262
|
+
const K = oe({
|
|
263
|
+
activeName: Object.values(Xe),
|
|
264
264
|
title: "页面设置",
|
|
265
265
|
historyMessage: ""
|
|
266
|
-
}),
|
|
267
|
-
|
|
266
|
+
}), i = () => {
|
|
267
|
+
ue(o.currentPageData, o.currentPageDataCopy) ? Z() : E({
|
|
268
268
|
title: "提示",
|
|
269
269
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
270
270
|
exec: () => {
|
|
271
|
-
|
|
271
|
+
o.isNew || (r(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy)), Z();
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
|
-
},
|
|
274
|
+
}, m = async () => {
|
|
275
275
|
const {
|
|
276
276
|
page_content: l,
|
|
277
277
|
...g
|
|
278
|
-
} =
|
|
279
|
-
page_content:
|
|
278
|
+
} = s(), {
|
|
279
|
+
page_content: p,
|
|
280
280
|
...k
|
|
281
|
-
} =
|
|
281
|
+
} = o.currentPageData, F = {
|
|
282
282
|
...g,
|
|
283
283
|
...k,
|
|
284
284
|
page_content: {
|
|
285
285
|
...l,
|
|
286
|
-
...
|
|
287
|
-
fileName:
|
|
286
|
+
...p,
|
|
287
|
+
fileName: o.currentPageData.name
|
|
288
288
|
},
|
|
289
|
-
app: B
|
|
289
|
+
app: A(B.GlobalService).getBaseInfo().id,
|
|
290
290
|
isPage: !0
|
|
291
291
|
};
|
|
292
|
-
|
|
292
|
+
F.id && (delete F.id, delete F._id), z && await z(F);
|
|
293
293
|
try {
|
|
294
|
-
const
|
|
295
|
-
await
|
|
294
|
+
const W = await n(F);
|
|
295
|
+
await o.updateTreeData(), o.isNew = !1, N.saved = !1, a("openNewPage", W), Z(), le().closePlugin(), H({
|
|
296
296
|
type: "success",
|
|
297
297
|
message: "新建页面成功!"
|
|
298
|
-
}), Rt && At(
|
|
299
|
-
} catch (
|
|
300
|
-
|
|
298
|
+
}), Rt && At(W);
|
|
299
|
+
} catch (W) {
|
|
300
|
+
H({
|
|
301
301
|
type: "error",
|
|
302
302
|
title: "新建页面失败",
|
|
303
|
-
message: JSON.stringify((
|
|
303
|
+
message: JSON.stringify((W == null ? void 0 : W.message) || W)
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
|
-
},
|
|
307
|
-
var
|
|
308
|
-
const k =
|
|
309
|
-
return
|
|
306
|
+
}, w = (l, g, p = !0) => {
|
|
307
|
+
var ne;
|
|
308
|
+
const k = o.currentPageDataCopy.route !== o.currentPageData.route, F = ((ne = f == null ? void 0 : f.currentPage) == null ? void 0 : ne.id) === l;
|
|
309
|
+
return st({
|
|
310
310
|
id: l,
|
|
311
311
|
params: g,
|
|
312
312
|
routerChange: k,
|
|
313
|
-
isCurEditPage:
|
|
314
|
-
isUpdateTree:
|
|
313
|
+
isCurEditPage: F,
|
|
314
|
+
isUpdateTree: p
|
|
315
315
|
});
|
|
316
|
-
},
|
|
316
|
+
}, y = (l) => {
|
|
317
317
|
const g = {
|
|
318
318
|
...l,
|
|
319
319
|
id: l.page
|
|
320
320
|
};
|
|
321
|
-
["page", "backupTime", "backupTitle", "time"].forEach((
|
|
321
|
+
["page", "backupTime", "backupTitle", "time"].forEach((F) => delete g[F]);
|
|
322
322
|
const k = {
|
|
323
|
-
...
|
|
323
|
+
...o.currentPageData,
|
|
324
324
|
...g,
|
|
325
325
|
message: "还原页面"
|
|
326
326
|
};
|
|
327
|
-
|
|
328
|
-
var
|
|
329
|
-
((
|
|
327
|
+
w(g.id, k).then((F) => {
|
|
328
|
+
var W;
|
|
329
|
+
((W = f == null ? void 0 : f.currentPage) == null ? void 0 : W.id) === (F == null ? void 0 : F.id) && I(F.page_content, F), u(F);
|
|
330
330
|
});
|
|
331
|
-
},
|
|
331
|
+
}, j = async () => {
|
|
332
332
|
const {
|
|
333
333
|
id: l,
|
|
334
334
|
name: g,
|
|
335
|
-
page_content:
|
|
336
|
-
} =
|
|
337
|
-
...
|
|
335
|
+
page_content: p
|
|
336
|
+
} = o.currentPageData, k = {
|
|
337
|
+
...o.currentPageData,
|
|
338
338
|
page_content: {
|
|
339
|
-
...
|
|
339
|
+
...p,
|
|
340
340
|
fileName: g
|
|
341
341
|
}
|
|
342
|
-
},
|
|
343
|
-
|
|
344
|
-
},
|
|
342
|
+
}, F = await w(l, k);
|
|
343
|
+
u(F);
|
|
344
|
+
}, R = (l) => {
|
|
345
345
|
if (!l)
|
|
346
346
|
return;
|
|
347
|
-
const g =
|
|
347
|
+
const g = o.currentPageData.page_content;
|
|
348
348
|
g.lifeCycles = {
|
|
349
349
|
...g.lifeCycles || {},
|
|
350
350
|
...l
|
|
351
351
|
};
|
|
352
|
-
},
|
|
353
|
-
const l =
|
|
354
|
-
|
|
355
|
-
},
|
|
356
|
-
c() ?
|
|
352
|
+
}, me = () => {
|
|
353
|
+
const l = o.currentPageData, g = pe(!0, {}, l);
|
|
354
|
+
o.isNew = !0, g.name = `${g.name}Copy`, g.route = `${g.route}Copy`, o.currentPageData = g, o.currentPageDataCopy = pe(!0, {}, g), o.defaultPage = null;
|
|
355
|
+
}, ie = () => {
|
|
356
|
+
c() ? me() : E({
|
|
357
357
|
title: "提示",
|
|
358
358
|
message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
|
|
359
359
|
exec: () => {
|
|
360
|
-
r(
|
|
360
|
+
r(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy), me();
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
|
-
},
|
|
363
|
+
}, ae = async () => {
|
|
364
364
|
var g;
|
|
365
365
|
const l = {
|
|
366
|
-
...
|
|
366
|
+
...o.defaultPage,
|
|
367
367
|
isDefault: !0
|
|
368
368
|
};
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
w((g = o.defaultPage) == null ? void 0 : g.id, l, !1).then((p) => {
|
|
370
|
+
p && j();
|
|
371
371
|
});
|
|
372
|
-
},
|
|
373
|
-
|
|
372
|
+
}, ge = () => {
|
|
373
|
+
o.isNew ? (o.currentPageData.message = "Page auto save", m()) : E({
|
|
374
374
|
title: "创建历史备份信息",
|
|
375
375
|
message: {
|
|
376
|
-
render: () =>
|
|
376
|
+
render: () => P(ot, {
|
|
377
377
|
placeholder: "历史备份信息",
|
|
378
|
-
modelValue:
|
|
379
|
-
"onUpdate:modelValue": (k) =>
|
|
378
|
+
modelValue: K.historyMessage,
|
|
379
|
+
"onUpdate:modelValue": (k) => K.historyMessage = k
|
|
380
380
|
}, null)
|
|
381
381
|
},
|
|
382
382
|
exec: () => {
|
|
383
383
|
var k;
|
|
384
|
-
|
|
384
|
+
o.currentPageData.message = K.historyMessage.trim() || "Page auto save", (k = o.defaultPage) != null && k.id ? ae() : j(), K.historyMessage = "";
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
},
|
|
387
|
+
}, ye = () => {
|
|
388
|
+
x.value.validGeneralForm().then(ge);
|
|
389
|
+
}, _e = (l = []) => {
|
|
390
390
|
if (!Array.isArray(l))
|
|
391
391
|
return [];
|
|
392
392
|
const g = [];
|
|
393
|
-
return l.forEach((
|
|
393
|
+
return l.forEach((p) => {
|
|
394
394
|
var k;
|
|
395
|
-
if (
|
|
396
|
-
g.push(
|
|
395
|
+
if (p != null && p.isPage) {
|
|
396
|
+
g.push(p);
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
|
-
!(
|
|
399
|
+
!(p != null && p.isPage) && ((k = p == null ? void 0 : p.children) != null && k.length) && g.push(..._e(p.children));
|
|
400
400
|
}), g;
|
|
401
401
|
};
|
|
402
402
|
return {
|
|
403
403
|
align: D,
|
|
404
|
-
PLUGIN_NAME:
|
|
405
|
-
state:
|
|
404
|
+
PLUGIN_NAME: d,
|
|
405
|
+
state: K,
|
|
406
406
|
isShow: Re,
|
|
407
|
-
savePageSetting:
|
|
408
|
-
copyPage:
|
|
409
|
-
pageSettingState:
|
|
410
|
-
pageGeneral:
|
|
411
|
-
pageGeneralRef:
|
|
407
|
+
savePageSetting: ye,
|
|
408
|
+
copyPage: ie,
|
|
409
|
+
pageSettingState: o,
|
|
410
|
+
pageGeneral: M,
|
|
411
|
+
pageGeneralRef: x,
|
|
412
412
|
deletePage: () => {
|
|
413
413
|
var l, g;
|
|
414
|
-
if ((g = (l =
|
|
415
|
-
|
|
414
|
+
if ((g = (l = o.treeDataMapping[o.currentPageData.id]) == null ? void 0 : l.children) != null && g.length) {
|
|
415
|
+
H({
|
|
416
416
|
type: "error",
|
|
417
417
|
message: "此页面存在子页面或子文件夹,不能删除!"
|
|
418
418
|
});
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
|
-
|
|
421
|
+
E({
|
|
422
422
|
title: "提示",
|
|
423
423
|
message: "您是否要删除页面?",
|
|
424
424
|
exec: () => {
|
|
425
425
|
var k;
|
|
426
|
-
const
|
|
427
|
-
e(
|
|
428
|
-
|
|
429
|
-
var
|
|
430
|
-
if (((
|
|
426
|
+
const p = ((k = o.currentPageData) == null ? void 0 : k.id) || "";
|
|
427
|
+
e(p).then(() => {
|
|
428
|
+
o.updateTreeData().then((F) => {
|
|
429
|
+
var He, Ue;
|
|
430
|
+
if (((He = f == null ? void 0 : f.currentPage) == null ? void 0 : He.id) !== p)
|
|
431
431
|
return;
|
|
432
|
-
const
|
|
432
|
+
const W = ((Ue = (F || []).find(({
|
|
433
433
|
groupId: Fe
|
|
434
|
-
}) => Fe ===
|
|
434
|
+
}) => Fe === _)) == null ? void 0 : Ue.data) || [], ne = _e(W), De = ne.find((Fe) => Fe.isHome), pt = ne == null ? void 0 : ne[0], ft = {
|
|
435
435
|
componentName: ra.Page
|
|
436
436
|
};
|
|
437
|
-
a("openNewPage",
|
|
438
|
-
}), Z(),
|
|
437
|
+
a("openNewPage", De || pt || ft);
|
|
438
|
+
}), Z(), H({
|
|
439
439
|
message: "删除页面成功!",
|
|
440
440
|
type: "success"
|
|
441
441
|
});
|
|
442
442
|
}).catch(() => {
|
|
443
|
-
|
|
443
|
+
H({
|
|
444
444
|
message: "删除页面失败!",
|
|
445
445
|
type: "error"
|
|
446
446
|
});
|
|
@@ -448,17 +448,17 @@ const sa = /* @__PURE__ */ ee(aa, [["render", oa], ["__scopeId", "data-v-c7b79c9
|
|
|
448
448
|
}
|
|
449
449
|
});
|
|
450
450
|
},
|
|
451
|
-
cancelPageSetting:
|
|
451
|
+
cancelPageSetting: i,
|
|
452
452
|
closePageSettingPanel: Z,
|
|
453
|
-
updatePageLifeCycles:
|
|
454
|
-
restorePage:
|
|
455
|
-
PAGE_SETTING_SESSION:
|
|
453
|
+
updatePageLifeCycles: R,
|
|
454
|
+
restorePage: y,
|
|
455
|
+
PAGE_SETTING_SESSION: Xe
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
458
|
}, ca = { class: "page-setting-content" }, ia = { class: "life-cycles-container" };
|
|
459
|
-
function ga(t, a, n, e,
|
|
460
|
-
const r =
|
|
461
|
-
return e.isShow ? (S(), U(
|
|
459
|
+
function ga(t, a, n, e, s, o) {
|
|
460
|
+
const r = h("tiny-button"), c = h("svg-button"), u = h("button-group"), N = h("tiny-collapse-item"), _ = h("page-input-output"), b = h("life-cycles"), f = h("page-history"), I = h("tiny-collapse"), E = h("plugin-setting");
|
|
461
|
+
return e.isShow ? (S(), U(E, {
|
|
462
462
|
key: 0,
|
|
463
463
|
"fixed-name": e.PLUGIN_NAME.AppManage,
|
|
464
464
|
align: e.align,
|
|
@@ -466,32 +466,32 @@ function ga(t, a, n, e, o, s) {
|
|
|
466
466
|
class: "page-plugin-setting"
|
|
467
467
|
}, {
|
|
468
468
|
header: v(() => [
|
|
469
|
-
|
|
469
|
+
P(u, null, {
|
|
470
470
|
default: v(() => [
|
|
471
|
-
|
|
471
|
+
P(r, {
|
|
472
472
|
type: "primary",
|
|
473
473
|
onClick: e.savePageSetting
|
|
474
474
|
}, {
|
|
475
475
|
default: v(() => a[1] || (a[1] = [
|
|
476
|
-
|
|
476
|
+
be("保存")
|
|
477
477
|
])),
|
|
478
478
|
_: 1,
|
|
479
479
|
__: [1]
|
|
480
480
|
}, 8, ["onClick"]),
|
|
481
|
-
e.pageSettingState.isNew ?
|
|
481
|
+
e.pageSettingState.isNew ? J("", !0) : (S(), U(c, {
|
|
482
482
|
key: 0,
|
|
483
483
|
name: "text-copy-page",
|
|
484
484
|
placement: "bottom",
|
|
485
485
|
tips: "复制页面",
|
|
486
486
|
onClick: e.copyPage
|
|
487
487
|
}, null, 8, ["onClick"])),
|
|
488
|
-
e.pageSettingState.isNew ?
|
|
488
|
+
e.pageSettingState.isNew ? J("", !0) : (S(), U(c, {
|
|
489
489
|
key: 1,
|
|
490
490
|
name: "delete",
|
|
491
491
|
tips: "删除页面",
|
|
492
492
|
onClick: e.deletePage
|
|
493
493
|
}, null, 8, ["onClick"])),
|
|
494
|
-
|
|
494
|
+
P(c, {
|
|
495
495
|
name: "close",
|
|
496
496
|
onClick: e.cancelPageSetting
|
|
497
497
|
}, null, 8, ["onClick"])
|
|
@@ -500,19 +500,19 @@ function ga(t, a, n, e, o, s) {
|
|
|
500
500
|
})
|
|
501
501
|
]),
|
|
502
502
|
content: v(() => [
|
|
503
|
-
|
|
504
|
-
|
|
503
|
+
V("div", ca, [
|
|
504
|
+
P(I, {
|
|
505
505
|
modelValue: e.state.activeName,
|
|
506
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
506
|
+
"onUpdate:modelValue": a[0] || (a[0] = (T) => e.state.activeName = T),
|
|
507
507
|
class: "page-setting-collapse"
|
|
508
508
|
}, {
|
|
509
509
|
default: v(() => [
|
|
510
|
-
|
|
510
|
+
P(N, {
|
|
511
511
|
title: "基本设置",
|
|
512
512
|
name: e.PAGE_SETTING_SESSION.general
|
|
513
513
|
}, {
|
|
514
514
|
default: v(() => [
|
|
515
|
-
(S(), U(
|
|
515
|
+
(S(), U(Ze(e.pageGeneral), {
|
|
516
516
|
ref: "pageGeneralRef",
|
|
517
517
|
isFolder: n.isFolder
|
|
518
518
|
}, null, 8, ["isFolder"]))
|
|
@@ -526,10 +526,10 @@ function ga(t, a, n, e, o, s) {
|
|
|
526
526
|
name: e.PAGE_SETTING_SESSION.inputOutput
|
|
527
527
|
}, {
|
|
528
528
|
default: v(() => [
|
|
529
|
-
|
|
529
|
+
P(_)
|
|
530
530
|
]),
|
|
531
531
|
_: 1
|
|
532
|
-
}, 8, ["name"])) :
|
|
532
|
+
}, 8, ["name"])) : J("", !0),
|
|
533
533
|
e.pageSettingState.currentPageData.group !== "public" ? (S(), U(N, {
|
|
534
534
|
key: 1,
|
|
535
535
|
class: "input-output",
|
|
@@ -537,25 +537,25 @@ function ga(t, a, n, e, o, s) {
|
|
|
537
537
|
name: e.PAGE_SETTING_SESSION.lifeCycles
|
|
538
538
|
}, {
|
|
539
539
|
default: v(() => {
|
|
540
|
-
var
|
|
540
|
+
var T;
|
|
541
541
|
return [
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
bindLifeCycles: (
|
|
542
|
+
V("div", ia, [
|
|
543
|
+
P(b, {
|
|
544
|
+
bindLifeCycles: (T = e.pageSettingState.currentPageData.page_content) == null ? void 0 : T.lifeCycles,
|
|
545
545
|
onUpdatePageLifeCycles: e.updatePageLifeCycles
|
|
546
546
|
}, null, 8, ["bindLifeCycles", "onUpdatePageLifeCycles"])
|
|
547
547
|
])
|
|
548
548
|
];
|
|
549
549
|
}),
|
|
550
550
|
_: 1
|
|
551
|
-
}, 8, ["name"])) :
|
|
552
|
-
|
|
551
|
+
}, 8, ["name"])) : J("", !0),
|
|
552
|
+
P(N, {
|
|
553
553
|
class: "history-source",
|
|
554
554
|
title: "历史备份",
|
|
555
555
|
name: e.PAGE_SETTING_SESSION.history
|
|
556
556
|
}, {
|
|
557
557
|
default: v(() => [
|
|
558
|
-
f
|
|
558
|
+
P(f, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
|
|
559
559
|
]),
|
|
560
560
|
_: 1
|
|
561
561
|
}, 8, ["name"])
|
|
@@ -565,22 +565,22 @@ function ga(t, a, n, e, o, s) {
|
|
|
565
565
|
])
|
|
566
566
|
]),
|
|
567
567
|
_: 1
|
|
568
|
-
}, 8, ["fixed-name", "align", "title"])) :
|
|
568
|
+
}, 8, ["fixed-name", "align", "title"])) : J("", !0);
|
|
569
569
|
}
|
|
570
|
-
const da = /* @__PURE__ */
|
|
570
|
+
const da = /* @__PURE__ */ te(la, [["render", ga], ["__scopeId", "data-v-dd101047"]]), Ae = X(!1), ze = () => {
|
|
571
571
|
Ae.value = !0;
|
|
572
|
-
},
|
|
572
|
+
}, Y = () => {
|
|
573
573
|
Ae.value = !1;
|
|
574
|
-
const { resetPageData: t } =
|
|
574
|
+
const { resetPageData: t } = ee();
|
|
575
575
|
t();
|
|
576
576
|
}, ua = {
|
|
577
577
|
components: {
|
|
578
|
-
TinyButton:
|
|
578
|
+
TinyButton: nt,
|
|
579
579
|
TinyCollapse: xe,
|
|
580
580
|
TinyCollapseItem: Oe,
|
|
581
|
-
PluginSetting:
|
|
582
|
-
SvgButton:
|
|
583
|
-
ButtonGroup:
|
|
581
|
+
PluginSetting: at,
|
|
582
|
+
SvgButton: Te,
|
|
583
|
+
ButtonGroup: tt
|
|
584
584
|
},
|
|
585
585
|
props: {
|
|
586
586
|
isFolder: {
|
|
@@ -589,62 +589,62 @@ const da = /* @__PURE__ */ ee(la, [["render", ga], ["__scopeId", "data-v-dd10104
|
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
setup() {
|
|
592
|
-
const t =
|
|
592
|
+
const t = oe({
|
|
593
593
|
activeName: ["folderGeneralRef"],
|
|
594
594
|
title: "文件夹设置"
|
|
595
|
-
}), { requestCreatePage: a, requestUpdatePage: n, requestDeletePage: e } =
|
|
596
|
-
|
|
595
|
+
}), { requestCreatePage: a, requestUpdatePage: n, requestDeletePage: e } = Pe, { pageSettingState: s, changeTreeData: o } = ee(), { confirm: r } = ce(), u = et(fe.type, fe.id).components.PageGeneral, N = X(null), { PLUGIN_NAME: _, getPluginByLayout: b } = le(), f = $(() => b(_.AppManage)), I = () => {
|
|
596
|
+
ue(s.currentPageData, s.currentPageDataCopy) ? Y() : r({
|
|
597
597
|
title: "提示",
|
|
598
598
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
599
599
|
exec: () => {
|
|
600
|
-
|
|
600
|
+
s.isNew || (o(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), Y();
|
|
601
601
|
}
|
|
602
602
|
});
|
|
603
|
-
},
|
|
604
|
-
const
|
|
605
|
-
...
|
|
606
|
-
app: B
|
|
603
|
+
}, E = () => {
|
|
604
|
+
const d = {
|
|
605
|
+
...s.currentPageData,
|
|
606
|
+
app: A(B.GlobalService).getBaseInfo().id,
|
|
607
607
|
isPage: !1
|
|
608
608
|
};
|
|
609
|
-
a(
|
|
610
|
-
|
|
609
|
+
a(d).then(() => {
|
|
610
|
+
s.updateTreeData(), s.isNew = !1, Y(), H({
|
|
611
611
|
type: "success",
|
|
612
612
|
message: "新建文件夹成功!"
|
|
613
613
|
});
|
|
614
|
-
}).catch((
|
|
615
|
-
|
|
614
|
+
}).catch((G) => {
|
|
615
|
+
H({
|
|
616
616
|
type: "error",
|
|
617
617
|
title: "新建文件夹失败",
|
|
618
|
-
message: JSON.stringify((
|
|
618
|
+
message: JSON.stringify((G == null ? void 0 : G.message) || G)
|
|
619
619
|
});
|
|
620
620
|
});
|
|
621
|
-
},
|
|
622
|
-
const { id:
|
|
623
|
-
n(
|
|
624
|
-
|
|
621
|
+
}, T = () => {
|
|
622
|
+
const { id: x } = s.currentPageData;
|
|
623
|
+
n(x, { ...s.currentPageData, page_content: null }).then(() => {
|
|
624
|
+
s.updateTreeData(), s.isNew = !1, Y(), H({
|
|
625
625
|
type: "success",
|
|
626
626
|
message: "更新文件夹成功!"
|
|
627
627
|
});
|
|
628
|
-
}).catch((
|
|
629
|
-
|
|
628
|
+
}).catch((d) => {
|
|
629
|
+
H({
|
|
630
630
|
type: "error",
|
|
631
631
|
title: "更新文件夹失败",
|
|
632
|
-
message: JSON.stringify((
|
|
632
|
+
message: JSON.stringify((d == null ? void 0 : d.message) || d)
|
|
633
633
|
});
|
|
634
634
|
});
|
|
635
635
|
};
|
|
636
636
|
return {
|
|
637
|
-
align:
|
|
638
|
-
PLUGIN_NAME:
|
|
637
|
+
align: f,
|
|
638
|
+
PLUGIN_NAME: _,
|
|
639
639
|
saveFolderSetting: () => {
|
|
640
640
|
N.value.validGeneralForm().then(() => {
|
|
641
|
-
|
|
641
|
+
s.isNew ? E() : T();
|
|
642
642
|
});
|
|
643
643
|
},
|
|
644
644
|
deleteFolder: Mt(5e3, !0, () => {
|
|
645
|
-
var
|
|
646
|
-
if ((
|
|
647
|
-
|
|
645
|
+
var x, d;
|
|
646
|
+
if ((d = (x = s.treeDataMapping[s.currentPageData.id]) == null ? void 0 : x.children) != null && d.length) {
|
|
647
|
+
H({
|
|
648
648
|
type: "error",
|
|
649
649
|
message: "此文件夹不是空文件夹,不能删除!"
|
|
650
650
|
});
|
|
@@ -655,34 +655,34 @@ const da = /* @__PURE__ */ ee(la, [["render", ga], ["__scopeId", "data-v-dd10104
|
|
|
655
655
|
message: "您是否要删除文件夹?",
|
|
656
656
|
exec: () => {
|
|
657
657
|
var D;
|
|
658
|
-
const
|
|
659
|
-
e(
|
|
660
|
-
|
|
658
|
+
const G = ((D = s.currentPageData) == null ? void 0 : D.id) || "";
|
|
659
|
+
e(G).then(() => {
|
|
660
|
+
s.updateTreeData(), Y(), H({
|
|
661
661
|
type: "success",
|
|
662
662
|
message: "删除文件夹成功!"
|
|
663
663
|
});
|
|
664
|
-
}).catch((
|
|
665
|
-
|
|
664
|
+
}).catch((O) => {
|
|
665
|
+
H({
|
|
666
666
|
type: "success",
|
|
667
667
|
title: "删除文件夹失败!",
|
|
668
|
-
message: JSON.stringify((
|
|
668
|
+
message: JSON.stringify((O == null ? void 0 : O.message) || O)
|
|
669
669
|
});
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
});
|
|
673
673
|
}),
|
|
674
|
-
pageGeneral:
|
|
674
|
+
pageGeneral: u,
|
|
675
675
|
folderGeneralRef: N,
|
|
676
|
-
closeFolderSettingPanel:
|
|
676
|
+
closeFolderSettingPanel: Y,
|
|
677
677
|
isShow: Ae,
|
|
678
678
|
state: t,
|
|
679
|
-
pageSettingState:
|
|
680
|
-
closeFolderSetting:
|
|
679
|
+
pageSettingState: s,
|
|
680
|
+
closeFolderSetting: I
|
|
681
681
|
};
|
|
682
682
|
}
|
|
683
683
|
}, pa = { class: "page-setting-content" };
|
|
684
|
-
function fa(t, a, n, e,
|
|
685
|
-
const r =
|
|
684
|
+
function fa(t, a, n, e, s, o) {
|
|
685
|
+
const r = h("tiny-button"), c = h("svg-button"), u = h("button-group"), N = h("tiny-collapse-item"), _ = h("tiny-collapse"), b = h("plugin-setting");
|
|
686
686
|
return e.isShow ? (S(), U(b, {
|
|
687
687
|
key: 0,
|
|
688
688
|
"fixed-name": e.PLUGIN_NAME.AppManage,
|
|
@@ -691,26 +691,26 @@ function fa(t, a, n, e, o, s) {
|
|
|
691
691
|
class: "pageFolder-plugin-setting"
|
|
692
692
|
}, {
|
|
693
693
|
header: v(() => [
|
|
694
|
-
|
|
694
|
+
P(u, null, {
|
|
695
695
|
default: v(() => [
|
|
696
|
-
|
|
696
|
+
P(r, {
|
|
697
697
|
type: "primary",
|
|
698
698
|
onClick: e.saveFolderSetting
|
|
699
699
|
}, {
|
|
700
700
|
default: v(() => a[1] || (a[1] = [
|
|
701
|
-
|
|
701
|
+
be("保存")
|
|
702
702
|
])),
|
|
703
703
|
_: 1,
|
|
704
704
|
__: [1]
|
|
705
705
|
}, 8, ["onClick"]),
|
|
706
|
-
e.pageSettingState.isNew ?
|
|
706
|
+
e.pageSettingState.isNew ? J("", !0) : (S(), U(c, {
|
|
707
707
|
key: 0,
|
|
708
708
|
name: "delete",
|
|
709
709
|
placement: "bottom",
|
|
710
710
|
tips: "删除",
|
|
711
711
|
onClick: e.deleteFolder
|
|
712
712
|
}, null, 8, ["onClick"])),
|
|
713
|
-
|
|
713
|
+
P(c, {
|
|
714
714
|
class: "close-plugin-setting-icon",
|
|
715
715
|
name: "close",
|
|
716
716
|
onClick: e.closeFolderSetting
|
|
@@ -720,18 +720,18 @@ function fa(t, a, n, e, o, s) {
|
|
|
720
720
|
})
|
|
721
721
|
]),
|
|
722
722
|
content: v(() => [
|
|
723
|
-
|
|
724
|
-
|
|
723
|
+
V("div", pa, [
|
|
724
|
+
P(_, {
|
|
725
725
|
modelValue: e.state.activeName,
|
|
726
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
726
|
+
"onUpdate:modelValue": a[0] || (a[0] = (f) => e.state.activeName = f)
|
|
727
727
|
}, {
|
|
728
728
|
default: v(() => [
|
|
729
|
-
|
|
729
|
+
P(N, {
|
|
730
730
|
title: "基本设置",
|
|
731
731
|
name: "folderGeneralRef"
|
|
732
732
|
}, {
|
|
733
733
|
default: v(() => [
|
|
734
|
-
(S(), U(
|
|
734
|
+
(S(), U(Ze(e.pageGeneral), {
|
|
735
735
|
ref: "folderGeneralRef",
|
|
736
736
|
isFolder: n.isFolder
|
|
737
737
|
}, null, 8, ["isFolder"]))
|
|
@@ -744,9 +744,9 @@ function fa(t, a, n, e, o, s) {
|
|
|
744
744
|
])
|
|
745
745
|
]),
|
|
746
746
|
_: 1
|
|
747
|
-
}, 8, ["fixed-name", "align", "title"])) :
|
|
747
|
+
}, 8, ["fixed-name", "align", "title"])) : J("", !0);
|
|
748
748
|
}
|
|
749
|
-
const Pa = /* @__PURE__ */
|
|
749
|
+
const Pa = /* @__PURE__ */ te(ua, [["render", fa], ["__scopeId", "data-v-21dedc52"]]), ma = {
|
|
750
750
|
key: 0,
|
|
751
751
|
width: "24",
|
|
752
752
|
height: "24",
|
|
@@ -768,7 +768,7 @@ const Pa = /* @__PURE__ */ ee(ua, [["render", fa], ["__scopeId", "data-v-21dedc5
|
|
|
768
768
|
y2: "24",
|
|
769
769
|
stroke: "#EBEBEB",
|
|
770
770
|
"stroke-width": "1"
|
|
771
|
-
}, ha = /* @__PURE__ */
|
|
771
|
+
}, ha = /* @__PURE__ */ $e({
|
|
772
772
|
__name: "LayerLines",
|
|
773
773
|
props: {
|
|
774
774
|
level: {
|
|
@@ -781,12 +781,12 @@ const Pa = /* @__PURE__ */ ee(ua, [["render", fa], ["__scopeId", "data-v-21dedc5
|
|
|
781
781
|
}
|
|
782
782
|
},
|
|
783
783
|
setup(t) {
|
|
784
|
-
return (a, n) => (S(!0), q(
|
|
784
|
+
return (a, n) => (S(!0), q(de, null, we(t.level - 1, (e) => (S(), q("span", {
|
|
785
785
|
key: e,
|
|
786
786
|
class: "gap"
|
|
787
787
|
}, [
|
|
788
788
|
t.lineData[e] ? (S(), q("svg", ma, [
|
|
789
|
-
n[0] || (n[0] =
|
|
789
|
+
n[0] || (n[0] = V("line", {
|
|
790
790
|
x1: "8",
|
|
791
791
|
y1: "0",
|
|
792
792
|
x2: "8",
|
|
@@ -794,12 +794,12 @@ const Pa = /* @__PURE__ */ ee(ua, [["render", fa], ["__scopeId", "data-v-21dedc5
|
|
|
794
794
|
stroke: "#EBEBEB",
|
|
795
795
|
"stroke-width": "1"
|
|
796
796
|
}, null, -1)),
|
|
797
|
-
(t.lineData[e] & 1) === 1 ? (S(), q("line", ya)) :
|
|
798
|
-
(t.lineData[e] >> 1 & 1) === 1 ? (S(), q("line", _a)) :
|
|
799
|
-
])) :
|
|
797
|
+
(t.lineData[e] & 1) === 1 ? (S(), q("line", ya)) : J("", !0),
|
|
798
|
+
(t.lineData[e] >> 1 & 1) === 1 ? (S(), q("line", _a)) : J("", !0)
|
|
799
|
+
])) : J("", !0)
|
|
800
800
|
]))), 128));
|
|
801
801
|
}
|
|
802
|
-
}), Da = /* @__PURE__ */
|
|
802
|
+
}), Da = /* @__PURE__ */ te(ha, [["__scopeId", "data-v-d8cd0338"]]), Sa = ["draggable", "onDragstart", "onDragover", "onDragenter", "onDrop"], va = ["onClick"], Ca = ["onClick"], ba = /* @__PURE__ */ $e({
|
|
803
803
|
__name: "Tree",
|
|
804
804
|
props: {
|
|
805
805
|
data: {
|
|
@@ -836,143 +836,158 @@ const Pa = /* @__PURE__ */ ee(ua, [["render", fa], ["__scopeId", "data-v-21dedc5
|
|
|
836
836
|
},
|
|
837
837
|
emits: ["clickRow", "moveNode"],
|
|
838
838
|
setup(t, { emit: a }) {
|
|
839
|
-
const n = t, e = a,
|
|
840
|
-
const i =
|
|
841
|
-
return { collapseMap: i, setCollapse: (y,
|
|
842
|
-
i.value[y] =
|
|
839
|
+
const n = t, e = a, s = () => {
|
|
840
|
+
const i = X({});
|
|
841
|
+
return { collapseMap: i, setCollapse: (y, j) => {
|
|
842
|
+
i.value[y] = j;
|
|
843
843
|
}, switchCollapse: (y) => {
|
|
844
844
|
i.value[y] = !i.value[y];
|
|
845
845
|
} };
|
|
846
|
-
}, { collapseMap:
|
|
846
|
+
}, { collapseMap: o, setCollapse: r, switchCollapse: c } = s(), u = (i) => {
|
|
847
847
|
const m = i.rawData[n.childrenKey];
|
|
848
|
-
Array.isArray(m) && m.length > 0 &&
|
|
849
|
-
},
|
|
850
|
-
const { idKey:
|
|
851
|
-
id: i[
|
|
852
|
-
label: i[
|
|
848
|
+
Array.isArray(m) && m.length > 0 && c(i.id);
|
|
849
|
+
}, N = (i, m, w = 0, y = !1) => {
|
|
850
|
+
const { idKey: j, labelKey: R, childrenKey: me } = n, ie = {
|
|
851
|
+
id: i[j],
|
|
852
|
+
label: i[R],
|
|
853
853
|
parentId: m,
|
|
854
|
-
level:
|
|
854
|
+
level: w,
|
|
855
855
|
collapsed: y,
|
|
856
856
|
rawData: i
|
|
857
|
-
},
|
|
858
|
-
if (Array.isArray(
|
|
859
|
-
for (const
|
|
860
|
-
|
|
861
|
-
return
|
|
862
|
-
},
|
|
863
|
-
const m =
|
|
857
|
+
}, ae = [ie], ge = i[me];
|
|
858
|
+
if (Array.isArray(ge))
|
|
859
|
+
for (const ye of ge)
|
|
860
|
+
ae.push(...N(ye, ie.id, w + 1, y || o.value[ie.id]));
|
|
861
|
+
return ae;
|
|
862
|
+
}, _ = $(() => N({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), b = $(() => _.value.reduce((i, m) => (i[m.id] = m, i), {})), f = (i) => {
|
|
863
|
+
const m = b.value[i];
|
|
864
864
|
if (!m || !m.parentId)
|
|
865
865
|
return [];
|
|
866
|
-
const
|
|
867
|
-
return
|
|
868
|
-
},
|
|
866
|
+
const w = f(m.parentId);
|
|
867
|
+
return w.push(m.parentId), w;
|
|
868
|
+
}, I = X([]);
|
|
869
|
+
qe(_, (i) => {
|
|
870
|
+
I.value = i.filter((m) => m.label.toLowerCase().includes(n.filterValue.toLowerCase()));
|
|
871
|
+
}), qe(
|
|
872
|
+
() => n.filterValue,
|
|
873
|
+
(i) => {
|
|
874
|
+
const m = _.value.filter((y) => y.label.toLowerCase().includes(i.toLowerCase()));
|
|
875
|
+
let w = !1;
|
|
876
|
+
m.forEach((y) => {
|
|
877
|
+
for (const j of f(y.id))
|
|
878
|
+
o.value[j] && (r(j, !1), w = !0);
|
|
879
|
+
}), w || (I.value = m);
|
|
880
|
+
}
|
|
881
|
+
);
|
|
882
|
+
const E = $(() => {
|
|
869
883
|
const i = /* @__PURE__ */ new Set();
|
|
870
|
-
for (const m of
|
|
884
|
+
for (const m of I.value) {
|
|
871
885
|
i.add(m.id);
|
|
872
|
-
for (const
|
|
873
|
-
i.add(
|
|
886
|
+
for (const w of f(m.id))
|
|
887
|
+
i.add(w);
|
|
874
888
|
}
|
|
875
|
-
return
|
|
876
|
-
}),
|
|
889
|
+
return _.value.filter((m) => i.has(m.id));
|
|
890
|
+
}), T = {
|
|
877
891
|
node: 1,
|
|
878
892
|
// └
|
|
879
893
|
layer: 2
|
|
880
|
-
},
|
|
881
|
-
const i = {}, m =
|
|
882
|
-
for (const [
|
|
883
|
-
if (i[
|
|
884
|
-
const
|
|
885
|
-
for (let
|
|
886
|
-
i[
|
|
894
|
+
}, M = $(() => {
|
|
895
|
+
const i = {}, m = E.value;
|
|
896
|
+
for (const [w, y] of m.entries())
|
|
897
|
+
if (i[w] = i[w] || {}, i[w][y.level - 1] = T.node, y.parentId !== n.rootId) {
|
|
898
|
+
const j = m.findIndex((R) => R.id === y.parentId);
|
|
899
|
+
for (let R = j + 1; R < w; R++)
|
|
900
|
+
i[R][y.level - 1] = (i[R][y.level - 1] || 0) | T.layer;
|
|
887
901
|
}
|
|
888
902
|
return i;
|
|
889
|
-
}),
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
903
|
+
}), z = (i, m) => {
|
|
904
|
+
var y;
|
|
905
|
+
(y = i.currentTarget.querySelector("div.prefix-icon")) != null && y.contains(i.target) || e("clickRow", m);
|
|
906
|
+
}, x = X(null), d = X(null), G = (i, m) => {
|
|
907
|
+
n.draggable && (x.value = m);
|
|
908
|
+
}, D = (i, m) => {
|
|
894
909
|
if (!n.draggable)
|
|
895
910
|
return;
|
|
896
|
-
|
|
897
|
-
},
|
|
911
|
+
f(m.id).includes(x.value.id) ? d.value = null : (i.preventDefault(), d.value = m.id);
|
|
912
|
+
}, O = (i, m) => {
|
|
898
913
|
i.preventDefault();
|
|
899
|
-
const
|
|
900
|
-
if (
|
|
914
|
+
const w = x.value;
|
|
915
|
+
if (x.value = null, !w)
|
|
901
916
|
return;
|
|
902
|
-
!
|
|
903
|
-
},
|
|
904
|
-
|
|
905
|
-
},
|
|
906
|
-
n.draggable && i.target === i.currentTarget && (i.preventDefault(),
|
|
907
|
-
},
|
|
908
|
-
n.draggable && i.target === i.currentTarget && (
|
|
917
|
+
!f(m.id).includes(w.id) && w.id !== m.id && w.parentId !== m.id && e("moveNode", w, m);
|
|
918
|
+
}, L = () => {
|
|
919
|
+
d.value = null;
|
|
920
|
+
}, Q = (i) => {
|
|
921
|
+
n.draggable && i.target === i.currentTarget && (i.preventDefault(), d.value = n.rootId);
|
|
922
|
+
}, K = (i) => {
|
|
923
|
+
n.draggable && i.target === i.currentTarget && (d.value = null);
|
|
909
924
|
};
|
|
910
925
|
return (i, m) => {
|
|
911
|
-
const
|
|
926
|
+
const w = h("svg-icon");
|
|
912
927
|
return S(), q("div", {
|
|
913
|
-
class: Ne(["draggable-tree", "border-transparent", { "hover-border-color":
|
|
914
|
-
onDragover:
|
|
915
|
-
onDragenter:
|
|
916
|
-
onDragleave:
|
|
917
|
-
onDrop: m[0] || (m[0] = (y) =>
|
|
928
|
+
class: Ne(["draggable-tree", "border-transparent", { "hover-border-color": d.value === t.rootId }]),
|
|
929
|
+
onDragover: Q,
|
|
930
|
+
onDragenter: Q,
|
|
931
|
+
onDragleave: K,
|
|
932
|
+
onDrop: m[0] || (m[0] = (y) => O(y, { id: t.rootId }))
|
|
918
933
|
}, [
|
|
919
|
-
(S(!0), q(
|
|
934
|
+
(S(!0), q(de, null, we(E.value, (y, j) => yt((S(), q("div", {
|
|
920
935
|
class: Ne([
|
|
921
936
|
"row",
|
|
922
937
|
"border-transparent",
|
|
923
938
|
{
|
|
924
939
|
active: String(t.active) === String(y.id),
|
|
925
|
-
"hover-border-color":
|
|
940
|
+
"hover-border-color": d.value === y.id
|
|
926
941
|
}
|
|
927
942
|
]),
|
|
928
943
|
key: y.id,
|
|
929
944
|
draggable: t.draggable ? "true" : void 0,
|
|
930
|
-
onDragstart: (
|
|
931
|
-
onDragover: (
|
|
932
|
-
onDragenter: (
|
|
933
|
-
onDrop: (
|
|
934
|
-
onDragend:
|
|
945
|
+
onDragstart: (R) => G(R, y),
|
|
946
|
+
onDragover: (R) => D(R, y),
|
|
947
|
+
onDragenter: (R) => D(R, y),
|
|
948
|
+
onDrop: (R) => O(R, y),
|
|
949
|
+
onDragend: L
|
|
935
950
|
}, [
|
|
936
|
-
|
|
951
|
+
V("div", {
|
|
937
952
|
class: "content",
|
|
938
|
-
onClick: (
|
|
953
|
+
onClick: (R) => z(R, y)
|
|
939
954
|
}, [
|
|
940
|
-
|
|
941
|
-
"line-data":
|
|
955
|
+
P(Da, {
|
|
956
|
+
"line-data": M.value[j],
|
|
942
957
|
level: y.level
|
|
943
958
|
}, null, 8, ["line-data", "level"]),
|
|
944
|
-
|
|
959
|
+
V("div", {
|
|
945
960
|
class: "prefix-icon",
|
|
946
|
-
onClick:
|
|
961
|
+
onClick: (R) => u(y)
|
|
947
962
|
}, [
|
|
948
|
-
y.rawData.isPage ? (S(), U(
|
|
963
|
+
y.rawData.isPage ? (S(), U(w, {
|
|
949
964
|
key: 0,
|
|
950
|
-
name:
|
|
951
|
-
}, null, 8, ["name"])) : (S(), U(
|
|
965
|
+
name: je(o)[y.id] ? "page-collection" : "page"
|
|
966
|
+
}, null, 8, ["name"])) : (S(), U(w, {
|
|
952
967
|
key: 1,
|
|
953
|
-
name:
|
|
968
|
+
name: je(o)[y.id] ? "folder" : "folder-wold"
|
|
954
969
|
}, null, 8, ["name"]))
|
|
955
970
|
], 8, Ca),
|
|
956
|
-
|
|
971
|
+
V("label", null, re(y.label), 1)
|
|
957
972
|
], 8, va),
|
|
958
|
-
|
|
973
|
+
_t(i.$slots, "row-suffix", { node: y }, void 0, !0)
|
|
959
974
|
], 42, Sa)), [
|
|
960
975
|
[ht, !y.collapsed]
|
|
961
976
|
])), 128))
|
|
962
977
|
], 34);
|
|
963
978
|
};
|
|
964
979
|
}
|
|
965
|
-
}),
|
|
966
|
-
PAGE_STATUS:
|
|
980
|
+
}), wa = /* @__PURE__ */ te(ba, [["__scopeId", "data-v-db7869d5"]]), {
|
|
981
|
+
PAGE_STATUS: Na
|
|
967
982
|
} = Ge, Ia = {
|
|
968
983
|
components: {
|
|
969
984
|
TinySearch: Et,
|
|
970
985
|
TinyCollapse: xe,
|
|
971
986
|
TinyCollapseItem: Oe,
|
|
972
|
-
TinyIconSearch:
|
|
987
|
+
TinyIconSearch: Lt(),
|
|
973
988
|
TinyPopover: Ft,
|
|
974
|
-
DraggableTree:
|
|
975
|
-
SvgButton:
|
|
989
|
+
DraggableTree: wa,
|
|
990
|
+
SvgButton: Te
|
|
976
991
|
},
|
|
977
992
|
props: {
|
|
978
993
|
isFolder: {
|
|
@@ -988,92 +1003,92 @@ const Pa = /* @__PURE__ */ ee(ua, [["render", fa], ["__scopeId", "data-v-21dedc5
|
|
|
988
1003
|
confirm: n
|
|
989
1004
|
} = ce(), {
|
|
990
1005
|
pageState: e,
|
|
991
|
-
isBlock:
|
|
992
|
-
isSaved:
|
|
993
|
-
} =
|
|
1006
|
+
isBlock: s,
|
|
1007
|
+
isSaved: o
|
|
1008
|
+
} = se(), {
|
|
994
1009
|
pageSettingState: r,
|
|
995
1010
|
changeTreeData: c,
|
|
996
|
-
isCurrentDataSame:
|
|
1011
|
+
isCurrentDataSame: u,
|
|
997
1012
|
getPageList: N,
|
|
998
|
-
resetPageData:
|
|
1013
|
+
resetPageData: _,
|
|
999
1014
|
STATIC_PAGE_GROUP_ID: b,
|
|
1000
|
-
COMMON_PAGE_GROUP_ID:
|
|
1001
|
-
switchPage:
|
|
1002
|
-
} =
|
|
1003
|
-
fetchPageDetail:
|
|
1004
|
-
requestUpdatePage:
|
|
1005
|
-
} =
|
|
1006
|
-
customPageOperations:
|
|
1007
|
-
} = Ee(
|
|
1015
|
+
COMMON_PAGE_GROUP_ID: f,
|
|
1016
|
+
switchPage: I
|
|
1017
|
+
} = ee(), {
|
|
1018
|
+
fetchPageDetail: E,
|
|
1019
|
+
requestUpdatePage: T
|
|
1020
|
+
} = Pe, M = () => A(B.GlobalService).getBaseInfo().id, {
|
|
1021
|
+
customPageOperations: z = []
|
|
1022
|
+
} = Ee(fe.id), x = oe({
|
|
1008
1023
|
pageSearchValue: "",
|
|
1009
|
-
collapseValue: [b,
|
|
1024
|
+
collapseValue: [b, f],
|
|
1010
1025
|
currentNodeData: {
|
|
1011
|
-
id: B
|
|
1026
|
+
id: A(B.GlobalService).getBaseInfo().pageId
|
|
1012
1027
|
}
|
|
1013
1028
|
}), {
|
|
1014
|
-
subscribe:
|
|
1015
|
-
unsubscribe:
|
|
1016
|
-
} =
|
|
1029
|
+
subscribe: d,
|
|
1030
|
+
unsubscribe: G
|
|
1031
|
+
} = ve();
|
|
1017
1032
|
let D = null;
|
|
1018
1033
|
Dt(() => {
|
|
1019
|
-
D =
|
|
1034
|
+
D = d({
|
|
1020
1035
|
topic: "locationHistoryChanged",
|
|
1021
1036
|
callback: (l) => {
|
|
1022
|
-
l.pageId ?
|
|
1037
|
+
l.pageId ? x.currentNodeData = {
|
|
1023
1038
|
id: l.pageId
|
|
1024
|
-
} :
|
|
1039
|
+
} : s() && (x.currentNodeData = {});
|
|
1025
1040
|
},
|
|
1026
1041
|
subscriber: "pageTree"
|
|
1027
1042
|
});
|
|
1028
|
-
}),
|
|
1029
|
-
D &&
|
|
1043
|
+
}), Je(() => {
|
|
1044
|
+
D && G(D);
|
|
1030
1045
|
});
|
|
1031
|
-
const
|
|
1032
|
-
r.updateTreeData = async () => await
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1035
|
-
Z(),
|
|
1046
|
+
const O = async (l) => await N(l);
|
|
1047
|
+
r.updateTreeData = async () => await O(M());
|
|
1048
|
+
const L = (l) => {
|
|
1049
|
+
x.currentNodeData = l, I(l.id).then(() => {
|
|
1050
|
+
Z(), Y();
|
|
1036
1051
|
});
|
|
1037
|
-
},
|
|
1038
|
-
var
|
|
1052
|
+
}, Q = (l, g) => {
|
|
1053
|
+
var F;
|
|
1039
1054
|
const {
|
|
1040
|
-
id:
|
|
1055
|
+
id: p,
|
|
1041
1056
|
isPage: k
|
|
1042
1057
|
} = g;
|
|
1043
|
-
!
|
|
1058
|
+
!s() && p === ((F = x == null ? void 0 : x.currentNodeData) == null ? void 0 : F.id) || !k || (o() && u() ? L(g) : n({
|
|
1044
1059
|
title: "提示",
|
|
1045
|
-
message: `${
|
|
1060
|
+
message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
|
|
1046
1061
|
exec: () => {
|
|
1047
|
-
c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy),
|
|
1062
|
+
c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), L(g);
|
|
1048
1063
|
}
|
|
1049
1064
|
}));
|
|
1050
|
-
},
|
|
1065
|
+
}, K = (l, g, p) => {
|
|
1051
1066
|
var k;
|
|
1052
|
-
if (
|
|
1053
|
-
const
|
|
1067
|
+
if (p && g.isPage) {
|
|
1068
|
+
const F = ((k = g.occupier) == null ? void 0 : k.username) || "";
|
|
1054
1069
|
ce().message({
|
|
1055
|
-
message: `您点击的页面被${
|
|
1070
|
+
message: `您点击的页面被${F}锁定,暂时无法编辑,请联系解锁`
|
|
1056
1071
|
});
|
|
1057
1072
|
return;
|
|
1058
1073
|
}
|
|
1059
|
-
|
|
1074
|
+
ue(r.currentPageData, r.currentPageDataCopy) ? a("openSettingPanel", g) : n({
|
|
1060
1075
|
title: "提示",
|
|
1061
1076
|
message: `当前页面或文件夹${r.currentPageData.name}尚未保存,是否要继续切换?`,
|
|
1062
1077
|
exec: () => {
|
|
1063
1078
|
c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), a("openSettingPanel", g);
|
|
1064
1079
|
}
|
|
1065
1080
|
});
|
|
1066
|
-
},
|
|
1067
|
-
|
|
1068
|
-
},
|
|
1069
|
-
|
|
1070
|
-
},
|
|
1071
|
-
|
|
1072
|
-
},
|
|
1081
|
+
}, i = {}, m = (l, g) => {
|
|
1082
|
+
i[g] = l;
|
|
1083
|
+
}, w = (l) => {
|
|
1084
|
+
Q(null, l.rawData);
|
|
1085
|
+
}, y = (l) => rt(l.occupier).state === Na.Lock, j = (l) => {
|
|
1086
|
+
K(null, l.rawData, y(l.rawData));
|
|
1087
|
+
}, ae = [
|
|
1073
1088
|
{
|
|
1074
1089
|
type: "settings",
|
|
1075
1090
|
label: "设置",
|
|
1076
|
-
action:
|
|
1091
|
+
action: j
|
|
1077
1092
|
},
|
|
1078
1093
|
{
|
|
1079
1094
|
type: "divider"
|
|
@@ -1099,7 +1114,7 @@ const Pa = /* @__PURE__ */ ee(ua, [["render", fa], ["__scopeId", "data-v-21dedc5
|
|
|
1099
1114
|
a("settingHome", l);
|
|
1100
1115
|
}
|
|
1101
1116
|
},
|
|
1102
|
-
...
|
|
1117
|
+
...z
|
|
1103
1118
|
// TODO 复制和删除的逻辑耦合在其他组件内,暂时屏蔽
|
|
1104
1119
|
// { type: 'divider' },
|
|
1105
1120
|
// { type: 'copy', label: '复制页面', action: copyPage },
|
|
@@ -1107,56 +1122,56 @@ const Pa = /* @__PURE__ */ ee(ua, [["render", fa], ["__scopeId", "data-v-21dedc5
|
|
|
1107
1122
|
].map((l) => ({
|
|
1108
1123
|
...l,
|
|
1109
1124
|
action: (g) => {
|
|
1110
|
-
var
|
|
1111
|
-
(
|
|
1125
|
+
var p, k, F;
|
|
1126
|
+
(p = l.action) == null || p.call(l, g, a), (F = (k = i[g.id]) == null ? void 0 : k.doClose) == null || F.call(k);
|
|
1112
1127
|
}
|
|
1113
|
-
})),
|
|
1114
|
-
var
|
|
1128
|
+
})), ge = (l, g) => l === f ? ae.slice(0, 1) : !g.rawData.isPage || g.rawData.group === "public" ? ae.filter((p) => p.type !== "settingHome") : ae, ye = (l) => {
|
|
1129
|
+
var De;
|
|
1115
1130
|
const {
|
|
1116
1131
|
id: g,
|
|
1117
|
-
name:
|
|
1132
|
+
name: p,
|
|
1118
1133
|
page_content: k
|
|
1119
|
-
} = l,
|
|
1134
|
+
} = l, F = {
|
|
1120
1135
|
...l,
|
|
1121
1136
|
page_content: {
|
|
1122
1137
|
...k,
|
|
1123
|
-
fileName:
|
|
1138
|
+
fileName: p
|
|
1124
1139
|
}
|
|
1125
|
-
},
|
|
1126
|
-
return
|
|
1140
|
+
}, W = ((De = e == null ? void 0 : e.currentPage) == null ? void 0 : De.id) === g;
|
|
1141
|
+
return st({
|
|
1127
1142
|
id: g,
|
|
1128
|
-
params:
|
|
1129
|
-
isCurEditPage:
|
|
1143
|
+
params: F,
|
|
1144
|
+
isCurEditPage: W
|
|
1130
1145
|
});
|
|
1131
|
-
},
|
|
1146
|
+
}, _e = (l) => {
|
|
1132
1147
|
const {
|
|
1133
1148
|
id: g
|
|
1134
1149
|
} = l;
|
|
1135
|
-
return
|
|
1150
|
+
return T(g, {
|
|
1136
1151
|
...l,
|
|
1137
1152
|
page_content: null
|
|
1138
1153
|
}).then(() => {
|
|
1139
|
-
|
|
1154
|
+
H({
|
|
1140
1155
|
type: "success",
|
|
1141
1156
|
message: "更新文件夹成功!"
|
|
1142
1157
|
});
|
|
1143
|
-
}).catch((
|
|
1144
|
-
|
|
1158
|
+
}).catch((p) => {
|
|
1159
|
+
H({
|
|
1145
1160
|
type: "error",
|
|
1146
1161
|
title: "更新文件夹失败",
|
|
1147
|
-
message: JSON.stringify((
|
|
1162
|
+
message: JSON.stringify((p == null ? void 0 : p.message) || p)
|
|
1148
1163
|
});
|
|
1149
1164
|
}).finally(() => {
|
|
1150
1165
|
r.updateTreeData(), r.isNew = !1;
|
|
1151
1166
|
});
|
|
1152
|
-
},
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
}).catch((
|
|
1156
|
-
|
|
1167
|
+
}, Le = (l, g) => {
|
|
1168
|
+
ue(r.currentPageData, r.currentPageDataCopy) ? (Z(), Y(), r.currentPageData.id = l.id, c(g.id, l.parentId), _(), E(l.id).then((p) => {
|
|
1169
|
+
p.parentId = g.id, p.isPage ? (p.isDefault = !1, ye(p)) : _e(p);
|
|
1170
|
+
}).catch((p) => {
|
|
1171
|
+
H({
|
|
1157
1172
|
type: "error",
|
|
1158
1173
|
title: "移动页面文件/文件夹失败",
|
|
1159
|
-
message: JSON.stringify((
|
|
1174
|
+
message: JSON.stringify((p == null ? void 0 : p.message) || p)
|
|
1160
1175
|
});
|
|
1161
1176
|
})) : n({
|
|
1162
1177
|
title: "提示",
|
|
@@ -1166,117 +1181,117 @@ const Pa = /* @__PURE__ */ ee(ua, [["render", fa], ["__scopeId", "data-v-21dedc5
|
|
|
1166
1181
|
}
|
|
1167
1182
|
});
|
|
1168
1183
|
};
|
|
1169
|
-
|
|
1184
|
+
ve().subscribe({
|
|
1170
1185
|
topic: "app_id_changed",
|
|
1171
1186
|
subscriber: "page_tree_app_id_changed",
|
|
1172
1187
|
callback: (l) => {
|
|
1173
|
-
|
|
1188
|
+
O(l);
|
|
1174
1189
|
}
|
|
1175
1190
|
});
|
|
1176
|
-
const
|
|
1191
|
+
const he = (l) => {
|
|
1177
1192
|
l.stopPropagation(), l.preventDefault(), a("add");
|
|
1178
1193
|
};
|
|
1179
|
-
return
|
|
1180
|
-
|
|
1194
|
+
return Je(() => {
|
|
1195
|
+
ve().unsubscribe({
|
|
1181
1196
|
topic: "app_id_changed",
|
|
1182
1197
|
subscriber: "page_tree_app_id_changed"
|
|
1183
1198
|
});
|
|
1184
1199
|
}), {
|
|
1185
|
-
createPublicPage:
|
|
1186
|
-
state:
|
|
1187
|
-
switchPage:
|
|
1200
|
+
createPublicPage: he,
|
|
1201
|
+
state: x,
|
|
1202
|
+
switchPage: L,
|
|
1188
1203
|
pageSettingState: r,
|
|
1189
|
-
setPopoverRef:
|
|
1204
|
+
setPopoverRef: m,
|
|
1190
1205
|
IconFolderOpened: Ut(),
|
|
1191
|
-
IconFolderClosed:
|
|
1192
|
-
getRowOperations:
|
|
1193
|
-
handleClickRow:
|
|
1194
|
-
handleMoveNode:
|
|
1195
|
-
isPageLocked:
|
|
1196
|
-
handleClickPageSettings:
|
|
1206
|
+
IconFolderClosed: Ht(),
|
|
1207
|
+
getRowOperations: ge,
|
|
1208
|
+
handleClickRow: w,
|
|
1209
|
+
handleMoveNode: Le,
|
|
1210
|
+
isPageLocked: y,
|
|
1211
|
+
handleClickPageSettings: j,
|
|
1197
1212
|
STATIC_PAGE_GROUP_ID: b
|
|
1198
1213
|
};
|
|
1199
1214
|
}
|
|
1200
|
-
},
|
|
1215
|
+
}, Ta = { class: "app-manage-search" }, ka = { class: "title" }, Fa = { class: "app-manage-tree" }, Ea = {
|
|
1201
1216
|
class: /* @__PURE__ */ Ne(["actions"])
|
|
1202
1217
|
}, Oa = { class: "operation-list" }, xa = ["onClick"];
|
|
1203
|
-
function Ga(t, a, n, e,
|
|
1204
|
-
const r =
|
|
1205
|
-
return S(), q(
|
|
1206
|
-
|
|
1207
|
-
|
|
1218
|
+
function Ga(t, a, n, e, s, o) {
|
|
1219
|
+
const r = h("tiny-icon-search"), c = h("tiny-search"), u = h("svg-button"), N = h("tiny-popover"), _ = h("draggable-tree"), b = h("tiny-collapse-item"), f = h("tiny-collapse");
|
|
1220
|
+
return S(), q(de, null, [
|
|
1221
|
+
V("div", Ta, [
|
|
1222
|
+
P(c, {
|
|
1208
1223
|
modelValue: e.state.pageSearchValue,
|
|
1209
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
1224
|
+
"onUpdate:modelValue": a[0] || (a[0] = (I) => e.state.pageSearchValue = I),
|
|
1210
1225
|
clearable: "",
|
|
1211
1226
|
placeholder: "搜索"
|
|
1212
1227
|
}, {
|
|
1213
1228
|
prefix: v(() => [
|
|
1214
|
-
|
|
1229
|
+
P(r)
|
|
1215
1230
|
]),
|
|
1216
1231
|
_: 1
|
|
1217
1232
|
}, 8, ["modelValue"])
|
|
1218
1233
|
]),
|
|
1219
|
-
f
|
|
1234
|
+
P(f, {
|
|
1220
1235
|
modelValue: e.state.collapseValue,
|
|
1221
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
1236
|
+
"onUpdate:modelValue": a[1] || (a[1] = (I) => e.state.collapseValue = I),
|
|
1222
1237
|
class: "page-manage-collapse lowcode-scrollbar"
|
|
1223
1238
|
}, {
|
|
1224
1239
|
default: v(() => [
|
|
1225
|
-
(S(!0), q(
|
|
1226
|
-
key:
|
|
1227
|
-
name:
|
|
1240
|
+
(S(!0), q(de, null, we(e.pageSettingState.pages, (I, E) => (S(), U(b, {
|
|
1241
|
+
key: E,
|
|
1242
|
+
name: I.groupId
|
|
1228
1243
|
}, {
|
|
1229
1244
|
title: v(() => [
|
|
1230
|
-
|
|
1245
|
+
V("span", ka, re(I.groupName), 1)
|
|
1231
1246
|
]),
|
|
1232
1247
|
default: v(() => [
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
data:
|
|
1248
|
+
V("div", Fa, [
|
|
1249
|
+
P(_, {
|
|
1250
|
+
data: I.data,
|
|
1236
1251
|
"label-key": "name",
|
|
1237
1252
|
active: e.state.currentNodeData.id,
|
|
1238
1253
|
"filter-value": e.state.pageSearchValue,
|
|
1239
1254
|
"root-id": e.pageSettingState.ROOT_ID,
|
|
1240
|
-
draggable:
|
|
1255
|
+
draggable: I.groupId === e.STATIC_PAGE_GROUP_ID,
|
|
1241
1256
|
onClickRow: e.handleClickRow,
|
|
1242
1257
|
onMoveNode: e.handleMoveNode
|
|
1243
1258
|
}, {
|
|
1244
|
-
"row-suffix": v(({ node:
|
|
1245
|
-
|
|
1246
|
-
e.isPageLocked(
|
|
1259
|
+
"row-suffix": v(({ node: T }) => [
|
|
1260
|
+
V("div", Ea, [
|
|
1261
|
+
e.isPageLocked(T.rawData) ? (S(), U(u, {
|
|
1247
1262
|
key: 0,
|
|
1248
1263
|
name: "locked",
|
|
1249
1264
|
hoverBgColor: !1
|
|
1250
|
-
})) :
|
|
1251
|
-
|
|
1265
|
+
})) : J("", !0),
|
|
1266
|
+
T.rawData.isHome ? (S(), U(u, {
|
|
1252
1267
|
key: 1,
|
|
1253
1268
|
name: "home",
|
|
1254
1269
|
hoverBgColor: !1
|
|
1255
|
-
})) :
|
|
1256
|
-
|
|
1270
|
+
})) : J("", !0),
|
|
1271
|
+
P(N, {
|
|
1257
1272
|
ref_for: !0,
|
|
1258
|
-
ref: (
|
|
1273
|
+
ref: (M) => e.setPopoverRef(M, T.id),
|
|
1259
1274
|
placement: "bottom-start",
|
|
1260
1275
|
"visible-arrow": !1,
|
|
1261
1276
|
"popper-class": "page-tree-row-operation-list"
|
|
1262
1277
|
}, {
|
|
1263
1278
|
reference: v(() => [
|
|
1264
|
-
|
|
1279
|
+
P(u, {
|
|
1265
1280
|
name: "ellipsis",
|
|
1266
1281
|
class: "auto-hidden",
|
|
1267
1282
|
hoverBgColor: !1
|
|
1268
1283
|
})
|
|
1269
1284
|
]),
|
|
1270
1285
|
default: v(() => [
|
|
1271
|
-
|
|
1272
|
-
(S(!0), q(
|
|
1273
|
-
key:
|
|
1274
|
-
class: Ne([
|
|
1275
|
-
onClick: (
|
|
1276
|
-
var
|
|
1277
|
-
return (
|
|
1286
|
+
V("div", Oa, [
|
|
1287
|
+
(S(!0), q(de, null, we(e.getRowOperations(I.groupId, T), (M, z) => (S(), q("div", {
|
|
1288
|
+
key: z,
|
|
1289
|
+
class: Ne([M.type === "divider" ? "divider" : "item"].concat(M.class || [])),
|
|
1290
|
+
onClick: (x) => {
|
|
1291
|
+
var d;
|
|
1292
|
+
return (d = M.action) == null ? void 0 : d.call(M, T);
|
|
1278
1293
|
}
|
|
1279
|
-
}, re(
|
|
1294
|
+
}, re(M.label), 11, xa))), 128))
|
|
1280
1295
|
])
|
|
1281
1296
|
]),
|
|
1282
1297
|
_: 2
|
|
@@ -1294,17 +1309,17 @@ function Ga(t, a, n, e, o, s) {
|
|
|
1294
1309
|
}, 8, ["modelValue"])
|
|
1295
1310
|
], 64);
|
|
1296
1311
|
}
|
|
1297
|
-
const Va = /* @__PURE__ */
|
|
1312
|
+
const Va = /* @__PURE__ */ te(Ia, [["render", Ga], ["__scopeId", "data-v-5edd59b7"]]), Ra = {
|
|
1298
1313
|
getPageById: async (t) => {
|
|
1299
1314
|
if (t)
|
|
1300
1315
|
return Ve(t);
|
|
1301
1316
|
},
|
|
1302
|
-
openPageSettingPanel:
|
|
1317
|
+
openPageSettingPanel: Ce
|
|
1303
1318
|
}, Aa = {
|
|
1304
1319
|
components: {
|
|
1305
1320
|
PageSetting: da,
|
|
1306
|
-
PluginPanel:
|
|
1307
|
-
SvgButton:
|
|
1321
|
+
PluginPanel: Tt,
|
|
1322
|
+
SvgButton: Te,
|
|
1308
1323
|
PageFolderSetting: Pa,
|
|
1309
1324
|
PageTree: Va
|
|
1310
1325
|
},
|
|
@@ -1325,29 +1340,29 @@ const Va = /* @__PURE__ */ ee(Ia, [["render", Ga], ["__scopeId", "data-v-5edd59b
|
|
|
1325
1340
|
confirm: n
|
|
1326
1341
|
} = ce(), {
|
|
1327
1342
|
pageState: e
|
|
1328
|
-
} =
|
|
1329
|
-
pageSettingState:
|
|
1330
|
-
getDefaultPage:
|
|
1343
|
+
} = se(), {
|
|
1344
|
+
pageSettingState: s,
|
|
1345
|
+
getDefaultPage: o,
|
|
1331
1346
|
isTemporaryPage: r,
|
|
1332
1347
|
initCurrentPageData: c
|
|
1333
|
-
} =
|
|
1334
|
-
PLUGIN_NAME:
|
|
1335
|
-
} = le(), N =
|
|
1348
|
+
} = ee(), {
|
|
1349
|
+
PLUGIN_NAME: u
|
|
1350
|
+
} = le(), N = oe({
|
|
1336
1351
|
emitEvent: a
|
|
1337
1352
|
});
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1353
|
+
Ke("panelState", N);
|
|
1354
|
+
const _ = X(null), b = s.ROOT_ID, f = vt().getDocsUrl("page"), I = "在这里新增页面/文件夹,还可以对已有的页面进行生命周期管理。", E = oe({
|
|
1340
1355
|
isFolder: !1
|
|
1341
|
-
}),
|
|
1342
|
-
|
|
1356
|
+
}), T = (D, O = b) => {
|
|
1357
|
+
Y(), s.isNew = !0;
|
|
1343
1358
|
try {
|
|
1344
|
-
const
|
|
1345
|
-
if (!
|
|
1359
|
+
const L = o();
|
|
1360
|
+
if (!L)
|
|
1346
1361
|
throw new Error("Failed to get default page configuration");
|
|
1347
|
-
|
|
1348
|
-
...
|
|
1349
|
-
...
|
|
1350
|
-
parentId:
|
|
1362
|
+
s.currentPageData = {
|
|
1363
|
+
...o(),
|
|
1364
|
+
...L,
|
|
1365
|
+
parentId: O,
|
|
1351
1366
|
route: "",
|
|
1352
1367
|
name: "Untitled",
|
|
1353
1368
|
page_content: {
|
|
@@ -1355,33 +1370,33 @@ const Va = /* @__PURE__ */ ee(Ia, [["render", Ga], ["__scopeId", "data-v-5edd59b
|
|
|
1355
1370
|
},
|
|
1356
1371
|
group: D
|
|
1357
1372
|
};
|
|
1358
|
-
} catch (
|
|
1359
|
-
throw new Error(
|
|
1373
|
+
} catch (L) {
|
|
1374
|
+
throw new Error(L);
|
|
1360
1375
|
}
|
|
1361
|
-
|
|
1362
|
-
},
|
|
1363
|
-
Z(),
|
|
1376
|
+
s.currentPageDataCopy = pe(!0, {}, s.currentPageData), E.isFolder = !1, Ce();
|
|
1377
|
+
}, M = (D = b) => {
|
|
1378
|
+
Z(), s.isNew = !0, s.currentPageData = {
|
|
1364
1379
|
parentId: D,
|
|
1365
1380
|
route: "",
|
|
1366
1381
|
name: "untitled"
|
|
1367
|
-
},
|
|
1368
|
-
},
|
|
1382
|
+
}, s.currentPageDataCopy = pe(!0, {}, s.currentPageData), E.isFolder = !0, ze();
|
|
1383
|
+
}, z = (D) => {
|
|
1369
1384
|
n({
|
|
1370
1385
|
title: "提示",
|
|
1371
1386
|
type: "warning ",
|
|
1372
1387
|
message: "是否确定要将此页面设置为主页?",
|
|
1373
1388
|
exec: () => {
|
|
1374
|
-
const
|
|
1389
|
+
const O = {
|
|
1375
1390
|
...D.rawData,
|
|
1376
1391
|
isHome: !0
|
|
1377
1392
|
};
|
|
1378
|
-
|
|
1379
|
-
|
|
1393
|
+
lt(D.id, O).then(() => {
|
|
1394
|
+
s.updateTreeData(), s.isNew = !1, H({
|
|
1380
1395
|
message: "主页设置成功!",
|
|
1381
1396
|
type: "success"
|
|
1382
1397
|
});
|
|
1383
1398
|
}).catch(() => {
|
|
1384
|
-
|
|
1399
|
+
H({
|
|
1385
1400
|
message: "主页设置失败!",
|
|
1386
1401
|
type: "error"
|
|
1387
1402
|
});
|
|
@@ -1389,40 +1404,40 @@ const Va = /* @__PURE__ */ ee(Ia, [["render", Ga], ["__scopeId", "data-v-5edd59b
|
|
|
1389
1404
|
}
|
|
1390
1405
|
});
|
|
1391
1406
|
};
|
|
1392
|
-
|
|
1393
|
-
r.saved &&
|
|
1407
|
+
Ie(() => {
|
|
1408
|
+
r.saved && Ce();
|
|
1394
1409
|
});
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1399
|
-
const
|
|
1400
|
-
c(
|
|
1410
|
+
const x = async (D) => {
|
|
1411
|
+
E.isFolder = !D.isPage, s.isNew = !1;
|
|
1412
|
+
const O = D.id !== s.currentPageData.id;
|
|
1413
|
+
E.isFolder ? (O && Z(), ze()) : (O && Y(), Ce());
|
|
1414
|
+
const L = await Ve(D == null ? void 0 : D.id);
|
|
1415
|
+
c(L);
|
|
1401
1416
|
};
|
|
1402
|
-
return
|
|
1403
|
-
PLUGIN_NAME:
|
|
1404
|
-
state:
|
|
1417
|
+
return Ke("openSettingPanel", x), {
|
|
1418
|
+
PLUGIN_NAME: u,
|
|
1419
|
+
state: E,
|
|
1405
1420
|
pageState: e,
|
|
1406
1421
|
openNewPage: (D) => {
|
|
1407
|
-
|
|
1422
|
+
_.value.switchPage(D);
|
|
1408
1423
|
},
|
|
1409
|
-
pageTreeRef:
|
|
1424
|
+
pageTreeRef: _,
|
|
1410
1425
|
pluginPanelClosed: () => {
|
|
1411
|
-
a("close"), Z(),
|
|
1426
|
+
a("close"), Z(), Y();
|
|
1412
1427
|
},
|
|
1413
|
-
openSettingPanel:
|
|
1414
|
-
createNewFolder:
|
|
1415
|
-
createNewPage:
|
|
1416
|
-
docsUrl:
|
|
1417
|
-
docsContent:
|
|
1418
|
-
settingHome:
|
|
1428
|
+
openSettingPanel: x,
|
|
1429
|
+
createNewFolder: M,
|
|
1430
|
+
createNewPage: T,
|
|
1431
|
+
docsUrl: f,
|
|
1432
|
+
docsContent: I,
|
|
1433
|
+
settingHome: z
|
|
1419
1434
|
};
|
|
1420
1435
|
}
|
|
1421
1436
|
}, Ba = { class: "plugin-page" };
|
|
1422
|
-
function Ma(t, a, n, e,
|
|
1423
|
-
const r =
|
|
1437
|
+
function Ma(t, a, n, e, s, o) {
|
|
1438
|
+
const r = h("svg-button"), c = h("page-tree"), u = h("plugin-panel"), N = h("page-setting"), _ = h("page-folder-setting");
|
|
1424
1439
|
return S(), q("div", Ba, [
|
|
1425
|
-
|
|
1440
|
+
P(u, {
|
|
1426
1441
|
title: n.title,
|
|
1427
1442
|
"fixed-name": e.PLUGIN_NAME.AppManage,
|
|
1428
1443
|
fixedPanels: n.fixedPanels,
|
|
@@ -1432,14 +1447,14 @@ function Ma(t, a, n, e, o, s) {
|
|
|
1432
1447
|
isShowDocsIcon: !0
|
|
1433
1448
|
}, {
|
|
1434
1449
|
header: v(() => [
|
|
1435
|
-
|
|
1450
|
+
P(r, {
|
|
1436
1451
|
class: "add-folder-icon",
|
|
1437
1452
|
name: "add-folder",
|
|
1438
1453
|
placement: "bottom",
|
|
1439
1454
|
tips: "新建文件夹",
|
|
1440
1455
|
onClick: a[0] || (a[0] = (b) => e.createNewFolder())
|
|
1441
1456
|
}),
|
|
1442
|
-
|
|
1457
|
+
P(r, {
|
|
1443
1458
|
class: "new-page-icon",
|
|
1444
1459
|
name: "new-page",
|
|
1445
1460
|
placement: "bottom",
|
|
@@ -1448,7 +1463,7 @@ function Ma(t, a, n, e, o, s) {
|
|
|
1448
1463
|
})
|
|
1449
1464
|
]),
|
|
1450
1465
|
content: v(() => [
|
|
1451
|
-
|
|
1466
|
+
P(c, {
|
|
1452
1467
|
ref: "pageTreeRef",
|
|
1453
1468
|
isFolder: e.state.isFolder,
|
|
1454
1469
|
onAdd: a[2] || (a[2] = (b) => e.createNewPage("publicPages")),
|
|
@@ -1460,16 +1475,16 @@ function Ma(t, a, n, e, o, s) {
|
|
|
1460
1475
|
]),
|
|
1461
1476
|
_: 1
|
|
1462
1477
|
}, 8, ["title", "fixed-name", "fixedPanels", "onClose", "docsUrl", "docsContent"]),
|
|
1463
|
-
|
|
1478
|
+
P(N, {
|
|
1464
1479
|
isFolder: e.state.isFolder,
|
|
1465
1480
|
onOpenNewPage: e.openNewPage
|
|
1466
1481
|
}, null, 8, ["isFolder", "onOpenNewPage"]),
|
|
1467
|
-
|
|
1482
|
+
P(_, {
|
|
1468
1483
|
isFolder: e.state.isFolder
|
|
1469
1484
|
}, null, 8, ["isFolder"])
|
|
1470
1485
|
]);
|
|
1471
1486
|
}
|
|
1472
|
-
const
|
|
1487
|
+
const La = /* @__PURE__ */ te(Aa, [["render", Ma], ["__scopeId", "data-v-06f02002"]]), { ELEMENT_TAG: Ha, COMPONENT_NAME: Ua } = Ge, Se = {
|
|
1473
1488
|
app: "",
|
|
1474
1489
|
name: "",
|
|
1475
1490
|
route: "",
|
|
@@ -1493,7 +1508,7 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1493
1508
|
parentId: "none",
|
|
1494
1509
|
isBody: !1,
|
|
1495
1510
|
group: "staticPages"
|
|
1496
|
-
}, qa =
|
|
1511
|
+
}, qa = X(null), C = oe({
|
|
1497
1512
|
currentPageDataCopy: {},
|
|
1498
1513
|
// 记录当前页最开始的状态,当用户点击取消按钮的时候恢复到初始状态
|
|
1499
1514
|
currentPageData: {},
|
|
@@ -1507,11 +1522,11 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1507
1522
|
treeDataMapping: {},
|
|
1508
1523
|
defaultPage: null
|
|
1509
1524
|
// 当前页设置的默认页
|
|
1510
|
-
}), ja =
|
|
1525
|
+
}), ja = oe({
|
|
1511
1526
|
saved: !1
|
|
1512
|
-
}), Be = 0,
|
|
1513
|
-
var
|
|
1514
|
-
if (!((
|
|
1527
|
+
}), Be = 0, it = 1, Ja = (t, a) => {
|
|
1528
|
+
var s, o;
|
|
1529
|
+
if (!((s = t == null ? void 0 : t.pageBaseStyle) != null && s.className) || !((o = t == null ? void 0 : t.pageBaseStyle) != null && o.style))
|
|
1515
1530
|
return "";
|
|
1516
1531
|
const n = (r, c) => `.${r} {
|
|
1517
1532
|
${c.trim()}
|
|
@@ -1528,87 +1543,87 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1528
1543
|
`) : e;
|
|
1529
1544
|
}, Ka = () => {
|
|
1530
1545
|
const t = Ee("engine.plugins.materials"), a = Ee("engine.plugins.appmanage");
|
|
1531
|
-
return !t || !a || !a.pageBaseStyle ? { ...
|
|
1532
|
-
...
|
|
1546
|
+
return !t || !a || !a.pageBaseStyle ? { ...Se } : {
|
|
1547
|
+
...Se,
|
|
1533
1548
|
page_content: {
|
|
1534
|
-
...
|
|
1549
|
+
...Se.page_content,
|
|
1535
1550
|
props: {
|
|
1536
|
-
...
|
|
1551
|
+
...Se.page_content.props,
|
|
1537
1552
|
className: a.pageBaseStyle.className
|
|
1538
1553
|
},
|
|
1539
1554
|
css: Ja(a, t)
|
|
1540
1555
|
}
|
|
1541
1556
|
};
|
|
1542
|
-
},
|
|
1543
|
-
const { getBaseInfo: t } = B
|
|
1557
|
+
}, gt = () => {
|
|
1558
|
+
const { getBaseInfo: t } = A(B.GlobalService);
|
|
1544
1559
|
if (C.currentPageData.id === Number.parseInt(t().pageId)) {
|
|
1545
|
-
const a =
|
|
1560
|
+
const a = se().getPageSchema();
|
|
1546
1561
|
C.currentPageData.page_content = a;
|
|
1547
1562
|
}
|
|
1548
1563
|
}, Wa = () => {
|
|
1549
|
-
|
|
1564
|
+
gt(), C.currentPageDataCopy = pe(!0, {}, C.currentPageData);
|
|
1550
1565
|
}, Xa = () => {
|
|
1551
|
-
|
|
1566
|
+
gt();
|
|
1552
1567
|
const t = C.currentPageData || {}, a = C.currentPageDataCopy || {};
|
|
1553
1568
|
let n = !0;
|
|
1554
1569
|
return Object.keys(a).some((e) => {
|
|
1555
1570
|
if (["children", "label", "createdBy", "assets", "occupier"].includes(e))
|
|
1556
1571
|
return !1;
|
|
1557
1572
|
if (e === "page_content") {
|
|
1558
|
-
const
|
|
1573
|
+
const s = {
|
|
1559
1574
|
inputs: a[e].inputs,
|
|
1560
1575
|
outputs: a[e].outputs,
|
|
1561
1576
|
lifeCycles: a[e].lifeCycles,
|
|
1562
1577
|
children: a[e].children
|
|
1563
|
-
},
|
|
1578
|
+
}, o = {
|
|
1564
1579
|
inputs: t[e].inputs,
|
|
1565
1580
|
outputs: t[e].outputs,
|
|
1566
1581
|
lifeCycles: t[e].lifeCycles,
|
|
1567
1582
|
children: t[e].children
|
|
1568
1583
|
};
|
|
1569
|
-
JSON.stringify(
|
|
1584
|
+
JSON.stringify(s) !== JSON.stringify(o) && (n = !1);
|
|
1570
1585
|
} else
|
|
1571
|
-
|
|
1586
|
+
ue(a[e], t[e]) || (n = !1);
|
|
1572
1587
|
return !n;
|
|
1573
1588
|
}), n;
|
|
1574
|
-
},
|
|
1589
|
+
}, Qe = (t) => t === C.ROOT_ID ? { id: C.ROOT_ID, children: C.pages[Be].data } : C.treeDataMapping[t], za = (t, a) => {
|
|
1575
1590
|
var n, e;
|
|
1576
1591
|
if (t && a && String(t) !== String(a)) {
|
|
1577
|
-
const
|
|
1578
|
-
if (!
|
|
1592
|
+
const s = Qe(t), o = Qe(a);
|
|
1593
|
+
if (!s || !o)
|
|
1579
1594
|
return;
|
|
1580
|
-
const r = C.currentPageData.id, c = (e = (n =
|
|
1595
|
+
const r = C.currentPageData.id, c = (e = (n = o.children) == null ? void 0 : n.findIndex) == null ? void 0 : e.call(n, ({ id: u }) => u === r);
|
|
1581
1596
|
if (c > -1) {
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1597
|
+
const u = o.children.splice(c, 1)[0];
|
|
1598
|
+
s.children || (s.children = []), s.children.unshift(u);
|
|
1584
1599
|
}
|
|
1585
1600
|
}
|
|
1586
1601
|
}, Qa = () => C.currentPageData.page_content || {}, Ya = (t) => {
|
|
1587
|
-
C.currentPageData = t, C.currentPageDataCopy =
|
|
1602
|
+
C.currentPageData = t, C.currentPageDataCopy = pe(!0, {}, t), C.oldParentId = t.parentId;
|
|
1588
1603
|
}, Za = () => {
|
|
1589
1604
|
C.currentPageData = {}, C.currentPageDataCopy = {}, C.oldParentId = null, C.defaultPage = null;
|
|
1590
|
-
}, $a = () => !
|
|
1605
|
+
}, $a = () => !ue(C.currentPageData, C.currentPageDataCopy), Ye = (t) => {
|
|
1591
1606
|
const { ROOT_ID: a } = C, n = { [a]: { id: a, parentId: "" } };
|
|
1592
1607
|
return t.forEach((e) => {
|
|
1593
1608
|
n[e.id] = e;
|
|
1594
1609
|
}), t.forEach((e) => {
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1610
|
+
const s = n[e.parentId];
|
|
1611
|
+
s && (s.children = s.children || [], s.children.push(e));
|
|
1597
1612
|
}), n;
|
|
1598
1613
|
}, ke = async (t) => {
|
|
1599
|
-
const a = await
|
|
1614
|
+
const a = await Pe.fetchPageList(t || A(B.GlobalService).getBaseInfo().id), n = { groupName: "静态页面", groupId: Be, data: [] }, e = { groupName: "公共页面", groupId: it, data: [] };
|
|
1600
1615
|
a.forEach((r) => {
|
|
1601
|
-
const c = r.name ? r : { ...r, name: r.folderName, group: "staticPages" },
|
|
1616
|
+
const c = r.name ? r : { ...r, name: r.folderName, group: "staticPages" }, u = r.meta ? {
|
|
1602
1617
|
...r,
|
|
1603
1618
|
...r.meta,
|
|
1604
1619
|
name: r.fileName,
|
|
1605
1620
|
isPage: !0,
|
|
1606
|
-
isBody: r.meta.rootElement ===
|
|
1607
|
-
} : c, { children: N, ...
|
|
1608
|
-
|
|
1621
|
+
isBody: r.meta.rootElement === Ha.Body
|
|
1622
|
+
} : c, { children: N, ..._ } = u;
|
|
1623
|
+
u.group === "staticPages" ? n.data.push(_) : e.data.push(_);
|
|
1609
1624
|
});
|
|
1610
|
-
const
|
|
1611
|
-
return C.treeDataMapping = { ...
|
|
1625
|
+
const s = Ye(n.data), o = Ye(e.data);
|
|
1626
|
+
return C.treeDataMapping = { ...s, ...o }, n.data = s[C.ROOT_ID].children || [], C.pages = [n, e], C.pages;
|
|
1612
1627
|
}, Me = (t) => {
|
|
1613
1628
|
if (t === C.ROOT_ID)
|
|
1614
1629
|
return [];
|
|
@@ -1617,60 +1632,60 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1617
1632
|
}, en = async (t, a) => {
|
|
1618
1633
|
if (C.pages.length === 0 && await ke(), !C.treeDataMapping[t])
|
|
1619
1634
|
return null;
|
|
1620
|
-
const e = Me(t).slice(1).reverse(),
|
|
1621
|
-
return e.filter(
|
|
1622
|
-
},
|
|
1635
|
+
const e = Me(t).slice(1).reverse(), s = a ? () => !0 : (o) => o.isPage;
|
|
1636
|
+
return e.filter(s).map((o) => o.id);
|
|
1637
|
+
}, dt = (t) => {
|
|
1623
1638
|
if (t.every((n) => n.isPage))
|
|
1624
1639
|
return t;
|
|
1625
1640
|
const a = t.map((n) => n.isPage ? n : (n.children || []).map((e) => ({
|
|
1626
1641
|
...e,
|
|
1627
1642
|
routePath: `${n.routePath || n.route}/${e.route}`
|
|
1628
1643
|
}))).flat();
|
|
1629
|
-
return
|
|
1644
|
+
return dt(a);
|
|
1630
1645
|
}, tn = async (t) => {
|
|
1631
1646
|
C.pages.length === 0 && await ke();
|
|
1632
1647
|
const a = C.treeDataMapping[t];
|
|
1633
|
-
return Array.isArray(a == null ? void 0 : a.children) ?
|
|
1648
|
+
return Array.isArray(a == null ? void 0 : a.children) ? dt(a.children) : [];
|
|
1634
1649
|
}, an = () => {
|
|
1635
|
-
const { pageState: t } =
|
|
1650
|
+
const { pageState: t } = se();
|
|
1636
1651
|
t.currentVm = null, t.hoverVm = null, t.properties = {}, t.pageSchema = null;
|
|
1637
|
-
},
|
|
1652
|
+
}, ut = (t, a = !1) => {
|
|
1638
1653
|
if (an(), t !== 0 && !t) {
|
|
1639
|
-
a ? B
|
|
1654
|
+
a ? A(B.GlobalService).updateParams({ pageId: "", previewId: "" }) : A(B.GlobalService).updatePageId(""), se().initData({ componentName: Ua.Page, props: {} }, {}), le().layoutState.pageStatus = {
|
|
1640
1655
|
state: "empty",
|
|
1641
1656
|
data: {}
|
|
1642
1657
|
};
|
|
1643
1658
|
return;
|
|
1644
1659
|
}
|
|
1645
|
-
return
|
|
1646
|
-
n.isPage && Ct().setBreadcrumbPage([n.name]), a ? B
|
|
1660
|
+
return Pe.fetchPageDetail(t).then((n) => {
|
|
1661
|
+
n.isPage && Ct().setBreadcrumbPage([n.name]), a ? A(B.GlobalService).updateParams({ pageId: t, previewId: "" }) : A(B.GlobalService).updatePageId(t), le().closePlugin(), le().layoutState.pageStatus = rt(n.occupier), se().initData(n.page_content, n);
|
|
1647
1662
|
}).catch(() => {
|
|
1648
|
-
|
|
1663
|
+
H({
|
|
1649
1664
|
type: "error",
|
|
1650
1665
|
message: "切换页面失败,目标页面不存在"
|
|
1651
1666
|
});
|
|
1652
1667
|
});
|
|
1653
1668
|
}, nn = (t, a = !1) => {
|
|
1654
1669
|
(() => {
|
|
1655
|
-
const { isSaved: e, isBlock:
|
|
1656
|
-
return new Promise((
|
|
1670
|
+
const { isSaved: e, isBlock: s } = se();
|
|
1671
|
+
return new Promise((o) => {
|
|
1657
1672
|
if (e()) {
|
|
1658
|
-
|
|
1673
|
+
o(!0);
|
|
1659
1674
|
return;
|
|
1660
1675
|
}
|
|
1661
1676
|
ce().confirm({
|
|
1662
1677
|
title: "提示",
|
|
1663
|
-
message: `${
|
|
1678
|
+
message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
|
|
1664
1679
|
exec: () => {
|
|
1665
|
-
|
|
1680
|
+
o(!0);
|
|
1666
1681
|
},
|
|
1667
1682
|
cancel: () => {
|
|
1668
|
-
|
|
1683
|
+
o(!1);
|
|
1669
1684
|
}
|
|
1670
1685
|
});
|
|
1671
1686
|
});
|
|
1672
1687
|
})().then((e) => {
|
|
1673
|
-
e &&
|
|
1688
|
+
e && ut(t, a);
|
|
1674
1689
|
});
|
|
1675
1690
|
}, on = (t, a) => {
|
|
1676
1691
|
const n = t.find((e) => e.id === a.id);
|
|
@@ -1678,14 +1693,14 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1678
1693
|
}, sn = async (t) => {
|
|
1679
1694
|
if (!t.page_content)
|
|
1680
1695
|
try {
|
|
1681
|
-
const a = await
|
|
1696
|
+
const a = await Pe.fetchPageDetail(t.id);
|
|
1682
1697
|
t.page_content = a.page_content;
|
|
1683
1698
|
} catch (a) {
|
|
1684
1699
|
throw t.page_content = {}, new Error(String(a));
|
|
1685
1700
|
}
|
|
1686
1701
|
}, rn = (t, a, n, e) => {
|
|
1687
|
-
var
|
|
1688
|
-
t.parentId !== e && !a.find((
|
|
1702
|
+
var s;
|
|
1703
|
+
t.parentId !== e && !a.find((o) => o.id === t.parentId) && (t.parentId = (s = a[n - 1]) != null && s.id ? a[n - 1].id : e);
|
|
1689
1704
|
}, ln = async (t) => {
|
|
1690
1705
|
const { ROOT_ID: a } = C;
|
|
1691
1706
|
t.length > 0 && await Promise.all(
|
|
@@ -1722,13 +1737,13 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1722
1737
|
isChangePageData: $a,
|
|
1723
1738
|
getPageList: ke,
|
|
1724
1739
|
getAncestors: en,
|
|
1725
|
-
switchPage:
|
|
1740
|
+
switchPage: ut,
|
|
1726
1741
|
switchPageWithConfirm: nn,
|
|
1727
1742
|
getFamily: cn,
|
|
1728
1743
|
getPageChildren: tn,
|
|
1729
1744
|
updatePageSettingAfterSave: Wa,
|
|
1730
1745
|
STATIC_PAGE_GROUP_ID: Be,
|
|
1731
|
-
COMMON_PAGE_GROUP_ID:
|
|
1746
|
+
COMMON_PAGE_GROUP_ID: it
|
|
1732
1747
|
}), dn = {
|
|
1733
1748
|
id: "engine.service.page",
|
|
1734
1749
|
type: "MetaService",
|
|
@@ -1740,7 +1755,7 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1740
1755
|
components: {
|
|
1741
1756
|
TinyForm: Vt,
|
|
1742
1757
|
TinyFormItem: Gt,
|
|
1743
|
-
TinyInput:
|
|
1758
|
+
TinyInput: ot,
|
|
1744
1759
|
TinySelect: xt,
|
|
1745
1760
|
TinyRadio: Ot
|
|
1746
1761
|
},
|
|
@@ -1760,46 +1775,46 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1760
1775
|
changeTreeData: a,
|
|
1761
1776
|
STATIC_PAGE_GROUP_ID: n,
|
|
1762
1777
|
getPageChildren: e
|
|
1763
|
-
} =
|
|
1778
|
+
} = ee(), s = t.ROOT_ID, o = $({
|
|
1764
1779
|
get() {
|
|
1765
1780
|
return String(t.currentPageData.parentId);
|
|
1766
1781
|
},
|
|
1767
|
-
set(
|
|
1768
|
-
t.currentPageData.parentId =
|
|
1782
|
+
set(d) {
|
|
1783
|
+
t.currentPageData.parentId = d;
|
|
1769
1784
|
}
|
|
1770
|
-
}), r =
|
|
1785
|
+
}), r = X(o.value), c = oe({
|
|
1771
1786
|
childPageList: [],
|
|
1772
1787
|
childPageOp: [],
|
|
1773
1788
|
defaultPageId: ""
|
|
1774
|
-
}),
|
|
1775
|
-
var
|
|
1789
|
+
}), u = async (d) => {
|
|
1790
|
+
var G;
|
|
1776
1791
|
if (t.isNew)
|
|
1777
1792
|
c.childPageList = [], c.childPageOp = [], c.defaultPageId = "";
|
|
1778
1793
|
else {
|
|
1779
|
-
c.childPageList = await e(
|
|
1780
|
-
const D = (
|
|
1781
|
-
t.defaultPage = D || null, c.defaultPageId = D ? D.id : "", c.childPageOp = c.childPageList.map((
|
|
1782
|
-
value:
|
|
1783
|
-
label:
|
|
1794
|
+
c.childPageList = await e(d);
|
|
1795
|
+
const D = (G = c.childPageList) == null ? void 0 : G.find((O) => O.isDefault);
|
|
1796
|
+
t.defaultPage = D || null, c.defaultPageId = D ? D.id : "", c.childPageOp = c.childPageList.map((O) => ({
|
|
1797
|
+
value: O.id,
|
|
1798
|
+
label: O.name,
|
|
1784
1799
|
icon: qt()
|
|
1785
1800
|
}));
|
|
1786
1801
|
}
|
|
1787
1802
|
}, N = () => {
|
|
1788
|
-
t.defaultPage = c.childPageList.find((
|
|
1803
|
+
t.defaultPage = c.childPageList.find((d) => d.id === c.defaultPageId);
|
|
1789
1804
|
};
|
|
1790
|
-
|
|
1791
|
-
var
|
|
1792
|
-
r.value = t.oldParentId,
|
|
1805
|
+
Ie(() => {
|
|
1806
|
+
var d;
|
|
1807
|
+
r.value = t.oldParentId, u((d = t.currentPageData) == null ? void 0 : d.id);
|
|
1793
1808
|
});
|
|
1794
|
-
const
|
|
1795
|
-
let
|
|
1796
|
-
for (;
|
|
1797
|
-
const D = t.treeDataMapping[
|
|
1809
|
+
const _ = $(() => {
|
|
1810
|
+
let d = t.currentPageData.route || "", G = o.value;
|
|
1811
|
+
for (; G !== s; ) {
|
|
1812
|
+
const D = t.treeDataMapping[G];
|
|
1798
1813
|
if (!D)
|
|
1799
1814
|
break;
|
|
1800
|
-
|
|
1815
|
+
d = `${D.route}/${d}`, G = D.parentId;
|
|
1801
1816
|
}
|
|
1802
|
-
return
|
|
1817
|
+
return d.startsWith("/") && (d = d.slice(1)), d;
|
|
1803
1818
|
}), b = {
|
|
1804
1819
|
name: [{
|
|
1805
1820
|
required: !0,
|
|
@@ -1816,10 +1831,10 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1816
1831
|
required: !0,
|
|
1817
1832
|
message: "请输入页面路由"
|
|
1818
1833
|
}, {
|
|
1819
|
-
pattern:
|
|
1834
|
+
pattern: We,
|
|
1820
1835
|
message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
|
|
1821
1836
|
}]
|
|
1822
|
-
},
|
|
1837
|
+
}, f = {
|
|
1823
1838
|
name: [{
|
|
1824
1839
|
required: !0,
|
|
1825
1840
|
message: "请输入页面文件夹 ID"
|
|
@@ -1835,62 +1850,62 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1835
1850
|
required: !0,
|
|
1836
1851
|
message: "请输入页面文件夹路由"
|
|
1837
1852
|
}, {
|
|
1838
|
-
pattern:
|
|
1853
|
+
pattern: We,
|
|
1839
1854
|
message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
|
|
1840
1855
|
}],
|
|
1841
1856
|
group: [{
|
|
1842
1857
|
required: !0,
|
|
1843
1858
|
message: "必须选择页面类型"
|
|
1844
1859
|
}]
|
|
1845
|
-
},
|
|
1860
|
+
}, I = (d) => {
|
|
1846
1861
|
const {
|
|
1847
|
-
id:
|
|
1862
|
+
id: G,
|
|
1848
1863
|
name: D,
|
|
1849
|
-
isPage:
|
|
1850
|
-
children:
|
|
1851
|
-
} =
|
|
1852
|
-
id: String(
|
|
1864
|
+
isPage: O,
|
|
1865
|
+
children: L
|
|
1866
|
+
} = d, Q = {
|
|
1867
|
+
id: String(G),
|
|
1853
1868
|
name: D,
|
|
1854
|
-
isPage:
|
|
1869
|
+
isPage: O
|
|
1855
1870
|
};
|
|
1856
|
-
return Array.isArray(
|
|
1857
|
-
},
|
|
1871
|
+
return Array.isArray(L) && (Q.children = L.filter((K) => K.id !== t.currentPageData.id).map((K) => I(K))), Q;
|
|
1872
|
+
}, E = (d) => d.id === s ? null : d.isPage ? P(h("SvgIcon"), {
|
|
1858
1873
|
name: "text-page-common"
|
|
1859
|
-
}, null) :
|
|
1874
|
+
}, null) : P(h("SvgIcon"), {
|
|
1860
1875
|
name: "text-page-folder"
|
|
1861
|
-
}, null),
|
|
1862
|
-
var
|
|
1863
|
-
const
|
|
1876
|
+
}, null), T = $(() => {
|
|
1877
|
+
var L;
|
|
1878
|
+
const d = ((L = t.pages[n]) == null ? void 0 : L.data) || [];
|
|
1864
1879
|
return {
|
|
1865
|
-
data:
|
|
1880
|
+
data: I({
|
|
1866
1881
|
children: [{
|
|
1867
1882
|
name: "无",
|
|
1868
|
-
id:
|
|
1869
|
-
}].concat(
|
|
1883
|
+
id: s
|
|
1884
|
+
}].concat(d)
|
|
1870
1885
|
}).children,
|
|
1871
1886
|
shrinkIcon: null,
|
|
1872
1887
|
expandIcon: null,
|
|
1873
|
-
renderContent: (
|
|
1874
|
-
node:
|
|
1875
|
-
data:
|
|
1876
|
-
}) =>
|
|
1888
|
+
renderContent: (Q, {
|
|
1889
|
+
node: K,
|
|
1890
|
+
data: i
|
|
1891
|
+
}) => P(de, null, [E(i), P("div", null, [K.label])])
|
|
1877
1892
|
};
|
|
1878
|
-
}),
|
|
1893
|
+
}), M = X(null);
|
|
1879
1894
|
return {
|
|
1880
1895
|
pageRules: b,
|
|
1881
|
-
folderRules:
|
|
1896
|
+
folderRules: f,
|
|
1882
1897
|
pageSettingState: t,
|
|
1883
|
-
pageParentId:
|
|
1884
|
-
generalForm:
|
|
1885
|
-
validGeneralForm: () => new Promise((
|
|
1886
|
-
|
|
1887
|
-
|
|
1898
|
+
pageParentId: o,
|
|
1899
|
+
generalForm: M,
|
|
1900
|
+
validGeneralForm: () => new Promise((d) => {
|
|
1901
|
+
M.value.validate((G) => {
|
|
1902
|
+
G && d(G);
|
|
1888
1903
|
});
|
|
1889
1904
|
}),
|
|
1890
|
-
treeFolderOp:
|
|
1891
|
-
currentRoute:
|
|
1892
|
-
changeParentForderId: (
|
|
1893
|
-
a(
|
|
1905
|
+
treeFolderOp: T,
|
|
1906
|
+
currentRoute: _,
|
|
1907
|
+
changeParentForderId: (d) => {
|
|
1908
|
+
a(d.id, r.value), r.value = d.id;
|
|
1894
1909
|
},
|
|
1895
1910
|
state: c,
|
|
1896
1911
|
changeDefaultPage: N
|
|
@@ -1906,10 +1921,10 @@ const Ha = /* @__PURE__ */ ee(Aa, [["render", Ma], ["__scopeId", "data-v-06f0200
|
|
|
1906
1921
|
key: 0,
|
|
1907
1922
|
class: "tip"
|
|
1908
1923
|
}, hn = { class: "tip-text-dim" }, Dn = { class: "tip-text-dim" };
|
|
1909
|
-
function Sn(t, a, n, e,
|
|
1910
|
-
const r =
|
|
1924
|
+
function Sn(t, a, n, e, s, o) {
|
|
1925
|
+
const r = h("tiny-radio"), c = h("tiny-form-item"), u = h("tiny-input"), N = h("tiny-select"), _ = h("tiny-form");
|
|
1911
1926
|
return S(), q("div", pn, [
|
|
1912
|
-
|
|
1927
|
+
P(_, {
|
|
1913
1928
|
ref: "generalForm",
|
|
1914
1929
|
model: e.pageSettingState.currentPageData,
|
|
1915
1930
|
rules: n.isFolder ? e.folderRules : e.pageRules,
|
|
@@ -1923,33 +1938,33 @@ function Sn(t, a, n, e, o, s) {
|
|
|
1923
1938
|
default: v(() => {
|
|
1924
1939
|
var b;
|
|
1925
1940
|
return [
|
|
1926
|
-
n.isFolder ?
|
|
1941
|
+
n.isFolder ? J("", !0) : (S(), U(c, {
|
|
1927
1942
|
key: 0,
|
|
1928
1943
|
prop: "group",
|
|
1929
1944
|
label: "页面类型",
|
|
1930
1945
|
class: "form-item-page-type"
|
|
1931
1946
|
}, {
|
|
1932
1947
|
default: v(() => [
|
|
1933
|
-
|
|
1948
|
+
P(r, {
|
|
1934
1949
|
modelValue: e.pageSettingState.currentPageData.group,
|
|
1935
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
1950
|
+
"onUpdate:modelValue": a[0] || (a[0] = (f) => e.pageSettingState.currentPageData.group = f),
|
|
1936
1951
|
class: "page-type-radio",
|
|
1937
1952
|
label: "staticPages"
|
|
1938
1953
|
}, {
|
|
1939
1954
|
default: v(() => a[6] || (a[6] = [
|
|
1940
|
-
|
|
1955
|
+
be(" 静态页面 ")
|
|
1941
1956
|
])),
|
|
1942
1957
|
_: 1,
|
|
1943
1958
|
__: [6]
|
|
1944
1959
|
}, 8, ["modelValue"]),
|
|
1945
|
-
|
|
1960
|
+
P(r, {
|
|
1946
1961
|
modelValue: e.pageSettingState.currentPageData.group,
|
|
1947
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
1962
|
+
"onUpdate:modelValue": a[1] || (a[1] = (f) => e.pageSettingState.currentPageData.group = f),
|
|
1948
1963
|
class: "page-type-radio",
|
|
1949
1964
|
label: "publicPages"
|
|
1950
1965
|
}, {
|
|
1951
1966
|
default: v(() => a[7] || (a[7] = [
|
|
1952
|
-
|
|
1967
|
+
be(" 公共页面 ")
|
|
1953
1968
|
])),
|
|
1954
1969
|
_: 1,
|
|
1955
1970
|
__: [7]
|
|
@@ -1957,14 +1972,14 @@ function Sn(t, a, n, e, o, s) {
|
|
|
1957
1972
|
]),
|
|
1958
1973
|
_: 1
|
|
1959
1974
|
})),
|
|
1960
|
-
|
|
1975
|
+
P(c, {
|
|
1961
1976
|
prop: "name",
|
|
1962
1977
|
label: `${n.isFolder ? "文件夹" : "页面"}名称`
|
|
1963
1978
|
}, {
|
|
1964
1979
|
default: v(() => [
|
|
1965
|
-
|
|
1980
|
+
P(u, {
|
|
1966
1981
|
modelValue: e.pageSettingState.currentPageData.name,
|
|
1967
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
1982
|
+
"onUpdate:modelValue": a[2] || (a[2] = (f) => e.pageSettingState.currentPageData.name = f),
|
|
1968
1983
|
placeholder: `请设置${n.isFolder ? "文件夹" : "页面"}名称`
|
|
1969
1984
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1970
1985
|
]),
|
|
@@ -1976,9 +1991,9 @@ function Sn(t, a, n, e, o, s) {
|
|
|
1976
1991
|
prop: "parentId"
|
|
1977
1992
|
}, {
|
|
1978
1993
|
default: v(() => [
|
|
1979
|
-
|
|
1994
|
+
P(N, {
|
|
1980
1995
|
modelValue: e.pageParentId,
|
|
1981
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
1996
|
+
"onUpdate:modelValue": a[3] || (a[3] = (f) => e.pageParentId = f),
|
|
1982
1997
|
"value-field": "id",
|
|
1983
1998
|
"render-type": "tree",
|
|
1984
1999
|
"tree-op": e.treeFolderOp,
|
|
@@ -1989,21 +2004,21 @@ function Sn(t, a, n, e, o, s) {
|
|
|
1989
2004
|
}, null, 8, ["modelValue", "tree-op", "onChange"])
|
|
1990
2005
|
]),
|
|
1991
2006
|
_: 1
|
|
1992
|
-
})) :
|
|
1993
|
-
|
|
2007
|
+
})) : J("", !0),
|
|
2008
|
+
P(c, {
|
|
1994
2009
|
label: "页面路由",
|
|
1995
2010
|
prop: "route"
|
|
1996
2011
|
}, {
|
|
1997
2012
|
default: v(() => [
|
|
1998
|
-
|
|
2013
|
+
P(u, {
|
|
1999
2014
|
modelValue: e.pageSettingState.currentPageData.route,
|
|
2000
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
2015
|
+
"onUpdate:modelValue": a[4] || (a[4] = (f) => e.pageSettingState.currentPageData.route = f),
|
|
2001
2016
|
placeholder: "请设置路由"
|
|
2002
2017
|
}, null, 8, ["modelValue"]),
|
|
2003
|
-
|
|
2018
|
+
V("div", fn, [
|
|
2004
2019
|
e.pageSettingState.currentPageData.route ? (S(), q("span", mn, [
|
|
2005
|
-
a[8] || (a[8] =
|
|
2006
|
-
|
|
2020
|
+
a[8] || (a[8] = V("span", { class: "tip-text" }, "website.com/", -1)),
|
|
2021
|
+
V("span", yn, re(e.currentRoute), 1)
|
|
2007
2022
|
])) : (S(), q("span", Pn, "路由将以website.com开头"))
|
|
2008
2023
|
])
|
|
2009
2024
|
]),
|
|
@@ -2015,35 +2030,35 @@ function Sn(t, a, n, e, o, s) {
|
|
|
2015
2030
|
prop: "isDefault"
|
|
2016
2031
|
}, {
|
|
2017
2032
|
default: v(() => {
|
|
2018
|
-
var
|
|
2033
|
+
var f, I;
|
|
2019
2034
|
return [
|
|
2020
|
-
|
|
2035
|
+
P(N, {
|
|
2021
2036
|
modelValue: e.state.defaultPageId,
|
|
2022
|
-
"onUpdate:modelValue": a[5] || (a[5] = (
|
|
2037
|
+
"onUpdate:modelValue": a[5] || (a[5] = (E) => e.state.defaultPageId = E),
|
|
2023
2038
|
options: e.state.childPageOp,
|
|
2024
2039
|
placeholder: "请选择默认跳转页",
|
|
2025
2040
|
onChange: e.changeDefaultPage
|
|
2026
2041
|
}, null, 8, ["modelValue", "options", "onChange"]),
|
|
2027
2042
|
e.state.defaultPageId ? (S(), q("div", _n, [
|
|
2028
|
-
a[9] || (a[9] =
|
|
2029
|
-
|
|
2030
|
-
a[10] || (a[10] =
|
|
2031
|
-
|
|
2032
|
-
])) :
|
|
2043
|
+
a[9] || (a[9] = V("div", { class: "tip-text" }, "访问", -1)),
|
|
2044
|
+
V("span", hn, "/" + re(e.currentRoute), 1),
|
|
2045
|
+
a[10] || (a[10] = V("div", { class: "tip-text" }, "路由,默认跳转", -1)),
|
|
2046
|
+
V("span", Dn, "/" + re(e.currentRoute) + "/" + re((I = (f = e.pageSettingState) == null ? void 0 : f.defaultPage) == null ? void 0 : I.route), 1)
|
|
2047
|
+
])) : J("", !0)
|
|
2033
2048
|
];
|
|
2034
2049
|
}),
|
|
2035
2050
|
_: 1
|
|
2036
|
-
})) :
|
|
2051
|
+
})) : J("", !0)
|
|
2037
2052
|
];
|
|
2038
2053
|
}),
|
|
2039
2054
|
_: 1
|
|
2040
2055
|
}, 8, ["model", "rules"])
|
|
2041
2056
|
]);
|
|
2042
2057
|
}
|
|
2043
|
-
const vn = /* @__PURE__ */
|
|
2044
|
-
...
|
|
2058
|
+
const vn = /* @__PURE__ */ te(un, [["render", Sn], ["__scopeId", "data-v-d39c7b28"]]), Bn = {
|
|
2059
|
+
...fe,
|
|
2045
2060
|
apis: Ra,
|
|
2046
|
-
entry:
|
|
2061
|
+
entry: La,
|
|
2047
2062
|
options: {
|
|
2048
2063
|
pageBaseStyle: {
|
|
2049
2064
|
className: "page-base-style",
|