提交 415b88e4 编写于 作者: jlj05024111@163.com's avatar jlj05024111@163.com

feat: 更新插件包sy-web

上级 d5870a3d
var ce = Object.defineProperty; var ue = Object.defineProperty;
var de = (e, t, s) => t in e ? ce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s; var he = (e, s, t) => s in e ? ue(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
var U = (e, t, s) => (de(e, typeof t != "symbol" ? t + "" : t, s), s); var I = (e, s, t) => (he(e, typeof s != "symbol" ? s + "" : s, t), t);
import { IndexViewModel as ue, GridModel as he, ViewType as me, ModelUtil as pe } from "@ibiz-template/model"; import { IndexViewModel as me, GridModel as pe, ViewType as fe, ModelUtil as ge } from "@ibiz-template/model";
import { GridFieldColumnController as Z, GridRowController as X, WFStepTraceViewController as fe, UploadEditorController as J, GridController as ge, GridNotifyState as we, WFDynaEditView3Controller as ve } from "@ibiz-template/controller"; import { GridFieldColumnController as X, GridRowController as J, WFStepTraceViewController as ve, UploadEditorController as Q, GridController as we, GridNotifyState as be, WFDynaEditView3Controller as ye } from "@ibiz-template/controller";
import { defineComponent as L, computed as D, h as c, getCurrentInstance as A, ref as g, watch as P, toRefs as $, onUnmounted as be } from "vue"; import { defineComponent as U, computed as $, h as c, getCurrentInstance as A, ref as v, watch as T, toRefs as z, onUnmounted as Ce } from "vue";
import { useNamespace as E, useViewController as Q, usePropsWatch as B, getUploadProps as ye, getEditorEmits as K, getGridUploadProps as z, getGridEditorEmits as _, useClickOutside as Ce, useEventListener as xe, getInputProps as ke, getGridInputProps as Fe, useGridCellEditor as Se, useControlController as Le, useWFStepTraceViewController as Ee, useEditView3Controller as Ue } from "@ibiz-template/vue-util"; import { useNamespace as N, useViewController as K, usePropsWatch as B, getUploadProps as xe, getEditorEmits as Y, getGridUploadProps as _, getGridEditorEmits as j, useClickOutside as ke, useEventListener as Fe, getInputProps as Se, getGridInputProps as Le, useGridCellEditor as Ee, useControlController as Ue, useWFStepTraceViewController as Pe, useEditView3Controller as Ne } from "@ibiz-template/vue-util";
import { colorBlend as Pe, HttpError as Y, isImage as Ne, uploadFile as Ie, RuntimeError as Te } from "@ibiz-template/core"; import { colorBlend as Ie, HttpError as ee, isImage as Te, uploadFile as De, RuntimeError as Me } from "@ibiz-template/core";
import { getCookie as De, createUUID as W } from "qx-util"; import { getCookie as $e, createUUID as V } from "qx-util";
import { debounce as Me } from "lodash-es"; import { debounce as Re } from "lodash-es";
import { safeRedirect as Re, ViewMode as ee, UIActionHandler as te, PluginStaticResource as Ae } from "@ibiz-template/runtime"; import { safeRedirect as Ae, ViewMode as te, UIActionHandler as se, PluginStaticResource as Ge } from "@ibiz-template/runtime";
const Ge = L({ const Oe = U({
name: "CodeListGridColumn", name: "CodeListGridColumn",
props: { props: {
controller: { controller: {
type: Z, type: X,
required: !0 required: !0
}, },
row: { row: {
type: X, type: J,
required: !0 required: !0
} }
}, },
setup(e) { setup(e) {
const t = E("grid-field-column"), s = D(() => { const s = N("grid-field-column"), t = $(() => {
var r; var n;
if (e.controller.model.source.cLConvertMode !== "FRONT") if (e.controller.model.source.cLConvertMode !== "FRONT")
return []; return [];
const n = e.row.data[e.controller.model.codeName]; const r = e.row.data[e.controller.model.codeName];
return (r = e.controller.codeListItems) != null && r.length && n ? n.split(",").map((m) => { return (n = e.controller.codeListItems) != null && n.length && r ? r.split(",").map((h) => {
const p = e.controller.codeListItems.find((f) => f.value === m); const p = e.controller.codeListItems.find((g) => g.value === h);
if (p) { if (p) {
const f = p.color || "#515a6e"; const g = p.color || "#515a6e";
return { return {
text: p.text, text: p.text,
colorStyle: t.cssVarBlock({ colorStyle: s.cssVarBlock({
color: f, color: g,
"border-color": f, "border-color": g,
"bg-color": Pe(f, "#fff") "bg-color": Ie(g, "#fff")
}) })
}; };
} }
}).filter(Boolean) : []; }).filter(Boolean) : [];
}), o = (n) => { }), o = (r) => {
e.controller.isLinkColumn && e.controller.openLinkView(e.row, n); e.controller.isLinkColumn && e.controller.openLinkView(e.row, r);
}, i = D(() => { }, i = $(() => {
let n = ""; let r = "";
switch (e.controller.model.align) { switch (e.controller.model.align) {
case "LEFT": case "LEFT":
n = "flex-start"; r = "flex-start";
break; break;
case "RIGHT": case "RIGHT":
n = "flex-end"; r = "flex-end";
break; break;
default: default:
n = "center"; r = "center";
break; break;
} }
return t.cssVarBlock({ return s.cssVarBlock({
"justify-content": n "justify-content": r
}); });
}); });
return { return {
ns: t, ns: s,
alignStyle: i, alignStyle: i,
selectedItems: s, selectedItems: t,
onCellClick: o onCellClick: o
}; };
}, },
render() { render() {
const e = this.controller, t = this.row.data[e.model.codeName]; const e = this.controller, s = this.row.data[e.model.codeName];
return c("div", { return c("div", {
class: [this.ns.b(), e.isLinkColumn && this.ns.m("link-column")], class: [this.ns.b(), e.isLinkColumn && this.ns.m("link-column")],
style: this.alignStyle, style: this.alignStyle,
on: { on: {
click: this.onCellClick click: this.onCellClick
} }
}, [this.selectedItems.length > 0 ? this.selectedItems.map((s) => c("span", { }, [this.selectedItems.length > 0 ? this.selectedItems.map((t) => c("span", {
class: this.ns.e("code-list-item"), class: this.ns.e("code-list-item"),
style: s.colorStyle style: t.colorStyle
}, [s.text])) : c("span", { }, [t.text])) : c("span", {
class: this.ns.e("text") class: this.ns.e("text")
}, [t])]); }, [s])]);
} }
}); });
class Oe extends fe { class ze extends ve {
constructor() { constructor() {
super(...arguments); super(...arguments);
/** /**
...@@ -92,16 +92,16 @@ class Oe extends fe { ...@@ -92,16 +92,16 @@ class Oe extends fe {
* @type {string} * @type {string}
* @memberof PresetWFChartViewController * @memberof PresetWFChartViewController
*/ */
U(this, "imgSrc"); I(this, "imgSrc");
} }
async getUIData() { async getUIData() {
const s = Object.assign(this.context.clone(), this.params), o = await this.entityService.wf.getWFProcessDiagram(s), i = new Blob([o.data], { const t = Object.assign(this.context.clone(), this.params), o = await this.entityService.wf.getWFProcessDiagram(t), i = new Blob([o.data], {
type: "image/svg+xml" type: "image/svg+xml"
}); });
this.imgSrc = URL.createObjectURL(i); this.imgSrc = URL.createObjectURL(i);
} }
} }
const $e = L({ const Be = U({
name: "PresetWFChartView", name: "PresetWFChartView",
props: { props: {
context: Object, context: Object,
...@@ -121,12 +121,12 @@ const $e = L({ ...@@ -121,12 +121,12 @@ const $e = L({
} }
}, },
setup(e) { setup(e) {
const t = E("preset-wf-chart-view"), { const s = N("preset-wf-chart-view"), {
proxy: s proxy: t
} = A(), o = Q(s, (i, n) => new Oe(e.modelPath, i, n)); } = A(), o = K(t, (i, r) => new ze(e.modelPath, i, r));
return B(s, "deName", o.setDeName.bind(o)), { return B(t, "deName", o.setDeName.bind(o)), {
c: o, c: o,
ns: t ns: s
}; };
}, },
render() { render() {
...@@ -139,7 +139,7 @@ const $e = L({ ...@@ -139,7 +139,7 @@ const $e = L({
})]); })]);
} }
}); });
const Be = L({ const _e = U({
name: "WFToolbar", name: "WFToolbar",
props: { props: {
wfLinks: { wfLinks: {
...@@ -148,16 +148,16 @@ const Be = L({ ...@@ -148,16 +148,16 @@ const Be = L({
} }
}, },
setup(e, { setup(e, {
emit: t emit: s
}) { }) {
const s = E("wf-toolbar"), o = async (n, r) => { const t = N("wf-toolbar"), o = async (r, n) => {
t("wf-link-click", n, r); s("wf-link-click", r, n);
}; };
return { return {
ns: s, ns: t,
handleClick: async (n, r) => { handleClick: async (r, n) => {
setTimeout(() => { setTimeout(() => {
o(n, r); o(r, n);
}, 30); }, 30);
} }
}; };
...@@ -166,200 +166,209 @@ const Be = L({ ...@@ -166,200 +166,209 @@ const Be = L({
const e = this.wfLinks || []; const e = this.wfLinks || [];
return c("div", { return c("div", {
class: `${this.ns.b()}` class: `${this.ns.b()}`
}, [e.length > 0 && e.map((t) => { }, [e.length > 0 && e.map((s) => {
const s = t.sequenceFlowName == "驳回" || t.sequenceFlowName == "取消", o = t.sequenceFlowName.startsWith("保存") || t.sequenceFlowName.startsWith("关闭") || t.sequenceFlowName.startsWith("保存并关闭"); const t = s.sequenceFlowName == "驳回" || s.sequenceFlowName == "取消", o = s.sequenceFlowName.startsWith("保存") || s.sequenceFlowName.startsWith("关闭") || s.sequenceFlowName.startsWith("保存并关闭");
return c("div", { return c("div", {
key: t.sequenceFlowId, key: s.sequenceFlowId,
class: [this.ns.e("item"), o ? this.ns.em("item", "plain") : "", s ? this.ns.em("item", "reject") : ""] class: [this.ns.e("item"), o ? this.ns.em("item", "plain") : "", t ? this.ns.em("item", "reject") : ""]
}, [c("i-button", { }, [c("i-button", {
attrs: { attrs: {
title: t.sequenceFlowName title: s.sequenceFlowName
}, },
on: { on: {
click: (i) => this.handleClick(t, i) click: (i) => this.handleClick(s, i)
} }
}, [t.sequenceFlowName || ""])]); }, [s.sequenceFlowName || ""])]);
})]); })]);
} }
}), ze = typeof btoa == "function", j = typeof Buffer == "function"; }), je = typeof btoa == "function", W = typeof Buffer == "function";
typeof TextDecoder == "function" && new TextDecoder(); typeof TextDecoder == "function" && new TextDecoder();
const V = typeof TextEncoder == "function" ? new TextEncoder() : void 0, _e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", R = Array.prototype.slice.call(_e); const q = typeof TextEncoder == "function" ? new TextEncoder() : void 0, We = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", R = Array.prototype.slice.call(We);
((e) => { ((e) => {
let t = {}; let s = {};
return e.forEach((s, o) => t[s] = o), t; return e.forEach((t, o) => s[t] = o), s;
})(R); })(R);
const T = String.fromCharCode.bind(String); const M = String.fromCharCode.bind(String);
typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array); typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array);
const je = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), We = (e) => { const Ve = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (s) => s == "+" ? "-" : "_"), qe = (e) => {
let t, s, o, i, n = ""; let s, t, o, i, r = "";
const r = e.length % 3; const n = e.length % 3;
for (let a = 0; a < e.length; ) { for (let a = 0; a < e.length; ) {
if ((s = e.charCodeAt(a++)) > 255 || (o = e.charCodeAt(a++)) > 255 || (i = e.charCodeAt(a++)) > 255) if ((t = e.charCodeAt(a++)) > 255 || (o = e.charCodeAt(a++)) > 255 || (i = e.charCodeAt(a++)) > 255)
throw new TypeError("invalid character found"); throw new TypeError("invalid character found");
t = s << 16 | o << 8 | i, n += R[t >> 18 & 63] + R[t >> 12 & 63] + R[t >> 6 & 63] + R[t & 63]; s = t << 16 | o << 8 | i, r += R[s >> 18 & 63] + R[s >> 12 & 63] + R[s >> 6 & 63] + R[s & 63];
} }
return r ? n.slice(0, r - 3) + "===".substring(r) : n; return n ? r.slice(0, n - 3) + "===".substring(n) : r;
}, se = ze ? (e) => btoa(e) : j ? (e) => Buffer.from(e, "binary").toString("base64") : We, Ve = j ? (e) => Buffer.from(e).toString("base64") : (e) => { }, oe = je ? (e) => btoa(e) : W ? (e) => Buffer.from(e, "binary").toString("base64") : qe, He = W ? (e) => Buffer.from(e).toString("base64") : (e) => {
let s = []; let t = [];
for (let o = 0, i = e.length; o < i; o += 4096) for (let o = 0, i = e.length; o < i; o += 4096)
s.push(T.apply(null, e.subarray(o, o + 4096))); t.push(M.apply(null, e.subarray(o, o + 4096)));
return se(s.join("")); return oe(t.join(""));
}, qe = (e) => { }, Ze = (e) => {
if (e.length < 2) { if (e.length < 2) {
var t = e.charCodeAt(0); var s = e.charCodeAt(0);
return t < 128 ? e : t < 2048 ? T(192 | t >>> 6) + T(128 | t & 63) : T(224 | t >>> 12 & 15) + T(128 | t >>> 6 & 63) + T(128 | t & 63); return s < 128 ? e : s < 2048 ? M(192 | s >>> 6) + M(128 | s & 63) : M(224 | s >>> 12 & 15) + M(128 | s >>> 6 & 63) + M(128 | s & 63);
} else { } else {
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320); var s = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
return T(240 | t >>> 18 & 7) + T(128 | t >>> 12 & 63) + T(128 | t >>> 6 & 63) + T(128 | t & 63); return M(240 | s >>> 18 & 7) + M(128 | s >>> 12 & 63) + M(128 | s >>> 6 & 63) + M(128 | s & 63);
} }
}, He = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Ze = (e) => e.replace(He, qe), q = j ? (e) => Buffer.from(e, "utf8").toString("base64") : V ? (e) => Ve(V.encode(e)) : (e) => se(Ze(e)), oe = (e, t = !1) => t ? je(q(e)) : q(e); }, Xe = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, Je = (e) => e.replace(Xe, Ze), H = W ? (e) => Buffer.from(e, "utf8").toString("base64") : q ? (e) => He(q.encode(e)) : (e) => oe(Je(e)), ie = (e, s = !1) => s ? Ve(H(e)) : H(e);
function Xe(e, t, s) { function Qe(e, s, t) {
var k; var y;
const o = g([]), i = g({ const o = v([]), i = v({
Authorization: `Bearer ${De("access_token")}` Authorization: `Bearer ${$e("access_token")}`
}), n = g(""), r = g(""), a = { }), r = v(""), n = v(""), a = {
count: 0, count: 0,
cacheFiles: [] cacheFiles: []
// iview上传过程中不能改default-file-list,所以需要缓存 // iview上传过程中不能改default-file-list,所以需要缓存
}, d = (k = s.editorParams) == null ? void 0 : k.blackList; }, l = (y = t.editorParams) == null ? void 0 : y.blackList;
let m = []; let h = [];
d && typeof d == "string" && (m = d.split(",")), P( l && typeof l == "string" && (h = l.split(",")), T(
() => e.value, () => e.value,
(l) => { (d) => {
o.value = l ? JSON.parse(l) : []; o.value = d ? JSON.parse(d) : [];
}, },
{ immediate: !0 } { immediate: !0 }
), P( ), T(
() => e.data, () => e.data,
(l) => { (d) => {
if (l) { if (d) {
const h = s.calcBaseUrl(l); const m = t.calcBaseUrl(d);
n.value = h.uploadUrl, r.value = h.downloadUrl; r.value = m.uploadUrl, n.value = m.downloadUrl;
} }
}, },
{ immediate: !0, deep: !0 } { immediate: !0, deep: !0 }
), P( ), T(
o, o,
(l) => { (d) => {
l != null && l.length && r.value && l.forEach((h) => { d != null && d.length && n.value && d.forEach((m) => {
h.url = h.url || r.value.replace("%fileId%", h.id); m.url = m.url || n.value.replace("%fileId%", m.id);
}); });
}, },
{ immediate: !0 } { immediate: !0 }
), P( ), T(
r, n,
(l) => { (d) => {
l && o.value.length && o.value.forEach((h) => { d && o.value.length && o.value.forEach((m) => {
h.url = r.value.replace("%fileId%", h.id); m.url = n.value.replace("%fileId%", m.id);
}); });
}, },
{ immediate: !0 } { immediate: !0 }
); );
const p = () => { const p = () => {
const l = [...o.value, ...a.cacheFiles], h = l.length > 0 ? JSON.stringify(l.map((b) => ({ name: b.name, id: b.id }))) : null; const d = [...o.value, ...a.cacheFiles], m = d.length > 0 ? JSON.stringify(d.map((w) => ({ name: w.name, id: w.id }))) : null;
a.cacheFiles = [], t(h); a.cacheFiles = [], s(m);
}, f = (l) => { }, g = (d) => {
const h = l.name.trim().toLowerCase(); const m = d.name.split(".").pop() || "";
if (m.some((C) => h.endsWith(`.${C}`))) if (t.whiteList && t.whiteList.length > 0 && !t.whiteList.includes(m))
return ibiz.message.error(`不可上传 ${m.join("、")}类型的文件!`), !1; return ibiz.message.error(`${d.name} 文件格式不正确`, 2.5, !0), !1;
if (d.size > t.defaultSize * 1024 * 1024)
return ibiz.message.error(
`${d.name} 超出限制,请选择小于${t.defaultSize}MB的文件`,
2.5,
!0
), !1;
const w = d.name.trim().toLowerCase();
if (h.some((F) => w.endsWith(`.${F}`)))
return ibiz.message.error(`不可上传 ${h.join("、")}类型的文件!`), !1;
a.count += 1; a.count += 1;
}, F = (l) => { }, C = (d) => {
l && (a.cacheFiles.push({ d && (a.cacheFiles.push({
name: l.filename, name: d.filename,
id: l.fileid id: d.fileid
}), a.count -= 1, a.count === 0 && p()); }), a.count -= 1, a.count === 0 && p());
}, y = (l, h) => { }, b = (d, m) => {
throw a.count -= 1, new Y({ throw a.count -= 1, new ee({
response: { data: h, status: l.status } response: { data: m, status: d.status }
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
}); });
}, x = (l) => { }, x = (d) => {
if (e.disabled) if (e.disabled)
return; return;
const h = o.value.findIndex((b) => b.id === l.id); const m = o.value.findIndex((w) => w.id === d.id);
h !== -1 && o.value.splice(h, 1), p(); m !== -1 && o.value.splice(m, 1), p();
}, w = (l) => { }, k = (d) => {
const b = (s.parent.form || s.parent.grid).model.appEntity.deName, C = `${l.id}|${b}|${e.data.srfkey}|${s.context.srfpersonid || s.context.srfuserid}`, M = l.url || r.value.replace("%fileId%", l.id); const w = (t.parent.form || t.parent.grid).model.appEntity.deName, P = `${d.id}|${w}|${e.data.srfkey}|${t.context.srfpersonid || t.context.srfuserid}`, F = d.url || n.value.replace("%fileId%", d.id);
s.fileDownload({ t.fileDownload({
url: `${M}?key=${window.btoa(C)}${Math.floor( url: `${F}?key=${window.btoa(P)}${Math.floor(
1e3 + Math.random() * 9e3 1e3 + Math.random() * 9e3
)}`, )}`,
name: l.name name: d.name
}); });
}, u = g(!1), v = g(""), N = g(""); }, u = v(!1), f = v(""), E = v("");
return { return {
uploadUrl: n, uploadUrl: r,
downloadUrl: r, downloadUrl: n,
headers: i, headers: i,
files: o, files: o,
onDownload: w, onDownload: k,
onError: y, onError: b,
onRemove: x, onRemove: x,
onSuccess: F, onSuccess: C,
beforeUpload: f, beforeUpload: g,
showModal: u, showModal: u,
modalTitle: v, modalTitle: f,
iframeUrl: N, iframeUrl: E,
onModalCancel: () => { onModalCancel: () => {
u.value = !1, v.value = "", N.value = ""; u.value = !1, f.value = "", E.value = "";
}, },
previewFile: (l) => { previewFile: (d) => {
u.value = !0, v.value = l.name; u.value = !0, f.value = d.name;
const h = window.Environment.previewFileUrl; const m = window.Environment.previewFileUrl;
if (h) { if (m) {
const b = encodeURIComponent( const w = encodeURIComponent(
oe( ie(
`${window.location.origin}${l.url}?fullfilename=${l.name}` `${window.location.origin}${d.url}?fullfilename=${d.name}`
) )
); );
N.value = `${h}/onlinePreview?url=${b}`; E.value = `${m}/onlinePreview?url=${w}`;
} }
} }
}; };
} }
const Je = L({ const Ke = U({
name: "SyFileUpload", name: "SyFileUpload",
props: ye(), props: xe(),
emits: K(), emits: Y(),
setup(e, { setup(e, {
emit: t emit: s
}) { }) {
const s = E("sy-file-upload"), o = e.controller, { const t = N("sy-file-upload"), o = e.controller, {
uploadUrl: i, uploadUrl: i,
headers: n, headers: r,
files: r, files: n,
onDownload: a, onDownload: a,
onError: d, onError: l,
onRemove: m, onRemove: h,
onSuccess: p, onSuccess: p,
beforeUpload: f, beforeUpload: g,
showModal: F, showModal: C,
modalTitle: y, modalTitle: b,
iframeUrl: x, iframeUrl: x,
onModalCancel: w, onModalCancel: k,
previewFile: u previewFile: u
} = Xe(e, (I) => { } = Qe(e, (D) => {
t("change", I); s("change", D);
}, o), v = D(() => o.editorParams.showPreview ? o.editorParams.showPreview === "true" : window.Environment.kkviewon); }, o), f = $(() => o.editorParams.showPreview ? o.editorParams.showPreview === "true" : window.Environment.kkviewon);
return { return {
ns: s, ns: t,
c: o, c: o,
uploadUrl: i, uploadUrl: i,
headers: n, headers: r,
files: r, files: n,
onDownload: a, onDownload: a,
onError: d, onError: l,
onRemove: m, onRemove: h,
onSuccess: p, onSuccess: p,
beforeUpload: f, beforeUpload: g,
showModal: F, showModal: C,
modalTitle: y, modalTitle: b,
iframeUrl: x, iframeUrl: x,
onModalCancel: w, onModalCancel: k,
onPreview: (I) => { onPreview: (D) => {
v.value && u(I); f.value && u(D);
}, },
showPreview: v showPreview: f
}; };
}, },
render(e) { render(e) {
...@@ -406,9 +415,9 @@ const Je = L({ ...@@ -406,9 +415,9 @@ const Je = L({
class: this.ns.b("accept-description") class: this.ns.b("accept-description")
}, [this.c.uploadDescription])]), e("div", { }, [this.c.uploadDescription])]), e("div", {
class: this.ns.b("file-list") class: this.ns.b("file-list")
}, [this.files.map((t) => e("div", { }, [this.files.map((s) => e("div", {
class: this.ns.b("file-item"), class: this.ns.b("file-item"),
key: t.id key: s.id
}, [e("div", { }, [e("div", {
class: this.ns.b("file-item-right") class: this.ns.b("file-item-right")
}, [e("div", { }, [e("div", {
...@@ -455,14 +464,14 @@ const Je = L({ ...@@ -455,14 +464,14 @@ const Je = L({
})])])])])]), e("div", { })])])])])]), e("div", {
class: this.ns.b("file-item-right-title"), class: this.ns.b("file-item-right-title"),
on: { on: {
click: () => this.onPreview(t) click: () => this.onPreview(s)
} }
}, [t.name]), e("div", { }, [s.name]), e("div", {
class: this.ns.b("file-item-right-action") class: this.ns.b("file-item-right-action")
}, [e("span", { }, [e("span", {
class: this.ns.e("icon-download"), class: this.ns.e("icon-download"),
on: { on: {
click: () => this.onDownload(t) click: () => this.onDownload(s)
} }
}, [e("svg", { }, [e("svg", {
attrs: { attrs: {
...@@ -504,7 +513,7 @@ const Je = L({ ...@@ -504,7 +513,7 @@ const Je = L({
})])])])]), this.showPreview ? e("span", { })])])])]), this.showPreview ? e("span", {
class: this.ns.e("icon-preview"), class: this.ns.e("icon-preview"),
on: { on: {
click: () => this.onPreview(t) click: () => this.onPreview(s)
} }
}, [e("svg", { }, [e("svg", {
attrs: { attrs: {
...@@ -553,7 +562,7 @@ const Je = L({ ...@@ -553,7 +562,7 @@ const Je = L({
})])])])])]) : null, this.disabled || this.readonly ? null : e("span", { })])])])])]) : null, this.disabled || this.readonly ? null : e("span", {
class: this.ns.e("icon-remove"), class: this.ns.e("icon-remove"),
on: { on: {
click: () => this.onRemove(t) click: () => this.onRemove(s)
} }
}, [e("svg", { }, [e("svg", {
attrs: { attrs: {
...@@ -616,55 +625,80 @@ const Je = L({ ...@@ -616,55 +625,80 @@ const Je = L({
})])]); })])]);
} }
}); });
function O(e, t) { function O(e, s, t, o) {
if (e.url = t.replace("%fileId%", e.id), e.status || (e.status = "finished"), !e.fileName) { var n, a;
const s = e.name.lastIndexOf("."); const i = s.replace("%fileId%", e.id), r = ((n = t.parent) == null ? void 0 : n.form) || ((a = t.parent) == null ? void 0 : a.grid);
e.fileName = e.name.substring(0, s), e.fileExt = e.name.substring(s), e.isImage = Ne(e.name); if (r) {
const l = r.model.appEntity.deName, h = `${e.id}|${l}|${o.srfkey}|${t.context.srfpersonid || t.context.srfuserid}`;
e.url = `${i}?key=${window.btoa(h)}${Math.floor(
1e3 + Math.random() * 9e3
)}`;
}
if (e.status || (e.status = "finished"), !e.fileName) {
const l = e.name.lastIndexOf(".");
e.fileName = e.name.substring(0, l), e.fileExt = e.name.substring(l), e.isImage = Te(e.name);
} }
return e; return e;
} }
function ie(e) { function ne(e) {
const t = g(""), s = g(""), o = g([]); const s = v(""), t = v(""), o = v([]);
return P( return T(
e.data, e.data,
(i) => { (i) => {
if (i) { if (i) {
const n = e.controller.value.calcBaseUrl(i); const r = e.controller.value.calcBaseUrl(i);
t.value = n.uploadUrl, s.value = n.downloadUrl; s.value = r.uploadUrl, t.value = r.downloadUrl;
} }
}, },
{ immediate: !0, deep: !0 } { immediate: !0, deep: !0 }
), P( ), T(
e.value, e.value,
(i) => { (i) => {
o.value = i ? JSON.parse(i) : [], o.value.length && s.value && o.value.forEach((n) => { o.value = i ? JSON.parse(i) : [], o.value.length && t.value && o.value.forEach((r) => {
O(n, s.value); O(
r,
t.value,
e.controller.value,
e.data.value
);
}); });
}, },
{ immediate: !0 } { immediate: !0 }
), P( ), T(
s, t,
(i) => { (i) => {
i && o.value.length && o.value.forEach((n) => { i && o.value.length && o.value.forEach((r) => {
O(n, i); O(
r,
i,
e.controller.value,
e.data.value
);
}); });
}, },
{ immediate: !0 } { immediate: !0 }
), { ), {
downloadUrl: s, downloadUrl: t,
uploadUrl: t, uploadUrl: s,
valueList: o valueList: o
}; };
} }
function ne(e) { function re(e) {
var S, k; var y, d;
const t = g("undo"), s = g([]), { downloadUrl: o, value: i, uploadUrl: n, controller: r } = e, a = (k = (S = r == null ? void 0 : r.value) == null ? void 0 : S.editorParams) == null ? void 0 : k.blackList; const s = v("undo"), t = v([]), { downloadUrl: o, value: i, uploadUrl: r, controller: n, data: a } = e, l = (d = (y = n == null ? void 0 : n.value) == null ? void 0 : y.editorParams) == null ? void 0 : d.blackList;
let d = []; let h = [];
a && typeof a == "string" && (d = a.split(",")), P( l && typeof l == "string" && (h = l.split(",")), T(
i, i,
(l) => { (m) => {
l.length > 0 && (s.value = [], l.forEach((h) => { m.length > 0 && (t.value = [], m.forEach((w) => {
s.value.push(O(h, o.value)); t.value.push(
O(
w,
o.value,
n.value,
a.value
)
);
})); }));
}, },
{ {
...@@ -672,126 +706,133 @@ function ne(e) { ...@@ -672,126 +706,133 @@ function ne(e) {
deep: !0 deep: !0
} }
); );
const m = (l, h) => { const p = (m, w) => {
const b = []; if (m.some((L) => L.size > n.value.defaultSize * 1024 * 1024 ? (ibiz.message.error(
return h.forEach((C, M) => { `${L.name} 超出限制,请选择小于${n.value.defaultSize}MB的文件`,
const G = C.name.trim().toLowerCase(); 2.5,
if (d.some((le) => G.endsWith(`.${le}`))) { !0
b.push(M); ), !0) : n.value.whiteList && n.value.whiteList.length > 0 && !n.value.whiteList.includes(L.name) ? (ibiz.message.error(`${L.name} 文件格式不正确`, 2.5, !0), !0) : !1))
return !1;
const F = [];
return w.forEach((L, G) => {
const ce = L.name.trim().toLowerCase();
if (h.some((de) => ce.endsWith(`.${de}`))) {
F.push(G);
return; return;
} }
s.value.push({ t.value.push({
name: C.name, name: L.name,
status: C.status, status: L.status,
percentage: C.percentage, percentage: L.percentage,
id: C.uid, id: L.uid,
url: "" url: ""
}); });
}), b.length === h.length ? (ibiz.message.error(`不可上传 ${d.join("、")}类型的文件!`), !1) : (b.length && (b.forEach((C) => { }), F.length === w.length ? (ibiz.message.error(`不可上传 ${h.join("、")}类型的文件!`), !1) : (F.length && (F.forEach((L) => {
l.splice(C, 1), h.splice(C, 1); m.splice(L, 1), w.splice(L, 1);
}), ibiz.message.error(`不可上传 ${d.join("、")}类型的文件!`)), !0); }), ibiz.message.error(`不可上传 ${h.join("、")}类型的文件!`)), !0);
}, p = (l) => { }, g = (m) => {
l.forEach((h) => { m.forEach((w) => {
s.value.find((b) => b.id === h.uid ? (b.percentage = h.percentage, !0) : !1); t.value.find((P) => P.id === w.uid ? (P.percentage = w.percentage, !0) : !1);
}); });
}, f = (l, h) => { }, C = (m, w) => {
l.forEach((b) => { m.forEach((P) => {
s.value.find((C) => C.id === b.uid ? (C.status = b.status, C.id = h.data.fileid, C.name = h.data.filename, O(C, o.value), !0) : !1); t.value.find((F) => F.id === P.uid ? (F.status = P.status, F.id = w.data.fileid, F.name = w.data.filename, O(F, o.value, n.value, a.value), !0) : !1);
}); });
}, F = (l, h) => { }, b = (m, w) => {
var C; var F;
l.forEach((M) => { m.forEach((L) => {
s.value.find((G) => G.id === M.uid ? (G.status = M.status, !0) : !1); t.value.find((G) => G.id === L.uid ? (G.status = L.status, !0) : !1);
}); });
const b = new Y(h); const P = new ee(w);
ibiz.notification.error({ ibiz.notification.error({
title: (C = b.status) == null ? void 0 : C.toString(), title: (F = P.status) == null ? void 0 : F.toString(),
desc: b.message, desc: P.message,
duration: 10 duration: 10
}); });
}, y = (l) => { }, x = (m) => {
s.value = s.value.filter((h) => h.status === "finished"), t.value = "done"; t.value = t.value.filter((w) => w.status === "finished"), s.value = "done";
}, x = () => { }, k = () => {
Ie({ De({
multiple: e.multiple, multiple: e.multiple,
accept: e.accept, accept: e.accept,
uploadUrl: n.value, uploadUrl: r.value,
beforeUpload: m, beforeUpload: p,
progress: p, progress: g,
success: f, success: C,
error: F, error: b,
finish: y finish: x
}); });
}, w = g(!1), u = g(""), v = g(""); }, u = v(!1), f = v(""), E = v("");
return { return {
selectFile: x, selectFile: k,
fileList: s, fileList: t,
uploadState: t, uploadState: s,
showModal: w, showModal: u,
modalTitle: u, modalTitle: f,
iframeUrl: v, iframeUrl: E,
onModalCancel: () => { onModalCancel: () => {
w.value = !1, u.value = "", v.value = ""; u.value = !1, f.value = "", E.value = "";
}, },
previewFile: (l) => { previewFile: (m) => {
w.value = !0, u.value = l.name; u.value = !0, f.value = m.name;
const h = window.Environment.previewFileUrl; const w = window.Environment.previewFileUrl;
if (h) { if (w) {
const b = encodeURIComponent( const P = encodeURIComponent(
oe( ie(
`${window.location.origin}${l.url}?fullfilename=${l.name}` `${window.location.origin}${m.url}?fullfilename=${m.name}`
) )
); );
v.value = `${h}/onlinePreview?url=${b}`; E.value = `${w}/onlinePreview?url=${P}`;
} }
} }
}; };
} }
const Qe = L({ const Ye = U({
name: "SyGridFileUpload", name: "SyGridFileUpload",
props: z(), props: _(),
setup(e) { setup(e) {
const t = E("sy-grid-file-upload"), { const s = N("sy-grid-file-upload"), {
value: s, value: t,
data: o, data: o,
controller: i controller: i
} = $(e), { } = z(e), {
downloadUrl: n, downloadUrl: r,
uploadUrl: r, uploadUrl: n,
valueList: a valueList: a
} = ie({ } = ne({
value: s, value: t,
data: o, data: o,
controller: i controller: i
}), { }), {
fileList: d, fileList: l,
showModal: m, showModal: h,
modalTitle: p, modalTitle: p,
iframeUrl: f, iframeUrl: g,
previewFile: F, previewFile: C,
onModalCancel: y onModalCancel: b
} = ne({ } = re({
downloadUrl: n, downloadUrl: r,
uploadUrl: r, uploadUrl: n,
value: a, value: a,
controller: i controller: i,
data: o
}), x = (u) => { }), x = (u) => {
const v = e.controller, I = v.parent.grid.model.appEntity.deName, S = `${u.id}|${I}|${o.value.srfkey}|${v.context.srfpersonid || v.context.srfuserid}`, k = u.url || n.value.replace("%fileId%", u.id); const f = e.controller, D = f.parent.grid.model.appEntity.deName, S = `${u.id}|${D}|${o.value.srfkey}|${f.context.srfpersonid || f.context.srfuserid}`, y = u.url || r.value.replace("%fileId%", u.id);
v.fileDownload({ f.fileDownload({
url: `${k}?key=${window.btoa(S)}${Math.floor(1e3 + Math.random() * 9e3)}`, url: `${y}?key=${window.btoa(S)}${Math.floor(1e3 + Math.random() * 9e3)}`,
name: u.name name: u.name
}); });
}, w = D(() => e.controller.editorParams.showPreview ? e.controller.editorParams.showPreview === "true" : window.Environment.kkviewon); }, k = $(() => e.controller.editorParams.showPreview ? e.controller.editorParams.showPreview === "true" : window.Environment.kkviewon);
return { return {
ns: t, ns: s,
fileList: d, fileList: l,
showModal: m, showModal: h,
modalTitle: p, modalTitle: p,
iframeUrl: f, iframeUrl: g,
showPreview: w, showPreview: k,
downloadFile: x, downloadFile: x,
previewFile: F, previewFile: C,
onModalCancel: y onModalCancel: b
}; };
}, },
render() { render() {
...@@ -839,10 +880,10 @@ const Qe = L({ ...@@ -839,10 +880,10 @@ const Qe = L({
} }
})])]); })])]);
} }
}), Ke = L({ }), et = U({
name: "SyGridFileUploadContainer", name: "SyGridFileUploadContainer",
props: z(), props: _(),
emits: _(), emits: j(),
render(e) { render(e) {
return this.disabled || this.readonly ? e("SyGridFileUpload", { return this.disabled || this.readonly ? e("SyGridFileUpload", {
props: { props: {
...@@ -853,8 +894,8 @@ const Qe = L({ ...@@ -853,8 +894,8 @@ const Qe = L({
...this.$props ...this.$props
}, },
on: { on: {
change: (t, s) => { change: (s, t) => {
this.$emit("change", t, s); this.$emit("change", s, t);
}, },
rowSave: () => { rowSave: () => {
this.$emit("rowSave"); this.$emit("rowSave");
...@@ -863,7 +904,7 @@ const Qe = L({ ...@@ -863,7 +904,7 @@ const Qe = L({
}); });
} }
}); });
const Ye = L({ const tt = U({
name: "SyEditGridFileUploadPopover", name: "SyEditGridFileUploadPopover",
props: { props: {
uploadUrl: { uploadUrl: {
...@@ -879,7 +920,7 @@ const Ye = L({ ...@@ -879,7 +920,7 @@ const Ye = L({
required: !0 required: !0
}, },
controller: { controller: {
type: J, type: Q,
required: !0 required: !0
}, },
data: { data: {
...@@ -891,44 +932,46 @@ const Ye = L({ ...@@ -891,44 +932,46 @@ const Ye = L({
close: (e) => !0 close: (e) => !0
}, },
setup(e, { setup(e, {
emit: t emit: s
}) { }) {
const s = E("sy-edit-grid-file-upload-popover"), { const t = N("sy-edit-grid-file-upload-popover"), {
downloadUrl: o, downloadUrl: o,
value: i, value: i,
uploadUrl: n, uploadUrl: r,
controller: r controller: n,
} = $(e), { data: a
fileList: a, } = z(e), {
uploadState: d, fileList: l,
selectFile: m uploadState: h,
} = ne({ selectFile: p
} = re({
downloadUrl: o, downloadUrl: o,
value: i, value: i,
uploadUrl: n, uploadUrl: r,
controller: r controller: n,
}), p = g(), f = g(!1), F = Ce(p, async (w) => { data: a
t("close", { }), g = v(), C = v(!1), b = ke(g, async (u) => {
isModified: f.value, s("close", {
resultFiles: a.value isModified: C.value,
resultFiles: l.value
}); });
}); });
return P(d, (w) => { return T(h, (u) => {
w === "done" ? (f.value = !0, F.proceed()) : w === "loading" && F.pause(); u === "done" ? (C.value = !0, b.proceed()) : u === "loading" && b.pause();
}), { }), {
ns: s, ns: t,
componentRef: p, componentRef: g,
fileList: a, fileList: l,
deleteFile: (w) => { deleteFile: (u) => {
const u = a.value.findIndex((v) => v.id === w.id); const f = l.value.findIndex((E) => E.id === u.id);
a.value.splice(u, 1), f.value = !0; l.value.splice(f, 1), C.value = !0;
}, },
selectFile: m, selectFile: p,
downloadFile: (w) => { downloadFile: (u) => {
const u = e.controller, N = u.parent.grid.model.appEntity.deName, I = `${w.id}|${N}|${e.data.srfkey}|${u.context.srfpersonid || u.context.srfuserid}`, S = w.url || o.value.replace("%fileId%", w.id); const f = e.controller, D = f.parent.grid.model.appEntity.deName, S = `${u.id}|${D}|${e.data.srfkey}|${f.context.srfpersonid || f.context.srfuserid}`, y = u.url || o.value.replace("%fileId%", u.id);
u.fileDownload({ f.fileDownload({
url: `${S}?key=${window.btoa(I)}${Math.floor(1e3 + Math.random() * 9e3)}`, url: `${y}?key=${window.btoa(S)}${Math.floor(1e3 + Math.random() * 9e3)}`,
name: w.name name: u.name
}); });
} }
}; };
...@@ -971,68 +1014,68 @@ const Ye = L({ ...@@ -971,68 +1014,68 @@ const Ye = L({
}, [this.controller.uploadDescription])]); }, [this.controller.uploadDescription])]);
} }
}); });
const et = L({ const st = U({
name: "SyEditGridFileUpload", name: "SyEditGridFileUpload",
props: z(), props: _(),
emits: _(), emits: j(),
setup(e, { setup(e, {
emit: t emit: s
}) { }) {
const s = E("sy-edit-grid-file-upload"), { const t = N("sy-edit-grid-file-upload"), {
value: o, value: o,
data: i, data: i,
controller: n controller: r
} = $(e), { } = z(e), {
downloadUrl: r, downloadUrl: n,
uploadUrl: a, uploadUrl: a,
valueList: d valueList: l
} = ie({ } = ne({
value: o, value: o,
data: i, data: i,
controller: n controller: r
}), m = g(), p = async () => { }), h = v(), p = async () => {
if (!m.value) if (!h.value)
throw new Te("容器元素不存在"); throw new Me("容器元素不存在");
const f = m.value.$el, F = f.offsetHeight, y = ibiz.overlay.createPopover((u) => u(Ye, { const g = h.value.$el, C = g.offsetHeight, b = ibiz.overlay.createPopover((u) => u(tt, {
props: { props: {
value: d.value, value: l.value,
data: i.value, data: i.value,
uploadUrl: a.value, uploadUrl: a.value,
downloadUrl: r.value, downloadUrl: n.value,
controller: n.value controller: r.value
}, },
on: { on: {
close: (v) => { close: (f) => {
y.dismiss(v); b.dismiss(f);
} }
} }
}), void 0, { }), void 0, {
noArrow: !0, noArrow: !0,
placement: "bottom-start", placement: "bottom-start",
offsetOpts: { offsetOpts: {
mainAxis: -F, mainAxis: -C,
crossAxis: 0 crossAxis: 0
} }
}); });
await y.present(f); await b.present(g);
const { const {
isModified: x, isModified: x,
resultFiles: w resultFiles: k
} = await y.onWillDismiss(); } = await b.onWillDismiss();
if (x) { if (x) {
const u = w.length > 0 ? JSON.stringify(w.map((v) => ({ const u = k.length > 0 ? JSON.stringify(k.map((f) => ({
name: v.name, name: f.name,
id: v.id id: f.id
}))) : null; }))) : null;
t("change", u), t("rowSave"); s("change", u), s("rowSave");
} }
}; };
return xe(m, "click", (f) => { return Fe(h, "click", (g) => {
e.disabled || p(); !e.disabled && !e.readonly && p();
}), { }), {
ns: s, ns: t,
valueList: d, valueList: l,
componentRef: m componentRef: h
}; };
}, },
render() { render() {
...@@ -1053,16 +1096,16 @@ const et = L({ ...@@ -1053,16 +1096,16 @@ const et = L({
}, [e.name])]))])]); }, [e.name])]))])]);
} }
}); });
L({ U({
name: "SyInput", name: "SyInput",
props: ke(), props: Se(),
emits: K(), emits: Y(),
setup(e, { setup(e, {
emit: t emit: s
}) { }) {
const s = E("input"), i = e.controller.model, n = g(), r = g(2); const t = N("input"), i = e.controller.model, r = v(), n = v(2);
i.editorType === "TEXTAREA_10" && (r.value = 10); i.editorType === "TEXTAREA_10" && (n.value = 10);
const a = D(() => { const a = $(() => {
switch (i.editorType) { switch (i.editorType) {
case "TEXTBOX": case "TEXTBOX":
return "text"; return "text";
...@@ -1074,37 +1117,37 @@ L({ ...@@ -1074,37 +1117,37 @@ L({
default: default:
return "string"; return "string";
} }
}), d = g(""); }), l = v("");
P(() => e.value, (u, v) => { T(() => e.value, (u, f) => {
u !== v && (u ? d.value = u : d.value = ""); u !== f && (u ? l.value = u : l.value = "");
}, { }, {
immediate: !0 immediate: !0
}); });
let m = !1, p, f; let h = !1, p, g;
const F = Me((u) => { const C = Re((u) => {
f !== u.target.value && t("change", u.target.value), f = void 0, m = !1, p && p(); g !== u.target.value && s("change", u.target.value), g = void 0, h = !1, p && p();
}, 300, { }, 300, {
leading: !0 leading: !0
}), y = (u) => { }), b = (u) => {
m = !0, F(u); h = !0, C(u);
}, x = (u) => { }, x = (u) => {
u && u.code === "Enter" && m && (p = () => { u && u.code === "Enter" && h && (p = () => {
n.value.$el.dispatchEvent(u); r.value.$el.dispatchEvent(u);
}); });
}, w = () => { }, k = () => {
f = n.value.currentValue, t("change", f); g = r.value.currentValue, s("change", g);
}; };
return e.autoFocus && P(n, (u) => { return e.autoFocus && T(r, (u) => {
u && u.$el.getElementsByTagName("input")[0].focus(); u && u.$el.getElementsByTagName("input")[0].focus();
}), { }), {
ns: s, ns: t,
rows: r, rows: n,
type: a, type: a,
currentVal: d, currentVal: l,
handleChange: y, handleChange: b,
handleKeyUp: x, handleKeyUp: x,
handleBlur: w, handleBlur: k,
inputRef: n inputRef: r
}; };
}, },
render() { render() {
...@@ -1134,28 +1177,28 @@ L({ ...@@ -1134,28 +1177,28 @@ L({
}, [this.controller.model.unitName])])]); }, [this.controller.model.unitName])])]);
} }
}); });
L({ U({
name: "SyGridInput", name: "SyGridInput",
props: Fe(), props: Le(),
emits: _(), emits: j(),
setup(e, { setup(e, {
emit: t emit: s
}) { }) {
const s = E("grid-input"), { const t = N("grid-input"), {
isInfoMode: o, isInfoMode: o,
autoFocus: i, autoFocus: i,
componentRef: n, componentRef: r,
onOperateChange: r, onOperateChange: n,
onChange: a onChange: a
} = Se(e, { } = Ee(e, {
emit: t emit: s
}); });
return { return {
ns: s, ns: t,
isInfoMode: o, isInfoMode: o,
autoFocus: i, autoFocus: i,
componentRef: n, componentRef: r,
onOperateChange: r, onOperateChange: n,
onChange: a onChange: a
}; };
}, },
...@@ -1181,23 +1224,23 @@ L({ ...@@ -1181,23 +1224,23 @@ L({
})]); })]);
} }
}); });
function H(e, t) { function Z(e, s) {
return c("div", { return c("div", {
class: e.e("logo") class: e.e("logo")
}, [t.appIconPath ? c("img", { }, [s.appIconPath ? c("img", {
class: e.e("logo-img"), class: e.e("logo-img"),
attrs: { attrs: {
src: t.appIconPath src: s.appIconPath
} }
}) : null, c("div", { }) : null, c("div", {
class: e.e("logo-caption") class: e.e("logo-caption")
}, [t.caption])]); }, [s.caption])]);
} }
const tt = L({ const ot = U({
name: "UserAppLayout", name: "UserAppLayout",
props: { props: {
model: { model: {
type: ue, type: me,
required: !0 required: !0
}, },
// 视图是否完成加载 // 视图是否完成加载
...@@ -1212,20 +1255,20 @@ const tt = L({ ...@@ -1212,20 +1255,20 @@ const tt = L({
} }
}, },
setup(e, { setup(e, {
emit: t emit: s
}) { }) {
const s = E("layout"), o = g(!1), i = () => { const t = N("layout"), o = v(!1), i = () => {
o.value = !o.value, t("onCollapseChange", o.value); o.value = !o.value, s("onCollapseChange", o.value);
}, n = D(() => e.model.source.blankMode === !0), r = D(() => !!(window.Environment.manualdownloadurl || ibiz.env.manualdownloadurl)); }, r = $(() => e.model.source.blankMode === !0), n = $(() => !!(window.Environment.manualdownloadurl || ibiz.env.manualdownloadurl));
return { return {
ns: s, ns: t,
collapseChange: o, collapseChange: o,
isBlank: n, isBlank: r,
collapseMenus: i, collapseMenus: i,
isShowDownload: r, isShowDownload: n,
downloadUserBook: () => { downloadUserBook: () => {
const d = window.Environment.manualdownloadurl || ibiz.env.manualdownloadurl; const l = window.Environment.manualdownloadurl || ibiz.env.manualdownloadurl;
d ? Re(d, { l ? Ae(l, {
type: "_blank" type: "_blank"
}) : console.log("环境变量里没有manualdownloadurl"); }) : console.log("环境变量里没有manualdownloadurl");
} }
...@@ -1240,13 +1283,13 @@ const tt = L({ ...@@ -1240,13 +1283,13 @@ const tt = L({
value: this.collapseChange value: this.collapseChange
}, },
class: [this.ns.b("nav"), this.ns.is("collapse", this.collapseChange)] class: [this.ns.b("nav"), this.ns.is("collapse", this.collapseChange)]
}, [H(this.ns, this.model), this.$slots.menu]), c("i-layout", { }, [Z(this.ns, this.model), this.$slots.menu]), c("i-layout", {
class: [this.ns.b("content")] class: [this.ns.b("content")]
}, [c("i-header", { }, [c("i-header", {
class: this.ns.b("header") class: this.ns.b("header")
}, [c("div", { }, [c("div", {
class: this.ns.be("header", "left") class: this.ns.be("header", "left")
}, [H(this.ns, this.model), c("div", { }, [Z(this.ns, this.model), c("div", {
class: this.ns.be("header", "collapse-icon") class: this.ns.be("header", "collapse-icon")
}, [this.collapseChange ? c("ion-icon", { }, [this.collapseChange ? c("ion-icon", {
attrs: { attrs: {
...@@ -1280,17 +1323,17 @@ const tt = L({ ...@@ -1280,17 +1323,17 @@ const tt = L({
}, [this.$slots.tabPageExp, this.$slots.default])])]) : null; }, [this.$slots.tabPageExp, this.$slots.default])])]) : null;
} }
}); });
function re(e, t) { function ae(e, s) {
var n; var r;
const s = t.firstColName, o = []; const t = s.firstColName, o = [];
e.source.columnType === "GROUPGRIDCOLUMN" && e.children.forEach((r) => { e.source.columnType === "GROUPGRIDCOLUMN" && e.children.forEach((n) => {
o.push(re(r, t)); o.push(ae(n, s));
}); });
const i = { const i = {
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: ((n = e.source.align) == null ? void 0 : n.toLowerCase()) || "center", align: ((r = e.source.align) == null ? void 0 : r.toLowerCase()) || "center",
slot: e.codeName, slot: e.codeName,
key: e.codeName, key: e.codeName,
fieldName: e.deFieldName, fieldName: e.deFieldName,
...@@ -1298,74 +1341,74 @@ function re(e, t) { ...@@ -1298,74 +1341,74 @@ function re(e, t) {
tooltip: !1, tooltip: !1,
// todo 表格提示用title // todo 表格提示用title
resizable: !0, resizable: !0,
sortable: !t.noSort && e.source.enableSort ? "custom" : !1, sortable: !s.noSort && e.source.enableSort ? "custom" : !1,
columnType: e.source.columnType, columnType: e.source.columnType,
tree: e.codeName === s, tree: e.codeName === t,
className: e.codeName === s ? "grid-group-grid-column" : "" className: e.codeName === t ? "grid-group-grid-column" : ""
}; };
return o.length > 0 && Object.assign(i, { children: o }), i; return o.length > 0 && Object.assign(i, { children: o }), i;
} }
function st(e) { function it(e) {
const t = e.model, s = [], o = t.columns.map((i) => re(i, e)); const s = e.model, t = [], o = s.columns.map((i) => ae(i, e));
return t.children.forEach((i) => { return s.children.forEach((i) => {
const n = o.find((a) => a.key === i.codeName), r = e.groupField; const r = o.find((a) => a.key === i.codeName), n = e.groupField;
n && i.codeName !== r && s.push(n); r && i.codeName !== n && t.push(r);
}), e.singleSelect || s.splice(0, 0, { type: "selection", width: 60 }), s; }), e.singleSelect || t.splice(0, 0, { type: "selection", width: 60 }), t;
} }
function ot(e) { function nt(e) {
const t = g([]); const s = v([]);
return e.nerve.self.evt.on("created", () => { return e.nerve.self.evt.on("created", () => {
t.value = st(e); s.value = it(e);
}), [D(() => { }), [$(() => {
const o = [...t.value]; const o = [...s.value];
if (!o.find((r) => !r.width)) { if (!o.find((n) => !n.width)) {
let r = o.length - 1; let n = o.length - 1;
o[r].key === "rowEdit" && (r -= 1), o[r] = { o[n].key === "rowEdit" && (n -= 1), o[n] = {
...o[r], ...o[n],
width: void 0 width: void 0
}; };
} }
const n = o.find((r) => r.columnType === "UAGRIDCOLUMN"); const r = o.find((n) => n.columnType === "UAGRIDCOLUMN");
return n && (n.fixed = "right"), o; return r && (r.fixed = "right"), o;
}), t]; }), s];
} }
function it(e) { function rt(e) {
const t = (r) => e.items.find((a) => a.srfkey === r.srfkey); const s = (n) => e.items.find((a) => a.srfkey === n.srfkey);
function s(r) { function t(n) {
const a = t(r); const a = s(n);
e.singleSelect && e.onSelectionChange([a]), e.onRowClick(a); e.singleSelect && e.onSelectionChange([a]), e.onRowClick(a);
} }
function o(r) { function o(n) {
e.onDbRowClick(t(r)); e.onDbRowClick(s(n));
} }
function i(r) { function i(n) {
if (!e.singleSelect) { if (!e.singleSelect) {
const a = []; const a = [];
r.forEach((d) => { n.forEach((l) => {
const m = t(d); const h = s(l);
m && a.push(m); h && a.push(h);
}), e.onSelectionChange(a); }), e.onSelectionChange(a);
} }
} }
function n(r) { function r(n) {
const { column: a, order: d } = r, m = d === "asc" || d === "desc" ? d : void 0; const { column: a, order: l } = n, h = l === "asc" || l === "desc" ? l : void 0;
e.setSort(a.fieldName, m), e.load(); e.setSort(a.fieldName, h), e.load();
} }
return { onRowClick: s, onDbRowClick: o, onSelectionChange: i, onSortChange: n }; return { onRowClick: t, onDbRowClick: o, onSelectionChange: i, onSortChange: r };
} }
function nt(e) { function at(e) {
function t(i) { function s(i) {
!i || i === e.curPage || (e.curPage = i, e.load()); !i || i === e.curPage || (e.curPage = i, e.load());
} }
function s(i) { function t(i) {
!i || i === e.size || (e.size = i, e.curPage === 1 && e.load()); !i || i === e.size || (e.size = i, 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: s, onPageSizeChange: t, onPageReset: o };
} }
class rt extends ge { class lt extends we {
constructor() { constructor() {
super(...arguments); super(...arguments);
/** /**
...@@ -1374,7 +1417,7 @@ class rt extends ge { ...@@ -1374,7 +1417,7 @@ class rt extends ge {
* @author: zhujiamin * @author: zhujiamin
* @Date: 2023-10-09 14:00:38 * @Date: 2023-10-09 14:00:38
*/ */
U(this, "groups", []); I(this, "groups", []);
/** /**
* 分组名称属性 * 分组名称属性
* *
...@@ -1382,7 +1425,7 @@ class rt extends ge { ...@@ -1382,7 +1425,7 @@ class rt extends ge {
* @date 2024-12-19 10:12:56 * @date 2024-12-19 10:12:56
* @type {string} * @type {string}
*/ */
U(this, "groupField", ""); I(this, "groupField", "");
/** /**
* 第一列名称 * 第一列名称
* *
...@@ -1390,16 +1433,16 @@ class rt extends ge { ...@@ -1390,16 +1433,16 @@ class rt extends ge {
* @date 2024-12-19 10:12:30 * @date 2024-12-19 10:12:30
* @type {string} * @type {string}
*/ */
U(this, "firstColName", ""); I(this, "firstColName", "");
} }
async onInit() { async onInit() {
const s = this.model.columns.find( const t = this.model.columns.find(
(i) => { (i) => {
var n; var r;
return (n = i.source) == null ? void 0 : n.groupItem; return (r = i.source) == null ? void 0 : r.groupItem;
} }
); );
s && (this.groupField = s.codeName); t && (this.groupField = t.codeName);
const o = this.model.columns.find((i) => i.codeName !== this.groupField && !i.source.hideDefault && !i.source.hiddenDataItem); const o = this.model.columns.find((i) => i.codeName !== this.groupField && !i.source.hideDefault && !i.source.hiddenDataItem);
o && (this.firstColName = o.codeName), await super.onInit(); o && (this.firstColName = o.codeName), await super.onInit();
} }
...@@ -1409,15 +1452,15 @@ class rt extends ge { ...@@ -1409,15 +1452,15 @@ class rt extends ge {
* @author lxm * @author lxm
* @date 2022-08-19 14:08:50 * @date 2022-08-19 14:08:50
*/ */
async afterLoad(s) { async afterLoad(t) {
return await Promise.allSettled( return await Promise.allSettled(
Object.values(this.fieldColumns).map(async (o) => { Object.values(this.fieldColumns).map(async (o) => {
await o.loadCodeList(); await o.loadCodeList();
}) })
), this.rows = s.map((o) => { ), this.rows = t.map((o) => {
const i = new X(o, this); const i = new J(o, this);
return this.gridStateNotify(i, we.LOAD), i; return this.gridStateNotify(i, be.LOAD), i;
}), this.handleGroup(s), s; }), this.handleGroup(t), t;
} }
/** /**
* 处理分组数据 * 处理分组数据
...@@ -1426,29 +1469,29 @@ class rt extends ge { ...@@ -1426,29 +1469,29 @@ class rt extends ge {
* @author: zhujiamin * @author: zhujiamin
* @Date: 2023-10-09 14:03:17 * @Date: 2023-10-09 14:03:17
*/ */
handleGroup(s) { handleGroup(t) {
const o = /* @__PURE__ */ new Map(); const o = /* @__PURE__ */ new Map();
s.forEach((i) => { t.forEach((i) => {
const n = i[this.groupField]; const r = i[this.groupField];
o.has(n) || o.set(n, []), o.has(n) && o.get(n).push(i); o.has(r) || o.set(r, []), o.has(r) && o.get(r).push(i);
}), this.groups = [], o.forEach((i, n) => { }), this.groups = [], o.forEach((i, r) => {
this.groups.push({ this.groups.push({
caption: `${n}`, caption: `${r}`,
key: n, key: r,
children: i children: i
}); });
}); });
} }
} }
function at(e, t, s, o = {}) { function ct(e, s, t, o = {}) {
return Le(e, () => { return Ue(e, () => {
const i = new rt(t, s, o); const i = new lt(s, t, o);
return B(e, "gridRowActiveMode", i.setGridRowActiveMode.bind(i)), i; return B(e, "gridRowActiveMode", i.setGridRowActiveMode.bind(i)), i;
}); });
} }
const lt = L({ const dt = U({
props: { props: {
modelData: he, modelData: pe,
context: { context: {
type: Object, type: Object,
required: !0 required: !0
...@@ -1475,99 +1518,99 @@ const lt = L({ ...@@ -1475,99 +1518,99 @@ const lt = L({
}, },
setup(e) { setup(e) {
const { const {
proxy: t proxy: s
} = A(), s = E("grid"), o = at(t, e.modelData, e.context, e.params), [i] = ot(o), { } = A(), t = N("grid"), o = ct(s, e.modelData, e.context, e.params), [i] = nt(o), {
onRowClick: n, onRowClick: r,
onDbRowClick: r, onDbRowClick: n,
onSelectionChange: a, onSelectionChange: a,
onSortChange: d onSortChange: l
} = it(o), { } = rt(o), {
onPageChange: m, onPageChange: h,
onPageReset: p, onPageReset: p,
onPageSizeChange: f onPageSizeChange: g
} = nt(o), F = (S, k) => { } = at(o), C = (S, y) => {
const l = t.$refs.grid; const d = s.$refs.grid;
l && (l.toggleSelect && l.toggleSelect(k), l.highlightCurrentRow && l.highlightCurrentRow(k)), n(S); d && (d.toggleSelect && d.toggleSelect(y), d.highlightCurrentRow && d.highlightCurrentRow(y)), r(S);
}, y = g(0), x = g(null), w = g(null); }, b = v(0), x = v(null), k = v(null);
let u = null, v = 0; let u = null, f = 0;
const N = () => { const E = () => {
var S; var S;
if (x.value && ((S = e.modal) == null ? void 0 : S.mode) !== "EMBED") if (x.value && ((S = e.modal) == null ? void 0 : S.mode) !== "EMBED")
if (o.model.source.enablePagingBar && w.value) { if (o.model.source.enablePagingBar && k.value) {
const k = w.value.$el, l = k.offsetHeight + parseFloat(window.getComputedStyle(k).paddingTop); const y = k.value.$el, d = y.offsetHeight + parseFloat(window.getComputedStyle(y).paddingTop);
y.value = x.value.offsetHeight - l; b.value = x.value.offsetHeight - d;
} else } else
y.value = x.value.offsetHeight; b.value = x.value.offsetHeight;
o.model.source.height > 0 && (y.value = o.model.source.height); o.model.source.height > 0 && (b.value = o.model.source.height);
}; };
P(x, (S, k) => { T(x, (S, y) => {
S && S !== k && (N(), window.ResizeObserver && x.value && (u = new ResizeObserver((l) => { S && S !== y && (E(), window.ResizeObserver && x.value && (u = new ResizeObserver((d) => {
const h = l[0].contentRect.height; const m = d[0].contentRect.height;
h !== v && (N(), v = h); m !== f && (E(), f = m);
}), u.observe(x.value))); }), u.observe(x.value)));
}), be(() => { }), Ce(() => {
u && u.disconnect(); u && u.disconnect();
}); });
const I = D(() => { const D = $(() => {
const S = []; const S = [];
return o.groups.forEach((k) => { return o.groups.forEach((y) => {
if (!k.children.length) if (!y.children.length)
return; return;
const h = [...k.children].shift(); const m = [...y.children].shift();
S.push({ S.push({
srfkey: k.caption, srfkey: y.caption,
isGroupData: !0, isGroupData: !0,
first: h, first: m,
children: k.children, children: y.children,
_showChildren: !0 _showChildren: !0
}); });
}), S; }), S;
}); });
return { return {
c: o, c: o,
ns: s, ns: t,
columns: i, columns: i,
tableData: I, tableData: D,
onDbRowClick: r, onDbRowClick: n,
onUIRowClick: F, onUIRowClick: C,
onSelectionChange: a, onSelectionChange: a,
onSortChange: d, onSortChange: l,
onPageChange: m, onPageChange: h,
onPageSizeChange: f, onPageSizeChange: g,
onPageReset: p, onPageReset: p,
tableHeight: y, tableHeight: b,
gridRef: x, gridRef: x,
girdPaginationRef: w girdPaginationRef: k
}; };
}, },
render() { render() {
if (!this.c.complete) if (!this.c.complete)
return; return;
const e = {}; const e = {};
return this.c.model.columns.forEach((t) => { return this.c.model.columns.forEach((s) => {
if (t.source.columnType === "GROUPGRIDCOLUMN") if (s.source.columnType === "GROUPGRIDCOLUMN")
return; return;
const s = t.codeName; const t = s.codeName;
e[s] = (o) => { e[t] = (o) => {
const { const {
row: i, row: i,
column: n column: r
} = o; } = o;
if (i.isGroupData && n.key === this.c.firstColName) if (i.isGroupData && r.key === this.c.firstColName)
return c("div", { return c("div", {
class: this.ns.b("sum"), class: this.ns.b("sum"),
attrs: { attrs: {
title: i.first[this.c.groupField] title: i.first[this.c.groupField]
} }
}, [c("span", [i.first[this.c.groupField]])]); }, [c("span", [i.first[this.c.groupField]])]);
const r = this.c.rows.find((a) => a.data.srfkey === i.srfkey); const n = this.c.rows.find((a) => a.data.srfkey === i.srfkey);
if (r) if (n)
return c(this.c.providers[s].component, { return c(this.c.providers[t].component, {
props: { props: {
controller: this.c.columns[s], controller: this.c.columns[t],
row: r row: n
}, },
key: i.srfkey + s key: i.srfkey + t
}); });
}; };
}), c("control-layout", { }), c("control-layout", {
...@@ -1610,26 +1653,26 @@ const lt = L({ ...@@ -1610,26 +1653,26 @@ const lt = L({
})])]); })])]);
} }
}); });
class ct { class ut {
constructor() { constructor() {
U(this, "component", $e); I(this, "component", Be);
} }
} }
class dt { class ht {
constructor() { constructor() {
U(this, "component", Ge); I(this, "component", Oe);
} }
async createController(t, s) { async createController(s, t) {
const o = new Z(t, s); const o = new X(s, t);
return await o.init(), o; return await o.init(), o;
} }
} }
class ut { class mt {
constructor() { constructor() {
U(this, "component", "IndexView"); I(this, "component", "IndexView");
} }
} }
const ae = L({ const le = U({
name: "WFStepTraceGrid", name: "WFStepTraceGrid",
props: { props: {
context: Object, context: Object,
...@@ -1650,55 +1693,55 @@ const ae = L({ ...@@ -1650,55 +1693,55 @@ const ae = L({
}, },
setup(e) { setup(e) {
const { const {
proxy: t proxy: s
} = A(), s = Ee(t, e.modelPath); } = A(), t = Pe(s, e.modelPath);
B(t, "deName", s.setDeName.bind(s)); B(s, "deName", t.setDeName.bind(t));
const o = E("wf-step-trace-grid"), i = g([]), n = (a, d, m = !1) => { const o = N("wf-step-trace-grid"), i = v([]), r = (a, l, h = !1) => {
a.identitylinks.length > 0 || a.comments.length > 0 && a.comments.forEach((p) => { a.identitylinks.length > 0 || a.comments.length > 0 && a.comments.forEach((p) => {
var f, F, y; var g, C, b;
m && p.type === "启动流程" || d.push({ h && p.type === "启动流程" || l.push({
id: W(), id: V(),
nodeName: a.userTaskName, nodeName: a.userTaskName,
personName: (f = p.authorName) == null ? void 0 : f.replace(/\([^)]*\)[^(]*$/, ""), personName: (g = p.authorName) == null ? void 0 : g.replace(/\([^)]*\)[^(]*$/, ""),
deptName: ((y = (F = p.authorName) == null ? void 0 : F.match(/.*\(([^)]*)\)[^(]*$/)) == null ? void 0 : y[1]) || "", deptName: ((b = (C = p.authorName) == null ? void 0 : C.match(/.*\(([^)]*)\)[^(]*$/)) == null ? void 0 : b[1]) || "",
time: p.time, time: p.time,
content: p.type, content: p.type,
comment: p.fullMessage comment: p.fullMessage
}); });
}); });
}; };
s.nerve.self.evt.on("mounted", () => { t.nerve.self.evt.on("mounted", () => {
var a; var a;
s.data && ((a = s.data.usertasks) == null || a.forEach((d) => { t.data && ((a = t.data.usertasks) == null || a.forEach((l) => {
if (d.usertasks && d.usertasks.length > 0) { if (l.usertasks && l.usertasks.length > 0) {
const m = []; const h = [];
d.usertasks.forEach((p) => { l.usertasks.forEach((p) => {
n(p, m, !0); r(p, h, !0);
}), i.value.push({ }), i.value.push({
id: W(), id: V(),
nodeName: `${d.userTaskName}`, nodeName: `${l.userTaskName}`,
personName: "", personName: "",
deptName: "", deptName: "",
time: "", time: "",
content: "", content: "",
comment: "", comment: "",
children: m, children: h,
_showChildren: !0 _showChildren: !0
}); });
} else } else
n(d, i.value); r(l, i.value);
}), i.value.sort((d, m) => Date.parse(d.time) - Date.parse(m.time))); }), i.value.sort((l, h) => Date.parse(l.time) - Date.parse(h.time)));
}); });
const r = g([{ const n = v([{
title: "序号", title: "序号",
key: "index", key: "index",
width: 60, width: 60,
resizable: !0, resizable: !0,
render: (a, d) => i.value.findIndex((p) => p.id === d.row.id) === -1 ? null : a("span", { render: (a, l) => i.value.findIndex((p) => p.id === l.row.id) === -1 ? null : a("span", {
style: { style: {
textAlign: "center" textAlign: "center"
} }
}, d.index + 1) }, l.index + 1)
}, { }, {
title: "审批人", title: "审批人",
key: "personName", key: "personName",
...@@ -1732,10 +1775,10 @@ const ae = L({ ...@@ -1732,10 +1775,10 @@ const ae = L({
width: 100 width: 100
}]); }]);
return { return {
c: s, c: t,
ns: o, ns: o,
gridData: i, gridData: i,
columns: r columns: n
}; };
}, },
render() { render() {
...@@ -1754,18 +1797,18 @@ const ae = L({ ...@@ -1754,18 +1797,18 @@ const ae = L({
})]); })]);
} }
}); });
class ht extends ve { class pt extends ye {
async calcWfToolbar() { async calcWfToolbar() {
await super.calcWfToolbar(), this.isEditable && this.wfLinks.unshift({ await super.calcWfToolbar(), this.isEditable && this.wfLinks.unshift({
sequenceFlowName: "保存", sequenceFlowName: "保存",
type: "FORM_SAVE" type: "FORM_SAVE"
}); });
} }
async onLinkClick(t) { async onLinkClick(s) {
t.type === "FORM_SAVE" ? await this.save() : super.onLinkClick(t); s.type === "FORM_SAVE" ? await this.save() : super.onLinkClick(s);
} }
} }
L({ U({
props: { props: {
context: Object, context: Object,
params: { params: {
...@@ -1781,26 +1824,26 @@ L({ ...@@ -1781,26 +1824,26 @@ L({
}, },
setup(e) { setup(e) {
const { const {
proxy: t proxy: s
} = A(), s = Q(t, (r, a) => new ht(e.modelPath, r, a)), o = E(`view-${me.DE_WF_DYNA_EDIT_VIEW3}`.toLowerCase()), i = g(["mainForm"]); } = A(), t = K(s, (n, a) => new pt(e.modelPath, n, a)), o = N(`view-${fe.DE_WF_DYNA_EDIT_VIEW3}`.toLowerCase()), i = v(["mainForm"]);
return { return {
c: s, c: t,
ns: o, ns: o,
onTabClick: (r) => { onTabClick: (n) => {
i.value.includes(r) || i.value.push(r); i.value.includes(n) || i.value.push(n);
}, },
lazyList: i lazyList: i
}; };
}, },
render(e) { render(e) {
const t = []; const s = [];
if (this.c.complete) { if (this.c.complete) {
const { const {
activeForm: s activeForm: t
} = this.c; } = this.c;
s && this.c.providers[s.name] && t.push(e(this.c.providers[s.name].component, { t && this.c.providers[t.name] && s.push(e(this.c.providers[t.name].component, {
props: { props: {
modelData: s, modelData: t,
context: this.c.context, context: this.c.context,
params: this.c.params params: this.c.params
}, },
...@@ -1813,14 +1856,14 @@ L({ ...@@ -1813,14 +1856,14 @@ L({
})); }));
} }
if (this.c.complete && this.c.model.drTab.pages[0]) { if (this.c.complete && this.c.model.drTab.pages[0]) {
const s = this.c.model.drTab.pages[0], o = this.c.drPages[s.source.name]; const t = this.c.model.drTab.pages[0], o = this.c.drPages[t.source.name];
t.push(e(ae, { s.push(e(le, {
attrs: { attrs: {
context: o.context, context: o.context,
params: o.params, params: o.params,
deName: this.c.model.appEntity.source.codeName, deName: this.c.model.appEntity.source.codeName,
modal: this.modal, modal: this.modal,
modelPath: s.embedView.source.modelPath modelPath: t.embedView.source.modelPath
} }
})); }));
} }
...@@ -1834,8 +1877,8 @@ L({ ...@@ -1834,8 +1877,8 @@ L({
wfLinks: this.c.wfLinks wfLinks: this.c.wfLinks
}, },
on: { on: {
"wf-link-click": (s) => { "wf-link-click": (t) => {
this.c.onLinkClick(s); this.c.onLinkClick(t);
} }
} }
})] : null })] : null
...@@ -1855,36 +1898,36 @@ L({ ...@@ -1855,36 +1898,36 @@ L({
label: this.c.model.drTab.source.editItemCaption, label: this.c.model.drTab.source.editItemCaption,
name: "mainForm" name: "mainForm"
} }
}, [t]), this.c.model.drTab.pages.map((s) => { }, [s]), this.c.model.drTab.pages.map((t) => {
const o = this.c.drPages[s.source.name]; const o = this.c.drPages[t.source.name];
return e("i-tab-pane", { return e("i-tab-pane", {
class: this.ns.be("", "tab-item"), class: this.ns.be("", "tab-item"),
attrs: { attrs: {
tab: this.c.model.drTab.source.name, tab: this.c.model.drTab.source.name,
disabled: this.c.isNewData, disabled: this.c.isNewData,
label: s.source.caption, label: t.source.caption,
name: s.source.name name: t.source.name
} }
}, [!this.c.isNewData && this.lazyList.includes(s.source.name) && e("ViewShell", { }, [!this.c.isNewData && this.lazyList.includes(t.source.name) && e("ViewShell", {
attrs: { attrs: {
context: o.context, context: o.context,
params: o.params, params: o.params,
modal: { modal: {
mode: ee.EMBED mode: te.EMBED
}, },
modelPath: s.embedView.source.modelPath, modelPath: t.embedView.source.modelPath,
// 流程跟踪视图用 // 流程跟踪视图用
deName: this.c.model.appEntity.source.codeName deName: this.c.model.appEntity.source.codeName
}, },
on: { on: {
neuronInit: this.c.nerve.onNeuronInit(s.source.name) neuronInit: this.c.nerve.onNeuronInit(t.source.name)
}, },
key: o.key key: o.key
})]); })]);
})])]); })])]);
} }
}); });
L({ U({
name: "SyEditView3", name: "SyEditView3",
props: { props: {
context: Object, context: Object,
...@@ -1901,13 +1944,13 @@ L({ ...@@ -1901,13 +1944,13 @@ L({
}, },
setup(e) { setup(e) {
const { const {
proxy: t proxy: s
} = A(), s = Ue(t, e.modelPath), o = E("view-deeditview3"), i = g(["mainForm"]); } = A(), t = Ne(s, e.modelPath), o = N("view-deeditview3"), i = v(["mainForm"]);
return { return {
c: s, c: t,
ns: o, ns: o,
onTabClick: (r) => { onTabClick: (n) => {
i.value.includes(r) || i.value.push(r); i.value.includes(n) || i.value.push(n);
}, },
lazyList: i lazyList: i
}; };
...@@ -1944,7 +1987,7 @@ L({ ...@@ -1944,7 +1987,7 @@ L({
on: { on: {
neuronInit: this.c.nerve.onNeuronInit(this.c.model.form.source.name) neuronInit: this.c.nerve.onNeuronInit(this.c.model.form.source.name)
} }
}), e(ae, { }), e(le, {
attrs: { attrs: {
context: this.c.drPages[this.c.model.drTab.pages[0].source.name].context, context: this.c.drPages[this.c.model.drTab.pages[0].source.name].context,
params: this.c.drPages[this.c.model.drTab.pages[0].source.name].params, params: this.c.drPages[this.c.model.drTab.pages[0].source.name].params,
...@@ -1952,53 +1995,53 @@ L({ ...@@ -1952,53 +1995,53 @@ L({
modal: this.modal, modal: this.modal,
modelPath: this.c.model.drTab.pages[0].embedView.source.modelPath modelPath: this.c.model.drTab.pages[0].embedView.source.modelPath
} }
})]), this.c.model.drTab.pages.map((t) => { })]), this.c.model.drTab.pages.map((s) => {
const s = this.c.drPages[t.source.name]; const t = this.c.drPages[s.source.name];
if (s) if (t)
return e("i-tab-pane", { return e("i-tab-pane", {
class: this.ns.be("", "tab-item"), class: this.ns.be("", "tab-item"),
attrs: { attrs: {
tab: this.c.model.drTab.source.name, tab: this.c.model.drTab.source.name,
disabled: this.c.isNewData, disabled: this.c.isNewData,
label: t.source.caption, label: s.source.caption,
name: t.source.name name: s.source.name
} }
}, [!this.c.isNewData && this.lazyList.includes(t.source.name) && e("ViewShell", { }, [!this.c.isNewData && this.lazyList.includes(s.source.name) && e("ViewShell", {
attrs: { attrs: {
context: s.context, context: t.context,
params: s.params, params: t.params,
modal: { modal: {
mode: ee.EMBED mode: te.EMBED
}, },
modelPath: t.embedView.source.modelPath, modelPath: s.embedView.source.modelPath,
// 流程跟踪视图用 // 流程跟踪视图用
deName: this.c.model.appEntity.source.codeName deName: this.c.model.appEntity.source.codeName
}, },
on: { on: {
neuronInit: this.c.nerve.onNeuronInit(t.source.name) neuronInit: this.c.nerve.onNeuronInit(s.source.name)
}, },
key: s.key key: t.key
})]); })]);
})])]); })])]);
} }
}); });
class mt { class ft {
constructor() { constructor() {
U(this, "formEditor", "SyFileUpload"); I(this, "formEditor", "SyFileUpload");
U(this, "gridEditor", "SyGridFileUploadContainer"); I(this, "gridEditor", "SyGridFileUploadContainer");
} }
async createController(t, s) { async createController(s, t) {
const o = new J(t, s); const o = new Q(s, t);
return await o.init(), o; return await o.init(), o;
} }
} }
class pt extends te { class gt extends se {
async execAction(t, s, o, i, n) { async execAction(s, t, o, i, r) {
if (o && o.length > 0) { if (o && o.length > 0) {
const a = (await ibiz.entityService.getService("XQFBXQPS", s)).local.getList(s); const a = (await ibiz.entityService.getService("XQFBXQPS", t)).local.getList(t);
o.forEach((d) => { o.forEach((l) => {
const m = a.find((p) => p.srfkey === d.srfkey); const h = a.find((p) => p.srfkey === l.srfkey);
m && (m.psjg = "10", d.psjg = "10"); h && (h.psjg = "10", l.psjg = "10");
}); });
} }
return { return {
...@@ -2007,21 +2050,21 @@ class pt extends te { ...@@ -2007,21 +2050,21 @@ class pt extends te {
}; };
} }
} }
class ft { class vt {
constructor() { constructor() {
U(this, "handler"); I(this, "handler");
} }
async getHandler() { async getHandler() {
return this.handler || (this.handler = new pt()), this.handler; return this.handler || (this.handler = new gt()), this.handler;
} }
} }
class gt extends te { class wt extends se {
async execAction(t, s, o, i, n) { async execAction(s, t, o, i, r) {
if (o && o.length > 0) { if (o && o.length > 0) {
const a = (await ibiz.entityService.getService("XQFBXQPS", s)).local.getList(s); const a = (await ibiz.entityService.getService("XQFBXQPS", t)).local.getList(t);
o.forEach((d) => { o.forEach((l) => {
const m = a.find((p) => p.srfkey === d.srfkey); const h = a.find((p) => p.srfkey === l.srfkey);
m && (m.psjg = "20", d.psjg = "20"); h && (h.psjg = "20", l.psjg = "20");
}); });
} }
return { return {
...@@ -2030,49 +2073,49 @@ class gt extends te { ...@@ -2030,49 +2073,49 @@ class gt extends te {
}; };
} }
} }
class wt { class bt {
constructor() { constructor() {
U(this, "handler"); I(this, "handler");
} }
async getHandler() { async getHandler() {
return this.handler || (this.handler = new gt()), this.handler; return this.handler || (this.handler = new wt()), this.handler;
} }
} }
class vt { class yt {
constructor() { constructor() {
U(this, "component", "GroupGrid"); I(this, "component", "GroupGrid");
} }
} }
const bt = new Ae(import.meta.url), Nt = { const Ct = new Ge(import.meta.url), Tt = {
mateUrl: import.meta.url, mateUrl: import.meta.url,
install(e) { install(e) {
pe.getModelService().then((t) => { ge.getModelService().then((s) => {
var o; var o;
((o = t.app.userParams) == null ? void 0 : o.autoWidth) === "true" && document.getElementsByClassName("app")[0].classList.add("auto-width"); ((o = s.app.userParams) == null ? void 0 : o.autoWidth) === "true" && document.getElementsByClassName("app")[0].classList.add("auto-width");
}), bt.loadStyle(["/style.css"]), ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", e.component("WfToolbar", Be), ibiz.register.view.register( }), Ct.loadStyle(["/style.css"]), ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", e.component("WfToolbar", _e), ibiz.register.view.register(
"VIEW_CUSTOM_SyWebIndexView", "VIEW_CUSTOM_SyWebIndexView",
new ut() new mt()
), ibiz.register.view.register( ), ibiz.register.view.register(
"VIEW_CUSTOM_PresetWFChartView", "VIEW_CUSTOM_PresetWFChartView",
new ct() new ut()
), ibiz.register.gridColumn.register( ), ibiz.register.gridColumn.register(
"GRID_COLRENDER_CodeListGridColumn", "GRID_COLRENDER_CodeListGridColumn",
new dt() new ht()
), e.component("SyFileUpload", Je), e.component("SyGridFileUpload", Qe), e.component("SyEditGridFileUpload", et), e.component("SyGridFileUploadContainer", Ke), ibiz.register.editor.register( ), e.component("SyFileUpload", Ke), e.component("SyGridFileUpload", Ye), e.component("SyEditGridFileUpload", st), e.component("SyGridFileUploadContainer", et), ibiz.register.editor.register(
"EDITOR_CUSTOMSTYLE_SyFileUpload", "EDITOR_CUSTOMSTYLE_SyFileUpload",
new mt()
), e.component("AppLayout", tt), ibiz.register.uiAction.register(
"DEUIACTION_BatchApprovalOrdersId",
new ft() new ft()
), e.component("AppLayout", ot), ibiz.register.uiAction.register(
"DEUIACTION_BatchApprovalOrdersId",
new vt()
), ibiz.register.uiAction.register( ), ibiz.register.uiAction.register(
"DEUIACTION_BatchNoApprovalOrdersId", "DEUIACTION_BatchNoApprovalOrdersId",
new wt() new bt()
), e.component("GroupGrid", lt), ibiz.register.control.register( ), e.component("GroupGrid", dt), ibiz.register.control.register(
"GRID_RENDER_GROUP_GRID", "GRID_RENDER_GROUP_GRID",
new vt() new yt()
); );
} }
}; };
export { export {
Nt as default Tt as default
}; };
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册