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

feat: 更新插件包sy-dsf-web

上级 e73b1bc5
...@@ -3,7 +3,7 @@ var ue = (s, a, t) => a in s ? de(s, a, { enumerable: !0, configurable: !0, writ ...@@ -3,7 +3,7 @@ var ue = (s, a, t) => a in s ? de(s, a, { enumerable: !0, configurable: !0, writ
var C = (s, a, t) => (ue(s, typeof a != "symbol" ? a + "" : a, t), t); var C = (s, a, t) => (ue(s, typeof a != "symbol" ? a + "" : a, t), t);
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 R, useControlController as fe, usePropsWatch as ve, getDatePickerProps as ye, getEditorEmits as G, useController as ge, getDataPickerProps as se, useViewController as be, getInputNumberProps as De, getGridInputNumberProps as we, getGridEditorEmits as Ce, useGridCellEditor as Ee } from "@ibiz-template/vue-util"; import { useNamespace as R, useControlController as fe, usePropsWatch as ve, getDatePickerProps as ye, getEditorEmits as G, useController as ge, getDataPickerProps as se, useViewController as be, getInputNumberProps as De, getGridInputNumberProps as we, getGridEditorEmits as Ce, useGridCellEditor as Ee } from "@ibiz-template/vue-util";
import { defineComponent as M, getCurrentInstance as W, ref as E, watch as T, h as o, onMounted as Pe, computed as j } from "vue"; import { defineComponent as M, getCurrentInstance as W, ref as E, watch as T, h as o, onMounted as Pe, computed as _ } from "vue";
import { createUUID as te, isNilOrEmpty as Ie } from "qx-util"; import { createUUID as te, isNilOrEmpty as Ie } from "qx-util";
import { ViewMode as ae, PluginStaticResource as Ne, OpenAppViewCommand as q, UIActionHandler as Ae, FrontUIActionHandler as re } from "@ibiz-template/runtime"; import { ViewMode as ae, PluginStaticResource as Ne, OpenAppViewCommand as q, UIActionHandler as Ae, FrontUIActionHandler as re } from "@ibiz-template/runtime";
import { EditFormController as Fe, FormMDCtrlController as xe, FormDRUIPartController as Se, EditViewController as ke, TextBoxEditorController as Oe, DatePickerEditorController as Te, UploadEditorController as Me, PickerEditorController as oe } from "@ibiz-template/controller"; import { EditFormController as Fe, FormMDCtrlController as xe, FormDRUIPartController as Se, EditViewController as ke, TextBoxEditorController as Oe, DatePickerEditorController as Te, UploadEditorController as Me, PickerEditorController as oe } from "@ibiz-template/controller";
...@@ -116,14 +116,14 @@ class Le extends Fe { ...@@ -116,14 +116,14 @@ class Le extends Fe {
[e.toLowerCase()]: this.params.base_version [e.toLowerCase()]: this.params.base_version
}), d = Object.assign({}, this.context.clone(), { }), d = Object.assign({}, this.context.clone(), {
[i.toLowerCase()]: this.params.compare_version [i.toLowerCase()]: this.params.compare_version
}), m = await r.exec("Get", v, this.params), h = await l.exec( }), m = await r.exec("Get", v, this.params), b = await l.exec(
"Get", "Get",
d, d,
this.params this.params
); );
return this.isLoaded = !0, { return this.isLoaded = !0, {
baseData: m.data.data, baseData: m.data.data,
compareData: h.data.data compareData: b.data.data
}; };
} }
/** /**
...@@ -174,26 +174,26 @@ const Ve = M({ ...@@ -174,26 +174,26 @@ const Ve = M({
} = W(), e = fe(t, () => { } = W(), e = fe(t, () => {
const n = new Le(s.modelData, s.context, s.params); const n = new Le(s.modelData, s.context, s.params);
return ve(t, "enableAutoSave", n.setEnableAutoSave.bind(n)), n; return ve(t, "enableAutoSave", n.setEnableAutoSave.bind(n)), n;
}), i = E(!0), r = E(!1), l = E({}), v = E({}), d = E([]), m = [], h = E([]), c = E([]), g = E([]), y = /* @__PURE__ */ new Map(), w = E(0), f = (n) => { }), i = E(!0), r = E(!1), l = E({}), v = E({}), d = E([]), m = [], b = E([]), c = E([]), y = E([]), f = /* @__PURE__ */ new Map(), D = E(0), p = (n) => {
const u = []; const u = [];
if (u.push(n), n && n.children) { if (u.push(n), n && n.children) {
const I = []; const I = [];
n.children.forEach((F) => { n.children.forEach((F) => {
const S = f(F); const S = p(F);
I.push(...S); I.push(...S);
}), u.push(...I); }), u.push(...I);
} }
return u; return u;
}, p = f(s.modelData); }, h = p(s.modelData);
m.push(...p); m.push(...h);
const b = (n) => { const g = (n) => {
const u = e.details[n.source.name], I = o("not-supported-editor", { const u = e.details[n.source.name], I = o("not-supported-editor", {
attrs: { attrs: {
modelData: n.editor modelData: n.editor
} }
}); });
return o("div", { return o("div", {
class: [a.e("form-grid-item"), a.is("add", h.value.includes(n.source.name)), a.is("update", g.value.includes(n.source.name)), a.is("delete", c.value.includes(n.source.name))] class: [a.e("form-grid-item"), a.is("add", b.value.includes(n.source.name)), a.is("update", y.value.includes(n.source.name)), a.is("delete", c.value.includes(n.source.name))]
}, [o("div", { }, [o("div", {
class: a.em("form-grid-item", "name") class: a.em("form-grid-item", "name")
}, [n.source.caption]), o("div", { }, [n.source.caption]), o("div", {
...@@ -218,10 +218,10 @@ const Ve = M({ ...@@ -218,10 +218,10 @@ const Ve = M({
} }
}) : I])]); }) : I])]);
}, N = (n, u) => { }, N = (n, u) => {
y.set(n.source.id, u), u.evt.on("mounted", () => { f.set(n.source.id, u), u.evt.on("mounted", () => {
i.value && e.startLoading(), w.value += 1, u.call.refresh(); i.value && e.startLoading(), D.value += 1, u.call.refresh();
}), u.evt.on("refreshed", () => { }), u.evt.on("refreshed", () => {
w.value -= 1, setTimeout(() => { D.value -= 1, setTimeout(() => {
i.value && e.endLoading(); i.value && e.endLoading();
}, 500); }, 500);
}); });
...@@ -233,7 +233,7 @@ const Ve = M({ ...@@ -233,7 +233,7 @@ const Ve = M({
gysrlzy_info: s.params.compare_version, gysrlzy_info: s.params.compare_version,
compare_version: s.params.compare_version compare_version: s.params.compare_version
}); });
const _ = { const j = {
compare_version: s.params.compare_version compare_version: s.params.compare_version
}, L = l.value[n.source.userTag], V = v.value[u == null ? void 0 : u.source.userTag]; }, L = l.value[n.source.userTag], V = v.value[u == null ? void 0 : u.source.userTag];
let J = !1, z = !1, X = !1; let J = !1, z = !1, X = !1;
...@@ -256,7 +256,7 @@ const Ve = M({ ...@@ -256,7 +256,7 @@ const Ve = M({
}, [F && o("ViewShell", { }, [F && o("ViewShell", {
attrs: { attrs: {
context: U, context: U,
params: _, params: j,
modal: { modal: {
mode: ae.EMBED mode: ae.EMBED
}, },
...@@ -286,7 +286,7 @@ const Ve = M({ ...@@ -286,7 +286,7 @@ const Ve = M({
neuronInit: (B) => N(n, B) neuronInit: (B) => N(n, B)
} }
})])]); })])]);
}, D = (n) => { }, w = (n) => {
const u = { const u = {
modelData: n, modelData: n,
controller: e.details[n.source.name] controller: e.details[n.source.name]
...@@ -321,8 +321,8 @@ const Ve = M({ ...@@ -321,8 +321,8 @@ const Ve = M({
class: a.e("form-page") class: a.e("form-page")
}, [n.children.map((u) => x(u))]); }, [n.children.map((u) => x(u))]);
if (n.source.detailType === "FORMITEM") { if (n.source.detailType === "FORMITEM") {
const u = h.value.includes(n.source.name), I = c.value.includes(n.source.name), F = g.value.includes(n.source.name); const u = b.value.includes(n.source.name), I = c.value.includes(n.source.name), F = y.value.includes(n.source.name);
return r.value && !u && !I && !F ? null : b(n); return r.value && !u && !I && !F ? null : g(n);
} }
if (n.source.detailType === "GROUPPANEL") { if (n.source.detailType === "GROUPPANEL") {
const u = d.value.includes(n.source.name); const u = d.value.includes(n.source.name);
...@@ -356,13 +356,13 @@ const Ve = M({ ...@@ -356,13 +356,13 @@ const Ve = M({
class: [a.be("group", "content"), a.is("collapse", u)] class: [a.be("group", "content"), a.is("collapse", u)]
}, [n.children.map((I) => x(I))])]); }, [n.children.map((I) => x(I))])]);
} }
return n.source.detailType === "DRUIPART" && !n.source.name.endsWith("_srfcopy") ? A(n) : n.source.detailType === "MDCTRL" ? D(n) : null; return n.source.detailType === "DRUIPART" && !n.source.name.endsWith("_srfcopy") ? A(n) : n.source.detailType === "MDCTRL" ? w(n) : null;
} }
}, O = (n, u) => { }, O = (n, u) => {
const I = [], F = [], S = []; const I = [], F = [], S = [];
return Object.keys(u).forEach((k) => { return Object.keys(u).forEach((k) => {
const U = n[k], _ = u[k]; const U = n[k], j = u[k];
e.isFalseyButNotEmpty(U) && !e.isFalseyButNotEmpty(_) && I.push(k), !e.isFalseyButNotEmpty(U) && !e.isFalseyButNotEmpty(_) && e.compareObjectValues(U, _) && F.push(k); e.isFalseyButNotEmpty(U) && !e.isFalseyButNotEmpty(j) && I.push(k), !e.isFalseyButNotEmpty(U) && !e.isFalseyButNotEmpty(j) && e.compareObjectValues(U, j) && F.push(k);
}), Object.keys(n).forEach((k) => { }), Object.keys(n).forEach((k) => {
if (!Object.prototype.hasOwnProperty.call(u, k) || e.isFalseyButNotEmpty(u[k])) { if (!Object.prototype.hasOwnProperty.call(u, k) || e.isFalseyButNotEmpty(u[k])) {
const U = n[k]; const U = n[k];
...@@ -382,15 +382,15 @@ const Ve = M({ ...@@ -382,15 +382,15 @@ const Ve = M({
modified: I, modified: I,
deleted: F deleted: F
} = O(v.value, l.value); } = O(v.value, l.value);
h.value = u, g.value = I, c.value = F; b.value = u, y.value = I, c.value = F;
}, { }, {
immediate: !0 immediate: !0
}), { }), {
ns: a, ns: a,
c: e, c: e,
switchValue: r, switchValue: r,
druipartNum: w, druipartNum: D,
renderEditor: b, renderEditor: g,
renderByDetailType: x renderByDetailType: x
}; };
}, },
...@@ -464,53 +464,53 @@ const Be = M({ ...@@ -464,53 +464,53 @@ const Be = M({
message: "", message: "",
rowError: [] rowError: []
}), r = E(""), l = async (c) => { }), r = E(""), l = async (c) => {
const g = new FormData(), y = $(r.value).format("YYYY-MM"); const y = new FormData(), f = $(r.value).format("YYYY-MM");
g.append("file", c), g.append("ny", y); y.append("file", c), y.append("ny", f);
try { try {
const w = await ibiz.net.request(s.importUrl, { const D = await ibiz.net.request(s.importUrl, {
method: "post", method: "post",
data: g, data: y,
headers: { headers: {
"Content-Type": "multipart/form-data" "Content-Type": "multipart/form-data"
} }
}); });
i.value.state = "success", i.value.message = "导入成功"; i.value.state = "success", i.value.message = "导入成功";
const { const {
errorinfo: f, errorinfo: p,
success: p, success: h,
total: b total: g
} = w.data, N = b ? Number(b) : 0, A = p ? Number(p) : 0, D = b - p; } = D.data, N = g ? Number(g) : 0, A = h ? Number(h) : 0, w = g - h;
i.value.message = `共计导入数据 ${N} 条,错误[${D}],成功[${A}]`, f && Object.keys(f).length > 0 && (i.value.rowError = [], Object.keys(f).forEach((P) => { i.value.message = `共计导入数据 ${N} 条,错误[${w}],成功[${A}]`, p && Object.keys(p).length > 0 && (i.value.rowError = [], Object.keys(p).forEach((P) => {
i.value.rowError.push({ i.value.rowError.push({
index: Number(P) + 1, index: Number(P) + 1,
info: f[P].errorInfo info: p[P].errorInfo
}); });
})); }));
} catch (w) { } catch (D) {
i.value.state = "fail", i.value.message = `导入失败!${w.message}`; i.value.state = "fail", i.value.message = `导入失败!${D.message}`;
} }
}, v = (c) => { }, v = (c) => {
const g = c.target; const y = c.target;
if (!g.files) if (!y.files)
return; return;
const y = g.files[0]; const f = y.files[0];
g.value = null, l(y); y.value = null, l(f);
}, d = async () => { }, d = async () => {
var g; var y;
const c = await ibiz.net.request(s.templateUrl, { const c = await ibiz.net.request(s.templateUrl, {
responseType: "blob" responseType: "blob"
}); });
if (c.status === 200) { if (c.status === 200) {
let y = ((g = c.headers["content-disposition"].split(";").find((p) => p.indexOf("filename=") !== -1)) == null ? void 0 : g.slice(9)) || ""; let f = ((y = c.headers["content-disposition"].split(";").find((h) => h.indexOf("filename=") !== -1)) == null ? void 0 : y.slice(9)) || "";
y = decodeURIComponent(y); f = decodeURIComponent(f);
const w = new Blob([c.data], { const D = new Blob([c.data], {
type: "application/vnd.ms-excel" type: "application/vnd.ms-excel"
}), f = document.createElement("a"); }), p = document.createElement("a");
f.download = y, f.style.display = "none", f.href = URL.createObjectURL(w), document.body.appendChild(f), f.click(), URL.revokeObjectURL(f.href), document.body.removeChild(f); p.download = f, p.style.display = "none", p.href = URL.createObjectURL(D), document.body.appendChild(p), p.click(), URL.revokeObjectURL(p.href), document.body.removeChild(p);
} }
}, m = () => { }, m = () => {
e.value.click(); e.value.click();
}, h = () => { }, b = () => {
var c; var c;
a("close", { a("close", {
ok: !1, ok: !1,
...@@ -527,7 +527,7 @@ const Be = M({ ...@@ -527,7 +527,7 @@ const Be = M({
curDate: r, curDate: r,
onLinkClick: d, onLinkClick: d,
selectFile: m, selectFile: m,
onCancelButtonClick: h, onCancelButtonClick: b,
onFileChange: v, onFileChange: v,
inputUpLoad: e, inputUpLoad: e,
message: i message: i
...@@ -634,27 +634,27 @@ const _e = M({ ...@@ -634,27 +634,27 @@ const _e = M({
const d = e.valueFormat; const d = e.valueFormat;
if (d) { if (d) {
d === "YYYY-MM" ? r.value = "month" : d === "YYYY" && (r.value = "year"); d === "YYYY-MM" ? r.value = "month" : d === "YYYY" && (r.value = "year");
const y = d.replace("YYYY", "yyyy").replace("DD", "dd"); const f = d.replace("YYYY", "yyyy").replace("DD", "dd");
l.value = y; l.value = f;
} }
i.editorParams.formatText && (l.value = i.editorParams.formatText.replace("YYYY", "yyyy").replace("DD", "dd")); i.editorParams.formatText && (l.value = i.editorParams.formatText.replace("YYYY", "yyyy").replace("DD", "dd"));
const m = E(); const m = E();
T(() => s.value, (y, w) => { T(() => s.value, (f, D) => {
y && y !== w && (m.value = $(y).format(d)); f && f !== D && (m.value = $(f).format(d));
}, { }, {
immediate: !0 immediate: !0
}); });
const h = (y, w) => { const b = (f, D) => {
if (y) { if (f) {
const f = $(y.replace(/[年月]/g, "-")).format(d); const p = $(f.replace(/[年月]/g, "-")).format(d);
a("change", f); a("change", p);
} else } else
a("change", y); a("change", f);
}, c = (y) => { }, c = (f) => {
a("operate", y); a("operate", f);
}, g = E(); }, y = E();
return s.autoFocus && T(g, (y) => { return s.autoFocus && T(y, (f) => {
y && y.$el.getElementsByTagName("input")[0].click(); f && f.$el.getElementsByTagName("input")[0].click();
}), { }), {
ns: t, ns: t,
c: e, c: e,
...@@ -662,9 +662,9 @@ const _e = M({ ...@@ -662,9 +662,9 @@ const _e = M({
type: r, type: r,
format: l, format: l,
formatValue: m, formatValue: m,
handleChange: h, handleChange: b,
onOpenChange: c, onOpenChange: c,
inputRef: g, inputRef: y,
isTimePicker: v isTimePicker: v
}; };
}, },
...@@ -848,10 +848,10 @@ const ze = M({ ...@@ -848,10 +848,10 @@ const ze = M({
proxy: e proxy: e
} = W(); } = W();
ge(e, s.controller); ge(e, s.controller);
const i = async (m, h, c) => { const i = async (m, b, c) => {
c.stopPropagation(), c.preventDefault(); c.stopPropagation(), c.preventDefault();
const g = t.contentCtrlData.length; const y = t.contentCtrlData.length;
await t.handleRemove(m, h), g !== t.contentCtrlData.length && h <= t.active && t.active !== 0 && (t.active -= 1); await t.handleRemove(m, b), y !== t.contentCtrlData.length && b <= t.active && t.active !== 0 && (t.active -= 1);
}, r = (m) => { }, r = (m) => {
t.active = m, t.force(); t.active = m, t.force();
}, l = async () => { }, l = async () => {
...@@ -859,45 +859,45 @@ const ze = M({ ...@@ -859,45 +859,45 @@ const ze = M({
await t.handleAdd(), m < t.contentCtrlData.length && (t.active = t.contentCtrlData.length - 1); await t.handleAdd(), m < t.contentCtrlData.length && (t.active = t.contentCtrlData.length - 1);
}, v = () => { }, v = () => {
const m = s.modelData.source.userTag; const m = s.modelData.source.userTag;
let h = {}; let b = {};
m && (h = JSON.parse(m)); m && (b = JSON.parse(m));
const { const {
tabtitle: c, tabtitle: c,
addtitle: g, addtitle: y,
usermode: y usermode: f
} = h; } = b;
return y === "user1" && t.contentCtrlData.some((f) => f.rcrylx === "system") ? o("div", { return f === "user1" && t.contentCtrlData.some((p) => p.rcrylx === "system") ? o("div", {
class: a.e("header") class: a.e("header")
}, [t.contentCtrlData.map((f, p) => { }, [t.contentCtrlData.map((p, h) => {
let b = ""; let g = "";
f.srfmajortext ? b = f.srfmajortext : c && f[c] && (b = f[c]); p.srfmajortext ? g = p.srfmajortext : c && p[c] && (g = p[c]);
let N = "待确认"; let N = "待确认";
return f.is_rc === 1 ? N = "确认入场" : f.is_rc === 0 && (N = "放弃入场"), o("div", { return p.is_rc === 1 ? N = "确认入场" : p.is_rc === 0 && (N = "放弃入场"), o("div", {
class: [a.e("header-item"), a.is("actived", p === t.active)], class: [a.e("header-item"), a.is("actived", h === t.active)],
on: { on: {
click: () => r(p) click: () => r(h)
} }
}, [o("div", { }, [o("div", {
class: a.em("header-item", "title") class: a.em("header-item", "title")
}, [b, "(", N, ")"])]); }, [g, "(", N, ")"])]);
})]) : o("div", { })]) : o("div", {
class: a.e("header") class: a.e("header")
}, [t.contentCtrlData.map((w, f) => { }, [t.contentCtrlData.map((D, p) => {
let p = `新建${f + 1}`; let h = `新建${p + 1}`;
return w.srfmajortext ? p = w.srfmajortext : c && w[c] ? p = w[c] : g && (p = `${g}${f + 1}`), o("div", { return D.srfmajortext ? h = D.srfmajortext : c && D[c] ? h = D[c] : y && (h = `${y}${p + 1}`), o("div", {
class: [a.e("header-item"), a.is("actived", f === t.active)], class: [a.e("header-item"), a.is("actived", p === t.active)],
on: { on: {
click: () => r(f) click: () => r(p)
} }
}, [o("div", { }, [o("div", {
class: a.em("header-item", "title") class: a.em("header-item", "title")
}, [p]), t.enableDelete && o("div", { }, [h]), t.enableDelete && o("div", {
class: a.em("header-item", "delete"), class: a.em("header-item", "delete"),
attrs: { attrs: {
title: "移除" title: "移除"
}, },
on: { on: {
click: (b) => i(w, f, b) click: (g) => i(D, p, g)
} }
}, [o("i", { }, [o("i", {
class: "fa fa-close" class: "fa fa-close"
...@@ -914,25 +914,25 @@ const ze = M({ ...@@ -914,25 +914,25 @@ const ze = M({
class: "fa fa-plus" class: "fa fa-plus"
})])]); })])]);
}; };
return T(() => t.form.isLoaded, (m, h) => { return T(() => t.form.isLoaded, (m, b) => {
m !== h && m === !0 && t.loadData(); m !== b && m === !0 && t.loadData();
}), { }), {
ns: a, ns: a,
rendertanHeader: v, rendertanHeader: v,
renderTabs: () => t.contentCtrlData.map((m, h) => { renderTabs: () => t.contentCtrlData.map((m, b) => {
var y; var f;
let c = null; let c = null;
const { const {
form: g form: y
} = t.model; } = t.model;
if (g && t.providers[g.name] && t.model.appEntity) { if (y && t.providers[y.name] && t.model.appEntity) {
const w = Object.assign(t.form.context.clone(), { const D = Object.assign(t.form.context.clone(), {
[(y = t.model.appEntity.codeName) == null ? void 0 : y.toLowerCase()]: m[t.model.appEntity.keyName] [(f = t.model.appEntity.codeName) == null ? void 0 : f.toLowerCase()]: m[t.model.appEntity.keyName]
}); });
c = o(t.providers[g.name].component, { c = o(t.providers[y.name].component, {
props: { props: {
modelData: g, modelData: y,
context: w, context: D,
params: t.form.params, params: t.form.params,
enableAutoSave: !0, enableAutoSave: !0,
silentVerify: !0 silentVerify: !0
...@@ -943,7 +943,7 @@ const ze = M({ ...@@ -943,7 +943,7 @@ const ze = M({
}); });
} }
return o("div", { return o("div", {
class: [a.e("content"), a.is("actived", h === t.active)], class: [a.e("content"), a.is("actived", b === t.active)],
key: m.srfkey key: m.srfkey
}, [c]); }, [c]);
}) })
...@@ -961,23 +961,23 @@ const ze = M({ ...@@ -961,23 +961,23 @@ const ze = M({
setup(s, { setup(s, {
emit: a emit: a
}) { }) {
const t = R("mpicker"), e = s.controller, i = E([]), r = E([]), l = E([]), v = E(!1), d = E(!1), m = E(null), h = E([]), c = E(!0), g = j(() => { const t = R("mpicker"), e = s.controller, i = E([]), r = E([]), l = E([]), v = E(!1), d = E(!1), m = E(null), b = E([]), c = E(!0), y = _(() => {
const D = e.editorParams.followitem; const w = e.editorParams.followitem;
return D ? s.data[D] : ""; return w ? s.data[w] : "";
}); });
T(() => s.value, (D) => { T(() => s.value, (w) => {
i.value = [], l.value = [], D && (l.value = JSON.parse(D), l.value.length > 0 && l.value.forEach((P) => { i.value = [], l.value = [], w && (l.value = JSON.parse(w), l.value.length > 0 && l.value.forEach((P) => {
r.value.findIndex((O) => Object.is(O.srfkey, P.srfkey)) < 0 && (r.value.push(P), h.value.push(P.srfmajortext)), i.value.push(P.srfkey); r.value.findIndex((O) => Object.is(O.srfkey, P.srfkey)) < 0 && (r.value.push(P), b.value.push(P.srfmajortext)), i.value.push(P.srfkey);
})); }));
}, { }, {
immediate: !0, immediate: !0,
deep: !0 deep: !0
}); });
const y = async (D) => { const f = async (w) => {
const P = []; const P = [];
if (D && Array.isArray(D)) if (w && Array.isArray(w))
for (let O = 0; O < D.length; O++) { for (let O = 0; O < w.length; O++) {
const n = D[O], u = { const n = w[O], u = {
srfkey: n[e.keyName] || n.srfkey, srfkey: n[e.keyName] || n.srfkey,
srfmajortext: n[e.textName] || n.srfmajortext srfmajortext: n[e.textName] || n.srfmajortext
}, I = await e.calcFillDataItems(n); }, I = await e.calcFillDataItems(n);
...@@ -989,15 +989,15 @@ const ze = M({ ...@@ -989,15 +989,15 @@ const ze = M({
} }
const x = P.length > 0 ? JSON.stringify(P) : ""; const x = P.length > 0 ? JSON.stringify(P) : "";
a("change", x); a("change", x);
}, w = async () => { }, D = async () => {
let D; let w;
l.value.length && (D = JSON.stringify(l.value)); l.value.length && (w = JSON.stringify(l.value));
const P = await e.openPickUpView(s.data, D); const P = await e.openPickUpView(s.data, w);
P && y(P); P && f(P);
}, f = (D) => { }, p = (w) => {
const P = []; const P = [];
if (D.length > 0) { if (w.length > 0) {
D.forEach((O) => { w.forEach((O) => {
let n = r.value.findIndex((I) => Object.is(I.srfkey, O)), u = null; let n = r.value.findIndex((I) => Object.is(I.srfkey, O)), u = null;
n >= 0 ? u = r.value[n] : (n = l.value.findIndex((I) => Object.is(I.srfkey, O)), n >= 0 && (u = l.value[n])), u && P.push(u); n >= 0 ? u = r.value[n] : (n = l.value.findIndex((I) => Object.is(I.srfkey, O)), n >= 0 && (u = l.value[n])), u && P.push(u);
}); });
...@@ -1005,11 +1005,11 @@ const ze = M({ ...@@ -1005,11 +1005,11 @@ const ze = M({
a("change", x); a("change", x);
} else } else
a("change", ""); a("change", "");
}, p = async (D) => { }, h = async (w) => {
if (e.model.appDataEntity) { if (e.model.appDataEntity) {
d.value = !0; d.value = !0;
try { try {
const P = await e.getServiceData(D, s.data); const P = await e.getServiceData(w, s.data);
d.value = !1, r.value = [], P.data.length > 0 && (r.value = P.data.map((x) => ({ d.value = !1, r.value = [], P.data.length > 0 && (r.value = P.data.map((x) => ({
srfkey: x[e.keyName], srfkey: x[e.keyName],
srfmajortext: x[e.textName] srfmajortext: x[e.textName]
...@@ -1018,18 +1018,18 @@ const ze = M({ ...@@ -1018,18 +1018,18 @@ const ze = M({
d.value = !1; d.value = !1;
} }
} }
}, b = (D) => { }, g = (w) => {
v.value = D, a("operate", D), v.value && p(""); v.value = w, a("operate", w), v.value && h("");
}, N = j(() => l.value.map((D) => D.srfmajortext).join("、")), A = (D) => { }, N = _(() => l.value.map((w) => w.srfmajortext).join("、")), A = (w) => {
r.value = D; r.value = w;
}; };
return T(() => g.value, async (D) => { return T(() => y.value, async (w) => {
if (D) { if (w) {
await p(""); await h("");
const P = r.value.map((x) => x.srfkey); const P = r.value.map((x) => x.srfkey);
if (c.value && (c.value = !1, s.value)) if (c.value && (c.value = !1, s.value))
return; return;
f(P); p(P);
} else } else
r.value = [], a("change", ""); r.value = [], a("change", "");
}, { }, {
...@@ -1041,12 +1041,12 @@ const ze = M({ ...@@ -1041,12 +1041,12 @@ const ze = M({
curValue: i, curValue: i,
loading: d, loading: d,
items: r, items: r,
defaultLabel: h, defaultLabel: b,
valueText: N, valueText: N,
onSearch: p, onSearch: h,
onOpenChange: b, onOpenChange: g,
onSelect: f, onSelect: p,
openPickUpView: w, openPickUpView: D,
setDefaultOptions: A setDefaultOptions: A
}; };
}, },
...@@ -1099,72 +1099,72 @@ const $e = M({ ...@@ -1099,72 +1099,72 @@ const $e = M({
setup(s, { setup(s, {
emit: a emit: a
}) { }) {
const t = R("checkbox"), e = s.controller, i = E([]), r = E([]), l = E(!0), v = ",", d = e.editorParams.emptyClearItems, m = j({ const t = R("checkbox"), e = s.controller, i = E([]), r = E([]), l = E(!0), v = ",", d = e.editorParams.emptyClearItems, m = _({
get() { get() {
var p; var h;
return ((p = s.value) == null ? void 0 : p.split(",")) || []; return ((h = s.value) == null ? void 0 : h.split(",")) || [];
}, },
set(p) { set(h) {
let b = null; let g = null;
const N = []; const N = [];
if (i.value.length > 0 && (i.value.forEach((A) => { if (i.value.length > 0 && (i.value.forEach((A) => {
p.findIndex((P) => Object.is(A.value, P)) !== -1 && N.push(A.value); h.findIndex((P) => Object.is(A.value, P)) !== -1 && N.push(A.value);
}), b = N.join(v)), a("change", b), !b && d) { }), g = N.join(v)), a("change", g), !g && d) {
const A = JSON.parse(d); const A = JSON.parse(d);
for (let D = 0; D < A.length; D++) for (let w = 0; w < A.length; w++)
a("change", A[D].value, A[D].key); a("change", A[w].value, A[w].key);
} }
} }
}), h = async (p) => { }), b = async (h) => {
const { const {
context: b, context: g,
params: N params: N
} = e.handlePublicParams(p, e.context, e.params); } = e.handlePublicParams(h, e.context, e.params);
if (e.editorParams.codeTag) { if (e.editorParams.codeTag) {
let A = []; let A = [];
const D = e.editorParams.codeTag; const w = e.editorParams.codeTag;
return A = await ibiz.codeListService.get(D, b, N), A; return A = await ibiz.codeListService.get(w, g, N), A;
} }
throw new he(e.model.source, "请配置代码表"); throw new he(e.model.source, "请配置代码表");
}, c = (p) => { }, c = (h) => {
m.value = p; m.value = h;
}, g = j(() => { }, y = _(() => {
const p = Array.isArray(m.value) ? m.value : [m.value]; const h = Array.isArray(m.value) ? m.value : [m.value];
return i.value.filter((b) => p.includes(b.srfkey)).map((b) => b.srfmajortext).join("、"); return i.value.filter((g) => h.includes(g.srfkey)).map((g) => g.srfmajortext).join("、");
}), y = async (p) => { }), f = async (h) => {
if (e.model.appDataEntity) if (e.model.appDataEntity)
try { try {
const b = await e.getServiceData(p, s.data); const g = await e.getServiceData(h, s.data);
r.value = [], b.data.length > 0 && (r.value = b.data.map((N) => ({ r.value = [], g.data.length > 0 && (r.value = g.data.map((N) => ({
srfkey: N[e.keyName], srfkey: N[e.keyName],
srfmajortext: N[e.textName] srfmajortext: N[e.textName]
}))); })));
} catch (b) { } catch (g) {
console.error(b); console.error(g);
} }
}, w = j(() => { }, D = _(() => {
const p = e.editorParams.followitem; const h = e.editorParams.followitem;
return p ? s.data[p] : ""; return h ? s.data[h] : "";
}), f = () => { }), p = () => {
const p = []; const h = [];
i.value.forEach((b) => { i.value.forEach((g) => {
r.value.findIndex((A) => A.srfkey === b.value) > -1 && p.push(b.value); r.value.findIndex((A) => A.srfkey === g.value) > -1 && h.push(g.value);
}), c(p); }), c(h);
}; };
return T(() => w.value, async (p, b) => { return T(() => D.value, async (h, g) => {
await h({}).then((N) => { await b({}).then((N) => {
i.value = N; i.value = N;
}), await y(""), !((l.value || p === b) && (l.value = !1, s.value)) && f(); }), await f(""), !((l.value || h === g) && (l.value = !1, s.value)) && p();
}, { }, {
immediate: !0, immediate: !0,
deep: !0 deep: !0
}), { }), {
ns: t, ns: t,
c: e, c: e,
valueText: g, valueText: y,
selectArray: m, selectArray: m,
items: i, items: i,
onSearch: y, onSearch: f,
onSelectArrayChange: c onSelectArrayChange: c
}; };
}, },
...@@ -1364,47 +1364,57 @@ const Ke = M({ ...@@ -1364,47 +1364,57 @@ const Ke = M({
setup(s, { setup(s, {
emit: a emit: a
}) { }) {
const t = R("input-number"), e = s.controller, i = E(-1 / 0), r = E(1 / 0), l = E(""); const t = R("input-number"), e = s.controller, i = E(-1 / 0), r = E(1 / 0), l = E(""), v = E(), d = E(!1);
T(() => s.value, (h, c) => { T(() => s.value, (p, h) => {
if (h !== c) { if (p !== h) {
const g = Ie(h) ? null : Number(h); const g = Ie(p) ? null : Number(p);
l.value = Number.isNaN(g) ? null : g; l.value = Number.isNaN(g) ? null : g;
} }
}, { }, {
immediate: !0 immediate: !0
}); });
let v = !1; let m = !1;
if (e.editorParams && e.editorParams.hiddenupdownbutton) if (e.editorParams && e.editorParams.hiddenupdownbutton)
try { try {
v = JSON.parse(e.editorParams.hiddenupdownbutton); m = JSON.parse(e.editorParams.hiddenupdownbutton);
} catch (h) { } catch (p) {
v = !1; m = !1;
} }
const d = (h) => { const b = (p) => {
a("change", h); a("change", p);
}, m = E(); };
return s.autoFocus && T(m, (h) => { s.autoFocus && T(v, (p) => {
h && h.$el.getElementsByTagName("input")[0].focus(); p && p.$el.getElementsByTagName("input")[0].focus();
}), T(() => s.data, () => { }), T(() => s.data, () => {
s.data && (e.maxValue && (r.value = Number(s.data[e.maxValue])), e.minValue && (i.value = Number(s.data[e.minValue]))); s.data && (e.maxValue && (r.value = Number(s.data[e.maxValue])), e.minValue && (i.value = Number(s.data[e.minValue])));
}, { }, {
immediate: !0, immediate: !0,
deep: !0 deep: !0
}), { });
const c = _(() => e.model.precision === -1 || d.value ? void 0 : e.model.precision), y = () => {
d.value = !1;
}, f = () => {
d.value = !0;
}, D = _(() => e.model.precision && e.model.precision !== -1 ? l.value && Number(l.value).toFixed(e.model.precision) : l.value);
return {
ns: t, ns: t,
c: e, c: e,
currentVal: l, currentVal: l,
handleChange: d, handleChange: b,
inputRef: m, inputRef: v,
hiddenupdownbutton: v, hiddenupdownbutton: m,
minValue: i, minValue: i,
maxValue: r maxValue: r,
handleBluer: y,
handleFocus: f,
precision: c,
readOnlyText: D
}; };
}, },
render(s) { render(s) {
return s("div", { return s("div", {
class: [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.hiddenupdownbutton ? this.ns.m("hiddenupdownbutton") : "", this.controller.model.unitName ? this.ns.m("showUnitName") : ""] class: [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.hiddenupdownbutton ? this.ns.m("hiddenupdownbutton") : "", this.controller.model.unitName ? this.ns.m("showUnitName") : ""]
}, [[this.readonly && this.currentVal, !this.readonly && s("IInputNumber", { }, [[this.readonly && this.readOnlyText, !this.readonly && s("IInputNumber", {
ref: "inputRef", ref: "inputRef",
props: { props: {
min: this.minValue, min: this.minValue,
...@@ -1412,11 +1422,13 @@ const Ke = M({ ...@@ -1412,11 +1422,13 @@ const Ke = M({
...this.c.customProps, ...this.c.customProps,
value: this.currentVal, value: this.currentVal,
placeholder: this.controller.placeHolder, placeholder: this.controller.placeHolder,
precision: this.c.model.precision === -1 ? void 0 : this.c.model.precision, precision: this.precision,
disabled: this.disabled disabled: this.disabled
}, },
on: { on: {
"on-change": this.handleChange "on-change": this.handleChange,
"on-blur": this.handleBluer,
"on-focus": this.handleFocus
} }
}), this.controller.model.unitName && s("i", { }), this.controller.model.unitName && s("i", {
class: this.ns.e("unit"), class: this.ns.e("unit"),
...@@ -1514,17 +1526,17 @@ class Qe extends Ae { ...@@ -1514,17 +1526,17 @@ class Qe extends Ae {
), m = ibiz.resourcePathUtil.calcPaths( ), m = ibiz.resourcePathUtil.calcPaths(
d, d,
v.codeName v.codeName
), h = K(d, m); ), b = K(d, m);
let c = `${h}/${v.deNamePlural}/importtemplate`, g = `${h}/${v.deNamePlural}/importdata2`; let c = `${b}/${v.deNamePlural}/importtemplate`, y = `${b}/${v.deNamePlural}/importdata2`;
const y = a.getPSAppDEDataImport(); const f = a.getPSAppDEDataImport();
y && (c += `?srfimporttag=${y.codeName}`, g += `?srfimporttag=${y.codeName}`); f && (c += `?srfimporttag=${f.codeName}`, y += `?srfimporttag=${f.codeName}`);
const w = ibiz.overlay.createModal( const D = ibiz.overlay.createModal(
"CustomDataImport", "CustomDataImport",
{ {
templateUrl: c, templateUrl: c,
importUrl: g, importUrl: y,
dismiss: (f) => { dismiss: (p) => {
w.dismiss(f); D.dismiss(p);
} }
}, },
{ {
...@@ -1532,7 +1544,7 @@ class Qe extends Ae { ...@@ -1532,7 +1544,7 @@ class Qe extends Ae {
placement: "center" placement: "center"
} }
); );
return w.present(), await w.onWillDismiss(), { return D.present(), await D.onWillDismiss(), {
refresh: !0 refresh: !0
}; };
} }
...@@ -1580,25 +1592,25 @@ class st extends re { ...@@ -1580,25 +1592,25 @@ class st extends re {
d.isFill === !1 && await d.fill(!0); d.isFill === !1 && await d.fill(!0);
const m = new H(d); const m = new H(d);
await m.init(); await m.init();
const { resultContext: h } = await this.handleParams( const { resultContext: b } = await this.handleParams(
a, a,
t, t,
e, e,
i i
), c = ibiz.resourcePathUtil.calcPaths( ), c = ibiz.resourcePathUtil.calcPaths(
h, b,
m.codeName m.codeName
), g = K(h, c); ), y = K(b, c);
let y = `${g}/${m.deNamePlural}/importtemplate`, w = `${g}/${m.deNamePlural}/importdata2`; let f = `${y}/${m.deNamePlural}/importtemplate`, D = `${y}/${m.deNamePlural}/importdata2`;
const f = a.getPSAppDEDataImport(); const p = a.getPSAppDEDataImport();
f && (y += `?srfimporttag=${f.codeName}`, w += `?srfimporttag=${f.codeName}`); p && (f += `?srfimporttag=${p.codeName}`, D += `?srfimporttag=${p.codeName}`);
const p = ibiz.overlay.createModal( const h = ibiz.overlay.createModal(
"DataImport", "DataImport",
{ {
templateUrl: y, templateUrl: f,
importUrl: w, importUrl: D,
dismiss: (b) => { dismiss: (g) => {
p.dismiss(b); h.dismiss(g);
} }
}, },
{ {
...@@ -1606,7 +1618,7 @@ class st extends re { ...@@ -1606,7 +1618,7 @@ class st extends re {
placement: "center" placement: "center"
} }
); );
return p.present(), await p.onWillDismiss(), { return h.present(), await h.onWillDismiss(), {
refresh: !0 refresh: !0
}; };
} }
...@@ -1616,7 +1628,7 @@ class st extends re { ...@@ -1616,7 +1628,7 @@ class st extends re {
if (!d) if (!d)
throw new Error("未配置打开视图"); throw new Error("未配置打开视图");
await d.fill(!0); await d.fill(!0);
const { resultContext: m, resultParams: h } = await this.handleParams( const { resultContext: m, resultParams: b } = await this.handleParams(
a, a,
t, t,
e, e,
...@@ -1625,12 +1637,12 @@ class st extends re { ...@@ -1625,12 +1637,12 @@ class st extends re {
q.TAG, q.TAG,
d, d,
m, m,
h, b,
r r
); );
(c == null ? void 0 : c.ok) === !1 && (l.closeView = !1, l.refresh = !1, l.cancel = !0), c != null && c.ok && c.data && (l.data = c.data); (c == null ? void 0 : c.ok) === !1 && (l.closeView = !1, l.refresh = !1, l.cancel = !0), c != null && c.ok && c.data && (l.data = c.data);
} else if (r) { } else if (r) {
const { neuron: d } = r, h = d.call.getFormController().call.getFormController(), { druipart1: c, druipart2: g, druipart3: y } = h.details; const { neuron: d } = r, b = d.call.getFormController().call.getFormController(), { druipart1: c, druipart2: y, druipart3: f } = b.details;
[ [
{ {
message: "服务履历为空", message: "服务履历为空",
...@@ -1638,20 +1650,20 @@ class st extends re { ...@@ -1638,20 +1650,20 @@ class st extends re {
}, },
{ {
message: "教育经验为空", message: "教育经验为空",
neuron: g neuron: y
}, },
{ {
message: "项目经验为空", message: "项目经验为空",
neuron: y neuron: f
} }
].some((p) => { ].some((h) => {
const b = p.neuron.neuron.call.getGridController(); const g = h.neuron.neuron.call.getGridController();
if (b) { if (g) {
const N = b.call.getGridController(); const N = g.call.getGridController();
if (N && N.items && N.items.length > 0) if (N && N.items && N.items.length > 0)
return !1; return !1;
} }
return ibiz.message.error(`${p.message}`, 1.5, !0), !0; return ibiz.message.error(`${h.message}`, 1.5, !0), !0;
}) || await d.call.wfStart(); }) || await d.call.wfStart();
} }
return l; return l;
...@@ -1707,25 +1719,25 @@ class lt extends re { ...@@ -1707,25 +1719,25 @@ class lt extends re {
d.isFill === !1 && await d.fill(!0); d.isFill === !1 && await d.fill(!0);
const m = new H(d); const m = new H(d);
await m.init(); await m.init();
const { resultContext: h } = await this.handleParams( const { resultContext: b } = await this.handleParams(
a, a,
t, t,
e, e,
i i
), c = ibiz.resourcePathUtil.calcPaths( ), c = ibiz.resourcePathUtil.calcPaths(
h, b,
m.codeName m.codeName
), g = K(h, c); ), y = K(b, c);
let y = `${g}/${m.deNamePlural}/importtemplate`, w = `${g}/${m.deNamePlural}/importdata2`; let f = `${y}/${m.deNamePlural}/importtemplate`, D = `${y}/${m.deNamePlural}/importdata2`;
const f = a.getPSAppDEDataImport(); const p = a.getPSAppDEDataImport();
f && (y += `?srfimporttag=${f.codeName}`, w += `?srfimporttag=${f.codeName}`); p && (f += `?srfimporttag=${p.codeName}`, D += `?srfimporttag=${p.codeName}`);
const p = ibiz.overlay.createModal( const h = ibiz.overlay.createModal(
"DataImport", "DataImport",
{ {
templateUrl: y, templateUrl: f,
importUrl: w, importUrl: D,
dismiss: (b) => { dismiss: (g) => {
p.dismiss(b); h.dismiss(g);
} }
}, },
{ {
...@@ -1733,7 +1745,7 @@ class lt extends re { ...@@ -1733,7 +1745,7 @@ class lt extends re {
placement: "center" placement: "center"
} }
); );
return p.present(), await p.onWillDismiss(), { return h.present(), await h.onWillDismiss(), {
refresh: !0 refresh: !0
}; };
} }
...@@ -1743,7 +1755,7 @@ class lt extends re { ...@@ -1743,7 +1755,7 @@ class lt extends re {
if (!d) if (!d)
throw new Error("未配置打开视图"); throw new Error("未配置打开视图");
await d.fill(!0); await d.fill(!0);
const { resultContext: m, resultParams: h } = await this.handleParams( const { resultContext: m, resultParams: b } = await this.handleParams(
a, a,
t, t,
e, e,
...@@ -1752,7 +1764,7 @@ class lt extends re { ...@@ -1752,7 +1764,7 @@ class lt extends re {
q.TAG, q.TAG,
d, d,
m, m,
h, b,
r r
); );
(c == null ? void 0 : c.ok) === !1 && (l.closeView = !1, l.refresh = !1, l.cancel = !0), c != null && c.ok && c.data && (l.data = c.data); (c == null ? void 0 : c.ok) === !1 && (l.closeView = !1, l.refresh = !1, l.cancel = !0), c != null && c.ok && c.data && (l.data = c.data);
......
...@@ -61,7 +61,7 @@ export const GridFieldEditColumn = defineComponent({ ...@@ -61,7 +61,7 @@ export const GridFieldEditColumn = defineComponent({
const dynamicClass = computed(() => { const dynamicClass = computed(() => {
const state = props.row.columnState[props.controller.model.codeName]; const state = props.row.columnState[props.controller.model.codeName];
if (state) { if (state) {
return state.dynamicClass; return state.dynamicClass || [];
} }
return []; return [];
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册