提交 ab5d26f9 编写于 作者: jlj05024111@163.com's avatar jlj05024111@163.com

feat: 更新插件包sy-cxfh-web

上级 e390e5d3
var A = Object.defineProperty;
var E = (e, i, n) => i in e ? A(e, i, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[i] = n;
var P = (e, i, n) => (E(e, typeof i != "symbol" ? i + "" : i, n), n);
var E = (e, i, o) => i in e ? A(e, i, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[i] = o;
var P = (e, i, o) => (E(e, typeof i != "symbol" ? i + "" : i, o), o);
import { PluginStaticResource as O } from "@ibiz-template/runtime";
import { GridModel as I } from "@ibiz-template/model";
import { useNamespace as S, useControlController as M, usePropsWatch as U } from "@ibiz-template/vue-util";
......@@ -13,16 +13,16 @@ class B {
}
}
function z(e, i) {
var o;
const n = [];
var n;
const o = [];
e.source.columnType === "GROUPGRIDCOLUMN" && e.children.forEach((s) => {
n.push(z(s, i));
o.push(z(s, i));
});
const t = {
title: e.title,
width: e.source.widthUnit === "STAR" ? void 0 : e.width,
minWidth: e.width,
align: ((o = e.source.align) == null ? void 0 : o.toLowerCase()) || "center",
align: ((n = e.source.align) == null ? void 0 : n.toLowerCase()) || "center",
slot: e.codeName,
key: e.codeName,
fieldName: e.deFieldName,
......@@ -35,14 +35,14 @@ function z(e, i) {
tree: e.id === "pfzbname",
className: e.id === "pfzbname" ? "pfzbname" : ""
};
return n.length > 0 && Object.assign(t, { children: n }), t;
return o.length > 0 && Object.assign(t, { children: o }), t;
}
function _(e) {
const i = e.model, n = [], t = i.columns.map((o) => z(o, e));
return i.children.forEach((o) => {
const s = t.find((r) => r.key === o.codeName);
s && o.id !== "lb" && n.push(s);
}), e.singleSelect || n.splice(0, 0, { type: "selection", width: 60 }), n;
const i = e.model, o = [], t = i.columns.map((n) => z(n, e));
return i.children.forEach((n) => {
const s = t.find((r) => r.key === n.codeName);
s && n.id !== "lb" && o.push(s);
}), e.singleSelect || o.splice(0, 0, { type: "selection", width: 60 }), o;
}
function V(e) {
const i = w([]);
......@@ -63,14 +63,14 @@ function V(e) {
}
function W(e) {
const i = (r) => e.items.find((a) => a.srfkey === r.srfkey);
function n(r) {
function o(r) {
const a = i(r);
e.singleSelect && e.onSelectionChange([a]), e.onRowClick(a);
}
function t(r) {
e.onDbRowClick(i(r));
}
function o(r) {
function n(r) {
if (!e.singleSelect) {
const a = [];
r.forEach((d) => {
......@@ -83,19 +83,19 @@ function W(e) {
const { column: a, order: d } = r, f = d === "asc" || d === "desc" ? d : void 0;
e.setSort(a.fieldName, f), e.load();
}
return { onRowClick: n, onDbRowClick: t, onSelectionChange: o, onSortChange: s };
return { onRowClick: o, onDbRowClick: t, onSelectionChange: n, onSortChange: s };
}
function J(e) {
function i(o) {
!o || o === e.curPage || (e.curPage = o, e.load());
function i(n) {
!n || n === e.curPage || (e.curPage = n, e.load());
}
function n(o) {
!o || o === e.size || (e.size = o, e.curPage === 1 && e.load());
function o(n) {
!n || n === e.size || (e.size = n, e.curPage === 1 && e.load());
}
function t() {
e.curPage = 1, e.load();
}
return { onPageChange: i, onPageSizeChange: n, onPageReset: t };
return { onPageChange: i, onPageSizeChange: o, onPageReset: t };
}
const K = G({
name: "AppGridPagination",
......@@ -114,10 +114,10 @@ const K = G({
}
},
setup(e) {
const i = S("grid-page"), n = b(() => (e.curPage - 1) * e.size + 1), t = b(() => e.curPage * e.size);
const i = S("grid-page"), o = b(() => (e.curPage - 1) * e.size + 1), t = b(() => e.curPage * e.size);
return {
ns: i,
start: n,
start: o,
end: t
};
},
......@@ -180,15 +180,15 @@ class Q extends $ {
* @author lxm
* @date 2022-08-19 14:08:50
*/
async afterLoad(n) {
async afterLoad(o) {
return await Promise.allSettled(
Object.values(this.fieldColumns).map(async (t) => {
await t.loadCodeList();
})
), this.rows = n.map((t) => {
const o = new j(t, this);
return this.gridStateNotify(o, F.LOAD), o;
}), this.handleGroup(n), n;
), this.rows = o.map((t) => {
const n = new j(t, this);
return this.gridStateNotify(n, F.LOAD), n;
}), this.handleGroup(o), o;
}
/**
* 处理分组数据
......@@ -197,24 +197,24 @@ class Q extends $ {
* @author: zhujiamin
* @Date: 2023-10-09 14:03:17
*/
handleGroup(n) {
handleGroup(o) {
const t = /* @__PURE__ */ new Map();
n.forEach((o) => {
const s = o.lb;
t.has(s) || t.set(s, []), t.has(s) && t.get(s).push(o);
}), this.groups = [], t.forEach((o, s) => {
o.forEach((n) => {
const s = n.lb;
t.has(s) || t.set(s, []), t.has(s) && t.get(s).push(n);
}), this.groups = [], t.forEach((n, s) => {
this.groups.push({
caption: `${s}`,
key: s,
children: o
children: n
});
});
}
}
function X(e, i, n, t = {}) {
function X(e, i, o, t = {}) {
return M(e, () => {
const o = new Q(i, n, t);
return U(e, "gridRowActiveMode", o.setGridRowActiveMode.bind(o)), o;
const n = new Q(i, o, t);
return U(e, "gridRowActiveMode", n.setGridRowActiveMode.bind(n)), n;
});
}
const Y = G({
......@@ -247,7 +247,7 @@ const Y = G({
setup(e) {
const {
proxy: i
} = H(), n = S("grid"), t = X(i, e.modelData, e.context, e.params), [o] = V(t), {
} = H(), o = S("grid"), t = X(i, e.modelData, e.context, e.params), [n] = V(t), {
onRowClick: s,
onDbRowClick: r,
onSelectionChange: a,
......@@ -258,7 +258,7 @@ const Y = G({
onPageSizeChange: D
} = J(t), N = (u, l) => {
const h = i.$refs.grid;
h && (h.toggleSelect && h.toggleSelect(l), h.highlightCurrentRow && h.highlightCurrentRow(l)), s(u);
h && l !== void 0 && (h.toggleSelect && h.toggleSelect(l), h.highlightCurrentRow && h.highlightCurrentRow(l)), s(u);
}, p = w(0), g = w(null), R = w(null);
let m = null, y = 0;
const v = () => {
......@@ -296,8 +296,8 @@ const Y = G({
});
return {
c: t,
ns: n,
columns: o,
ns: o,
columns: n,
tableData: x,
onDbRowClick: r,
onUIRowClick: N,
......@@ -318,27 +318,27 @@ const Y = G({
return this.c.model.columns.forEach((i) => {
if (i.source.columnType === "GROUPGRIDCOLUMN")
return;
const n = i.codeName;
e[n] = (t) => {
const o = i.codeName;
e[o] = (t) => {
const {
row: o,
row: n,
column: s
} = t;
if (o.isGroupData && s._index === 0)
if (n.isGroupData && s._index === 0)
return c("div", {
class: this.ns.b("sum"),
attrs: {
title: o.first.lb
title: n.first.lb
}
}, [c("span", [o.first.lb])]);
const r = this.c.rows.find((a) => a.data.srfkey === o.srfkey);
}, [c("span", [n.first.lb])]);
const r = this.c.rows.find((a) => a.data.srfkey === n.srfkey);
if (r)
return c(this.c.providers[n].component, {
return c(this.c.providers[o].component, {
props: {
controller: this.c.columns[n],
controller: this.c.columns[o],
row: r
},
key: o.srfkey + n
key: n.srfkey + o
});
};
}), c("control-layout", {
......
!function(){function t(e){return t="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},t(e)}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(L){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,a=Object.create(o.prototype),c=new E(n||[]);return i(a,"_invoke",{value:S(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=f;var p={};function d(){}function g(){}function v(){}var y={};s(y,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(k([])));b&&b!==n&&o.call(b,c)&&(y=b);var w=v.prototype=d.prototype=Object.create(y);function P(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(e,r){function n(i,a,c,u){var l=h(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var a;i(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return a=a?a.then(o,o):o()}})}function S(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 x()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=C(a,r);if(c){if(c===p)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 u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function C(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,C(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;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,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function j(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 R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function k(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 r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:x}}function x(){return{value:void 0,done:!0}}return g.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:g,configurable:!0}),g.displayName=s(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},P(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},P(w),s(w,l,"Generator"),s(w,c,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,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(R),!t)for(var e in this)"t"===e.charAt(0)&&o.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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;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,p):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),p},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),R(r),p}},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;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function a(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=l(t);if(e){var o=l(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return c(this,r)}}function c(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(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 f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){m(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(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 p(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function d(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 g(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,b(n.key),n)}}function v(t,e,r){return e&&g(t.prototype,e),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}System.register(["@ibiz-template/runtime","@ibiz-template/model","@ibiz-template/vue-util","vue","@ibiz-template/controller"],(function(t,n){"use strict";var c,l,s,p,d,g,b,w,P,O,S,C,j,R,E;return{setters:[function(t){c=t.PluginStaticResource},function(t){l=t.GridModel},function(t){s=t.useNamespace,p=t.useControlController,d=t.usePropsWatch},function(t){g=t.ref,b=t.computed,w=t.defineComponent,P=t.h,O=t.getCurrentInstance,S=t.watch,C=t.onUnmounted},function(t){j=t.GridController,R=t.GridRowController,E=t.GridNotifyState}],execute:function(){var k=new c(n.meta.url),x=v((function t(){y(this,t),m(this,"component","RfpgGridControl")}));function L(t,e){var r,n=[];"GROUPGRIDCOLUMN"===t.source.columnType&&t.children.forEach((function(t){n.push(L(t,e))}));var o={title:t.title,width:"STAR"===t.source.widthUnit?void 0:t.width,minWidth:t.width,align:(null===(r=t.source.align)||void 0===r?void 0:r.toLowerCase())||"center",slot:t.codeName,key:t.codeName,fieldName:t.deFieldName,ellipsis:!0,tooltip:!1,resizable:!0,sortable:!(e.noSort||!t.source.enableSort)&&"custom",columnType:t.source.columnType,tree:"pfzbname"===t.id,className:"pfzbname"===t.id?"pfzbname":""};return n.length>0&&Object.assign(o,{children:n}),o}function z(t){var e=t.model,r=[],n=e.columns.map((function(e){return L(e,t)}));return e.children.forEach((function(t){var e=n.find((function(e){return e.key===t.codeName}));e&&"lb"!==t.id&&r.push(e)})),t.singleSelect||r.splice(0,0,{type:"selection",width:60}),r}var N=w({name:"AppGridPagination",props:{total:{type:Number,required:!0},curPage:{type:Number,required:!0},size:{type:Number,required:!0}},setup:function(t){return{ns:s("grid-page"),start:b((function(){return(t.curPage-1)*t.size+1})),end:b((function(){return t.curPage*t.size}))}},methods:{onPageChange:function(t){this.$emit("change",t)},onPageSizeChange:function(t){this.$emit("page-size-change",t)},pageReset:function(){this.$emit("page-reset")}},render:function(){return P("div",{class:this.ns.b()},[P("i-page",{attrs:{transfer:!0,total:this.total,"show-sizer":!0,"show-elevator":!0,current:this.curPage,"page-size":this.size,"page-size-opts":[10,20,30,40,50,60,70,80,90,100],"show-total":!0},on:{"on-change":this.onPageChange,"on-page-size-change":this.onPageSizeChange}},[P("span",{class:this.ns.b("btn")},[P("i-button",{attrs:{icon:"md-refresh",title:"刷新"},on:{click:this.pageReset}})]),P("span",["显示 ",this.start," - ",this.end," 条,共 ",this.total," 条数据"])])])}}),G=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&&i(t,e)}(c,t);var e,n=a(c);function c(){var t;y(this,c);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return m(u(t=n.call.apply(n,[this].concat(r))),"groups",[]),t}return v(c,[{key:"afterLoad",value:(e=o(r().mark((function t(e){var n=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.allSettled(Object.values(this.fieldColumns).map(function(){var t=o(r().mark((function t(e){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.loadCodeList();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 2:return this.rows=e.map((function(t){var e=new R(t,n);return n.gridStateNotify(e,E.LOAD),e})),this.handleGroup(e),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"handleGroup",value:function(t){var e=this,r=new Map;t.forEach((function(t){var e=t.lb;r.has(e)||r.set(e,[]),r.has(e)&&r.get(e).push(t)})),this.groups=[],r.forEach((function(t,r){e.groups.push({caption:"".concat(r),key:r,children:t})}))}}]),c}(j);var _=w({props:{modelData:l,context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},gridRowActiveMode:{type:Number,default:2},modal:{type:Object}},setup:function(t){var r=O().proxy,n=s("grid"),o=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p(t,(function(){var o=new G(e,r,n);return d(t,"gridRowActiveMode",o.setGridRowActiveMode.bind(o)),o}))}(r,t.modelData,t.context,t.params),i=function(t){var e=g([]);return t.nerve.self.evt.on("created",(function(){e.value=z(t)})),[b((function(){var t=h(e.value);if(!t.find((function(t){return!t.width}))){var r=t.length-1;"rowEdit"===t[r].key&&(r-=1),t[r]=f(f({},t[r]),{},{width:void 0})}var n=t.find((function(t){return"UAGRIDCOLUMN"===t.columnType}));return n&&(n.fixed="right"),t})),e]}(o),a=e(i,1)[0],c=function(t){var e=function(e){return t.items.find((function(t){return t.srfkey===e.srfkey}))};return{onRowClick:function(r){var n=e(r);t.singleSelect&&t.onSelectionChange([n]),t.onRowClick(n)},onDbRowClick:function(r){t.onDbRowClick(e(r))},onSelectionChange:function(r){if(!t.singleSelect){var n=[];r.forEach((function(t){var r=e(t);r&&n.push(r)})),t.onSelectionChange(n)}},onSortChange:function(e){var r=e.column,n=e.order,o="asc"===n||"desc"===n?n:void 0;t.setSort(r.fieldName,o),t.load()}}}(o),u=c.onRowClick,l=c.onDbRowClick,v=c.onSelectionChange,y=c.onSortChange,m=function(t){return{onPageChange:function(e){e&&e!==t.curPage&&(t.curPage=e,t.load())},onPageSizeChange:function(e){e&&e!==t.size&&(t.size=e,1===t.curPage&&t.load())},onPageReset:function(){t.curPage=1,t.load()}}}(o),w=m.onPageChange,P=m.onPageReset,j=m.onPageSizeChange,R=g(0),E=g(null),k=g(null),x=null,L=0,N=function(){var e;if(E.value&&"EMBED"!==(null===(e=t.modal)||void 0===e?void 0:e.mode))if(o.model.source.enablePagingBar&&k.value){var r=k.value.$el,n=r.offsetHeight+parseFloat(window.getComputedStyle(r).paddingTop);R.value=E.value.offsetHeight-n}else R.value=E.value.offsetHeight;o.model.source.height>0&&(R.value=o.model.source.height)};S(E,(function(t,e){t&&t!==e&&(N(),window.ResizeObserver&&E.value&&(x=new ResizeObserver((function(t){var e=t[0].contentRect.height;e!==L&&(N(),L=e)}))).observe(E.value))})),C((function(){x&&x.disconnect()}));var _=b((function(){var t=[];return o.groups.forEach((function(e){if(e.children.length){var r=h(e.children).shift();t.push({srfkey:e.caption,isGroupData:!0,first:r,children:e.children,_showChildren:!0})}})),t}));return{c:o,ns:n,columns:a,tableData:_,onDbRowClick:l,onUIRowClick:function(t,e){var n=r.$refs.grid;n&&(n.toggleSelect&&n.toggleSelect(e),n.highlightCurrentRow&&n.highlightCurrentRow(e)),u(t)},onSelectionChange:v,onSortChange:y,onPageChange:w,onPageSizeChange:j,onPageReset:P,tableHeight:R,gridRef:E,girdPaginationRef:k}},render:function(){var t=this;if(this.c.complete){var e={};return this.c.model.columns.forEach((function(r){if("GROUPGRIDCOLUMN"!==r.source.columnType){var n=r.codeName;e[n]=function(e){var r=e.row,o=e.column;if(r.isGroupData&&0===o._index)return P("div",{class:t.ns.b("sum"),attrs:{title:r.first.lb}},[P("span",[r.first.lb])]);var i=t.c.rows.find((function(t){return t.data.srfkey===r.srfkey}));return i?P(t.c.providers[n].component,{props:{controller:t.c.columns[n],row:i},key:r.srfkey+n}):void 0}}})),P("control-layout",{attrs:{modelData:this.c.model}},[P("div",{ref:"gridRef",class:[this.ns.b(),this.ns.b("rfpg-grid"),this.ns.is("show-header",!this.c.model.source.hideHeader),this.ns.is("enable-page",this.c.model.source.enablePagingBar)]},[this.c.groups.length>0&&P("i-table",{ref:"grid",attrs:{height:this.tableHeight,"show-header":!this.c.model.source.hideHeader,"highlight-row":!0,data:this.tableData,columns:this.columns,"row-key":"srfkey"},class:this.ns.b("content"),on:{"on-row-click":this.onUIRowClick,"on-row-dblclick":this.onDbRowClick,"on-selection-change":this.onSelectionChange,"on-sort-change":this.onSortChange},scopedSlots:e}),this.c.model.source.enablePagingBar&&P(N,{ref:"girdPaginationRef",attrs:{total:this.c.total,curPage:this.c.curPage,size:this.c.size},on:{change:this.onPageChange,"page-size-change":this.onPageSizeChange,"page-reset":this.onPageReset}})])])}}});t("default",{mateUrl:n.meta.url,install:function(t){k.loadStyle(["/style.css"]),t.component("RfpgGridControl",_),ibiz.register.control.register("GRID_RENDER_RfpgGird",new x)}})}}}))}();
!function(){function t(e){return t="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},t(e)}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(s){l=!0,o=s}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||p(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(L){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,a=Object.create(o.prototype),c=new E(n||[]);return i(a,"_invoke",{value:S(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=f;var p={};function d(){}function g(){}function v(){}var y={};s(y,c,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(k([])));b&&b!==n&&o.call(b,c)&&(y=b);var w=v.prototype=d.prototype=Object.create(y);function P(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function O(e,r){function n(i,a,c,u){var l=h(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var a;i(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return a=a?a.then(o,o):o()}})}function S(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 x()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=C(a,r);if(c){if(c===p)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 u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function C(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,C(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;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,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function j(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 R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function k(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 r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:x}}function x(){return{value:void 0,done:!0}}return g.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:g,configurable:!0}),g.displayName=s(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},P(O.prototype),s(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},P(w),s(w,l,"Generator"),s(w,c,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),e.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}},e.values=k,E.prototype={constructor:E,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(R),!t)for(var e in this)"t"===e.charAt(0)&&o.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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;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,p):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),p},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),R(r),p}},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;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function a(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=l(t);if(e){var o=l(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return c(this,r)}}function c(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(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 f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){m(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(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 p(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function d(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 g(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,b(n.key),n)}}function v(t,e,r){return e&&g(t.prototype,e),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}System.register(["@ibiz-template/runtime","@ibiz-template/model","@ibiz-template/vue-util","vue","@ibiz-template/controller"],(function(t,n){"use strict";var c,l,s,p,d,g,b,w,P,O,S,C,j,R,E;return{setters:[function(t){c=t.PluginStaticResource},function(t){l=t.GridModel},function(t){s=t.useNamespace,p=t.useControlController,d=t.usePropsWatch},function(t){g=t.ref,b=t.computed,w=t.defineComponent,P=t.h,O=t.getCurrentInstance,S=t.watch,C=t.onUnmounted},function(t){j=t.GridController,R=t.GridRowController,E=t.GridNotifyState}],execute:function(){var k=new c(n.meta.url),x=v((function t(){y(this,t),m(this,"component","RfpgGridControl")}));function L(t,e){var r,n=[];"GROUPGRIDCOLUMN"===t.source.columnType&&t.children.forEach((function(t){n.push(L(t,e))}));var o={title:t.title,width:"STAR"===t.source.widthUnit?void 0:t.width,minWidth:t.width,align:(null===(r=t.source.align)||void 0===r?void 0:r.toLowerCase())||"center",slot:t.codeName,key:t.codeName,fieldName:t.deFieldName,ellipsis:!0,tooltip:!1,resizable:!0,sortable:!(e.noSort||!t.source.enableSort)&&"custom",columnType:t.source.columnType,tree:"pfzbname"===t.id,className:"pfzbname"===t.id?"pfzbname":""};return n.length>0&&Object.assign(o,{children:n}),o}function z(t){var e=t.model,r=[],n=e.columns.map((function(e){return L(e,t)}));return e.children.forEach((function(t){var e=n.find((function(e){return e.key===t.codeName}));e&&"lb"!==t.id&&r.push(e)})),t.singleSelect||r.splice(0,0,{type:"selection",width:60}),r}var N=w({name:"AppGridPagination",props:{total:{type:Number,required:!0},curPage:{type:Number,required:!0},size:{type:Number,required:!0}},setup:function(t){return{ns:s("grid-page"),start:b((function(){return(t.curPage-1)*t.size+1})),end:b((function(){return t.curPage*t.size}))}},methods:{onPageChange:function(t){this.$emit("change",t)},onPageSizeChange:function(t){this.$emit("page-size-change",t)},pageReset:function(){this.$emit("page-reset")}},render:function(){return P("div",{class:this.ns.b()},[P("i-page",{attrs:{transfer:!0,total:this.total,"show-sizer":!0,"show-elevator":!0,current:this.curPage,"page-size":this.size,"page-size-opts":[10,20,30,40,50,60,70,80,90,100],"show-total":!0},on:{"on-change":this.onPageChange,"on-page-size-change":this.onPageSizeChange}},[P("span",{class:this.ns.b("btn")},[P("i-button",{attrs:{icon:"md-refresh",title:"刷新"},on:{click:this.pageReset}})]),P("span",["显示 ",this.start," - ",this.end," 条,共 ",this.total," 条数据"])])])}}),G=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&&i(t,e)}(c,t);var e,n=a(c);function c(){var t;y(this,c);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return m(u(t=n.call.apply(n,[this].concat(r))),"groups",[]),t}return v(c,[{key:"afterLoad",value:(e=o(r().mark((function t(e){var n=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.allSettled(Object.values(this.fieldColumns).map(function(){var t=o(r().mark((function t(e){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.loadCodeList();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 2:return this.rows=e.map((function(t){var e=new R(t,n);return n.gridStateNotify(e,E.LOAD),e})),this.handleGroup(e),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"handleGroup",value:function(t){var e=this,r=new Map;t.forEach((function(t){var e=t.lb;r.has(e)||r.set(e,[]),r.has(e)&&r.get(e).push(t)})),this.groups=[],r.forEach((function(t,r){e.groups.push({caption:"".concat(r),key:r,children:t})}))}}]),c}(j);var _=w({props:{modelData:l,context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}},gridRowActiveMode:{type:Number,default:2},modal:{type:Object}},setup:function(t){var r=O().proxy,n=s("grid"),o=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p(t,(function(){var o=new G(e,r,n);return d(t,"gridRowActiveMode",o.setGridRowActiveMode.bind(o)),o}))}(r,t.modelData,t.context,t.params),i=function(t){var e=g([]);return t.nerve.self.evt.on("created",(function(){e.value=z(t)})),[b((function(){var t=h(e.value);if(!t.find((function(t){return!t.width}))){var r=t.length-1;"rowEdit"===t[r].key&&(r-=1),t[r]=f(f({},t[r]),{},{width:void 0})}var n=t.find((function(t){return"UAGRIDCOLUMN"===t.columnType}));return n&&(n.fixed="right"),t})),e]}(o),a=e(i,1)[0],c=function(t){var e=function(e){return t.items.find((function(t){return t.srfkey===e.srfkey}))};return{onRowClick:function(r){var n=e(r);t.singleSelect&&t.onSelectionChange([n]),t.onRowClick(n)},onDbRowClick:function(r){t.onDbRowClick(e(r))},onSelectionChange:function(r){if(!t.singleSelect){var n=[];r.forEach((function(t){var r=e(t);r&&n.push(r)})),t.onSelectionChange(n)}},onSortChange:function(e){var r=e.column,n=e.order,o="asc"===n||"desc"===n?n:void 0;t.setSort(r.fieldName,o),t.load()}}}(o),u=c.onRowClick,l=c.onDbRowClick,v=c.onSelectionChange,y=c.onSortChange,m=function(t){return{onPageChange:function(e){e&&e!==t.curPage&&(t.curPage=e,t.load())},onPageSizeChange:function(e){e&&e!==t.size&&(t.size=e,1===t.curPage&&t.load())},onPageReset:function(){t.curPage=1,t.load()}}}(o),w=m.onPageChange,P=m.onPageReset,j=m.onPageSizeChange,R=g(0),E=g(null),k=g(null),x=null,L=0,N=function(){var e;if(E.value&&"EMBED"!==(null===(e=t.modal)||void 0===e?void 0:e.mode))if(o.model.source.enablePagingBar&&k.value){var r=k.value.$el,n=r.offsetHeight+parseFloat(window.getComputedStyle(r).paddingTop);R.value=E.value.offsetHeight-n}else R.value=E.value.offsetHeight;o.model.source.height>0&&(R.value=o.model.source.height)};S(E,(function(t,e){t&&t!==e&&(N(),window.ResizeObserver&&E.value&&(x=new ResizeObserver((function(t){var e=t[0].contentRect.height;e!==L&&(N(),L=e)}))).observe(E.value))})),C((function(){x&&x.disconnect()}));var _=b((function(){var t=[];return o.groups.forEach((function(e){if(e.children.length){var r=h(e.children).shift();t.push({srfkey:e.caption,isGroupData:!0,first:r,children:e.children,_showChildren:!0})}})),t}));return{c:o,ns:n,columns:a,tableData:_,onDbRowClick:l,onUIRowClick:function(t,e){var n=r.$refs.grid;n&&void 0!==e&&(n.toggleSelect&&n.toggleSelect(e),n.highlightCurrentRow&&n.highlightCurrentRow(e)),u(t)},onSelectionChange:v,onSortChange:y,onPageChange:w,onPageSizeChange:j,onPageReset:P,tableHeight:R,gridRef:E,girdPaginationRef:k}},render:function(){var t=this;if(this.c.complete){var e={};return this.c.model.columns.forEach((function(r){if("GROUPGRIDCOLUMN"!==r.source.columnType){var n=r.codeName;e[n]=function(e){var r=e.row,o=e.column;if(r.isGroupData&&0===o._index)return P("div",{class:t.ns.b("sum"),attrs:{title:r.first.lb}},[P("span",[r.first.lb])]);var i=t.c.rows.find((function(t){return t.data.srfkey===r.srfkey}));return i?P(t.c.providers[n].component,{props:{controller:t.c.columns[n],row:i},key:r.srfkey+n}):void 0}}})),P("control-layout",{attrs:{modelData:this.c.model}},[P("div",{ref:"gridRef",class:[this.ns.b(),this.ns.b("rfpg-grid"),this.ns.is("show-header",!this.c.model.source.hideHeader),this.ns.is("enable-page",this.c.model.source.enablePagingBar)]},[this.c.groups.length>0&&P("i-table",{ref:"grid",attrs:{height:this.tableHeight,"show-header":!this.c.model.source.hideHeader,"highlight-row":!0,data:this.tableData,columns:this.columns,"row-key":"srfkey"},class:this.ns.b("content"),on:{"on-row-click":this.onUIRowClick,"on-row-dblclick":this.onDbRowClick,"on-selection-change":this.onSelectionChange,"on-sort-change":this.onSortChange},scopedSlots:e}),this.c.model.source.enablePagingBar&&P(N,{ref:"girdPaginationRef",attrs:{total:this.c.total,curPage:this.c.curPage,size:this.c.size},on:{change:this.onPageChange,"page-size-change":this.onPageSizeChange,"page-reset":this.onPageReset}})])])}}});t("default",{mateUrl:n.meta.url,install:function(t){k.loadStyle(["/style.css"]),t.component("RfpgGridControl",_),ibiz.register.control.register("GRID_RENDER_RfpgGird",new x)}})}}}))}();
@charset "UTF-8";.ibiz-grid{--ibiz-grid-text-color: var(--ibiz-text-color);--ibiz-grid-bg-color: var(--ibiz-color-white);--ibiz-grid-padding: 0;--ibiz-grid-cell-padding: calc(var(--ibiz-padding) / 2);--ibiz-grid-header-text-color: var(--ibiz-text-color);--ibiz-grid-header-cell-padding: var(--ibiz-grid-cell-padding);--ibiz-grid-header-height: 45px;--ibiz-grid-content-text-color: var(--ibiz-grid-text-color);--ibiz-grid-content-item-highlight-bg-color: var(--ibiz-color-primary-light-7);--ibiz-grid-content-item-hover-bg-color: var(--ibiz-color-primary-light-7);--ibiz-grid-content-row-height: 48px;--ibiz-grid-page-text-color: var(--ibiz-grid-text-color);--ibiz-grid-page-height: 50px;--ibiz-grid-page-padding: var(--ibiz-padding) 0 0 0;height:100%;padding:var(--ibiz-grid-padding);background-color:var(--ibiz-grid-bg-color)}.ibiz-grid.is-enable-page .ibiz-grid-content{height:calc(100% - var(--ibiz-grid-page-height))}.ibiz-grid .ibiz-grid-content{height:100%}.ibiz-grid .ibiz-grid-content .ivu-table{overflow:auto}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body{overflow-y:auto}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-row{height:var(--ibiz-grid-content-row-height)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-row>td{height:0}@-moz-document url-prefix(""){.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-row>td{height:100%}}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body>table{color:var(--ibiz-grid-content-text-color)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body>table .ivu-table-row-highlight td{background-color:var(--ibiz-grid-content-item-highlight-bg-color)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body>table .ivu-table-row-hover td{background-color:var(--ibiz-grid-content-item-hover-bg-color)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell-with-selection{padding:var(--ibiz-grid-cell-padding)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell.ivu-table-cell-ellipsis{padding-right:0;padding-left:0}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell.ivu-table-cell-ellipsis,.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell.ivu-table-cell-ellipsis .ivu-table-cell-slot{width:100%;height:100%}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-header{overflow:hidden}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-header>table{height:100%;color:var(--ibiz-grid-header-text-color)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-header>table .ivu-table-cell{width:100%;padding:var(--ibiz-grid-header-cell-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-grid .ibiz-grid-content .ivu-table:before{z-index:auto}.ibiz-grid .ibiz-grid-page{height:var(--ibiz-grid-page-height);display:flex;justify-content:flex-end;padding:var(--ibiz-grid-page-padding)}.ibiz-grid-page{display:flex}.ibiz-grid-page .ibiz-grid-page-btn{margin-right:10px}.ibiz-grid-rfpg-grid .pfzbname>.ivu-table-cell{display:flex;align-items:center}.ibiz-grid-rfpg-grid .pfzbname>.ivu-table-cell .ibiz-grid-sum{height:100%;display:flex;align-items:center;margin-left:8px;width:100%}.ibiz-grid-rfpg-grid .pfzbname>.ivu-table-cell .ibiz-grid-sum>span{display:inline-block;width:100%;white-space:pre-line;font-weight:900}
@charset "UTF-8";.ibiz-grid{--ibiz-grid-text-color: var(--ibiz-text-color);--ibiz-grid-bg-color: var(--ibiz-color-white);--ibiz-grid-padding: 0;--ibiz-grid-cell-padding: calc(var(--ibiz-padding) / 2);--ibiz-grid-header-text-color: #031129;--ibiz-grid-header-cell-padding: var(--ibiz-grid-cell-padding);--ibiz-grid-header-height: 44px;--ibiz-grid-header-bgcolor: #f4f5f7;--ibiz-grid-header-split-color: #fff;--ibiz-grid-content-text-color: var(--ibiz-grid-text-color);--ibiz-grid-content-item-highlight-bg-color: var(--ibiz-color-primary-light-7);--ibiz-grid-content-item-hover-bg-color: var(--ibiz-color-primary-light-7);--ibiz-grid-content-row-height: 44px;--ibiz-grid-page-text-color: #333;--ibiz-grid-page-page-height: 40px;--ibiz-grid-page-btn-height: 32px;--ibiz-grid-page-padding: var(--ibiz-padding) 0 var(--ibiz-padding-extra-tight) 0;--ibiz-grid-page-active-bg: #e6eeff;height:100%;padding:var(--ibiz-grid-padding);overflow:hidden;background-color:var(--ibiz-grid-bg-color)}.ibiz-grid.is-enable-page .ibiz-grid-content{height:calc(100% - var(--ibiz-grid-page-height))}.ibiz-grid .ibiz-grid-content{height:100%}.ibiz-grid .ibiz-grid-content .ivu-table{overflow:hidden}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-header .ivu-checkbox-checked .ivu-checkbox-inner{background-color:var(--ibiz-color-primary);border-color:var(--ibiz-color-primary)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body{overflow-y:auto}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-row{height:var(--ibiz-grid-content-row-height)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-row.hidden-row{display:none}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-row>td{height:0}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body tr.ivu-table-row-hover td{background-color:#f5f8ff}@-moz-document url-prefix(""){.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-row>td{height:100%}}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body>table{color:var(--ibiz-grid-content-text-color)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell-with-selection{padding:var(--ibiz-grid-cell-padding);text-align:center}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell-with-selection .ivu-checkbox-checked .ivu-checkbox-inner{background-color:var(--ibiz-color-primary);border-color:var(--ibiz-color-primary)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell{padding-right:0;padding-left:0}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell.ivu-table-cell-ellipsis,.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-body .ivu-table-cell.ivu-table-cell-ellipsis .ivu-table-cell-slot{width:100%;height:100%}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-header{overflow:hidden}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-header>table{height:100%;color:var(--ibiz-grid-header-text-color)}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-header>table .ivu-table-cell{width:100%;padding:var(--ibiz-grid-header-cell-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-grid .ibiz-grid-content .ivu-table .ivu-table-header>table .ivu-table-cell-with-selection{text-align:center}.ibiz-grid .ibiz-grid-content .ivu-table:before{z-index:auto}.ibiz-grid .ivu-table-fixed-header thead tr th{padding:3px 0}.ibiz-grid .ivu-table-header thead tr th{height:44px;padding:3px 0;overflow:hidden;color:var(--ibiz-grid-header-text-color);background-color:var(--ibiz-grid-header-bgcolor);border-left:1px solid var(--ibiz-grid-header-split-color)}.ibiz-grid .ivu-table-header thead tr th:last-child:not([class]){border-left:none}.ibiz-grid .ivu-table-header thead tr th:last-child[class=""]{border-left:none}.ibiz-grid .ivu-table-fixed-header{overflow:hidden}.ibiz-grid .ivu-table-fixed-header>table{height:100%;color:var(--ibiz-grid-header-text-color)}.ibiz-grid .ivu-table-fixed-header>table .ivu-table-cell{width:100%;padding:var(--ibiz-grid-header-cell-padding);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-grid .ivu-table-fixed-body .ivu-table-row .ivu-table-cell{padding:0}.ibiz-grid .ivu-table-fixed-body .ivu-table-row td{height:44px}.ibiz-grid .ivu-table-fixed-body .ivu-table-row.hidden-row{display:none}.ibiz-grid .ibiz-grid-page{display:flex;justify-content:flex-end;padding:var(--ibiz-grid-page-padding)}.ibiz-grid-page{--ibiz-grid-page-text-color: #333;--ibiz-grid-page-page-height: 40px;--ibiz-grid-page-btn-height: 32px;--ibiz-grid-page-padding: var(--ibiz-padding) 0 var(--ibiz-padding-extra-tight) 0;--ibiz-grid-page-active-bg: #e6eeff;display:flex}.ibiz-grid-page .ibiz-grid-page-btn{margin-right:10px}.ibiz-grid-page .ivu-page{width:100%;height:var(--ibiz-grid-page-btn-height);color:var(--ibiz-grid-page-text-color);text-align:end}.ibiz-grid-page .ivu-page .ivu-btn{height:var(--ibiz-grid-page-btn-height)}.ibiz-grid-page .ivu-page .ivu-page-total .ivu-btn:hover{color:var(--ibiz-color-primary);border-color:var(--ibiz-color-primary)}.ibiz-grid-page .ivu-page .ivu-page-item,.ibiz-grid-page .ivu-page .ivu-page-prev,.ibiz-grid-page .ivu-page .ivu-page-next{border-color:#ccc}.ibiz-grid-page .ivu-page .ivu-page-item:hover,.ibiz-grid-page .ivu-page .ivu-page-prev:hover,.ibiz-grid-page .ivu-page .ivu-page-next:hover{color:#337aff;border-color:#337aff}.ibiz-grid-page .ivu-page .ivu-page-item.ivu-page-disabled,.ibiz-grid-page .ivu-page .ivu-page-prev.ivu-page-disabled,.ibiz-grid-page .ivu-page .ivu-page-next.ivu-page-disabled{color:#333;border-color:#ccc}.ibiz-grid-page .ivu-page .ivu-page-item.ivu-page-item-active{color:var(--ibiz-color-primary);background-color:var(--ibiz-grid-page-active-bg);border-color:var(--ibiz-color-primary)}.ibiz-grid-page .ivu-page .ivu-page-options .ivu-page-options-sizer .ivu-select-selection:hover{color:#337aff;border-color:#337aff}.ibiz-grid-page .ivu-page .ivu-page-options .ivu-page-options-elevator input:hover{border-color:#337aff}.ivu-select-dropdown-transfer .ivu-select-item{color:#333}.ivu-select-dropdown-transfer .ivu-select-item:hover{background-color:#f5f8ff}.ivu-select-dropdown-transfer .ivu-select-item-selected,.ivu-select-dropdown-transfer .ivu-select-item-selected:hover{color:var(--ibiz-color-primary)}.ibiz-grid-rfpg-grid .pfzbname>.ivu-table-cell{display:flex;align-items:center}.ibiz-grid-rfpg-grid .pfzbname>.ivu-table-cell .ibiz-grid-sum{height:100%;display:flex;align-items:center;margin-left:8px;width:100%}.ibiz-grid-rfpg-grid .pfzbname>.ivu-table-cell .ibiz-grid-sum>span{display:inline-block;width:100%;white-space:pre-line;font-weight:900}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册