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

release: 0.0.3

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