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

feat: 更新插件

上级 e410f11e
......@@ -9,8 +9,8 @@ import { ViewMode as q, PluginStaticResource as de, UIActionHandler as ue, Front
import { EditFormController as he, DatePickerEditorController as fe, UploadEditorController as ge } from "@ibiz-template/controller";
import { ControlVO as ve, calcResPath as J } from "@ibiz-template/service";
import U from "dayjs";
import { StringUtil as Ee } from "@ibiz-template/core";
class ye extends he {
import { StringUtil as ye } from "@ibiz-template/core";
class Ee extends he {
constructor() {
super(...arguments);
/**
......@@ -116,14 +116,14 @@ class ye extends he {
[o.toLowerCase()]: this.params.base_version
}), c = Object.assign({}, this.context.clone(), {
[d.toLowerCase()]: this.params.compare_version
}), E = await f.exec("Get", v, this.params), y = await p.exec(
}), y = await f.exec("Get", v, this.params), E = await p.exec(
"Get",
c,
this.params
);
return this.isLoaded = !0, {
baseData: E.data.data,
compareData: y.data.data
baseData: y.data.data,
compareData: E.data.data
};
}
/**
......@@ -172,9 +172,9 @@ const De = Y({
const s = x("form-data-comparison"), {
proxy: i
} = ce(), o = re(i, () => {
const t = new ye(a.modelData, a.context, a.params);
const t = new Ee(a.modelData, a.context, a.params);
return oe(i, "enableAutoSave", t.setEnableAutoSave.bind(t)), t;
}), d = b(!0), f = b(!1), p = b({}), v = b({}), c = b([]), E = [], y = b([]), l = b([]), u = b([]), n = /* @__PURE__ */ new Map(), g = b(0), m = (t) => {
}), d = b(!0), f = b(!1), p = b({}), v = b({}), c = b([]), y = [], E = b([]), l = b([]), u = b([]), n = /* @__PURE__ */ new Map(), g = b(0), m = (t) => {
const r = [];
if (r.push(t), t && t.children) {
const h = [];
......@@ -185,7 +185,7 @@ const De = Y({
}
return r;
}, C = m(a.modelData);
E.push(...C);
y.push(...C);
const w = (t) => {
const r = o.details[t.source.name], h = e("not-supported-editor", {
attrs: {
......@@ -193,7 +193,7 @@ const De = Y({
}
});
return e("div", {
class: [s.e("form-grid-item"), s.is("add", y.value.includes(t.source.name)), s.is("update", u.value.includes(t.source.name)), s.is("delete", l.value.includes(t.source.name))]
class: [s.e("form-grid-item"), s.is("add", E.value.includes(t.source.name)), s.is("update", u.value.includes(t.source.name)), s.is("delete", l.value.includes(t.source.name))]
}, [e("div", {
class: s.em("form-grid-item", "name")
}, [t.source.caption]), e("div", {
......@@ -226,29 +226,29 @@ const De = Y({
}, 500);
});
}, L = (t) => {
const r = E.find((M) => M.id === `${t.source.id}_srfcopy`), h = t.embedView.source.modelPath, P = r == null ? void 0 : r.embedView.source.modelPath, I = o.context.clone(), F = {
const r = y.find((M) => M.id === `${t.source.id}_srfcopy`), h = t.embedView.source.modelPath, P = r == null ? void 0 : r.embedView.source.modelPath, I = o.context.clone(), F = {
base_version: a.params.base_version
}, T = o.context.clone();
Object.assign(T, {
gysrlzy_info: a.params.compare_version,
compare_version: a.params.compare_version
});
const B = {
const R = {
compare_version: a.params.compare_version
}, N = p.value[t.source.userTag], O = v.value[r == null ? void 0 : r.source.userTag];
let _ = !1, R = !1, j = !1;
let _ = !1, B = !1, j = !1;
if (t.source.userTag2) {
const M = JSON.parse(t.source.userTag2), {
comparekey: G,
comparelist: ee
} = M;
N && O && Array.isArray(N) && Array.isArray(O) && (N.length === 0 && O.length !== 0 ? j = !0 : N.length !== 0 && O.length === 0 ? _ = !0 : N.length !== 0 && O.length !== 0 && (N.length !== O.length ? R = !0 : N.some((K) => {
N && O && Array.isArray(N) && Array.isArray(O) && (N.length === 0 && O.length !== 0 ? j = !0 : N.length !== 0 && O.length === 0 ? _ = !0 : N.length !== 0 && O.length !== 0 && (N.length !== O.length ? B = !0 : N.some((K) => {
const H = O.find((S) => K[G] === S[G]);
return H ? ee.some((S) => K[S] !== H[S] ? (R = !0, !0) : !1) : (R = !0, !0);
return H ? ee.some((S) => K[S] !== H[S] ? (B = !0, !0) : !1) : (B = !0, !0);
})));
}
return e("div", {
class: [s.e("druipart"), s.is("add", _), s.is("update", R), s.is("delete", j)]
class: [s.e("druipart"), s.is("add", _), s.is("update", B), s.is("delete", j)]
}, [e("div", {
class: s.em("druipart", "caption")
}, [t.source.caption]), e("div", {
......@@ -256,7 +256,7 @@ const De = Y({
}, [P && e("ViewShell", {
attrs: {
context: T,
params: B,
params: R,
modal: {
mode: q.EMBED
},
......@@ -321,7 +321,7 @@ const De = Y({
class: s.e("form-page")
}, [t.children.map((r) => $(r))]);
if (t.source.detailType === "FORMITEM") {
const r = y.value.includes(t.source.name), h = l.value.includes(t.source.name), P = u.value.includes(t.source.name);
const r = E.value.includes(t.source.name), h = l.value.includes(t.source.name), P = u.value.includes(t.source.name);
return f.value && !r && !h && !P ? null : w(t);
}
if (t.source.detailType === "GROUPPANEL") {
......@@ -361,8 +361,8 @@ const De = Y({
}, Q = (t, r) => {
const h = [], P = [], I = [];
return Object.keys(r).forEach((F) => {
const T = t[F], B = r[F];
o.isFalseyButNotEmpty(T) && !o.isFalseyButNotEmpty(B) && h.push(F), !o.isFalseyButNotEmpty(T) && !o.isFalseyButNotEmpty(B) && o.compareObjectValues(T, B) && P.push(F);
const T = t[F], R = r[F];
o.isFalseyButNotEmpty(T) && !o.isFalseyButNotEmpty(R) && h.push(F), !o.isFalseyButNotEmpty(T) && !o.isFalseyButNotEmpty(R) && o.compareObjectValues(T, R) && P.push(F);
}), Object.keys(t).forEach((F) => {
if (!Object.prototype.hasOwnProperty.call(r, F) || o.isFalseyButNotEmpty(r[F])) {
const T = t[F];
......@@ -382,7 +382,7 @@ const De = Y({
modified: h,
deleted: P
} = Q(v.value, p.value);
y.value = r, u.value = h, l.value = P;
E.value = r, u.value = h, l.value = P;
}, {
immediate: !0
}), {
......@@ -508,9 +508,9 @@ const be = Y({
}), m = document.createElement("a");
m.download = n, m.style.display = "none", m.href = URL.createObjectURL(g), document.body.appendChild(m), m.click(), URL.revokeObjectURL(m.href), document.body.removeChild(m);
}
}, E = () => {
o.value.click();
}, y = () => {
o.value.click();
}, E = () => {
var l;
s("close", {
ok: !1,
......@@ -526,8 +526,8 @@ const be = Y({
ns: i,
curDate: f,
onLinkClick: c,
selectFile: E,
onCancelButtonClick: y,
selectFile: y,
onCancelButtonClick: E,
onFileChange: v,
inputUpLoad: o,
message: d
......@@ -638,13 +638,13 @@ const Ce = Y({
p.value = n;
}
d.editorParams.formatText && (p.value = d.editorParams.formatText.replace("YYYY", "yyyy").replace("DD", "dd"));
const E = b();
const y = b();
z(() => a.value, (n, g) => {
n && n !== g && (E.value = U(n).format(c));
n && n !== g && (y.value = U(n).format(c));
}, {
immediate: !0
});
const y = (n, g) => {
const E = (n, g) => {
if (n) {
const m = U(n.replace(/[年月]/g, "-")).format(c);
s("change", m);
......@@ -661,8 +661,8 @@ const Ce = Y({
editorModel: d,
type: f,
format: p,
formatValue: E,
handleChange: y,
formatValue: y,
handleChange: E,
onOpenChange: l,
inputRef: u,
isTimePicker: v
......@@ -719,10 +719,10 @@ const Z = new de(import.meta.url), Pe = Y({
class: this.ns.b()
}, [e("a", {
attrs: {
download: "网络信息安全承诺书-个人.doc",
download: "网络信息安全承诺书.doc",
href: this.url
}
}, ["网络信息安全承诺书-个人.doc"])]);
}, ["网络信息安全承诺书.doc"])]);
}
});
class we {
......@@ -742,11 +742,11 @@ class Fe extends ue {
i,
o,
d
), E = ibiz.resourcePathUtil.calcPaths(
), y = ibiz.resourcePathUtil.calcPaths(
c,
v.codeName
), y = J(c, E);
let l = `${y}/${v.deNamePlural}/importtemplate`, u = `${y}/${v.deNamePlural}/importdata2`;
), E = J(c, y);
let l = `${E}/${v.deNamePlural}/importtemplate`, u = `${E}/${v.deNamePlural}/importdata2`;
const n = s.getPSAppDEDataImport();
n && (l += `?srfimporttag=${n.codeName}`, u += `?srfimporttag=${n.codeName}`);
const g = ibiz.overlay.createModal(
......@@ -802,25 +802,25 @@ class Ne extends me {
async execAction(s, i, o, d, f) {
const p = {}, { frontProcessType: v } = s;
if (v === "OPENHTMLPAGE") {
const c = Ee.fill(s.htmlPageUrl, i, o == null ? void 0 : o[0]);
const c = ye.fill(s.htmlPageUrl, i, o == null ? void 0 : o[0]);
window.open(c, "_blank");
}
if (v === "DATAIMP") {
const c = s.getPSAppDataEntity();
if (c) {
c.isFill === !1 && await c.fill(!0);
const E = new W(c);
await E.init();
const { resultContext: y } = await this.handleParams(
const y = new W(c);
await y.init();
const { resultContext: E } = await this.handleParams(
s,
i,
o,
d
), l = ibiz.resourcePathUtil.calcPaths(
y,
E.codeName
), u = J(y, l);
let n = `${u}/${E.deNamePlural}/importtemplate`, g = `${u}/${E.deNamePlural}/importdata2`;
E,
y.codeName
), u = J(E, l);
let n = `${u}/${y.deNamePlural}/importtemplate`, g = `${u}/${y.deNamePlural}/importdata2`;
const m = s.getPSAppDEDataImport();
m && (n += `?srfimporttag=${m.codeName}`, g += `?srfimporttag=${m.codeName}`);
const C = ibiz.overlay.createModal(
......@@ -847,7 +847,7 @@ class Ne extends me {
if (!c)
throw new Error("未配置打开视图");
await c.fill(!0);
const { resultContext: E, resultParams: y } = await this.handleParams(
const { resultContext: y, resultParams: E } = await this.handleParams(
s,
i,
o,
......@@ -855,13 +855,13 @@ class Ne extends me {
), l = await ibiz.commands.execute(
pe.TAG,
c,
E,
y,
E,
f
);
(l == null ? void 0 : l.ok) === !1 && (p.closeView = !1, p.refresh = !1, p.cancel = !0), l != null && l.ok && l.data && (p.data = l.data);
} else if (f) {
const { neuron: c } = f, y = c.call.getFormController().call.getFormController(), { druipart1: l, druipart2: u, druipart3: n } = y.details;
const { neuron: c } = f, E = c.call.getFormController().call.getFormController(), { druipart1: l, druipart2: u, druipart3: n } = E.details;
[
{
message: "服务履历为空",
......
!function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(j){l=function(e,t,r){return e[t]=r}}function d(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),s=new A(a||[]);return n(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(j){return{type:"throw",arg:j}}}e.wrap=d;var f={};function h(){}function m(){}function v(){}var y={};l(y,s,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(C([])));b&&b!==t&&r.call(b,s)&&(y=b);var w=v.prototype=h.prototype=Object.create(y);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,s,c){var u=p(e[n],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==a(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,s,c)}),(function(e){o("throw",e,s,c)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return o("throw",e,s,c)}))}c(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return T()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=P(i,r);if(s){if(s===f)continue;return s}}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 c=p(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function P(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,P(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=p(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function C(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:T}}function T(){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"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(d(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(w),l(w,u,"Generator"),l(w,s,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,A.prototype={constructor:A,reset:function(e){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),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function i(e,t,r,n,a,o,i){try{var s=e[o](i),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,c,"next",e)}function c(e){i(o,n,a,s,c,"throw",e)}s(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function l(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function f(e){var t=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(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a(t)?t:String(t)}System.register(["@ibiz-template/model","@ibiz-template/vue-util","vue","qx-util","@ibiz-template/runtime","@ibiz-template/controller","@ibiz-template/service","dayjs","@ibiz-template/core"],(function(e,n){"use strict";var i,u,p,h,v,g,b,w,E,x,O,P,k,D,A,C,T,j,S,_,L,N,I,F,M,R;return{setters:[function(e){i=e.EditFormModel,u=e.AppEntityModel},function(e){p=e.useNamespace,h=e.useControlController,v=e.usePropsWatch,g=e.getDatePickerProps,b=e.getEditorEmits},function(e){w=e.defineComponent,E=e.getCurrentInstance,x=e.ref,O=e.watch,P=e.h,k=e.onMounted},function(e){D=e.createUUID},function(e){A=e.ViewMode,C=e.PluginStaticResource,T=e.UIActionHandler,j=e.FrontUIActionHandler,S=e.OpenAppViewCommand},function(e){_=e.EditFormController,L=e.DatePickerEditorController,N=e.UploadEditorController},function(e){I=e.ControlVO,F=e.calcResPath},function(e){M=e.default},function(e){R=e.StringUtil}],execute:function(){var Y=function(e){d(n,e);var t,r=f(n);function n(){var e;c(this,n);for(var t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];return y(m(e=r.call.apply(r,[this].concat(a))),"baseResData",[]),y(m(e),"compareResData",[]),y(m(e),"oldData",new I),y(m(e),"versionData",[]),y(m(e),"comparisonArr",{}),y(m(e),"gridData",[]),y(m(e),"AllGridData",[]),y(m(e),"removeSameGridData",[]),y(m(e),"AlldruipartData",new Map),y(m(e),"druipartDataSize",0),y(m(e),"newDruipartData",{}),e}return l(n,[{key:"loadGridData",value:(t=s(o().mark((function e(){var t,r,n,a,i,s,c,u,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.startLoading();case 2:return t=this.model.source.M.getPSControlParam.ctrlParams,r=t.BASEENTITY,n=t.COMPAREENTITY,e.next=6,ibiz.entityService.getService(r);case 6:return a=e.sent,e.next=9,ibiz.entityService.getService(n);case 9:return i=e.sent,s=Object.assign({},this.context.clone(),y({},r.toLowerCase(),this.params.base_version)),c=Object.assign({},this.context.clone(),y({},n.toLowerCase(),this.params.compare_version)),e.next=14,a.exec("Get",s,this.params);case 14:return u=e.sent,e.next=17,i.exec("Get",c,this.params);case 17:return l=e.sent,this.isLoaded=!0,e.abrupt("return",{baseData:u.data.data,compareData:l.data.data});case 20:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"isFalseyButNotEmpty",value:function(e){return null==e||"string"==typeof e&&""===e||Array.isArray(e)&&0===e.length||"object"===a(e)&&0===Object.keys(e).length}},{key:"compareObjectValues",value:function(e,t){return JSON.stringify(e)!==JSON.stringify(t)}}]),n}(_),U=w({name:"IBizFormDataComparison",props:{modelData:{type:i,required:!0},context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},enableAutoSave:{type:Boolean,required:!1}},setup:function(e){var n=p("form-data-comparison"),a=E().proxy,i=h(a,(function(){var t=new Y(e.modelData,e.context,e.params);return v(a,"enableAutoSave",t.setEnableAutoSave.bind(t)),t})),c=x(!0),u=x(!1),l=x({}),d=x({}),f=x([]),m=[],y=x([]),g=x([]),b=x([]),w=new Map,k=x(0),C=function e(t){var n=[];if(n.push(t),t&&t.children){var a=[];t.children.forEach((function(t){var n=e(t);a.push.apply(a,r(n))})),n.push.apply(n,a)}return n}(e.modelData);m.push.apply(m,r(C));var T=function(e){var t=i.details[e.source.name],r=P("not-supported-editor",{attrs:{modelData:e.editor}});return P("div",{class:[n.e("form-grid-item"),n.is("add",y.value.includes(e.source.name)),n.is("update",b.value.includes(e.source.name)),n.is("delete",g.value.includes(e.source.name))]},[P("div",{class:n.em("form-grid-item","name")},[e.source.caption]),P("div",{class:n.em("form-grid-item","left")},[t.editorProvider?P(t.editorProvider.formEditor,{props:{value:d.value[e.source.name],data:t.data,controller:t.editor,disabled:t.disabled,readonly:!0}}):r]),P("div",{class:n.em("form-grid-item","right")},[t.editorProvider?P(t.editorProvider.formEditor,{props:{value:l.value[e.source.name],data:t.data,controller:t.editor,disabled:t.disabled,readonly:!0}}):r])])},j=function(e,t){w.set(e.source.id,t),t.evt.on("mounted",(function(){c.value&&i.startLoading(),k.value+=1,t.call.refresh()})),t.evt.on("refreshed",(function(){k.value-=1,setTimeout((function(){c.value&&i.endLoading()}),500)}))},S=function(e){c.value=!1;var t=f.value.findIndex((function(t){return t===e.source.name}));t>-1?f.value.splice(t,1):f.value.push(e.source.name)},_=function(e,t){var r=[],n=[],a=[];return Object.keys(t).forEach((function(a){var o=e[a],s=t[a];i.isFalseyButNotEmpty(o)&&!i.isFalseyButNotEmpty(s)&&r.push(a),i.isFalseyButNotEmpty(o)||i.isFalseyButNotEmpty(s)||!i.compareObjectValues(o,s)||n.push(a)})),Object.keys(e).forEach((function(r){if(!Object.prototype.hasOwnProperty.call(t,r)||i.isFalseyButNotEmpty(t[r])){var n=e[r];i.isFalseyButNotEmpty(n)||a.push(r)}})),{added:r,modified:n,deleted:a}};return O((function(){return e.params}),s(o().mark((function e(){var t,r,n,a,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.loadGridData();case 2:t=e.sent,l.value=t.baseData,d.value=t.compareData,r=_(d.value,l.value),n=r.added,a=r.modified,s=r.deleted,y.value=n,b.value=a,g.value=s;case 9:case"end":return e.stop()}}),e)}))),{immediate:!0}),{ns:n,c:i,switchValue:u,druipartNum:k,renderEditor:T,renderByDetailType:function r(a){if(!a.source.hidden){if("FORMPAGE"===a.source.detailType)return P("div",{class:n.e("form-page")},[a.children.map((function(e){return r(e)}))]);if("FORMITEM"===a.source.detailType){var o=y.value.includes(a.source.name),s=g.value.includes(a.source.name),c=b.value.includes(a.source.name);return!u.value||o||s||c?T(a):null}if("GROUPPANEL"===a.source.detailType){var p=f.value.includes(a.source.name);return P("div",{class:n.b("group")},[P("div",{class:[n.be("group","header"),n.is("hide-caption",!a.source.showCaption)]},[P("div",{class:n.bem("group","header","name")},[P("i-icon",p?{class:n.bem("group","header","icon"),attrs:{type:"ios-arrow-forward",title:"展开"},on:{click:function(){return S(a)}}}:{class:n.bem("group","header","icon"),attrs:{type:"ios-arrow-down",title:"收缩"},on:{click:function(){return S(a)}}}),P("span",{class:n.bem("group","header","name-text")},[a.source.caption||a.source.title])]),P("div",["---"]),P("div",["---"])]),P("div",{class:[n.be("group","content"),n.is("collapse",p)]},[a.children.map((function(e){return r(e)}))])])}return"DRUIPART"!==a.source.detailType||a.source.name.endsWith("_srfcopy")?"MDCTRL"===a.source.detailType?(v={modelData:h=a,controller:i.details[h.source.name]},w=i.providers[h.source.name],E=P(w.component,{props:t({},v),key:h.id}),x=P(w.component,{props:t({},v),key:"compare_".concat(h.id)}),P("div",{class:n.e("mdctrl")},[P("div",{class:n.em("mdctrl","caption")},[h.source.caption]),P("div",{class:n.em("mdctrl","left")},[E]),P("div",{class:n.em("mdctrl","right")},[x])])):null:function(t){var r=m.find((function(e){return e.id==="".concat(t.source.id,"_srfcopy")})),a=t.embedView.source.modelPath,o=null==r?void 0:r.embedView.source.modelPath,s=i.context.clone(),c={base_version:e.params.base_version},u=i.context.clone();Object.assign(u,{gysrlzy_info:e.params.compare_version,compare_version:e.params.compare_version});var p={compare_version:e.params.compare_version},f=l.value[t.source.userTag],h=d.value[null==r?void 0:r.source.userTag],v=!1,y=!1,g=!1;if(t.source.userTag2){var b=JSON.parse(t.source.userTag2),w=b.comparekey,E=b.comparelist;f&&h&&Array.isArray(f)&&Array.isArray(h)&&(0===f.length&&0!==h.length?g=!0:0!==f.length&&0===h.length?v=!0:0!==f.length&&0!==h.length&&(f.length!==h.length?y=!0:f.some((function(e){var t=h.find((function(t){return e[w]===t[w]}));return t?E.some((function(r){return e[r]!==t[r]&&(y=!0,!0)})):(y=!0,!0)}))))}return P("div",{class:[n.e("druipart"),n.is("add",v),n.is("update",y),n.is("delete",g)]},[P("div",{class:n.em("druipart","caption")},[t.source.caption]),P("div",{class:n.em("druipart","left")},[o&&P("ViewShell",{attrs:{context:u,params:p,modal:{mode:A.EMBED},modelPath:o,noLoadDefault:!0,name:null==r?void 0:r.source.id},key:D(),on:{neuronInit:function(e){return j(r,e)}}})]),P("div",{class:n.em("druipart","right")},[a&&P("ViewShell",{attrs:{context:s,params:c,modal:{mode:A.EMBED},modelPath:a,noLoadDefault:!0,name:t.source.id},key:D(),on:{neuronInit:function(e){return j(t,e)}}})])])}(a);var h,v,w,E,x}}}},render:function(){var e=this;return this.c.complete?P("control-layout",{attrs:{modelData:this.c.model}},[P("div",{class:this.ns.b()},[P("div",{class:this.ns.e("top")},[P("div",{class:this.ns.e("top-hidesame-content")},[P("div",{class:this.ns.e("top-hidesame-content-left")},["隐藏相同项 ",P("i-switch",{model:{value:this.switchValue,callback:function(t){e.switchValue=t}}})]),P("div",{class:this.ns.e("top-hidesame-content-right")},[P("div",{class:this.ns.e("top-hidesame-content-right-item")},["新增",P("div",{class:this.ns.e("top-hidesame-content-right-item-add")})]),P("div",{class:this.ns.e("top-hidesame-content-right-item")},["修改",P("div",{class:this.ns.e("top-hidesame-content-right-item-change")})]),P("div",{class:this.ns.e("top-hidesame-content-right-item")},["删除",P("div",{class:this.ns.e("top-hidesame-content-right-item-delete")})])])]),P("div",{class:this.ns.e("top-content")},[P("div",{class:this.ns.em("top-content","attr")},["信息项"]),P("div",{class:[this.ns.em("top-content","left")]},["更新前内容"]),P("div",{class:[this.ns.em("top-content","right")]},["更新后内容"])])]),P("div",{class:this.ns.e("content")},[this.modelData.children.map((function(t){return e.renderByDetailType(t)}))])])]):null}}),z=w({name:"CustomDataImport",props:{templateUrl:{type:String,required:!0},importUrl:{type:String,required:!0},dismiss:{type:Function}},setup:function(e,t){var r=t.emit,n=p("data-import"),a=x(),i=x({state:"ready",message:"",rowError:[]}),c=x(""),u=function(){var t=s(o().mark((function t(r){var n,a,s,u,l,d,p,f,h,m;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new FormData,a=M(c.value).format("YYYY-MM"),n.append("file",r),n.append("ny",a),t.prev=4,t.next=7,ibiz.net.request(e.importUrl,{method:"post",data:n,headers:{"Content-Type":"multipart/form-data"}});case 7:s=t.sent,i.value.state="success",i.value.message="导入成功",u=s.data,l=u.errorinfo,d=u.success,p=u.total,f=p?Number(p):0,h=d?Number(d):0,m=p-d,i.value.message="共计导入数据 ".concat(f," 条,错误[").concat(m,"],成功[").concat(h,"]"),l&&Object.keys(l).length>0&&(i.value.rowError=[],Object.keys(l).forEach((function(e){i.value.rowError.push({index:Number(e)+1,info:l[e].errorInfo})}))),t.next=22;break;case 18:t.prev=18,t.t0=t.catch(4),i.value.state="fail",i.value.message="导入失败!".concat(t.t0.message);case 22:case"end":return t.stop()}}),t,null,[[4,18]])})));return function(e){return t.apply(this,arguments)}}(),l=function(){var t=s(o().mark((function t(){var r,n,a,i,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ibiz.net.request(e.templateUrl,{responseType:"blob"});case 2:200===(r=t.sent).status&&(a=(null===(n=r.headers["content-disposition"].split(";").find((function(e){return-1!==e.indexOf("filename=")})))||void 0===n?void 0:n.slice(9))||"",a=decodeURIComponent(a),i=new Blob([r.data],{type:"application/vnd.ms-excel"}),(s=document.createElement("a")).download=a,s.style.display="none",s.href=URL.createObjectURL(i),document.body.appendChild(s),s.click(),URL.revokeObjectURL(s.href),document.body.removeChild(s));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return k((function(){c.value=M().format("YYYY年MM月")})),{ns:n,curDate:c,onLinkClick:l,selectFile:function(){a.value.click()},onCancelButtonClick:function(){var t;r("close",{ok:!1,data:{}}),null===(t=e.dismiss)||void 0===t||t.call(e,{ok:!1,data:{}})},onFileChange:function(e){var t=e.target;if(t.files){var r=t.files[0];t.value=null,u(r)}},inputUpLoad:a,message:i}},render:function(){var e=this;return P("div",{class:[this.ns.b(),this.ns.is("custom",!0)]},[P("input",{ref:"inputUpLoad",attrs:{type:"file",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},style:"display: none",on:{change:this.onFileChange}}),P("div",{class:this.ns.e("caption")},["导入数据"]),P("div",{class:this.ns.e("date")},[P("span",["导入数据所属月份"]),P("i-datePicker",{attrs:{format:"yyyy年MM月",type:"month",clearable:!1},model:{value:this.curDate,callback:function(t){e.curDate=t}}})]),"ready"===this.message.state?P("div",{class:this.ns.b("upload"),on:{click:this.selectFile}},[P("img",{class:this.ns.be("upload","img"),attrs:{src:"./assets/img/icon-import.svg"}}),P("span",{class:this.ns.be("upload","text")},["单击此区域进行上传"])]):P("div",{class:this.ns.b("message")},[P("div",{class:this.ns.be("message","title")},["导入结果"]),P("div",{class:this.ns.be("message","content")},[this.message.message]),this.message.rowError.length>0&&[P("div",{class:this.ns.be("message","title")},["错误信息"]),P("div",{class:this.ns.be("message","content")},[this.message.rowError.map((function(e){return P("div",["第 ".concat(e.index," 行:").concat(e.info)])}))])]]),P("div",{class:this.ns.e("template-container")},[P("div",{class:this.ns.e("template-description")},["下载导入模版,并按要求填写:"]),P("div",{class:this.ns.e("template-link"),on:{click:this.onLinkClick}},[P("i-icon",{attrs:{type:"ios-link"}}),"数据导入模板文件"])]),P("div",{class:this.ns.e("button-bar")},["ready"!==this.message.state&&P("i-button",{on:{click:this.selectFile}},["重新上传"])])])}}),B=w({name:"YearMonthPicker",props:g(),emits:b(),setup:function(e,t){var r=t.emit,n=p("date-picker"),a=e.controller,o=a.model,i=x("date"),s=x("yyyy-MM-dd"),c=x(!1);switch(o.editorType){case"DATEPICKEREX":case"DATEPICKEREX_NOTIME":i.value="date";break;case"DATEPICKEREX_NODAY":case"DATEPICKEREX_NODAY_NOSECOND":c.value=!0,i.value="time";break;default:i.value="datetime"}var u=a.valueFormat;if(u){"YYYY-MM"===u?i.value="month":"YYYY"===u&&(i.value="year");var l=u.replace("YYYY","yyyy").replace("DD","dd");s.value=l}o.editorParams.formatText&&(s.value=o.editorParams.formatText.replace("YYYY","yyyy").replace("DD","dd"));var d=x();O((function(){return e.value}),(function(e,t){e&&e!==t&&(d.value=M(e).format(u))}),{immediate:!0});var f=x();return e.autoFocus&&O(f,(function(e){e&&e.$el.getElementsByTagName("input")[0].click()})),{ns:n,c:a,editorModel:o,type:i,format:s,formatValue:d,handleChange:function(e,t){if(e){var n=M(e.replace(/[年月]/g,"-")).format(u);r("change",n)}else r("change",e)},onOpenChange:function(e){r("operate",e)},inputRef:f,isTimePicker:c}},render:function(e){return e("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[[this.readonly&&this.formatValue,!this.readonly&&this.isTimePicker&&e("ITimePicker",{ref:"inputRef",props:t(t({},this.c.customProps),{},{value:this.value,type:this.type,format:this.format,placeholder:this.c.placeHolder,disabled:this.disabled,transfer:!0}),on:{"on-change":this.handleChange,"on-open-change":this.onOpenChange}}),!this.readonly&&!this.isTimePicker&&e("ICalendarPicker",{ref:"inputRef",props:t(t({},this.c.customProps),{},{value:this.value,type:this.type,format:this.format,placeholder:this.c.placeHolder,disabled:this.disabled,transfer:!0}),on:{"on-change":this.handleChange,"on-open-change":this.onOpenChange}})]])}}),G=new C(n.meta.url),V=w({name:"DownLoadSafeFile",props:{},setup:function(){return{ns:p("download-safe-file"),url:G.dir("/assets/doc/safe-file.doc")}},render:function(){return P("div",{class:this.ns.b()},[P("a",{attrs:{download:"网络信息安全承诺书-个人.doc",href:this.url}},["网络信息安全承诺书-个人.doc"])])}}),q=l((function e(){c(this,e),y(this,"component","IBizFormDataComparison")})),H=function(e){d(n,e);var t,r=f(n);function n(){return c(this,n),r.apply(this,arguments)}return l(n,[{key:"execAction",value:(t=s(o().mark((function e(t,r,n,a){var i,s,c,l,d,p,f,h,m,v,y;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={},!(s=t.getPSAppDataEntity())){e.next=24;break}if(!1!==s.isFill){e.next=6;break}return e.next=6,s.fill(!0);case 6:return c=new u(s),e.next=9,c.init();case 9:return e.next=11,this.handleParams(t,r,n,a);case 11:return l=e.sent,d=l.resultContext,p=ibiz.resourcePathUtil.calcPaths(d,c.codeName),f=F(d,p),h="".concat(f,"/").concat(c.deNamePlural,"/importtemplate"),m="".concat(f,"/").concat(c.deNamePlural,"/importdata2"),(v=t.getPSAppDEDataImport())&&(h+="?srfimporttag=".concat(v.codeName),m+="?srfimporttag=".concat(v.codeName)),(y=ibiz.overlay.createModal("CustomDataImport",{templateUrl:h,importUrl:m,dismiss:function(e){y.dismiss(e)}},{width:"auto",placement:"center"})).present(),e.next=23,y.onWillDismiss();case 23:return e.abrupt("return",{refresh:!0});case 24:return e.abrupt("return",i);case 25:case"end":return e.stop()}}),e,this)}))),function(e,r,n,a){return t.apply(this,arguments)})}]),n}(T),K=function(){function e(){c(this,e),y(this,"handler",void 0)}var t;return l(e,[{key:"getHandler",value:(t=s(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.handler||(this.handler=new H),e.abrupt("return",this.handler);case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),W=function(){function e(){c(this,e),y(this,"gridEditor","YearMonthPicker"),y(this,"formEditor","YearMonthPicker")}var t;return l(e,[{key:"createController",value:(t=s(o().mark((function e(t,r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new L(t,r),e.next=3,n.init();case 3:return e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,r){return t.apply(this,arguments)})}]),e}(),X=function(){function e(){c(this,e),y(this,"formEditor","DownLoadSafeFile"),y(this,"gridEditor","DownLoadSafeFile")}var t;return l(e,[{key:"createController",value:(t=s(o().mark((function e(t,r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new N(t,r),e.next=3,n.init();case 3:return e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,r){return t.apply(this,arguments)})}]),e}(),J=function(e){d(n,e);var t,r=f(n);function n(){return c(this,n),r.apply(this,arguments)}return l(n,[{key:"execAction",value:(t=s(o().mark((function e(t,r,n,a,i){var s,c,l,d,p,f,h,m,v,y,g,b,w,E,x,O,P,k,D,A,C,T,j,_,L;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s={},"OPENHTMLPAGE"===(c=t.frontProcessType)&&(l=R.fill(t.htmlPageUrl,r,null==n?void 0:n[0]),window.open(l,"_blank")),"DATAIMP"!==c){e.next=27;break}if(!(d=t.getPSAppDataEntity())){e.next=27;break}if(!1!==d.isFill){e.next=9;break}return e.next=9,d.fill(!0);case 9:return p=new u(d),e.next=12,p.init();case 12:return e.next=14,this.handleParams(t,r,n,a);case 14:return f=e.sent,h=f.resultContext,m=ibiz.resourcePathUtil.calcPaths(h,p.codeName),v=F(h,m),y="".concat(v,"/").concat(p.deNamePlural,"/importtemplate"),g="".concat(v,"/").concat(p.deNamePlural,"/importdata2"),(b=t.getPSAppDEDataImport())&&(y+="?srfimporttag=".concat(b.codeName),g+="?srfimporttag=".concat(b.codeName)),(w=ibiz.overlay.createModal("DataImport",{templateUrl:y,importUrl:g,dismiss:function(e){w.dismiss(e)}},{width:"auto",placement:"center"})).present(),e.next=26,w.onWillDismiss();case 26:return e.abrupt("return",{refresh:!0});case 27:if(!["TOP","WIZARD"].includes(c)){e.next=45;break}if(E=t.getFrontPSAppView()){e.next=31;break}throw new Error("未配置打开视图");case 31:return e.next=33,E.fill(!0);case 33:return e.next=35,this.handleParams(t,r,n,a);case 35:return x=e.sent,O=x.resultContext,P=x.resultParams,e.next=40,ibiz.commands.execute(S.TAG,E,O,P,i);case 40:!1===(null==(k=e.sent)?void 0:k.ok)&&(s.closeView=!1,s.refresh=!1,s.cancel=!0),null!=k&&k.ok&&k.data&&(s.data=k.data),e.next=55;break;case 45:if(!i){e.next=55;break}if(D=i.neuron,A=D.call.getFormController(),C=A.call.getFormController(),T=C.details,j=T.druipart1,_=T.druipart2,L=T.druipart3,[{message:"服务履历为空",neuron:j},{message:"教育经验为空",neuron:_},{message:"项目经验为空",neuron:L}].some((function(e){var t=e.neuron.neuron.call.getGridController();if(t){var r=t.call.getGridController();if(r&&r.items&&r.items.length>0)return!1}return ibiz.message.error("".concat(e.message),1.5,!0),!0}))){e.next=55;break}return e.next=55,D.call.wfStart();case 55:return e.abrupt("return",s);case 56:case"end":return e.stop()}}),e,this)}))),function(e,r,n,a,o){return t.apply(this,arguments)})}]),n}(j),$=function(){function e(){c(this,e),y(this,"handler",void 0)}var t;return l(e,[{key:"getHandler",value:(t=s(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.handler||(this.handler=new J),e.abrupt("return",this.handler);case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();e("default",{mateUrl:n.meta.url,install:function(e){G.loadStyle(["/style.css"]),e.component("IBizFormDataComparison",U),e.component("CustomDataImport",z),e.component("YearMonthPicker",B),e.component("DownLoadSafeFile",V),ibiz.register.control.register("EDITFORM_RENDER_FORM_DATA_COMPARISON",new q),ibiz.register.uiAction.register("DEUIACTION_CUSTOM_IMPORT",new K),ibiz.register.editor.register("DATEPICKEREX_NOTIME_YEAR_MONTH_PICKER",new W),ibiz.register.editor.register("FILEUPLOADER_ONE_DOWNLOAD_FILE",new X),ibiz.register.uiAction.register("DEUIACTION_JUDEG_ENABLE_UPDATE",new $)}})}}}))}();
!function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(j){l=function(e,t,r){return e[t]=r}}function d(e,t,r,a){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),s=new A(a||[]);return n(i,"_invoke",{value:O(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(j){return{type:"throw",arg:j}}}e.wrap=d;var f={};function h(){}function m(){}function v(){}var y={};l(y,s,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(C([])));b&&b!==t&&r.call(b,s)&&(y=b);var w=v.prototype=h.prototype=Object.create(y);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,s,c){var u=p(e[n],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==a(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,s,c)}),(function(e){o("throw",e,s,c)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return o("throw",e,s,c)}))}c(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function O(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return T()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=P(i,r);if(s){if(s===f)continue;return s}}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 c=p(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function P(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,P(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=p(n,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,f;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function C(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:T}}function T(){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"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},E(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(d(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(w),l(w,u,"Generator"),l(w,s,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,A.prototype={constructor:A,reset:function(e){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),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function i(e,t,r,n,a,o,i){try{var s=e[o](i),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,c,"next",e)}function c(e){i(o,n,a,s,c,"throw",e)}s(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function l(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function f(e){var t=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(e){return!1}}();return function(){var r,n=v(e);if(t){var a=v(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a(t)?t:String(t)}System.register(["@ibiz-template/model","@ibiz-template/vue-util","vue","qx-util","@ibiz-template/runtime","@ibiz-template/controller","@ibiz-template/service","dayjs","@ibiz-template/core"],(function(e,n){"use strict";var i,u,p,h,v,g,b,w,E,x,O,P,k,D,A,C,T,j,S,_,L,N,I,F,M,R;return{setters:[function(e){i=e.EditFormModel,u=e.AppEntityModel},function(e){p=e.useNamespace,h=e.useControlController,v=e.usePropsWatch,g=e.getDatePickerProps,b=e.getEditorEmits},function(e){w=e.defineComponent,E=e.getCurrentInstance,x=e.ref,O=e.watch,P=e.h,k=e.onMounted},function(e){D=e.createUUID},function(e){A=e.ViewMode,C=e.PluginStaticResource,T=e.UIActionHandler,j=e.FrontUIActionHandler,S=e.OpenAppViewCommand},function(e){_=e.EditFormController,L=e.DatePickerEditorController,N=e.UploadEditorController},function(e){I=e.ControlVO,F=e.calcResPath},function(e){M=e.default},function(e){R=e.StringUtil}],execute:function(){var Y=function(e){d(n,e);var t,r=f(n);function n(){var e;c(this,n);for(var t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];return y(m(e=r.call.apply(r,[this].concat(a))),"baseResData",[]),y(m(e),"compareResData",[]),y(m(e),"oldData",new I),y(m(e),"versionData",[]),y(m(e),"comparisonArr",{}),y(m(e),"gridData",[]),y(m(e),"AllGridData",[]),y(m(e),"removeSameGridData",[]),y(m(e),"AlldruipartData",new Map),y(m(e),"druipartDataSize",0),y(m(e),"newDruipartData",{}),e}return l(n,[{key:"loadGridData",value:(t=s(o().mark((function e(){var t,r,n,a,i,s,c,u,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.startLoading();case 2:return t=this.model.source.M.getPSControlParam.ctrlParams,r=t.BASEENTITY,n=t.COMPAREENTITY,e.next=6,ibiz.entityService.getService(r);case 6:return a=e.sent,e.next=9,ibiz.entityService.getService(n);case 9:return i=e.sent,s=Object.assign({},this.context.clone(),y({},r.toLowerCase(),this.params.base_version)),c=Object.assign({},this.context.clone(),y({},n.toLowerCase(),this.params.compare_version)),e.next=14,a.exec("Get",s,this.params);case 14:return u=e.sent,e.next=17,i.exec("Get",c,this.params);case 17:return l=e.sent,this.isLoaded=!0,e.abrupt("return",{baseData:u.data.data,compareData:l.data.data});case 20:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"isFalseyButNotEmpty",value:function(e){return null==e||"string"==typeof e&&""===e||Array.isArray(e)&&0===e.length||"object"===a(e)&&0===Object.keys(e).length}},{key:"compareObjectValues",value:function(e,t){return JSON.stringify(e)!==JSON.stringify(t)}}]),n}(_),U=w({name:"IBizFormDataComparison",props:{modelData:{type:i,required:!0},context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},enableAutoSave:{type:Boolean,required:!1}},setup:function(e){var n=p("form-data-comparison"),a=E().proxy,i=h(a,(function(){var t=new Y(e.modelData,e.context,e.params);return v(a,"enableAutoSave",t.setEnableAutoSave.bind(t)),t})),c=x(!0),u=x(!1),l=x({}),d=x({}),f=x([]),m=[],y=x([]),g=x([]),b=x([]),w=new Map,k=x(0),C=function e(t){var n=[];if(n.push(t),t&&t.children){var a=[];t.children.forEach((function(t){var n=e(t);a.push.apply(a,r(n))})),n.push.apply(n,a)}return n}(e.modelData);m.push.apply(m,r(C));var T=function(e){var t=i.details[e.source.name],r=P("not-supported-editor",{attrs:{modelData:e.editor}});return P("div",{class:[n.e("form-grid-item"),n.is("add",y.value.includes(e.source.name)),n.is("update",b.value.includes(e.source.name)),n.is("delete",g.value.includes(e.source.name))]},[P("div",{class:n.em("form-grid-item","name")},[e.source.caption]),P("div",{class:n.em("form-grid-item","left")},[t.editorProvider?P(t.editorProvider.formEditor,{props:{value:d.value[e.source.name],data:t.data,controller:t.editor,disabled:t.disabled,readonly:!0}}):r]),P("div",{class:n.em("form-grid-item","right")},[t.editorProvider?P(t.editorProvider.formEditor,{props:{value:l.value[e.source.name],data:t.data,controller:t.editor,disabled:t.disabled,readonly:!0}}):r])])},j=function(e,t){w.set(e.source.id,t),t.evt.on("mounted",(function(){c.value&&i.startLoading(),k.value+=1,t.call.refresh()})),t.evt.on("refreshed",(function(){k.value-=1,setTimeout((function(){c.value&&i.endLoading()}),500)}))},S=function(e){c.value=!1;var t=f.value.findIndex((function(t){return t===e.source.name}));t>-1?f.value.splice(t,1):f.value.push(e.source.name)},_=function(e,t){var r=[],n=[],a=[];return Object.keys(t).forEach((function(a){var o=e[a],s=t[a];i.isFalseyButNotEmpty(o)&&!i.isFalseyButNotEmpty(s)&&r.push(a),i.isFalseyButNotEmpty(o)||i.isFalseyButNotEmpty(s)||!i.compareObjectValues(o,s)||n.push(a)})),Object.keys(e).forEach((function(r){if(!Object.prototype.hasOwnProperty.call(t,r)||i.isFalseyButNotEmpty(t[r])){var n=e[r];i.isFalseyButNotEmpty(n)||a.push(r)}})),{added:r,modified:n,deleted:a}};return O((function(){return e.params}),s(o().mark((function e(){var t,r,n,a,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.loadGridData();case 2:t=e.sent,l.value=t.baseData,d.value=t.compareData,r=_(d.value,l.value),n=r.added,a=r.modified,s=r.deleted,y.value=n,b.value=a,g.value=s;case 9:case"end":return e.stop()}}),e)}))),{immediate:!0}),{ns:n,c:i,switchValue:u,druipartNum:k,renderEditor:T,renderByDetailType:function r(a){if(!a.source.hidden){if("FORMPAGE"===a.source.detailType)return P("div",{class:n.e("form-page")},[a.children.map((function(e){return r(e)}))]);if("FORMITEM"===a.source.detailType){var o=y.value.includes(a.source.name),s=g.value.includes(a.source.name),c=b.value.includes(a.source.name);return!u.value||o||s||c?T(a):null}if("GROUPPANEL"===a.source.detailType){var p=f.value.includes(a.source.name);return P("div",{class:n.b("group")},[P("div",{class:[n.be("group","header"),n.is("hide-caption",!a.source.showCaption)]},[P("div",{class:n.bem("group","header","name")},[P("i-icon",p?{class:n.bem("group","header","icon"),attrs:{type:"ios-arrow-forward",title:"展开"},on:{click:function(){return S(a)}}}:{class:n.bem("group","header","icon"),attrs:{type:"ios-arrow-down",title:"收缩"},on:{click:function(){return S(a)}}}),P("span",{class:n.bem("group","header","name-text")},[a.source.caption||a.source.title])]),P("div",["---"]),P("div",["---"])]),P("div",{class:[n.be("group","content"),n.is("collapse",p)]},[a.children.map((function(e){return r(e)}))])])}return"DRUIPART"!==a.source.detailType||a.source.name.endsWith("_srfcopy")?"MDCTRL"===a.source.detailType?(v={modelData:h=a,controller:i.details[h.source.name]},w=i.providers[h.source.name],E=P(w.component,{props:t({},v),key:h.id}),x=P(w.component,{props:t({},v),key:"compare_".concat(h.id)}),P("div",{class:n.e("mdctrl")},[P("div",{class:n.em("mdctrl","caption")},[h.source.caption]),P("div",{class:n.em("mdctrl","left")},[E]),P("div",{class:n.em("mdctrl","right")},[x])])):null:function(t){var r=m.find((function(e){return e.id==="".concat(t.source.id,"_srfcopy")})),a=t.embedView.source.modelPath,o=null==r?void 0:r.embedView.source.modelPath,s=i.context.clone(),c={base_version:e.params.base_version},u=i.context.clone();Object.assign(u,{gysrlzy_info:e.params.compare_version,compare_version:e.params.compare_version});var p={compare_version:e.params.compare_version},f=l.value[t.source.userTag],h=d.value[null==r?void 0:r.source.userTag],v=!1,y=!1,g=!1;if(t.source.userTag2){var b=JSON.parse(t.source.userTag2),w=b.comparekey,E=b.comparelist;f&&h&&Array.isArray(f)&&Array.isArray(h)&&(0===f.length&&0!==h.length?g=!0:0!==f.length&&0===h.length?v=!0:0!==f.length&&0!==h.length&&(f.length!==h.length?y=!0:f.some((function(e){var t=h.find((function(t){return e[w]===t[w]}));return t?E.some((function(r){return e[r]!==t[r]&&(y=!0,!0)})):(y=!0,!0)}))))}return P("div",{class:[n.e("druipart"),n.is("add",v),n.is("update",y),n.is("delete",g)]},[P("div",{class:n.em("druipart","caption")},[t.source.caption]),P("div",{class:n.em("druipart","left")},[o&&P("ViewShell",{attrs:{context:u,params:p,modal:{mode:A.EMBED},modelPath:o,noLoadDefault:!0,name:null==r?void 0:r.source.id},key:D(),on:{neuronInit:function(e){return j(r,e)}}})]),P("div",{class:n.em("druipart","right")},[a&&P("ViewShell",{attrs:{context:s,params:c,modal:{mode:A.EMBED},modelPath:a,noLoadDefault:!0,name:t.source.id},key:D(),on:{neuronInit:function(e){return j(t,e)}}})])])}(a);var h,v,w,E,x}}}},render:function(){var e=this;return this.c.complete?P("control-layout",{attrs:{modelData:this.c.model}},[P("div",{class:this.ns.b()},[P("div",{class:this.ns.e("top")},[P("div",{class:this.ns.e("top-hidesame-content")},[P("div",{class:this.ns.e("top-hidesame-content-left")},["隐藏相同项 ",P("i-switch",{model:{value:this.switchValue,callback:function(t){e.switchValue=t}}})]),P("div",{class:this.ns.e("top-hidesame-content-right")},[P("div",{class:this.ns.e("top-hidesame-content-right-item")},["新增",P("div",{class:this.ns.e("top-hidesame-content-right-item-add")})]),P("div",{class:this.ns.e("top-hidesame-content-right-item")},["修改",P("div",{class:this.ns.e("top-hidesame-content-right-item-change")})]),P("div",{class:this.ns.e("top-hidesame-content-right-item")},["删除",P("div",{class:this.ns.e("top-hidesame-content-right-item-delete")})])])]),P("div",{class:this.ns.e("top-content")},[P("div",{class:this.ns.em("top-content","attr")},["信息项"]),P("div",{class:[this.ns.em("top-content","left")]},["更新前内容"]),P("div",{class:[this.ns.em("top-content","right")]},["更新后内容"])])]),P("div",{class:this.ns.e("content")},[this.modelData.children.map((function(t){return e.renderByDetailType(t)}))])])]):null}}),z=w({name:"CustomDataImport",props:{templateUrl:{type:String,required:!0},importUrl:{type:String,required:!0},dismiss:{type:Function}},setup:function(e,t){var r=t.emit,n=p("data-import"),a=x(),i=x({state:"ready",message:"",rowError:[]}),c=x(""),u=function(){var t=s(o().mark((function t(r){var n,a,s,u,l,d,p,f,h,m;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new FormData,a=M(c.value).format("YYYY-MM"),n.append("file",r),n.append("ny",a),t.prev=4,t.next=7,ibiz.net.request(e.importUrl,{method:"post",data:n,headers:{"Content-Type":"multipart/form-data"}});case 7:s=t.sent,i.value.state="success",i.value.message="导入成功",u=s.data,l=u.errorinfo,d=u.success,p=u.total,f=p?Number(p):0,h=d?Number(d):0,m=p-d,i.value.message="共计导入数据 ".concat(f," 条,错误[").concat(m,"],成功[").concat(h,"]"),l&&Object.keys(l).length>0&&(i.value.rowError=[],Object.keys(l).forEach((function(e){i.value.rowError.push({index:Number(e)+1,info:l[e].errorInfo})}))),t.next=22;break;case 18:t.prev=18,t.t0=t.catch(4),i.value.state="fail",i.value.message="导入失败!".concat(t.t0.message);case 22:case"end":return t.stop()}}),t,null,[[4,18]])})));return function(e){return t.apply(this,arguments)}}(),l=function(){var t=s(o().mark((function t(){var r,n,a,i,s;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ibiz.net.request(e.templateUrl,{responseType:"blob"});case 2:200===(r=t.sent).status&&(a=(null===(n=r.headers["content-disposition"].split(";").find((function(e){return-1!==e.indexOf("filename=")})))||void 0===n?void 0:n.slice(9))||"",a=decodeURIComponent(a),i=new Blob([r.data],{type:"application/vnd.ms-excel"}),(s=document.createElement("a")).download=a,s.style.display="none",s.href=URL.createObjectURL(i),document.body.appendChild(s),s.click(),URL.revokeObjectURL(s.href),document.body.removeChild(s));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return k((function(){c.value=M().format("YYYY年MM月")})),{ns:n,curDate:c,onLinkClick:l,selectFile:function(){a.value.click()},onCancelButtonClick:function(){var t;r("close",{ok:!1,data:{}}),null===(t=e.dismiss)||void 0===t||t.call(e,{ok:!1,data:{}})},onFileChange:function(e){var t=e.target;if(t.files){var r=t.files[0];t.value=null,u(r)}},inputUpLoad:a,message:i}},render:function(){var e=this;return P("div",{class:[this.ns.b(),this.ns.is("custom",!0)]},[P("input",{ref:"inputUpLoad",attrs:{type:"file",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},style:"display: none",on:{change:this.onFileChange}}),P("div",{class:this.ns.e("caption")},["导入数据"]),P("div",{class:this.ns.e("date")},[P("span",["导入数据所属月份"]),P("i-datePicker",{attrs:{format:"yyyy年MM月",type:"month",clearable:!1},model:{value:this.curDate,callback:function(t){e.curDate=t}}})]),"ready"===this.message.state?P("div",{class:this.ns.b("upload"),on:{click:this.selectFile}},[P("img",{class:this.ns.be("upload","img"),attrs:{src:"./assets/img/icon-import.svg"}}),P("span",{class:this.ns.be("upload","text")},["单击此区域进行上传"])]):P("div",{class:this.ns.b("message")},[P("div",{class:this.ns.be("message","title")},["导入结果"]),P("div",{class:this.ns.be("message","content")},[this.message.message]),this.message.rowError.length>0&&[P("div",{class:this.ns.be("message","title")},["错误信息"]),P("div",{class:this.ns.be("message","content")},[this.message.rowError.map((function(e){return P("div",["第 ".concat(e.index," 行:").concat(e.info)])}))])]]),P("div",{class:this.ns.e("template-container")},[P("div",{class:this.ns.e("template-description")},["下载导入模版,并按要求填写:"]),P("div",{class:this.ns.e("template-link"),on:{click:this.onLinkClick}},[P("i-icon",{attrs:{type:"ios-link"}}),"数据导入模板文件"])]),P("div",{class:this.ns.e("button-bar")},["ready"!==this.message.state&&P("i-button",{on:{click:this.selectFile}},["重新上传"])])])}}),B=w({name:"YearMonthPicker",props:g(),emits:b(),setup:function(e,t){var r=t.emit,n=p("date-picker"),a=e.controller,o=a.model,i=x("date"),s=x("yyyy-MM-dd"),c=x(!1);switch(o.editorType){case"DATEPICKEREX":case"DATEPICKEREX_NOTIME":i.value="date";break;case"DATEPICKEREX_NODAY":case"DATEPICKEREX_NODAY_NOSECOND":c.value=!0,i.value="time";break;default:i.value="datetime"}var u=a.valueFormat;if(u){"YYYY-MM"===u?i.value="month":"YYYY"===u&&(i.value="year");var l=u.replace("YYYY","yyyy").replace("DD","dd");s.value=l}o.editorParams.formatText&&(s.value=o.editorParams.formatText.replace("YYYY","yyyy").replace("DD","dd"));var d=x();O((function(){return e.value}),(function(e,t){e&&e!==t&&(d.value=M(e).format(u))}),{immediate:!0});var f=x();return e.autoFocus&&O(f,(function(e){e&&e.$el.getElementsByTagName("input")[0].click()})),{ns:n,c:a,editorModel:o,type:i,format:s,formatValue:d,handleChange:function(e,t){if(e){var n=M(e.replace(/[年月]/g,"-")).format(u);r("change",n)}else r("change",e)},onOpenChange:function(e){r("operate",e)},inputRef:f,isTimePicker:c}},render:function(e){return e("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[[this.readonly&&this.formatValue,!this.readonly&&this.isTimePicker&&e("ITimePicker",{ref:"inputRef",props:t(t({},this.c.customProps),{},{value:this.value,type:this.type,format:this.format,placeholder:this.c.placeHolder,disabled:this.disabled,transfer:!0}),on:{"on-change":this.handleChange,"on-open-change":this.onOpenChange}}),!this.readonly&&!this.isTimePicker&&e("ICalendarPicker",{ref:"inputRef",props:t(t({},this.c.customProps),{},{value:this.value,type:this.type,format:this.format,placeholder:this.c.placeHolder,disabled:this.disabled,transfer:!0}),on:{"on-change":this.handleChange,"on-open-change":this.onOpenChange}})]])}}),G=new C(n.meta.url),V=w({name:"DownLoadSafeFile",props:{},setup:function(){return{ns:p("download-safe-file"),url:G.dir("/assets/doc/safe-file.doc")}},render:function(){return P("div",{class:this.ns.b()},[P("a",{attrs:{download:"网络信息安全承诺书.doc",href:this.url}},["网络信息安全承诺书.doc"])])}}),q=l((function e(){c(this,e),y(this,"component","IBizFormDataComparison")})),H=function(e){d(n,e);var t,r=f(n);function n(){return c(this,n),r.apply(this,arguments)}return l(n,[{key:"execAction",value:(t=s(o().mark((function e(t,r,n,a){var i,s,c,l,d,p,f,h,m,v,y;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={},!(s=t.getPSAppDataEntity())){e.next=24;break}if(!1!==s.isFill){e.next=6;break}return e.next=6,s.fill(!0);case 6:return c=new u(s),e.next=9,c.init();case 9:return e.next=11,this.handleParams(t,r,n,a);case 11:return l=e.sent,d=l.resultContext,p=ibiz.resourcePathUtil.calcPaths(d,c.codeName),f=F(d,p),h="".concat(f,"/").concat(c.deNamePlural,"/importtemplate"),m="".concat(f,"/").concat(c.deNamePlural,"/importdata2"),(v=t.getPSAppDEDataImport())&&(h+="?srfimporttag=".concat(v.codeName),m+="?srfimporttag=".concat(v.codeName)),(y=ibiz.overlay.createModal("CustomDataImport",{templateUrl:h,importUrl:m,dismiss:function(e){y.dismiss(e)}},{width:"auto",placement:"center"})).present(),e.next=23,y.onWillDismiss();case 23:return e.abrupt("return",{refresh:!0});case 24:return e.abrupt("return",i);case 25:case"end":return e.stop()}}),e,this)}))),function(e,r,n,a){return t.apply(this,arguments)})}]),n}(T),K=function(){function e(){c(this,e),y(this,"handler",void 0)}var t;return l(e,[{key:"getHandler",value:(t=s(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.handler||(this.handler=new H),e.abrupt("return",this.handler);case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),W=function(){function e(){c(this,e),y(this,"gridEditor","YearMonthPicker"),y(this,"formEditor","YearMonthPicker")}var t;return l(e,[{key:"createController",value:(t=s(o().mark((function e(t,r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new L(t,r),e.next=3,n.init();case 3:return e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,r){return t.apply(this,arguments)})}]),e}(),X=function(){function e(){c(this,e),y(this,"formEditor","DownLoadSafeFile"),y(this,"gridEditor","DownLoadSafeFile")}var t;return l(e,[{key:"createController",value:(t=s(o().mark((function e(t,r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new N(t,r),e.next=3,n.init();case 3:return e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,r){return t.apply(this,arguments)})}]),e}(),J=function(e){d(n,e);var t,r=f(n);function n(){return c(this,n),r.apply(this,arguments)}return l(n,[{key:"execAction",value:(t=s(o().mark((function e(t,r,n,a,i){var s,c,l,d,p,f,h,m,v,y,g,b,w,E,x,O,P,k,D,A,C,T,j,_,L;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s={},"OPENHTMLPAGE"===(c=t.frontProcessType)&&(l=R.fill(t.htmlPageUrl,r,null==n?void 0:n[0]),window.open(l,"_blank")),"DATAIMP"!==c){e.next=27;break}if(!(d=t.getPSAppDataEntity())){e.next=27;break}if(!1!==d.isFill){e.next=9;break}return e.next=9,d.fill(!0);case 9:return p=new u(d),e.next=12,p.init();case 12:return e.next=14,this.handleParams(t,r,n,a);case 14:return f=e.sent,h=f.resultContext,m=ibiz.resourcePathUtil.calcPaths(h,p.codeName),v=F(h,m),y="".concat(v,"/").concat(p.deNamePlural,"/importtemplate"),g="".concat(v,"/").concat(p.deNamePlural,"/importdata2"),(b=t.getPSAppDEDataImport())&&(y+="?srfimporttag=".concat(b.codeName),g+="?srfimporttag=".concat(b.codeName)),(w=ibiz.overlay.createModal("DataImport",{templateUrl:y,importUrl:g,dismiss:function(e){w.dismiss(e)}},{width:"auto",placement:"center"})).present(),e.next=26,w.onWillDismiss();case 26:return e.abrupt("return",{refresh:!0});case 27:if(!["TOP","WIZARD"].includes(c)){e.next=45;break}if(E=t.getFrontPSAppView()){e.next=31;break}throw new Error("未配置打开视图");case 31:return e.next=33,E.fill(!0);case 33:return e.next=35,this.handleParams(t,r,n,a);case 35:return x=e.sent,O=x.resultContext,P=x.resultParams,e.next=40,ibiz.commands.execute(S.TAG,E,O,P,i);case 40:!1===(null==(k=e.sent)?void 0:k.ok)&&(s.closeView=!1,s.refresh=!1,s.cancel=!0),null!=k&&k.ok&&k.data&&(s.data=k.data),e.next=55;break;case 45:if(!i){e.next=55;break}if(D=i.neuron,A=D.call.getFormController(),C=A.call.getFormController(),T=C.details,j=T.druipart1,_=T.druipart2,L=T.druipart3,[{message:"服务履历为空",neuron:j},{message:"教育经验为空",neuron:_},{message:"项目经验为空",neuron:L}].some((function(e){var t=e.neuron.neuron.call.getGridController();if(t){var r=t.call.getGridController();if(r&&r.items&&r.items.length>0)return!1}return ibiz.message.error("".concat(e.message),1.5,!0),!0}))){e.next=55;break}return e.next=55,D.call.wfStart();case 55:return e.abrupt("return",s);case 56:case"end":return e.stop()}}),e,this)}))),function(e,r,n,a,o){return t.apply(this,arguments)})}]),n}(j),$=function(){function e(){c(this,e),y(this,"handler",void 0)}var t;return l(e,[{key:"getHandler",value:(t=s(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.handler||(this.handler=new J),e.abrupt("return",this.handler);case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();e("default",{mateUrl:n.meta.url,install:function(e){G.loadStyle(["/style.css"]),e.component("IBizFormDataComparison",U),e.component("CustomDataImport",z),e.component("YearMonthPicker",B),e.component("DownLoadSafeFile",V),ibiz.register.control.register("EDITFORM_RENDER_FORM_DATA_COMPARISON",new q),ibiz.register.uiAction.register("DEUIACTION_CUSTOM_IMPORT",new K),ibiz.register.editor.register("DATEPICKEREX_NOTIME_YEAR_MONTH_PICKER",new W),ibiz.register.editor.register("FILEUPLOADER_ONE_DOWNLOAD_FILE",new X),ibiz.register.uiAction.register("DEUIACTION_JUDEG_ENABLE_UPDATE",new $)}})}}}))}();
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册