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