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