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