提交 4a689cfa 编写于 作者: zhangpingchuan's avatar zhangpingchuan

release: 0.0.3

上级 73570670
{
"name": "vite-project",
"private": true,
"version": "0.0.2",
"version": "0.0.3",
"type": "module",
"scripts": {
"dev": "vite",
......
......@@ -4,11 +4,11 @@ var d = (r, a, i) => (q(r, typeof a != "symbol" ? a + "" : a, i), i);
import { EditFormModel as J } from "@ibiz-template/model";
import { useNamespace as W, useControlController as Y, usePropsWatch as _ } from "@ibiz-template/vue-util";
import { defineComponent as $, getCurrentInstance as H, ref as p, watch as K, h as s } from "vue";
import { createUUID as V } from "qx-util";
import { ViewMode as R } from "@ibiz-template/runtime";
import { EditFormController as Q } from "@ibiz-template/controller";
import { ControlVO as X } from "@ibiz-template/service";
class Z extends Q {
import { createUUID as R } from "qx-util";
import { ViewMode as V, PluginStaticResource as Q } from "@ibiz-template/runtime";
import { EditFormController as X } from "@ibiz-template/controller";
import { ControlVO as Z } from "@ibiz-template/service";
class ee extends X {
constructor() {
super(...arguments);
/**
......@@ -36,7 +36,7 @@ class Z extends Q {
* @type {IData}
* @memberof FormController
*/
d(this, "oldData", new X());
d(this, "oldData", new Z());
/**
* version数据
*
......@@ -112,16 +112,16 @@ class Z extends Q {
await this.startLoading();
const i = this.model.source.M.getPSControlParam.ctrlParams, { BASEENTITY: o, COMPAREENTITY: y } = i, h = await ibiz.entityService.getService(o), v = await ibiz.entityService.getService(y), f = Object.assign({}, this.context.clone(), {
[o.toLowerCase()]: this.params.base_version
}), F = Object.assign({}, this.context.clone(), {
}), w = Object.assign({}, this.context.clone(), {
[y.toLowerCase()]: this.params.compare_version
}), D = await h.exec("Get", f, this.params), b = await v.exec(
}), D = await h.exec("Get", f, this.params), g = await v.exec(
"Get",
F,
w,
this.params
);
return this.isLoaded = !0, {
baseData: D.data.data,
compareData: b.data.data
compareData: g.data.data
};
}
/**
......@@ -146,7 +146,7 @@ class Z extends Q {
return JSON.stringify(i) !== JSON.stringify(o);
}
}
const ee = $({
const te = $({
name: "IBizFormDataComparison",
props: {
modelData: {
......@@ -170,9 +170,9 @@ const ee = $({
const a = W("form-data-comparison"), {
proxy: i
} = H(), o = Y(i, () => {
const e = new Z(r.modelData, r.context, r.params);
const e = new ee(r.modelData, r.context, r.params);
return _(i, "enableAutoSave", e.setEnableAutoSave.bind(e)), e;
}), y = p(!1), h = p({}), v = p({}), f = p([]), F = [], D = p([]), b = p([]), B = p([]), L = /* @__PURE__ */ new Map(), P = p(0), I = (e) => {
}), y = p(!1), h = p({}), v = p({}), f = p([]), w = [], D = p([]), g = p([]), B = p([]), L = /* @__PURE__ */ new Map(), P = p(0), I = (e) => {
const t = [];
if (t.push(e), e && e.children) {
const n = [];
......@@ -183,7 +183,7 @@ const ee = $({
}
return t;
}, j = I(r.modelData);
F.push(...j);
w.push(...j);
const x = (e) => {
const t = o.details[e.source.name], n = s("not-supported-editor", {
attrs: {
......@@ -191,7 +191,7 @@ const ee = $({
}
});
return s("div", {
class: [a.e("form-grid-item"), a.is("add", D.value.includes(e.source.name)), a.is("update", B.value.includes(e.source.name)), a.is("delete", b.value.includes(e.source.name))]
class: [a.e("form-grid-item"), a.is("add", D.value.includes(e.source.name)), a.is("update", B.value.includes(e.source.name)), a.is("delete", g.value.includes(e.source.name))]
}, [s("div", {
class: a.em("form-grid-item", "name")
}, [e.source.caption]), s("div", {
......@@ -224,19 +224,19 @@ const ee = $({
}, 500);
});
}, z = (e) => {
const t = F.find((E) => E.id === `${e.source.id}_srfcopy`), n = e.embedView.source.modelPath, c = t == null ? void 0 : t.embedView.source.modelPath, u = o.context.clone(), l = {
const t = w.find((E) => E.id === `${e.source.id}_srfcopy`), n = e.embedView.source.modelPath, c = t == null ? void 0 : t.embedView.source.modelPath, u = o.context.clone(), l = {
base_version: r.params.base_version
}, m = o.context.clone();
Object.assign(m, {
gysrlzy_info: r.params.compare_version,
compare_version: r.params.compare_version
});
const g = {
const b = {
compare_version: r.params.compare_version
}, w = h.value[e.source.userTag], C = v.value[t == null ? void 0 : t.source.userTag];
let M = !1, S = !1, A = !1;
return o.isFalseyButNotEmpty(w) && !o.isFalseyButNotEmpty(C) ? M = !0 : !o.isFalseyButNotEmpty(w) && o.isFalseyButNotEmpty(C) ? A = !0 : !o.isFalseyButNotEmpty(w) && !o.isFalseyButNotEmpty(C) && o.compareObjectValues(w, C) && (S = !0), s("div", {
class: [a.e("druipart"), a.is("add", M), a.is("update", S), a.is("delete", A)]
}, F = h.value[e.source.userTag], C = v.value[t == null ? void 0 : t.source.userTag];
let T = !1, M = !1, A = !1;
return o.isFalseyButNotEmpty(F) && !o.isFalseyButNotEmpty(C) ? T = !0 : !o.isFalseyButNotEmpty(F) && o.isFalseyButNotEmpty(C) ? A = !0 : !o.isFalseyButNotEmpty(F) && !o.isFalseyButNotEmpty(C) && o.compareObjectValues(F, C) && (M = !0), s("div", {
class: [a.e("druipart"), a.is("add", T), a.is("update", M), a.is("delete", A)]
}, [s("div", {
class: a.em("druipart", "caption")
}, [e.source.caption]), s("div", {
......@@ -244,14 +244,14 @@ const ee = $({
}, [c && s("ViewShell", {
attrs: {
context: m,
params: g,
params: b,
modal: {
mode: R.EMBED
mode: V.EMBED
},
modelPath: c,
noLoadDefault: !0
},
key: V(),
key: R(),
on: {
neuronInit: (E) => O(t, E)
}
......@@ -262,12 +262,12 @@ const ee = $({
context: u,
params: l,
modal: {
mode: R.EMBED
mode: V.EMBED
},
modelPath: n,
noLoadDefault: !0
},
key: V(),
key: R(),
on: {
neuronInit: (E) => O(e, E)
}
......@@ -296,7 +296,7 @@ const ee = $({
}, [c]), s("div", {
class: a.em("mdctrl", "right")
}, [u])]);
}, T = (e) => {
}, S = (e) => {
const t = f.value.findIndex((n) => n === e.source.name);
t > -1 ? f.value.splice(t, 1) : f.value.push(e.source.name);
}, N = (e) => {
......@@ -306,7 +306,7 @@ const ee = $({
class: a.e("form-page")
}, [e.children.map((t) => N(t))]);
if (e.source.detailType === "FORMITEM") {
const t = D.value.includes(e.source.name), n = b.value.includes(e.source.name), c = B.value.includes(e.source.name);
const t = D.value.includes(e.source.name), n = g.value.includes(e.source.name), c = B.value.includes(e.source.name);
return y.value && !t && !n && !c ? null : x(e);
}
if (e.source.detailType === "GROUPPANEL") {
......@@ -324,7 +324,7 @@ const ee = $({
title: "展开"
},
on: {
click: () => T(e)
click: () => S(e)
}
}) : s("i-icon", {
class: a.bem("group", "header", "icon"),
......@@ -333,7 +333,7 @@ const ee = $({
title: "收缩"
},
on: {
click: () => T(e)
click: () => S(e)
}
}), s("span", {
class: a.bem("group", "header", "name-text")
......@@ -346,8 +346,8 @@ const ee = $({
}, U = (e, t) => {
const n = [], c = [], u = [];
return Object.keys(t).forEach((l) => {
const m = e[l], g = t[l];
o.isFalseyButNotEmpty(m) && !o.isFalseyButNotEmpty(g) && n.push(l), !o.isFalseyButNotEmpty(m) && !o.isFalseyButNotEmpty(g) && o.compareObjectValues(m, g) && c.push(l);
const m = e[l], b = t[l];
o.isFalseyButNotEmpty(m) && !o.isFalseyButNotEmpty(b) && n.push(l), !o.isFalseyButNotEmpty(m) && !o.isFalseyButNotEmpty(b) && o.compareObjectValues(m, b) && c.push(l);
}), Object.keys(e).forEach((l) => {
if (!Object.prototype.hasOwnProperty.call(t, l) || o.isFalseyButNotEmpty(t[l])) {
const m = e[l];
......@@ -367,7 +367,7 @@ const ee = $({
modified: n,
deleted: c
} = U(v.value, h.value);
D.value = t, B.value = n, b.value = c;
D.value = t, B.value = n, g.value = c;
}, {
immediate: !0
}), {
......@@ -426,20 +426,20 @@ const ee = $({
}, [this.modelData.children.map((r) => this.renderByDetailType(r))])])]) : null;
}
});
class te {
class se {
constructor() {
d(this, "component", "IBizFormDataComparison");
}
}
const le = {
const ae = new Q(import.meta.url), me = {
mateUrl: import.meta.url,
install(r) {
r.component("IBizFormDataComparison", ee), ibiz.register.control.register(
ae.loadStyle(["/style.css"]), r.component("IBizFormDataComparison", te), ibiz.register.control.register(
"EDITFORM_RENDER_FORM_DATA_COMPARISON",
new te()
new se()
);
}
};
export {
le as default
me as default
};
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册