提交 ccc1d12d 编写于 作者: chitanda's avatar chitanda

feat: 苏研相关插件升级适配新的插件模式

上级 ab65acc4
var r = Object.defineProperty; var i = Object.defineProperty;
var s = (e, i, n) => i in e ? r(e, i, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[i] = n; var n = (e, t, r) => t in e ? i(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
var t = (e, i, n) => (s(e, typeof i != "symbol" ? i + "" : i, n), n); var s = (e, t, r) => (n(e, typeof t != "symbol" ? t + "" : t, r), r);
class d { import { PluginStaticResource as o } from "@ibiz-template/runtime";
class l {
constructor() { constructor() {
t(this, "component", "IndexView"); s(this, "component", "IndexView");
} }
} }
const a = { const a = new o(import.meta.url);
const m = {
mateUrl: import.meta.url, mateUrl: import.meta.url,
install(e) { install(e) {
ibiz.register.view.register( a.loadStyle(["/style.css"]), ibiz.register.view.register(
"VIEW_CUSTOM_GsIndexCSS", "VIEW_CUSTOM_GsIndexCSS",
new d() new l()
); );
} }
}; };
export { export {
a as default m as default
}; };
!function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}System.register([],(function(e,t){"use strict";return{execute:function(){var r=n((function e(){var n,t,r;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),r="IndexView",(t="component")in(n=this)?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r}));e("default",{mateUrl:t.meta.url,install:function(e){ibiz.register.view.register("VIEW_CUSTOM_GsIndexCSS",new r)}})}}}))}(); !function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}System.register(["@ibiz-template/runtime"],(function(e,n){"use strict";var r;return{setters:[function(e){r=e.PluginStaticResource}],execute:function(){var i=t((function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r="IndexView",(n="component")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r})),a=new r(n.meta.url);e("default",{mateUrl:n.meta.url,install:function(e){a.loadStyle(["/style.css"]),ibiz.register.view.register("VIEW_CUSTOM_GsIndexCSS",new i)}})}}}))}();
var R = Object.defineProperty; var R = Object.defineProperty;
var N = (s, n, e) => n in s ? R(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e; var N = (s, n, e) => n in s ? R(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e;
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 { 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 } from "@ibiz-template/model"; import { ListPortletModel as z, AppMenuPortletModel as U } 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 G, onUnmounted as J } from "vue"; import { defineComponent as L, ref as f, getCurrentInstance as C, onMounted as I, h as t, watch as j, onUnmounted as B } from "vue";
import { Tooltip as P, Button as A, Icon as F } from "view-design"; import { Tooltip as P, Button as A, Icon as F } from "view-design";
import { PluginStaticResource as G, AppFuncCommand as J } from "@ibiz-template/runtime";
import { CounterService as H } from "@ibiz-template/service"; import { CounterService as H } from "@ibiz-template/service";
const g = new U(import.meta.url); const d = new G(import.meta.url), K = L({
const K = L({
name: "AppPortalListPortlet", name: "AppPortalListPortlet",
props: { props: {
modelData: { modelData: {
...@@ -24,7 +23,7 @@ const K = L({ ...@@ -24,7 +23,7 @@ const K = L({
setup(s) { setup(s) {
const n = k("app-portal-list-portlet"), e = f([]), p = Array.from({ const n = k("app-portal-list-portlet"), e = f([]), p = Array.from({
length: 3 length: 3
}).map((c, i) => g.dir(`/assets/img/app-portal-list-${i}.svg`)), l = C(); }).map((c, i) => d.dir(`/assets/img/app-portal-list-${i}.svg`)), l = C();
if (l && s.modelData.list) { if (l && s.modelData.list) {
const c = O(l.proxy, s.modelData.list, s.controller.context); const c = O(l.proxy, s.modelData.list, s.controller.context);
I(() => { I(() => {
...@@ -97,7 +96,7 @@ const T = L({ ...@@ -97,7 +96,7 @@ const T = L({
emit: n emit: n
}) { }) {
var M; 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 = (M = C()) == null ? void 0 : M.proxy, b = () => { const e = k("func-drawer"), p = d.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,10 +132,10 @@ const T = L({ ...@@ -133,10 +132,10 @@ const T = L({
}), b()); }), b());
})), i.value = !i.value; })), i.value = !i.value;
}; };
G(() => s.isShowDrawer, (o) => { j(() => s.isShowDrawer, (o) => {
o && b(); o && b();
}); });
const d = (o) => { const g = (o) => {
o && ibiz.net.get(`/appfuncs/${o}/getfuncurl`).then((r) => { o && ibiz.net.get(`/appfuncs/${o}/getfuncurl`).then((r) => {
r.ok && r.data && r.data.url && window.open(r.data.url); r.ok && r.data && r.data.url && window.open(r.data.url);
}); });
...@@ -187,7 +186,7 @@ const T = L({ ...@@ -187,7 +186,7 @@ const T = L({
class: [e.b("group-item"), o.pssysappfuncid ? "" : e.bm("group-item", "disabled")], class: [e.b("group-item"), o.pssysappfuncid ? "" : e.bm("group-item", "disabled")],
key: o.pssysappfuncid, key: o.pssysappfuncid,
on: { on: {
click: () => d(o.pssysappfuncid), click: () => g(o.pssysappfuncid),
dragstart: (a) => v(a, r), dragstart: (a) => v(a, r),
dragover: q, dragover: q,
drop: (a) => _(a, r) drop: (a) => _(a, r)
...@@ -209,7 +208,7 @@ const T = L({ ...@@ -209,7 +208,7 @@ const T = L({
class: e.be("group-item", "icon") class: e.be("group-item", "icon")
}, [t("img", { }, [t("img", {
attrs: { attrs: {
src: o.icon ? g.dir(`/assets/img/${o.icon}`) : p, src: o.icon ? d.dir(`/assets/img/${o.icon}`) : p,
draggable: !1 draggable: !1
} }
})]), t(P, { })]), t(P, {
...@@ -230,7 +229,7 @@ const T = L({ ...@@ -230,7 +229,7 @@ const T = L({
class: [e.b("group-item"), a.pssysappfuncid ? "" : e.bm("group-item", "disabled")], class: [e.b("group-item"), a.pssysappfuncid ? "" : e.bm("group-item", "disabled")],
key: a.pssysappfuncid, key: a.pssysappfuncid,
on: { on: {
click: () => d(a.pssysappfuncid) click: () => g(a.pssysappfuncid)
} }
}, [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") : ""],
...@@ -246,7 +245,7 @@ const T = L({ ...@@ -246,7 +245,7 @@ const T = L({
class: e.be("group-item", "icon") class: e.be("group-item", "icon")
}, [t("img", { }, [t("img", {
attrs: { attrs: {
src: a.icon ? g.dir(`/assets/img/${a.icon}`) : p, src: a.icon ? d.dir(`/assets/img/${a.icon}`) : p,
draggable: !1 draggable: !1
} }
})]), t(P, { })]), t(P, {
...@@ -274,18 +273,18 @@ const T = L({ ...@@ -274,18 +273,18 @@ const T = L({
} }
}, },
setup(s) { setup(s) {
const n = k("func-portal-list-portlet"), e = g.dir("/assets/img/quick-entry.svg"), p = g.dir("/assets/img/editor.svg"), l = g.dir("/assets/img/placeholder.svg"), h = f([]), c = C(); 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"), h = f([]), c = C();
let i = null; let i = null;
c && s.modelData.list && (i = O(c.proxy, s.modelData.list, s.controller.context), I(() => { c && s.modelData.list && (i = O(c.proxy, s.modelData.list, s.controller.context), I(() => {
i == null || i.nerve.self.evt.on("mounted", async () => { i == null || i.nerve.self.evt.on("mounted", async () => {
if (i) { if (i) {
const d = await i.load(); const g = await i.load();
h.value = d; h.value = g;
} }
}); });
})); }));
const m = (d) => { const m = (g) => {
d && ibiz.net.get(`/appfuncs/${d}/getfuncurl`).then((v) => { g && ibiz.net.get(`/appfuncs/${g}/getfuncurl`).then((v) => {
v.ok && v.data && v.data.url && window.open(v.data.url); v.ok && v.data && v.data.url && window.open(v.data.url);
}); });
}, b = f(!1); }, b = f(!1);
...@@ -299,8 +298,8 @@ const T = L({ ...@@ -299,8 +298,8 @@ const T = L({
isShowDrawer: b, isShowDrawer: b,
isShowDrawerChange: async () => { isShowDrawerChange: async () => {
if (b.value = !1, i) { if (b.value = !1, i) {
const d = await i.load(); const g = await i.load();
h.value = d; h.value = g;
} }
} }
}; };
...@@ -349,7 +348,7 @@ const T = L({ ...@@ -349,7 +348,7 @@ const T = L({
class: this.ns.be("item", "icon") class: this.ns.be("item", "icon")
}, [t("img", { }, [t("img", {
attrs: { attrs: {
src: s.icon ? g.dir(`/assets/img/${s.icon}`) : this.placeholderImg src: s.icon ? d.dir(`/assets/img/${s.icon}`) : this.placeholderImg
} }
})]), t(P, { })]), t(P, {
attrs: { attrs: {
...@@ -385,7 +384,7 @@ const X = L({ ...@@ -385,7 +384,7 @@ const X = L({
name: "TodoAppMenuPortlet", name: "TodoAppMenuPortlet",
props: { props: {
modelData: { modelData: {
type: B, type: U,
required: !0 required: !0
}, },
controller: { controller: {
...@@ -396,7 +395,7 @@ const X = L({ ...@@ -396,7 +395,7 @@ const X = L({
setup(s) { setup(s) {
const n = k("todo-app-menu-portlet"), e = Array.from({ const n = k("todo-app-menu-portlet"), e = Array.from({
length: 5 length: 5
}).map((c, i) => g.dir(`/assets/img/todo-app-menu-${i}.svg`)); }).map((c, i) => d.dir(`/assets/img/todo-app-menu-${i}.svg`));
let p = null; let p = null;
const l = f({}); const l = f({});
if (s.modelData.appMenu) { if (s.modelData.appMenu) {
...@@ -405,7 +404,7 @@ const X = L({ ...@@ -405,7 +404,7 @@ const X = L({
p = await H.getCounterByRef(i), p.onChange((m) => { p = await H.getCounterByRef(i), p.onChange((m) => {
l.value = m; l.value = m;
}); });
}), J(() => { }), B(() => {
p == null || p.destroy(); p == null || p.destroy();
})); }));
} }
...@@ -416,7 +415,7 @@ const X = L({ ...@@ -416,7 +415,7 @@ const X = L({
counterData: l, counterData: l,
onClickMenuItem: async (c) => { onClickMenuItem: async (c) => {
const i = c.source.getPSAppFunc(); const i = c.source.getPSAppFunc();
i && await ibiz.commands.execute(j.TAG, i); i && await ibiz.commands.execute(J.TAG, i);
} }
}; };
}, },
...@@ -470,7 +469,7 @@ class Y { ...@@ -470,7 +469,7 @@ class Y {
const it = { const it = {
mateUrl: import.meta.url, mateUrl: import.meta.url,
install(s) { install(s) {
ibiz.register.portletPart.register( d.loadStyle(["/style.css"]), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_AppPortalList", "PORTLET_CUSTOM_AppPortalList",
new Q() new Q()
), ibiz.register.portletPart.register( ), ibiz.register.portletPart.register(
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册