提交 5dbd82d5 编写于 作者: fzh's avatar fzh

feat: 更新插件

上级 9f494fec
var W = Object.defineProperty; var W = Object.defineProperty;
var q = (e, t, s) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s; var q = (e, t, i) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
var G = (e, t, s) => (q(e, typeof t != "symbol" ? t + "" : t, s), s); var v = (e, t, i) => (q(e, typeof t != "symbol" ? t + "" : t, i), i);
import { GridModel as B, ModelUtil as $ } from "@ibiz-template/model"; import { GridModel as B, ModelUtil as $ } from "@ibiz-template/model";
import { defineComponent as x, h as d, ref as C, computed as v, getCurrentInstance as _, watch as T, onUnmounted as V } from "vue"; import { defineComponent as z, h, ref as C, computed as S, getCurrentInstance as V, watch as T, onUnmounted as J } from "vue";
import { useNamespace as S, useGridController as J } from "@ibiz-template/vue-util"; import { useNamespace as P, useGridController as K } from "@ibiz-template/vue-util";
import { PluginStaticResource as K } from "@ibiz-template/runtime"; import { PluginStaticResource as Q, UIActionHandler as X } from "@ibiz-template/runtime";
const Q = x({ import { RuntimeError as U, downloadFileFromBlob as Y } from "@ibiz-template/core";
const Z = z({
name: "WFToolbar", name: "WFToolbar",
props: { props: {
wfLinks: { wfLinks: {
...@@ -16,11 +17,11 @@ const Q = x({ ...@@ -16,11 +17,11 @@ const Q = x({
setup(e, { setup(e, {
emit: t emit: t
}) { }) {
const s = S("wf-toolbar"), o = async (a, n) => { const i = P("wf-toolbar"), o = async (a, n) => {
t("wf-link-click", a, n); t("wf-link-click", a, n);
}; };
return { return {
ns: s, ns: i,
handleClick: async (a, n) => { handleClick: async (a, n) => {
setTimeout(() => { setTimeout(() => {
o(a, n); o(a, n);
...@@ -30,14 +31,14 @@ const Q = x({ ...@@ -30,14 +31,14 @@ const Q = x({
}, },
render() { render() {
const e = this.wfLinks || []; const e = this.wfLinks || [];
return d("div", { return h("div", {
class: `${this.ns.b()}` class: `${this.ns.b()}`
}, [e.length > 0 && e.map((t) => { }, [e.length > 0 && e.map((t) => {
const s = t.sequenceFlowName.startsWith("驳回") || t.sequenceFlowName.startsWith("取消"); const i = t.sequenceFlowName.startsWith("驳回") || t.sequenceFlowName.startsWith("取消");
return d("div", { return h("div", {
key: t.sequenceFlowId, key: t.sequenceFlowId,
class: [this.ns.e("item"), s ? this.ns.em("item", "reject") : ""] class: [this.ns.e("item"), i ? this.ns.em("item", "reject") : ""]
}, [d("i-button", { }, [h("i-button", {
attrs: { attrs: {
title: t.sequenceFlowName title: t.sequenceFlowName
}, },
...@@ -48,17 +49,17 @@ const Q = x({ ...@@ -48,17 +49,17 @@ const Q = x({
})]); })]);
} }
}); });
function z(e, t) { function x(e, t) {
var r, a; var s, a;
const s = []; const i = [];
e.source.columnType === "GROUPGRIDCOLUMN" && e.children.forEach((n) => { e.source.columnType === "GROUPGRIDCOLUMN" && e.children.forEach((n) => {
s.push(z(n, t)); i.push(x(n, t));
}); });
const o = { const o = {
title: e.title, title: e.title,
width: e.source.widthUnit === "STAR" ? void 0 : e.width, width: e.source.widthUnit === "STAR" ? void 0 : e.width,
minWidth: e.width, minWidth: e.width,
align: ((r = e.source.align) == null ? void 0 : r.toLowerCase()) || "center", align: ((s = e.source.align) == null ? void 0 : s.toLowerCase()) || "center",
slot: e.codeName, slot: e.codeName,
key: e.codeName, key: e.codeName,
fieldName: e.deFieldName, fieldName: e.deFieldName,
...@@ -71,20 +72,20 @@ function z(e, t) { ...@@ -71,20 +72,20 @@ function z(e, t) {
userParams: e.source.userParams, userParams: e.source.userParams,
className: (a = e.source.getCellPSSysCss()) == null ? void 0 : a.cssName className: (a = e.source.getCellPSSysCss()) == null ? void 0 : a.cssName
}; };
return s.length > 0 && Object.assign(o, { children: s }), o; return i.length > 0 && Object.assign(o, { children: i }), o;
} }
function X(e) { function ee(e) {
const t = e.model, s = [], o = t.columns.map((r) => z(r, e)); const t = e.model, i = [], o = t.columns.map((s) => x(s, e));
return t.children.forEach((r) => { return t.children.forEach((s) => {
const a = o.find((n) => n.key === r.codeName); const a = o.find((n) => n.key === s.codeName);
a && s.push(a); a && i.push(a);
}), e.singleSelect || s.splice(0, 0, { type: "selection", width: 60 }), s; }), e.singleSelect || i.splice(0, 0, { type: "selection", width: 60 }), i;
} }
function Y(e) { function te(e) {
const t = C([]); const t = C([]);
return e.nerve.self.evt.on("created", () => { return e.nerve.self.evt.on("created", () => {
t.value = X(e); t.value = ee(e);
}), [v(() => { }), [S(() => {
const o = [...t.value]; const o = [...t.value];
if (!o.find((n) => !n.width)) { if (!o.find((n) => !n.width)) {
let n = o.length - 1; let n = o.length - 1;
...@@ -101,49 +102,49 @@ function Y(e) { ...@@ -101,49 +102,49 @@ function Y(e) {
return o; return o;
}), t]; }), t];
} }
function Z(e) { function oe(e) {
const t = (n) => e.items.find((u) => u.srfkey === n.srfkey); const t = (n) => e.items.find((u) => u.srfkey === n.srfkey);
function s(n) { function i(n) {
const u = t(n); const u = t(n);
if (e.singleSelect) { if (e.singleSelect) {
const h = e.selectedData.find( const d = e.selectedData.find(
(g) => g.srfkey === n.srfkey (f) => f.srfkey === n.srfkey
); );
e.onSelectionChange(h ? [] : [u]); e.onSelectionChange(d ? [] : [u]);
} }
e.onRowClick(u); e.onRowClick(u);
} }
function o(n) { function o(n) {
e.onDbRowClick(t(n)); e.onDbRowClick(t(n));
} }
function r(n) { function s(n) {
if (!e.singleSelect) { if (!e.singleSelect) {
const u = []; const u = [];
n.forEach((h) => { n.forEach((d) => {
const g = t(h); const f = t(d);
g && u.push(g); f && u.push(f);
}), e.onSelectionChange(u); }), e.onSelectionChange(u);
} }
} }
function a(n) { function a(n) {
const { column: u, order: h } = n, g = h === "asc" || h === "desc" ? h : void 0; const { column: u, order: d } = n, f = d === "asc" || d === "desc" ? d : void 0;
e.setSort(u.fieldName, g), e.load(); e.setSort(u.fieldName, f), e.load();
} }
return { onRowClick: s, onDbRowClick: o, onSelectionChange: r, onSortChange: a }; return { onRowClick: i, onDbRowClick: o, onSelectionChange: s, onSortChange: a };
} }
function ee(e) { function ne(e) {
function t(r) { function t(s) {
!r || r === e.curPage || (e.curPage = r, e.load()); !s || s === e.curPage || (e.curPage = s, e.load());
} }
function s(r) { function i(s) {
!r || r === e.size || (e.size = r, e.curPage === 1 && e.load()); !s || s === e.size || (e.size = s, e.curPage === 1 && e.load());
} }
function o() { function o() {
e.curPage = 1, e.load(); e.curPage = 1, e.load();
} }
return { onPageChange: t, onPageSizeChange: s, onPageReset: o }; return { onPageChange: t, onPageSizeChange: i, onPageReset: o };
} }
const te = x({ const ie = z({
props: { props: {
modelData: B, modelData: B,
context: { context: {
...@@ -173,59 +174,59 @@ const te = x({ ...@@ -173,59 +174,59 @@ const te = x({
setup(e) { setup(e) {
const { const {
proxy: t proxy: t
} = _(), s = S("grid"), o = J(t, e.modelData, e.context, e.params), [r] = Y(o), { } = V(), i = P("grid"), o = K(t, e.modelData, e.context, e.params), [s] = te(o), {
onRowClick: a, onRowClick: a,
onDbRowClick: n, onDbRowClick: n,
onSelectionChange: u, onSelectionChange: u,
onSortChange: h onSortChange: d
} = Z(o), { } = oe(o), {
onPageChange: g, onPageChange: f,
onPageReset: O, onPageReset: O,
onPageSizeChange: U onPageSizeChange: H
} = ee(o), M = v(() => { } = ne(o), A = S(() => {
var l, c; var l, c;
const i = (c = (l = e.modelData) == null ? void 0 : l.source.getPSControlParam()) == null ? void 0 : c.ctrlParams; const r = (c = (l = e.modelData) == null ? void 0 : l.source.getPSControlParam()) == null ? void 0 : c.ctrlParams;
return (i == null ? void 0 : i.HIGHLIGHT) !== "false"; return (r == null ? void 0 : r.HIGHLIGHT) !== "false";
}); });
let p = null; let p = null;
const H = (i, l) => { const E = (r, l) => {
p != null && window.clearTimeout(p), p = window.setTimeout(() => { p != null && window.clearTimeout(p), p = window.setTimeout(() => {
const c = t.$refs.grid; const c = t.$refs.grid;
c && (o.selectedData.find((I) => I.srfkey === i.srfkey) && c.clearCurrentRow(), c.toggleSelect && c.toggleSelect(l)), a(i); c && (o.selectedData.find((D) => D.srfkey === r.srfkey) && c.clearCurrentRow(), c.toggleSelect && c.toggleSelect(l)), a(r);
}, 300); }, 300);
}, E = (i) => { }, M = (r) => {
p != null && window.clearTimeout(p); p != null && window.clearTimeout(p);
const l = t.$refs.grid; const l = t.$refs.grid;
l && (o.selectedData.find((f) => f.srfkey === i.srfkey) || l.clearCurrentRow()), n(i); l && (o.selectedData.find((m) => m.srfkey === r.srfkey) || l.clearCurrentRow()), n(r);
}, w = C(0), m = C(null), P = C(null); }, w = C(0), g = C(null), R = C(null);
let b = null, F = 0; let b = null, N = 0;
const N = () => { const G = () => {
var i; var r;
if (m.value && ((i = e.modal) == null ? void 0 : i.mode) !== "EMBED") if (g.value && ((r = e.modal) == null ? void 0 : r.mode) !== "EMBED")
if (o.model.source.enablePagingBar && P.value) { if (o.model.source.enablePagingBar && R.value) {
const l = P.value.$el, c = l.offsetHeight + parseFloat(window.getComputedStyle(l).paddingTop); const l = R.value.$el, c = l.offsetHeight + parseFloat(window.getComputedStyle(l).paddingTop);
w.value = m.value.offsetHeight - c; w.value = g.value.offsetHeight - c;
} else } else
w.value = m.value.offsetHeight; w.value = g.value.offsetHeight;
o.model.source.height > 0 && (w.value = o.model.source.height); o.model.source.height > 0 && (w.value = o.model.source.height);
}; };
T(m, (i, l) => { T(g, (r, l) => {
i && i !== l && (N(), window.ResizeObserver && m.value && (b = new ResizeObserver((c) => { r && r !== l && (G(), window.ResizeObserver && g.value && (b = new ResizeObserver((c) => {
const f = c[0].contentRect.height; const m = c[0].contentRect.height;
f !== F && (N(), F = f); m !== N && (G(), N = m);
}), b.observe(m.value))); }), b.observe(g.value)));
}), V(() => { }), J(() => {
b && b.disconnect(); b && b.disconnect();
}); });
const j = v(() => [{ const L = S(() => [{
hiddenRow: !0 hiddenRow: !0
}, ...o.items]), y = S("grid-field-column"), L = S("collaborative-satisfaction-grid"), k = C([]), A = v(() => { }, ...o.items]), y = P("grid-field-column"), j = P("collaborative-satisfaction-grid"), k = C([]), _ = S(() => {
const i = [...r.value]; const r = [...s.value];
return i.splice(1, 0, ...k.value), i; return r.splice(1, 0, ...k.value), r;
}), R = C([]); }), I = C([]);
return T(() => o.items, () => { return T(() => o.items, () => {
k.value = [], R.value = [], Array.isArray(o.items) && (k.value = o.items.map((i) => { k.value = [], I.value = [], Array.isArray(o.items) && (k.value = o.items.map((r) => {
const l = i.bpjbm, c = i.type; const l = r.bpjbm, c = r.type;
return { return {
title: l, title: l,
width: 120, width: 120,
...@@ -235,54 +236,54 @@ const te = x({ ...@@ -235,54 +236,54 @@ const te = x({
ellipsis: !0, ellipsis: !0,
tooltip: !1, tooltip: !1,
resizable: !0, resizable: !0,
render: (f, { render: (m, {
index: I index: D
}) => { }) => {
const D = R.value[I - 1]; const F = I.value[D - 1];
return d("div", { return h("div", {
class: [y.b()], class: [y.b()],
style: y.cssVarBlock({ style: y.cssVarBlock({
"justify-content": "flex-end" "justify-content": "flex-end"
}) })
}, [d("span", { }, [h("span", {
class: y.e("text") class: y.e("text")
}, [(D == null ? void 0 : D[c]) || ""])]); }, [(F == null ? void 0 : F[c]) || ""])]);
} }
}; };
}), R.value = o.items.map((i) => { }), I.value = o.items.map((r) => {
try { try {
const l = JSON.parse(i.pjdbs || "[]"); const l = JSON.parse(r.pjdbs || "[]");
if (Array.isArray(l) && l.length) { if (Array.isArray(l) && l.length) {
const c = {}; const c = {};
return l.forEach((f) => { return l.forEach((m) => {
c[f.type] = f.value || ""; c[m.type] = m.value || "";
}), c; }), c;
} }
} catch (l) { } catch (l) {
ibiz.log.error(`${i.pjdbs} 解析错误`); ibiz.log.error(`${r.pjdbs} 解析错误`);
} }
return {}; return {};
})); }));
}), { }), {
c: o, c: o,
ns: s, ns: i,
columns: r, columns: s,
tableData: j, tableData: L,
onDbRowClick: n, onDbRowClick: n,
onUIRowClick: H, onUIRowClick: E,
onUIDbRowClick: E, onUIDbRowClick: M,
onSelectionChange: u, onSelectionChange: u,
onSortChange: h, onSortChange: d,
onPageChange: g, onPageChange: f,
onPageSizeChange: U, onPageSizeChange: H,
onPageReset: O, onPageReset: O,
tableHeight: w, tableHeight: w,
gridRef: m, gridRef: g,
girdPaginationRef: P, girdPaginationRef: R,
highlight: M, highlight: A,
ns2: y, ns2: y,
ns3: L, ns3: j,
tableColumns: A tableColumns: _
}; };
}, },
render() { render() {
...@@ -292,33 +293,33 @@ const te = x({ ...@@ -292,33 +293,33 @@ const te = x({
return this.c.model.columns.forEach((t) => { return this.c.model.columns.forEach((t) => {
if (t.source.columnType === "GROUPGRIDCOLUMN") if (t.source.columnType === "GROUPGRIDCOLUMN")
return; return;
const s = t.codeName; const i = t.codeName;
e[s] = ({ e[i] = ({
row: o, row: o,
index: r index: s
}) => { }) => {
const a = this.c.rows[r - 1]; const a = this.c.rows[s - 1];
if (o.hiddenRow) if (o.hiddenRow)
return d("span", { return h("span", {
style: "word-break: break-word;white-space: pre-wrap;" style: "word-break: break-word;white-space: pre-wrap;"
}, ["隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列"]); }, ["隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列"]);
if (a) if (a)
return d(this.c.providers[s].component, { return h(this.c.providers[i].component, {
props: { props: {
controller: this.c.columns[s], controller: this.c.columns[i],
row: a row: a
}, },
key: o.srfkey + s key: o.srfkey + i
}); });
}; };
}), d("control-layout", { }), h("control-layout", {
attrs: { attrs: {
modelData: this.c.model modelData: this.c.model
} }
}, [d("div", { }, [h("div", {
ref: "gridRef", ref: "gridRef",
class: [this.ns.b(), this.ns.is("show-header", !this.c.model.source.hideHeader), this.ns.is("enable-page", this.c.model.source.enablePagingBar), this.ns3.b()] class: [this.ns.b(), this.ns.is("show-header", !this.c.model.source.hideHeader), this.ns.is("enable-page", this.c.model.source.enablePagingBar), this.ns3.b()]
}, [d("i-table", { }, [h("i-table", {
ref: "grid", ref: "grid",
attrs: { attrs: {
height: this.tableHeight, height: this.tableHeight,
...@@ -336,7 +337,7 @@ const te = x({ ...@@ -336,7 +337,7 @@ const te = x({
"on-sort-change": this.onSortChange "on-sort-change": this.onSortChange
}, },
scopedSlots: e scopedSlots: e
}), this.c.model.source.enablePagingBar && d("app-grid-pagination", { }), this.c.model.source.enablePagingBar && h("app-grid-pagination", {
ref: "girdPaginationRef", ref: "girdPaginationRef",
attrs: { attrs: {
total: this.c.total, total: this.c.total,
...@@ -351,34 +352,66 @@ const te = x({ ...@@ -351,34 +352,66 @@ const te = x({
})])]); })])]);
} }
}); });
class oe { class se {
constructor() { constructor() {
G(this, "component", "IndexView"); v(this, "component", "IndexView");
} }
} }
const ne = new K(import.meta.url); const re = new Q(import.meta.url);
class se { class ae extends X {
async execAction(t, i, o, s, a) {
const n = "/ibzsy/xtmydcphzdc";
return ibiz.net.request(n, {
method: "post",
data: s,
responseType: "blob",
baseURL: ibiz.env.baseUrl
}).then((u) => {
if (u.status !== 200)
throw new U("下载文件失败");
if (u.data) {
const d = u.headers.filename, f = decodeURIComponent(d);
Y(u.data, f);
} else
throw new U("文件流数据不存在");
}), {
refresh: !1
};
}
}
class le {
constructor() {
v(this, "handler");
}
async getHandler() {
return this.handler || (this.handler = new ae()), this.handler;
}
}
class ce {
constructor() { constructor() {
G(this, "component", "CollaborativeSatisfactionGrid"); v(this, "component", "CollaborativeSatisfactionGrid");
} }
} }
const ue = { const Ce = {
mateUrl: import.meta.url, mateUrl: import.meta.url,
install(e) { install(e) {
$.getModelService().then((t) => { $.getModelService().then((t) => {
t.app.userParams.autoWidth === "true" && document.getElementsByClassName("app")[0].classList.add("auto-width"); t.app.userParams.autoWidth === "true" && document.getElementsByClassName("app")[0].classList.add("auto-width");
}), ne.loadStyle(["/style.css"]), e.component("WfToolbar", Q), ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", ibiz.register.view.register( }), re.loadStyle(["/style.css"]), e.component("WfToolbar", Z), ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", ibiz.register.view.register(
"VIEW_CUSTOM_GsIndexCSS", "VIEW_CUSTOM_GsIndexCSS",
new oe() new se()
), e.component( ), e.component(
"CollaborativeSatisfactionGrid", "CollaborativeSatisfactionGrid",
te ie
), ibiz.register.control.register( ), ibiz.register.control.register(
"CUSTOM_CollaborativeSatisfactionGrid", "CUSTOM_CollaborativeSatisfactionGrid",
new se() new ce()
), ibiz.register.uiAction.register(
"DEUIACTION_CollaborativeSatisfactionPort",
new le()
); );
} }
}; };
export { export {
ue as default Ce as default
}; };
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function r(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}function l(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */h=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(R){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),c=new x(n||[]);return o(a,"_invoke",{value:C(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(R){return{type:"throw",arg:R}}}t.wrap=s;var d={};function p(){}function v(){}function g(){}var y={};l(y,a,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(E([])));b&&b!==r&&n.call(b,a)&&(y=b);var w=g.prototype=p.prototype=Object.create(y);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(t,r){function i(o,a,c,u){var l=f(t[o],t,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):r.resolve(h).then((function(e){s.value=e,c(s)}),(function(e){return i("throw",e,c,u)}))}u(l.arg)}var a;o(this,"_invoke",{value:function(e,t){function n(){return new r((function(r,n){i(e,t,r,n)}))}return a=a?a.then(n,n):n()}})}function C(e,t,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 L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===d)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 u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return v.prototype=g,o(w,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:v,configurable:!0}),v.displayName=l(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},S(P.prototype),l(P.prototype,c,(function(){return this})),t.AsyncIterator=P,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new P(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(w),l(w,u,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=E,x.prototype={constructor:x,reset:function(e){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),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.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 c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){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(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function d(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(l){return void r(l)}c.done?t(u):Promise.resolve(u).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,c,"next",e)}function c(e){d(i,n,o,a,c,"throw",e)}a(void 0)}))}}System.register(["@ibiz-template/model","vue","@ibiz-template/vue-util","@ibiz-template/runtime"],(function(e,t){"use strict";var i,u,s,f,d,v,g,y,m,b,w,S;return{setters:[function(e){i=e.GridModel,u=e.ModelUtil},function(e){s=e.defineComponent,f=e.h,d=e.ref,v=e.computed,g=e.getCurrentInstance,y=e.watch,m=e.onUnmounted},function(e){b=e.useNamespace,w=e.useGridController},function(e){S=e.PluginStaticResource}],execute:function(){var P=s({name:"WFToolbar",props:{wfLinks:{type:Array,required:!0}},setup:function(e,t){var r=t.emit,n=b("wf-toolbar"),o=function(){var e=p(h().mark((function e(t,n){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r("wf-link-click",t,n);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),i=function(){var e=p(h().mark((function e(t,r){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout((function(){o(t,r)}),30);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();return{ns:n,handleClick:i}},render:function(){var e=this,t=this.wfLinks||[];return f("div",{class:"".concat(this.ns.b())},[t.length>0&&t.map((function(t){var r=t.sequenceFlowName.startsWith("驳回")||t.sequenceFlowName.startsWith("取消");return f("div",{key:t.sequenceFlowId,class:[e.ns.e("item"),r?e.ns.em("item","reject"):""]},[f("i-button",{attrs:{title:t.sequenceFlowName},on:{click:function(r){return e.handleClick(t,r)}}},[t.sequenceFlowName||""])])}))])}});function C(e,t){var r,n,o=[];"GROUPGRIDCOLUMN"===e.source.columnType&&e.children.forEach((function(e){o.push(C(e,t))}));var i={title:e.title,width:"STAR"===e.source.widthUnit?void 0:e.width,minWidth:e.width,align:(null===(r=e.source.align)||void 0===r?void 0:r.toLowerCase())||"center",slot:e.codeName,key:e.codeName,fieldName:e.deFieldName,ellipsis:!0,tooltip:!1,resizable:!0,sortable:!(t.noSort||!e.source.enableSort)&&"custom",columnType:e.source.columnType,userParams:e.source.userParams,className:null===(n=e.source.getCellPSSysCss())||void 0===n?void 0:n.cssName};return o.length>0&&Object.assign(i,{children:o}),i}function O(e){var t=e.model,r=[],n=t.columns.map((function(t){return C(t,e)}));return t.children.forEach((function(e){var t=n.find((function(t){return t.key===e.codeName}));t&&r.push(t)})),e.singleSelect||r.splice(0,0,{type:"selection",width:60}),r}var k=s({props:{modelData:i,context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},gridRowActiveMode:{type:Number,default:2},modal:{type:Object}},setup:function(e){var t=g().proxy,r=b("grid"),n=w(t,e.modelData,e.context,e.params),i=function(e){var t=d([]);return e.nerve.self.evt.on("created",(function(){t.value=O(e)})),[v((function(){var e=l(t.value);if(!e.find((function(e){return!e.width}))){var r=e.length-1;"rowEdit"===e[r].key&&(r-=1),e[r]=a(a({},e[r]),{},{width:void 0})}var n=e.find((function(e){return"UAGRIDCOLUMN"===e.columnType}));if(n){var o=n.userParams;o&&"true"===o.fixed&&(n.fixed="right")}return e})),t]}(n),c=o(i,1)[0],u=function(e){var t=function(t){return e.items.find((function(e){return e.srfkey===t.srfkey}))};return{onRowClick:function(r){var n=t(r);if(e.singleSelect){var o=e.selectedData.find((function(e){return e.srfkey===r.srfkey}));e.onSelectionChange(o?[]:[n])}e.onRowClick(n)},onDbRowClick:function(r){e.onDbRowClick(t(r))},onSelectionChange:function(r){if(!e.singleSelect){var n=[];r.forEach((function(e){var r=t(e);r&&n.push(r)})),e.onSelectionChange(n)}},onSortChange:function(t){var r=t.column,n=t.order,o="asc"===n||"desc"===n?n:void 0;e.setSort(r.fieldName,o),e.load()}}}(n),s=u.onRowClick,h=u.onDbRowClick,p=u.onSelectionChange,S=u.onSortChange,P=function(e){return{onPageChange:function(t){t&&t!==e.curPage&&(e.curPage=t,e.load())},onPageSizeChange:function(t){t&&t!==e.size&&(e.size=t,1===e.curPage&&e.load())},onPageReset:function(){e.curPage=1,e.load()}}}(n),C=P.onPageChange,k=P.onPageReset,j=P.onPageSizeChange,x=v((function(){var t,r,n=null===(t=e.modelData)||void 0===t||null===(r=t.source.getPSControlParam())||void 0===r?void 0:r.ctrlParams;return"false"!==(null==n?void 0:n.HIGHLIGHT)})),E=null,L=d(0),R=d(null),N=d(null),T=null,D=0,I=function(){var t;if(R.value&&"EMBED"!==(null===(t=e.modal)||void 0===t?void 0:t.mode))if(n.model.source.enablePagingBar&&N.value){var r=N.value.$el,o=r.offsetHeight+parseFloat(window.getComputedStyle(r).paddingTop);L.value=R.value.offsetHeight-o}else L.value=R.value.offsetHeight;n.model.source.height>0&&(L.value=n.model.source.height)};y(R,(function(e,t){e&&e!==t&&(I(),window.ResizeObserver&&R.value&&(T=new ResizeObserver((function(e){var t=e[0].contentRect.height;t!==D&&(I(),D=t)}))).observe(R.value))})),m((function(){T&&T.disconnect()}));var z=v((function(){return[{hiddenRow:!0}].concat(l(n.items))})),G=b("grid-field-column"),A=b("collaborative-satisfaction-grid"),_=d([]),U=v((function(){var e=l(c.value);return e.splice.apply(e,[1,0].concat(l(_.value))),e})),F=d([]);return y((function(){return n.items}),(function(){_.value=[],F.value=[],Array.isArray(n.items)&&(_.value=n.items.map((function(e){var t=e.bpjbm,r=e.type;return{title:t,width:120,minWidth:120,align:"right",key:r,ellipsis:!0,tooltip:!1,resizable:!0,render:function(e,t){var n=t.index,o=F.value[n-1];return f("div",{class:[G.b()],style:G.cssVarBlock({"justify-content":"flex-end"})},[f("span",{class:G.e("text")},[(null==o?void 0:o[r])||""])])}}})),F.value=n.items.map((function(e){try{var t=JSON.parse(e.pjdbs||"[]");if(Array.isArray(t)&&t.length){var r={};return t.forEach((function(e){r[e.type]=e.value||""})),r}}catch(n){ibiz.log.error("".concat(e.pjdbs," 解析错误"))}return{}})))})),{c:n,ns:r,columns:c,tableData:z,onDbRowClick:h,onUIRowClick:function(e,r){null!=E&&window.clearTimeout(E),E=window.setTimeout((function(){var o=t.$refs.grid;o&&(n.selectedData.find((function(t){return t.srfkey===e.srfkey}))&&o.clearCurrentRow(),o.toggleSelect&&o.toggleSelect(r));s(e)}),300)},onUIDbRowClick:function(e){null!=E&&window.clearTimeout(E);var r=t.$refs.grid;r&&(n.selectedData.find((function(t){return t.srfkey===e.srfkey}))||r.clearCurrentRow());h(e)},onSelectionChange:p,onSortChange:S,onPageChange:C,onPageSizeChange:j,onPageReset:k,tableHeight:L,gridRef:R,girdPaginationRef:N,highlight:x,ns2:G,ns3:A,tableColumns:U}},render:function(){var e=this;if(this.c.complete){var t={};return this.c.model.columns.forEach((function(r){if("GROUPGRIDCOLUMN"!==r.source.columnType){var n=r.codeName;t[n]=function(t){var r=t.row,o=t.index,i=e.c.rows[o-1];return r.hiddenRow?f("span",{style:"word-break: break-word;white-space: pre-wrap;"},["隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列"]):i?f(e.c.providers[n].component,{props:{controller:e.c.columns[n],row:i},key:r.srfkey+n}):void 0}}})),f("control-layout",{attrs:{modelData:this.c.model}},[f("div",{ref:"gridRef",class:[this.ns.b(),this.ns.is("show-header",!this.c.model.source.hideHeader),this.ns.is("enable-page",this.c.model.source.enablePagingBar),this.ns3.b()]},[f("i-table",{ref:"grid",attrs:{height:this.tableHeight,"show-header":!this.c.model.source.hideHeader,"highlight-row":this.c.singleSelect&&this.highlight,data:this.tableData,columns:this.tableColumns,"row-class-name":function(e){return e.hiddenRow?"hidden-row":""}},class:this.ns.b("content"),on:{"on-row-click":this.onUIRowClick,"on-row-dblclick":this.onUIDbRowClick,"on-selection-change":this.onSelectionChange,"on-sort-change":this.onSortChange},scopedSlots:t}),this.c.model.source.enablePagingBar&&f("app-grid-pagination",{ref:"girdPaginationRef",attrs:{total:this.c.total,curPage:this.c.curPage,size:this.c.size},on:{change:this.onPageChange,"page-size-change":this.onPageSizeChange,"page-reset":this.onPageReset}})])])}}}),j=r((function e(){n(this,e),c(this,"component","IndexView")})),x=new S(t.meta.url),E=r((function e(){n(this,e),c(this,"component","CollaborativeSatisfactionGrid")}));e("default",{mateUrl:t.meta.url,install:function(e){u.getModelService().then((function(e){"true"===e.app.userParams.autoWidth&&document.getElementsByClassName("app")[0].classList.add("auto-width")})),x.loadStyle(["/style.css"]),e.component("WfToolbar",P),ibiz.config.enableDataInfoBar=!1,ibiz.config.gridEditShowMode="all",ibiz.register.view.register("VIEW_CUSTOM_GsIndexCSS",new j),e.component("CollaborativeSatisfactionGrid",k),ibiz.register.control.register("CUSTOM_CollaborativeSatisfactionGrid",new E)}})}}}))}(); !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,r){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,r)}function r(e){var t=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(e){return!1}}();return function(){var r,i=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return n(this,r)}}function n(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}function d(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */y=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(L){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof d?t:d,a=Object.create(i.prototype),c=new x(n||[]);return o(a,"_invoke",{value:P(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}t.wrap=s;var h={};function d(){}function p(){}function v(){}var m={};l(m,a,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(E([])));b&&b!==r&&n.call(b,a)&&(m=b);var w=v.prototype=d.prototype=Object.create(m);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function O(t,r){function i(o,a,c,u){var l=f(t[o],t,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):r.resolve(h).then((function(e){s.value=e,c(s)}),(function(e){return i("throw",e,c,u)}))}u(l.arg)}var a;o(this,"_invoke",{value:function(e,t){function n(){return new r((function(r,n){i(e,t,r,n)}))}return a=a?a.then(n,n):n()}})}function P(e,t,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 R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=C(a,r);if(c){if(c===h)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 u=f(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function C(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:R}}function R(){return{value:void 0,done:!0}}return p.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:p,configurable:!0}),p.displayName=l(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},S(O.prototype),l(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(w),l(w,u,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=E,x.prototype={constructor:x,reset:function(e){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),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.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 c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){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(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function m(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(l){return void r(l)}c.done?t(u):Promise.resolve(u).then(n,o)}function g(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){m(i,n,o,a,c,"next",e)}function c(e){m(i,n,o,a,c,"throw",e)}a(void 0)}))}}System.register(["@ibiz-template/model","vue","@ibiz-template/vue-util","@ibiz-template/runtime","@ibiz-template/core"],(function(e,n){"use strict";var o,i,l,h,p,v,m,b,w,S,O,P,C,k,j;return{setters:[function(e){o=e.GridModel,i=e.ModelUtil},function(e){l=e.defineComponent,h=e.h,p=e.ref,v=e.computed,m=e.getCurrentInstance,b=e.watch,w=e.onUnmounted},function(e){S=e.useNamespace,O=e.useGridController},function(e){P=e.PluginStaticResource,C=e.UIActionHandler},function(e){k=e.RuntimeError,j=e.downloadFileFromBlob}],execute:function(){var x=l({name:"WFToolbar",props:{wfLinks:{type:Array,required:!0}},setup:function(e,t){var r=t.emit,n=S("wf-toolbar"),o=function(){var e=g(y().mark((function e(t,n){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r("wf-link-click",t,n);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),i=function(){var e=g(y().mark((function e(t,r){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout((function(){o(t,r)}),30);case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();return{ns:n,handleClick:i}},render:function(){var e=this,t=this.wfLinks||[];return h("div",{class:"".concat(this.ns.b())},[t.length>0&&t.map((function(t){var r=t.sequenceFlowName.startsWith("驳回")||t.sequenceFlowName.startsWith("取消");return h("div",{key:t.sequenceFlowId,class:[e.ns.e("item"),r?e.ns.em("item","reject"):""]},[h("i-button",{attrs:{title:t.sequenceFlowName},on:{click:function(r){return e.handleClick(t,r)}}},[t.sequenceFlowName||""])])}))])}});function E(e,t){var r,n,o=[];"GROUPGRIDCOLUMN"===e.source.columnType&&e.children.forEach((function(e){o.push(E(e,t))}));var i={title:e.title,width:"STAR"===e.source.widthUnit?void 0:e.width,minWidth:e.width,align:(null===(r=e.source.align)||void 0===r?void 0:r.toLowerCase())||"center",slot:e.codeName,key:e.codeName,fieldName:e.deFieldName,ellipsis:!0,tooltip:!1,resizable:!0,sortable:!(t.noSort||!e.source.enableSort)&&"custom",columnType:e.source.columnType,userParams:e.source.userParams,className:null===(n=e.source.getCellPSSysCss())||void 0===n?void 0:n.cssName};return o.length>0&&Object.assign(i,{children:o}),i}function R(e){var t=e.model,r=[],n=t.columns.map((function(t){return E(t,e)}));return t.children.forEach((function(e){var t=n.find((function(t){return t.key===e.codeName}));t&&r.push(t)})),e.singleSelect||r.splice(0,0,{type:"selection",width:60}),r}var L=l({props:{modelData:o,context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},gridRowActiveMode:{type:Number,default:2},modal:{type:Object}},setup:function(e){var t=m().proxy,r=S("grid"),n=O(t,e.modelData,e.context,e.params),o=function(e){var t=p([]);return e.nerve.self.evt.on("created",(function(){t.value=R(e)})),[v((function(){var e=d(t.value);if(!e.find((function(e){return!e.width}))){var r=e.length-1;"rowEdit"===e[r].key&&(r-=1),e[r]=s(s({},e[r]),{},{width:void 0})}var n=e.find((function(e){return"UAGRIDCOLUMN"===e.columnType}));if(n){var o=n.userParams;o&&"true"===o.fixed&&(n.fixed="right")}return e})),t]}(n),i=u(o,1)[0],a=function(e){var t=function(t){return e.items.find((function(e){return e.srfkey===t.srfkey}))};return{onRowClick:function(r){var n=t(r);if(e.singleSelect){var o=e.selectedData.find((function(e){return e.srfkey===r.srfkey}));e.onSelectionChange(o?[]:[n])}e.onRowClick(n)},onDbRowClick:function(r){e.onDbRowClick(t(r))},onSelectionChange:function(r){if(!e.singleSelect){var n=[];r.forEach((function(e){var r=t(e);r&&n.push(r)})),e.onSelectionChange(n)}},onSortChange:function(t){var r=t.column,n=t.order,o="asc"===n||"desc"===n?n:void 0;e.setSort(r.fieldName,o),e.load()}}}(n),c=a.onRowClick,l=a.onDbRowClick,f=a.onSelectionChange,y=a.onSortChange,g=function(e){return{onPageChange:function(t){t&&t!==e.curPage&&(e.curPage=t,e.load())},onPageSizeChange:function(t){t&&t!==e.size&&(e.size=t,1===e.curPage&&e.load())},onPageReset:function(){e.curPage=1,e.load()}}}(n),P=g.onPageChange,C=g.onPageReset,k=g.onPageSizeChange,j=v((function(){var t,r,n=null===(t=e.modelData)||void 0===t||null===(r=t.source.getPSControlParam())||void 0===r?void 0:r.ctrlParams;return"false"!==(null==n?void 0:n.HIGHLIGHT)})),x=null,E=p(0),L=p(null),N=p(null),T=null,z=0,I=function(){var t;if(L.value&&"EMBED"!==(null===(t=e.modal)||void 0===t?void 0:t.mode))if(n.model.source.enablePagingBar&&N.value){var r=N.value.$el,o=r.offsetHeight+parseFloat(window.getComputedStyle(r).paddingTop);E.value=L.value.offsetHeight-o}else E.value=L.value.offsetHeight;n.model.source.height>0&&(E.value=n.model.source.height)};b(L,(function(e,t){e&&e!==t&&(I(),window.ResizeObserver&&L.value&&(T=new ResizeObserver((function(e){var t=e[0].contentRect.height;t!==z&&(I(),z=t)}))).observe(L.value))})),w((function(){T&&T.disconnect()}));var _=v((function(){return[{hiddenRow:!0}].concat(d(n.items))})),D=S("grid-field-column"),A=S("collaborative-satisfaction-grid"),U=p([]),G=v((function(){var e=d(i.value);return e.splice.apply(e,[1,0].concat(d(U.value))),e})),F=p([]);return b((function(){return n.items}),(function(){U.value=[],F.value=[],Array.isArray(n.items)&&(U.value=n.items.map((function(e){var t=e.bpjbm,r=e.type;return{title:t,width:120,minWidth:120,align:"right",key:r,ellipsis:!0,tooltip:!1,resizable:!0,render:function(e,t){var n=t.index,o=F.value[n-1];return h("div",{class:[D.b()],style:D.cssVarBlock({"justify-content":"flex-end"})},[h("span",{class:D.e("text")},[(null==o?void 0:o[r])||""])])}}})),F.value=n.items.map((function(e){try{var t=JSON.parse(e.pjdbs||"[]");if(Array.isArray(t)&&t.length){var r={};return t.forEach((function(e){r[e.type]=e.value||""})),r}}catch(n){ibiz.log.error("".concat(e.pjdbs," 解析错误"))}return{}})))})),{c:n,ns:r,columns:i,tableData:_,onDbRowClick:l,onUIRowClick:function(e,r){null!=x&&window.clearTimeout(x),x=window.setTimeout((function(){var o=t.$refs.grid;o&&(n.selectedData.find((function(t){return t.srfkey===e.srfkey}))&&o.clearCurrentRow(),o.toggleSelect&&o.toggleSelect(r));c(e)}),300)},onUIDbRowClick:function(e){null!=x&&window.clearTimeout(x);var r=t.$refs.grid;r&&(n.selectedData.find((function(t){return t.srfkey===e.srfkey}))||r.clearCurrentRow());l(e)},onSelectionChange:f,onSortChange:y,onPageChange:P,onPageSizeChange:k,onPageReset:C,tableHeight:E,gridRef:L,girdPaginationRef:N,highlight:j,ns2:D,ns3:A,tableColumns:G}},render:function(){var e=this;if(this.c.complete){var t={};return this.c.model.columns.forEach((function(r){if("GROUPGRIDCOLUMN"!==r.source.columnType){var n=r.codeName;t[n]=function(t){var r=t.row,o=t.index,i=e.c.rows[o-1];return r.hiddenRow?h("span",{style:"word-break: break-word;white-space: pre-wrap;"},["隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列隐藏行的列"]):i?h(e.c.providers[n].component,{props:{controller:e.c.columns[n],row:i},key:r.srfkey+n}):void 0}}})),h("control-layout",{attrs:{modelData:this.c.model}},[h("div",{ref:"gridRef",class:[this.ns.b(),this.ns.is("show-header",!this.c.model.source.hideHeader),this.ns.is("enable-page",this.c.model.source.enablePagingBar),this.ns3.b()]},[h("i-table",{ref:"grid",attrs:{height:this.tableHeight,"show-header":!this.c.model.source.hideHeader,"highlight-row":this.c.singleSelect&&this.highlight,data:this.tableData,columns:this.tableColumns,"row-class-name":function(e){return e.hiddenRow?"hidden-row":""}},class:this.ns.b("content"),on:{"on-row-click":this.onUIRowClick,"on-row-dblclick":this.onUIDbRowClick,"on-selection-change":this.onSelectionChange,"on-sort-change":this.onSortChange},scopedSlots:t}),this.c.model.source.enablePagingBar&&h("app-grid-pagination",{ref:"girdPaginationRef",attrs:{total:this.c.total,curPage:this.c.curPage,size:this.c.size},on:{change:this.onPageChange,"page-size-change":this.onPageSizeChange,"page-reset":this.onPageReset}})])])}}}),N=a((function e(){c(this,e),f(this,"component","IndexView")})),T=new P(n.meta.url),z=function(e){!function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&t(e,r)}(i,e);var n,o=r(i);function i(){return c(this,i),o.apply(this,arguments)}return a(i,[{key:"execAction",value:(n=g(y().mark((function e(t,r,n,o,i){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ibiz.net.request("/ibzsy/xtmydcphzdc",{method:"post",data:o,responseType:"blob",baseURL:ibiz.env.baseUrl}).then((function(e){if(200!==e.status)throw new k("下载文件失败");if(!e.data)throw new k("文件流数据不存在");var t=e.headers.filename,r=decodeURIComponent(t);j(e.data,r)})),e.abrupt("return",{refresh:!1});case 3:case"end":return e.stop()}}),e)}))),function(e,t,r,o,i){return n.apply(this,arguments)})}]),i}(C),I=function(){function e(){c(this,e),f(this,"handler",void 0)}var t;return a(e,[{key:"getHandler",value:(t=g(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.handler||(this.handler=new z),e.abrupt("return",this.handler);case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),_=a((function e(){c(this,e),f(this,"component","CollaborativeSatisfactionGrid")}));e("default",{mateUrl:n.meta.url,install:function(e){i.getModelService().then((function(e){"true"===e.app.userParams.autoWidth&&document.getElementsByClassName("app")[0].classList.add("auto-width")})),T.loadStyle(["/style.css"]),e.component("WfToolbar",x),ibiz.config.enableDataInfoBar=!1,ibiz.config.gridEditShowMode="all",ibiz.register.view.register("VIEW_CUSTOM_GsIndexCSS",new N),e.component("CollaborativeSatisfactionGrid",L),ibiz.register.control.register("CUSTOM_CollaborativeSatisfactionGrid",new _),ibiz.register.uiAction.register("DEUIACTION_CollaborativeSatisfactionPort",new I)}})}}}))}();
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册