提交 8e912ada 编写于 作者: Cano1997's avatar Cano1997

update: 修复插件文件下载鉴权问题

上级 8b4e556a
...@@ -2,14 +2,14 @@ var ce = Object.defineProperty; ...@@ -2,14 +2,14 @@ var ce = 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 de = (e, t, s) => t in e ? ce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
var E = (e, t, s) => (de(e, typeof t != "symbol" ? t + "" : t, s), s); var E = (e, t, s) => (de(e, typeof t != "symbol" ? t + "" : t, s), s);
import { IndexViewModel as ue, GridModel as he, ViewType as me, ModelUtil as pe } from "@ibiz-template/model"; import { IndexViewModel as ue, GridModel as he, ViewType as me, ModelUtil as pe } from "@ibiz-template/model";
import { GridFieldColumnController as Z, GridRowController as X, WFStepTraceViewController as fe, UploadEditorController as J, GridController as ge, GridNotifyState as ve, WFDynaEditView3Controller as we } from "@ibiz-template/controller"; 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 { defineComponent as k, computed as T, h as c, getCurrentInstance as R, ref as g, watch as N, toRefs as B, onUnmounted as be } from "vue"; import { defineComponent as L, computed as D, h as c, getCurrentInstance as A, ref as w, watch as N, toRefs as $, onUnmounted as be } from "vue";
import { useNamespace as U, useViewController as Q, usePropsWatch as z, getUploadProps as ye, getEditorEmits as K, getGridUploadProps as _, getGridEditorEmits as $, useClickOutside as Ce, useEventListener as Fe, getInputProps as xe, getGridInputProps as Se, useGridCellEditor as ke, useControlController as Le, useWFStepTraceViewController as Ue, useEditView3Controller as Ee } from "@ibiz-template/vue-util"; import { useNamespace as U, useViewController as Q, usePropsWatch as B, getUploadProps as ye, getEditorEmits as K, getGridUploadProps as z, getGridEditorEmits as _, useClickOutside as Ce, useEventListener as Fe, getInputProps as xe, getGridInputProps as ke, useGridCellEditor as Se, useControlController as Le, useWFStepTraceViewController as Ue, useEditView3Controller as Ee } from "@ibiz-template/vue-util";
import { colorBlend as Ne, HttpError as Y, isImage as Pe, uploadFile as Ie, RuntimeError as Te } from "@ibiz-template/core"; import { colorBlend as Ne, HttpError as Y, isImage as Pe, uploadFile as Ie, RuntimeError as Te } from "@ibiz-template/core";
import { getCookie as De, createUUID as W } from "qx-util"; import { getCookie as De, createUUID as W } from "qx-util";
import { debounce as Re } from "lodash-es"; import { debounce as Me } from "lodash-es";
import { ViewMode as ee, UIActionHandler as te, PluginStaticResource as Ae } from "@ibiz-template/runtime"; import { ViewMode as ee, UIActionHandler as te, PluginStaticResource as Re } from "@ibiz-template/runtime";
const Me = k({ const Ae = L({
name: "CodeListGridColumn", name: "CodeListGridColumn",
props: { props: {
controller: { controller: {
...@@ -22,28 +22,28 @@ const Me = k({ ...@@ -22,28 +22,28 @@ const Me = k({
} }
}, },
setup(e) { setup(e) {
const t = U("grid-field-column"), s = T(() => { const t = U("grid-field-column"), s = D(() => {
var r; var r;
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 n = e.row.data[e.controller.model.codeName];
return (r = e.controller.codeListItems) != null && r.length && n ? n.split(",").map((h) => { return (r = e.controller.codeListItems) != null && r.length && n ? n.split(",").map((m) => {
const m = e.controller.codeListItems.find((f) => f.value === h); const p = e.controller.codeListItems.find((g) => g.value === m);
if (m) { if (p) {
const f = m.color || "#515a6e"; const g = p.color || "#515a6e";
return { return {
text: m.text, text: p.text,
colorStyle: t.cssVarBlock({ colorStyle: t.cssVarBlock({
color: f, color: g,
"border-color": f, "border-color": g,
"bg-color": Ne(f, "#fff") "bg-color": Ne(g, "#fff")
}) })
}; };
} }
}).filter(Boolean) : []; }).filter(Boolean) : [];
}), o = (n) => { }), o = (n) => {
e.controller.isLinkColumn && e.controller.openLinkView(e.row, n); e.controller.isLinkColumn && e.controller.openLinkView(e.row, n);
}, i = T(() => { }, i = D(() => {
let n = ""; let n = "";
switch (e.controller.model.align) { switch (e.controller.model.align) {
case "LEFT": case "LEFT":
...@@ -101,7 +101,7 @@ class Ge extends fe { ...@@ -101,7 +101,7 @@ class Ge extends fe {
this.imgSrc = URL.createObjectURL(i); this.imgSrc = URL.createObjectURL(i);
} }
} }
const Oe = k({ const Oe = L({
name: "PresetWFChartView", name: "PresetWFChartView",
props: { props: {
context: Object, context: Object,
...@@ -123,8 +123,8 @@ const Oe = k({ ...@@ -123,8 +123,8 @@ const Oe = k({
setup(e) { setup(e) {
const t = U("preset-wf-chart-view"), { const t = U("preset-wf-chart-view"), {
proxy: s proxy: s
} = R(), o = Q(s, (i, n) => new Ge(e.modelPath, i, n)); } = A(), o = Q(s, (i, n) => new Ge(e.modelPath, i, n));
return z(s, "deName", o.setDeName.bind(o)), { return B(s, "deName", o.setDeName.bind(o)), {
c: o, c: o,
ns: t ns: t
}; };
...@@ -139,7 +139,7 @@ const Oe = k({ ...@@ -139,7 +139,7 @@ const Oe = k({
})]); })]);
} }
}); });
const Be = k({ const $e = L({
name: "WFToolbar", name: "WFToolbar",
props: { props: {
wfLinks: { wfLinks: {
...@@ -181,49 +181,49 @@ const Be = k({ ...@@ -181,49 +181,49 @@ const Be = k({
}, [t.sequenceFlowName || ""])]); }, [t.sequenceFlowName || ""])]);
})]); })]);
} }
}), ze = typeof btoa == "function", j = typeof Buffer == "function"; }), Be = typeof btoa == "function", j = typeof Buffer == "function";
typeof TextDecoder == "function" && new TextDecoder(); typeof TextDecoder == "function" && new TextDecoder();
const V = typeof TextEncoder == "function" ? new TextEncoder() : void 0, _e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", D = Array.prototype.slice.call(_e); const V = typeof TextEncoder == "function" ? new TextEncoder() : void 0, ze = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", R = Array.prototype.slice.call(ze);
((e) => { ((e) => {
let t = {}; let t = {};
return e.forEach((s, o) => t[s] = o), t; return e.forEach((s, o) => t[s] = o), t;
})(D); })(R);
const P = String.fromCharCode.bind(String); const I = String.fromCharCode.bind(String);
typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array); typeof Uint8Array.from == "function" && Uint8Array.from.bind(Uint8Array);
const $e = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), je = (e) => { const _e = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" : "_"), je = (e) => {
let t, s, o, i, n = ""; let t, s, o, i, n = "";
const r = e.length % 3; const r = 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 ((s = 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 += D[t >> 18 & 63] + D[t >> 12 & 63] + D[t >> 6 & 63] + D[t & 63]; t = s << 16 | o << 8 | i, n += R[t >> 18 & 63] + R[t >> 12 & 63] + R[t >> 6 & 63] + R[t & 63];
} }
return r ? n.slice(0, r - 3) + "===".substring(r) : n; return r ? n.slice(0, r - 3) + "===".substring(r) : n;
}, se = ze ? (e) => btoa(e) : j ? (e) => Buffer.from(e, "binary").toString("base64") : je, We = j ? (e) => Buffer.from(e).toString("base64") : (e) => { }, se = Be ? (e) => btoa(e) : j ? (e) => Buffer.from(e, "binary").toString("base64") : je, We = j ? (e) => Buffer.from(e).toString("base64") : (e) => {
let s = []; let s = [];
for (let o = 0, i = e.length; o < i; o += 4096) for (let o = 0, i = e.length; o < i; o += 4096)
s.push(P.apply(null, e.subarray(o, o + 4096))); s.push(I.apply(null, e.subarray(o, o + 4096)));
return se(s.join("")); return se(s.join(""));
}, Ve = (e) => { }, Ve = (e) => {
if (e.length < 2) { if (e.length < 2) {
var t = e.charCodeAt(0); var t = e.charCodeAt(0);
return t < 128 ? e : t < 2048 ? P(192 | t >>> 6) + P(128 | t & 63) : P(224 | t >>> 12 & 15) + P(128 | t >>> 6 & 63) + P(128 | t & 63); return t < 128 ? e : t < 2048 ? I(192 | t >>> 6) + I(128 | t & 63) : I(224 | t >>> 12 & 15) + I(128 | t >>> 6 & 63) + I(128 | t & 63);
} else { } else {
var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320); var t = 65536 + (e.charCodeAt(0) - 55296) * 1024 + (e.charCodeAt(1) - 56320);
return P(240 | t >>> 18 & 7) + P(128 | t >>> 12 & 63) + P(128 | t >>> 6 & 63) + P(128 | t & 63); return I(240 | t >>> 18 & 7) + I(128 | t >>> 12 & 63) + I(128 | t >>> 6 & 63) + I(128 | t & 63);
} }
}, qe = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, He = (e) => e.replace(qe, Ve), q = j ? (e) => Buffer.from(e, "utf8").toString("base64") : V ? (e) => We(V.encode(e)) : (e) => se(He(e)), oe = (e, t = !1) => t ? $e(q(e)) : q(e); }, qe = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, He = (e) => e.replace(qe, Ve), q = j ? (e) => Buffer.from(e, "utf8").toString("base64") : V ? (e) => We(V.encode(e)) : (e) => se(He(e)), oe = (e, t = !1) => t ? _e(q(e)) : q(e);
function Ze(e, t, s) { function Ze(e, t, s) {
var S; var S;
const o = g([]), i = g({ const o = w([]), i = w({
Authorization: `Bearer ${De("access_token")}` Authorization: `Bearer ${De("access_token")}`
}), n = g(""), r = g(""), a = { }), n = w(""), r = w(""), a = {
count: 0, count: 0,
cacheFiles: [] cacheFiles: []
// iview上传过程中不能改default-file-list,所以需要缓存 // iview上传过程中不能改default-file-list,所以需要缓存
}, d = (S = s.editorParams) == null ? void 0 : S.blackList; }, d = (S = s.editorParams) == null ? void 0 : S.blackList;
let h = []; let m = [];
d && typeof d == "string" && (h = d.split(",")), N( d && typeof d == "string" && (m = d.split(",")), N(
() => e.value, () => e.value,
(l) => { (l) => {
o.value = l ? JSON.parse(l) : []; o.value = l ? JSON.parse(l) : [];
...@@ -233,86 +233,91 @@ function Ze(e, t, s) { ...@@ -233,86 +233,91 @@ function Ze(e, t, s) {
() => e.data, () => e.data,
(l) => { (l) => {
if (l) { if (l) {
const u = s.calcBaseUrl(l); const h = s.calcBaseUrl(l);
n.value = u.uploadUrl, r.value = u.downloadUrl; n.value = h.uploadUrl, r.value = h.downloadUrl;
} }
}, },
{ immediate: !0, deep: !0 } { immediate: !0, deep: !0 }
), N( ), N(
o, o,
(l) => { (l) => {
l != null && l.length && r.value && l.forEach((u) => { l != null && l.length && r.value && l.forEach((h) => {
u.url = u.url || r.value.replace("%fileId%", u.id); h.url = h.url || r.value.replace("%fileId%", h.id);
}); });
}, },
{ immediate: !0 } { immediate: !0 }
), N( ), N(
r, r,
(l) => { (l) => {
l && o.value.length && o.value.forEach((u) => { l && o.value.length && o.value.forEach((h) => {
u.url = r.value.replace("%fileId%", u.id); h.url = r.value.replace("%fileId%", h.id);
}); });
}, },
{ immediate: !0 } { immediate: !0 }
); );
const m = () => { const p = () => {
const l = [...o.value, ...a.cacheFiles], u = l.length > 0 ? JSON.stringify(l.map((w) => ({ name: w.name, id: w.id }))) : null; const l = [...o.value, ...a.cacheFiles], h = l.length > 0 ? JSON.stringify(l.map((v) => ({ name: v.name, id: v.id }))) : null;
a.cacheFiles = [], t(u); a.cacheFiles = [], t(h);
}, f = (l) => { }, g = (l) => {
const u = l.name.trim().toLowerCase(); const h = l.name.trim().toLowerCase();
if (h.some((x) => u.endsWith(`.${x}`))) if (m.some((C) => h.endsWith(`.${C}`)))
return ibiz.message.error(`不可上传 ${h.join("、")}类型的文件!`), !1; return ibiz.message.error(`不可上传 ${m.join("、")}类型的文件!`), !1;
a.count += 1; a.count += 1;
}, C = (l) => { }, F = (l) => {
l && (a.cacheFiles.push({ l && (a.cacheFiles.push({
name: l.filename, name: l.filename,
id: l.fileid id: l.fileid
}), a.count -= 1, a.count === 0 && m()); }), a.count -= 1, a.count === 0 && p());
}, b = (l, u) => { }, y = (l, h) => {
throw a.count -= 1, new Y({ throw a.count -= 1, new Y({
response: { data: u, status: l.status } response: { data: h, status: l.status }
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
}); });
}, F = (l) => { }, x = (l) => {
if (e.disabled) if (e.disabled)
return; return;
const u = o.value.findIndex((w) => w.id === l.id); const h = o.value.findIndex((v) => v.id === l.id);
u !== -1 && o.value.splice(u, 1), m(); h !== -1 && o.value.splice(h, 1), p();
}, v = (l) => { }, f = (l) => {
const u = l.url || r.value.replace("%fileId%", l.id); const v = (s.parent.form || s.parent.grid).model.appEntity.deName, C = `${l.id}|${v}|${e.data.srfkey}|${s.context.srfpersonid || s.context.srfuserid}`, M = l.url || r.value.replace("%fileId%", l.id);
s.fileDownload({ url: u, name: l.name }); s.fileDownload({
}, p = g(!1), y = g(""), I = g(""); url: `${M}?key=${window.btoa(C)}${Math.floor(
1e3 + Math.random() * 9e3
)}`,
name: l.name
});
}, u = w(!1), b = w(""), P = w("");
return { return {
uploadUrl: n, uploadUrl: n,
downloadUrl: r, downloadUrl: r,
headers: i, headers: i,
files: o, files: o,
onDownload: v, onDownload: f,
onError: b, onError: y,
onRemove: F, onRemove: x,
onSuccess: C, onSuccess: F,
beforeUpload: f, beforeUpload: g,
showModal: p, showModal: u,
modalTitle: y, modalTitle: b,
iframeUrl: I, iframeUrl: P,
onModalCancel: () => { onModalCancel: () => {
p.value = !1, y.value = "", I.value = ""; u.value = !1, b.value = "", P.value = "";
}, },
previewFile: (l) => { previewFile: (l) => {
p.value = !0, y.value = l.name; u.value = !0, b.value = l.name;
const u = window.Environment.previewFileUrl; const h = window.Environment.previewFileUrl;
if (u) { if (h) {
const w = encodeURIComponent( const v = encodeURIComponent(
oe( oe(
`${window.location.origin}${l.url}?fullfilename=${l.name}` `${window.location.origin}${l.url}?fullfilename=${l.name}`
) )
); );
I.value = `${u}/onlinePreview?url=${w}`; P.value = `${h}/onlinePreview?url=${v}`;
} }
} }
}; };
} }
const Xe = k({ const Xe = L({
name: "SyFileUpload", name: "SyFileUpload",
props: ye(), props: ye(),
emits: K(), emits: K(),
...@@ -325,16 +330,16 @@ const Xe = k({ ...@@ -325,16 +330,16 @@ const Xe = k({
files: r, files: r,
onDownload: a, onDownload: a,
onError: d, onError: d,
onRemove: h, onRemove: m,
onSuccess: m, onSuccess: p,
beforeUpload: f, beforeUpload: g,
showModal: C, showModal: F,
modalTitle: b, modalTitle: y,
iframeUrl: F, iframeUrl: x,
onModalCancel: v, onModalCancel: f,
previewFile: p previewFile: u
} = Ze(e, (y) => { } = Ze(e, (b) => {
t("change", y); t("change", b);
}, o); }, o);
return { return {
ns: s, ns: s,
...@@ -344,14 +349,14 @@ const Xe = k({ ...@@ -344,14 +349,14 @@ const Xe = k({
files: r, files: r,
onDownload: a, onDownload: a,
onError: d, onError: d,
onRemove: h, onRemove: m,
onSuccess: m, onSuccess: p,
beforeUpload: f, beforeUpload: g,
showModal: C, showModal: F,
modalTitle: b, modalTitle: y,
iframeUrl: F, iframeUrl: x,
onModalCancel: v, onModalCancel: f,
previewFile: p previewFile: u
}; };
}, },
render(e) { render(e) {
...@@ -608,7 +613,7 @@ const Xe = k({ ...@@ -608,7 +613,7 @@ const Xe = k({
})])]); })])]);
} }
}); });
function G(e, t) { function O(e, t) {
if (e.url = t.replace("%fileId%", e.id), e.status || (e.status = "finished"), !e.fileName) { if (e.url = t.replace("%fileId%", e.id), e.status || (e.status = "finished"), !e.fileName) {
const s = e.name.lastIndexOf("."); const s = e.name.lastIndexOf(".");
e.fileName = e.name.substring(0, s), e.fileExt = e.name.substring(s), e.isImage = Pe(e.name); e.fileName = e.name.substring(0, s), e.fileExt = e.name.substring(s), e.isImage = Pe(e.name);
...@@ -616,7 +621,7 @@ function G(e, t) { ...@@ -616,7 +621,7 @@ function G(e, t) {
return e; return e;
} }
function ie(e) { function ie(e) {
const t = g(""), s = g(""), o = g([]); const t = w(""), s = w(""), o = w([]);
return N( return N(
e.data, e.data,
(i) => { (i) => {
...@@ -630,7 +635,7 @@ function ie(e) { ...@@ -630,7 +635,7 @@ function ie(e) {
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 && s.value && o.value.forEach((n) => {
G(n, s.value); O(n, s.value);
}); });
}, },
{ immediate: !0 } { immediate: !0 }
...@@ -638,7 +643,7 @@ function ie(e) { ...@@ -638,7 +643,7 @@ function ie(e) {
s, s,
(i) => { (i) => {
i && o.value.length && o.value.forEach((n) => { i && o.value.length && o.value.forEach((n) => {
G(n, i); O(n, i);
}); });
}, },
{ immediate: !0 } { immediate: !0 }
...@@ -649,14 +654,14 @@ function ie(e) { ...@@ -649,14 +654,14 @@ function ie(e) {
}; };
} }
function ne(e) { function ne(e) {
var L, S; var k, S;
const t = g("undo"), s = g([]), { downloadUrl: o, value: i, uploadUrl: n, controller: r } = e, a = (S = (L = r == null ? void 0 : r.value) == null ? void 0 : L.editorParams) == null ? void 0 : S.blackList; const t = w("undo"), s = w([]), { downloadUrl: o, value: i, uploadUrl: n, controller: r } = e, a = (S = (k = r == null ? void 0 : r.value) == null ? void 0 : k.editorParams) == null ? void 0 : S.blackList;
let d = []; let d = [];
a && typeof a == "string" && (d = a.split(",")), N( a && typeof a == "string" && (d = a.split(",")), N(
i, i,
(l) => { (l) => {
l.length > 0 && (s.value = [], l.forEach((u) => { l.length > 0 && (s.value = [], l.forEach((h) => {
s.value.push(G(u, o.value)); s.value.push(O(h, o.value));
})); }));
}, },
{ {
...@@ -664,90 +669,90 @@ function ne(e) { ...@@ -664,90 +669,90 @@ function ne(e) {
deep: !0 deep: !0
} }
); );
const h = (l, u) => { const m = (l, h) => {
const w = []; const v = [];
return u.forEach((x, A) => { return h.forEach((C, M) => {
const M = x.name.trim().toLowerCase(); const G = C.name.trim().toLowerCase();
if (d.some((le) => M.endsWith(`.${le}`))) { if (d.some((le) => G.endsWith(`.${le}`))) {
w.push(A); v.push(M);
return; return;
} }
s.value.push({ s.value.push({
name: x.name, name: C.name,
status: x.status, status: C.status,
percentage: x.percentage, percentage: C.percentage,
id: x.uid, id: C.uid,
url: "" url: ""
}); });
}), w.length === u.length ? (ibiz.message.error(`不可上传 ${d.join("、")}类型的文件!`), !1) : (w.length && (w.forEach((x) => { }), v.length === h.length ? (ibiz.message.error(`不可上传 ${d.join("、")}类型的文件!`), !1) : (v.length && (v.forEach((C) => {
l.splice(x, 1), u.splice(x, 1); l.splice(C, 1), h.splice(C, 1);
}), ibiz.message.error(`不可上传 ${d.join("、")}类型的文件!`)), !0); }), ibiz.message.error(`不可上传 ${d.join("、")}类型的文件!`)), !0);
}, m = (l) => { }, p = (l) => {
l.forEach((u) => { l.forEach((h) => {
s.value.find((w) => w.id === u.uid ? (w.percentage = u.percentage, !0) : !1); s.value.find((v) => v.id === h.uid ? (v.percentage = h.percentage, !0) : !1);
}); });
}, f = (l, u) => { }, g = (l, h) => {
l.forEach((w) => { l.forEach((v) => {
s.value.find((x) => x.id === w.uid ? (x.status = w.status, x.id = u.data.fileid, x.name = u.data.filename, G(x, o.value), !0) : !1); s.value.find((C) => C.id === v.uid ? (C.status = v.status, C.id = h.data.fileid, C.name = h.data.filename, O(C, o.value), !0) : !1);
}); });
}, C = (l, u) => { }, F = (l, h) => {
var x; var C;
l.forEach((A) => { l.forEach((M) => {
s.value.find((M) => M.id === A.uid ? (M.status = A.status, !0) : !1); s.value.find((G) => G.id === M.uid ? (G.status = M.status, !0) : !1);
}); });
const w = new Y(u); const v = new Y(h);
ibiz.notification.error({ ibiz.notification.error({
title: (x = w.status) == null ? void 0 : x.toString(), title: (C = v.status) == null ? void 0 : C.toString(),
desc: w.message, desc: v.message,
duration: 10 duration: 10
}); });
}, b = (l) => { }, y = (l) => {
s.value = s.value.filter((u) => u.status === "finished"), t.value = "done"; s.value = s.value.filter((h) => h.status === "finished"), t.value = "done";
}, F = () => { }, x = () => {
Ie({ Ie({
multiple: e.multiple, multiple: e.multiple,
accept: e.accept, accept: e.accept,
uploadUrl: n.value, uploadUrl: n.value,
beforeUpload: h, beforeUpload: m,
progress: m, progress: p,
success: f, success: g,
error: C, error: F,
finish: b finish: y
}); });
}, v = g(!1), p = g(""), y = g(""); }, f = w(!1), u = w(""), b = w("");
return { return {
selectFile: F, selectFile: x,
fileList: s, fileList: s,
uploadState: t, uploadState: t,
showModal: v, showModal: f,
modalTitle: p, modalTitle: u,
iframeUrl: y, iframeUrl: b,
onModalCancel: () => { onModalCancel: () => {
v.value = !1, p.value = "", y.value = ""; f.value = !1, u.value = "", b.value = "";
}, },
previewFile: (l) => { previewFile: (l) => {
v.value = !0, p.value = l.name; f.value = !0, u.value = l.name;
const u = window.Environment.previewFileUrl; const h = window.Environment.previewFileUrl;
if (u) { if (h) {
const w = encodeURIComponent( const v = encodeURIComponent(
oe( oe(
`${window.location.origin}${l.url}?fullfilename=${l.name}` `${window.location.origin}${l.url}?fullfilename=${l.name}`
) )
); );
y.value = `${u}/onlinePreview?url=${w}`; b.value = `${h}/onlinePreview?url=${v}`;
} }
} }
}; };
} }
const Je = k({ const Je = L({
name: "SyGridFileUpload", name: "SyGridFileUpload",
props: _(), props: z(),
setup(e) { setup(e) {
const t = U("sy-grid-file-upload"), { const t = U("sy-grid-file-upload"), {
value: s, value: s,
data: o, data: o,
controller: i controller: i
} = B(e), { } = $(e), {
downloadUrl: n, downloadUrl: n,
uploadUrl: r, uploadUrl: r,
valueList: a valueList: a
...@@ -757,11 +762,11 @@ const Je = k({ ...@@ -757,11 +762,11 @@ const Je = k({
controller: i controller: i
}), { }), {
fileList: d, fileList: d,
showModal: h, showModal: m,
modalTitle: m, modalTitle: p,
iframeUrl: f, iframeUrl: g,
previewFile: C, previewFile: F,
onModalCancel: b onModalCancel: y
} = ne({ } = ne({
downloadUrl: n, downloadUrl: n,
uploadUrl: r, uploadUrl: r,
...@@ -770,14 +775,18 @@ const Je = k({ ...@@ -770,14 +775,18 @@ const Je = k({
return { return {
ns: t, ns: t,
fileList: d, fileList: d,
showModal: h, showModal: m,
modalTitle: m, modalTitle: p,
iframeUrl: f, iframeUrl: g,
downloadFile: (v) => { downloadFile: (f) => {
e.controller.fileDownload(v); const u = e.controller, P = u.parent.grid.model.appEntity.deName, T = `${f.id}|${P}|${o.value.srfkey}|${u.context.srfpersonid || u.context.srfuserid}`, k = f.url || n.value.replace("%fileId%", f.id);
}, u.fileDownload({
previewFile: C, url: `${k}?key=${window.btoa(T)}${Math.floor(1e3 + Math.random() * 9e3)}`,
onModalCancel: b name: f.name
});
},
previewFile: F,
onModalCancel: y
}; };
}, },
render() { render() {
...@@ -832,10 +841,10 @@ const Je = k({ ...@@ -832,10 +841,10 @@ const Je = k({
} }
})])]); })])]);
} }
}), Qe = k({ }), Qe = L({
name: "SyGridFileUploadContainer", name: "SyGridFileUploadContainer",
props: _(), props: z(),
emits: $(), emits: _(),
render(e) { render(e) {
return this.disabled || this.readonly ? e("SyGridFileUpload", { return this.disabled || this.readonly ? e("SyGridFileUpload", {
props: { props: {
...@@ -856,7 +865,7 @@ const Je = k({ ...@@ -856,7 +865,7 @@ const Je = k({
}); });
} }
}); });
const Ke = k({ const Ke = L({
name: "SyEditGridFileUploadPopover", name: "SyEditGridFileUploadPopover",
props: { props: {
uploadUrl: { uploadUrl: {
...@@ -874,6 +883,10 @@ const Ke = k({ ...@@ -874,6 +883,10 @@ const Ke = k({
controller: { controller: {
type: J, type: J,
required: !0 required: !0
},
data: {
type: Object,
required: !0
} }
}, },
emits: { emits: {
...@@ -887,34 +900,38 @@ const Ke = k({ ...@@ -887,34 +900,38 @@ const Ke = k({
value: i, value: i,
uploadUrl: n, uploadUrl: n,
controller: r controller: r
} = B(e), { } = $(e), {
fileList: a, fileList: a,
uploadState: d, uploadState: d,
selectFile: h selectFile: m
} = ne({ } = ne({
downloadUrl: o, downloadUrl: o,
value: i, value: i,
uploadUrl: n, uploadUrl: n,
controller: r controller: r
}), m = g(), f = g(!1), C = Ce(m, async (v) => { }), p = w(), g = w(!1), F = Ce(p, async (f) => {
t("close", { t("close", {
isModified: f.value, isModified: g.value,
resultFiles: a.value resultFiles: a.value
}); });
}); });
return N(d, (v) => { return N(d, (f) => {
v === "done" ? (f.value = !0, C.proceed()) : v === "loading" && C.pause(); f === "done" ? (g.value = !0, F.proceed()) : f === "loading" && F.pause();
}), { }), {
ns: s, ns: s,
componentRef: m, componentRef: p,
fileList: a, fileList: a,
deleteFile: (v) => { deleteFile: (f) => {
const p = a.value.findIndex((y) => y.id === v.id); const u = a.value.findIndex((b) => b.id === f.id);
a.value.splice(p, 1), f.value = !0; a.value.splice(u, 1), g.value = !0;
}, },
selectFile: h, selectFile: m,
downloadFile: (v) => { downloadFile: (f) => {
e.controller.fileDownload(v); const u = e.controller, P = u.parent.grid.model.appEntity.deName, T = `${f.id}|${P}|${e.data.srfkey}|${u.context.srfpersonid || u.context.srfuserid}`, k = f.url || o.value.replace("%fileId%", f.id);
u.fileDownload({
url: `${k}?key=${window.btoa(T)}${Math.floor(1e3 + Math.random() * 9e3)}`,
name: f.name
});
} }
}; };
}, },
...@@ -954,10 +971,10 @@ const Ke = k({ ...@@ -954,10 +971,10 @@ const Ke = k({
}), "添加文件"])]); }), "添加文件"])]);
} }
}); });
const Ye = k({ const Ye = L({
name: "SyEditGridFileUpload", name: "SyEditGridFileUpload",
props: _(), props: z(),
emits: $(), emits: _(),
setup(e, { setup(e, {
emit: t emit: t
}) { }) {
...@@ -965,7 +982,7 @@ const Ye = k({ ...@@ -965,7 +982,7 @@ const Ye = k({
value: o, value: o,
data: i, data: i,
controller: n controller: n
} = B(e), { } = $(e), {
downloadUrl: r, downloadUrl: r,
uploadUrl: a, uploadUrl: a,
valueList: d valueList: d
...@@ -973,48 +990,49 @@ const Ye = k({ ...@@ -973,48 +990,49 @@ const Ye = k({
value: o, value: o,
data: i, data: i,
controller: n controller: n
}), h = g(), m = async () => { }), m = w(), p = async () => {
if (!h.value) if (!m.value)
throw new Te("容器元素不存在"); throw new Te("容器元素不存在");
const f = h.value.$el, C = f.offsetHeight, b = ibiz.overlay.createPopover((p) => p(Ke, { const g = m.value.$el, F = g.offsetHeight, y = ibiz.overlay.createPopover((u) => u(Ke, {
props: { props: {
value: d.value, value: d.value,
data: i.value,
uploadUrl: a.value, uploadUrl: a.value,
downloadUrl: r.value, downloadUrl: r.value,
controller: n.value controller: n.value
}, },
on: { on: {
close: (y) => { close: (b) => {
b.dismiss(y); y.dismiss(b);
} }
} }
}), void 0, { }), void 0, {
noArrow: !0, noArrow: !0,
placement: "bottom-start", placement: "bottom-start",
offsetOpts: { offsetOpts: {
mainAxis: -C, mainAxis: -F,
crossAxis: 0 crossAxis: 0
} }
}); });
await b.present(f); await y.present(g);
const { const {
isModified: F, isModified: x,
resultFiles: v resultFiles: f
} = await b.onWillDismiss(); } = await y.onWillDismiss();
if (F) { if (x) {
const p = v.length > 0 ? JSON.stringify(v.map((y) => ({ const u = f.length > 0 ? JSON.stringify(f.map((b) => ({
name: y.name, name: b.name,
id: y.id id: b.id
}))) : null; }))) : null;
t("change", p), t("rowSave"); t("change", u), t("rowSave");
} }
}; };
return Fe(h, "click", (f) => { return Fe(m, "click", (g) => {
e.disabled || m(); e.disabled || p();
}), { }), {
ns: s, ns: s,
valueList: d, valueList: d,
componentRef: h componentRef: m
}; };
}, },
render() { render() {
...@@ -1035,16 +1053,16 @@ const Ye = k({ ...@@ -1035,16 +1053,16 @@ const Ye = k({
}, [e.name])]))])]); }, [e.name])]))])]);
} }
}); });
k({ L({
name: "SyInput", name: "SyInput",
props: xe(), props: xe(),
emits: K(), emits: K(),
setup(e, { setup(e, {
emit: t emit: t
}) { }) {
const s = U("input"), i = e.controller.model, n = g(), r = g(2); const s = U("input"), i = e.controller.model, n = w(), r = w(2);
i.editorType === "TEXTAREA_10" && (r.value = 10); i.editorType === "TEXTAREA_10" && (r.value = 10);
const a = T(() => { const a = D(() => {
switch (i.editorType) { switch (i.editorType) {
case "TEXTBOX": case "TEXTBOX":
return "text"; return "text";
...@@ -1056,36 +1074,36 @@ k({ ...@@ -1056,36 +1074,36 @@ k({
default: default:
return "string"; return "string";
} }
}), d = g(""); }), d = w("");
N(() => e.value, (p, y) => { N(() => e.value, (u, b) => {
p !== y && (p ? d.value = p : d.value = ""); u !== b && (u ? d.value = u : d.value = "");
}, { }, {
immediate: !0 immediate: !0
}); });
let h = !1, m, f; let m = !1, p, g;
const C = Re((p) => { const F = Me((u) => {
f !== p.target.value && t("change", p.target.value), f = void 0, h = !1, m && m(); g !== u.target.value && t("change", u.target.value), g = void 0, m = !1, p && p();
}, 300, { }, 300, {
leading: !0 leading: !0
}), b = (p) => { }), y = (u) => {
h = !0, C(p); m = !0, F(u);
}, F = (p) => { }, x = (u) => {
p && p.code === "Enter" && h && (m = () => { u && u.code === "Enter" && m && (p = () => {
n.value.$el.dispatchEvent(p); n.value.$el.dispatchEvent(u);
}); });
}, v = () => { }, f = () => {
f = n.value.currentValue, t("change", f); g = n.value.currentValue, t("change", g);
}; };
return e.autoFocus && N(n, (p) => { return e.autoFocus && N(n, (u) => {
p && p.$el.getElementsByTagName("input")[0].focus(); u && u.$el.getElementsByTagName("input")[0].focus();
}), { }), {
ns: s, ns: s,
rows: r, rows: r,
type: a, type: a,
currentVal: d, currentVal: d,
handleChange: b, handleChange: y,
handleKeyUp: F, handleKeyUp: x,
handleBlur: v, handleBlur: f,
inputRef: n inputRef: n
}; };
}, },
...@@ -1116,10 +1134,10 @@ k({ ...@@ -1116,10 +1134,10 @@ k({
}, [this.controller.model.unitName])])]); }, [this.controller.model.unitName])])]);
} }
}); });
k({ L({
name: "SyGridInput", name: "SyGridInput",
props: Se(), props: ke(),
emits: $(), emits: _(),
setup(e, { setup(e, {
emit: t emit: t
}) { }) {
...@@ -1129,7 +1147,7 @@ k({ ...@@ -1129,7 +1147,7 @@ k({
componentRef: n, componentRef: n,
onOperateChange: r, onOperateChange: r,
onChange: a onChange: a
} = ke(e, { } = Se(e, {
emit: t emit: t
}); });
return { return {
...@@ -1175,7 +1193,7 @@ function H(e, t) { ...@@ -1175,7 +1193,7 @@ function H(e, t) {
class: e.e("logo-caption") class: e.e("logo-caption")
}, [t.caption])]); }, [t.caption])]);
} }
const et = k({ const et = L({
name: "UserAppLayout", name: "UserAppLayout",
props: { props: {
model: { model: {
...@@ -1196,9 +1214,9 @@ const et = k({ ...@@ -1196,9 +1214,9 @@ const et = k({
setup(e, { setup(e, {
emit: t emit: t
}) { }) {
const s = U("layout"), o = g(!1), i = () => { const s = U("layout"), o = w(!1), i = () => {
o.value = !o.value, t("onCollapseChange", o.value); o.value = !o.value, t("onCollapseChange", o.value);
}, n = T(() => e.model.source.blankMode === !0), r = T(() => !!(window.Environment.manualdownloadurl || ibiz.env.manualdownloadurl)); }, n = D(() => e.model.source.blankMode === !0), r = D(() => !!(window.Environment.manualdownloadurl || ibiz.env.manualdownloadurl));
return { return {
ns: s, ns: s,
collapseChange: o, collapseChange: o,
...@@ -1293,10 +1311,10 @@ function tt(e) { ...@@ -1293,10 +1311,10 @@ function tt(e) {
}), e.singleSelect || s.splice(0, 0, { type: "selection", width: 60 }), s; }), e.singleSelect || s.splice(0, 0, { type: "selection", width: 60 }), s;
} }
function st(e) { function st(e) {
const t = g([]); const t = w([]);
return e.nerve.self.evt.on("created", () => { return e.nerve.self.evt.on("created", () => {
t.value = tt(e); t.value = tt(e);
}), [T(() => { }), [D(() => {
const o = [...t.value]; const o = [...t.value];
if (!o.find((r) => !r.width)) { if (!o.find((r) => !r.width)) {
let r = o.length - 1; let r = o.length - 1;
...@@ -1322,14 +1340,14 @@ function ot(e) { ...@@ -1322,14 +1340,14 @@ function ot(e) {
if (!e.singleSelect) { if (!e.singleSelect) {
const a = []; const a = [];
r.forEach((d) => { r.forEach((d) => {
const h = t(d); const m = t(d);
h && a.push(h); m && a.push(m);
}), e.onSelectionChange(a); }), e.onSelectionChange(a);
} }
} }
function n(r) { function n(r) {
const { column: a, order: d } = r, h = d === "asc" || d === "desc" ? d : void 0; const { column: a, order: d } = r, m = d === "asc" || d === "desc" ? d : void 0;
e.setSort(a.fieldName, h), e.load(); e.setSort(a.fieldName, m), e.load();
} }
return { onRowClick: s, onDbRowClick: o, onSelectionChange: i, onSortChange: n }; return { onRowClick: s, onDbRowClick: o, onSelectionChange: i, onSortChange: n };
} }
...@@ -1396,7 +1414,7 @@ class nt extends ge { ...@@ -1396,7 +1414,7 @@ class nt extends ge {
}) })
), this.rows = s.map((o) => { ), this.rows = s.map((o) => {
const i = new X(o, this); const i = new X(o, this);
return this.gridStateNotify(i, ve.LOAD), i; return this.gridStateNotify(i, we.LOAD), i;
}), this.handleGroup(s), s; }), this.handleGroup(s), s;
} }
/** /**
...@@ -1423,10 +1441,10 @@ class nt extends ge { ...@@ -1423,10 +1441,10 @@ class nt extends ge {
function rt(e, t, s, o = {}) { function rt(e, t, s, o = {}) {
return Le(e, () => { return Le(e, () => {
const i = new nt(t, s, o); const i = new nt(t, s, o);
return z(e, "gridRowActiveMode", i.setGridRowActiveMode.bind(i)), i; return B(e, "gridRowActiveMode", i.setGridRowActiveMode.bind(i)), i;
}); });
} }
const at = k({ const at = L({
props: { props: {
modelData: he, modelData: he,
context: { context: {
...@@ -1456,68 +1474,68 @@ const at = k({ ...@@ -1456,68 +1474,68 @@ const at = k({
setup(e) { setup(e) {
const { const {
proxy: t proxy: t
} = R(), s = U("grid"), o = rt(t, e.modelData, e.context, e.params), [i] = st(o), { } = A(), s = U("grid"), o = rt(t, e.modelData, e.context, e.params), [i] = st(o), {
onRowClick: n, onRowClick: n,
onDbRowClick: r, onDbRowClick: r,
onSelectionChange: a, onSelectionChange: a,
onSortChange: d onSortChange: d
} = ot(o), { } = ot(o), {
onPageChange: h, onPageChange: m,
onPageReset: m, onPageReset: p,
onPageSizeChange: f onPageSizeChange: g
} = it(o), C = (L, S) => { } = it(o), F = (k, S) => {
const l = t.$refs.grid; const l = t.$refs.grid;
l && (l.toggleSelect && l.toggleSelect(S), l.highlightCurrentRow && l.highlightCurrentRow(S)), n(L); l && (l.toggleSelect && l.toggleSelect(S), l.highlightCurrentRow && l.highlightCurrentRow(S)), n(k);
}, b = g(0), F = g(null), v = g(null); }, y = w(0), x = w(null), f = w(null);
let p = null, y = 0; let u = null, b = 0;
const I = () => { const P = () => {
var L; var k;
if (F.value && ((L = e.modal) == null ? void 0 : L.mode) !== "EMBED") if (x.value && ((k = e.modal) == null ? void 0 : k.mode) !== "EMBED")
if (o.model.source.enablePagingBar && v.value) { if (o.model.source.enablePagingBar && f.value) {
const S = v.value.$el, l = S.offsetHeight + parseFloat(window.getComputedStyle(S).paddingTop); const S = f.value.$el, l = S.offsetHeight + parseFloat(window.getComputedStyle(S).paddingTop);
b.value = F.value.offsetHeight - l; y.value = x.value.offsetHeight - l;
} else } else
b.value = F.value.offsetHeight; y.value = x.value.offsetHeight;
o.model.source.height > 0 && (b.value = o.model.source.height); o.model.source.height > 0 && (y.value = o.model.source.height);
}; };
N(F, (L, S) => { N(x, (k, S) => {
L && L !== S && (I(), window.ResizeObserver && F.value && (p = new ResizeObserver((l) => { k && k !== S && (P(), window.ResizeObserver && x.value && (u = new ResizeObserver((l) => {
const u = l[0].contentRect.height; const h = l[0].contentRect.height;
u !== y && (I(), y = u); h !== b && (P(), b = h);
}), p.observe(F.value))); }), u.observe(x.value)));
}), be(() => { }), be(() => {
p && p.disconnect(); u && u.disconnect();
}); });
const O = T(() => { const T = D(() => {
const L = []; const k = [];
return o.groups.forEach((S) => { return o.groups.forEach((S) => {
if (!S.children.length) if (!S.children.length)
return; return;
const u = [...S.children].shift(); const h = [...S.children].shift();
L.push({ k.push({
srfkey: S.caption, srfkey: S.caption,
isGroupData: !0, isGroupData: !0,
first: u, first: h,
children: S.children, children: S.children,
_showChildren: !0 _showChildren: !0
}); });
}), L; }), k;
}); });
return { return {
c: o, c: o,
ns: s, ns: s,
columns: i, columns: i,
tableData: O, tableData: T,
onDbRowClick: r, onDbRowClick: r,
onUIRowClick: C, onUIRowClick: F,
onSelectionChange: a, onSelectionChange: a,
onSortChange: d, onSortChange: d,
onPageChange: h, onPageChange: m,
onPageSizeChange: f, onPageSizeChange: g,
onPageReset: m, onPageReset: p,
tableHeight: b, tableHeight: y,
gridRef: F, gridRef: x,
girdPaginationRef: v girdPaginationRef: f
}; };
}, },
render() { render() {
...@@ -1597,7 +1615,7 @@ class lt { ...@@ -1597,7 +1615,7 @@ class lt {
} }
class ct { class ct {
constructor() { constructor() {
E(this, "component", Me); E(this, "component", Ae);
} }
async createController(t, s) { async createController(t, s) {
const o = new Z(t, s); const o = new Z(t, s);
...@@ -1609,7 +1627,7 @@ class dt { ...@@ -1609,7 +1627,7 @@ class dt {
E(this, "component", "IndexView"); E(this, "component", "IndexView");
} }
} }
const ae = k({ const ae = L({
name: "WFStepTraceGrid", name: "WFStepTraceGrid",
props: { props: {
context: Object, context: Object,
...@@ -1631,19 +1649,19 @@ const ae = k({ ...@@ -1631,19 +1649,19 @@ const ae = k({
setup(e) { setup(e) {
const { const {
proxy: t proxy: t
} = R(), s = Ue(t, e.modelPath); } = A(), s = Ue(t, e.modelPath);
z(t, "deName", s.setDeName.bind(s)); B(t, "deName", s.setDeName.bind(s));
const o = U("wf-step-trace-grid"), i = g([]), n = (a, d, h = !1) => { const o = U("wf-step-trace-grid"), i = w([]), n = (a, d, m = !1) => {
a.identitylinks.length > 0 || a.comments.length > 0 && a.comments.forEach((m) => { a.identitylinks.length > 0 || a.comments.length > 0 && a.comments.forEach((p) => {
var f, C, b; var g, F, y;
h && m.type === "启动流程" || d.push({ m && p.type === "启动流程" || d.push({
id: W(), id: W(),
nodeName: a.userTaskName, nodeName: a.userTaskName,
personName: (f = m.authorName) == null ? void 0 : f.replace(/\([^)]*\)[^(]*$/, ""), personName: (g = p.authorName) == null ? void 0 : g.replace(/\([^)]*\)[^(]*$/, ""),
deptName: ((b = (C = m.authorName) == null ? void 0 : C.match(/.*\(([^)]*)\)[^(]*$/)) == null ? void 0 : b[1]) || "", deptName: ((y = (F = p.authorName) == null ? void 0 : F.match(/.*\(([^)]*)\)[^(]*$/)) == null ? void 0 : y[1]) || "",
time: m.time, time: p.time,
content: m.type, content: p.type,
comment: m.fullMessage comment: p.fullMessage
}); });
}); });
}; };
...@@ -1651,9 +1669,9 @@ const ae = k({ ...@@ -1651,9 +1669,9 @@ const ae = k({
var a; var a;
s.data && ((a = s.data.usertasks) == null || a.forEach((d) => { s.data && ((a = s.data.usertasks) == null || a.forEach((d) => {
if (d.usertasks && d.usertasks.length > 0) { if (d.usertasks && d.usertasks.length > 0) {
const h = []; const m = [];
d.usertasks.forEach((m) => { d.usertasks.forEach((p) => {
n(m, h, !0); n(p, m, !0);
}), i.value.push({ }), i.value.push({
id: W(), id: W(),
nodeName: `${d.userTaskName}`, nodeName: `${d.userTaskName}`,
...@@ -1662,19 +1680,19 @@ const ae = k({ ...@@ -1662,19 +1680,19 @@ const ae = k({
time: "", time: "",
content: "", content: "",
comment: "", comment: "",
children: h, children: m,
_showChildren: !0 _showChildren: !0
}); });
} else } else
n(d, i.value); n(d, i.value);
}), i.value.sort((d, h) => Date.parse(d.time) - Date.parse(h.time))); }), i.value.sort((d, m) => Date.parse(d.time) - Date.parse(m.time)));
}); });
const r = g([{ const r = w([{
title: "序号", title: "序号",
key: "index", key: "index",
width: 60, width: 60,
resizable: !0, resizable: !0,
render: (a, d) => i.value.findIndex((m) => m.id === d.row.id) === -1 ? null : a("span", { render: (a, d) => i.value.findIndex((p) => p.id === d.row.id) === -1 ? null : a("span", {
style: { style: {
textAlign: "center" textAlign: "center"
} }
...@@ -1734,7 +1752,7 @@ const ae = k({ ...@@ -1734,7 +1752,7 @@ const ae = k({
})]); })]);
} }
}); });
class ut extends we { class ut extends ve {
async calcWfToolbar() { async calcWfToolbar() {
await super.calcWfToolbar(), this.isEditable && this.wfLinks.unshift({ await super.calcWfToolbar(), this.isEditable && this.wfLinks.unshift({
sequenceFlowName: "保存", sequenceFlowName: "保存",
...@@ -1745,7 +1763,7 @@ class ut extends we { ...@@ -1745,7 +1763,7 @@ class ut extends we {
t.type === "FORM_SAVE" ? await this.save() : super.onLinkClick(t); t.type === "FORM_SAVE" ? await this.save() : super.onLinkClick(t);
} }
} }
k({ L({
props: { props: {
context: Object, context: Object,
params: { params: {
...@@ -1762,7 +1780,7 @@ k({ ...@@ -1762,7 +1780,7 @@ k({
setup(e) { setup(e) {
const { const {
proxy: t proxy: t
} = R(), s = Q(t, (r, a) => new ut(e.modelPath, r, a)), o = U(`view-${me.DE_WF_DYNA_EDIT_VIEW3}`.toLowerCase()), i = g(["mainForm"]); } = A(), s = Q(t, (r, a) => new ut(e.modelPath, r, a)), o = U(`view-${me.DE_WF_DYNA_EDIT_VIEW3}`.toLowerCase()), i = w(["mainForm"]);
return { return {
c: s, c: s,
ns: o, ns: o,
...@@ -1864,7 +1882,7 @@ k({ ...@@ -1864,7 +1882,7 @@ k({
})])]); })])]);
} }
}); });
k({ L({
name: "SyEditView3", name: "SyEditView3",
props: { props: {
context: Object, context: Object,
...@@ -1882,7 +1900,7 @@ k({ ...@@ -1882,7 +1900,7 @@ k({
setup(e) { setup(e) {
const { const {
proxy: t proxy: t
} = R(), s = Ee(t, e.modelPath), o = U("view-deeditview3"), i = g(["mainForm"]); } = A(), s = Ee(t, e.modelPath), o = U("view-deeditview3"), i = w(["mainForm"]);
return { return {
c: s, c: s,
ns: o, ns: o,
...@@ -1977,8 +1995,8 @@ class mt extends te { ...@@ -1977,8 +1995,8 @@ class mt extends te {
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", s)).local.getList(s);
o.forEach((d) => { o.forEach((d) => {
const h = a.find((m) => m.srfkey === d.srfkey); const m = a.find((p) => p.srfkey === d.srfkey);
h && (h.psjg = "10", d.psjg = "10"); m && (m.psjg = "10", d.psjg = "10");
}); });
} }
return { return {
...@@ -2000,8 +2018,8 @@ class ft extends te { ...@@ -2000,8 +2018,8 @@ class ft extends te {
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", s)).local.getList(s);
o.forEach((d) => { o.forEach((d) => {
const h = a.find((m) => m.srfkey === d.srfkey); const m = a.find((p) => p.srfkey === d.srfkey);
h && (h.psjg = "20", d.psjg = "20"); m && (m.psjg = "20", d.psjg = "20");
}); });
} }
return { return {
...@@ -2018,18 +2036,18 @@ class gt { ...@@ -2018,18 +2036,18 @@ class gt {
return this.handler || (this.handler = new ft()), this.handler; return this.handler || (this.handler = new ft()), this.handler;
} }
} }
class vt { class wt {
constructor() { constructor() {
E(this, "component", "GroupGrid"); E(this, "component", "GroupGrid");
} }
} }
const wt = new Ae(import.meta.url), Nt = { const vt = new Re(import.meta.url), Nt = {
mateUrl: import.meta.url, mateUrl: import.meta.url,
install(e) { install(e) {
pe.getModelService().then((t) => { pe.getModelService().then((t) => {
var o; var o;
((o = t.app.userParams) == null ? void 0 : o.autoWidth) === "true" && document.getElementsByClassName("app")[0].classList.add("auto-width"); ((o = t.app.userParams) == null ? void 0 : o.autoWidth) === "true" && document.getElementsByClassName("app")[0].classList.add("auto-width");
}), wt.loadStyle(["/style.css"]), ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", e.component("WfToolbar", Be), ibiz.register.view.register( }), vt.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 dt() new dt()
), ibiz.register.view.register( ), ibiz.register.view.register(
...@@ -2049,7 +2067,7 @@ const wt = new Ae(import.meta.url), Nt = { ...@@ -2049,7 +2067,7 @@ const wt = new Ae(import.meta.url), Nt = {
new gt() new gt()
), e.component("GroupGrid", at), ibiz.register.control.register( ), e.component("GroupGrid", at), ibiz.register.control.register(
"GRID_RENDER_GROUP_GRID", "GRID_RENDER_GROUP_GRID",
new vt() new wt()
); );
} }
}; };
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册