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

feat: 插件更新

上级 89dde7d7
var N = Object.defineProperty;
var _ = (e, n, s) => n in e ? N(e, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[n] = s;
var y = (e, n, s) => (_(e, typeof n != "symbol" ? n + "" : n, s), s);
import { PluginStaticResource as $, AppFuncCommand as j } from "@ibiz-template/runtime";
var $ = Object.defineProperty;
var N = (s, n, e) => n in s ? $(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);
import { PluginStaticResource as U, AppFuncCommand as j } from "@ibiz-template/runtime";
import { ListPortletController as D, AppMenuPortletController as E } from "@ibiz-template/controller";
import { ListPortletModel as F, AppMenuPortletModel as B, DefectModelError as G } from "@ibiz-template/model";
import { useNamespace as T, useListController as R } from "@ibiz-template/vue-util";
import { defineComponent as L, ref as h, getCurrentInstance as k, onMounted as C, h as t, watch as J, onUnmounted as H } from "vue";
import { Tooltip as P, Button as x, Icon as A } from "view-design";
import { ListPortletModel as z, AppMenuPortletModel as B, DefectModelError as G } from "@ibiz-template/model";
import { useNamespace as k, useListController as O } from "@ibiz-template/vue-util";
import { defineComponent as L, ref as m, getCurrentInstance as C, onMounted as I, h as t, watch as J, onUnmounted as H } from "vue";
import { Tooltip as w, Button as A, Icon as F } from "view-design";
import { CounterService as K } from "@ibiz-template/service";
const v = new $(import.meta.url);
const v = new U(import.meta.url);
const Q = L({
name: "AppPortalListPortlet",
props: {
modelData: {
type: F,
type: z,
required: !0
},
controller: {
......@@ -21,22 +21,22 @@ const Q = L({
required: !0
}
},
setup(e) {
const n = T("app-portal-list-portlet"), s = h([]), p = Array.from({
setup(s) {
const n = k("app-portal-list-portlet"), e = m([]), p = Array.from({
length: 3
}).map((c, i) => v.dir(`/assets/img/app-portal-list-${i}.svg`)), l = k();
if (l && e.modelData.list) {
const c = R(l.proxy, e.modelData.list, e.controller.context);
C(() => {
}).map((c, i) => v.dir(`/assets/img/app-portal-list-${i}.svg`)), l = C();
if (l && s.modelData.list) {
const c = O(l.proxy, s.modelData.list, s.controller.context);
I(() => {
c.nerve.self.evt.on("mounted", async () => {
const i = await c.load();
s.value = i.slice(0, 3);
e.value = i.slice(0, 3);
});
});
}
return {
ns: n,
appPortalList: s,
appPortalList: e,
appPortalImgList: p,
openPage: (c) => {
c && window.open(c);
......@@ -46,20 +46,20 @@ const Q = L({
render() {
return t("div", {
class: this.ns.b()
}, [this.appPortalList.map((e, n) => t("div", {
class: [this.ns.b("item"), e.url ? "" : this.ns.bm("item", "disabled")],
key: e.srfkey,
}, [this.appPortalList.map((s, n) => t("div", {
class: [this.ns.b("item"), s.url ? "" : this.ns.bm("item", "disabled")],
key: s.srfkey,
on: {
click: () => this.openPage(e.url)
click: () => this.openPage(s.url)
}
}, [t(P, {
}, [t(w, {
attrs: {
content: e.tip,
disabled: !e.tip
content: s.tip,
disabled: !s.tip
}
}, [t("div", {
class: this.ns.be("item", "text")
}, [e.srfmajortext])]), t("div", {
}, [s.srfmajortext])]), t("div", {
class: this.ns.be("item", "icon")
}, [t("img", {
attrs: {
......@@ -68,7 +68,20 @@ const Q = L({
})])]))]);
}
});
const O = L({
class V {
constructor() {
y(this, "component", Q);
}
async createController(n, e, p) {
const l = new D(
n,
e,
p
);
return await l.init(), l;
}
}
const T = L({
name: "FuncDrawer",
props: {
isShowDrawer: {
......@@ -80,179 +93,179 @@ const O = L({
emits: {
"on-close": () => !0
},
setup(e, {
setup(s, {
emit: n
}) {
var I;
const s = T("func-drawer"), p = v.dir("/assets/img/placeholder.svg"), l = "\u672A\u5206\u7C7B", g = h([]), c = h([]), i = h(!1), m = (I = k()) == null ? void 0 : I.proxy, b = () => {
var S;
const e = k("func-drawer"), p = v.dir("/assets/img/placeholder.svg"), l = "\u672A\u5206\u7C7B", g = m([]), c = m([]), i = m(!1), h = (S = C()) == null ? void 0 : S.proxy, b = () => {
ibiz.net.post("/appfuncs/fetchpersonfuncsetting", {
page: 0,
size: 1e3,
sort: "showorder,asc"
}).then((a) => {
if (a.ok && a.data && a.data.length) {
}).then((o) => {
if (o.ok && o.data && o.data.length) {
const r = {};
c.value = a.data.filter((o) => {
if (o.ispersonal || (o.ispersonal = 0), !o.pssystemappid)
r[l] ? r[l].push(o) : r[l] = [o];
c.value = o.data.filter((a) => {
if (a.ispersonal || (a.ispersonal = 0), !a.pssystemappid)
r[l] ? r[l].push(a) : r[l] = [a];
else {
const u = o.pssystemappname;
r[u] ? r[u].push(o) : r[u] = [o];
const u = a.pssystemappname;
r[u] ? r[u].push(a) : r[u] = [a];
}
return o.ispersonal;
}), g.value = Object.keys(r).map((o) => ({
name: o,
items: r[o]
return a.ispersonal;
}), g.value = Object.keys(r).map((a) => ({
name: a,
items: r[a]
}));
}
});
}, M = () => {
i.value && (c.value.forEach((a, r) => {
a.showorder = r;
}, x = () => {
i.value && (c.value.forEach((o, r) => {
o.showorder = r;
}), ibiz.net.post("/appfuncs/setfuncsetting", {
setting: JSON.stringify({
list: c.value
})
}).then((a) => {
a.ok && (m == null || m.$Notice.success({
}).then((o) => {
o.ok && (h == null || h.$Notice.success({
title: "\u6210\u529F",
desc: "\u4FDD\u5B58\u6210\u529F"
}), b());
})), i.value = !i.value;
};
J(() => e.isShowDrawer, (a) => {
a && b();
J(() => s.isShowDrawer, (o) => {
o && b();
});
const d = (a) => {
a && ibiz.net.get(`/appfuncs/${a}/getfuncurl`).then((r) => {
const d = (o) => {
o && ibiz.net.get(`/appfuncs/${o}/getfuncurl`).then((r) => {
r.ok && r.data && r.data.url && window.open(r.data.url);
});
}, f = (a, r) => {
var o;
i.value && ((o = a.dataTransfer) == null || o.setData("originIndex", r.toString()));
}, z = (a) => {
a.preventDefault();
}, U = (a, r) => {
if (a.preventDefault(), i.value && a.dataTransfer) {
const o = Number(a.dataTransfer.getData("originIndex"));
if (o !== r) {
const u = c.value[o], w = c.value[r];
c.value.splice(o, 1, w), c.value.splice(r, 1, u);
}
}
}, S = (a, r, o, u) => {
if (a.stopPropagation(), r.ispersonal = Number(!r.ispersonal), u === "remove")
c.value.splice(o, 1);
}, f = (o, r) => {
var a;
i.value && ((a = o.dataTransfer) == null || a.setData("originIndex", r.toString()));
}, q = (o) => {
o.preventDefault();
}, _ = (o, r) => {
if (o.preventDefault(), i.value && o.dataTransfer) {
const a = Number(o.dataTransfer.getData("originIndex"));
if (a !== r) {
const u = c.value[a], P = c.value[r];
c.value.splice(a, 1, P), c.value.splice(r, 1, u);
}
}
}, M = (o, r, a, u) => {
if (o.stopPropagation(), r.ispersonal = Number(!r.ispersonal), u === "remove")
c.value.splice(a, 1);
else if (u === "change") {
const w = c.value.findIndex((q) => q.pssysappfuncid === r.pssysappfuncid);
w === -1 ? c.value.push(r) : c.value.splice(w, 1);
const P = c.value.findIndex((R) => R.pssysappfuncid === r.pssysappfuncid);
P === -1 ? c.value.push(r) : c.value.splice(P, 1);
}
};
return () => t("div", {
class: [s.b(), e.isShowDrawer ? s.m("show") : ""]
class: [e.b(), s.isShowDrawer ? e.m("show") : ""]
}, [t("div", {
class: s.b("content")
class: e.b("content")
}, [t("div", {
class: s.b("group")
class: e.b("group")
}, [t("header", {
class: s.b("group-header")
class: e.b("group-header")
}, [t("div", {
class: s.b("group-header-left")
class: e.b("group-header-left")
}, ["\u5E38\u7528\u5E94\u7528"]), t("div", {
class: s.b("group-header-right")
}, [t(x, {
class: e.b("group-header-right")
}, [t(A, {
on: {
click: M
click: x
}
}, [i.value ? "\u4FDD\u5B58" : "\u914D\u7F6E"]), t(x, {
}, [i.value ? "\u4FDD\u5B58" : "\u914D\u7F6E"]), t(A, {
on: {
click: () => n("on-close")
}
}, ["\u8FD4\u56DE"])])]), t("main", {
class: s.b("group-content")
}, [c.value.map((a, r) => t("div", {
class: [s.b("group-item"), a.pssysappfuncid ? "" : s.bm("group-item", "disabled")],
key: a.pssysappfuncid,
class: e.b("group-content")
}, [c.value.map((o, r) => t("div", {
class: [e.b("group-item"), o.pssysappfuncid ? "" : e.bm("group-item", "disabled")],
key: o.pssysappfuncid,
on: {
click: () => d(a.pssysappfuncid),
dragstart: (o) => f(o, r),
dragover: z,
drop: (o) => U(o, r)
click: () => d(o.pssysappfuncid),
dragstart: (a) => f(a, r),
dragover: q,
drop: (a) => _(a, r)
},
attrs: {
draggable: i.value
}
}, [t("div", {
class: [s.be("group-item", "checkbox"), s.bem("group-item", "checkbox", "remove"), i.value ? s.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: {
click: (o) => S(o, a, r, "remove")
click: (a) => M(a, o, r, "remove")
}
}, [t(A, {
}, [t(F, {
attrs: {
type: "md-remove",
size: 16
}
})]), t("div", {
class: s.be("group-item", "icon")
class: e.be("group-item", "icon")
}, [t("img", {
attrs: {
src: a.icon || p,
src: o.icon || p,
draggable: !1
}
})]), t(P, {
})]), t(w, {
attrs: {
content: a.tip,
disabled: !a.tip
content: o.tip,
disabled: !o.tip
}
}, [t("div", {
class: s.be("group-item", "text")
}, [a.pssysappfuncname])])]))])]), g.value.map((a, r) => t("div", {
class: s.b("group"),
class: e.be("group-item", "text")
}, [o.pssysappfuncname])])]))])]), g.value.map((o, r) => t("div", {
class: e.b("group"),
key: r
}, [t("header", {
class: s.b("group-header")
}, [a.name]), t("main", {
class: s.b("group-content")
}, [a.items.map((o) => t("div", {
class: [s.b("group-item"), o.pssysappfuncid ? "" : s.bm("group-item", "disabled")],
key: o.pssysappfuncid,
class: e.b("group-header")
}, [o.name]), t("main", {
class: e.b("group-content")
}, [o.items.map((a) => t("div", {
class: [e.b("group-item"), a.pssysappfuncid ? "" : e.bm("group-item", "disabled")],
key: a.pssysappfuncid,
on: {
click: () => d(o.pssysappfuncid)
click: () => d(a.pssysappfuncid)
}
}, [t("div", {
class: [s.be("group-item", "checkbox"), o.ispersonal ? s.bem("group-item", "checkbox", "selected") : "", i.value ? s.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: {
click: (u) => S(u, o, r, "change")
click: (u) => M(u, a, r, "change")
}
}, [o.ispersonal ? t(A, {
}, [a.ispersonal ? t(F, {
attrs: {
type: "md-checkmark",
size: 16
}
}) : null]), t("div", {
class: s.be("group-item", "icon")
class: e.be("group-item", "icon")
}, [t("img", {
attrs: {
src: o.icon || p,
src: a.icon || p,
draggable: !1
}
})]), t(P, {
})]), t(w, {
attrs: {
content: o.tip,
disabled: !o.tip
content: a.tip,
disabled: !a.tip
}
}, [t("div", {
class: s.be("group-item", "text")
}, [o.pssysappfuncname])])]))])]))])]);
class: e.be("group-item", "text")
}, [a.pssysappfuncname])])]))])]))])]);
}
}), V = L({
}), W = L({
name: "FuncPortalListPortlet",
components: {
FuncDrawer: O
FuncDrawer: T
},
props: {
modelData: {
type: F,
type: z,
required: !0
},
controller: {
......@@ -260,10 +273,10 @@ const O = L({
required: !0
}
},
setup(e) {
const n = T("func-portal-list-portlet"), s = v.dir("/assets/img/quick-entry.svg"), p = v.dir("/assets/img/editor.svg"), l = v.dir("/assets/img/placeholder.svg"), g = h([]), c = k();
setup(s) {
const n = k("func-portal-list-portlet"), e = v.dir("/assets/img/quick-entry.svg"), p = v.dir("/assets/img/editor.svg"), l = v.dir("/assets/img/placeholder.svg"), g = m([]), c = C();
let i = null;
c && e.modelData.list && (i = R(c.proxy, e.modelData.list, e.controller.context), C(() => {
c && s.modelData.list && (i = O(c.proxy, s.modelData.list, s.controller.context), I(() => {
i == null || i.nerve.self.evt.on("mounted", async () => {
if (i) {
const d = await i.load();
......@@ -271,18 +284,18 @@ const O = L({
}
});
}));
const m = (d) => {
const h = (d) => {
d && ibiz.net.get(`/appfuncs/${d}/getfuncurl`).then((f) => {
f.ok && f.data && f.data.url && window.open(f.data.url);
});
}, b = h(!1);
}, b = m(!1);
return {
ns: n,
quickEntryImg: s,
quickEntryImg: e,
editorImg: p,
placeholderImg: l,
funcPortalList: g,
openPage: m,
openPage: h,
isShowDrawer: b,
isShowDrawerChange: async () => {
if (b.value = !1, i) {
......@@ -326,26 +339,26 @@ const O = L({
class: this.ns.e("divider")
}), t("main", {
class: this.ns.b("content")
}, [this.funcPortalList.map((e) => t("div", {
class: [this.ns.b("item"), e.pssysappfuncid ? "" : this.ns.bm("item", "disabled")],
key: e.pssysappfuncid,
}, [this.funcPortalList.map((s) => t("div", {
class: [this.ns.b("item"), s.pssysappfuncid ? "" : this.ns.bm("item", "disabled")],
key: s.pssysappfuncid,
on: {
click: () => this.openPage(e.pssysappfuncid)
click: () => this.openPage(s.pssysappfuncid)
}
}, [t("div", {
class: this.ns.be("item", "icon")
}, [t("img", {
attrs: {
src: e.icon || this.placeholderImg
src: s.icon || this.placeholderImg
}
})]), t(P, {
})]), t(w, {
attrs: {
content: e.tip,
disabled: !e.tip
content: s.tip,
disabled: !s.tip
}
}, [t("div", {
class: this.ns.be("item", "text")
}, [e.pssysappfuncname])])]))]), t(O, {
}, [s.pssysappfuncname])])]))]), t(T, {
attrs: {
isShowDrawer: this.isShowDrawer
},
......@@ -355,7 +368,20 @@ const O = L({
})]);
}
});
const W = L({
class X {
constructor() {
y(this, "component", W);
}
async createController(n, e, p) {
const l = new D(
n,
e,
p
);
return await l.init(), l;
}
}
const Y = L({
name: "TodoAppMenuPortlet",
props: {
modelData: {
......@@ -367,17 +393,17 @@ const W = L({
required: !0
}
},
setup(e) {
const n = T("todo-app-menu-portlet"), s = Array.from({
setup(s) {
const n = k("todo-app-menu-portlet"), e = Array.from({
length: 5
}).map((c, i) => v.dir(`/assets/img/todo-app-menu-${i}.svg`));
let p = null;
const l = h({});
if (e.modelData.appMenu) {
const i = e.modelData.appMenu.source.getPSAppCounterRef();
i && (C(async () => {
p = await K.getCounterByRef(i), p.onChange((m) => {
l.value = m;
const l = m({});
if (s.modelData.appMenu) {
const i = s.modelData.appMenu.source.getPSAppCounterRef();
i && (I(async () => {
p = await K.getCounterByRef(i), p.onChange((h) => {
l.value = h;
});
}), H(() => {
p == null || p.destroy();
......@@ -385,23 +411,23 @@ const W = L({
}
return {
ns: n,
todoImgList: s,
todoImgList: e,
counter: p,
counterData: l,
onClickMenuItem: async (c) => {
const i = c.source.getPSAppFunc();
if (i)
await ibiz.commands.execute(j.TAG, i);
else if (e.modelData.appMenu)
throw new G(e.modelData.appMenu.source, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
else if (s.modelData.appMenu)
throw new G(s.modelData.appMenu.source, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
}
};
},
render() {
var e;
var s;
return t("div", {
class: this.ns.b()
}, [(e = this.modelData.appMenu) == null ? void 0 : e.items.map((n, s) => t("div", {
}, [(s = this.modelData.appMenu) == null ? void 0 : s.items.map((n, e) => t("div", {
class: [this.ns.b("item"), n.source.getPSAppFunc() ? "" : this.ns.bm("item", "disabled")],
key: n.id,
on: {
......@@ -413,7 +439,7 @@ const W = L({
class: this.ns.be("item-left", "icon")
}, [t("img", {
attrs: {
src: this.todoImgList[s]
src: this.todoImgList[e]
}
})])]), t("div", {
class: this.ns.b("item-right")
......@@ -421,7 +447,7 @@ const W = L({
class: this.ns.be("item-right", "count")
}, [t("span", {
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(P, {
}, [(this.counterData[n.counterId] || 0) > 99 ? 99 : this.counterData[n.counterId] || 0]), t("span", ["\u4EF6"])]), t(w, {
attrs: {
content: n.source.tooltip,
disabled: !n.source.tooltip
......@@ -431,40 +457,14 @@ const W = L({
}, [n.label])])])]))]);
}
});
class X {
constructor() {
y(this, "compName", "PORTLETCUSTOMAppPortalList");
}
async createController(n, s, p) {
const l = new D(
n,
s,
p
);
return await l.init(), l;
}
}
class Y {
constructor() {
y(this, "compName", "PORTLETCUSTOMFuncPortalList");
}
async createController(n, s, p) {
const l = new D(
n,
s,
p
);
return await l.init(), l;
}
}
class Z {
constructor() {
y(this, "compName", "PORTLETCUSTOMTodoAppMenu");
y(this, "component", Y);
}
async createController(n, s, p) {
async createController(n, e, p) {
const l = new E(
n,
s,
e,
p
);
return await l.init(), l;
......@@ -472,13 +472,13 @@ class Z {
}
const ct = {
mateUrl: import.meta.url,
install(e) {
e.component("PORTLETCUSTOMAppPortalList", Q), e.component("PORTLETCUSTOMFuncPortalList", V), e.component("PORTLETCUSTOMTodoAppMenu", W), ibiz.register.portletPart.register(
install(s) {
ibiz.register.portletPart.register(
"PORTLET_CUSTOM_AppPortalList",
new X()
new V()
), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_FuncPortalList",
new Y()
new X()
), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_TodoAppMenu",
new Z()
......
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(C){l=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),s=new O(n||[]);return o(a,"_invoke",{value:L(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(C){return{type:"throw",arg:C}}}e.wrap=p;var d={};function h(){}function v(){}function m(){}var g={};l(g,s,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(E([])));b&&b!==r&&n.call(b,s)&&(g=b);var w=m.prototype=h.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(e,r){function i(o,a,s,c){var u=f(e[o],e,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==t(p)&&n.call(p,"__await")?r.resolve(p.__await).then((function(t){i("next",t,s,c)}),(function(t){i("throw",t,s,c)})):r.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,e){function n(){return new r((function(r,n){i(t,e,r,n)}))}return a=a?a.then(n,n):n()}})}function L(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return D()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=P(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function P(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function E(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:D}}function D(){return{value:void 0,done:!0}}return v.prototype=m,o(w,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=l(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},x(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),l(w,u,"Generator"),l(w,s,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=E,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function a(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function s(t){a(i,n,o,s,c,"next",t)}function c(t){a(i,n,o,s,c,"throw",t)}s(void 0)}))}}System.register(["@ibiz-template/runtime","@ibiz-template/controller","@ibiz-template/model","@ibiz-template/vue-util","vue","view-design","@ibiz-template/service"],(function(t,r){"use strict";var a,c,u,l,p,f,d,h,v,m,g,y,b,w,x,k,L,P,T,S;return{setters:[function(t){a=t.PluginStaticResource,c=t.AppFuncCommand},function(t){u=t.ListPortletController,l=t.AppMenuPortletController},function(t){p=t.ListPortletModel,f=t.AppMenuPortletModel,d=t.DefectModelError},function(t){h=t.useNamespace,v=t.useListController},function(t){m=t.defineComponent,g=t.ref,y=t.getCurrentInstance,b=t.onMounted,w=t.h,x=t.watch,k=t.onUnmounted},function(t){L=t.Tooltip,P=t.Button,T=t.Icon},function(t){S=t.CounterService}],execute:function(){var O=new a(r.meta.url),E=m({name:"AppPortalListPortlet",props:{modelData:{type:p,required:!0},controller:{type:u,required:!0}},setup:function(t){var e=h("app-portal-list-portlet"),r=g([]),n=Array.from({length:3}).map((function(t,e){return O.dir("/assets/img/app-portal-list-".concat(e,".svg"))})),o=y();if(o&&t.modelData.list){var a=v(o.proxy,t.modelData.list,t.controller.context);b((function(){a.nerve.self.evt.on("mounted",s(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.load();case 2:e=t.sent,r.value=e.slice(0,3);case 4:case"end":return t.stop()}}),t)}))))}))}return{ns:e,appPortalList:r,appPortalImgList:n,openPage:function(t){t&&window.open(t)}}},render:function(){var t=this;return w("div",{class:this.ns.b()},[this.appPortalList.map((function(e,r){return w("div",{class:[t.ns.b("item"),e.url?"":t.ns.bm("item","disabled")],key:e.srfkey,on:{click:function(){return t.openPage(e.url)}}},[w(L,{attrs:{content:e.tip,disabled:!e.tip}},[w("div",{class:t.ns.be("item","text")},[e.srfmajortext])]),w("div",{class:t.ns.be("item","icon")},[w("img",{attrs:{src:t.appPortalImgList[r]}})])])}))])}}),D=m({name:"FuncDrawer",props:{isShowDrawer:{type:Boolean,required:!0,default:!1}},emits:{"on-close":function(){return!0}},setup:function(t,e){var r,n=e.emit,o=h("func-drawer"),i=O.dir("/assets/img/placeholder.svg"),a=g([]),s=g([]),c=g(!1),u=null===(r=y())||void 0===r?void 0:r.proxy,l=function(){ibiz.net.post("/appfuncs/fetchpersonfuncsetting",{page:0,size:1e3,sort:"showorder,asc"}).then((function(t){if(t.ok&&t.data&&t.data.length){var e={};s.value=t.data.filter((function(t){if(t.ispersonal||(t.ispersonal=0),t.pssystemappid){var r=t.pssystemappname;e[r]?e[r].push(t):e[r]=[t]}else e["未分类"]?e["未分类"].push(t):e["未分类"]=[t];return t.ispersonal})),a.value=Object.keys(e).map((function(t){return{name:t,items:e[t]}}))}}))},p=function(){c.value&&(s.value.forEach((function(t,e){t.showorder=e})),ibiz.net.post("/appfuncs/setfuncsetting",{setting:JSON.stringify({list:s.value})}).then((function(t){t.ok&&(null==u||u.$Notice.success({title:"成功",desc:"保存成功"}),l())}))),c.value=!c.value};x((function(){return t.isShowDrawer}),(function(t){t&&l()}));var f=function(t){t&&ibiz.net.get("/appfuncs/".concat(t,"/getfuncurl")).then((function(t){t.ok&&t.data&&t.data.url&&window.open(t.data.url)}))},d=function(t){t.preventDefault()},v=function(t,e,r,n){if(t.stopPropagation(),e.ispersonal=Number(!e.ispersonal),"remove"===n)s.value.splice(r,1);else if("change"===n){var o=s.value.findIndex((function(t){return t.pssysappfuncid===e.pssysappfuncid}));-1===o?s.value.push(e):s.value.splice(o,1)}};return function(){return w("div",{class:[o.b(),t.isShowDrawer?o.m("show"):""]},[w("div",{class:o.b("content")},[w("div",{class:o.b("group")},[w("header",{class:o.b("group-header")},[w("div",{class:o.b("group-header-left")},["常用应用"]),w("div",{class:o.b("group-header-right")},[w(P,{on:{click:p}},[c.value?"保存":"配置"]),w(P,{on:{click:function(){return n("on-close")}}},["返回"])])]),w("main",{class:o.b("group-content")},[s.value.map((function(t,e){return w("div",{class:[o.b("group-item"),t.pssysappfuncid?"":o.bm("group-item","disabled")],key:t.pssysappfuncid,on:{click:function(){return f(t.pssysappfuncid)},dragstart:function(t){return function(t,e){var r;c.value&&(null===(r=t.dataTransfer)||void 0===r||r.setData("originIndex",e.toString()))}(t,e)},dragover:d,drop:function(t){return function(t,e){if(t.preventDefault(),c.value&&t.dataTransfer){var r=Number(t.dataTransfer.getData("originIndex"));if(r!==e){var n=s.value[r],o=s.value[e];s.value.splice(r,1,o),s.value.splice(e,1,n)}}}(t,e)}},attrs:{draggable:c.value}},[w("div",{class:[o.be("group-item","checkbox"),o.bem("group-item","checkbox","remove"),c.value?o.bem("group-item","checkbox","show"):""],on:{click:function(r){return v(r,t,e,"remove")}}},[w(T,{attrs:{type:"md-remove",size:16}})]),w("div",{class:o.be("group-item","icon")},[w("img",{attrs:{src:t.icon||i,draggable:!1}})]),w(L,{attrs:{content:t.tip,disabled:!t.tip}},[w("div",{class:o.be("group-item","text")},[t.pssysappfuncname])])])}))])]),a.value.map((function(t,e){return w("div",{class:o.b("group"),key:e},[w("header",{class:o.b("group-header")},[t.name]),w("main",{class:o.b("group-content")},[t.items.map((function(t){return w("div",{class:[o.b("group-item"),t.pssysappfuncid?"":o.bm("group-item","disabled")],key:t.pssysappfuncid,on:{click:function(){return f(t.pssysappfuncid)}}},[w("div",{class:[o.be("group-item","checkbox"),t.ispersonal?o.bem("group-item","checkbox","selected"):"",c.value?o.bem("group-item","checkbox","show"):""],on:{click:function(r){return v(r,t,e,"change")}}},[t.ispersonal?w(T,{attrs:{type:"md-checkmark",size:16}}):null]),w("div",{class:o.be("group-item","icon")},[w("img",{attrs:{src:t.icon||i,draggable:!1}})]),w(L,{attrs:{content:t.tip,disabled:!t.tip}},[w("div",{class:o.be("group-item","text")},[t.pssysappfuncname])])])}))])])}))])])}}}),C=m({name:"FuncPortalListPortlet",components:{FuncDrawer:D},props:{modelData:{type:p,required:!0},controller:{type:u,required:!0}},setup:function(t){var e=h("func-portal-list-portlet"),r=O.dir("/assets/img/quick-entry.svg"),n=O.dir("/assets/img/editor.svg"),o=O.dir("/assets/img/placeholder.svg"),a=g([]),c=y(),u=null;c&&t.modelData.list&&(u=v(c.proxy,t.modelData.list,t.controller.context),b((function(){var t;null===(t=u)||void 0===t||t.nerve.self.evt.on("mounted",s(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!u){t.next=5;break}return t.next=3,u.load();case 3:e=t.sent,a.value=e;case 5:case"end":return t.stop()}}),t)}))))})));var l=g(!1),p=function(){var t=s(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l.value=!1,!u){t.next=6;break}return t.next=4,u.load();case 4:e=t.sent,a.value=e;case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{ns:e,quickEntryImg:r,editorImg:n,placeholderImg:o,funcPortalList:a,openPage:function(t){t&&ibiz.net.get("/appfuncs/".concat(t,"/getfuncurl")).then((function(t){t.ok&&t.data&&t.data.url&&window.open(t.data.url)}))},isShowDrawer:l,isShowDrawerChange:p}},render:function(){var t=this;return w("div",{class:this.ns.b()},[w("header",{class:this.ns.b("header")},[w("div",{class:this.ns.b("header-left")},[w("div",{class:this.ns.be("header-left","icon")},[w("img",{attrs:{src:this.quickEntryImg}})]),w("div",{class:this.ns.be("header-left","text")},["快速入口"])]),w("div",{class:this.ns.b("header-right"),on:{click:function(){t.isShowDrawer=!0}}},[w("div",{class:this.ns.be("header-right","icon")},[w("img",{attrs:{src:this.editorImg}})]),w("div",{class:this.ns.be("header-right","text")},["更多"])])]),w("div",{class:this.ns.e("divider")}),w("main",{class:this.ns.b("content")},[this.funcPortalList.map((function(e){return w("div",{class:[t.ns.b("item"),e.pssysappfuncid?"":t.ns.bm("item","disabled")],key:e.pssysappfuncid,on:{click:function(){return t.openPage(e.pssysappfuncid)}}},[w("div",{class:t.ns.be("item","icon")},[w("img",{attrs:{src:e.icon||t.placeholderImg}})]),w(L,{attrs:{content:e.tip,disabled:!e.tip}},[w("div",{class:t.ns.be("item","text")},[e.pssysappfuncname])])])}))]),w(D,{attrs:{isShowDrawer:this.isShowDrawer},on:{"on-close":this.isShowDrawerChange}})])}}),M=m({name:"TodoAppMenuPortlet",props:{modelData:{type:f,required:!0},controller:{type:l,required:!0}},setup:function(t){var e=h("todo-app-menu-portlet"),r=Array.from({length:5}).map((function(t,e){return O.dir("/assets/img/todo-app-menu-".concat(e,".svg"))})),n=null,o=g({});if(t.modelData.appMenu){var a=t.modelData.appMenu.source.getPSAppCounterRef();a&&(b(s(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S.getCounterByRef(a);case 2:(n=t.sent).onChange((function(t){o.value=t}));case 4:case"end":return t.stop()}}),t)})))),k((function(){var t;null===(t=n)||void 0===t||t.destroy()})))}var u=function(){var e=s(i().mark((function e(r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.source.getPSAppFunc()){e.next=6;break}if(!t.modelData.appMenu){e.next=4;break}throw new d(t.modelData.appMenu.source,"未配置界面行为");case 4:e.next=8;break;case 6:return e.next=8,ibiz.commands.execute(c.TAG,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{ns:e,todoImgList:r,counter:n,counterData:o,onClickMenuItem:u}},render:function(){var t,e=this;return w("div",{class:this.ns.b()},[null===(t=this.modelData.appMenu)||void 0===t?void 0:t.items.map((function(t,r){return w("div",{class:[e.ns.b("item"),t.source.getPSAppFunc()?"":e.ns.bm("item","disabled")],key:t.id,on:{click:function(){return e.onClickMenuItem(t)}}},[w("div",{class:e.ns.b("item-left")},[w("div",{class:e.ns.be("item-left","icon")},[w("img",{attrs:{src:e.todoImgList[r]}})])]),w("div",{class:e.ns.b("item-right")},[w("div",{class:e.ns.be("item-right","count")},[w("span",{class:[(e.counterData[t.counterId]||0)>99?e.ns.be("item-right","add"):""]},[(e.counterData[t.counterId]||0)>99?99:e.counterData[t.counterId]||0]),w("span",["件"])]),w(L,{attrs:{content:t.source.tooltip,disabled:!t.source.tooltip}},[w("div",{class:e.ns.be("item-right","text")},[t.label])])])])}))])}}),I=function(){function t(){e(this,t),o(this,"compName","PORTLETCUSTOMAppPortalList")}var r;return n(t,[{key:"createController",value:(r=s(i().mark((function t(e,r,n){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new u(e,r,n),t.next=3,o.init();case 3:return t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,n){return r.apply(this,arguments)})}]),t}(),_=function(){function t(){e(this,t),o(this,"compName","PORTLETCUSTOMFuncPortalList")}var r;return n(t,[{key:"createController",value:(r=s(i().mark((function t(e,r,n){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new u(e,r,n),t.next=3,o.init();case 3:return t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,n){return r.apply(this,arguments)})}]),t}(),A=function(){function t(){e(this,t),o(this,"compName","PORTLETCUSTOMTodoAppMenu")}var r;return n(t,[{key:"createController",value:(r=s(i().mark((function t(e,r,n){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new l(e,r,n),t.next=3,o.init();case 3:return t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,n){return r.apply(this,arguments)})}]),t}();t("default",{mateUrl:r.meta.url,install:function(t){t.component("PORTLETCUSTOMAppPortalList",E),t.component("PORTLETCUSTOMFuncPortalList",C),t.component("PORTLETCUSTOMTodoAppMenu",M),ibiz.register.portletPart.register("PORTLET_CUSTOM_AppPortalList",new I),ibiz.register.portletPart.register("PORTLET_CUSTOM_FuncPortalList",new _),ibiz.register.portletPart.register("PORTLET_CUSTOM_TodoAppMenu",new A)}})}}}))}();
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(T){l=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),s=new E(n||[]);return o(a,"_invoke",{value:L(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(T){return{type:"throw",arg:T}}}e.wrap=p;var d={};function h(){}function v(){}function m(){}var g={};l(g,s,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(O([])));b&&b!==r&&n.call(b,s)&&(g=b);var w=m.prototype=h.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(e,r){function i(o,a,s,c){var u=f(e[o],e,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==t(p)&&n.call(p,"__await")?r.resolve(p.__await).then((function(t){i("next",t,s,c)}),(function(t){i("throw",t,s,c)})):r.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,e){function n(){return new r((function(r,n){i(t,e,r,n)}))}return a=a?a.then(n,n):n()}})}function L(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return I()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=P(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function P(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function O(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return v.prototype=m,o(w,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=l(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},x(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),l(w,u,"Generator"),l(w,s,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function a(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function s(t){a(i,n,o,s,c,"next",t)}function c(t){a(i,n,o,s,c,"throw",t)}s(void 0)}))}}System.register(["@ibiz-template/runtime","@ibiz-template/controller","@ibiz-template/model","@ibiz-template/vue-util","vue","view-design","@ibiz-template/service"],(function(t,r){"use strict";var a,c,u,l,p,f,d,h,v,m,g,y,b,w,x,k,L,P,D,S;return{setters:[function(t){a=t.PluginStaticResource,c=t.AppFuncCommand},function(t){u=t.ListPortletController,l=t.AppMenuPortletController},function(t){p=t.ListPortletModel,f=t.AppMenuPortletModel,d=t.DefectModelError},function(t){h=t.useNamespace,v=t.useListController},function(t){m=t.defineComponent,g=t.ref,y=t.getCurrentInstance,b=t.onMounted,w=t.h,x=t.watch,k=t.onUnmounted},function(t){L=t.Tooltip,P=t.Button,D=t.Icon},function(t){S=t.CounterService}],execute:function(){var E=new a(r.meta.url),O=m({name:"AppPortalListPortlet",props:{modelData:{type:p,required:!0},controller:{type:u,required:!0}},setup:function(t){var e=h("app-portal-list-portlet"),r=g([]),n=Array.from({length:3}).map((function(t,e){return E.dir("/assets/img/app-portal-list-".concat(e,".svg"))})),o=y();if(o&&t.modelData.list){var a=v(o.proxy,t.modelData.list,t.controller.context);b((function(){a.nerve.self.evt.on("mounted",s(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.load();case 2:e=t.sent,r.value=e.slice(0,3);case 4:case"end":return t.stop()}}),t)}))))}))}return{ns:e,appPortalList:r,appPortalImgList:n,openPage:function(t){t&&window.open(t)}}},render:function(){var t=this;return w("div",{class:this.ns.b()},[this.appPortalList.map((function(e,r){return w("div",{class:[t.ns.b("item"),e.url?"":t.ns.bm("item","disabled")],key:e.srfkey,on:{click:function(){return t.openPage(e.url)}}},[w(L,{attrs:{content:e.tip,disabled:!e.tip}},[w("div",{class:t.ns.be("item","text")},[e.srfmajortext])]),w("div",{class:t.ns.be("item","icon")},[w("img",{attrs:{src:t.appPortalImgList[r]}})])])}))])}}),I=function(){function t(){e(this,t),o(this,"component",O)}var r;return n(t,[{key:"createController",value:(r=s(i().mark((function t(e,r,n){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new u(e,r,n),t.next=3,o.init();case 3:return t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,n){return r.apply(this,arguments)})}]),t}(),T=m({name:"FuncDrawer",props:{isShowDrawer:{type:Boolean,required:!0,default:!1}},emits:{"on-close":function(){return!0}},setup:function(t,e){var r,n=e.emit,o=h("func-drawer"),i=E.dir("/assets/img/placeholder.svg"),a=g([]),s=g([]),c=g(!1),u=null===(r=y())||void 0===r?void 0:r.proxy,l=function(){ibiz.net.post("/appfuncs/fetchpersonfuncsetting",{page:0,size:1e3,sort:"showorder,asc"}).then((function(t){if(t.ok&&t.data&&t.data.length){var e={};s.value=t.data.filter((function(t){if(t.ispersonal||(t.ispersonal=0),t.pssystemappid){var r=t.pssystemappname;e[r]?e[r].push(t):e[r]=[t]}else e["未分类"]?e["未分类"].push(t):e["未分类"]=[t];return t.ispersonal})),a.value=Object.keys(e).map((function(t){return{name:t,items:e[t]}}))}}))},p=function(){c.value&&(s.value.forEach((function(t,e){t.showorder=e})),ibiz.net.post("/appfuncs/setfuncsetting",{setting:JSON.stringify({list:s.value})}).then((function(t){t.ok&&(null==u||u.$Notice.success({title:"成功",desc:"保存成功"}),l())}))),c.value=!c.value};x((function(){return t.isShowDrawer}),(function(t){t&&l()}));var f=function(t){t&&ibiz.net.get("/appfuncs/".concat(t,"/getfuncurl")).then((function(t){t.ok&&t.data&&t.data.url&&window.open(t.data.url)}))},d=function(t){t.preventDefault()},v=function(t,e,r,n){if(t.stopPropagation(),e.ispersonal=Number(!e.ispersonal),"remove"===n)s.value.splice(r,1);else if("change"===n){var o=s.value.findIndex((function(t){return t.pssysappfuncid===e.pssysappfuncid}));-1===o?s.value.push(e):s.value.splice(o,1)}};return function(){return w("div",{class:[o.b(),t.isShowDrawer?o.m("show"):""]},[w("div",{class:o.b("content")},[w("div",{class:o.b("group")},[w("header",{class:o.b("group-header")},[w("div",{class:o.b("group-header-left")},["常用应用"]),w("div",{class:o.b("group-header-right")},[w(P,{on:{click:p}},[c.value?"保存":"配置"]),w(P,{on:{click:function(){return n("on-close")}}},["返回"])])]),w("main",{class:o.b("group-content")},[s.value.map((function(t,e){return w("div",{class:[o.b("group-item"),t.pssysappfuncid?"":o.bm("group-item","disabled")],key:t.pssysappfuncid,on:{click:function(){return f(t.pssysappfuncid)},dragstart:function(t){return function(t,e){var r;c.value&&(null===(r=t.dataTransfer)||void 0===r||r.setData("originIndex",e.toString()))}(t,e)},dragover:d,drop:function(t){return function(t,e){if(t.preventDefault(),c.value&&t.dataTransfer){var r=Number(t.dataTransfer.getData("originIndex"));if(r!==e){var n=s.value[r],o=s.value[e];s.value.splice(r,1,o),s.value.splice(e,1,n)}}}(t,e)}},attrs:{draggable:c.value}},[w("div",{class:[o.be("group-item","checkbox"),o.bem("group-item","checkbox","remove"),c.value?o.bem("group-item","checkbox","show"):""],on:{click:function(r){return v(r,t,e,"remove")}}},[w(D,{attrs:{type:"md-remove",size:16}})]),w("div",{class:o.be("group-item","icon")},[w("img",{attrs:{src:t.icon||i,draggable:!1}})]),w(L,{attrs:{content:t.tip,disabled:!t.tip}},[w("div",{class:o.be("group-item","text")},[t.pssysappfuncname])])])}))])]),a.value.map((function(t,e){return w("div",{class:o.b("group"),key:e},[w("header",{class:o.b("group-header")},[t.name]),w("main",{class:o.b("group-content")},[t.items.map((function(t){return w("div",{class:[o.b("group-item"),t.pssysappfuncid?"":o.bm("group-item","disabled")],key:t.pssysappfuncid,on:{click:function(){return f(t.pssysappfuncid)}}},[w("div",{class:[o.be("group-item","checkbox"),t.ispersonal?o.bem("group-item","checkbox","selected"):"",c.value?o.bem("group-item","checkbox","show"):""],on:{click:function(r){return v(r,t,e,"change")}}},[t.ispersonal?w(D,{attrs:{type:"md-checkmark",size:16}}):null]),w("div",{class:o.be("group-item","icon")},[w("img",{attrs:{src:t.icon||i,draggable:!1}})]),w(L,{attrs:{content:t.tip,disabled:!t.tip}},[w("div",{class:o.be("group-item","text")},[t.pssysappfuncname])])])}))])])}))])])}}}),C=m({name:"FuncPortalListPortlet",components:{FuncDrawer:T},props:{modelData:{type:p,required:!0},controller:{type:u,required:!0}},setup:function(t){var e=h("func-portal-list-portlet"),r=E.dir("/assets/img/quick-entry.svg"),n=E.dir("/assets/img/editor.svg"),o=E.dir("/assets/img/placeholder.svg"),a=g([]),c=y(),u=null;c&&t.modelData.list&&(u=v(c.proxy,t.modelData.list,t.controller.context),b((function(){var t;null===(t=u)||void 0===t||t.nerve.self.evt.on("mounted",s(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!u){t.next=5;break}return t.next=3,u.load();case 3:e=t.sent,a.value=e;case 5:case"end":return t.stop()}}),t)}))))})));var l=g(!1),p=function(){var t=s(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l.value=!1,!u){t.next=6;break}return t.next=4,u.load();case 4:e=t.sent,a.value=e;case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{ns:e,quickEntryImg:r,editorImg:n,placeholderImg:o,funcPortalList:a,openPage:function(t){t&&ibiz.net.get("/appfuncs/".concat(t,"/getfuncurl")).then((function(t){t.ok&&t.data&&t.data.url&&window.open(t.data.url)}))},isShowDrawer:l,isShowDrawerChange:p}},render:function(){var t=this;return w("div",{class:this.ns.b()},[w("header",{class:this.ns.b("header")},[w("div",{class:this.ns.b("header-left")},[w("div",{class:this.ns.be("header-left","icon")},[w("img",{attrs:{src:this.quickEntryImg}})]),w("div",{class:this.ns.be("header-left","text")},["快速入口"])]),w("div",{class:this.ns.b("header-right"),on:{click:function(){t.isShowDrawer=!0}}},[w("div",{class:this.ns.be("header-right","icon")},[w("img",{attrs:{src:this.editorImg}})]),w("div",{class:this.ns.be("header-right","text")},["更多"])])]),w("div",{class:this.ns.e("divider")}),w("main",{class:this.ns.b("content")},[this.funcPortalList.map((function(e){return w("div",{class:[t.ns.b("item"),e.pssysappfuncid?"":t.ns.bm("item","disabled")],key:e.pssysappfuncid,on:{click:function(){return t.openPage(e.pssysappfuncid)}}},[w("div",{class:t.ns.be("item","icon")},[w("img",{attrs:{src:e.icon||t.placeholderImg}})]),w(L,{attrs:{content:e.tip,disabled:!e.tip}},[w("div",{class:t.ns.be("item","text")},[e.pssysappfuncname])])])}))]),w(T,{attrs:{isShowDrawer:this.isShowDrawer},on:{"on-close":this.isShowDrawerChange}})])}}),_=function(){function t(){e(this,t),o(this,"component",C)}var r;return n(t,[{key:"createController",value:(r=s(i().mark((function t(e,r,n){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new u(e,r,n),t.next=3,o.init();case 3:return t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,n){return r.apply(this,arguments)})}]),t}(),j=m({name:"TodoAppMenuPortlet",props:{modelData:{type:f,required:!0},controller:{type:l,required:!0}},setup:function(t){var e=h("todo-app-menu-portlet"),r=Array.from({length:5}).map((function(t,e){return E.dir("/assets/img/todo-app-menu-".concat(e,".svg"))})),n=null,o=g({});if(t.modelData.appMenu){var a=t.modelData.appMenu.source.getPSAppCounterRef();a&&(b(s(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S.getCounterByRef(a);case 2:(n=t.sent).onChange((function(t){o.value=t}));case 4:case"end":return t.stop()}}),t)})))),k((function(){var t;null===(t=n)||void 0===t||t.destroy()})))}var u=function(){var e=s(i().mark((function e(r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.source.getPSAppFunc()){e.next=6;break}if(!t.modelData.appMenu){e.next=4;break}throw new d(t.modelData.appMenu.source,"未配置界面行为");case 4:e.next=8;break;case 6:return e.next=8,ibiz.commands.execute(c.TAG,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{ns:e,todoImgList:r,counter:n,counterData:o,onClickMenuItem:u}},render:function(){var t,e=this;return w("div",{class:this.ns.b()},[null===(t=this.modelData.appMenu)||void 0===t?void 0:t.items.map((function(t,r){return w("div",{class:[e.ns.b("item"),t.source.getPSAppFunc()?"":e.ns.bm("item","disabled")],key:t.id,on:{click:function(){return e.onClickMenuItem(t)}}},[w("div",{class:e.ns.b("item-left")},[w("div",{class:e.ns.be("item-left","icon")},[w("img",{attrs:{src:e.todoImgList[r]}})])]),w("div",{class:e.ns.b("item-right")},[w("div",{class:e.ns.be("item-right","count")},[w("span",{class:[(e.counterData[t.counterId]||0)>99?e.ns.be("item-right","add"):""]},[(e.counterData[t.counterId]||0)>99?99:e.counterData[t.counterId]||0]),w("span",["件"])]),w(L,{attrs:{content:t.source.tooltip,disabled:!t.source.tooltip}},[w("div",{class:e.ns.be("item-right","text")},[t.label])])])])}))])}}),M=function(){function t(){e(this,t),o(this,"component",j)}var r;return n(t,[{key:"createController",value:(r=s(i().mark((function t(e,r,n){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new l(e,r,n),t.next=3,o.init();case 3:return t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e,n){return r.apply(this,arguments)})}]),t}();t("default",{mateUrl:r.meta.url,install:function(t){ibiz.register.portletPart.register("PORTLET_CUSTOM_AppPortalList",new I),ibiz.register.portletPart.register("PORTLET_CUSTOM_FuncPortalList",new _),ibiz.register.portletPart.register("PORTLET_CUSTOM_TodoAppMenu",new M)}})}}}))}();
@charset "UTF-8";.ibiz-app-portal-list-portlet{display:flex;align-items:center;width:100%}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item{display:flex;flex-direction:column;flex-shrink:0;justify-content:space-between;width:340px;height:200px;margin-right:14px;overflow:hidden;cursor:pointer;border-radius:10px}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item--disabled{cursor:not-allowed}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item .ivu-tooltip-arrow{border-bottom-color:#303133}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item .ivu-tooltip-inner{background-color:#303133}.ibiz-app-portal-list-portlet-item__text{flex-shrink:0;margin:36px 0 0 20px;overflow:hidden;font-family:MicrosoftYaHei-Bold,MicrosoftYaHei,sans-serif;font-size:24px;font-weight:700;line-height:31px;color:#fff;text-overflow:ellipsis;white-space:nowrap}.ibiz-app-portal-list-portlet-item__icon{margin:0 0 0 auto}.ibiz-app-portal-list-portlet-item__icon img{display:block;user-select:none}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(1){background:linear-gradient(132deg,#3e33ee 0%,#55bffc 100%)}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(1) .ibiz-app-portal-list-portlet-item__icon{margin:0 8px 8px auto}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(2){background:linear-gradient(137deg,#24c69e 0%,#29d57f 100%)}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(2) .ibiz-app-portal-list-portlet-item__icon img{object-position:0 -8px}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(3){background:linear-gradient(139deg,#ffba61 0%,#fee475 100%)}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:last-child{margin-right:0}.ibiz-func-portal-list-portlet{display:flex;flex-direction:column;width:1048px;padding:0 16px;background:#fff;border-radius:10px}.ibiz-func-portal-list-portlet__divider{height:1px;background:#d8d8d8}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;height:57px;padding:0 5px}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-header .ibiz-func-portal-list-portlet-header-left{display:flex;align-items:flex-end}.ibiz-func-portal-list-portlet-header-left__icon{width:19px;height:19px;margin-right:8px}.ibiz-func-portal-list-portlet-header-left__icon img{display:block;max-width:100%}.ibiz-func-portal-list-portlet-header-left__text{font-family:MicrosoftYaHei,sans-serif;font-size:16px;line-height:21px;color:#15233f;letter-spacing:3px}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-header .ibiz-func-portal-list-portlet-header-right{display:flex;align-items:center;cursor:pointer}.ibiz-func-portal-list-portlet-header-right__icon{width:20px;height:20px;margin-right:6px}.ibiz-func-portal-list-portlet-header-right__icon img{display:block;max-width:100%}.ibiz-func-portal-list-portlet-header-right__text{font-family:MicrosoftYaHei,sans-serif;font-size:14px;line-height:19px;color:#2d8cf0}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content{display:flex;flex-wrap:wrap;min-height:138px;padding:24px 5px 7px}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ivu-tooltip-arrow{border-bottom-color:#303133}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ivu-tooltip-inner{background-color:#303133}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ibiz-func-portal-list-portlet-item{display:flex;flex-direction:column;flex-shrink:0;align-items:center;width:96px;margin:0 34px 26px 0;cursor:pointer}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ibiz-func-portal-list-portlet-item--disabled{cursor:not-allowed}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ibiz-func-portal-list-portlet-item:nth-child(8n){margin-right:0}.ibiz-func-portal-list-portlet-item__icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;margin-bottom:8px}.ibiz-func-portal-list-portlet-item__icon:hover{background:#ecf5ff}.ibiz-func-portal-list-portlet-item__icon img{display:block;max-width:36px}.ibiz-func-portal-list-portlet-item__text{font-family:MicrosoftYaHei,sans-serif;font-size:12px;line-height:16px;color:#666;text-align:center}.ibiz-func-drawer{position:fixed;top:0;left:0;z-index:999;width:100vw;height:100vh;margin-top:-100vh;overflow:auto;background:#f5f5f5;transition:all .5s}.ibiz-func-drawer--show{margin-top:0}.ibiz-func-drawer::-webkit-scrollbar{width:6px;height:6px;background:transparent}.ibiz-func-drawer::-webkit-scrollbar-thumb{background-color:#c1c1c1;border:0;border-radius:4px;box-shadow:none}.ibiz-func-drawer::-webkit-scrollbar-track{border:0;border-radius:4px;box-shadow:none}.ibiz-func-drawer .ibiz-func-drawer-content{display:flex;flex-direction:column;align-items:center;width:1200px;padding-bottom:60px;margin:0 auto}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group{display:flex;flex-direction:column;width:100%;margin-top:24px}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-header{display:flex;align-items:center;justify-content:space-between;height:20px;padding-left:8px;margin-bottom:14px;font-size:14px;font-weight:600;line-height:28px;color:#333}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-header-right{display:flex;align-items:center}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-header-right .ivu-btn{height:28px;margin-right:12px}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-header-right .ivu-btn:last-child{margin-right:0}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content{display:flex;flex-wrap:wrap;min-height:133px;padding:24px 21px 0;background-color:#fff;border-radius:8px}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content .ivu-tooltip-arrow{border-bottom-color:#303133}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content .ivu-tooltip-inner{background-color:#303133}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content .ibiz-func-drawer-group-item{position:relative;display:flex;flex-direction:column;flex-shrink:0;align-items:center;width:96px;margin:0 34px 24px 0;cursor:pointer}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content .ibiz-func-drawer-group-item--disabled{cursor:not-allowed}.ibiz-func-drawer-group-item__checkbox{position:absolute;top:-5px;right:12px;display:none;align-items:center;justify-content:center;width:20px;height:20px;background-color:#fff;border:1px solid #dcdfe6;border-radius:50%}.ibiz-func-drawer-group-item__checkbox--show{display:flex}.ibiz-func-drawer-group-item__checkbox:hover{border-color:#409eff}.ibiz-func-drawer-group-item__checkbox--remove{color:#fff;background-color:#f44945;border:none}.ibiz-func-drawer-group-item__checkbox--selected{color:#409eff;border-color:#409eff}.ibiz-func-drawer-group-item__icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;margin-bottom:12px}.ibiz-func-drawer-group-item__icon:hover{background:#ecf5ff}.ibiz-func-drawer-group-item__icon img{display:block;max-width:36px}.ibiz-func-drawer-group-item__text{font-family:MicrosoftYaHei,sans-serif;font-size:12px;line-height:16px;color:#666;text-align:center}.ibiz-todo-app-menu-portlet{display:flex;align-items:center;width:100%}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item{display:flex;flex-shrink:0;align-items:center;width:200px;height:120px;padding:26px 24px 22px;margin-right:12px;cursor:pointer;background:#fff;border-radius:10px}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item--disabled{cursor:not-allowed}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:last-child{margin-right:0}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item .ivu-tooltip-arrow{border-bottom-color:#303133}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item .ivu-tooltip-inner{background-color:#303133}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item .ibiz-todo-app-menu-portlet-item-left{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:72px;height:100%;margin-right:16px;border-radius:4px}.ibiz-todo-app-menu-portlet-item-left__icon{width:40px;height:40px}.ibiz-todo-app-menu-portlet-item-left__icon img{display:block;max-width:100%}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item .ibiz-todo-app-menu-portlet-item-right{display:flex;flex-direction:column;flex-grow:1;flex-shrink:0;justify-content:space-between;height:100%}.ibiz-todo-app-menu-portlet-item-right__count{flex:1;margin-top:6px;font-family:MicrosoftYaHei,sans-serif;font-size:28px;line-height:37px;color:#ff4d4f;white-space:nowrap}.ibiz-todo-app-menu-portlet-item-right__add{position:relative}.ibiz-todo-app-menu-portlet-item-right__add:after{position:absolute;right:-13px;bottom:-4px;font-size:20px;content:"+"}.ibiz-todo-app-menu-portlet-item-right__count span:nth-child(2){margin-left:12px;font-size:16px;line-height:21px;color:#666}.ibiz-todo-app-menu-portlet-item-right__text{margin:2px 0 6px;font-family:MicrosoftYaHei,sans-serif;font-size:16px;line-height:21px;color:#666;white-space:nowrap}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(1) .ibiz-todo-app-menu-portlet-item-left{background:#fff3f3}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(1) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#ff4d4f}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(2) .ibiz-todo-app-menu-portlet-item-left{background:#f1ffe9}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(2) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#73d13d}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(3) .ibiz-todo-app-menu-portlet-item-left{background:#f6efff}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(3) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#9152de}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(4) .ibiz-todo-app-menu-portlet-item-left{background:#fff3f3}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(4) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#f98b15}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(5) .ibiz-todo-app-menu-portlet-item-left{background:#e9f5ff}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(5) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#40a9ff}.app{width:100vw;height:100vh}.app .ibiz-layout{position:relative;margin:auto;--ibiz-layout-width: 1280px}
@charset "UTF-8";.ibiz-app-portal-list-portlet{display:flex;align-items:center;width:100%;margin-top:16px}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item{display:flex;flex-direction:column;flex-shrink:0;justify-content:space-between;width:340px;height:200px;margin-right:14px;overflow:hidden;cursor:pointer;border-radius:10px}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item--disabled{cursor:not-allowed}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item .ivu-tooltip-arrow{border-bottom-color:#303133}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item .ivu-tooltip-inner{background-color:#303133}.ibiz-app-portal-list-portlet-item__text{flex-shrink:0;margin:36px 0 0 20px;overflow:hidden;font-family:MicrosoftYaHei-Bold,MicrosoftYaHei,sans-serif;font-size:24px;font-weight:700;line-height:31px;color:#fff;text-overflow:ellipsis;white-space:nowrap}.ibiz-app-portal-list-portlet-item__icon{margin:0 0 0 auto}.ibiz-app-portal-list-portlet-item__icon img{display:block;user-select:none}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(1){background:linear-gradient(132deg,#3e33ee 0%,#55bffc 100%)}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(1) .ibiz-app-portal-list-portlet-item__icon{margin:0 8px 8px auto}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(2){background:linear-gradient(137deg,#24c69e 0%,#29d57f 100%)}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(2) .ibiz-app-portal-list-portlet-item__icon img{object-position:0 -8px}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:nth-child(3){background:linear-gradient(139deg,#ffba61 0%,#fee475 100%)}.ibiz-app-portal-list-portlet .ibiz-app-portal-list-portlet-item:last-child{margin-right:0}.ibiz-func-portal-list-portlet{display:flex;flex-direction:column;width:1048px;padding:0 16px;background:#fff;border-radius:10px}.ibiz-func-portal-list-portlet__divider{height:1px;background:#d8d8d8}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-header{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;height:57px;padding:0 5px}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-header .ibiz-func-portal-list-portlet-header-left{display:flex;align-items:flex-end}.ibiz-func-portal-list-portlet-header-left__icon{width:19px;height:19px;margin-right:8px}.ibiz-func-portal-list-portlet-header-left__icon img{display:block;max-width:100%}.ibiz-func-portal-list-portlet-header-left__text{font-family:MicrosoftYaHei,sans-serif;font-size:16px;line-height:21px;color:#15233f;letter-spacing:3px}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-header .ibiz-func-portal-list-portlet-header-right{display:flex;align-items:center;cursor:pointer}.ibiz-func-portal-list-portlet-header-right__icon{width:20px;height:20px;margin-right:6px}.ibiz-func-portal-list-portlet-header-right__icon img{display:block;max-width:100%}.ibiz-func-portal-list-portlet-header-right__text{font-family:MicrosoftYaHei,sans-serif;font-size:14px;line-height:19px;color:#2d8cf0}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content{display:flex;flex-wrap:wrap;min-height:138px;padding:24px 5px 7px}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ivu-tooltip-arrow{border-bottom-color:#303133}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ivu-tooltip-inner{background-color:#303133}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ibiz-func-portal-list-portlet-item{display:flex;flex-direction:column;flex-shrink:0;align-items:center;width:96px;margin:0 34px 26px 0;cursor:pointer}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ibiz-func-portal-list-portlet-item--disabled{cursor:not-allowed}.ibiz-func-portal-list-portlet .ibiz-func-portal-list-portlet-content .ibiz-func-portal-list-portlet-item:nth-child(8n){margin-right:0}.ibiz-func-portal-list-portlet-item__icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;margin-bottom:8px}.ibiz-func-portal-list-portlet-item__icon:hover{background:#ecf5ff}.ibiz-func-portal-list-portlet-item__icon img{display:block;max-width:36px}.ibiz-func-portal-list-portlet-item__text{font-family:MicrosoftYaHei,sans-serif;font-size:12px;line-height:16px;color:#666;text-align:center}.ibiz-func-drawer{position:fixed;top:0;left:0;z-index:999;width:100vw;height:100vh;margin-top:-100vh;overflow:auto;background:#f5f5f5;transition:all .5s}.ibiz-func-drawer--show{margin-top:0}.ibiz-func-drawer::-webkit-scrollbar{width:6px;height:6px;background:transparent}.ibiz-func-drawer::-webkit-scrollbar-thumb{background-color:#c1c1c1;border:0;border-radius:4px;box-shadow:none}.ibiz-func-drawer::-webkit-scrollbar-track{border:0;border-radius:4px;box-shadow:none}.ibiz-func-drawer .ibiz-func-drawer-content{display:flex;flex-direction:column;align-items:center;width:1200px;padding-bottom:60px;margin:0 auto}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group{display:flex;flex-direction:column;width:100%;margin-top:24px}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-header{display:flex;align-items:center;justify-content:space-between;height:20px;padding-left:8px;margin-bottom:14px;font-size:14px;font-weight:600;line-height:28px;color:#333}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-header-right{display:flex;align-items:center}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-header-right .ivu-btn{height:28px;margin-right:12px}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-header-right .ivu-btn:last-child{margin-right:0}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content{display:flex;flex-wrap:wrap;min-height:133px;padding:24px 21px 0;background-color:#fff;border-radius:8px}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content .ivu-tooltip-arrow{border-bottom-color:#303133}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content .ivu-tooltip-inner{background-color:#303133}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content .ibiz-func-drawer-group-item{position:relative;display:flex;flex-direction:column;flex-shrink:0;align-items:center;width:96px;margin:0 34px 24px 0;cursor:pointer}.ibiz-func-drawer .ibiz-func-drawer-content .ibiz-func-drawer-group .ibiz-func-drawer-group-content .ibiz-func-drawer-group-item--disabled{cursor:not-allowed}.ibiz-func-drawer-group-item__checkbox{position:absolute;top:-5px;right:12px;display:none;align-items:center;justify-content:center;width:20px;height:20px;background-color:#fff;border:1px solid #dcdfe6;border-radius:50%}.ibiz-func-drawer-group-item__checkbox--show{display:flex}.ibiz-func-drawer-group-item__checkbox:hover{border-color:#409eff}.ibiz-func-drawer-group-item__checkbox--remove{color:#fff;background-color:#f44945;border:none}.ibiz-func-drawer-group-item__checkbox--selected{color:#409eff;border-color:#409eff}.ibiz-func-drawer-group-item__icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;margin-bottom:12px}.ibiz-func-drawer-group-item__icon:hover{background:#ecf5ff}.ibiz-func-drawer-group-item__icon img{display:block;max-width:36px}.ibiz-func-drawer-group-item__text{font-family:MicrosoftYaHei,sans-serif;font-size:12px;line-height:16px;color:#666;text-align:center}.ibiz-todo-app-menu-portlet{display:flex;align-items:center;width:100%}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item{display:flex;flex-shrink:0;align-items:center;width:200px;height:120px;padding:26px 24px 22px;margin-right:12px;cursor:pointer;background:#fff;border-radius:10px}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item--disabled{cursor:not-allowed}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:last-child{margin-right:0}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item .ivu-tooltip-arrow{border-bottom-color:#303133}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item .ivu-tooltip-inner{background-color:#303133}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item .ibiz-todo-app-menu-portlet-item-left{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:72px;height:100%;margin-right:16px;border-radius:4px}.ibiz-todo-app-menu-portlet-item-left__icon{width:40px;height:40px}.ibiz-todo-app-menu-portlet-item-left__icon img{display:block;max-width:100%}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item .ibiz-todo-app-menu-portlet-item-right{display:flex;flex-direction:column;flex-grow:1;flex-shrink:0;justify-content:space-between;height:100%}.ibiz-todo-app-menu-portlet-item-right__count{flex:1;margin-top:6px;font-family:MicrosoftYaHei,sans-serif;font-size:28px;line-height:37px;color:#ff4d4f;white-space:nowrap}.ibiz-todo-app-menu-portlet-item-right__add{position:relative}.ibiz-todo-app-menu-portlet-item-right__add:after{position:absolute;right:-13px;bottom:-4px;font-size:20px;content:"+"}.ibiz-todo-app-menu-portlet-item-right__count span:nth-child(2){margin-left:12px;font-size:16px;line-height:21px;color:#666}.ibiz-todo-app-menu-portlet-item-right__text{margin:2px 0 6px;font-family:MicrosoftYaHei,sans-serif;font-size:16px;line-height:21px;color:#666;white-space:nowrap}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(1) .ibiz-todo-app-menu-portlet-item-left{background:#fff3f3}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(1) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#ff4d4f}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(2) .ibiz-todo-app-menu-portlet-item-left{background:#f1ffe9}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(2) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#73d13d}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(3) .ibiz-todo-app-menu-portlet-item-left{background:#f6efff}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(3) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#9152de}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(4) .ibiz-todo-app-menu-portlet-item-left{background:#fff3f3}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(4) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#f98b15}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(5) .ibiz-todo-app-menu-portlet-item-left{background:#e9f5ff}.ibiz-todo-app-menu-portlet .ibiz-todo-app-menu-portlet-item:nth-child(5) .ibiz-todo-app-menu-portlet-item-right .ibiz-todo-app-menu-portlet-item-right__count{color:#40a9ff}.app{width:100vw;height:100vh}.app .ibiz-layout{position:relative;margin:auto;--ibiz-layout-width: 1280px}
var f = Object.defineProperty;
var g = (e, t, r) => t in e ? f(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
var l = (e, t, r) => (g(e, typeof t != "symbol" ? t + "" : t, r), r);
import { GridFieldColumnController as u, GridRowController as p, WFStepTraceViewController as I } from "@ibiz-template/controller";
import { defineComponent as C, computed as m, h as c, getCurrentInstance as V } from "vue";
import { useNamespace as w, useViewController as b, usePropsWatch as y } from "@ibiz-template/vue-util";
import { colorBlend as L, IBizContext as x } from "@ibiz-template/core";
class S {
constructor() {
l(this, "compName", "VIEWCUSTOMPresetWFChartView");
}
}
class W {
constructor() {
l(this, "compName", "GRIDCOLRENDERCodeListGridColumn");
}
async createController(t, r) {
const n = new u(t, r);
return await n.init(), n;
}
}
class P {
constructor() {
l(this, "compName", "IndexView");
}
}
const R = C({
var v = Object.defineProperty;
var k = (t, r, e) => r in t ? v(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
var l = (t, r, e) => (k(t, typeof r != "symbol" ? r + "" : r, e), e);
import { GridFieldColumnController as y, GridRowController as V, WFStepTraceViewController as x } from "@ibiz-template/controller";
import { defineComponent as m, computed as f, h as a, getCurrentInstance as b, ref as p } from "vue";
import { useNamespace as u, useViewController as S, usePropsWatch as C, useWFStepTraceViewController as I, useWFDynaEditView3Controller as N } from "@ibiz-template/vue-util";
import { colorBlend as P, IBizContext as T } from "@ibiz-template/core";
import { ViewType as F } from "@ibiz-template/model";
const L = m({
name: "CodeListGridColumn",
props: {
controller: {
type: u,
type: y,
required: !0
},
row: {
type: p,
type: V,
required: !0
}
},
setup(e) {
const t = w("grid-field-column"), r = m(() => {
var d;
if (e.controller.model.source.cLConvertMode !== "FRONT")
setup(t) {
const r = u("grid-field-column"), e = f(() => {
var i;
if (t.controller.model.source.cLConvertMode !== "FRONT")
return [];
const o = e.row.data[e.controller.model.codeName];
return ((d = e.controller.codeListItems) == null ? void 0 : d.length) && o ? o.split(",").map((h) => {
const a = e.controller.codeListItems.find((i) => i.value === h);
if (a) {
const i = a.color || "#515a6e";
const o = t.row.data[t.controller.model.codeName];
return ((i = t.controller.codeListItems) == null ? void 0 : i.length) && o ? o.split(",").map((g) => {
const h = t.controller.codeListItems.find((d) => d.value === g);
if (h) {
const d = h.color || "#515a6e";
return {
text: a.text,
colorStyle: t.cssVarBlock({
color: i,
"border-color": i,
"bg-color": L(i, "#fff")
text: h.text,
colorStyle: r.cssVarBlock({
color: d,
"border-color": d,
"bg-color": P(d, "#fff")
})
};
}
}).filter(Boolean) : [];
}), n = (o) => {
e.controller.isLinkColumn && e.controller.openLinkView(e.row, o);
}, s = m(() => {
}), s = (o) => {
t.controller.isLinkColumn && t.controller.openLinkView(t.row, o);
}, n = f(() => {
let o = "";
switch (e.controller.model.align) {
switch (t.controller.model.align) {
case "LEFT":
o = "flex-start";
break;
......@@ -71,44 +53,44 @@ const R = C({
o = "center";
break;
}
return t.cssVarBlock({
return r.cssVarBlock({
"justify-content": o
});
});
return {
ns: t,
alignStyle: s,
selectedItems: r,
onCellClick: n
ns: r,
alignStyle: n,
selectedItems: e,
onCellClick: s
};
},
render() {
const e = this.controller, t = this.row.data[e.model.codeName];
return c("div", {
class: [this.ns.b(), e.isLinkColumn && this.ns.m("link-column")],
const t = this.controller, r = this.row.data[t.model.codeName];
return a("div", {
class: [this.ns.b(), t.isLinkColumn && this.ns.m("link-column")],
style: this.alignStyle,
on: {
click: this.onCellClick
}
}, [this.selectedItems.length > 0 ? this.selectedItems.map((r) => c("span", {
}, [this.selectedItems.length > 0 ? this.selectedItems.map((e) => a("span", {
class: this.ns.e("code-list-item"),
style: r.colorStyle
}, [r.text])) : c("span", {
style: e.colorStyle
}, [e.text])) : a("span", {
class: this.ns.e("text")
}, [t])]);
}, [r])]);
}
});
class v extends I {
class W extends x {
constructor() {
super(...arguments);
l(this, "imgSrc");
}
async getUIData() {
const r = new x(this.params, this.context), n = await this.entityService.wf.getWFProcessDiagram(r), s = new Blob([n.data]);
this.imgSrc = URL.createObjectURL(s);
const e = new T(this.params, this.context), s = await this.entityService.wf.getWFProcessDiagram(e), n = new Blob([s.data]);
this.imgSrc = URL.createObjectURL(n);
}
}
const F = C({
const D = m({
name: "PresetWFChartView",
props: {
context: Object,
......@@ -127,39 +109,265 @@ const F = C({
required: !0
}
},
setup(e) {
const t = w("preset-wf-chart-view"), {
proxy: r
} = V(), n = b(r, (s, o) => new v(e.modelPath, s, o));
return y(r, "deName", n.setDeName.bind(n)), {
c: n,
ns: t
setup(t) {
const r = u("preset-wf-chart-view"), {
proxy: e
} = b(), s = S(e, (n, o) => new W(t.modelPath, n, o));
return C(e, "deName", s.setDeName.bind(s)), {
c: s,
ns: r
};
},
render() {
return c("div", {
return a("div", {
class: this.ns.b()
}, [c("img", {
}, [a("img", {
attrs: {
src: this.c.imgSrc
}
})]);
}
}), U = {
});
class E {
constructor() {
l(this, "component", D);
}
}
const O = m({
props: {
context: Object,
params: {
type: Object
},
modelPath: {
type: String,
required: !0
},
modal: {
type: Object
},
deName: {
type: String,
required: !0
}
},
setup(t) {
const {
proxy: r
} = b(), e = I(r, t.modelPath);
C(r, "deName", e.setDeName.bind(e));
const s = u("wf-step-trace-grid"), n = p([]);
e.nerve.self.evt.on("mounted", () => {
!e.data || e.data.usertasks.forEach((i) => {
i.identitylinks.length > 0 || (i.comments.length > 0 && i.comments.forEach((c) => {
n.value.push({
nodeName: i.userTaskName,
personName: c.authorName,
time: c.time,
content: c.type,
comment: c.fullMessage
});
}), n.value.sort((c, w) => Date.parse(w.time) - Date.parse(c.time)));
});
});
const o = p([{
title: "\u5904\u7406\u73AF\u8282",
key: "nodeName",
width: 180,
resizable: !0
}, {
title: "\u5904\u7406\u4EBA",
key: "personName",
width: 180,
resizable: !0
}, {
title: "\u5904\u7406\u65F6\u95F4",
key: "time",
width: 180,
resizable: !0
}, {
title: "\u5904\u7406\u5185\u5BB9",
key: "content",
width: 180,
resizable: !0
}, {
title: "\u5904\u7406\u610F\u89C1",
key: "comment"
}]);
return {
c: e,
ns: s,
gridData: n,
columns: o
};
},
render() {
return a("div", {
class: this.ns.b()
}, [a("div", {
class: this.ns.e("title")
}, ["\u5BA1\u6279\u4FE1\u606F"]), a("i-table", {
attrs: {
"disabled-hover": !0,
columns: this.columns,
data: this.gridData
},
class: this.ns.e("grid")
}), ";"]);
}
}), _ = m({
props: {
context: Object,
params: {
type: Object
},
modelPath: {
type: String,
required: !0
},
modal: {
type: Object
}
},
setup(t) {
const {
proxy: r
} = b(), e = N(r, t.modelPath), s = u(`view-${F.DE_WF_DYNA_EDIT_VIEW3}`.toLowerCase()), n = p(["mainForm"]);
return {
c: e,
ns: s,
onTabClick: (i) => {
n.value.includes(i) || n.value.push(i);
},
lazyList: n
};
},
render(t) {
const r = [];
if (this.c.complete) {
const {
activeForm: e
} = this.c;
e && this.c.providers[e.name] && r.push(t(this.c.providers[e.name].component, {
props: {
modelData: e,
context: this.c.context,
params: this.c.params
},
style: {
height: "auto"
},
on: {
neuronInit: this.c.nerve.onNeuronInit("form")
}
}));
}
if (this.c.complete && this.c.model.drTab.pages[0]) {
const e = this.c.model.drTab.pages[0], s = this.c.drPages[e.source.name];
r.push(t(O, {
attrs: {
context: s.context,
params: s.params,
deName: this.c.model.appEntity.source.codeName,
modal: this.modal,
modelPath: e.embedView.source.modelPath
}
}));
}
return t("view-base", {
attrs: {
controller: this.c
},
scopedSlots: {
toolbar: () => this.c.complete ? [this.c.wfLinks.length > 0 && t("wf-toolbar", {
attrs: {
wfLinks: this.c.wfLinks
},
on: {
"wf-link-click": (e) => {
this.c.onLinkClick(e);
}
}
})] : null
}
}, [this.c.complete && t("i-tabs", {
class: [this.ns.be("", "tab")],
attrs: {
name: this.c.model.drTab.source.name
},
on: {
"on-click": this.onTabClick
}
}, [t("i-tab-pane", {
class: this.ns.be("", "tab-item"),
attrs: {
tab: this.c.model.drTab.source.name,
label: this.c.model.drTab.source.editItemCaption,
name: "mainForm"
}
}, [r]), this.c.model.drTab.pages.map((e) => {
const s = this.c.drPages[e.source.name];
return t("i-tab-pane", {
class: this.ns.be("", "tab-item"),
attrs: {
tab: this.c.model.drTab.source.name,
disabled: this.c.isNewData,
label: e.source.caption,
name: e.source.name
}
}, [!this.c.isNewData && this.lazyList.includes(e.source.name) && t("ViewShell", {
props: {
context: s.context,
params: s.params,
modal: this.modal,
modelPath: e.embedView.source.modelPath,
deName: this.c.model.appEntity.source.codeName
},
on: {
neuronInit: this.c.nerve.onNeuronInit(e.source.name)
},
key: s.key
})]);
})])]);
}
});
class j {
constructor() {
l(this, "component", _);
}
}
class z {
constructor() {
l(this, "component", L);
}
async createController(r, e) {
const s = new y(r, e);
return await s.init(), s;
}
}
class G {
constructor() {
l(this, "component", "IndexView");
}
}
const $ = {
mateUrl: import.meta.url,
install(e) {
install(t) {
ibiz.register.view.register(
"VIEW_CUSTOM_SyWebIndexView",
new P()
), e.component("VIEWCUSTOMPresetWFChartView", F), ibiz.register.view.register(
new G()
), ibiz.register.view.register(
"VIEW_CUSTOM_PresetWFChartView",
new S()
), e.component("GRIDCOLRENDERCodeListGridColumn", R), ibiz.register.gridColumn.register(
new E()
), ibiz.register.gridColumn.register(
"GRID_COLRENDER_CodeListGridColumn",
new W()
new z()
), ibiz.register.view.register(
"VIEW_CUSTOM_SyWfDynaEditView3",
new j()
);
}
};
export {
U as default
$ as default
};
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}function r(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,o=i(t);if(e){var c=i(this).constructor;r=Reflect.construct(o,arguments,c)}else r=o.apply(this,arguments);return n(this,r)}}function n(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return o(e)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function c(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(k){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof d?e:d,c=Object.create(i.prototype),a=new S(n||[]);return o(c,"_invoke",{value:O(t,r,a)}),c}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=f;var p={};function d(){}function y(){}function v(){}var m={};s(m,a,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(_([])));w&&w!==r&&n.call(w,a)&&(m=w);var b=v.prototype=d.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function L(e,r){function i(o,c,a,u){var l=h(e[o],e,c);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):r.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return i("throw",t,a,u)}))}u(l.arg)}var c;o(this,"_invoke",{value:function(t,e){function n(){return new r((function(r,n){i(t,e,r,n)}))}return c=c?c.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var a=C(c,r);if(a){if(a===p)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function C(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,C(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function _(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return y.prototype=v,o(b,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},x(L.prototype),s(L.prototype,u,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var c=new L(f(t,r,n,o),i);return e.isGeneratorFunction(r)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},x(b),s(b,l,"Generator"),s(b,a,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=_,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return c.type="throw",c.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var c=i?i.completion:{};return c.type=t,c.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(c)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function a(t,e,r,n,o,i,c){try{var a=t[i](c),u=a.value}catch(l){return void r(l)}a.done?e(u):Promise.resolve(u).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)}))}}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e,r){return e&&l(t.prototype,e),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["@ibiz-template/controller","vue","@ibiz-template/vue-util","@ibiz-template/core"],(function(t,n){"use strict";var i,a,l,p,d,y,v,m,g,w,b,x;return{setters:[function(t){i=t.GridFieldColumnController,a=t.GridRowController,l=t.WFStepTraceViewController},function(t){p=t.defineComponent,d=t.computed,y=t.h,v=t.getCurrentInstance},function(t){m=t.useNamespace,g=t.useViewController,w=t.usePropsWatch},function(t){b=t.colorBlend,x=t.IBizContext}],execute:function(){var L=s((function t(){f(this,t),h(this,"compName","VIEWCUSTOMPresetWFChartView")})),O=function(){function t(){f(this,t),h(this,"compName","GRIDCOLRENDERCodeListGridColumn")}var e;return s(t,[{key:"createController",value:(e=u(c().mark((function t(e,r){var n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new i(e,r),t.next=3,n.init();case 3:return t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)}))),function(t,r){return e.apply(this,arguments)})}]),t}(),C=s((function t(){f(this,t),h(this,"compName","IndexView")})),E=p({name:"CodeListGridColumn",props:{controller:{type:i,required:!0},row:{type:a,required:!0}},setup:function(t){var e=m("grid-field-column"),r=d((function(){var r;if("FRONT"!==t.controller.model.source.cLConvertMode)return[];var n=t.row.data[t.controller.model.codeName];return null!==(r=t.controller.codeListItems)&&void 0!==r&&r.length&&n?n.split(",").map((function(r){var n=t.controller.codeListItems.find((function(t){return t.value===r}));if(n){var o=n.color||"#515a6e";return{text:n.text,colorStyle:e.cssVarBlock({color:o,"border-color":o,"bg-color":b(o,"#fff")})}}})).filter(Boolean):[]})),n=d((function(){var r="";switch(t.controller.model.align){case"LEFT":r="flex-start";break;case"RIGHT":r="flex-end";break;default:r="center"}return e.cssVarBlock({"justify-content":r})}));return{ns:e,alignStyle:n,selectedItems:r,onCellClick:function(e){t.controller.isLinkColumn&&t.controller.openLinkView(t.row,e)}}},render:function(){var t=this,e=this.controller,r=this.row.data[e.model.codeName];return y("div",{class:[this.ns.b(),e.isLinkColumn&&this.ns.m("link-column")],style:this.alignStyle,on:{click:this.onCellClick}},[this.selectedItems.length>0?this.selectedItems.map((function(e){return y("span",{class:t.ns.e("code-list-item"),style:e.colorStyle},[e.text])})):y("span",{class:this.ns.e("text")},[r])])}}),j=function(t){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&e(t,r)}(a,t);var n,i=r(a);function a(){var t;f(this,a);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return h(o(t=i.call.apply(i,[this].concat(r))),"imgSrc",void 0),t}return s(a,[{key:"getUIData",value:(n=u(c().mark((function t(){var e,r,n;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new x(this.params,this.context),t.next=3,this.entityService.wf.getWFProcessDiagram(e);case 3:r=t.sent,n=new Blob([r.data]),this.imgSrc=URL.createObjectURL(n);case 6:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),a}(l),S=p({name:"PresetWFChartView",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(t){var e=m("preset-wf-chart-view"),r=v().proxy,n=g(r,(function(e,r){return new j(t.modelPath,e,r)}));return w(r,"deName",n.setDeName.bind(n)),{c:n,ns:e}},render:function(){return y("div",{class:this.ns.b()},[y("img",{attrs:{src:this.c.imgSrc}})])}});t("default",{mateUrl:n.meta.url,install:function(t){ibiz.register.view.register("VIEW_CUSTOM_SyWebIndexView",new C),t.component("VIEWCUSTOMPresetWFChartView",S),ibiz.register.view.register("VIEW_CUSTOM_PresetWFChartView",new L),t.component("GRIDCOLRENDERCodeListGridColumn",E),ibiz.register.gridColumn.register("GRID_COLRENDER_CodeListGridColumn",new O)}})}}}))}();
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(_){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,a=Object.create(o.prototype),c=new S(n||[]);return i(a,"_invoke",{value:O(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(_){return{type:"throw",arg:_}}}r.wrap=f;var p={};function d(){}function m(){}function y(){}var v={};l(v,c,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==n&&o.call(w,c)&&(v=w);var g=y.prototype=d.prototype=Object.create(v);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(e,r){function n(i,a,c,s){var u=h(e[i],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):r.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return a=a?a.then(o,o):o()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=y,i(g,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:m,configurable:!0}),m.displayName=l(y,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},r.awrap=function(t){return{__await:t}},x(L.prototype),l(L.prototype,s,(function(){return this})),r.AsyncIterator=L,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new L(f(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(g),l(g,u,"Generator"),l(g,c,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=C,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},r}function r(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,s,"next",t)}function s(t){r(a,o,i,c,s,"throw",t)}c(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u(this,r)}}function u(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["@ibiz-template/controller","vue","@ibiz-template/vue-util","@ibiz-template/core","@ibiz-template/model"],(function(t,r){"use strict";var i,u,f,p,d,m,y,v,b,w,g,x,L,O,k,E;return{setters:[function(t){i=t.GridFieldColumnController,u=t.GridRowController,f=t.WFStepTraceViewController},function(t){p=t.defineComponent,d=t.computed,m=t.h,y=t.getCurrentInstance,v=t.ref},function(t){b=t.useNamespace,w=t.useViewController,g=t.usePropsWatch,x=t.useWFStepTraceViewController,L=t.useWFDynaEditView3Controller},function(t){O=t.colorBlend,k=t.IBizContext},function(t){E=t.ViewType}],execute:function(){var j=p({name:"CodeListGridColumn",props:{controller:{type:i,required:!0},row:{type:u,required:!0}},setup:function(t){var e=b("grid-field-column"),r=d((function(){var r;if("FRONT"!==t.controller.model.source.cLConvertMode)return[];var n=t.row.data[t.controller.model.codeName];return null!==(r=t.controller.codeListItems)&&void 0!==r&&r.length&&n?n.split(",").map((function(r){var n=t.controller.codeListItems.find((function(t){return t.value===r}));if(n){var o=n.color||"#515a6e";return{text:n.text,colorStyle:e.cssVarBlock({color:o,"border-color":o,"bg-color":O(o,"#fff")})}}})).filter(Boolean):[]})),n=d((function(){var r="";switch(t.controller.model.align){case"LEFT":r="flex-start";break;case"RIGHT":r="flex-end";break;default:r="center"}return e.cssVarBlock({"justify-content":r})}));return{ns:e,alignStyle:n,selectedItems:r,onCellClick:function(e){t.controller.isLinkColumn&&t.controller.openLinkView(t.row,e)}}},render:function(){var t=this,e=this.controller,r=this.row.data[e.model.codeName];return m("div",{class:[this.ns.b(),e.isLinkColumn&&this.ns.m("link-column")],style:this.alignStyle,on:{click:this.onCellClick}},[this.selectedItems.length>0?this.selectedItems.map((function(e){return m("span",{class:t.ns.e("code-list-item"),style:e.colorStyle},[e.text])})):m("span",{class:this.ns.e("text")},[r])])}}),S=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var r,i=s(u);function u(){var t;o(this,u);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return h(l(t=i.call.apply(i,[this].concat(r))),"imgSrc",void 0),t}return a(u,[{key:"getUIData",value:(r=n(e().mark((function t(){var r,n,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new k(this.params,this.context),t.next=3,this.entityService.wf.getWFProcessDiagram(r);case 3:n=t.sent,o=new Blob([n.data]),this.imgSrc=URL.createObjectURL(o);case 6:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})}]),u}(f),C=p({name:"PresetWFChartView",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(t){var e=b("preset-wf-chart-view"),r=y().proxy,n=w(r,(function(e,r){return new S(t.modelPath,e,r)}));return g(r,"deName",n.setDeName.bind(n)),{c:n,ns:e}},render:function(){return m("div",{class:this.ns.b()},[m("img",{attrs:{src:this.c.imgSrc}})])}}),P=a((function t(){o(this,t),h(this,"component",C)})),_=p({props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(t){var e=y().proxy,r=x(e,t.modelPath);g(e,"deName",r.setDeName.bind(r));var n=b("wf-step-trace-grid"),o=v([]);r.nerve.self.evt.on("mounted",(function(){r.data&&r.data.usertasks.forEach((function(t){t.identitylinks.length>0||(t.comments.length>0&&t.comments.forEach((function(e){o.value.push({nodeName:t.userTaskName,personName:e.authorName,time:e.time,content:e.type,comment:e.fullMessage})})),o.value.sort((function(t,e){return Date.parse(e.time)-Date.parse(t.time)})))}))}));var i=v([{title:"处理环节",key:"nodeName",width:180,resizable:!0},{title:"处理人",key:"personName",width:180,resizable:!0},{title:"处理时间",key:"time",width:180,resizable:!0},{title:"处理内容",key:"content",width:180,resizable:!0},{title:"处理意见",key:"comment"}]);return{c:r,ns:n,gridData:o,columns:i}},render:function(){return m("div",{class:this.ns.b()},[m("div",{class:this.ns.e("title")},["审批信息"]),m("i-table",{attrs:{"disabled-hover":!0,columns:this.columns,data:this.gridData},class:this.ns.e("grid")}),";"])}}),N=p({props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object}},setup:function(t){var e=y().proxy,r=L(e,t.modelPath),n=b("view-".concat(E.DE_WF_DYNA_EDIT_VIEW3).toLowerCase()),o=v(["mainForm"]);return{c:r,ns:n,onTabClick:function(t){o.value.includes(t)||o.value.push(t)},lazyList:o}},render:function(t){var e=this,r=[];if(this.c.complete){var n=this.c.activeForm;n&&this.c.providers[n.name]&&r.push(t(this.c.providers[n.name].component,{props:{modelData:n,context:this.c.context,params:this.c.params},style:{height:"auto"},on:{neuronInit:this.c.nerve.onNeuronInit("form")}}))}if(this.c.complete&&this.c.model.drTab.pages[0]){var o=this.c.model.drTab.pages[0],i=this.c.drPages[o.source.name];r.push(t(_,{attrs:{context:i.context,params:i.params,deName:this.c.model.appEntity.source.codeName,modal:this.modal,modelPath:o.embedView.source.modelPath}}))}return t("view-base",{attrs:{controller:this.c},scopedSlots:{toolbar:function(){return e.c.complete?[e.c.wfLinks.length>0&&t("wf-toolbar",{attrs:{wfLinks:e.c.wfLinks},on:{"wf-link-click":function(t){e.c.onLinkClick(t)}}})]:null}}},[this.c.complete&&t("i-tabs",{class:[this.ns.be("","tab")],attrs:{name:this.c.model.drTab.source.name},on:{"on-click":this.onTabClick}},[t("i-tab-pane",{class:this.ns.be("","tab-item"),attrs:{tab:this.c.model.drTab.source.name,label:this.c.model.drTab.source.editItemCaption,name:"mainForm"}},[r]),this.c.model.drTab.pages.map((function(r){var n=e.c.drPages[r.source.name];return t("i-tab-pane",{class:e.ns.be("","tab-item"),attrs:{tab:e.c.model.drTab.source.name,disabled:e.c.isNewData,label:r.source.caption,name:r.source.name}},[!e.c.isNewData&&e.lazyList.includes(r.source.name)&&t("ViewShell",{props:{context:n.context,params:n.params,modal:e.modal,modelPath:r.embedView.source.modelPath,deName:e.c.model.appEntity.source.codeName},on:{neuronInit:e.c.nerve.onNeuronInit(r.source.name)},key:n.key})])}))])])}}),T=a((function t(){o(this,t),h(this,"component",N)})),I=function(){function t(){o(this,t),h(this,"component",j)}var r;return a(t,[{key:"createController",value:(r=n(e().mark((function t(r,n){var o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new i(r,n),t.next=3,o.init();case 3:return t.abrupt("return",o);case 4:case"end":return t.stop()}}),t)}))),function(t,e){return r.apply(this,arguments)})}]),t}(),V=a((function t(){o(this,t),h(this,"component","IndexView")}));t("default",{mateUrl:r.meta.url,install:function(t){ibiz.register.view.register("VIEW_CUSTOM_SyWebIndexView",new V),ibiz.register.view.register("VIEW_CUSTOM_PresetWFChartView",new P),ibiz.register.gridColumn.register("GRID_COLRENDER_CodeListGridColumn",new I),ibiz.register.view.register("VIEW_CUSTOM_SyWfDynaEditView3",new T)}})}}}))}();
@charset "UTF-8";.app{width:100vw;height:100vh}.app .ibiz-layout{position:relative;margin:auto;--ibiz-layout-width: 1280px}.ibiz-grid-field-column{--ibiz-grid-field-column-cell-padding: var(--ibiz-grid-cell-padding);--ibiz-grid-field-column-font-color: var(--ibiz-color-primary);display:flex;align-items:center;justify-content:var(--ibiz-grid-field-column-justify-content);width:100%;height:100%;padding:var(--ibiz-grid-field-column-cell-padding)}.ibiz-grid-field-column__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-grid-field-column--link-column{color:var(--ibiz-grid-field-column-font-color);cursor:pointer}.ibiz-grid-field-column__code-list-item{color:var(--ibiz-grid-field-column-color);border-color:var(--ibiz-grid-field-column-border-color);background-color:var(--ibiz-grid-field-column-bg-color);border:3px solid var(--ibiz-grid-field-column-border-color);border-radius:5px;padding:0 8px;display:inline-block}.ibiz-preset-wf-chart-view{width:100%;height:100%;text-align:center;overflow:auto}
@charset "UTF-8";.ibiz-grid-field-column{--ibiz-grid-field-column-cell-padding: var(--ibiz-grid-cell-padding);--ibiz-grid-field-column-font-color: var(--ibiz-color-primary);display:flex;align-items:center;justify-content:var(--ibiz-grid-field-column-justify-content);width:100%;height:100%;padding:var(--ibiz-grid-field-column-cell-padding)}.ibiz-grid-field-column__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-grid-field-column--link-column{color:var(--ibiz-grid-field-column-font-color);cursor:pointer}.ibiz-grid-field-column__code-list-item{color:var(--ibiz-grid-field-column-color);border-color:var(--ibiz-grid-field-column-border-color);background-color:var(--ibiz-grid-field-column-bg-color);border:3px solid var(--ibiz-grid-field-column-border-color);border-radius:5px;padding:0 8px;display:inline-block}.ibiz-preset-wf-chart-view{width:100%;height:100%;text-align:center;overflow:auto}.ibiz-wf-step-trace-grid__title{padding:calc(var(--ibiz-padding) / 2);font-size:var(--ibiz-font-size-medium);border-bottom:1px solid var(--ibiz-border-color)}.ibiz-wf-step-trace-grid__grid{margin:var(--ibiz-padding)}.app{width:100vw;height:100vh}.app .ibiz-layout{position:relative;margin:auto;--ibiz-layout-width: 1280px}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册