提交 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
}; };
!function(){function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(N){l=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),c=new S(o||[]);return n(a,"_invoke",{value:j(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=f;var d={};function h(){}function m(){}function v(){}var y={};l(y,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(_([])));g&&g!==e&&r.call(g,c)&&(y=g);var w=v.prototype=h.prototype=Object.create(y);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function i(n,a,c,s){var u=p(t[n],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return i("throw",t,c,s)}))}s(u.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=p(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function _(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return m.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:m,configurable:!0}),m.displayName=l(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(E.prototype),l(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(w),l(w,u,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=_,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),D(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;D(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function c(t){a(i,n,o,c,s,"next",t)}function s(t){a(i,n,o,c,s,"throw",t)}c(void 0)}))}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y(n.key),n)}}function l(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function v(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}System.register(["@ibiz-template/model","@ibiz-template/vue-util","vue","qx-util","@ibiz-template/runtime","@ibiz-template/controller","@ibiz-template/service"],(function(t,n){"use strict";var a,u,d,m,y,b,g,w,O,E,j,x,P;return{setters:[function(t){a=t.EditFormModel},function(t){u=t.useNamespace,d=t.useControlController,m=t.usePropsWatch},function(t){y=t.defineComponent,b=t.getCurrentInstance,g=t.ref,w=t.watch,O=t.h},function(t){E=t.createUUID},function(t){j=t.ViewMode},function(t){x=t.EditFormController},function(t){P=t.ControlVO}],execute:function(){var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(n,t);var e,r=p(n);function n(){var t;s(this,n);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return v(h(t=r.call.apply(r,[this].concat(o))),"baseResData",[]),v(h(t),"compareResData",[]),v(h(t),"oldData",new P),v(h(t),"versionData",[]),v(h(t),"comparisonArr",{}),v(h(t),"gridData",[]),v(h(t),"AllGridData",[]),v(h(t),"removeSameGridData",[]),v(h(t),"AlldruipartData",new Map),v(h(t),"druipartDataSize",0),v(h(t),"newDruipartData",{}),t}return l(n,[{key:"loadGridData",value:(e=c(i().mark((function t(){var e,r,n,o,a,c,s,u,l;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.startLoading();case 2:return e=this.model.source.M.getPSControlParam.ctrlParams,r=e.BASEENTITY,n=e.COMPAREENTITY,t.next=6,ibiz.entityService.getService(r);case 6:return o=t.sent,t.next=9,ibiz.entityService.getService(n);case 9:return a=t.sent,c=Object.assign({},this.context.clone(),v({},r.toLowerCase(),this.params.base_version)),s=Object.assign({},this.context.clone(),v({},n.toLowerCase(),this.params.compare_version)),t.next=14,o.exec("Get",c,this.params);case 14:return u=t.sent,t.next=17,a.exec("Get",s,this.params);case 17:return l=t.sent,this.isLoaded=!0,t.abrupt("return",{baseData:u.data.data,compareData:l.data.data});case 20:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"isFalseyButNotEmpty",value:function(t){return null==t||"string"==typeof t&&""===t||Array.isArray(t)&&0===t.length||"object"===o(t)&&0===Object.keys(t).length}},{key:"compareObjectValues",value:function(t,e){return JSON.stringify(t)!==JSON.stringify(e)}}]),n}(x),S=y({name:"IBizFormDataComparison",props:{modelData:{type:a,required:!0},context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},enableAutoSave:{type:Boolean,required:!1}},setup:function(t){var n=u("form-data-comparison"),o=b().proxy,a=d(o,(function(){var e=new D(t.modelData,t.context,t.params);return m(o,"enableAutoSave",e.setEnableAutoSave.bind(e)),e})),s=g(!1),l=g({}),f=g({}),p=g([]),h=[],v=g([]),y=g([]),x=g([]),P=new Map,S=g(0),_=function t(e){var n=[];if(n.push(e),e&&e.children){var o=[];e.children.forEach((function(e){var n=t(e);o.push.apply(o,r(n))})),n.push.apply(n,o)}return n}(t.modelData);h.push.apply(h,r(_));var L=function(t){var e=a.details[t.source.name],r=O("not-supported-editor",{attrs:{modelData:t.editor}});return O("div",{class:[n.e("form-grid-item"),n.is("add",v.value.includes(t.source.name)),n.is("update",x.value.includes(t.source.name)),n.is("delete",y.value.includes(t.source.name))]},[O("div",{class:n.em("form-grid-item","name")},[t.source.caption]),O("div",{class:n.em("form-grid-item","left")},[e.editorProvider?O(e.editorProvider.formEditor,{props:{value:f.value[t.source.name],data:e.data,controller:e.editor,disabled:e.disabled,readonly:!0}}):r]),O("div",{class:n.em("form-grid-item","right")},[e.editorProvider?O(e.editorProvider.formEditor,{props:{value:l.value[t.source.name],data:e.data,controller:e.editor,disabled:e.disabled,readonly:!0}}):r])])},N=function(t,e){P.set(t.source.id,e),e.evt.on("mounted",(function(){a.startLoading(),S.value+=1,e.call.refresh()})),e.evt.on("refreshed",(function(){S.value-=1,setTimeout((function(){a.endLoading()}),500)}))},T=function(t){var e=p.value.findIndex((function(e){return e===t.source.name}));e>-1?p.value.splice(e,1):p.value.push(t.source.name)},F=function(t,e){var r=[],n=[],o=[];return Object.keys(e).forEach((function(o){var i=t[o],c=e[o];a.isFalseyButNotEmpty(i)&&!a.isFalseyButNotEmpty(c)&&r.push(o),a.isFalseyButNotEmpty(i)||a.isFalseyButNotEmpty(c)||!a.compareObjectValues(i,c)||n.push(o)})),Object.keys(t).forEach((function(r){if(!Object.prototype.hasOwnProperty.call(e,r)||a.isFalseyButNotEmpty(e[r])){var n=t[r];a.isFalseyButNotEmpty(n)||o.push(r)}})),{added:r,modified:n,deleted:o}};return w((function(){return t.params}),c(i().mark((function t(){var e,r,n,o,c;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.loadGridData();case 2:e=t.sent,l.value=e.baseData,f.value=e.compareData,r=F(f.value,l.value),n=r.added,o=r.modified,c=r.deleted,v.value=n,x.value=o,y.value=c;case 9:case"end":return t.stop()}}),t)}))),{immediate:!0}),{ns:n,c:a,switchValue:s,druipartNum:S,renderEditor:L,renderByDetailType:function r(o){if(!o.source.hidden){if("FORMPAGE"===o.source.detailType)return O("div",{class:n.e("form-page")},[o.children.map((function(t){return r(t)}))]);if("FORMITEM"===o.source.detailType){var i=v.value.includes(o.source.name),c=y.value.includes(o.source.name),u=x.value.includes(o.source.name);return!s.value||i||c||u?L(o):null}if("GROUPPANEL"===o.source.detailType){var d=p.value.includes(o.source.name);return O("div",{class:n.b("group")},[O("div",{class:[n.be("group","header"),n.is("hide-caption",!o.source.showCaption)]},[O("div",{class:n.bem("group","header","name")},[O("i-icon",d?{class:n.bem("group","header","icon"),attrs:{type:"ios-arrow-forward",title:"展开"},on:{click:function(){return T(o)}}}:{class:n.bem("group","header","icon"),attrs:{type:"ios-arrow-down",title:"收缩"},on:{click:function(){return T(o)}}}),O("span",{class:n.bem("group","header","name-text")},[o.source.caption||o.source.title])]),O("div",["---"]),O("div",["---"])]),O("div",{class:[n.be("group","content"),n.is("collapse",d)]},[o.children.map((function(t){return r(t)}))])])}return"DRUIPART"!==o.source.detailType||o.source.name.endsWith("_srfcopy")?"MDCTRL"===o.source.detailType?(b={modelData:m=o,controller:a.details[m.source.name]},g=a.providers[m.source.name],w=O(g.component,{props:e({},b),key:m.id}),P=O(g.component,{props:e({},b),key:"compare_".concat(m.id)}),O("div",{class:n.e("mdctrl")},[O("div",{class:n.em("mdctrl","caption")},[m.source.caption]),O("div",{class:n.em("mdctrl","left")},[w]),O("div",{class:n.em("mdctrl","right")},[P])])):null:function(e){var r=h.find((function(t){return t.id==="".concat(e.source.id,"_srfcopy")})),o=e.embedView.source.modelPath,i=null==r?void 0:r.embedView.source.modelPath,c=a.context.clone(),s={base_version:t.params.base_version},u=a.context.clone();Object.assign(u,{gysrlzy_info:t.params.compare_version,compare_version:t.params.compare_version});var p={compare_version:t.params.compare_version},d=l.value[e.source.userTag],m=f.value[null==r?void 0:r.source.userTag],v=!1,y=!1,b=!1;return a.isFalseyButNotEmpty(d)&&!a.isFalseyButNotEmpty(m)?v=!0:!a.isFalseyButNotEmpty(d)&&a.isFalseyButNotEmpty(m)?b=!0:a.isFalseyButNotEmpty(d)||a.isFalseyButNotEmpty(m)||!a.compareObjectValues(d,m)||(y=!0),O("div",{class:[n.e("druipart"),n.is("add",v),n.is("update",y),n.is("delete",b)]},[O("div",{class:n.em("druipart","caption")},[e.source.caption]),O("div",{class:n.em("druipart","left")},[i&&O("ViewShell",{attrs:{context:u,params:p,modal:{mode:j.EMBED},modelPath:i,noLoadDefault:!0},key:E(),on:{neuronInit:function(t){return N(r,t)}}})]),O("div",{class:n.em("druipart","right")},[o&&O("ViewShell",{attrs:{context:c,params:s,modal:{mode:j.EMBED},modelPath:o,noLoadDefault:!0},key:E(),on:{neuronInit:function(t){return N(e,t)}}})])])}(o);var m,b,g,w,P}}}},render:function(){var t=this;return this.c.complete?O("control-layout",{attrs:{modelData:this.c.model}},[O("div",{class:this.ns.b()},[O("div",{class:this.ns.e("top")},[O("div",{class:this.ns.e("top-hidesame-content")},[O("div",{class:this.ns.e("top-hidesame-content-left")},["隐藏相同项 ",O("i-switch",{model:{value:this.switchValue,callback:function(e){t.switchValue=e}}})]),O("div",{class:this.ns.e("top-hidesame-content-right")},[O("div",{class:this.ns.e("top-hidesame-content-right-item")},["新增",O("div",{class:this.ns.e("top-hidesame-content-right-item-add")})]),O("div",{class:this.ns.e("top-hidesame-content-right-item")},["修改",O("div",{class:this.ns.e("top-hidesame-content-right-item-change")})]),O("div",{class:this.ns.e("top-hidesame-content-right-item")},["删除",O("div",{class:this.ns.e("top-hidesame-content-right-item-delete")})])])]),O("div",{class:this.ns.e("top-content")},[O("div",{class:this.ns.em("top-content","attr")},["信息项"]),O("div",{class:[this.ns.em("top-content","left")]},["更新前内容"]),O("div",{class:[this.ns.em("top-content","right")]},["更新后内容"])])]),O("div",{class:this.ns.e("content")},[this.modelData.children.map((function(e){return t.renderByDetailType(e)}))])])]):null}}),_=l((function t(){s(this,t),v(this,"component","IBizFormDataComparison")}));t("default",{mateUrl:n.meta.url,install:function(t){t.component("IBizFormDataComparison",S),ibiz.register.control.register("EDITFORM_RENDER_FORM_DATA_COMPARISON",new _)}})}}}))}(); !function(){function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(N){l=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),c=new S(o||[]);return n(a,"_invoke",{value:j(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=f;var d={};function h(){}function m(){}function v(){}var y={};l(y,c,(function(){return this}));var b=Object.getPrototypeOf,g=b&&b(b(_([])));g&&g!==e&&r.call(g,c)&&(y=g);var w=v.prototype=h.prototype=Object.create(y);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function i(n,a,c,s){var u=p(t[n],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return i("throw",t,c,s)}))}s(u.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=p(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function _(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return m.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:m,configurable:!0}),m.displayName=l(v,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(E.prototype),l(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(w),l(w,u,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=_,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(D),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),D(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;D(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function c(t){a(i,n,o,c,s,"next",t)}function s(t){a(i,n,o,c,s,"throw",t)}c(void 0)}))}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y(n.key),n)}}function l(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function v(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}System.register(["@ibiz-template/model","@ibiz-template/vue-util","vue","qx-util","@ibiz-template/runtime","@ibiz-template/controller","@ibiz-template/service"],(function(t,n){"use strict";var a,u,d,m,y,b,g,w,O,E,j,x,P,D;return{setters:[function(t){a=t.EditFormModel},function(t){u=t.useNamespace,d=t.useControlController,m=t.usePropsWatch},function(t){y=t.defineComponent,b=t.getCurrentInstance,g=t.ref,w=t.watch,O=t.h},function(t){E=t.createUUID},function(t){j=t.ViewMode,x=t.PluginStaticResource},function(t){P=t.EditFormController},function(t){D=t.ControlVO}],execute:function(){var S=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(n,t);var e,r=p(n);function n(){var t;s(this,n);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return v(h(t=r.call.apply(r,[this].concat(o))),"baseResData",[]),v(h(t),"compareResData",[]),v(h(t),"oldData",new D),v(h(t),"versionData",[]),v(h(t),"comparisonArr",{}),v(h(t),"gridData",[]),v(h(t),"AllGridData",[]),v(h(t),"removeSameGridData",[]),v(h(t),"AlldruipartData",new Map),v(h(t),"druipartDataSize",0),v(h(t),"newDruipartData",{}),t}return l(n,[{key:"loadGridData",value:(e=c(i().mark((function t(){var e,r,n,o,a,c,s,u,l;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.startLoading();case 2:return e=this.model.source.M.getPSControlParam.ctrlParams,r=e.BASEENTITY,n=e.COMPAREENTITY,t.next=6,ibiz.entityService.getService(r);case 6:return o=t.sent,t.next=9,ibiz.entityService.getService(n);case 9:return a=t.sent,c=Object.assign({},this.context.clone(),v({},r.toLowerCase(),this.params.base_version)),s=Object.assign({},this.context.clone(),v({},n.toLowerCase(),this.params.compare_version)),t.next=14,o.exec("Get",c,this.params);case 14:return u=t.sent,t.next=17,a.exec("Get",s,this.params);case 17:return l=t.sent,this.isLoaded=!0,t.abrupt("return",{baseData:u.data.data,compareData:l.data.data});case 20:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"isFalseyButNotEmpty",value:function(t){return null==t||"string"==typeof t&&""===t||Array.isArray(t)&&0===t.length||"object"===o(t)&&0===Object.keys(t).length}},{key:"compareObjectValues",value:function(t,e){return JSON.stringify(t)!==JSON.stringify(e)}}]),n}(P),_=y({name:"IBizFormDataComparison",props:{modelData:{type:a,required:!0},context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},enableAutoSave:{type:Boolean,required:!1}},setup:function(t){var n=u("form-data-comparison"),o=b().proxy,a=d(o,(function(){var e=new S(t.modelData,t.context,t.params);return m(o,"enableAutoSave",e.setEnableAutoSave.bind(e)),e})),s=g(!1),l=g({}),f=g({}),p=g([]),h=[],v=g([]),y=g([]),x=g([]),P=new Map,D=g(0),_=function t(e){var n=[];if(n.push(e),e&&e.children){var o=[];e.children.forEach((function(e){var n=t(e);o.push.apply(o,r(n))})),n.push.apply(n,o)}return n}(t.modelData);h.push.apply(h,r(_));var L=function(t){var e=a.details[t.source.name],r=O("not-supported-editor",{attrs:{modelData:t.editor}});return O("div",{class:[n.e("form-grid-item"),n.is("add",v.value.includes(t.source.name)),n.is("update",x.value.includes(t.source.name)),n.is("delete",y.value.includes(t.source.name))]},[O("div",{class:n.em("form-grid-item","name")},[t.source.caption]),O("div",{class:n.em("form-grid-item","left")},[e.editorProvider?O(e.editorProvider.formEditor,{props:{value:f.value[t.source.name],data:e.data,controller:e.editor,disabled:e.disabled,readonly:!0}}):r]),O("div",{class:n.em("form-grid-item","right")},[e.editorProvider?O(e.editorProvider.formEditor,{props:{value:l.value[t.source.name],data:e.data,controller:e.editor,disabled:e.disabled,readonly:!0}}):r])])},N=function(t,e){P.set(t.source.id,e),e.evt.on("mounted",(function(){a.startLoading(),D.value+=1,e.call.refresh()})),e.evt.on("refreshed",(function(){D.value-=1,setTimeout((function(){a.endLoading()}),500)}))},T=function(t){var e=p.value.findIndex((function(e){return e===t.source.name}));e>-1?p.value.splice(e,1):p.value.push(t.source.name)},F=function(t,e){var r=[],n=[],o=[];return Object.keys(e).forEach((function(o){var i=t[o],c=e[o];a.isFalseyButNotEmpty(i)&&!a.isFalseyButNotEmpty(c)&&r.push(o),a.isFalseyButNotEmpty(i)||a.isFalseyButNotEmpty(c)||!a.compareObjectValues(i,c)||n.push(o)})),Object.keys(t).forEach((function(r){if(!Object.prototype.hasOwnProperty.call(e,r)||a.isFalseyButNotEmpty(e[r])){var n=t[r];a.isFalseyButNotEmpty(n)||o.push(r)}})),{added:r,modified:n,deleted:o}};return w((function(){return t.params}),c(i().mark((function t(){var e,r,n,o,c;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.loadGridData();case 2:e=t.sent,l.value=e.baseData,f.value=e.compareData,r=F(f.value,l.value),n=r.added,o=r.modified,c=r.deleted,v.value=n,x.value=o,y.value=c;case 9:case"end":return t.stop()}}),t)}))),{immediate:!0}),{ns:n,c:a,switchValue:s,druipartNum:D,renderEditor:L,renderByDetailType:function r(o){if(!o.source.hidden){if("FORMPAGE"===o.source.detailType)return O("div",{class:n.e("form-page")},[o.children.map((function(t){return r(t)}))]);if("FORMITEM"===o.source.detailType){var i=v.value.includes(o.source.name),c=y.value.includes(o.source.name),u=x.value.includes(o.source.name);return!s.value||i||c||u?L(o):null}if("GROUPPANEL"===o.source.detailType){var d=p.value.includes(o.source.name);return O("div",{class:n.b("group")},[O("div",{class:[n.be("group","header"),n.is("hide-caption",!o.source.showCaption)]},[O("div",{class:n.bem("group","header","name")},[O("i-icon",d?{class:n.bem("group","header","icon"),attrs:{type:"ios-arrow-forward",title:"展开"},on:{click:function(){return T(o)}}}:{class:n.bem("group","header","icon"),attrs:{type:"ios-arrow-down",title:"收缩"},on:{click:function(){return T(o)}}}),O("span",{class:n.bem("group","header","name-text")},[o.source.caption||o.source.title])]),O("div",["---"]),O("div",["---"])]),O("div",{class:[n.be("group","content"),n.is("collapse",d)]},[o.children.map((function(t){return r(t)}))])])}return"DRUIPART"!==o.source.detailType||o.source.name.endsWith("_srfcopy")?"MDCTRL"===o.source.detailType?(b={modelData:m=o,controller:a.details[m.source.name]},g=a.providers[m.source.name],w=O(g.component,{props:e({},b),key:m.id}),P=O(g.component,{props:e({},b),key:"compare_".concat(m.id)}),O("div",{class:n.e("mdctrl")},[O("div",{class:n.em("mdctrl","caption")},[m.source.caption]),O("div",{class:n.em("mdctrl","left")},[w]),O("div",{class:n.em("mdctrl","right")},[P])])):null:function(e){var r=h.find((function(t){return t.id==="".concat(e.source.id,"_srfcopy")})),o=e.embedView.source.modelPath,i=null==r?void 0:r.embedView.source.modelPath,c=a.context.clone(),s={base_version:t.params.base_version},u=a.context.clone();Object.assign(u,{gysrlzy_info:t.params.compare_version,compare_version:t.params.compare_version});var p={compare_version:t.params.compare_version},d=l.value[e.source.userTag],m=f.value[null==r?void 0:r.source.userTag],v=!1,y=!1,b=!1;return a.isFalseyButNotEmpty(d)&&!a.isFalseyButNotEmpty(m)?v=!0:!a.isFalseyButNotEmpty(d)&&a.isFalseyButNotEmpty(m)?b=!0:a.isFalseyButNotEmpty(d)||a.isFalseyButNotEmpty(m)||!a.compareObjectValues(d,m)||(y=!0),O("div",{class:[n.e("druipart"),n.is("add",v),n.is("update",y),n.is("delete",b)]},[O("div",{class:n.em("druipart","caption")},[e.source.caption]),O("div",{class:n.em("druipart","left")},[i&&O("ViewShell",{attrs:{context:u,params:p,modal:{mode:j.EMBED},modelPath:i,noLoadDefault:!0},key:E(),on:{neuronInit:function(t){return N(r,t)}}})]),O("div",{class:n.em("druipart","right")},[o&&O("ViewShell",{attrs:{context:c,params:s,modal:{mode:j.EMBED},modelPath:o,noLoadDefault:!0},key:E(),on:{neuronInit:function(t){return N(e,t)}}})])])}(o);var m,b,g,w,P}}}},render:function(){var t=this;return this.c.complete?O("control-layout",{attrs:{modelData:this.c.model}},[O("div",{class:this.ns.b()},[O("div",{class:this.ns.e("top")},[O("div",{class:this.ns.e("top-hidesame-content")},[O("div",{class:this.ns.e("top-hidesame-content-left")},["隐藏相同项 ",O("i-switch",{model:{value:this.switchValue,callback:function(e){t.switchValue=e}}})]),O("div",{class:this.ns.e("top-hidesame-content-right")},[O("div",{class:this.ns.e("top-hidesame-content-right-item")},["新增",O("div",{class:this.ns.e("top-hidesame-content-right-item-add")})]),O("div",{class:this.ns.e("top-hidesame-content-right-item")},["修改",O("div",{class:this.ns.e("top-hidesame-content-right-item-change")})]),O("div",{class:this.ns.e("top-hidesame-content-right-item")},["删除",O("div",{class:this.ns.e("top-hidesame-content-right-item-delete")})])])]),O("div",{class:this.ns.e("top-content")},[O("div",{class:this.ns.em("top-content","attr")},["信息项"]),O("div",{class:[this.ns.em("top-content","left")]},["更新前内容"]),O("div",{class:[this.ns.em("top-content","right")]},["更新后内容"])])]),O("div",{class:this.ns.e("content")},[this.modelData.children.map((function(e){return t.renderByDetailType(e)}))])])]):null}}),L=l((function t(){s(this,t),v(this,"component","IBizFormDataComparison")})),N=new x(n.meta.url);t("default",{mateUrl:n.meta.url,install:function(t){N.loadStyle(["/style.css"]),t.component("IBizFormDataComparison",_),ibiz.register.control.register("EDITFORM_RENDER_FORM_DATA_COMPARISON",new L)}})}}}))}();
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册