提交 0bdd852a 编写于 作者: lxm1993's avatar lxm1993

feat: 插件升级

上级 a79322d7
...@@ -3,13 +3,13 @@ var N = (s, n, e) => n in s ? R(s, n, { enumerable: !0, configurable: !0, writab ...@@ -3,13 +3,13 @@ var N = (s, n, e) => n in s ? R(s, n, { enumerable: !0, configurable: !0, writab
var y = (s, n, e) => (N(s, typeof n != "symbol" ? n + "" : n, e), e); var y = (s, n, e) => (N(s, typeof n != "symbol" ? n + "" : n, e), e);
import { PluginStaticResource as U, AppFuncCommand as j } from "@ibiz-template/runtime"; import { PluginStaticResource as U, AppFuncCommand as j } from "@ibiz-template/runtime";
import { ListPortletController as D, AppMenuPortletController as E } from "@ibiz-template/controller"; import { ListPortletController as D, AppMenuPortletController as E } from "@ibiz-template/controller";
import { ListPortletModel as z, AppMenuPortletModel as B, DefectModelError as G } from "@ibiz-template/model"; import { ListPortletModel as z, AppMenuPortletModel as B } from "@ibiz-template/model";
import { useNamespace as k, useListController as O } from "@ibiz-template/vue-util"; import { useNamespace as k, useListController as O } from "@ibiz-template/vue-util";
import { defineComponent as L, ref as f, getCurrentInstance as C, onMounted as I, h as t, watch as J, onUnmounted as H } from "vue"; import { defineComponent as L, ref as f, getCurrentInstance as C, onMounted as I, h as t, watch as G, onUnmounted as J } from "vue";
import { Tooltip as w, Button as A, Icon as F } from "view-design"; import { Tooltip as P, Button as A, Icon as F } from "view-design";
import { CounterService as K } from "@ibiz-template/service"; import { CounterService as H } from "@ibiz-template/service";
const g = new U(import.meta.url); const g = new U(import.meta.url);
const Q = L({ const K = L({
name: "AppPortalListPortlet", name: "AppPortalListPortlet",
props: { props: {
modelData: { modelData: {
...@@ -52,7 +52,7 @@ const Q = L({ ...@@ -52,7 +52,7 @@ const Q = L({
on: { on: {
click: () => this.openPage(s.url) click: () => this.openPage(s.url)
} }
}, [t(w, { }, [t(P, {
attrs: { attrs: {
content: s.tip, content: s.tip,
disabled: !s.tip disabled: !s.tip
...@@ -68,9 +68,9 @@ const Q = L({ ...@@ -68,9 +68,9 @@ const Q = L({
})])]))]); })])]))]);
} }
}); });
class V { class Q {
constructor() { constructor() {
y(this, "component", Q); y(this, "component", K);
} }
async createController(n, e, p) { async createController(n, e, p) {
const l = new D( const l = new D(
...@@ -96,8 +96,8 @@ const T = L({ ...@@ -96,8 +96,8 @@ const T = L({
setup(s, { setup(s, {
emit: n emit: n
}) { }) {
var S; var M;
const e = k("func-drawer"), p = g.dir("/assets/img/placeholder.svg"), l = "\u672A\u5206\u7C7B", h = f([]), c = f([]), i = f(!1), m = (S = C()) == null ? void 0 : S.proxy, b = () => { const e = k("func-drawer"), p = g.dir("/assets/img/placeholder.svg"), l = "\u672A\u5206\u7C7B", h = f([]), c = f([]), i = f(!1), m = (M = C()) == null ? void 0 : M.proxy, b = () => {
ibiz.net.post("/appfuncs/fetchpersonfuncsetting", { ibiz.net.post("/appfuncs/fetchpersonfuncsetting", {
page: 0, page: 0,
size: 1e3, size: 1e3,
...@@ -133,7 +133,7 @@ const T = L({ ...@@ -133,7 +133,7 @@ const T = L({
}), b()); }), b());
})), i.value = !i.value; })), i.value = !i.value;
}; };
J(() => s.isShowDrawer, (o) => { G(() => s.isShowDrawer, (o) => {
o && b(); o && b();
}); });
const d = (o) => { const d = (o) => {
...@@ -149,16 +149,16 @@ const T = L({ ...@@ -149,16 +149,16 @@ const T = L({
if (o.preventDefault(), i.value && o.dataTransfer) { if (o.preventDefault(), i.value && o.dataTransfer) {
const a = Number(o.dataTransfer.getData("originIndex")); const a = Number(o.dataTransfer.getData("originIndex"));
if (a !== r) { if (a !== r) {
const u = c.value[a], P = c.value[r]; const u = c.value[a], w = c.value[r];
c.value.splice(a, 1, P), c.value.splice(r, 1, u); c.value.splice(a, 1, w), c.value.splice(r, 1, u);
} }
} }
}, M = (o, r, a, u) => { }, S = (o, r, a, u) => {
if (o.stopPropagation(), r.ispersonal = Number(!r.ispersonal), u === "remove") if (o.stopPropagation(), r.ispersonal = Number(!r.ispersonal), u === "remove")
c.value.splice(a, 1); c.value.splice(a, 1);
else if (u === "change") { else if (u === "change") {
const P = c.value.findIndex(($) => $.pssysappfuncid === r.pssysappfuncid); const w = c.value.findIndex(($) => $.pssysappfuncid === r.pssysappfuncid);
P === -1 ? c.value.push(r) : c.value.splice(P, 1); w === -1 ? c.value.push(r) : c.value.splice(w, 1);
} }
}; };
return () => t("div", { return () => t("div", {
...@@ -198,7 +198,7 @@ const T = L({ ...@@ -198,7 +198,7 @@ const T = L({
}, [t("div", { }, [t("div", {
class: [e.be("group-item", "checkbox"), e.bem("group-item", "checkbox", "remove"), i.value ? e.bem("group-item", "checkbox", "show") : ""], class: [e.be("group-item", "checkbox"), e.bem("group-item", "checkbox", "remove"), i.value ? e.bem("group-item", "checkbox", "show") : ""],
on: { on: {
click: (a) => M(a, o, r, "remove") click: (a) => S(a, o, r, "remove")
} }
}, [t(F, { }, [t(F, {
attrs: { attrs: {
...@@ -212,7 +212,7 @@ const T = L({ ...@@ -212,7 +212,7 @@ const T = L({
src: o.icon ? g.dir(`/assets/img/${o.icon}`) : p, src: o.icon ? g.dir(`/assets/img/${o.icon}`) : p,
draggable: !1 draggable: !1
} }
})]), t(w, { })]), t(P, {
attrs: { attrs: {
content: o.tip, content: o.tip,
disabled: !o.tip disabled: !o.tip
...@@ -235,7 +235,7 @@ const T = L({ ...@@ -235,7 +235,7 @@ const T = L({
}, [t("div", { }, [t("div", {
class: [e.be("group-item", "checkbox"), a.ispersonal ? e.bem("group-item", "checkbox", "selected") : "", i.value ? e.bem("group-item", "checkbox", "show") : ""], class: [e.be("group-item", "checkbox"), a.ispersonal ? e.bem("group-item", "checkbox", "selected") : "", i.value ? e.bem("group-item", "checkbox", "show") : ""],
on: { on: {
click: (u) => M(u, a, r, "change") click: (u) => S(u, a, r, "change")
} }
}, [a.ispersonal ? t(F, { }, [a.ispersonal ? t(F, {
attrs: { attrs: {
...@@ -249,7 +249,7 @@ const T = L({ ...@@ -249,7 +249,7 @@ const T = L({
src: a.icon ? g.dir(`/assets/img/${a.icon}`) : p, src: a.icon ? g.dir(`/assets/img/${a.icon}`) : p,
draggable: !1 draggable: !1
} }
})]), t(w, { })]), t(P, {
attrs: { attrs: {
content: a.tip, content: a.tip,
disabled: !a.tip disabled: !a.tip
...@@ -258,7 +258,7 @@ const T = L({ ...@@ -258,7 +258,7 @@ const T = L({
class: e.be("group-item", "text") class: e.be("group-item", "text")
}, [a.pssysappfuncname])])]))])]))])]); }, [a.pssysappfuncname])])]))])]))])]);
} }
}), W = L({ }), V = L({
name: "FuncPortalListPortlet", name: "FuncPortalListPortlet",
components: { components: {
FuncDrawer: T FuncDrawer: T
...@@ -351,7 +351,7 @@ const T = L({ ...@@ -351,7 +351,7 @@ const T = L({
attrs: { attrs: {
src: s.icon ? g.dir(`/assets/img/${s.icon}`) : this.placeholderImg src: s.icon ? g.dir(`/assets/img/${s.icon}`) : this.placeholderImg
} }
})]), t(w, { })]), t(P, {
attrs: { attrs: {
content: s.tip, content: s.tip,
disabled: !s.tip disabled: !s.tip
...@@ -368,9 +368,9 @@ const T = L({ ...@@ -368,9 +368,9 @@ const T = L({
})]); })]);
} }
}); });
class X { class W {
constructor() { constructor() {
y(this, "component", W); y(this, "component", V);
} }
async createController(n, e, p) { async createController(n, e, p) {
const l = new D( const l = new D(
...@@ -381,7 +381,7 @@ class X { ...@@ -381,7 +381,7 @@ class X {
return await l.init(), l; return await l.init(), l;
} }
} }
const Y = L({ const X = L({
name: "TodoAppMenuPortlet", name: "TodoAppMenuPortlet",
props: { props: {
modelData: { modelData: {
...@@ -402,10 +402,10 @@ const Y = L({ ...@@ -402,10 +402,10 @@ const Y = L({
if (s.modelData.appMenu) { if (s.modelData.appMenu) {
const i = s.modelData.appMenu.source.getPSAppCounterRef(); const i = s.modelData.appMenu.source.getPSAppCounterRef();
i && (I(async () => { i && (I(async () => {
p = await K.getCounterByRef(i), p.onChange((m) => { p = await H.getCounterByRef(i), p.onChange((m) => {
l.value = m; l.value = m;
}); });
}), H(() => { }), J(() => {
p == null || p.destroy(); p == null || p.destroy();
})); }));
} }
...@@ -416,10 +416,7 @@ const Y = L({ ...@@ -416,10 +416,7 @@ const Y = L({
counterData: l, counterData: l,
onClickMenuItem: async (c) => { onClickMenuItem: async (c) => {
const i = c.source.getPSAppFunc(); const i = c.source.getPSAppFunc();
if (i) i && await ibiz.commands.execute(j.TAG, i);
await ibiz.commands.execute(j.TAG, i);
else if (s.modelData.appMenu)
throw new G(s.modelData.appMenu.source, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
} }
}; };
}, },
...@@ -447,7 +444,7 @@ const Y = L({ ...@@ -447,7 +444,7 @@ const Y = L({
class: this.ns.be("item-right", "count") class: this.ns.be("item-right", "count")
}, [t("span", { }, [t("span", {
class: [(this.counterData[n.counterId] || 0) > 99 ? this.ns.be("item-right", "add") : ""] class: [(this.counterData[n.counterId] || 0) > 99 ? this.ns.be("item-right", "add") : ""]
}, [(this.counterData[n.counterId] || 0) > 99 ? 99 : this.counterData[n.counterId] || 0]), t("span", ["\u4EF6"])]), t(w, { }, [(this.counterData[n.counterId] || 0) > 99 ? 99 : this.counterData[n.counterId] || 0]), t("span", ["\u4EF6"])]), t(P, {
attrs: { attrs: {
content: n.source.tooltip, content: n.source.tooltip,
disabled: !n.source.tooltip disabled: !n.source.tooltip
...@@ -457,9 +454,9 @@ const Y = L({ ...@@ -457,9 +454,9 @@ const Y = L({
}, [n.label])])])]))]); }, [n.label])])])]))]);
} }
}); });
class Z { class Y {
constructor() { constructor() {
y(this, "component", Y); y(this, "component", X);
} }
async createController(n, e, p) { async createController(n, e, p) {
const l = new E( const l = new E(
...@@ -470,21 +467,21 @@ class Z { ...@@ -470,21 +467,21 @@ class Z {
return await l.init(), l; return await l.init(), l;
} }
} }
const ct = { const it = {
mateUrl: import.meta.url, mateUrl: import.meta.url,
install(s) { install(s) {
ibiz.register.portletPart.register( ibiz.register.portletPart.register(
"PORTLET_CUSTOM_AppPortalList", "PORTLET_CUSTOM_AppPortalList",
new V() new Q()
), ibiz.register.portletPart.register( ), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_FuncPortalList", "PORTLET_CUSTOM_FuncPortalList",
new X() new W()
), ibiz.register.portletPart.register( ), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_TodoAppMenu", "PORTLET_CUSTOM_TodoAppMenu",
new Z() new Y()
); );
} }
}; };
export { export {
ct as default it as default
}; };
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册