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

feat: 更新dsf插件包

上级 fe0d8583
var de = Object.defineProperty; var de = Object.defineProperty;
var ue = (s, a, e) => a in s ? de(s, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[a] = e; var ue = (s, a, e) => a in s ? de(s, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[a] = e;
var b = (s, a, e) => (ue(s, typeof a != "symbol" ? a + "" : a, e), e); var P = (s, a, e) => (ue(s, typeof a != "symbol" ? a + "" : a, e), e);
import { EditFormModel as me, FormMDCtrlModel as pe, DefectModelError as he, AppEntityModel as H } from "@ibiz-template/model"; import { EditFormModel as me, FormMDCtrlModel as pe, DefectModelError as he, AppEntityModel as H } from "@ibiz-template/model";
import { useNamespace as B, useControlController as fe, usePropsWatch as ve, getDatePickerProps as ye, getEditorEmits as G, useController as ge, getDataPickerProps as se, useViewController as we } from "@ibiz-template/vue-util"; import { useNamespace as B, useControlController as fe, usePropsWatch as ve, getDatePickerProps as ye, getEditorEmits as G, useController as ge, getDataPickerProps as se, useViewController as we } from "@ibiz-template/vue-util";
import { defineComponent as M, getCurrentInstance as W, ref as P, watch as V, h as r, onMounted as De, computed as j } from "vue"; import { defineComponent as M, getCurrentInstance as W, ref as A, watch as V, h as r, onMounted as De, computed as j } from "vue";
import { createUUID as te } from "qx-util"; import { createUUID as te } from "qx-util";
import { ViewMode as ae, PluginStaticResource as Ce, OpenAppViewCommand as q, UIActionHandler as Ee, FrontUIActionHandler as re } from "@ibiz-template/runtime"; import { ViewMode as ae, PluginStaticResource as Ce, OpenAppViewCommand as q, UIActionHandler as Ee, FrontUIActionHandler as re } from "@ibiz-template/runtime";
import { EditFormController as be, FormMDCtrlController as Pe, FormDRUIPartController as Ae, EditViewController as Fe, DatePickerEditorController as Se, UploadEditorController as Ie, PickerEditorController as oe } from "@ibiz-template/controller"; import { EditFormController as be, FormMDCtrlController as Pe, FormDRUIPartController as Ae, EditViewController as Fe, DatePickerEditorController as Ie, UploadEditorController as Se, PickerEditorController as oe } from "@ibiz-template/controller";
import { ControlVO as xe, calcResPath as K } from "@ibiz-template/service"; import { ControlVO as ke, calcResPath as K } from "@ibiz-template/service";
import $ from "dayjs"; import $ from "dayjs";
import { RuntimeError as ke, StringUtil as ne } from "@ibiz-template/core"; import { RuntimeError as xe, StringUtil as ne } from "@ibiz-template/core";
class Ne extends be { class Ne extends be {
constructor() { constructor() {
super(...arguments); super(...arguments);
...@@ -20,7 +20,7 @@ class Ne extends be { ...@@ -20,7 +20,7 @@ class Ne extends be {
* @date 2024-04-26 17:04:49 * @date 2024-04-26 17:04:49
* @type {IData} * @type {IData}
*/ */
b(this, "baseResData", []); P(this, "baseResData", []);
/** /**
* 对比数据 * 对比数据
* *
...@@ -28,7 +28,7 @@ class Ne extends be { ...@@ -28,7 +28,7 @@ class Ne extends be {
* @date 2024-04-26 17:04:49 * @date 2024-04-26 17:04:49
* @type {IData} * @type {IData}
*/ */
b(this, "compareResData", []); P(this, "compareResData", []);
/** /**
* 表单旧数据 * 表单旧数据
* *
...@@ -38,7 +38,7 @@ class Ne extends be { ...@@ -38,7 +38,7 @@ class Ne extends be {
* @type {IData} * @type {IData}
* @memberof FormController * @memberof FormController
*/ */
b(this, "oldData", new xe()); P(this, "oldData", new ke());
/** /**
* version数据 * version数据
* *
...@@ -46,7 +46,7 @@ class Ne extends be { ...@@ -46,7 +46,7 @@ class Ne extends be {
* @date 2024-04-26 16:04:37 * @date 2024-04-26 16:04:37
* @type {IData[]} * @type {IData[]}
*/ */
b(this, "versionData", []); P(this, "versionData", []);
/** /**
* 对比数据 * 对比数据
* *
...@@ -54,7 +54,7 @@ class Ne extends be { ...@@ -54,7 +54,7 @@ class Ne extends be {
* @date 2024-04-26 16:04:37 * @date 2024-04-26 16:04:37
* @type {IData[]} * @type {IData[]}
*/ */
b(this, "comparisonArr", {}); P(this, "comparisonArr", {});
/** /**
* 基础表格数据 * 基础表格数据
* *
...@@ -62,7 +62,7 @@ class Ne extends be { ...@@ -62,7 +62,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:57 * @date 2024-05-06 11:05:57
* @type {IData[]} * @type {IData[]}
*/ */
b(this, "gridData", []); P(this, "gridData", []);
/** /**
* 展示完全数据 * 展示完全数据
* *
...@@ -70,7 +70,7 @@ class Ne extends be { ...@@ -70,7 +70,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:04 * @date 2024-05-06 11:05:04
* @type {IData[]} * @type {IData[]}
*/ */
b(this, "AllGridData", []); P(this, "AllGridData", []);
/** /**
* 去除相同数据 * 去除相同数据
* *
...@@ -78,7 +78,7 @@ class Ne extends be { ...@@ -78,7 +78,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:15 * @date 2024-05-06 11:05:15
* @type {IData[]} * @type {IData[]}
*/ */
b(this, "removeSameGridData", []); P(this, "removeSameGridData", []);
/** /**
* 关系界面数据 * 关系界面数据
* *
...@@ -86,7 +86,7 @@ class Ne extends be { ...@@ -86,7 +86,7 @@ class Ne extends be {
* @date 2024-04-30 10:04:33 * @date 2024-04-30 10:04:33
* @type {IData} * @type {IData}
*/ */
b(this, "AlldruipartData", /* @__PURE__ */ new Map()); P(this, "AlldruipartData", /* @__PURE__ */ new Map());
/** /**
* 关系界面数据长度 * 关系界面数据长度
* *
...@@ -94,7 +94,7 @@ class Ne extends be { ...@@ -94,7 +94,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:56 * @date 2024-05-06 11:05:56
* @type {number} * @type {number}
*/ */
b(this, "druipartDataSize", 0); P(this, "druipartDataSize", 0);
/** /**
* 关系界面实际数据 * 关系界面实际数据
* *
...@@ -102,7 +102,7 @@ class Ne extends be { ...@@ -102,7 +102,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:13 * @date 2024-05-06 11:05:13
* @type {IData} * @type {IData}
*/ */
b(this, "newDruipartData", {}); P(this, "newDruipartData", {});
} }
/** /**
* 加载数据 * 加载数据
...@@ -112,18 +112,18 @@ class Ne extends be { ...@@ -112,18 +112,18 @@ class Ne extends be {
*/ */
async loadGridData() { async loadGridData() {
await this.startLoading(); await this.startLoading();
const e = this.model.source.M.getPSControlParam.ctrlParams, { BASEENTITY: t, COMPAREENTITY: i } = e, n = await ibiz.entityService.getService(t), d = await ibiz.entityService.getService(i), g = Object.assign({}, this.context.clone(), { const e = this.model.source.M.getPSControlParam.ctrlParams, { BASEENTITY: t, COMPAREENTITY: i } = e, n = await ibiz.entityService.getService(t), c = await ibiz.entityService.getService(i), g = Object.assign({}, this.context.clone(), {
[t.toLowerCase()]: this.params.base_version [t.toLowerCase()]: this.params.base_version
}), u = Object.assign({}, this.context.clone(), { }), u = Object.assign({}, this.context.clone(), {
[i.toLowerCase()]: this.params.compare_version [i.toLowerCase()]: this.params.compare_version
}), p = await n.exec("Get", g, this.params), y = await d.exec( }), m = await n.exec("Get", g, this.params), w = await c.exec(
"Get", "Get",
u, u,
this.params this.params
); );
return this.isLoaded = !0, { return this.isLoaded = !0, {
baseData: p.data.data, baseData: m.data.data,
compareData: y.data.data compareData: w.data.data
}; };
} }
/** /**
...@@ -174,59 +174,59 @@ const Oe = M({ ...@@ -174,59 +174,59 @@ const Oe = M({
} = W(), t = fe(e, () => { } = W(), t = fe(e, () => {
const o = new Ne(s.modelData, s.context, s.params); const o = new Ne(s.modelData, s.context, s.params);
return ve(e, "enableAutoSave", o.setEnableAutoSave.bind(o)), o; return ve(e, "enableAutoSave", o.setEnableAutoSave.bind(o)), o;
}), i = P(!0), n = P(!1), d = P({}), g = P({}), u = P([]), p = [], y = P([]), c = P([]), v = P([]), f = /* @__PURE__ */ new Map(), w = P(0), l = (o) => { }), i = A(!0), n = A(!1), c = A({}), g = A({}), u = A([]), m = [], w = A([]), l = A([]), v = A([]), f = /* @__PURE__ */ new Map(), C = A(0), h = (o) => {
const m = []; const d = [];
if (m.push(o), o && o.children) { if (d.push(o), o && o.children) {
const E = []; const b = [];
o.children.forEach((S) => { o.children.forEach((S) => {
const x = l(S); const x = h(S);
E.push(...x); b.push(...x);
}), m.push(...E); }), d.push(...b);
} }
return m; return d;
}, h = l(s.modelData); }, p = h(s.modelData);
p.push(...h); m.push(...p);
const C = (o) => { const y = (o) => {
const m = t.details[o.source.name], E = r("not-supported-editor", { const d = t.details[o.source.name], b = r("not-supported-editor", {
attrs: { attrs: {
modelData: o.editor modelData: o.editor
} }
}); });
return r("div", { return r("div", {
class: [a.e("form-grid-item"), a.is("add", y.value.includes(o.source.name)), a.is("update", v.value.includes(o.source.name)), a.is("delete", c.value.includes(o.source.name))] class: [a.e("form-grid-item"), a.is("add", w.value.includes(o.source.name)), a.is("update", v.value.includes(o.source.name)), a.is("delete", l.value.includes(o.source.name))]
}, [r("div", { }, [r("div", {
class: a.em("form-grid-item", "name") class: a.em("form-grid-item", "name")
}, [o.source.caption]), r("div", { }, [o.source.caption]), r("div", {
class: a.em("form-grid-item", "left") class: a.em("form-grid-item", "left")
}, [m.editorProvider ? r(m.editorProvider.formEditor, { }, [d.editorProvider ? r(d.editorProvider.formEditor, {
props: { props: {
value: g.value[o.source.name], value: g.value[o.source.name],
data: m.data, data: d.data,
controller: m.editor, controller: d.editor,
disabled: m.disabled, disabled: d.disabled,
readonly: !0 readonly: !0
} }
}) : E]), r("div", { }) : b]), r("div", {
class: a.em("form-grid-item", "right") class: a.em("form-grid-item", "right")
}, [m.editorProvider ? r(m.editorProvider.formEditor, { }, [d.editorProvider ? r(d.editorProvider.formEditor, {
props: { props: {
value: d.value[o.source.name], value: c.value[o.source.name],
data: m.data, data: d.data,
controller: m.editor, controller: d.editor,
disabled: m.disabled, disabled: d.disabled,
readonly: !0 readonly: !0
} }
}) : E])]); }) : b])]);
}, F = (o, m) => { }, F = (o, d) => {
f.set(o.source.id, m), m.evt.on("mounted", () => { f.set(o.source.id, d), d.evt.on("mounted", () => {
i.value && t.startLoading(), w.value += 1, m.call.refresh(); i.value && t.startLoading(), C.value += 1, d.call.refresh();
}), m.evt.on("refreshed", () => { }), d.evt.on("refreshed", () => {
w.value -= 1, setTimeout(() => { C.value -= 1, setTimeout(() => {
i.value && t.endLoading(); i.value && t.endLoading();
}, 500); }, 500);
}); });
}, O = (o) => { }, I = (o) => {
const m = p.find((L) => L.id === `${o.source.id}_srfcopy`), E = o.embedView.source.modelPath, S = m == null ? void 0 : m.embedView.source.modelPath, x = t.context.clone(), k = { const d = m.find((L) => L.id === `${o.source.id}_srfcopy`), b = o.embedView.source.modelPath, S = d == null ? void 0 : d.embedView.source.modelPath, x = t.context.clone(), N = {
base_version: s.params.base_version base_version: s.params.base_version
}, T = t.context.clone(); }, T = t.context.clone();
Object.assign(T, { Object.assign(T, {
...@@ -235,7 +235,7 @@ const Oe = M({ ...@@ -235,7 +235,7 @@ const Oe = M({
}); });
const _ = { const _ = {
compare_version: s.params.compare_version compare_version: s.params.compare_version
}, R = d.value[o.source.userTag], U = g.value[m == null ? void 0 : m.source.userTag]; }, R = c.value[o.source.userTag], U = g.value[d == null ? void 0 : d.source.userTag];
let J = !1, z = !1, X = !1; let J = !1, z = !1, X = !1;
if (o.source.userTag2) { if (o.source.userTag2) {
const L = JSON.parse(o.source.userTag2), { const L = JSON.parse(o.source.userTag2), {
...@@ -262,22 +262,22 @@ const Oe = M({ ...@@ -262,22 +262,22 @@ const Oe = M({
}, },
modelPath: S, modelPath: S,
noLoadDefault: !0, noLoadDefault: !0,
name: m == null ? void 0 : m.source.id name: d == null ? void 0 : d.source.id
}, },
key: te(), key: te(),
on: { on: {
neuronInit: (L) => F(m, L) neuronInit: (L) => F(d, L)
} }
})]), r("div", { })]), r("div", {
class: a.em("druipart", "right") class: a.em("druipart", "right")
}, [E && r("ViewShell", { }, [b && r("ViewShell", {
attrs: { attrs: {
context: x, context: x,
params: k, params: N,
modal: { modal: {
mode: ae.EMBED mode: ae.EMBED
}, },
modelPath: E, modelPath: b,
noLoadDefault: !0, noLoadDefault: !0,
name: o.source.id name: o.source.id
}, },
...@@ -287,17 +287,17 @@ const Oe = M({ ...@@ -287,17 +287,17 @@ const Oe = M({
} }
})])]); })])]);
}, D = (o) => { }, D = (o) => {
const m = { const d = {
modelData: o, modelData: o,
controller: t.details[o.source.name] controller: t.details[o.source.name]
}, E = t.providers[o.source.name], S = r(E.component, { }, b = t.providers[o.source.name], S = r(b.component, {
props: { props: {
...m ...d
}, },
key: o.id key: o.id
}), x = r(E.component, { }), x = r(b.component, {
props: { props: {
...m ...d
}, },
key: `compare_${o.id}` key: `compare_${o.id}`
}); });
...@@ -310,36 +310,36 @@ const Oe = M({ ...@@ -310,36 +310,36 @@ const Oe = M({
}, [S]), r("div", { }, [S]), r("div", {
class: a.em("mdctrl", "right") class: a.em("mdctrl", "right")
}, [x])]); }, [x])]);
}, A = (o) => { }, E = (o) => {
i.value = !1; i.value = !1;
const m = u.value.findIndex((E) => E === o.source.name); const d = u.value.findIndex((b) => b === o.source.name);
m > -1 ? u.value.splice(m, 1) : u.value.push(o.source.name); d > -1 ? u.value.splice(d, 1) : u.value.push(o.source.name);
}, I = (o) => { }, k = (o) => {
if (!o.source.hidden) { if (!o.source.hidden) {
if (o.source.detailType === "FORMPAGE") if (o.source.detailType === "FORMPAGE")
return r("div", { return r("div", {
class: a.e("form-page") class: a.e("form-page")
}, [o.children.map((m) => I(m))]); }, [o.children.map((d) => k(d))]);
if (o.source.detailType === "FORMITEM") { if (o.source.detailType === "FORMITEM") {
const m = y.value.includes(o.source.name), E = c.value.includes(o.source.name), S = v.value.includes(o.source.name); const d = w.value.includes(o.source.name), b = l.value.includes(o.source.name), S = v.value.includes(o.source.name);
return n.value && !m && !E && !S ? null : C(o); return n.value && !d && !b && !S ? null : y(o);
} }
if (o.source.detailType === "GROUPPANEL") { if (o.source.detailType === "GROUPPANEL") {
const m = u.value.includes(o.source.name); const d = u.value.includes(o.source.name);
return r("div", { return r("div", {
class: a.b("group") class: a.b("group")
}, [r("div", { }, [r("div", {
class: [a.be("group", "header"), a.is("hide-caption", !o.source.showCaption)] class: [a.be("group", "header"), a.is("hide-caption", !o.source.showCaption)]
}, [r("div", { }, [r("div", {
class: a.bem("group", "header", "name") class: a.bem("group", "header", "name")
}, [m ? r("i-icon", { }, [d ? r("i-icon", {
class: a.bem("group", "header", "icon"), class: a.bem("group", "header", "icon"),
attrs: { attrs: {
type: "ios-arrow-forward", type: "ios-arrow-forward",
title: "展开" title: "展开"
}, },
on: { on: {
click: () => A(o) click: () => E(o)
} }
}) : r("i-icon", { }) : r("i-icon", {
class: a.bem("group", "header", "icon"), class: a.bem("group", "header", "icon"),
...@@ -348,50 +348,50 @@ const Oe = M({ ...@@ -348,50 +348,50 @@ const Oe = M({
title: "收缩" title: "收缩"
}, },
on: { on: {
click: () => A(o) click: () => E(o)
} }
}), r("span", { }), r("span", {
class: a.bem("group", "header", "name-text") class: a.bem("group", "header", "name-text")
}, [o.source.caption || o.source.title])]), r("div", ["---"]), r("div", ["---"])]), r("div", { }, [o.source.caption || o.source.title])]), r("div", ["---"]), r("div", ["---"])]), r("div", {
class: [a.be("group", "content"), a.is("collapse", m)] class: [a.be("group", "content"), a.is("collapse", d)]
}, [o.children.map((E) => I(E))])]); }, [o.children.map((b) => k(b))])]);
} }
return o.source.detailType === "DRUIPART" && !o.source.name.endsWith("_srfcopy") ? O(o) : o.source.detailType === "MDCTRL" ? D(o) : null; return o.source.detailType === "DRUIPART" && !o.source.name.endsWith("_srfcopy") ? I(o) : o.source.detailType === "MDCTRL" ? D(o) : null;
} }
}, N = (o, m) => { }, O = (o, d) => {
const E = [], S = [], x = []; const b = [], S = [], x = [];
return Object.keys(m).forEach((k) => { return Object.keys(d).forEach((N) => {
const T = o[k], _ = m[k]; const T = o[N], _ = d[N];
t.isFalseyButNotEmpty(T) && !t.isFalseyButNotEmpty(_) && E.push(k), !t.isFalseyButNotEmpty(T) && !t.isFalseyButNotEmpty(_) && t.compareObjectValues(T, _) && S.push(k); t.isFalseyButNotEmpty(T) && !t.isFalseyButNotEmpty(_) && b.push(N), !t.isFalseyButNotEmpty(T) && !t.isFalseyButNotEmpty(_) && t.compareObjectValues(T, _) && S.push(N);
}), Object.keys(o).forEach((k) => { }), Object.keys(o).forEach((N) => {
if (!Object.prototype.hasOwnProperty.call(m, k) || t.isFalseyButNotEmpty(m[k])) { if (!Object.prototype.hasOwnProperty.call(d, N) || t.isFalseyButNotEmpty(d[N])) {
const T = o[k]; const T = o[N];
t.isFalseyButNotEmpty(T) || x.push(k); t.isFalseyButNotEmpty(T) || x.push(N);
} }
}), { }), {
added: E, added: b,
modified: S, modified: S,
deleted: x deleted: x
}; };
}; };
return V(() => s.params, async () => { return V(() => s.params, async () => {
const o = await t.loadGridData(); const o = await t.loadGridData();
d.value = o.baseData, g.value = o.compareData; c.value = o.baseData, g.value = o.compareData;
const { const {
added: m, added: d,
modified: E, modified: b,
deleted: S deleted: S
} = N(g.value, d.value); } = O(g.value, c.value);
y.value = m, v.value = E, c.value = S; w.value = d, v.value = b, l.value = S;
}, { }, {
immediate: !0 immediate: !0
}), { }), {
ns: a, ns: a,
c: t, c: t,
switchValue: n, switchValue: n,
druipartNum: w, druipartNum: C,
renderEditor: C, renderEditor: y,
renderByDetailType: I renderByDetailType: k
}; };
}, },
render() { render() {
...@@ -459,15 +459,15 @@ const Te = M({ ...@@ -459,15 +459,15 @@ const Te = M({
setup(s, { setup(s, {
emit: a emit: a
}) { }) {
const e = B("data-import"), t = P(), i = P({ const e = B("data-import"), t = A(), i = A({
state: "ready", state: "ready",
message: "", message: "",
rowError: [] rowError: []
}), n = P(""), d = async (c) => { }), n = A(""), c = async (l) => {
const v = new FormData(), f = $(n.value).format("YYYY-MM"); const v = new FormData(), f = $(n.value).format("YYYY-MM");
v.append("file", c), v.append("ny", f); v.append("file", l), v.append("ny", f);
try { try {
const w = await ibiz.net.request(s.importUrl, { const C = await ibiz.net.request(s.importUrl, {
method: "post", method: "post",
data: v, data: v,
headers: { headers: {
...@@ -476,46 +476,46 @@ const Te = M({ ...@@ -476,46 +476,46 @@ const Te = M({
}); });
i.value.state = "success", i.value.message = "导入成功"; i.value.state = "success", i.value.message = "导入成功";
const { const {
errorinfo: l, errorinfo: h,
success: h, success: p,
total: C total: y
} = w.data, F = C ? Number(C) : 0, O = h ? Number(h) : 0, D = C - h; } = C.data, F = y ? Number(y) : 0, I = p ? Number(p) : 0, D = y - p;
i.value.message = `共计导入数据 ${F} 条,错误[${D}],成功[${O}]`, l && Object.keys(l).length > 0 && (i.value.rowError = [], Object.keys(l).forEach((A) => { i.value.message = `共计导入数据 ${F} 条,错误[${D}],成功[${I}]`, h && Object.keys(h).length > 0 && (i.value.rowError = [], Object.keys(h).forEach((E) => {
i.value.rowError.push({ i.value.rowError.push({
index: Number(A) + 1, index: Number(E) + 1,
info: l[A].errorInfo info: h[E].errorInfo
}); });
})); }));
} catch (w) { } catch (C) {
i.value.state = "fail", i.value.message = `导入失败!${w.message}`; i.value.state = "fail", i.value.message = `导入失败!${C.message}`;
} }
}, g = (c) => { }, g = (l) => {
const v = c.target; const v = l.target;
if (!v.files) if (!v.files)
return; return;
const f = v.files[0]; const f = v.files[0];
v.value = null, d(f); v.value = null, c(f);
}, u = async () => { }, u = async () => {
var v; var v;
const c = await ibiz.net.request(s.templateUrl, { const l = await ibiz.net.request(s.templateUrl, {
responseType: "blob" responseType: "blob"
}); });
if (c.status === 200) { if (l.status === 200) {
let f = ((v = c.headers["content-disposition"].split(";").find((h) => h.indexOf("filename=") !== -1)) == null ? void 0 : v.slice(9)) || ""; let f = ((v = l.headers["content-disposition"].split(";").find((p) => p.indexOf("filename=") !== -1)) == null ? void 0 : v.slice(9)) || "";
f = decodeURIComponent(f); f = decodeURIComponent(f);
const w = new Blob([c.data], { const C = new Blob([l.data], {
type: "application/vnd.ms-excel" type: "application/vnd.ms-excel"
}), l = document.createElement("a"); }), h = document.createElement("a");
l.download = f, l.style.display = "none", l.href = URL.createObjectURL(w), document.body.appendChild(l), l.click(), URL.revokeObjectURL(l.href), document.body.removeChild(l); h.download = f, h.style.display = "none", h.href = URL.createObjectURL(C), document.body.appendChild(h), h.click(), URL.revokeObjectURL(h.href), document.body.removeChild(h);
} }
}, p = () => { }, m = () => {
t.value.click(); t.value.click();
}, y = () => { }, w = () => {
var c; var l;
a("close", { a("close", {
ok: !1, ok: !1,
data: {} data: {}
}), (c = s.dismiss) == null || c.call(s, { }), (l = s.dismiss) == null || l.call(s, {
ok: !1, ok: !1,
data: {} data: {}
}); });
...@@ -526,8 +526,8 @@ const Te = M({ ...@@ -526,8 +526,8 @@ const Te = M({
ns: e, ns: e,
curDate: n, curDate: n,
onLinkClick: u, onLinkClick: u,
selectFile: p, selectFile: m,
onCancelButtonClick: y, onCancelButtonClick: w,
onFileChange: g, onFileChange: g,
inputUpLoad: t, inputUpLoad: t,
message: i message: i
...@@ -613,7 +613,7 @@ const Me = M({ ...@@ -613,7 +613,7 @@ const Me = M({
setup(s, { setup(s, {
emit: a emit: a
}) { }) {
const e = B("date-picker"), t = s.controller, i = t.model, n = P("date"), d = P("yyyy-MM-dd"), g = P(!1); const e = B("date-picker"), t = s.controller, i = t.model, n = A("date"), c = A("yyyy-MM-dd"), g = A(!1);
switch (i.editorType) { switch (i.editorType) {
case "DATEPICKEREX": case "DATEPICKEREX":
case "DATEPICKEREX_NOTIME": case "DATEPICKEREX_NOTIME":
...@@ -635,24 +635,24 @@ const Me = M({ ...@@ -635,24 +635,24 @@ const Me = M({
if (u) { if (u) {
u === "YYYY-MM" ? n.value = "month" : u === "YYYY" && (n.value = "year"); u === "YYYY-MM" ? n.value = "month" : u === "YYYY" && (n.value = "year");
const f = u.replace("YYYY", "yyyy").replace("DD", "dd"); const f = u.replace("YYYY", "yyyy").replace("DD", "dd");
d.value = f; c.value = f;
} }
i.editorParams.formatText && (d.value = i.editorParams.formatText.replace("YYYY", "yyyy").replace("DD", "dd")); i.editorParams.formatText && (c.value = i.editorParams.formatText.replace("YYYY", "yyyy").replace("DD", "dd"));
const p = P(); const m = A();
V(() => s.value, (f, w) => { V(() => s.value, (f, C) => {
f && f !== w && (p.value = $(f).format(u)); f && f !== C && (m.value = $(f).format(u));
}, { }, {
immediate: !0 immediate: !0
}); });
const y = (f, w) => { const w = (f, C) => {
if (f) { if (f) {
const l = $(f.replace(/[年月]/g, "-")).format(u); const h = $(f.replace(/[年月]/g, "-")).format(u);
a("change", l); a("change", h);
} else } else
a("change", f); a("change", f);
}, c = (f) => { }, l = (f) => {
a("operate", f); a("operate", f);
}, v = P(); }, v = A();
return s.autoFocus && V(v, (f) => { return s.autoFocus && V(v, (f) => {
f && f.$el.getElementsByTagName("input")[0].click(); f && f.$el.getElementsByTagName("input")[0].click();
}), { }), {
...@@ -660,10 +660,10 @@ const Me = M({ ...@@ -660,10 +660,10 @@ const Me = M({
c: t, c: t,
editorModel: i, editorModel: i,
type: n, type: n,
format: d, format: c,
formatValue: p, formatValue: m,
handleChange: y, handleChange: w,
onOpenChange: c, onOpenChange: l,
inputRef: v, inputRef: v,
isTimePicker: g isTimePicker: g
}; };
...@@ -734,7 +734,7 @@ class le extends Pe { ...@@ -734,7 +734,7 @@ class le extends Pe {
* @type {number} * @type {number}
* @memberof FormMDCtrlFormStyle2Controller * @memberof FormMDCtrlFormStyle2Controller
*/ */
b(this, "active", 0); P(this, "active", 0);
} }
/** /**
* 计算表单更新项信息 * 计算表单更新项信息
...@@ -761,7 +761,7 @@ class le extends Pe { ...@@ -761,7 +761,7 @@ class le extends Pe {
this.formNeurons.delete(e); this.formNeurons.delete(e);
}), t.evt.on("valueChange", (i) => { }), t.evt.on("valueChange", (i) => {
if (i) { if (i) {
const n = this.contentCtrlData.find((d) => d.srfkey === i.srfkey); const n = this.contentCtrlData.find((c) => c.srfkey === i.srfkey);
n && Object.assign(n, i), this.force(); n && Object.assign(n, i), this.force();
} }
}), t.evt.on("afterSave", async () => { }), t.evt.on("afterSave", async () => {
...@@ -771,9 +771,9 @@ class le extends Pe { ...@@ -771,9 +771,9 @@ class le extends Pe {
]); ]);
const n = this.model.source.getPSDEFormItemUpdate(); const n = this.model.source.getPSDEFormItemUpdate();
if (n) { if (n) {
const { methodName: d, itemNames: g, model: u } = this.calcFormUpdateItem(n); const { methodName: c, itemNames: g, model: u } = this.calcFormUpdateItem(n);
await this.form.updateFormItem( await this.form.updateFormItem(
d, c,
g, g,
u u
); );
...@@ -788,19 +788,19 @@ class le extends Pe { ...@@ -788,19 +788,19 @@ class le extends Pe {
*/ */
async validate() { async validate() {
const e = []; const e = [];
this.formNeurons.forEach((n, d) => { this.formNeurons.forEach((n, c) => {
const g = n.call.getFormController(); const g = n.call.getFormController();
e.push({ key: d, controller: g }); e.push({ key: c, controller: g });
}); });
let t = ""; let t = "";
const i = await Promise.all( const i = await Promise.all(
e.map(async (n) => { e.map(async (n) => {
const d = await n.controller.validate(); const c = await n.controller.validate();
return !t && !d && (t = n.key), d; return !t && !c && (t = n.key), c;
}) })
); );
if (t) { if (t) {
const n = this.contentCtrlData.findIndex((d) => d.srfkey === t); const n = this.contentCtrlData.findIndex((c) => c.srfkey === t);
n > -1 && (this.active = n); n > -1 && (this.active = n);
} }
return i.findIndex((n) => !n) === -1; return i.findIndex((n) => !n) === -1;
...@@ -813,19 +813,19 @@ class le extends Pe { ...@@ -813,19 +813,19 @@ class le extends Pe {
*/ */
async silentValidate() { async silentValidate() {
const e = []; const e = [];
this.formNeurons.forEach((n, d) => { this.formNeurons.forEach((n, c) => {
const g = n.call.getFormController(); const g = n.call.getFormController();
e.push({ key: d, controller: g }); e.push({ key: c, controller: g });
}); });
let t = ""; let t = "";
const i = await Promise.all( const i = await Promise.all(
e.map(async (n) => { e.map(async (n) => {
const d = await n.controller.silentValidate(); const c = await n.controller.silentValidate();
return !t && !d && (t = n.key), d; return !t && !c && (t = n.key), c;
}) })
); );
if (t) { if (t) {
const n = this.contentCtrlData.findIndex((d) => d.srfkey === t); const n = this.contentCtrlData.findIndex((c) => c.srfkey === t);
n > -1 && (this.active = n); n > -1 && (this.active = n);
} }
return i.findIndex((n) => !n) === -1; return i.findIndex((n) => !n) === -1;
...@@ -848,56 +848,56 @@ const Ue = M({ ...@@ -848,56 +848,56 @@ const Ue = M({
proxy: t proxy: t
} = W(); } = W();
ge(t, s.controller); ge(t, s.controller);
const i = async (p, y, c) => { const i = async (m, w, l) => {
c.stopPropagation(), c.preventDefault(); l.stopPropagation(), l.preventDefault();
const v = e.contentCtrlData.length; const v = e.contentCtrlData.length;
await e.handleRemove(p, y), v !== e.contentCtrlData.length && y <= e.active && e.active !== 0 && (e.active -= 1); await e.handleRemove(m, w), v !== e.contentCtrlData.length && w <= e.active && e.active !== 0 && (e.active -= 1);
}, n = (p) => { }, n = (m) => {
e.active = p, e.force(); e.active = m, e.force();
}, d = async () => { }, c = async () => {
const p = JSON.parse(JSON.stringify(e.contentCtrlData)).length; const m = JSON.parse(JSON.stringify(e.contentCtrlData)).length;
await e.handleAdd(), p < e.contentCtrlData.length && (e.active = e.contentCtrlData.length - 1); await e.handleAdd(), m < e.contentCtrlData.length && (e.active = e.contentCtrlData.length - 1);
}, g = () => { }, g = () => {
const p = s.modelData.source.userTag; const m = s.modelData.source.userTag;
let y = {}; let w = {};
p && (y = JSON.parse(p)); m && (w = JSON.parse(m));
const { const {
tabtitle: c, tabtitle: l,
addtitle: v, addtitle: v,
usermode: f usermode: f
} = y; } = w;
return f === "user1" && e.contentCtrlData.some((l) => l.rcrylx === "system") ? r("div", { return f === "user1" && e.contentCtrlData.some((h) => h.rcrylx === "system") ? r("div", {
class: a.e("header") class: a.e("header")
}, [e.contentCtrlData.map((l, h) => { }, [e.contentCtrlData.map((h, p) => {
let C = ""; let y = "";
l.srfmajortext ? C = l.srfmajortext : c && l[c] && (C = l[c]); h.srfmajortext ? y = h.srfmajortext : l && h[l] && (y = h[l]);
let F = "待确认"; let F = "待确认";
return l.is_rc === 1 ? F = "确认入场" : l.is_rc === 0 && (F = "放弃入场"), r("div", { return h.is_rc === 1 ? F = "确认入场" : h.is_rc === 0 && (F = "放弃入场"), r("div", {
class: [a.e("header-item"), a.is("actived", h === e.active)], class: [a.e("header-item"), a.is("actived", p === e.active)],
on: { on: {
click: () => n(h) click: () => n(p)
} }
}, [r("div", { }, [r("div", {
class: a.em("header-item", "title") class: a.em("header-item", "title")
}, [C, "(", F, ")"])]); }, [y, "(", F, ")"])]);
})]) : r("div", { })]) : r("div", {
class: a.e("header") class: a.e("header")
}, [e.contentCtrlData.map((w, l) => { }, [e.contentCtrlData.map((C, h) => {
let h = `新建${l + 1}`; let p = `新建${h + 1}`;
return w.srfmajortext ? h = w.srfmajortext : c && w[c] ? h = w[c] : v && (h = `${v}${l + 1}`), r("div", { return C.srfmajortext ? p = C.srfmajortext : l && C[l] ? p = C[l] : v && (p = `${v}${h + 1}`), r("div", {
class: [a.e("header-item"), a.is("actived", l === e.active)], class: [a.e("header-item"), a.is("actived", h === e.active)],
on: { on: {
click: () => n(l) click: () => n(h)
} }
}, [r("div", { }, [r("div", {
class: a.em("header-item", "title") class: a.em("header-item", "title")
}, [h]), e.enableDelete && r("div", { }, [p]), e.enableDelete && r("div", {
class: a.em("header-item", "delete"), class: a.em("header-item", "delete"),
attrs: { attrs: {
title: "移除" title: "移除"
}, },
on: { on: {
click: (C) => i(w, l, C) click: (y) => i(C, h, y)
} }
}, [r("i", { }, [r("i", {
class: "fa fa-close" class: "fa fa-close"
...@@ -908,44 +908,44 @@ const Ue = M({ ...@@ -908,44 +908,44 @@ const Ue = M({
title: "添加" title: "添加"
}, },
on: { on: {
click: () => d() click: () => c()
} }
}, [r("span", ["添加"]), r("i", { }, [r("span", ["添加"]), r("i", {
class: "fa fa-plus" class: "fa fa-plus"
})])]); })])]);
}; };
return V(() => e.form.isLoaded, (p, y) => { return V(() => e.form.isLoaded, (m, w) => {
p !== y && p === !0 && e.loadData(); m !== w && m === !0 && e.loadData();
}), { }), {
ns: a, ns: a,
rendertanHeader: g, rendertanHeader: g,
renderTabs: () => e.contentCtrlData.map((p, y) => { renderTabs: () => e.contentCtrlData.map((m, w) => {
var f; var f;
let c = null; let l = null;
const { const {
form: v form: v
} = e.model; } = e.model;
if (v && e.providers[v.name] && e.model.appEntity) { if (v && e.providers[v.name] && e.model.appEntity) {
const w = Object.assign(e.form.context.clone(), { const C = Object.assign(e.form.context.clone(), {
[(f = e.model.appEntity.codeName) == null ? void 0 : f.toLowerCase()]: p[e.model.appEntity.keyName] [(f = e.model.appEntity.codeName) == null ? void 0 : f.toLowerCase()]: m[e.model.appEntity.keyName]
}); });
c = r(e.providers[v.name].component, { l = r(e.providers[v.name].component, {
props: { props: {
modelData: v, modelData: v,
context: w, context: C,
params: e.form.params, params: e.form.params,
enableAutoSave: !0, enableAutoSave: !0,
silentVerify: !0 silentVerify: !0
}, },
on: { on: {
neuronInit: e.onNeuronInit(p.srfkey) neuronInit: e.onNeuronInit(m.srfkey)
} }
}); });
} }
return r("div", { return r("div", {
class: [a.e("content"), a.is("actived", y === e.active)], class: [a.e("content"), a.is("actived", w === e.active)],
key: p.srfkey key: m.srfkey
}, [c]); }, [l]);
}) })
}; };
}, },
...@@ -961,75 +961,75 @@ const Ue = M({ ...@@ -961,75 +961,75 @@ const Ue = M({
setup(s, { setup(s, {
emit: a emit: a
}) { }) {
const e = B("mpicker"), t = s.controller, i = P([]), n = P([]), d = P([]), g = P(!1), u = P(!1), p = P(null), y = P([]), c = P(!0), v = j(() => { const e = B("mpicker"), t = s.controller, i = A([]), n = A([]), c = A([]), g = A(!1), u = A(!1), m = A(null), w = A([]), l = A(!0), v = j(() => {
const D = t.editorParams.followitem; const D = t.editorParams.followitem;
return D ? s.data[D] : ""; return D ? s.data[D] : "";
}); });
V(() => s.value, (D) => { V(() => s.value, (D) => {
i.value = [], d.value = [], D && (d.value = JSON.parse(D), d.value.length > 0 && d.value.forEach((A) => { i.value = [], c.value = [], D && (c.value = JSON.parse(D), c.value.length > 0 && c.value.forEach((E) => {
n.value.findIndex((N) => Object.is(N.srfkey, A.srfkey)) < 0 && (n.value.push(A), y.value.push(A.srfmajortext)), i.value.push(A.srfkey); n.value.findIndex((O) => Object.is(O.srfkey, E.srfkey)) < 0 && (n.value.push(E), w.value.push(E.srfmajortext)), i.value.push(E.srfkey);
})); }));
}, { }, {
immediate: !0, immediate: !0,
deep: !0 deep: !0
}); });
const f = async (D) => { const f = async (D) => {
const A = []; const E = [];
if (D && Array.isArray(D)) if (D && Array.isArray(D))
for (let N = 0; N < D.length; N++) { for (let O = 0; O < D.length; O++) {
const o = D[N], m = { const o = D[O], d = {
srfkey: o[t.keyName] || o.srfkey, srfkey: o[t.keyName] || o.srfkey,
srfmajortext: o[t.textName] || o.srfmajortext srfmajortext: o[t.textName] || o.srfmajortext
}, E = await t.calcFillDataItems(o); }, b = await t.calcFillDataItems(o);
E.length > 0 && E.forEach((x) => { b.length > 0 && b.forEach((x) => {
Object.assign(m, { Object.assign(d, {
[x.name]: x.value [x.name]: x.value
}); });
}), A.push(m), n.value.findIndex((x) => Object.is(x[t.keyName], o[t.keyName])) < 0 && n.value.push(m); }), E.push(d), n.value.findIndex((x) => Object.is(x[t.keyName], o[t.keyName])) < 0 && n.value.push(d);
} }
const I = A.length > 0 ? JSON.stringify(A) : ""; const k = E.length > 0 ? JSON.stringify(E) : "";
a("change", I); a("change", k);
}, w = async () => { }, C = async () => {
let D; let D;
d.value.length && (D = JSON.stringify(d.value)); c.value.length && (D = JSON.stringify(c.value));
const A = await t.openPickUpView(s.data, D); const E = await t.openPickUpView(s.data, D);
A && f(A); E && f(E);
}, l = (D) => { }, h = (D) => {
const A = []; const E = [];
if (D.length > 0) { if (D.length > 0) {
D.forEach((N) => { D.forEach((O) => {
let o = n.value.findIndex((E) => Object.is(E.srfkey, N)), m = null; let o = n.value.findIndex((b) => Object.is(b.srfkey, O)), d = null;
o >= 0 ? m = n.value[o] : (o = d.value.findIndex((E) => Object.is(E.srfkey, N)), o >= 0 && (m = d.value[o])), m && A.push(m); o >= 0 ? d = n.value[o] : (o = c.value.findIndex((b) => Object.is(b.srfkey, O)), o >= 0 && (d = c.value[o])), d && E.push(d);
}); });
const I = A.length > 0 ? JSON.stringify(A) : ""; const k = E.length > 0 ? JSON.stringify(E) : "";
a("change", I); a("change", k);
} else } else
a("change", ""); a("change", "");
}, h = async (D) => { }, p = async (D) => {
if (t.model.appDataEntity) { if (t.model.appDataEntity) {
u.value = !0; u.value = !0;
try { try {
const A = await t.getServiceData(D, s.data); const E = await t.getServiceData(D, s.data);
u.value = !1, n.value = [], A.data.length > 0 && (n.value = A.data.map((I) => ({ u.value = !1, n.value = [], E.data.length > 0 && (n.value = E.data.map((k) => ({
srfkey: I[t.keyName], srfkey: k[t.keyName],
srfmajortext: I[t.textName] srfmajortext: k[t.textName]
}))); })));
} catch (A) { } catch (E) {
u.value = !1; u.value = !1;
} }
} }
}, C = (D) => { }, y = (D) => {
g.value = D, a("operate", D), g.value && h(""); g.value = D, a("operate", D), g.value && p("");
}, F = j(() => d.value.map((D) => D.srfmajortext).join("、")), O = (D) => { }, F = j(() => c.value.map((D) => D.srfmajortext).join("、")), I = (D) => {
n.value = D; n.value = D;
}; };
return V(() => v.value, async (D) => { return V(() => v.value, async (D) => {
if (D) { if (D) {
await h(""); await p("");
const A = n.value.map((I) => I.srfkey); const E = n.value.map((k) => k.srfkey);
if (c.value && (c.value = !1, s.value)) if (l.value && (l.value = !1, s.value))
return; return;
l(A); h(E);
} else } else
n.value = [], a("change", ""); n.value = [], a("change", "");
}, { }, {
...@@ -1037,17 +1037,17 @@ const Ue = M({ ...@@ -1037,17 +1037,17 @@ const Ue = M({
}), { }), {
ns: e, ns: e,
c: t, c: t,
selectRef: p, selectRef: m,
curValue: i, curValue: i,
loading: u, loading: u,
items: n, items: n,
defaultLabel: y, defaultLabel: w,
valueText: F, valueText: F,
onSearch: h, onSearch: p,
onOpenChange: C, onOpenChange: y,
onSelect: l, onSelect: h,
openPickUpView: w, openPickUpView: C,
setDefaultOptions: O setDefaultOptions: I
}; };
}, },
render(s) { render(s) {
...@@ -1099,69 +1099,73 @@ const Ve = M({ ...@@ -1099,69 +1099,73 @@ const Ve = M({
setup(s, { setup(s, {
emit: a emit: a
}) { }) {
const e = B("checkbox"), t = s.controller, i = P([]), n = P([]), d = P(!0), g = ",", u = j({ const e = B("checkbox"), t = s.controller, i = A([]), n = A([]), c = A(!0), g = ",", u = t.editorParams.emptyClearItems, m = j({
get() { get() {
var l; var p;
return ((l = s.value) == null ? void 0 : l.split(",")) || []; return ((p = s.value) == null ? void 0 : p.split(",")) || [];
}, },
set(l) { set(p) {
let h = null; let y = null;
const C = []; const F = [];
i.value.length > 0 && (i.value.forEach((F) => { if (i.value.length > 0 && (i.value.forEach((I) => {
l.findIndex((D) => Object.is(F.value, D)) !== -1 && C.push(F.value); p.findIndex((E) => Object.is(I.value, E)) !== -1 && F.push(I.value);
}), h = C.join(g)), a("change", h); }), y = F.join(g)), a("change", y), !y && u) {
} const I = JSON.parse(u);
}), p = async (l) => { for (let D = 0; D < I.length; D++)
a("change", I[D].value, I[D].key);
}
}
}), w = async (p) => {
const { const {
context: h, context: y,
params: C params: F
} = t.handlePublicParams(l, t.context, t.params); } = t.handlePublicParams(p, t.context, t.params);
if (t.editorParams.codeTag) { if (t.editorParams.codeTag) {
let F = []; let I = [];
const O = t.editorParams.codeTag; const D = t.editorParams.codeTag;
return F = await ibiz.codeListService.get(O, h, C), F; return I = await ibiz.codeListService.get(D, y, F), I;
} }
throw new he(t.model.source, "请配置代码表"); throw new he(t.model.source, "请配置代码表");
}, y = (l) => { }, l = (p) => {
u.value = l; m.value = p;
}, c = j(() => { }, v = j(() => {
const l = Array.isArray(u.value) ? u.value : [u.value]; const p = Array.isArray(m.value) ? m.value : [m.value];
return i.value.filter((h) => l.includes(h.srfkey)).map((h) => h.srfmajortext).join("、"); return i.value.filter((y) => p.includes(y.srfkey)).map((y) => y.srfmajortext).join("、");
}), v = async (l) => { }), f = async (p) => {
if (t.model.appDataEntity) if (t.model.appDataEntity)
try { try {
const h = await t.getServiceData(l, s.data); const y = await t.getServiceData(p, s.data);
n.value = [], h.data.length > 0 && (n.value = h.data.map((C) => ({ n.value = [], y.data.length > 0 && (n.value = y.data.map((F) => ({
srfkey: C[t.keyName], srfkey: F[t.keyName],
srfmajortext: C[t.textName] srfmajortext: F[t.textName]
}))); })));
} catch (h) { } catch (y) {
console.error(h); console.error(y);
} }
}, f = j(() => { }, C = j(() => {
const l = t.editorParams.followitem; const p = t.editorParams.followitem;
return l ? s.data[l] : ""; return p ? s.data[p] : "";
}), w = () => { }), h = () => {
const l = []; const p = [];
i.value.forEach((h) => { i.value.forEach((y) => {
n.value.findIndex((F) => F.srfkey === h.value) > -1 && l.push(h.value); n.value.findIndex((I) => I.srfkey === y.value) > -1 && p.push(y.value);
}), y(l); }), l(p);
}; };
return V(() => f, async (l) => { return V(() => C, async (p) => {
await p(l).then((h) => { await w(p).then((y) => {
i.value = h; i.value = y;
}), await v(""), !(d.value && (d.value = !1, s.value)) && w(); }), await f(""), !(c.value && (c.value = !1, s.value)) && h();
}, { }, {
immediate: !0, immediate: !0,
deep: !0 deep: !0
}), { }), {
ns: e, ns: e,
c: t, c: t,
valueText: c, valueText: v,
selectArray: u, selectArray: m,
items: i, items: i,
onSearch: v, onSearch: f,
onSelectArrayChange: y onSelectArrayChange: l
}; };
}, },
render(s) { render(s) {
...@@ -1239,7 +1243,7 @@ class _e extends Fe { ...@@ -1239,7 +1243,7 @@ class _e extends Fe {
* @type {string} * @type {string}
* @memberof WfEditViewController * @memberof WfEditViewController
*/ */
b(this, "userAction"); P(this, "userAction");
} }
async onInit() { async onInit() {
await super.onInit(), this.getUserAction(); await super.onInit(), this.getUserAction();
...@@ -1252,25 +1256,25 @@ class _e extends Fe { ...@@ -1252,25 +1256,25 @@ class _e extends Fe {
* @returns {*} {Promise<void>} * @returns {*} {Promise<void>}
*/ */
async wfStart() { async wfStart() {
var p; var m;
await this.save(), await this.execUserAction(); await this.save(), await this.execUserAction();
const e = await this.entityService.wf.getWFVersion(); const e = await this.entityService.wf.getWFVersion();
if (e.data.length === 0) if (e.data.length === 0)
throw new ke("当前工作流版本不存在"); throw new xe("当前工作流版本不存在");
const t = e.data[0], i = `WFSTART@${t.wfversion}`, n = Object.assign(this.context.clone(), { const t = e.data[0], i = `WFSTART@${t.wfversion}`, n = Object.assign(this.context.clone(), {
activeForm: t["process-form"] activeForm: t["process-form"]
}), d = { }), c = {
processDefinitionKey: t.definitionkey processDefinitionKey: t.definitionkey
}, g = (p = this.model.source.findPSAppViewRef(i)) == null ? void 0 : p.getRefPSAppView(); }, g = (m = this.model.source.findPSAppViewRef(i)) == null ? void 0 : m.getRefPSAppView();
if (!g) { if (!g) {
await this.nerve.form.call.wfStart(d), await this.closeView(); await this.nerve.form.call.wfStart(c), await this.closeView();
return; return;
} }
(await ibiz.commands.execute( (await ibiz.commands.execute(
q.TAG, q.TAG,
g, g,
n, n,
d c
)).ok && await this.closeView(); )).ok && await this.closeView();
} }
/** /**
...@@ -1355,35 +1359,35 @@ const ze = M({ ...@@ -1355,35 +1359,35 @@ const ze = M({
}); });
class Ye { class Ye {
constructor() { constructor() {
b(this, "component", "IBizFormDataComparison"); P(this, "component", "IBizFormDataComparison");
} }
} }
class $e extends Ee { class $e extends Ee {
async execAction(a, e, t, i) { async execAction(a, e, t, i) {
const n = {}, d = a.getPSAppDataEntity(); const n = {}, c = a.getPSAppDataEntity();
if (d) { if (c) {
d.isFill === !1 && await d.fill(!0); c.isFill === !1 && await c.fill(!0);
const g = new H(d); const g = new H(c);
await g.init(); await g.init();
const { resultContext: u } = await this.handleParams( const { resultContext: u } = await this.handleParams(
a, a,
e, e,
t, t,
i i
), p = ibiz.resourcePathUtil.calcPaths( ), m = ibiz.resourcePathUtil.calcPaths(
u, u,
g.codeName g.codeName
), y = K(u, p); ), w = K(u, m);
let c = `${y}/${g.deNamePlural}/importtemplate`, v = `${y}/${g.deNamePlural}/importdata2`; let l = `${w}/${g.deNamePlural}/importtemplate`, v = `${w}/${g.deNamePlural}/importdata2`;
const f = a.getPSAppDEDataImport(); const f = a.getPSAppDEDataImport();
f && (c += `?srfimporttag=${f.codeName}`, v += `?srfimporttag=${f.codeName}`); f && (l += `?srfimporttag=${f.codeName}`, v += `?srfimporttag=${f.codeName}`);
const w = ibiz.overlay.createModal( const C = ibiz.overlay.createModal(
"CustomDataImport", "CustomDataImport",
{ {
templateUrl: c, templateUrl: l,
importUrl: v, importUrl: v,
dismiss: (l) => { dismiss: (h) => {
w.dismiss(l); C.dismiss(h);
} }
}, },
{ {
...@@ -1391,7 +1395,7 @@ class $e extends Ee { ...@@ -1391,7 +1395,7 @@ class $e extends Ee {
placement: "center" placement: "center"
} }
); );
return w.present(), await w.onWillDismiss(), { return C.present(), await C.onWillDismiss(), {
refresh: !0 refresh: !0
}; };
} }
...@@ -1400,7 +1404,7 @@ class $e extends Ee { ...@@ -1400,7 +1404,7 @@ class $e extends Ee {
} }
class He { class He {
constructor() { constructor() {
b(this, "handler"); P(this, "handler");
} }
async getHandler() { async getHandler() {
return this.handler || (this.handler = new $e()), this.handler; return this.handler || (this.handler = new $e()), this.handler;
...@@ -1408,27 +1412,27 @@ class He { ...@@ -1408,27 +1412,27 @@ class He {
} }
class Ge { class Ge {
constructor() { constructor() {
b(this, "gridEditor", "YearMonthPicker"); P(this, "gridEditor", "YearMonthPicker");
b(this, "formEditor", "YearMonthPicker"); P(this, "formEditor", "YearMonthPicker");
} }
async createController(a, e) { async createController(a, e) {
const t = new Se(a, e); const t = new Ie(a, e);
return await t.init(), t; return await t.init(), t;
} }
} }
class We { class We {
constructor() { constructor() {
b(this, "formEditor", "DownLoadSafeFile"); P(this, "formEditor", "DownLoadSafeFile");
b(this, "gridEditor", "DownLoadSafeFile"); P(this, "gridEditor", "DownLoadSafeFile");
} }
async createController(a, e) { async createController(a, e) {
const t = new Ie(a, e); const t = new Se(a, e);
return await t.init(), t; return await t.init(), t;
} }
} }
class qe extends re { class qe extends re {
async execAction(a, e, t, i, n) { async execAction(a, e, t, i, n) {
const d = {}, { frontProcessType: g } = a; const c = {}, { frontProcessType: g } = a;
if (g === "OPENHTMLPAGE") { if (g === "OPENHTMLPAGE") {
const u = ne.fill(a.htmlPageUrl, e, t == null ? void 0 : t[0]); const u = ne.fill(a.htmlPageUrl, e, t == null ? void 0 : t[0]);
window.open(u, "_blank"); window.open(u, "_blank");
...@@ -1437,27 +1441,27 @@ class qe extends re { ...@@ -1437,27 +1441,27 @@ class qe extends re {
const u = a.getPSAppDataEntity(); const u = a.getPSAppDataEntity();
if (u) { if (u) {
u.isFill === !1 && await u.fill(!0); u.isFill === !1 && await u.fill(!0);
const p = new H(u); const m = new H(u);
await p.init(); await m.init();
const { resultContext: y } = await this.handleParams( const { resultContext: w } = await this.handleParams(
a, a,
e, e,
t, t,
i i
), c = ibiz.resourcePathUtil.calcPaths( ), l = ibiz.resourcePathUtil.calcPaths(
y, w,
p.codeName m.codeName
), v = K(y, c); ), v = K(w, l);
let f = `${v}/${p.deNamePlural}/importtemplate`, w = `${v}/${p.deNamePlural}/importdata2`; let f = `${v}/${m.deNamePlural}/importtemplate`, C = `${v}/${m.deNamePlural}/importdata2`;
const l = a.getPSAppDEDataImport(); const h = a.getPSAppDEDataImport();
l && (f += `?srfimporttag=${l.codeName}`, w += `?srfimporttag=${l.codeName}`); h && (f += `?srfimporttag=${h.codeName}`, C += `?srfimporttag=${h.codeName}`);
const h = ibiz.overlay.createModal( const p = ibiz.overlay.createModal(
"DataImport", "DataImport",
{ {
templateUrl: f, templateUrl: f,
importUrl: w, importUrl: C,
dismiss: (C) => { dismiss: (y) => {
h.dismiss(C); p.dismiss(y);
} }
}, },
{ {
...@@ -1465,7 +1469,7 @@ class qe extends re { ...@@ -1465,7 +1469,7 @@ class qe extends re {
placement: "center" placement: "center"
} }
); );
return h.present(), await h.onWillDismiss(), { return p.present(), await p.onWillDismiss(), {
refresh: !0 refresh: !0
}; };
} }
...@@ -1475,25 +1479,25 @@ class qe extends re { ...@@ -1475,25 +1479,25 @@ class qe extends re {
if (!u) if (!u)
throw new Error("未配置打开视图"); throw new Error("未配置打开视图");
await u.fill(!0); await u.fill(!0);
const { resultContext: p, resultParams: y } = await this.handleParams( const { resultContext: m, resultParams: w } = await this.handleParams(
a, a,
e, e,
t, t,
i i
), c = await ibiz.commands.execute( ), l = await ibiz.commands.execute(
q.TAG, q.TAG,
u, u,
p, m,
y, w,
n n
); );
(c == null ? void 0 : c.ok) === !1 && (d.closeView = !1, d.refresh = !1, d.cancel = !0), c != null && c.ok && c.data && (d.data = c.data); (l == null ? void 0 : l.ok) === !1 && (c.closeView = !1, c.refresh = !1, c.cancel = !0), l != null && l.ok && l.data && (c.data = l.data);
} else if (n) { } else if (n) {
const { neuron: u } = n, y = u.call.getFormController().call.getFormController(), { druipart1: c, druipart2: v, druipart3: f } = y.details; const { neuron: u } = n, w = u.call.getFormController().call.getFormController(), { druipart1: l, druipart2: v, druipart3: f } = w.details;
[ [
{ {
message: "服务履历为空", message: "服务履历为空",
neuron: c neuron: l
}, },
{ {
message: "教育经验为空", message: "教育经验为空",
...@@ -1503,22 +1507,22 @@ class qe extends re { ...@@ -1503,22 +1507,22 @@ class qe extends re {
message: "项目经验为空", message: "项目经验为空",
neuron: f neuron: f
} }
].some((h) => { ].some((p) => {
const C = h.neuron.neuron.call.getGridController(); const y = p.neuron.neuron.call.getGridController();
if (C) { if (y) {
const F = C.call.getGridController(); const F = y.call.getGridController();
if (F && F.items && F.items.length > 0) if (F && F.items && F.items.length > 0)
return !1; return !1;
} }
return ibiz.message.error(`${h.message}`, 1.5, !0), !0; return ibiz.message.error(`${p.message}`, 1.5, !0), !0;
}) || await u.call.wfStart(); }) || await u.call.wfStart();
} }
return d; return c;
} }
} }
class Ke { class Ke {
constructor() { constructor() {
b(this, "handler"); P(this, "handler");
} }
async getHandler() { async getHandler() {
return this.handler || (this.handler = new qe()), this.handler; return this.handler || (this.handler = new qe()), this.handler;
...@@ -1526,7 +1530,7 @@ class Ke { ...@@ -1526,7 +1530,7 @@ class Ke {
} }
class Je { class Je {
constructor() { constructor() {
b(this, "component", "FormMDCtrlFormStyle2"); P(this, "component", "FormMDCtrlFormStyle2");
} }
async createController(a, e, t) { async createController(a, e, t) {
const i = new le(a, e, t); const i = new le(a, e, t);
...@@ -1535,8 +1539,8 @@ class Je { ...@@ -1535,8 +1539,8 @@ class Je {
} }
class Xe { class Xe {
constructor() { constructor() {
b(this, "formEditor", "AutoSelectAll"); P(this, "formEditor", "AutoSelectAll");
b(this, "gridEditor", "AutoSelectAll"); P(this, "gridEditor", "AutoSelectAll");
} }
async createController(a, e) { async createController(a, e) {
const t = new oe(a, e); const t = new oe(a, e);
...@@ -1545,8 +1549,8 @@ class Xe { ...@@ -1545,8 +1549,8 @@ class Xe {
} }
class Ze { class Ze {
constructor() { constructor() {
b(this, "formEditor", "MPickerCheckbox"); P(this, "formEditor", "MPickerCheckbox");
b(this, "gridEditor", "IBizGridPicker"); P(this, "gridEditor", "IBizGridPicker");
} }
async createController(a, e) { async createController(a, e) {
const t = new oe(a, e); const t = new oe(a, e);
...@@ -1555,7 +1559,7 @@ class Ze { ...@@ -1555,7 +1559,7 @@ class Ze {
} }
class Qe extends re { class Qe extends re {
async execAction(a, e, t, i, n) { async execAction(a, e, t, i, n) {
const d = {}, { frontProcessType: g } = a; const c = {}, { frontProcessType: g } = a;
if (g === "OPENHTMLPAGE") { if (g === "OPENHTMLPAGE") {
const u = ne.fill(a.htmlPageUrl, e, t == null ? void 0 : t[0]); const u = ne.fill(a.htmlPageUrl, e, t == null ? void 0 : t[0]);
window.open(u, "_blank"); window.open(u, "_blank");
...@@ -1564,27 +1568,27 @@ class Qe extends re { ...@@ -1564,27 +1568,27 @@ class Qe extends re {
const u = a.getPSAppDataEntity(); const u = a.getPSAppDataEntity();
if (u) { if (u) {
u.isFill === !1 && await u.fill(!0); u.isFill === !1 && await u.fill(!0);
const p = new H(u); const m = new H(u);
await p.init(); await m.init();
const { resultContext: y } = await this.handleParams( const { resultContext: w } = await this.handleParams(
a, a,
e, e,
t, t,
i i
), c = ibiz.resourcePathUtil.calcPaths( ), l = ibiz.resourcePathUtil.calcPaths(
y, w,
p.codeName m.codeName
), v = K(y, c); ), v = K(w, l);
let f = `${v}/${p.deNamePlural}/importtemplate`, w = `${v}/${p.deNamePlural}/importdata2`; let f = `${v}/${m.deNamePlural}/importtemplate`, C = `${v}/${m.deNamePlural}/importdata2`;
const l = a.getPSAppDEDataImport(); const h = a.getPSAppDEDataImport();
l && (f += `?srfimporttag=${l.codeName}`, w += `?srfimporttag=${l.codeName}`); h && (f += `?srfimporttag=${h.codeName}`, C += `?srfimporttag=${h.codeName}`);
const h = ibiz.overlay.createModal( const p = ibiz.overlay.createModal(
"DataImport", "DataImport",
{ {
templateUrl: f, templateUrl: f,
importUrl: w, importUrl: C,
dismiss: (C) => { dismiss: (y) => {
h.dismiss(C); p.dismiss(y);
} }
}, },
{ {
...@@ -1592,7 +1596,7 @@ class Qe extends re { ...@@ -1592,7 +1596,7 @@ class Qe extends re {
placement: "center" placement: "center"
} }
); );
return h.present(), await h.onWillDismiss(), { return p.present(), await p.onWillDismiss(), {
refresh: !0 refresh: !0
}; };
} }
...@@ -1602,29 +1606,29 @@ class Qe extends re { ...@@ -1602,29 +1606,29 @@ class Qe extends re {
if (!u) if (!u)
throw new Error("未配置打开视图"); throw new Error("未配置打开视图");
await u.fill(!0); await u.fill(!0);
const { resultContext: p, resultParams: y } = await this.handleParams( const { resultContext: m, resultParams: w } = await this.handleParams(
a, a,
e, e,
t, t,
i i
), c = await ibiz.commands.execute( ), l = await ibiz.commands.execute(
q.TAG, q.TAG,
u, u,
p, m,
y, w,
n n
); );
(c == null ? void 0 : c.ok) === !1 && (d.closeView = !1, d.refresh = !1, d.cancel = !0), c != null && c.ok && c.data && (d.data = c.data); (l == null ? void 0 : l.ok) === !1 && (c.closeView = !1, c.refresh = !1, c.cancel = !0), l != null && l.ok && l.data && (c.data = l.data);
} else if (t && t.length > 0 && n) { } else if (t && t.length > 0 && n) {
const { neuron: u } = n, c = await u.call.getFormController().call.getFormController().autoSave(); const { neuron: u } = n, l = await u.call.getFormController().call.getFormController().autoSave();
c && c.rcryqd && Array.isArray(c.rcryqd) && c.rcryqd.length > 0 ? await u.call.wfStart() : ibiz.message.error("入场信息为空"); l && l.rcryqd && Array.isArray(l.rcryqd) && l.rcryqd.length > 0 ? await u.call.wfStart() : ibiz.message.error("入场信息为空");
} }
return d; return c;
} }
} }
class et { class et {
constructor() { constructor() {
b(this, "handler"); P(this, "handler");
} }
async getHandler() { async getHandler() {
return this.handler || (this.handler = new Qe()), this.handler; return this.handler || (this.handler = new Qe()), this.handler;
...@@ -1632,7 +1636,7 @@ class et { ...@@ -1632,7 +1636,7 @@ class et {
} }
class tt { class tt {
constructor() { constructor() {
b(this, "component", "FormDruipart"); P(this, "component", "FormDruipart");
} }
async createController(a, e, t) { async createController(a, e, t) {
const i = new Be(a, e, t); const i = new Be(a, e, t);
...@@ -1641,7 +1645,7 @@ class tt { ...@@ -1641,7 +1645,7 @@ class tt {
} }
class at { class at {
constructor() { constructor() {
b(this, "component", "WfEditView"); P(this, "component", "WfEditView");
} }
} }
const pt = { const pt = {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册