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