提交 014af9a9 编写于 作者: fzh's avatar fzh

feat: 暂时修改外协管理系统入口个数

上级 e6127dfe
......@@ -3,11 +3,11 @@ var _ = (s, n, e) => n in s ? q(s, n, { enumerable: !0, configurable: !0, writab
var w = (s, n, e) => (_(s, typeof n != "symbol" ? n + "" : n, e), e);
import { ListPortletController as y, AppMenuPortletController as A } from "@ibiz-template/controller";
import { ListPortletModel as F, AppMenuPortletModel as $ } from "@ibiz-template/model";
import { useNamespace as k, useListController as T } from "@ibiz-template/vue-util";
import { defineComponent as D, ref as v, getCurrentInstance as L, onMounted as C, h as t, watch as R, onUnmounted as N } from "vue";
import { useNamespace as D, useListController as T } from "@ibiz-template/vue-util";
import { defineComponent as k, ref as f, getCurrentInstance as L, onMounted as C, h as t, watch as R, onUnmounted as N } from "vue";
import { PluginStaticResource as U, AppFuncCommand as j } from "@ibiz-template/runtime";
import { CounterService as B } from "@ibiz-template/service";
const d = new U(import.meta.url), G = D({
const d = new U(import.meta.url), G = k({
name: "AppPortalListPortlet",
props: {
modelData: {
......@@ -20,15 +20,15 @@ const d = new U(import.meta.url), G = D({
}
},
setup(s) {
const n = k("app-portal-list-portlet"), e = v([]), p = Array.from({
const n = D("app-portal-list-portlet"), e = f([]), p = Array.from({
length: 4
}).map((c, i) => d.dir(`/assets/img/app-portal-list-${i}.svg`)), l = L();
if (l && s.modelData.list) {
const c = T(l.proxy, s.modelData.list, s.controller.context);
C(() => {
c.nerve.self.evt.on("mounted", async () => {
const i = await c.load(), g = i.find((f) => f.codename === "KFLPMSWebApp");
e.value = i.slice(0, 3), e.value.push(g);
const i = await c.load();
e.value = i.slice(0, 3);
});
});
}
......@@ -79,7 +79,7 @@ class J {
return await l.init(), l;
}
}
const M = D({
const M = k({
name: "FuncDrawer",
props: {
isShowDrawer: {
......@@ -94,8 +94,8 @@ const M = D({
setup(s, {
emit: n
}) {
var I;
const e = k("func-drawer"), p = d.dir("/assets/img/placeholder.svg"), l = "未分类", m = v([]), c = v([]), i = v(!1), g = (I = L()) == null ? void 0 : I.proxy, f = () => {
var S;
const e = D("func-drawer"), p = d.dir("/assets/img/placeholder.svg"), l = "未分类", h = f([]), c = f([]), i = f(!1), m = (S = L()) == null ? void 0 : S.proxy, b = () => {
ibiz.net.post("/appfuncs/fetchpersonfuncsetting", {
page: 0,
size: 1e3,
......@@ -111,7 +111,7 @@ const M = D({
r[u] ? r[u].push(o) : r[u] = [o];
}
return o.ispersonal;
}), m.value = Object.keys(r).map((o) => ({
}), h.value = Object.keys(r).map((o) => ({
name: o,
items: r[o]
}));
......@@ -125,20 +125,20 @@ const M = D({
list: c.value
})
}).then((a) => {
a.ok && (g == null || g.$Notice.success({
a.ok && (m == null || m.$Notice.success({
title: "成功",
desc: "保存成功"
}), f());
}), b());
})), i.value = !i.value;
};
R(() => s.isShowDrawer, (a) => {
a && f();
a && b();
});
const h = (a) => {
const g = (a) => {
a && ibiz.net.get(`/appfuncs/${a}/getfuncurl`).then((r) => {
r.ok && r.data && r.data.url && window.open(r.data.url);
});
}, b = (a, r) => {
}, v = (a, r) => {
var o;
i.value && ((o = a.dataTransfer) == null || o.setData("originIndex", r.toString()));
}, E = (a) => {
......@@ -151,7 +151,7 @@ const M = D({
c.value.splice(o, 1, P), c.value.splice(r, 1, u);
}
}
}, S = (a, r, o, u) => {
}, I = (a, r, o, u) => {
if (a.stopPropagation(), r.ispersonal = +!r.ispersonal, u === "remove")
c.value.splice(o, 1);
else if (u === "change") {
......@@ -185,8 +185,8 @@ const M = D({
class: [e.b("group-item"), a.pssysappfuncid ? "" : e.bm("group-item", "disabled")],
key: a.pssysappfuncid,
on: {
click: () => h(a.pssysappfuncid),
dragstart: (o) => b(o, r),
click: () => g(a.pssysappfuncid),
dragstart: (o) => v(o, r),
dragover: E,
drop: (o) => z(o, r)
},
......@@ -196,7 +196,7 @@ const M = D({
}, [t("div", {
class: [e.be("group-item", "checkbox"), e.bem("group-item", "checkbox", "remove"), i.value ? e.bem("group-item", "checkbox", "show") : ""],
on: {
click: (o) => S(o, a, r, "remove")
click: (o) => I(o, a, r, "remove")
}
}, [t("i-icon", {
attrs: {
......@@ -217,7 +217,7 @@ const M = D({
}
}, [t("div", {
class: e.be("group-item", "text")
}, [a.pssysappfuncname])])]))])]), m.value.map((a, r) => t("div", {
}, [a.pssysappfuncname])])]))])]), h.value.map((a, r) => t("div", {
class: e.b("group"),
key: r
}, [t("header", {
......@@ -228,12 +228,12 @@ const M = D({
class: [e.b("group-item"), o.pssysappfuncid ? "" : e.bm("group-item", "disabled")],
key: o.pssysappfuncid,
on: {
click: () => h(o.pssysappfuncid)
click: () => g(o.pssysappfuncid)
}
}, [t("div", {
class: [e.be("group-item", "checkbox"), o.ispersonal ? e.bem("group-item", "checkbox", "selected") : "", i.value ? e.bem("group-item", "checkbox", "show") : ""],
on: {
click: (u) => S(u, o, r, "change")
click: (u) => I(u, o, r, "change")
}
}, [o.ispersonal ? t("i-icon", {
attrs: {
......@@ -256,7 +256,7 @@ const M = D({
class: e.be("group-item", "text")
}, [o.pssysappfuncname])])]))])]))])]);
}
}), K = D({
}), H = k({
name: "FuncPortalListPortlet",
components: {
FuncDrawer: M
......@@ -272,33 +272,33 @@ const M = D({
}
},
setup(s) {
const n = k("func-portal-list-portlet"), e = d.dir("/assets/img/quick-entry.svg"), p = d.dir("/assets/img/editor.svg"), l = d.dir("/assets/img/placeholder.svg"), m = v([]), c = L();
const n = D("func-portal-list-portlet"), e = d.dir("/assets/img/quick-entry.svg"), p = d.dir("/assets/img/editor.svg"), l = d.dir("/assets/img/placeholder.svg"), h = f([]), c = L();
let i = null;
c && s.modelData.list && (i = T(c.proxy, s.modelData.list, s.controller.context), C(() => {
i == null || i.nerve.self.evt.on("mounted", async () => {
if (i) {
const h = await i.load();
m.value = h;
const g = await i.load();
h.value = g;
}
});
}));
const g = (h) => {
h && ibiz.net.get(`/appfuncs/${h}/getfuncurl`).then((b) => {
b.ok && b.data && b.data.url && window.open(b.data.url);
const m = (g) => {
g && ibiz.net.get(`/appfuncs/${g}/getfuncurl`).then((v) => {
v.ok && v.data && v.data.url && window.open(v.data.url);
});
}, f = v(!1);
}, b = f(!1);
return {
ns: n,
quickEntryImg: e,
editorImg: p,
placeholderImg: l,
funcPortalList: m,
openPage: g,
isShowDrawer: f,
funcPortalList: h,
openPage: m,
isShowDrawer: b,
isShowDrawerChange: async () => {
if (f.value = !1, i) {
const h = await i.load();
m.value = h;
if (b.value = !1, i) {
const g = await i.load();
h.value = g;
}
}
};
......@@ -366,9 +366,9 @@ const M = D({
})]);
}
});
class W {
class K {
constructor() {
w(this, "component", K);
w(this, "component", H);
}
async createController(n, e, p) {
const l = new y(
......@@ -379,7 +379,7 @@ class W {
return await l.init(), l;
}
}
const H = D({
const Q = k({
name: "TodoAppMenuPortlet",
props: {
modelData: {
......@@ -392,16 +392,16 @@ const H = D({
}
},
setup(s) {
const n = k("todo-app-menu-portlet"), e = Array.from({
const n = D("todo-app-menu-portlet"), e = Array.from({
length: 5
}).map((c, i) => d.dir(`/assets/img/todo-app-menu-${i}.svg`));
let p = null;
const l = v({});
const l = f({});
if (s.modelData.appMenu) {
const i = s.modelData.appMenu.source.getPSAppCounterRef();
i && (C(async () => {
p = await B.getCounterByRef(i), p.onChange((g) => {
l.value = g;
p = await B.getCounterByRef(i), p.onChange((m) => {
l.value = m;
});
}), N(() => {
p == null || p.destroy();
......@@ -452,9 +452,9 @@ const H = D({
}, [n.label])])])]))]);
}
});
class Q {
class V {
constructor() {
w(this, "component", H);
w(this, "component", Q);
}
async createController(n, e, p) {
const l = new A(
......@@ -473,10 +473,10 @@ const ot = {
new J()
), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_FuncPortalList",
new W()
new K()
), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_TodoAppMenu",
new Q()
new V()
);
}
};
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册