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

feat: 更新dsf-web插件

上级 f86695b3
var de = Object.defineProperty;
var ue = (s, e, t) => e in s ? de(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
var C = (s, e, t) => (ue(s, typeof e != "symbol" ? e + "" : e, t), t);
var ue = (s, a, e) => a in s ? de(s, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[a] = e;
var E = (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 { 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 b, watch as V, h as r, onMounted as De, computed as j } from "vue";
import { createUUID as te } from "qx-util";
import { ViewMode as ae, PluginStaticResource as Ee, OpenAppViewCommand as q, UIActionHandler as Ce, FrontUIActionHandler as re } from "@ibiz-template/runtime";
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 { 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 { ControlVO as xe, calcResPath as K } from "@ibiz-template/service";
import $ from "dayjs";
import { RuntimeError as ke, StringUtil as ne } from "@ibiz-template/core";
......@@ -20,7 +20,7 @@ class Ne extends be {
* @date 2024-04-26 17:04:49
* @type {IData}
*/
C(this, "baseResData", []);
E(this, "baseResData", []);
/**
* 对比数据
*
......@@ -28,7 +28,7 @@ class Ne extends be {
* @date 2024-04-26 17:04:49
* @type {IData}
*/
C(this, "compareResData", []);
E(this, "compareResData", []);
/**
* 表单旧数据
*
......@@ -38,7 +38,7 @@ class Ne extends be {
* @type {IData}
* @memberof FormController
*/
C(this, "oldData", new xe());
E(this, "oldData", new xe());
/**
* version数据
*
......@@ -46,7 +46,7 @@ class Ne extends be {
* @date 2024-04-26 16:04:37
* @type {IData[]}
*/
C(this, "versionData", []);
E(this, "versionData", []);
/**
* 对比数据
*
......@@ -54,7 +54,7 @@ class Ne extends be {
* @date 2024-04-26 16:04:37
* @type {IData[]}
*/
C(this, "comparisonArr", {});
E(this, "comparisonArr", {});
/**
* 基础表格数据
*
......@@ -62,7 +62,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:57
* @type {IData[]}
*/
C(this, "gridData", []);
E(this, "gridData", []);
/**
* 展示完全数据
*
......@@ -70,7 +70,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:04
* @type {IData[]}
*/
C(this, "AllGridData", []);
E(this, "AllGridData", []);
/**
* 去除相同数据
*
......@@ -78,7 +78,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:15
* @type {IData[]}
*/
C(this, "removeSameGridData", []);
E(this, "removeSameGridData", []);
/**
* 关系界面数据
*
......@@ -86,7 +86,7 @@ class Ne extends be {
* @date 2024-04-30 10:04:33
* @type {IData}
*/
C(this, "AlldruipartData", /* @__PURE__ */ new Map());
E(this, "AlldruipartData", /* @__PURE__ */ new Map());
/**
* 关系界面数据长度
*
......@@ -94,7 +94,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:56
* @type {number}
*/
C(this, "druipartDataSize", 0);
E(this, "druipartDataSize", 0);
/**
* 关系界面实际数据
*
......@@ -102,7 +102,7 @@ class Ne extends be {
* @date 2024-05-06 11:05:13
* @type {IData}
*/
C(this, "newDruipartData", {});
E(this, "newDruipartData", {});
}
/**
* 加载数据
......@@ -112,13 +112,13 @@ class Ne extends be {
*/
async loadGridData() {
await this.startLoading();
const t = this.model.source.M.getPSControlParam.ctrlParams, { BASEENTITY: a, COMPAREENTITY: c } = t, n = await ibiz.entityService.getService(a), d = await ibiz.entityService.getService(c), v = Object.assign({}, this.context.clone(), {
[a.toLowerCase()]: this.params.base_version
}), p = Object.assign({}, this.context.clone(), {
[c.toLowerCase()]: this.params.compare_version
}), h = await n.exec("Get", v, this.params), g = await d.exec(
const e = this.model.source.M.getPSControlParam.ctrlParams, { BASEENTITY: t, COMPAREENTITY: i } = e, o = await ibiz.entityService.getService(t), d = await ibiz.entityService.getService(i), v = Object.assign({}, this.context.clone(), {
[t.toLowerCase()]: this.params.base_version
}), u = Object.assign({}, this.context.clone(), {
[i.toLowerCase()]: this.params.compare_version
}), h = await o.exec("Get", v, this.params), g = await d.exec(
"Get",
p,
u,
this.params
);
return this.isLoaded = !0, {
......@@ -133,8 +133,8 @@ class Ne extends be {
* @return {*}
* @memberof FormDataComparisonController
*/
isFalseyButNotEmpty(t) {
return t == null || typeof t == "string" && t === "" || Array.isArray(t) && t.length === 0 || typeof t == "object" && Object.keys(t).length === 0;
isFalseyButNotEmpty(e) {
return e == null || typeof e == "string" && e === "" || Array.isArray(e) && e.length === 0 || typeof e == "object" && Object.keys(e).length === 0;
}
/**
* 比较两个值
......@@ -144,8 +144,8 @@ class Ne extends be {
* @return {*}
* @memberof FormDataComparisonController
*/
compareObjectValues(t, a) {
return JSON.stringify(t) !== JSON.stringify(a);
compareObjectValues(e, t) {
return JSON.stringify(e) !== JSON.stringify(t);
}
}
const Oe = M({
......@@ -169,76 +169,76 @@ const Oe = M({
}
},
setup(s) {
const e = B("form-data-comparison"), {
proxy: t
} = W(), a = fe(t, () => {
const o = new Ne(s.modelData, s.context, s.params);
return ve(t, "enableAutoSave", o.setEnableAutoSave.bind(o)), o;
}), c = b(!0), n = b(!1), d = b({}), v = b({}), p = b([]), h = [], g = b([]), i = b([]), y = b([]), f = /* @__PURE__ */ new Map(), u = b(0), l = (o) => {
const m = [];
if (m.push(o), o && o.children) {
const a = B("form-data-comparison"), {
proxy: e
} = W(), t = fe(e, () => {
const n = new Ne(s.modelData, s.context, s.params);
return ve(e, "enableAutoSave", n.setEnableAutoSave.bind(n)), n;
}), i = b(!0), o = b(!1), d = b({}), v = b({}), u = b([]), h = [], g = b([]), l = b([]), y = b([]), f = /* @__PURE__ */ new Map(), m = b(0), c = (n) => {
const p = [];
if (p.push(n), n && n.children) {
const A = [];
o.children.forEach((F) => {
const O = l(F);
n.children.forEach((F) => {
const O = c(F);
A.push(...O);
}), m.push(...A);
}), p.push(...A);
}
return m;
}, w = l(s.modelData);
return p;
}, w = c(s.modelData);
h.push(...w);
const E = (o) => {
const m = a.details[o.source.name], A = r("not-supported-editor", {
const C = (n) => {
const p = t.details[n.source.name], A = r("not-supported-editor", {
attrs: {
modelData: o.editor
modelData: n.editor
}
});
return r("div", {
class: [e.e("form-grid-item"), e.is("add", g.value.includes(o.source.name)), e.is("update", y.value.includes(o.source.name)), e.is("delete", i.value.includes(o.source.name))]
class: [a.e("form-grid-item"), a.is("add", g.value.includes(n.source.name)), a.is("update", y.value.includes(n.source.name)), a.is("delete", l.value.includes(n.source.name))]
}, [r("div", {
class: e.em("form-grid-item", "name")
}, [o.source.caption]), r("div", {
class: e.em("form-grid-item", "left")
}, [m.editorProvider ? r(m.editorProvider.formEditor, {
class: a.em("form-grid-item", "name")
}, [n.source.caption]), r("div", {
class: a.em("form-grid-item", "left")
}, [p.editorProvider ? r(p.editorProvider.formEditor, {
props: {
value: v.value[o.source.name],
data: m.data,
controller: m.editor,
disabled: m.disabled,
value: v.value[n.source.name],
data: p.data,
controller: p.editor,
disabled: p.disabled,
readonly: !0
}
}) : A]), r("div", {
class: e.em("form-grid-item", "right")
}, [m.editorProvider ? r(m.editorProvider.formEditor, {
class: a.em("form-grid-item", "right")
}, [p.editorProvider ? r(p.editorProvider.formEditor, {
props: {
value: d.value[o.source.name],
data: m.data,
controller: m.editor,
disabled: m.disabled,
value: d.value[n.source.name],
data: p.data,
controller: p.editor,
disabled: p.disabled,
readonly: !0
}
}) : A])]);
}, I = (o, m) => {
f.set(o.source.id, m), m.evt.on("mounted", () => {
c.value && a.startLoading(), u.value += 1, m.call.refresh();
}), m.evt.on("refreshed", () => {
u.value -= 1, setTimeout(() => {
c.value && a.endLoading();
}, S = (n, p) => {
f.set(n.source.id, p), p.evt.on("mounted", () => {
i.value && t.startLoading(), m.value += 1, p.call.refresh();
}), p.evt.on("refreshed", () => {
m.value -= 1, setTimeout(() => {
i.value && t.endLoading();
}, 500);
});
}, D = (o) => {
const m = h.find((L) => L.id === `${o.source.id}_srfcopy`), A = o.embedView.source.modelPath, F = m == null ? void 0 : m.embedView.source.modelPath, O = a.context.clone(), N = {
}, D = (n) => {
const p = h.find((L) => L.id === `${n.source.id}_srfcopy`), A = n.embedView.source.modelPath, F = p == null ? void 0 : p.embedView.source.modelPath, O = t.context.clone(), N = {
base_version: s.params.base_version
}, T = a.context.clone();
}, T = t.context.clone();
Object.assign(T, {
gysrlzy_info: s.params.compare_version,
compare_version: s.params.compare_version
});
const _ = {
compare_version: s.params.compare_version
}, R = d.value[o.source.userTag], U = v.value[m == null ? void 0 : m.source.userTag];
}, R = d.value[n.source.userTag], U = v.value[p == null ? void 0 : p.source.userTag];
let J = !1, z = !1, X = !1;
if (o.source.userTag2) {
const L = JSON.parse(o.source.userTag2), {
if (n.source.userTag2) {
const L = JSON.parse(n.source.userTag2), {
comparekey: Z,
comparelist: ce
} = L;
......@@ -248,11 +248,11 @@ const Oe = M({
})));
}
return r("div", {
class: [e.e("druipart"), e.is("add", J), e.is("update", z), e.is("delete", X)]
class: [a.e("druipart"), a.is("add", J), a.is("update", z), a.is("delete", X)]
}, [r("div", {
class: e.em("druipart", "caption")
}, [o.source.caption]), r("div", {
class: e.em("druipart", "left")
class: a.em("druipart", "caption")
}, [n.source.caption]), r("div", {
class: a.em("druipart", "left")
}, [F && r("ViewShell", {
attrs: {
context: T,
......@@ -262,14 +262,14 @@ const Oe = M({
},
modelPath: F,
noLoadDefault: !0,
name: m == null ? void 0 : m.source.id
name: p == null ? void 0 : p.source.id
},
key: te(),
on: {
neuronInit: (L) => I(m, L)
neuronInit: (L) => S(p, L)
}
})]), r("div", {
class: e.em("druipart", "right")
class: a.em("druipart", "right")
}, [A && r("ViewShell", {
attrs: {
context: O,
......@@ -279,94 +279,94 @@ const Oe = M({
},
modelPath: A,
noLoadDefault: !0,
name: o.source.id
name: n.source.id
},
key: te(),
on: {
neuronInit: (L) => I(o, L)
neuronInit: (L) => S(n, L)
}
})])]);
}, P = (o) => {
const m = {
modelData: o,
controller: a.details[o.source.name]
}, A = a.providers[o.source.name], F = r(A.component, {
}, P = (n) => {
const p = {
modelData: n,
controller: t.details[n.source.name]
}, A = t.providers[n.source.name], F = r(A.component, {
props: {
...m
...p
},
key: o.id
key: n.id
}), O = r(A.component, {
props: {
...m
...p
},
key: `compare_${o.id}`
key: `compare_${n.id}`
});
return r("div", {
class: e.e("mdctrl")
class: a.e("mdctrl")
}, [r("div", {
class: e.em("mdctrl", "caption")
}, [o.source.caption]), r("div", {
class: e.em("mdctrl", "left")
class: a.em("mdctrl", "caption")
}, [n.source.caption]), r("div", {
class: a.em("mdctrl", "left")
}, [F]), r("div", {
class: e.em("mdctrl", "right")
class: a.em("mdctrl", "right")
}, [O])]);
}, S = (o) => {
c.value = !1;
const m = p.value.findIndex((A) => A === o.source.name);
m > -1 ? p.value.splice(m, 1) : p.value.push(o.source.name);
}, k = (o) => {
if (!o.source.hidden) {
if (o.source.detailType === "FORMPAGE")
}, I = (n) => {
i.value = !1;
const p = u.value.findIndex((A) => A === n.source.name);
p > -1 ? u.value.splice(p, 1) : u.value.push(n.source.name);
}, k = (n) => {
if (!n.source.hidden) {
if (n.source.detailType === "FORMPAGE")
return r("div", {
class: e.e("form-page")
}, [o.children.map((m) => k(m))]);
if (o.source.detailType === "FORMITEM") {
const m = g.value.includes(o.source.name), A = i.value.includes(o.source.name), F = y.value.includes(o.source.name);
return n.value && !m && !A && !F ? null : E(o);
class: a.e("form-page")
}, [n.children.map((p) => k(p))]);
if (n.source.detailType === "FORMITEM") {
const p = g.value.includes(n.source.name), A = l.value.includes(n.source.name), F = y.value.includes(n.source.name);
return o.value && !p && !A && !F ? null : C(n);
}
if (o.source.detailType === "GROUPPANEL") {
const m = p.value.includes(o.source.name);
if (n.source.detailType === "GROUPPANEL") {
const p = u.value.includes(n.source.name);
return r("div", {
class: e.b("group")
class: a.b("group")
}, [r("div", {
class: [e.be("group", "header"), e.is("hide-caption", !o.source.showCaption)]
class: [a.be("group", "header"), a.is("hide-caption", !n.source.showCaption)]
}, [r("div", {
class: e.bem("group", "header", "name")
}, [m ? r("i-icon", {
class: e.bem("group", "header", "icon"),
class: a.bem("group", "header", "name")
}, [p ? r("i-icon", {
class: a.bem("group", "header", "icon"),
attrs: {
type: "ios-arrow-forward",
title: "展开"
},
on: {
click: () => S(o)
click: () => I(n)
}
}) : r("i-icon", {
class: e.bem("group", "header", "icon"),
class: a.bem("group", "header", "icon"),
attrs: {
type: "ios-arrow-down",
title: "收缩"
},
on: {
click: () => S(o)
click: () => I(n)
}
}), r("span", {
class: e.bem("group", "header", "name-text")
}, [o.source.caption || o.source.title])]), r("div", ["---"]), r("div", ["---"])]), r("div", {
class: [e.be("group", "content"), e.is("collapse", m)]
}, [o.children.map((A) => k(A))])]);
class: a.bem("group", "header", "name-text")
}, [n.source.caption || n.source.title])]), r("div", ["---"]), r("div", ["---"])]), r("div", {
class: [a.be("group", "content"), a.is("collapse", p)]
}, [n.children.map((A) => k(A))])]);
}
return o.source.detailType === "DRUIPART" && !o.source.name.endsWith("_srfcopy") ? D(o) : o.source.detailType === "MDCTRL" ? P(o) : null;
return n.source.detailType === "DRUIPART" && !n.source.name.endsWith("_srfcopy") ? D(n) : n.source.detailType === "MDCTRL" ? P(n) : null;
}
}, x = (o, m) => {
}, x = (n, p) => {
const A = [], F = [], O = [];
return Object.keys(m).forEach((N) => {
const T = o[N], _ = m[N];
a.isFalseyButNotEmpty(T) && !a.isFalseyButNotEmpty(_) && A.push(N), !a.isFalseyButNotEmpty(T) && !a.isFalseyButNotEmpty(_) && a.compareObjectValues(T, _) && F.push(N);
}), Object.keys(o).forEach((N) => {
if (!Object.prototype.hasOwnProperty.call(m, N) || a.isFalseyButNotEmpty(m[N])) {
const T = o[N];
a.isFalseyButNotEmpty(T) || O.push(N);
return Object.keys(p).forEach((N) => {
const T = n[N], _ = p[N];
t.isFalseyButNotEmpty(T) && !t.isFalseyButNotEmpty(_) && A.push(N), !t.isFalseyButNotEmpty(T) && !t.isFalseyButNotEmpty(_) && t.compareObjectValues(T, _) && F.push(N);
}), Object.keys(n).forEach((N) => {
if (!Object.prototype.hasOwnProperty.call(p, N) || t.isFalseyButNotEmpty(p[N])) {
const T = n[N];
t.isFalseyButNotEmpty(T) || O.push(N);
}
}), {
added: A,
......@@ -375,22 +375,22 @@ const Oe = M({
};
};
return V(() => s.params, async () => {
const o = await a.loadGridData();
d.value = o.baseData, v.value = o.compareData;
const n = await t.loadGridData();
d.value = n.baseData, v.value = n.compareData;
const {
added: m,
added: p,
modified: A,
deleted: F
} = x(v.value, d.value);
g.value = m, y.value = A, i.value = F;
g.value = p, y.value = A, l.value = F;
}, {
immediate: !0
}), {
ns: e,
c: a,
switchValue: n,
druipartNum: u,
renderEditor: E,
ns: a,
c: t,
switchValue: o,
druipartNum: m,
renderEditor: C,
renderByDetailType: k
};
},
......@@ -457,80 +457,80 @@ const Te = M({
}
},
setup(s, {
emit: e
emit: a
}) {
const t = B("data-import"), a = b(), c = b({
const e = B("data-import"), t = b(), i = b({
state: "ready",
message: "",
rowError: []
}), n = b(""), d = async (i) => {
const y = new FormData(), f = $(n.value).format("YYYY-MM");
y.append("file", i), y.append("ny", f);
}), o = b(""), d = async (l) => {
const y = new FormData(), f = $(o.value).format("YYYY-MM");
y.append("file", l), y.append("ny", f);
try {
const u = await ibiz.net.request(s.importUrl, {
const m = await ibiz.net.request(s.importUrl, {
method: "post",
data: y,
headers: {
"Content-Type": "multipart/form-data"
}
});
c.value.state = "success", c.value.message = "导入成功";
i.value.state = "success", i.value.message = "导入成功";
const {
errorinfo: l,
errorinfo: c,
success: w,
total: E
} = u.data, I = E ? Number(E) : 0, D = w ? Number(w) : 0, P = E - w;
c.value.message = `共计导入数据 ${I} 条,错误[${P}],成功[${D}]`, l && Object.keys(l).length > 0 && (c.value.rowError = [], Object.keys(l).forEach((S) => {
c.value.rowError.push({
index: Number(S) + 1,
info: l[S].errorInfo
total: C
} = m.data, S = C ? Number(C) : 0, D = w ? Number(w) : 0, P = C - w;
i.value.message = `共计导入数据 ${S} 条,错误[${P}],成功[${D}]`, c && Object.keys(c).length > 0 && (i.value.rowError = [], Object.keys(c).forEach((I) => {
i.value.rowError.push({
index: Number(I) + 1,
info: c[I].errorInfo
});
}));
} catch (u) {
c.value.state = "fail", c.value.message = `导入失败!${u.message}`;
} catch (m) {
i.value.state = "fail", i.value.message = `导入失败!${m.message}`;
}
}, v = (i) => {
const y = i.target;
}, v = (l) => {
const y = l.target;
if (!y.files)
return;
const f = y.files[0];
y.value = null, d(f);
}, p = async () => {
}, u = async () => {
var y;
const i = await ibiz.net.request(s.templateUrl, {
const l = await ibiz.net.request(s.templateUrl, {
responseType: "blob"
});
if (i.status === 200) {
let f = ((y = i.headers["content-disposition"].split(";").find((w) => w.indexOf("filename=") !== -1)) == null ? void 0 : y.slice(9)) || "";
if (l.status === 200) {
let f = ((y = l.headers["content-disposition"].split(";").find((w) => w.indexOf("filename=") !== -1)) == null ? void 0 : y.slice(9)) || "";
f = decodeURIComponent(f);
const u = new Blob([i.data], {
const m = new Blob([l.data], {
type: "application/vnd.ms-excel"
}), l = document.createElement("a");
l.download = f, l.style.display = "none", l.href = URL.createObjectURL(u), document.body.appendChild(l), l.click(), URL.revokeObjectURL(l.href), document.body.removeChild(l);
}), c = document.createElement("a");
c.download = f, c.style.display = "none", c.href = URL.createObjectURL(m), document.body.appendChild(c), c.click(), URL.revokeObjectURL(c.href), document.body.removeChild(c);
}
}, h = () => {
a.value.click();
t.value.click();
}, g = () => {
var i;
e("close", {
var l;
a("close", {
ok: !1,
data: {}
}), (i = s.dismiss) == null || i.call(s, {
}), (l = s.dismiss) == null || l.call(s, {
ok: !1,
data: {}
});
};
return De(() => {
n.value = $().format("YYYY年MM月");
o.value = $().format("YYYY年MM月");
}), {
ns: t,
curDate: n,
onLinkClick: p,
ns: e,
curDate: o,
onLinkClick: u,
selectFile: h,
onCancelButtonClick: g,
onFileChange: v,
inputUpLoad: a,
message: c
inputUpLoad: t,
message: i
};
},
render() {
......@@ -611,17 +611,17 @@ const Me = M({
props: ye(),
emits: G(),
setup(s, {
emit: e
emit: a
}) {
const t = B("date-picker"), a = s.controller, c = a.model, n = b("date"), d = b("yyyy-MM-dd"), v = b(!1);
switch (c.editorType) {
const e = B("date-picker"), t = s.controller, i = t.model, o = b("date"), d = b("yyyy-MM-dd"), v = b(!1);
switch (i.editorType) {
case "DATEPICKEREX":
case "DATEPICKEREX_NOTIME":
n.value = "date";
o.value = "date";
break;
case "DATEPICKEREX_NODAY":
case "DATEPICKEREX_NODAY_NOSECOND":
v.value = !0, n.value = "time";
v.value = !0, o.value = "time";
break;
case "DATEPICKEREX_HOUR":
case "DATEPICKEREX_MINUTE":
......@@ -629,41 +629,41 @@ const Me = M({
case "DATEPICKEREX_NOSECOND":
case "DATEPICKER":
default:
n.value = "datetime";
o.value = "datetime";
}
const p = a.valueFormat;
if (p) {
p === "YYYY-MM" ? n.value = "month" : p === "YYYY" && (n.value = "year");
const f = p.replace("YYYY", "yyyy").replace("DD", "dd");
const u = t.valueFormat;
if (u) {
u === "YYYY-MM" ? o.value = "month" : u === "YYYY" && (o.value = "year");
const f = u.replace("YYYY", "yyyy").replace("DD", "dd");
d.value = f;
}
c.editorParams.formatText && (d.value = c.editorParams.formatText.replace("YYYY", "yyyy").replace("DD", "dd"));
i.editorParams.formatText && (d.value = i.editorParams.formatText.replace("YYYY", "yyyy").replace("DD", "dd"));
const h = b();
V(() => s.value, (f, u) => {
f && f !== u && (h.value = $(f).format(p));
V(() => s.value, (f, m) => {
f && f !== m && (h.value = $(f).format(u));
}, {
immediate: !0
});
const g = (f, u) => {
const g = (f, m) => {
if (f) {
const l = $(f.replace(/[年月]/g, "-")).format(p);
e("change", l);
const c = $(f.replace(/[年月]/g, "-")).format(u);
a("change", c);
} else
e("change", f);
}, i = (f) => {
e("operate", f);
a("change", f);
}, l = (f) => {
a("operate", f);
}, y = b();
return s.autoFocus && V(y, (f) => {
f && f.$el.getElementsByTagName("input")[0].click();
}), {
ns: t,
c: a,
editorModel: c,
type: n,
ns: e,
c: t,
editorModel: i,
type: o,
format: d,
formatValue: h,
handleChange: g,
onOpenChange: i,
onOpenChange: l,
inputRef: y,
isTimePicker: v
};
......@@ -704,14 +704,14 @@ const Me = M({
})]]);
}
});
const ie = new Ee(import.meta.url), Re = M({
const ie = new Ce(import.meta.url), Re = M({
name: "DownLoadSafeFile",
props: {},
setup() {
const s = B("download-safe-file"), e = ie.dir("/assets/doc/safe-file.doc");
const s = B("download-safe-file"), a = ie.dir("/assets/doc/safe-file.doc");
return {
ns: s,
url: e
url: a
};
},
render() {
......@@ -734,17 +734,49 @@ class le extends Pe {
* @type {number}
* @memberof FormMDCtrlFormStyle2Controller
*/
C(this, "active", 0);
E(this, "active", 0);
}
connect(t, a) {
this.formNeurons.get(t) || (this.formNeurons.set(t, a), a.evt.on("mounted", () => {
a.call.load();
}), a.evt.on("destroyed", () => {
this.formNeurons.delete(t);
}), a.evt.on("valueChange", (c) => {
if (c) {
const n = this.contentCtrlData.find((d) => d.srfkey === c.srfkey);
n && Object.assign(n, c), this.force();
/**
* 计算表单更新项信息
*
* @param {IPSDEFormItemUpdate} formItemUpdate
* @return {*}
* @memberof FormMDCtrlFormStyle2Controller
*/
calcFormUpdateItem(e) {
var t, i;
return {
methodName: ((t = e.getPSAppDEMethod()) == null ? void 0 : t.codeName) || "",
itemNames: (i = e.getPSDEFIUpdateDetails()) == null ? void 0 : i.map((o) => o.name),
model: {
customCode: e.customCode,
scriptCode: e.scriptCode
}
};
}
connect(e, t) {
this.formNeurons.get(e) || (this.formNeurons.set(e, t), t.evt.on("mounted", () => {
t.call.load();
}), t.evt.on("destroyed", () => {
this.formNeurons.delete(e);
}), t.evt.on("valueChange", (i) => {
if (i) {
const o = this.contentCtrlData.find((d) => d.srfkey === i.srfkey);
o && Object.assign(o, i), this.force();
}
}), t.evt.on("afterSave", async () => {
const i = this.model.source.M.getPSAppDEField;
i && await this.form.setDataValue(i.codeName.toLowerCase(), [
...this.contentCtrlData
]);
const o = this.model.source.getPSDEFormItemUpdate();
if (o) {
const { methodName: d, itemNames: v, model: u } = this.calcFormUpdateItem(o);
await this.form.updateFormItem(
d,
v,
u
);
}
}));
}
......@@ -755,23 +787,23 @@ class le extends Pe {
* @memberof FormMDCtrlFormStyle2Controller
*/
async validate() {
const t = [];
this.formNeurons.forEach((n, d) => {
const v = n.call.getFormController();
t.push({ key: d, controller: v });
const e = [];
this.formNeurons.forEach((o, d) => {
const v = o.call.getFormController();
e.push({ key: d, controller: v });
});
let a = "";
const c = await Promise.all(
t.map(async (n) => {
const d = await n.controller.validate();
return !a && !d && (a = n.key), d;
let t = "";
const i = await Promise.all(
e.map(async (o) => {
const d = await o.controller.validate();
return !t && !d && (t = o.key), d;
})
);
if (a) {
const n = this.contentCtrlData.findIndex((d) => d.srfkey === a);
n > -1 && (this.active = n);
if (t) {
const o = this.contentCtrlData.findIndex((d) => d.srfkey === t);
o > -1 && (this.active = o);
}
return c.findIndex((n) => !n) === -1;
return i.findIndex((o) => !o) === -1;
}
/**
* 静默校验
......@@ -780,23 +812,23 @@ class le extends Pe {
* @memberof FormMDCtrlFormStyle2Controller
*/
async silentValidate() {
const t = [];
this.formNeurons.forEach((n, d) => {
const v = n.call.getFormController();
t.push({ key: d, controller: v });
const e = [];
this.formNeurons.forEach((o, d) => {
const v = o.call.getFormController();
e.push({ key: d, controller: v });
});
let a = "";
const c = await Promise.all(
t.map(async (n) => {
const d = await n.controller.silentValidate();
return !a && !d && (a = n.key), d;
let t = "";
const i = await Promise.all(
e.map(async (o) => {
const d = await o.controller.silentValidate();
return !t && !d && (t = o.key), d;
})
);
if (a) {
const n = this.contentCtrlData.findIndex((d) => d.srfkey === a);
n > -1 && (this.active = n);
if (t) {
const o = this.contentCtrlData.findIndex((d) => d.srfkey === t);
o > -1 && (this.active = o);
}
return c.findIndex((n) => !n) === -1;
return i.findIndex((o) => !o) === -1;
}
}
const Ue = M({
......@@ -812,66 +844,66 @@ const Ue = M({
}
},
setup(s) {
const e = B("form-mdctrl-form-style2"), t = s.controller, {
proxy: a
const a = B("form-mdctrl-form-style2"), e = s.controller, {
proxy: t
} = W();
ge(a, s.controller);
const c = async (h, g, i) => {
i.stopPropagation(), i.preventDefault();
const y = t.contentCtrlData.length;
await t.handleRemove(h, g), y !== t.contentCtrlData.length && g <= t.active && t.active !== 0 && (t.active -= 1);
}, n = (h) => {
t.active = h, t.force();
ge(t, s.controller);
const i = async (h, g, l) => {
l.stopPropagation(), l.preventDefault();
const y = e.contentCtrlData.length;
await e.handleRemove(h, g), y !== e.contentCtrlData.length && g <= e.active && e.active !== 0 && (e.active -= 1);
}, o = (h) => {
e.active = h, e.force();
}, d = async () => {
const h = JSON.parse(JSON.stringify(t.contentCtrlData)).length;
await t.handleAdd(), h < t.contentCtrlData.length && (t.active = t.contentCtrlData.length - 1);
const h = JSON.parse(JSON.stringify(e.contentCtrlData)).length;
await e.handleAdd(), h < e.contentCtrlData.length && (e.active = e.contentCtrlData.length - 1);
}, v = () => {
const h = s.modelData.source.userTag;
let g = {};
h && (g = JSON.parse(h));
const {
tabtitle: i,
tabtitle: l,
addtitle: y,
usermode: f
} = g;
return f === "user1" && t.contentCtrlData.some((l) => l.rcrylx === "system") ? r("div", {
class: e.e("header")
}, [t.contentCtrlData.map((l, w) => {
let E = "";
l.srfmajortext ? E = l.srfmajortext : i && l[i] && (E = l[i]);
let I = "待确认";
return l.is_rc === 1 ? I = "确认入场" : l.is_rc === 0 && (I = "放弃入场"), r("div", {
class: [e.e("header-item"), e.is("actived", w === t.active)],
return f === "user1" && e.contentCtrlData.some((c) => c.rcrylx === "system") ? r("div", {
class: a.e("header")
}, [e.contentCtrlData.map((c, w) => {
let C = "";
c.srfmajortext ? C = c.srfmajortext : l && c[l] && (C = c[l]);
let S = "待确认";
return c.is_rc === 1 ? S = "确认入场" : c.is_rc === 0 && (S = "放弃入场"), r("div", {
class: [a.e("header-item"), a.is("actived", w === e.active)],
on: {
click: () => n(w)
click: () => o(w)
}
}, [r("div", {
class: e.em("header-item", "title")
}, [E, "(", I, ")"])]);
class: a.em("header-item", "title")
}, [C, "(", S, ")"])]);
})]) : r("div", {
class: e.e("header")
}, [t.contentCtrlData.map((u, l) => {
let w = `新建${l + 1}`;
return u.srfmajortext ? w = u.srfmajortext : i && u[i] ? w = u[i] : y && (w = `${y}${l + 1}`), r("div", {
class: [e.e("header-item"), e.is("actived", l === t.active)],
class: a.e("header")
}, [e.contentCtrlData.map((m, c) => {
let w = `新建${c + 1}`;
return m.srfmajortext ? w = m.srfmajortext : l && m[l] ? w = m[l] : y && (w = `${y}${c + 1}`), r("div", {
class: [a.e("header-item"), a.is("actived", c === e.active)],
on: {
click: () => n(l)
click: () => o(c)
}
}, [r("div", {
class: e.em("header-item", "title")
}, [w]), t.enableDelete && r("div", {
class: e.em("header-item", "delete"),
class: a.em("header-item", "title")
}, [w]), e.enableDelete && r("div", {
class: a.em("header-item", "delete"),
attrs: {
title: "移除"
},
on: {
click: (E) => c(u, l, E)
click: (C) => i(m, c, C)
}
}, [r("i", {
class: "fa fa-close"
})])]);
}), t.enableCreate && r("div", {
class: [e.e("header-item"), e.e("add")],
}), e.enableCreate && r("div", {
class: [a.e("header-item"), a.e("add")],
attrs: {
title: "添加"
},
......@@ -882,38 +914,38 @@ const Ue = M({
class: "fa fa-plus"
})])]);
};
return V(() => t.form.isLoaded, (h, g) => {
h !== g && h === !0 && t.loadData();
return V(() => e.form.isLoaded, (h, g) => {
h !== g && h === !0 && e.loadData();
}), {
ns: e,
ns: a,
rendertanHeader: v,
renderTabs: () => t.contentCtrlData.map((h, g) => {
renderTabs: () => e.contentCtrlData.map((h, g) => {
var f;
let i = null;
let l = null;
const {
form: y
} = t.model;
if (y && t.providers[y.name] && t.model.appEntity) {
const u = Object.assign(t.form.context.clone(), {
[(f = t.model.appEntity.codeName) == null ? void 0 : f.toLowerCase()]: h[t.model.appEntity.keyName]
} = e.model;
if (y && e.providers[y.name] && e.model.appEntity) {
const m = Object.assign(e.form.context.clone(), {
[(f = e.model.appEntity.codeName) == null ? void 0 : f.toLowerCase()]: h[e.model.appEntity.keyName]
});
i = r(t.providers[y.name].component, {
l = r(e.providers[y.name].component, {
props: {
modelData: y,
context: u,
params: t.form.params,
context: m,
params: e.form.params,
enableAutoSave: !0,
silentVerify: !0
},
on: {
neuronInit: t.onNeuronInit(h.srfkey)
neuronInit: e.onNeuronInit(h.srfkey)
}
});
}
return r("div", {
class: [e.e("content"), e.is("actived", g === t.active)],
class: [a.e("content"), a.is("actived", g === e.active)],
key: h.srfkey
}, [i]);
}, [l]);
})
};
},
......@@ -927,15 +959,15 @@ const Ue = M({
props: se(),
emits: G(),
setup(s, {
emit: e
emit: a
}) {
const t = B("mpicker"), a = s.controller, c = b([]), n = b([]), d = b([]), v = b(!1), p = b(!1), h = b(null), g = b([]), i = j(() => {
const D = a.editorParams.followitem;
const e = B("mpicker"), t = s.controller, i = b([]), o = b([]), d = b([]), v = b(!1), u = b(!1), h = b(null), g = b([]), l = j(() => {
const D = t.editorParams.followitem;
return D ? s.data[D] : "";
});
V(() => s.value, (D) => {
c.value = [], d.value = [], D && (d.value = JSON.parse(D), d.value.length > 0 && d.value.forEach((P) => {
n.value.findIndex((k) => Object.is(k.srfkey, P.srfkey)) < 0 && (n.value.push(P), g.value.push(P.srfmajortext)), c.value.push(P.srfkey);
i.value = [], d.value = [], D && (d.value = JSON.parse(D), d.value.length > 0 && d.value.forEach((P) => {
o.value.findIndex((k) => Object.is(k.srfkey, P.srfkey)) < 0 && (o.value.push(P), g.value.push(P.srfmajortext)), i.value.push(P.srfkey);
}));
}, {
immediate: !0,
......@@ -945,75 +977,75 @@ const Ue = M({
const P = [];
if (D && Array.isArray(D))
for (let k = 0; k < D.length; k++) {
const x = D[k], o = {
srfkey: x[a.keyName] || x.srfkey,
srfmajortext: x[a.textName] || x.srfmajortext
}, m = await a.calcFillDataItems(x);
m.length > 0 && m.forEach((F) => {
Object.assign(o, {
const x = D[k], n = {
srfkey: x[t.keyName] || x.srfkey,
srfmajortext: x[t.textName] || x.srfmajortext
}, p = await t.calcFillDataItems(x);
p.length > 0 && p.forEach((F) => {
Object.assign(n, {
[F.name]: F.value
});
}), P.push(o), n.value.findIndex((F) => Object.is(F[a.keyName], x[a.keyName])) < 0 && n.value.push(o);
}), P.push(n), o.value.findIndex((F) => Object.is(F[t.keyName], x[t.keyName])) < 0 && o.value.push(n);
}
const S = P.length > 0 ? JSON.stringify(P) : "";
e("change", S);
const I = P.length > 0 ? JSON.stringify(P) : "";
a("change", I);
}, f = async () => {
let D;
d.value.length && (D = JSON.stringify(d.value));
const P = await a.openPickUpView(s.data, D);
const P = await t.openPickUpView(s.data, D);
P && y(P);
}, u = (D) => {
}, m = (D) => {
const P = [];
if (D.length > 0) {
D.forEach((k) => {
let x = n.value.findIndex((m) => Object.is(m.srfkey, k)), o = null;
x >= 0 ? o = n.value[x] : (x = d.value.findIndex((m) => Object.is(m.srfkey, k)), x >= 0 && (o = d.value[x])), o && P.push(o);
let x = o.value.findIndex((p) => Object.is(p.srfkey, k)), n = null;
x >= 0 ? n = o.value[x] : (x = d.value.findIndex((p) => Object.is(p.srfkey, k)), x >= 0 && (n = d.value[x])), n && P.push(n);
});
const S = P.length > 0 ? JSON.stringify(P) : "";
e("change", S);
const I = P.length > 0 ? JSON.stringify(P) : "";
a("change", I);
} else
e("change", "");
}, l = async (D) => {
if (a.model.appDataEntity) {
p.value = !0;
a("change", "");
}, c = async (D) => {
if (t.model.appDataEntity) {
u.value = !0;
try {
const P = await a.getServiceData(D, s.data);
p.value = !1, n.value = [], P.data.length > 0 && (n.value = P.data.map((S) => ({
srfkey: S[a.keyName],
srfmajortext: S[a.textName]
const P = await t.getServiceData(D, s.data);
u.value = !1, o.value = [], P.data.length > 0 && (o.value = P.data.map((I) => ({
srfkey: I[t.keyName],
srfmajortext: I[t.textName]
})));
} catch (P) {
p.value = !1;
u.value = !1;
}
}
}, w = (D) => {
v.value = D, e("operate", D), v.value && l("");
}, E = j(() => d.value.map((D) => D.srfmajortext).join("、")), I = (D) => {
n.value = D;
v.value = D, a("operate", D), v.value && c("");
}, C = j(() => d.value.map((D) => D.srfmajortext).join("、")), S = (D) => {
o.value = D;
};
return V(() => i.value, async (D) => {
return V(() => l.value, async (D) => {
if (D) {
await l("");
const P = n.value.map((S) => S.srfkey);
u(P);
await c("");
const P = o.value.map((I) => I.srfkey);
m(P);
} else
n.value = [], e("change", "");
o.value = [], a("change", "");
}, {
immediate: !0
}), {
ns: t,
c: a,
ns: e,
c: t,
selectRef: h,
curValue: c,
loading: p,
items: n,
curValue: i,
loading: u,
items: o,
defaultLabel: g,
valueText: E,
onSearch: l,
valueText: C,
onSearch: c,
onOpenChange: w,
onSelect: u,
onSelect: m,
openPickUpView: f,
setDefaultOptions: I
setDefaultOptions: S
};
},
render(s) {
......@@ -1037,13 +1069,13 @@ const Ue = M({
"on-change": this.onSelect,
"on-open-change": this.onOpenChange
}
}, [this.items.map((e) => s("i-option", {
key: e.srfkey,
}, [this.items.map((a) => s("i-option", {
key: a.srfkey,
attrs: {
value: e.srfkey,
label: e.srfmajortext
value: a.srfkey,
label: a.srfmajortext
}
}, [e.srfmajortext]))]), !this.readonly && s("div", {
}, [a.srfmajortext]))]), !this.readonly && s("div", {
class: this.ns.e("buns-position")
}, [s("div", {
class: this.ns.e("btns")
......@@ -1063,70 +1095,70 @@ const Ve = M({
props: se(),
emits: G(),
setup(s, {
emit: e
emit: a
}) {
const t = B("checkbox"), a = s.controller, c = b([]), n = b([]), d = ",", v = j({
const e = B("checkbox"), t = s.controller, i = b([]), o = b([]), d = ",", v = j({
get() {
var u;
return ((u = s.value) == null ? void 0 : u.split(",")) || [];
var m;
return ((m = s.value) == null ? void 0 : m.split(",")) || [];
},
set(u) {
let l = null;
set(m) {
let c = null;
const w = [];
c.value.length > 0 && (c.value.forEach((E) => {
u.findIndex((D) => Object.is(E.value, D)) !== -1 && w.push(E.value);
}), l = w.join(d)), e("change", l);
i.value.length > 0 && (i.value.forEach((C) => {
m.findIndex((D) => Object.is(C.value, D)) !== -1 && w.push(C.value);
}), c = w.join(d)), a("change", c);
}
}), p = async (u) => {
}), u = async (m) => {
const {
context: l,
context: c,
params: w
} = a.handlePublicParams(u, a.context, a.params);
if (a.editorParams.codeTag) {
let E = [];
const I = a.editorParams.codeTag;
return E = await ibiz.codeListService.get(I, l, w), E;
} = t.handlePublicParams(m, t.context, t.params);
if (t.editorParams.codeTag) {
let C = [];
const S = t.editorParams.codeTag;
return C = await ibiz.codeListService.get(S, c, w), C;
}
throw new he(a.model.source, "请配置代码表");
}, h = (u) => {
v.value = u;
throw new he(t.model.source, "请配置代码表");
}, h = (m) => {
v.value = m;
}, g = j(() => {
const u = Array.isArray(v.value) ? v.value : [v.value];
return c.value.filter((l) => u.includes(l.srfkey)).map((l) => l.srfmajortext).join("、");
}), i = async (u) => {
if (a.model.appDataEntity)
const m = Array.isArray(v.value) ? v.value : [v.value];
return i.value.filter((c) => m.includes(c.srfkey)).map((c) => c.srfmajortext).join("、");
}), l = async (m) => {
if (t.model.appDataEntity)
try {
const l = await a.getServiceData(u, s.data);
n.value = [], l.data.length > 0 && (n.value = l.data.map((w) => ({
srfkey: w[a.keyName],
srfmajortext: w[a.textName]
const c = await t.getServiceData(m, s.data);
o.value = [], c.data.length > 0 && (o.value = c.data.map((w) => ({
srfkey: w[t.keyName],
srfmajortext: w[t.textName]
})));
} catch (l) {
console.error(l);
} catch (c) {
console.error(c);
}
}, y = j(() => {
const u = a.editorParams.followitem;
return u ? s.data[u] : "";
const m = t.editorParams.followitem;
return m ? s.data[m] : "";
}), f = () => {
const u = [];
c.value.forEach((l) => {
n.value.findIndex((E) => E.srfkey === l.value) > -1 && u.push(l.value);
}), h(u);
const m = [];
i.value.forEach((c) => {
o.value.findIndex((C) => C.srfkey === c.value) > -1 && m.push(c.value);
}), h(m);
};
return V(() => y, async (u) => {
await p(u).then((l) => {
c.value = l;
}), await i(""), f();
return V(() => y, async (m) => {
await u(m).then((c) => {
i.value = c;
}), await l(""), f();
}, {
immediate: !0,
deep: !0
}), {
ns: t,
c: a,
ns: e,
c: t,
valueText: g,
selectArray: v,
items: c,
onSearch: i,
items: i,
onSearch: l,
onSelectArrayChange: h
};
},
......@@ -1141,15 +1173,15 @@ const Ve = M({
on: {
"on-change": this.onSelectArrayChange
}
}, [this.items.map((e, t) => s("i-checkbox", {
key: t,
}, [this.items.map((a, e) => s("i-checkbox", {
key: e,
attrs: {
label: e.value,
label: a.value,
disabled: this.disabled
}
}, [s("span", {
class: this.ns.e("text")
}, [e.text])]))])]);
}, [a.text])]))])]);
}
});
class Be extends Ae {
......@@ -1160,34 +1192,34 @@ class Be extends Ae {
* @date 2022-09-15 10:09:22
* @param {ViewNeuron} neuron
*/
setViewNeuron(e) {
this.neuron = e, this.neuron.evt.on("refreshed", (t) => {
if (ibiz.log.debug("接收到关系界面的刷新变更事件", t), this.model.formItemUpdate) {
const { methodName: a, itemNames: c, model: n } = this.model.formItemUpdate;
setViewNeuron(a) {
this.neuron = a, this.neuron.evt.on("refreshed", (e) => {
if (ibiz.log.debug("接收到关系界面的刷新变更事件", e), this.model.formItemUpdate) {
const { methodName: t, itemNames: i, model: o } = this.model.formItemUpdate;
this.form.updateFormItem(
a,
c,
n
t,
i,
o
);
}
}), this.neuron.evt.on("mounted", () => {
this.neuron.call.refresh();
}), this.neuron.evt.on("viewDataChange", async (t) => {
if (!["LOAD", "LOADDRAFT"].includes(t.type) && (ibiz.log.debug("接收到关系界面的数据变更事件", t.data), this.model.formItemUpdate)) {
const { methodName: a, itemNames: c, model: n } = this.model.formItemUpdate;
}), this.neuron.evt.on("viewDataChange", async (e) => {
if (!["LOAD", "LOADDRAFT"].includes(e.type) && (ibiz.log.debug("接收到关系界面的数据变更事件", e.data), this.model.formItemUpdate)) {
const { methodName: t, itemNames: i, model: o } = this.model.formItemUpdate;
try {
this.processState.formItemUpdate = !0, await this.form.updateFormItem(
a,
c,
n
t,
i,
o
);
} finally {
this.processState.formItemUpdate = !1;
}
}
}), this.neuron.evt.on("destroyed", () => {
Object.keys(this.processState).forEach((t) => {
this.processState[t] = !1;
Object.keys(this.processState).forEach((e) => {
this.processState[e] = !1;
});
}), this.neuron.evt.on("viewSaveStart", () => {
this.processState.viewSave = !0;
......@@ -1205,7 +1237,7 @@ class _e extends Fe {
* @type {string}
* @memberof WfEditViewController
*/
C(this, "userAction");
E(this, "userAction");
}
async onInit() {
await super.onInit(), this.getUserAction();
......@@ -1220,14 +1252,14 @@ class _e extends Fe {
async wfStart() {
var h;
await this.save(), await this.execUserAction();
const t = await this.entityService.wf.getWFVersion();
if (t.data.length === 0)
const e = await this.entityService.wf.getWFVersion();
if (e.data.length === 0)
throw new ke("当前工作流版本不存在");
const a = t.data[0], c = `WFSTART@${a.wfversion}`, n = Object.assign(this.context.clone(), {
activeForm: a["process-form"]
const t = e.data[0], i = `WFSTART@${t.wfversion}`, o = Object.assign(this.context.clone(), {
activeForm: t["process-form"]
}), d = {
processDefinitionKey: a.definitionkey
}, v = (h = this.model.source.findPSAppViewRef(c)) == null ? void 0 : h.getRefPSAppView();
processDefinitionKey: t.definitionkey
}, v = (h = this.model.source.findPSAppViewRef(i)) == null ? void 0 : h.getRefPSAppView();
if (!v) {
await this.nerve.form.call.wfStart(d), await this.closeView();
return;
......@@ -1235,7 +1267,7 @@ class _e extends Fe {
(await ibiz.commands.execute(
q.TAG,
v,
n,
o,
d
)).ok && await this.closeView();
}
......@@ -1245,10 +1277,10 @@ class _e extends Fe {
* @memberof EditViewController
*/
getUserAction() {
const { form: t } = this.model, a = t.source.getPSControlHandler();
if (a) {
const c = a.findPSControlHandlerAction("user");
c && c.getPSAppDEMethod() && (this.userAction = c.getPSAppDEMethod().codeName);
const { form: e } = this.model, t = e.source.getPSControlHandler();
if (t) {
const i = t.findPSControlHandlerAction("user");
i && i.getPSAppDEMethod() && (this.userAction = i.getPSAppDEMethod().codeName);
}
}
/**
......@@ -1258,15 +1290,15 @@ class _e extends Fe {
*/
async execUserAction() {
if (this.userAction) {
const t = this.getData();
await this.entityService.exec(this.userAction, this.context, t[0]);
const e = this.getData();
await this.entityService.exec(this.userAction, this.context, e[0]);
}
}
}
function je(s, e) {
function je(s, a) {
return we(
s,
(t, a) => new _e(e, t, a)
(e, t) => new _e(a, e, t)
);
}
const ze = M({
......@@ -1289,26 +1321,26 @@ const ze = M({
},
setup(s) {
const {
proxy: e
proxy: a
} = W();
return {
c: je(e, s.modelPath)
c: je(a, s.modelPath)
};
},
render(s) {
let e = null;
let a = null;
if (this.c.complete) {
const {
form: t
form: e
} = this.c.model;
this.c.providers[t.name] && (e = s(this.c.providers[t.name].component, {
this.c.providers[e.name] && (a = s(this.c.providers[e.name].component, {
props: {
modelData: t,
modelData: e,
context: this.c.context,
params: this.c.params
},
on: {
neuronInit: this.c.nerve.onNeuronInit(t.name)
neuronInit: this.c.nerve.onNeuronInit(e.name)
}
}));
}
......@@ -1316,40 +1348,40 @@ const ze = M({
attrs: {
controller: this.c
}
}, [e]);
}, [a]);
}
});
class Ye {
constructor() {
C(this, "component", "IBizFormDataComparison");
E(this, "component", "IBizFormDataComparison");
}
}
class $e extends Ce {
async execAction(e, t, a, c) {
const n = {}, d = e.getPSAppDataEntity();
class $e extends Ee {
async execAction(a, e, t, i) {
const o = {}, d = a.getPSAppDataEntity();
if (d) {
d.isFill === !1 && await d.fill(!0);
const v = new H(d);
await v.init();
const { resultContext: p } = await this.handleParams(
const { resultContext: u } = await this.handleParams(
a,
e,
t,
a,
c
i
), h = ibiz.resourcePathUtil.calcPaths(
p,
u,
v.codeName
), g = K(p, h);
let i = `${g}/${v.deNamePlural}/importtemplate`, y = `${g}/${v.deNamePlural}/importdata2`;
const f = e.getPSAppDEDataImport();
f && (i += `?srfimporttag=${f.codeName}`, y += `?srfimporttag=${f.codeName}`);
const u = ibiz.overlay.createModal(
), g = K(u, h);
let l = `${g}/${v.deNamePlural}/importtemplate`, y = `${g}/${v.deNamePlural}/importdata2`;
const f = a.getPSAppDEDataImport();
f && (l += `?srfimporttag=${f.codeName}`, y += `?srfimporttag=${f.codeName}`);
const m = ibiz.overlay.createModal(
"CustomDataImport",
{
templateUrl: i,
templateUrl: l,
importUrl: y,
dismiss: (l) => {
u.dismiss(l);
dismiss: (c) => {
m.dismiss(c);
}
},
{
......@@ -1357,16 +1389,16 @@ class $e extends Ce {
placement: "center"
}
);
return u.present(), await u.onWillDismiss(), {
return m.present(), await m.onWillDismiss(), {
refresh: !0
};
}
return n;
return o;
}
}
class He {
constructor() {
C(this, "handler");
E(this, "handler");
}
async getHandler() {
return this.handler || (this.handler = new $e()), this.handler;
......@@ -1374,56 +1406,56 @@ class He {
}
class Ge {
constructor() {
C(this, "gridEditor", "YearMonthPicker");
C(this, "formEditor", "YearMonthPicker");
E(this, "gridEditor", "YearMonthPicker");
E(this, "formEditor", "YearMonthPicker");
}
async createController(e, t) {
const a = new Ie(e, t);
return await a.init(), a;
async createController(a, e) {
const t = new Se(a, e);
return await t.init(), t;
}
}
class We {
constructor() {
C(this, "formEditor", "DownLoadSafeFile");
C(this, "gridEditor", "DownLoadSafeFile");
E(this, "formEditor", "DownLoadSafeFile");
E(this, "gridEditor", "DownLoadSafeFile");
}
async createController(e, t) {
const a = new Se(e, t);
return await a.init(), a;
async createController(a, e) {
const t = new Ie(a, e);
return await t.init(), t;
}
}
class qe extends re {
async execAction(e, t, a, c, n) {
const d = {}, { frontProcessType: v } = e;
async execAction(a, e, t, i, o) {
const d = {}, { frontProcessType: v } = a;
if (v === "OPENHTMLPAGE") {
const p = ne.fill(e.htmlPageUrl, t, a == null ? void 0 : a[0]);
window.open(p, "_blank");
const u = ne.fill(a.htmlPageUrl, e, t == null ? void 0 : t[0]);
window.open(u, "_blank");
}
if (v === "DATAIMP") {
const p = e.getPSAppDataEntity();
if (p) {
p.isFill === !1 && await p.fill(!0);
const h = new H(p);
const u = a.getPSAppDataEntity();
if (u) {
u.isFill === !1 && await u.fill(!0);
const h = new H(u);
await h.init();
const { resultContext: g } = await this.handleParams(
a,
e,
t,
a,
c
), i = ibiz.resourcePathUtil.calcPaths(
i
), l = ibiz.resourcePathUtil.calcPaths(
g,
h.codeName
), y = K(g, i);
let f = `${y}/${h.deNamePlural}/importtemplate`, u = `${y}/${h.deNamePlural}/importdata2`;
const l = e.getPSAppDEDataImport();
l && (f += `?srfimporttag=${l.codeName}`, u += `?srfimporttag=${l.codeName}`);
), y = K(g, l);
let f = `${y}/${h.deNamePlural}/importtemplate`, m = `${y}/${h.deNamePlural}/importdata2`;
const c = a.getPSAppDEDataImport();
c && (f += `?srfimporttag=${c.codeName}`, m += `?srfimporttag=${c.codeName}`);
const w = ibiz.overlay.createModal(
"DataImport",
{
templateUrl: f,
importUrl: u,
dismiss: (E) => {
w.dismiss(E);
importUrl: m,
dismiss: (C) => {
w.dismiss(C);
}
},
{
......@@ -1437,29 +1469,29 @@ class qe extends re {
}
}
if (["TOP", "WIZARD"].includes(v)) {
const p = e.getFrontPSAppView();
if (!p)
const u = a.getFrontPSAppView();
if (!u)
throw new Error("未配置打开视图");
await p.fill(!0);
await u.fill(!0);
const { resultContext: h, resultParams: g } = await this.handleParams(
a,
e,
t,
a,
c
), i = await ibiz.commands.execute(
i
), l = await ibiz.commands.execute(
q.TAG,
p,
u,
h,
g,
n
o
);
(i == null ? void 0 : i.ok) === !1 && (d.closeView = !1, d.refresh = !1, d.cancel = !0), i != null && i.ok && i.data && (d.data = i.data);
} else if (n) {
const { neuron: p } = n, g = p.call.getFormController().call.getFormController(), { druipart1: i, druipart2: y, druipart3: f } = g.details;
(l == null ? void 0 : l.ok) === !1 && (d.closeView = !1, d.refresh = !1, d.cancel = !0), l != null && l.ok && l.data && (d.data = l.data);
} else if (o) {
const { neuron: u } = o, g = u.call.getFormController().call.getFormController(), { druipart1: l, druipart2: y, druipart3: f } = g.details;
[
{
message: "服务履历为空",
neuron: i
neuron: l
},
{
message: "教育经验为空",
......@@ -1470,21 +1502,21 @@ class qe extends re {
neuron: f
}
].some((w) => {
const E = w.neuron.neuron.call.getGridController();
if (E) {
const I = E.call.getGridController();
if (I && I.items && I.items.length > 0)
const C = w.neuron.neuron.call.getGridController();
if (C) {
const S = C.call.getGridController();
if (S && S.items && S.items.length > 0)
return !1;
}
return ibiz.message.error(`${w.message}`, 1.5, !0), !0;
}) || await p.call.wfStart();
}) || await u.call.wfStart();
}
return d;
}
}
class Ke {
constructor() {
C(this, "handler");
E(this, "handler");
}
async getHandler() {
return this.handler || (this.handler = new qe()), this.handler;
......@@ -1492,65 +1524,65 @@ class Ke {
}
class Je {
constructor() {
C(this, "component", "FormMDCtrlFormStyle2");
E(this, "component", "FormMDCtrlFormStyle2");
}
async createController(e, t, a) {
const c = new le(e, t, a);
return await c.init(), c;
async createController(a, e, t) {
const i = new le(a, e, t);
return await i.init(), i;
}
}
class Xe {
constructor() {
C(this, "formEditor", "AutoSelectAll");
C(this, "gridEditor", "AutoSelectAll");
E(this, "formEditor", "AutoSelectAll");
E(this, "gridEditor", "AutoSelectAll");
}
async createController(e, t) {
const a = new oe(e, t);
return await a.init(), a;
async createController(a, e) {
const t = new oe(a, e);
return await t.init(), t;
}
}
class Ze {
constructor() {
C(this, "formEditor", "MPickerCheckbox");
C(this, "gridEditor", "IBizGridPicker");
E(this, "formEditor", "MPickerCheckbox");
E(this, "gridEditor", "IBizGridPicker");
}
async createController(e, t) {
const a = new oe(e, t);
return await a.init(), a;
async createController(a, e) {
const t = new oe(a, e);
return await t.init(), t;
}
}
class Qe extends re {
async execAction(e, t, a, c, n) {
const d = {}, { frontProcessType: v } = e;
async execAction(a, e, t, i, o) {
const d = {}, { frontProcessType: v } = a;
if (v === "OPENHTMLPAGE") {
const p = ne.fill(e.htmlPageUrl, t, a == null ? void 0 : a[0]);
window.open(p, "_blank");
const u = ne.fill(a.htmlPageUrl, e, t == null ? void 0 : t[0]);
window.open(u, "_blank");
}
if (v === "DATAIMP") {
const p = e.getPSAppDataEntity();
if (p) {
p.isFill === !1 && await p.fill(!0);
const h = new H(p);
const u = a.getPSAppDataEntity();
if (u) {
u.isFill === !1 && await u.fill(!0);
const h = new H(u);
await h.init();
const { resultContext: g } = await this.handleParams(
a,
e,
t,
a,
c
), i = ibiz.resourcePathUtil.calcPaths(
i
), l = ibiz.resourcePathUtil.calcPaths(
g,
h.codeName
), y = K(g, i);
let f = `${y}/${h.deNamePlural}/importtemplate`, u = `${y}/${h.deNamePlural}/importdata2`;
const l = e.getPSAppDEDataImport();
l && (f += `?srfimporttag=${l.codeName}`, u += `?srfimporttag=${l.codeName}`);
), y = K(g, l);
let f = `${y}/${h.deNamePlural}/importtemplate`, m = `${y}/${h.deNamePlural}/importdata2`;
const c = a.getPSAppDEDataImport();
c && (f += `?srfimporttag=${c.codeName}`, m += `?srfimporttag=${c.codeName}`);
const w = ibiz.overlay.createModal(
"DataImport",
{
templateUrl: f,
importUrl: u,
dismiss: (E) => {
w.dismiss(E);
importUrl: m,
dismiss: (C) => {
w.dismiss(C);
}
},
{
......@@ -1564,33 +1596,33 @@ class Qe extends re {
}
}
if (["TOP", "WIZARD"].includes(v)) {
const p = e.getFrontPSAppView();
if (!p)
const u = a.getFrontPSAppView();
if (!u)
throw new Error("未配置打开视图");
await p.fill(!0);
await u.fill(!0);
const { resultContext: h, resultParams: g } = await this.handleParams(
a,
e,
t,
a,
c
), i = await ibiz.commands.execute(
i
), l = await ibiz.commands.execute(
q.TAG,
p,
u,
h,
g,
n
o
);
(i == null ? void 0 : i.ok) === !1 && (d.closeView = !1, d.refresh = !1, d.cancel = !0), i != null && i.ok && i.data && (d.data = i.data);
} else if (a && a.length > 0 && n) {
const { neuron: p } = n, i = await p.call.getFormController().call.getFormController().autoSave();
i && i.rcryqd && Array.isArray(i.rcryqd) && i.rcryqd.length > 0 ? await p.call.wfStart() : ibiz.message.error("入场信息为空");
(l == null ? void 0 : l.ok) === !1 && (d.closeView = !1, d.refresh = !1, d.cancel = !0), l != null && l.ok && l.data && (d.data = l.data);
} else if (t && t.length > 0 && o) {
const { neuron: u } = o, l = await u.call.getFormController().call.getFormController().autoSave();
l && l.rcryqd && Array.isArray(l.rcryqd) && l.rcryqd.length > 0 ? await u.call.wfStart() : ibiz.message.error("入场信息为空");
}
return d;
}
}
class et {
constructor() {
C(this, "handler");
E(this, "handler");
}
async getHandler() {
return this.handler || (this.handler = new Qe()), this.handler;
......@@ -1598,16 +1630,16 @@ class et {
}
class tt {
constructor() {
C(this, "component", "FormDruipart");
E(this, "component", "FormDruipart");
}
async createController(e, t, a) {
const c = new Be(e, t, a);
return await c.init(), c;
async createController(a, e, t) {
const i = new Be(a, e, t);
return await i.init(), i;
}
}
class at {
constructor() {
C(this, "component", "WfEditView");
E(this, "component", "WfEditView");
}
}
const pt = {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册