@indfnd/common-m 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ind-common-m.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Draw
|
|
|
3
3
|
import { isNil, useConfig, getQuarterNum, formatQuarter, str2Date, isDate as isDate$1, isArray as isArray$1, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, formatDate as formatDate$1, axios as axios$3, isFunction as isFunction$1, isString as isString$1, uuid, exportJsonToExcel, importJsonFromExcel, isEqual, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getLocalStorage, getPermissionCache, getSessionStorage, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getPreviewUrlApi, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, listComTreeApi, listUserTreeApi, UC_ENUM, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, setSessionStorage, getAppListApi, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
|
|
4
4
|
import Vue$1 from "vue";
|
|
5
5
|
const name$2 = "@indfnd/common-m";
|
|
6
|
-
const version$1 = "0.0.
|
|
6
|
+
const version$1 = "0.0.7";
|
|
7
7
|
const author$1 = "huxuetong";
|
|
8
8
|
const publishConfig = {
|
|
9
9
|
registry: "https://registry.npmjs.org/"
|
|
@@ -58,16 +58,17 @@ const dependencies$1 = {
|
|
|
58
58
|
"file-saver": "^2.0.5",
|
|
59
59
|
signature_pad: "^4.1.7",
|
|
60
60
|
vuedraggable: "^2.24.3",
|
|
61
|
+
wangeditor: "^3.1.1",
|
|
61
62
|
"xe-utils": "3",
|
|
62
63
|
xlsx: "^0.17.2",
|
|
63
|
-
"xlsx-populate": "^1.11.0"
|
|
64
|
-
wangeditor: "^3.1.1"
|
|
64
|
+
"xlsx-populate": "^1.11.0"
|
|
65
65
|
};
|
|
66
66
|
const devDependencies$1 = {
|
|
67
67
|
"@indfnd/utils": "^0.1.26",
|
|
68
68
|
"ag-grid-community": "^30.1.0",
|
|
69
69
|
"ag-grid-enterprise": "^30.1.0",
|
|
70
70
|
"ag-grid-vue": "^30.1.0",
|
|
71
|
+
axios: "^0.24.0",
|
|
71
72
|
eslint: "^3.19.0",
|
|
72
73
|
"eslint-config-prettier": "^8.5.0",
|
|
73
74
|
"eslint-plugin-prettier": "^4.2.1",
|
|
@@ -92,8 +93,7 @@ const devDependencies$1 = {
|
|
|
92
93
|
"vue-router": "^3.5.3",
|
|
93
94
|
"vue-template-compiler": "^2.6.12",
|
|
94
95
|
"vue-tsc": "^1.8.8",
|
|
95
|
-
vuex: "^3.6.2"
|
|
96
|
-
axios: "^0.24.0"
|
|
96
|
+
vuex: "^3.6.2"
|
|
97
97
|
};
|
|
98
98
|
const engines = {
|
|
99
99
|
node: ">= 16"
|
|
@@ -14487,7 +14487,7 @@ const __vue2_script$11 = {
|
|
|
14487
14487
|
} else {
|
|
14488
14488
|
let a2 = a[this.sortParams.sort] || "";
|
|
14489
14489
|
let b2 = b[this.sortParams.sort] || "";
|
|
14490
|
-
return this.sortParams.order === "asc" ? a2.localeCompare(b2, "zh-CN") : b2.localeCompare(a2, "zh-CN");
|
|
14490
|
+
return this.sortParams.order === "asc" ? String(a2 || "").localeCompare(String(b2 || ""), "zh-CN") : String(b2 || "").localeCompare(String(a2 || ""), "zh-CN");
|
|
14491
14491
|
}
|
|
14492
14492
|
});
|
|
14493
14493
|
if (this.noSortLine > -1) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(F,ft){typeof exports=="object"&&typeof module!="undefined"?ft(exports,require("lodash"),require("view-design"),require("@indfnd/utils"),require("vue")):typeof define=="function"&&define.amd?define(["exports","lodash","view-design","@indfnd/utils","vue"],ft):(F=typeof globalThis!="undefined"?globalThis:F||self,ft(F.IndCommon={},F.lodash,F["view-design"],F["@indfnd/utils"],F.vue))})(this,function(F,ft,C,v,bo){"use strict";function gs(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var u=gs(ft),Se=gs(bo),So={name:"@indfnd/common-m",version:"0.0.
|
|
1
|
+
(function(F,ft){typeof exports=="object"&&typeof module!="undefined"?ft(exports,require("lodash"),require("view-design"),require("@indfnd/utils"),require("vue")):typeof define=="function"&&define.amd?define(["exports","lodash","view-design","@indfnd/utils","vue"],ft):(F=typeof globalThis!="undefined"?globalThis:F||self,ft(F.IndCommon={},F.lodash,F["view-design"],F["@indfnd/utils"],F.vue))})(this,function(F,ft,C,v,bo){"use strict";function gs(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var u=gs(ft),Se=gs(bo),So={name:"@indfnd/common-m",version:"0.0.7",author:"huxuetong",publishConfig:{registry:"https://registry.npmjs.org/"},main:"./dist/ind-common-m.umd.cjs",module:"./dist/ind-common-m.es.js",style:"./dist/styles/index.css",types:"./types/index.d.ts",exports:{".":{import:"./dist/ind-common-m.es.js",require:"./dist/ind-common-m.umd.cjs"},"./dist/styles/index.css":{import:"./dist/styles/index.css",require:"./dist/styles/index.css"},"./css/view-design/iview.css":{import:"./css/view-design/iview.css",require:"./css/view-design/iview.css"},"./src/styles/index.less":{import:"./src/styles/index.less",require:"./src/styles/index.less"},"./src/styles/variables/index.less":{import:"./src/styles/variables/index.less",require:"./src/styles/variables/index.less"}},files:["css","dist","types","global.d.ts","src/styles"],scripts:{"build:prod":"vite build","build:style":"gulp --gulpfile build/build-style.js",build:"yarn build:prod && yarn build:style","type-check":"vue-tsc --noEmit -p tsconfig.check.json --composite false",dts:"vue-tsc -p tsconfig.types.json",release:"node build/auto-build.js && yarn re-publish","release-major":"standard-version --release-as major","release-minor":"standard-version --release-as minor","release-patch":"standard-version --release-as patch","re-publish":"yarn publish --access public"},dependencies:{classnames:"^2.5.1","file-saver":"^2.0.5",signature_pad:"^4.1.7",vuedraggable:"^2.24.3",wangeditor:"^3.1.1","xe-utils":"3",xlsx:"^0.17.2","xlsx-populate":"^1.11.0"},devDependencies:{"@indfnd/utils":"^0.1.26","ag-grid-community":"^30.1.0","ag-grid-enterprise":"^30.1.0","ag-grid-vue":"^30.1.0",axios:"^0.24.0",eslint:"^3.19.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-vue":"^2.1.0",gulp:"^4.0.2","gulp-autoprefixer":"^8.0.0","gulp-clean-css":"^4.3.0","gulp-less":"^5.0.0","gulp-rename":"^2.0.0","gulp-replace":"^1.1.4",less:"^4.1.3",prettier:"^2.7.1","standard-version":"^9.5.0",typescript:"^5.1.6","view-design":"^4.6.1",vite:"^2.0.5","vite-plugin-eslint":"1.3.0","vite-plugin-resolve-externals":"^0.2.2","vite-plugin-vue2":"^1.3.2",vue:"^2.6.14","vue-property-decorator":"^8.5.1","vue-router":"^3.5.3","vue-template-compiler":"^2.6.12","vue-tsc":"^1.8.8",vuex:"^3.6.2"},engines:{node:">= 16"}},yo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Button",{attrs:{size:"large",type:"text"},on:{click:e.backHome}},[e._v("\u8FD4\u56DE\u9996\u9875")]),a("Button",{attrs:{size:"large",type:"text"},on:{click:e.backPrev}},[e._v("\u8FD4\u56DE\u4E0A\u4E00\u9875("+e._s(e.second)+"s)")])],1)},ko=[];function b(e,t,a,s,n,i,l,o){var c=typeof e=="function"?e.options:e;t&&(c.render=t,c.staticRenderFns=a,c._compiled=!0),s&&(c.functional=!0),i&&(c._scopeId="data-v-"+i);var p;if(l?(p=function(r){r=r||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!r&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(r=__VUE_SSR_CONTEXT__),n&&n.call(this,r),r&&r._registeredComponents&&r._registeredComponents.add(l)},c._ssrRegister=p):n&&(p=o?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),p)if(c.functional){c._injectStyles=p;var d=c.render;c.render=function(h,R){return p.call(R),d(h,R)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,p):[p]}return{exports:e,options:c}}const Fo={name:"IndBackBtnGroup",data(){return{second:5,timer:null}},mounted(){this.timer=setInterval(()=>{this.second===0?this.backPrev():this.second--},1e3)},beforeDestroy(){clearInterval(this.timer)},methods:{backHome(){this.$router.replace({name:this.$config.homeRouteName})},backPrev(){this.$router.go(-1)}}},bs={};var Wo=b(Fo,yo,ko,!1,Zo,null,null,null);function Zo(e){for(let t in bs)this[t]=bs[t]}var xo=function(){return Wo.exports}(),Mo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"ind-error-page"},[a("div",{staticClass:"content-con"},[a("img",{attrs:{src:e.src,alt:e.code}}),a("div",{staticClass:"text-con"},[a("h4",[e._v(e._s(e.code))]),a("h5",[e._v(e._s(e.desc))])])])])},wo=[];const Eo={name:"IndErrorContent",components:{BackBtnGroup:xo},props:{code:String,desc:String,src:String}},Ss={};var Do=b(Eo,Mo,wo,!1,Co,null,null,null);function Co(e){for(let t in Ss)this[t]=Ss[t]}var da=function(){return Do.exports}(),_o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ErrorContent",{attrs:{code:"404",desc:"Oh~~\u60A8\u7684\u9875\u9762\u597D\u50CF\u98DE\u8D70\u4E86~",src:e.src}})},Jo=[];const Yo={name:"IndNotFound",components:{ErrorContent:da},data(){return{src:""}}},ys={};var Bo=b(Yo,_o,Jo,!1,zo,null,null,null);function zo(e){for(let t in ys)this[t]=ys[t]}var Ge=function(){return Bo.exports}(),Io=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("i",{class:[e.classPrefix,e.classPrefix+"-"+e.type],style:e.style,on:{click:function(s){return e.$emit("click",s)}}})},Qo=[];const Go={name:"IndIcons",props:{classPrefix:{type:String,default:"ivu-icon"},type:{type:String,default:""},color:String,size:[Number,String]},computed:{style(){const e={};return this.size&&(e["font-size"]=`${this.size}px`),this.color&&(e.color=this.color),e}}},ks={};var Oo=b(Go,Io,Qo,!1,Lo,null,null,null);function Lo(e){for(let t in ks)this[t]=ks[t]}var le=function(){return Oo.exports}(),jo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Button",e._g(e._b({attrs:{icon:e.icon?e.icon:"",type:e.isNil(e.type)?e.typeEnum.type||"primary":e.type,size:e.isNil(e.size)?e.typeEnum.size||"default":e.size,ghost:e.isNil(e.ghost)?e.typeEnum.ghost:e.ghost}},"Button",e.$attrs,!1),e.$listeners),[e._t("default",function(){return[e._v(e._s(e.typeEnum.text))]}),e.arrow?a("Icons",{attrs:{type:e.arrowType}}):e._e()],2)},$o=[];const Ho={name:"IndButton",components:{Button:C.Button,Icons:le},props:{bizType:String,noIcon:Boolean,icon:String,type:String,size:String,ghost:{type:Boolean,default:void 0},arrow:Boolean,arrowType:{type:String,default:"ios-arrow-down"}},data(){return{isNil:v.isNil,enums:{query:{type:"primary",icon:"ios-search",text:"\u67E5\u8BE2"},reset:{type:"default",text:"\u91CD\u7F6E"},back:{type:"default",icon:"ios-arrow-back",text:"\u8FD4\u56DE"},add:{type:"primary",icon:"md-add",text:"\u65B0\u589E"},edit:{type:"primary",icon:"ios-create-outline",text:"\u7F16\u8F91"},delete:{type:"error",icon:"ios-trash-outline",text:"\u5220\u9664"},save:{type:"primary",icon:"md-checkmark",text:"\u4FDD\u5B58"},submit:{type:"primary",icon:"md-checkmark-circle-outline",text:"\u63D0\u4EA4"},cancel:{type:"default",text:"\u53D6\u6D88"},confirm:{type:"primary",text:"\u786E\u8BA4"},approve:{type:"primary",icon:"md-checkmark",text:"\u901A\u8FC7"},reject:{type:"error",icon:"md-undo",text:"\u9A73\u56DE"},table:{type:"primary",size:"small",ghost:!0,text:"\u7F16\u8F91"},"table-delete":{type:"error",size:"small",ghost:!0,text:"\u5220\u9664"},upload:{type:"default",icon:"md-cloud-upload",text:"\u4E0A\u4F20\u9644\u4EF6"}}}},computed:{typeEnum(){return this.enums[this.bizType]||{}}}},Fs={};var Xo=b(Ho,jo,$o,!1,Po,null,null,null);function Po(e){for(let t in Fs)this[t]=Fs[t]}var Ve=function(){return Xo.exports}(),Ao=function(){var e,t=this,a=t.$createElement,s=t._self._c||a;return t.split?s("div",{class:(e={},e[t.classPrefix]=!0,e[t.classPrefix+"--vertical"]=t.vertical,e[t.classPrefix+"--mt"]=t.mt,e[t.classPrefix+"--mb"]=t.mb,e[t.classPrefix+"--center"]=t.center,e[t.classPrefix+"--right"]=t.right,e)},[t._t("default")],2):s("ButtonGroup",t._b({attrs:{size:t.size,vertical:t.vertical}},"ButtonGroup",t.$attrs,!1),[t._t("default")],2)},Ko=[];const qo={name:"IndButtonGroup",components:{ButtonGroup:C.ButtonGroup},props:{split:{type:Boolean,default:!0},vertical:Boolean,mt:Boolean,mb:Boolean,center:Boolean,right:Boolean},data(){return{classPrefix:"ind-button-group"}}},Ws={};var ec=b(qo,Ao,Ko,!1,tc,null,null,null);function tc(e){for(let t in Ws)this[t]=Ws[t]}var Ne=function(){return ec.exports}(),ha=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Zs={exports:{}};/**!
|
|
2
2
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
3
3
|
* @version 1.16.1
|
|
4
4
|
* @license
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
|
|
41
41
|
<span ref="eSortOrder" class="ag-header-icon ag-header-label-icon ag-sort-order" aria-hidden="true"></span>
|
|
42
42
|
</div>
|
|
43
|
-
</div>`}:null},gridApi:null,gridColumnApi:null,overlayNoRowsTemplate:'<span style="padding: 10px;">\u8BF7\u9009\u62E9\u67E5\u8BE2\u6761\u4EF6</span>',showZero:this.showZeroDefault,showZeroSwitch:!1,switchZeroCol:null,switchZeroTitle:"",showUnitSwitch:!1,switchCols:[],unitType:this.defaultTableUnitType||this.defaultUnitType||"X",pinnedTopRowDataWithUnit:this.pinnedTopRowData||null,topRows:this.pinnedTopRowData||null,treeData:!1,getDataPath:s=>s.treeLevelFlag,autoGroupColumnDef:null,groupDisplayType:"",inited:!1}},computed:{mergeIndexCol(){let e=u.default.find(this.columns,t=>t.autoMergeRow===!0);return(e==null?void 0:e.key)||(e==null?void 0:e.field)},mergeColumns(){let e=u.default.filter(this.columns,t=>!!t.autoMergeRow).map(t=>t.key||t.field);return e!=null&&e.length?e:void 0},paramRightUnit(){return u.default.some(this.flatColumns,e=>e.isSwitchUnit)?"\u5355\u4F4D\uFF1A"+(this.unitType=="X"?"\u7BB1":"\u4E07\u652F"):""},isEditTable(){return u.default.some(this.flatColumns,e=>["input","select","treeselect"].includes(e.type))},getRowId(){return this.rowKey?e=>e.data[this.rowKey]:null},flatColumns(){let e=[];return He(null,this.columns,t=>{e.push(t)}),e},columnCalcMap(){let e={};return u.default.forEach(this.flatColumns,t=>{t.calcRule&&It(e,t.calcRule,t.field||t.key)}),e},getTheme(){var e,t;return((t=(e=this.$store)==null?void 0:e.getters)==null?void 0:t.getTheme)||st()},columnNameArr(){return this.columns.map(e=>e.title)},selectedColumnNameArr(){var e=[];for(var t of this.cloneColumns)e.push(t.title);return e},paginationParams(){return{offset:(this.currentPage-1)*this.limitNumber,limit:this.limitNumber}},slots(){return this.$slots},tableSpanMergeColumns(){const e=a=>a.children?a.children.map(s=>e(s)).flat():[a];return e({children:this.tableColumns})},tableRowSpanMergeIndexMap(){const e={};return console.time("calcMerge"),this.tableSpanMergeColumns.forEach(t=>{let a=/autoMergeRow-([^\s]*)/.exec(t.cellClass);if(a[1]!="undefined"&&a[1]!="null"){const n=[];this.tableData.forEach((o,c)=>{c===0?n.push([0]):o[t.field]===this.tableData[c-1][t.field]&&(a[1]==="true"||o[a[1]]===this.tableData[c-1][a[1]])?n[n.length-1].push(c):n.push([c])});let i=n.filter(o=>o.length!==1),l={};u.default.forEach(i,o=>{l[o[0]+""]=o.length}),e[t.field]=l}}),console.timeEnd("calcMerge"),e},rowDataFiltered(){return this.showZeroSwitch?this.tableData.filter(t=>this.showZero=="Y"?!0:parseFloat(t[this.switchZeroCol])>0):this.tableData},shareFullSreen(){return this.$store.state.app.isFullSreen}},watch:{pinnedTopRowData:{handler:function(){this.pinnedTopRowDataWithUnit=u.default.cloneDeep(this.pinnedTopRowData),this.renderSumRow()},deep:!0},unitType(e,t){let a=u.default.cloneDeep(this.tableData);if(a.forEach(s=>{this.switchCols.forEach(n=>{he(t,e,s,n)})}),this.tableData=a,this.pinnedTopRowDataWithUnit&&this.pinnedTopRowDataWithUnit.length){let s=u.default.cloneDeep(this.pinnedTopRowDataWithUnit);s.forEach(n=>{this.switchCols.forEach(i=>{he(t,e,n,i)})}),this.pinnedTopRowDataWithUnit=s,this.renderSumRow()}},getTheme(){this.gridApi.resetRowHeights()},rowHeight(){this.gridApi.resetRowHeights()},width(){this.tableWidth=this.width},searchParams:{handler(){this.currentPage=1,this.tableRefresh()},deep:!0},dataApi:{handler(){this.currentPage=1,this.tableRefresh()},deep:!0},columns:{async handler(e){this.columnsHander(e)},deep:!0},value:{async handler(e){this.updating||(u.default.some(e,t=>{var a;return(a=t.treeLevelFlag)==null?void 0:a.length})||(e=await this.renderTreeData(e)),this.calcRulesData(e))},deep:!0},tableData:{async handler(e){if(this.overlayNoRowsTemplate='<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>',this.updating=!0,this.renderSumRow(),u.default.some(this.columns,{tree:!0})){let a=u.default.cloneDeep(e),s=mi(a);this.$emit("input",s)}else this.$emit("input",u.default.cloneDeep(e));this.$nextTick(()=>{this.updating=!1})},deep:!0},columnCalcMap:{handler:function(){this.calcRulesData(this.tableData)},deep:!0,immediate:!0},showSummary:{handler(e){this.tableShowSummary=e}},optionDropdownVisible(e){e&&(this.parsedColumns=this.$refs.tableRef.cloneColumns)},loading(e){this.tableLoading=e},height:{handler(){this.tableHeight=this.height}},showZero(){this.renderSumRow()}},created(){this.autoRefresh&&(this.tableRefresh(),this.inited=!0)},async mounted(){var a;this.tableRef=this,this.unitType=this.defaultTableUnitType,this.cloneColumns=this.tableColumnsInner(u.default.cloneDeep(this.columns)||[]),this.cloneColumns2=this.tableColumnsInner(u.default.cloneDeep(this.columns)||[]),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.showUnitSwitch=u.default.some(this.flatColumns,{isSwitchUnit:!0}),this.showZeroSwitch=u.default.some(this.flatColumns,s=>!!s.isSwitchZero),this.switchCols=u.default.filter(this.flatColumns,{isSwitchUnit:!0}).map(s=>s.field||s.key);let e=u.default.find(this.flatColumns,s=>!!s.isSwitchZero),t=((a=u.default.find(this.flatColumns,s=>!!s.isSwitchZero))==null?void 0:a.isSwitchZero)||"\u662F\u5426\u5C55\u793A\u8F93\u5165\u91CF\u4E3A\u96F6\u7684\u6570\u636E";this.switchZeroTitle=t,this.switchZeroCol=(e==null?void 0:e.field)||(e==null?void 0:e.key),this.renderSumRow(),await this.$nextTick(),this.checkAllGroup=this.columns.map(s=>s.title)},activated(){console.log(this._uid+"activated"),this.autoRefresh&&(this.inited||this.tableRefresh(),this.inited=!1)},destroyed(){this.optionDropdownVisible=!1},deactivated(){this.optionDropdownVisible=!1},methods:{getContextMenuItems:function(){return this.rowSelection=="multiple"?[{name:"\u9884\u89C8Excel",action:()=>{this.$refs.exportData.previewCurrentPage()}},{name:"\u5BFC\u51FA\u6570\u636E\u5230Excel",action:()=>{this.$refs.exportData.exportCurrentPage()}},{name:"\u5168\u9009\u9009\u4E2D",action:()=>{this.selectAll()}},{name:"\u5168\u90E8\u53D6\u6D88",action:()=>{this.deselectAll()}},{name:"\u5168\u90E8\u9009\u53CD",action:()=>{let e=this.getSelection(),t=u.default.cloneDeep(this.rowDataFiltered);u.default.remove(t,a=>u.default.some(e,s=>s.uuid===a.uuid)),this.setSelection(t,!0)}}]:[{name:"\u9884\u89C8Excel",action:()=>{this.$refs.exportData.previewCurrentPage()}},{name:"\u5BFC\u51FA\u6570\u636E\u5230Excel",action:()=>{this.$refs.exportData.exportCurrentPage()}}]},getRowClassCommon(e){var n;let t;this.getRowClass instanceof Function&&(t=this.getRowClass(e));let a,s=((n=e==null?void 0:e.data)==null?void 0:n.sumLevel)||"";return s&&(a="ind-table-sum-level"+s,t instanceof Array?t.push(a):typeof t=="string"?t+=" "+a:t=a),t},async columnsHander(e){this.showUnitSwitch=u.default.some(this.flatColumns,{isSwitchUnit:!0}),this.switchCols=u.default.filter(this.flatColumns,{isSwitchUnit:!0}).map(a=>a.field||a.key),this.cloneColumns=this.tableColumnsInner(u.default.cloneDeep(e)||[]),this.cloneColumns2=this.tableColumnsInner(u.default.cloneDeep(e)||[]),this.currentPage=1,this.tableRefresh(!0),this.columnsFilter();let t=u.default.cloneDeep(this.cloneColumns);this.tableColumns=t,this.checkAllGroup=e.map(a=>a.title),this.refreshTable=!0,await this.$nextTick(),this.refreshTable=!1},calcRulesData(e){if(u.default.isEmpty(this.columnCalcMap))this.tableData=u.default.cloneDeep(e||this.value),this.totalNumber=this.tableData.length;else{let t=u.default.cloneDeep(e||this.value),a={};u.default.forEach(this.columnCalcMap,(i,l)=>{u.default.merge(a,i)});let s=[];u.default.forEach(a,(i,l)=>{var c;let o=u.default.find(this.flatColumns,p=>p.field==l||p.key==l);s.push({rltKey:l,ast:i,precision:((c=o==null?void 0:o.cellRendererParams)==null?void 0:c.scale)||2,errRtn:0})}),zt(t,{calcRules:s}),this.tableData=t,this.totalNumber=t.length}},resetColumns(e){const t={};He(null,this.columns||[],a=>{let s=a.field||a.key||a.type||a.headerName||a.title;Object.assign(t,{[s]:a})}),He(null,e,(a,s)=>{let n=t[a.field||a.key||a.type||a.headerName||a.title];n.hide=!a.checked,a.pinned&&a.pinned!="none"||(s==null?void 0:s.pinned)&&(s==null?void 0:s.pinned)!="none"?n.pinned.fixed=n.pinned=a.pinned=="none"?(s==null?void 0:s.pinned)=="none"||s==null?void 0:s.pinned:a.pinned:(delete n.pinned,delete n.fixed),a.width&&(n.width&&(n.width=a.width),n.minWidth&&(n.minWidth=a.width))}),this.columnsHander(this.columns)},cellClicked(e){var t;if(this.$listeners&&this.$listeners.cellClicked)this.$listeners.cellClicked(e);else{let a=e.colDef||{};((t=a==null?void 0:a.cellRendererParams)==null?void 0:t.onClick)instanceof Function&&a.cellRendererParams.onClick(e.data)}},cellDoubleClicked(e){if(this.$listeners&&this.$listeners.cellDoubleClicked)this.$listeners.cellDoubleClicked(e);else{let t=e.colDef||{};t=u.default.find(this.columns,s=>t.key&&s.key==t.key||t.field&&s.field==t.field);let a=u.default.find(this.columns,{type:"link"});a&&(!t.type||["span","tooltip","enum"].includes(t.type))&&a.cellRendererParams.onClick instanceof Function&&a.cellRendererParams.onClick(e.data)}},sortChanged(){var e=this.gridColumnApi.getColumnState(),t=e.filter(function(s){return s.sort!=null}).map(function(s){return{sort:s.colId,order:s.sort,sortIndex:s.sortIndex}});let a=t[0]||{};if(a.order===void 0?(Reflect.deleteProperty(this.sortParams,"sort"),Reflect.deleteProperty(this.sortParams,"order")):this.sortParams={sort:a.sort,order:a.order},this.dataApi&&!this.disablePage)this.currentPage=1,this.tableRefresh();else{let s=[];if(a.order===void 0)if(this.dataApi){let n=u.default.cloneDeep(this.tableData);n=u.default.orderBy(n,["_initialseq"],["asc"]),this.tableData=n}else this.tableData=u.default.cloneDeep(this.value);else this.noSortLine>-1&&(s=this.tableData.slice(0,this.noSortLine),this.tableData.splice(0,this.noSortLine)),this.tableData.sort((n,i)=>{if(typeof n[this.sortParams.sort]=="number"&&typeof i[this.sortParams.sort]=="number"){let l=isNaN(parseFloat(n[this.sortParams.sort]))?0:parseFloat(n[this.sortParams.sort]),o=isNaN(parseFloat(i[this.sortParams.sort]))?0:parseFloat(i[this.sortParams.sort]);return this.sortParams.order==="asc"?l-o:o-l}else{let l=n[this.sortParams.sort]||"",o=i[this.sortParams.sort]||"";return this.sortParams.order==="asc"?l.localeCompare(o,"zh-CN"):o.localeCompare(l,"zh-CN")}}),this.noSortLine>-1&&this.tableData.splice(0,0,...s);this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})}this.$emit("on-sort-change",a)},refreshCells(){this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})},refreshHeader(){this.$nextTick().then(()=>{this.gridApi.refreshHeader()})},redrawRows(){this.$nextTick().then(()=>{this.gridApi.redrawRows()})},toggleFullScreen(){top!==self&&(top.toggleFullScreen(),this.shareFullSreen||this.$nextTick(()=>{top.document.getElementsByClassName("fullscreen-fixed")[0].style.zIndex=1e5})),this.$store.dispatch("updateIsFullSreen",!this.shareFullSreen),this.fullSreen=!this.fullSreen},getRowHeight(){let e={"ind-default-theme":42,"ind-small-theme":28};return(this.$config.agLineHeight||e[this.getTheme]||0)+this.rowAddHeight},onGridReady(e){window.gridApi=this.gridApi=e.api,this.gridColumnApi=e.columnApi},rowSelected(e){var s,n;if(this.selecting)return;let t=this.flatColumns.filter(i=>i.autoMergeRow);if(t!=null&&t.length){let i=((s=t[0])==null?void 0:s.field)||((n=t[0])==null?void 0:n.key);u.default.forEach(t,d=>{typeof d.autoMergeRow=="string"&&(i=d.autoMergeRow)});let l=this.tableRowSpanMergeIndexMap[i],o={};u.default.forEach(l,(d,f)=>{let r=parseInt(f),h=r+d,R=u.default.range(r,h);for(let U=r;U<h;U++)o[U]=R});let c={};u.default.forEach(this.rowDataFiltered,(d,f)=>{c[f+""]=d.uuid});let p=o[e.node.rowIndex]||[];if(e.node.selected){let d=this.rowDataFiltered.filter((f,r)=>p.includes(r));this.selecting=!0,this.setSelection(d)}else{let d=this.getSelection();d.length>0&&u.default.forEach(p,f=>{u.default.remove(d,(r,h)=>r.uuid==c[f+""])}),this.selecting=!0,this.setSelection(d,!0)}}setTimeout(()=>{this.selecting=!1},100);var a=this.gridApi.getSelectedRows();this.$emit("on-select-change",a)},selectionChanged(){var e=this.gridApi.getSelectedRows();this.$emit("on-select-change",e)},resetTableSize(e){this.tableSize=e,this.optionDropdownVisible=!1},dealColumnScale(e){var t;if(!v.isNil((t=e.cellRendererParams)==null?void 0:t.scale))return e.cellRendererParams.scale;if(e.isSwitchUnit){const a=this.unitType.toLowerCase();return this[`${a}Scale`]||2}return null},tableColumnsInner(e,t){var s,n,i,l,o,c,p,d;let a=[];for(let f=0;f<e.length;f++){let r=e[f],h={resizable:!0,headerName:r.title||r.headerName,width:r.width?parseInt(r.width)-(this.getTheme=="ind-small-theme"?10:0):r.width,minWidth:r.minWidth?parseInt(r.minWidth)-(this.getTheme=="ind-small-theme"?10:0):r.minWidth,maxWidth:r.maxWidth?parseInt(r.maxWidth)-(this.getTheme=="ind-small-theme"?10:0):r.maxWidth,pinned:r.fixed||r.pinned,align:r.align||"left",cellDataType:r.cellDataType||"text",headerTooltip:(i=(n=(s=this.$store)==null?void 0:s.getters)==null?void 0:n.getIndexDesc)==null?void 0:i[r.standardField||r.key||r.field],suppressStickyLabel:!0,suppressMovable:!!r.suppressMovable};if(r.flex&&(h.flex=r.flex),r.key&&(h.key=r.key),r.showRowGroup&&(h.showRowGroup=r.showRowGroup),r.rowGroup&&(h.rowGroup=r.rowGroup),r.hide&&(h.hide=r.hide),r.align&&(h.align=r.align),r.dataType&&(h.dataType=r.dataType),r.headerTooltip&&(h.headerTooltip=h.headerTooltip||r.headerTooltip),r.tooltipShowDelay&&(h.tooltipShowDelay=r.tooltipShowDelay),v.isNil(r.wrapHeaderText)||(h.wrapHeaderText=r.wrapHeaderText),r.autoHeaderHeight&&(h.autoHeaderHeight=r.autoHeaderHeight),h.cellClass=" ag-wrap-cell ",r.cellClass&&typeof r.cellClass=="string"&&(h.cellClass=h.cellClass+r.cellClass),r.cellClass&&r.cellClass instanceof Array&&(h.cellClass=h.cellClass+r.cellClass.join(" ")),r.cellStyle&&(h.cellStyle=r.cellStyle),r.headerClass&&(h.headerClass=r.headerClass),r.filter&&(h.filter=r.filter),r.filterParams&&(h.filterParams=r.filterParams),v.isNil(r.wrapText)||(h.wrapText=r.wrapText,r.wrapText&&(h.cellClass=h.cellClass+" ag-wrap-cell")),r.autoHeight&&(h.autoHeight=r.autoHeight),r.initialSort&&(h.initialSort=r.initialSort),r.rowSpan&&(h.rowSpan=r.rowSpan),r.colSpan&&(h.colSpan=r.colSpan),r.tree&&(h.cellRenderer="agGroupCellRenderer",h.showRowGroup=!0,this.groupDisplayType="custom",(l=r==null?void 0:r.cellRendererParams)!=null&&l.checkbox?this.rowSelection="multiple":this.rowSelection="single"),r.rowDrag&&(h.rowDrag=r.rowDrag),h.sortable=r.sortable,r.type=="index")h.cellRenderer=function(R){return R.node.rowPinned?"":R.node.rowIndex+1},h.cellClass=h.cellClass+" ag-center-aligned-cell";else if(r.type=="checkbox")h.headerName="",h.headerCheckboxSelection=!0,h.checkboxSelection=r.checkboxSelection||!0,h.showDisabledCheckboxes=!0,this.rowSelection="multiple",h.cellClass=h.cellClass+" ag-center-aligned-cell ind-ag-check-cell",this.suppressRowClickSelection=!1;else if(r.type=="radio")h.headerCheckboxSelection=!1,h.checkboxSelection=r.checkboxSelection||!0,h.showDisabledCheckboxes=!0,this.rowSelection="single",this.suppressRowClickSelection=!1,h.cellClass=h.cellClass+" ag-center-aligned-cell ind-ag-check-cell ind-radio";else{r.field&&(h.field=r.field),!h.field&&isNaN(r.key)&&(h.field=r.key);const R={tooltip:"AgTooltip",input:"AgInput",select:"AgSelect",datepicker:"AgDate",timepicker:"AgTime",treeSelect:"AgTreeSelect",button:"AgButton",link:"AgLink",enum:"AgEnum",format:"AgFormat",image:"AgImage",progress:"AgProgress",custom:"AgCustom",switch:"AgSwitch"};if(r.type&&(r.isSum?h.cellRendererSelector=U=>U.node.rowPinned?{component:"AgFormat",params:{...r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:{component:R[r.type],params:{...r.cellRendererParams,scopedSlots:this.$scopedSlots,scaleFn:()=>this.dealColumnScale(r)}}:h.cellRendererSelector=U=>{if(!U.node.rowPinned)return{component:R[r.type],params:{...r.cellRendererParams,scopedSlots:this.$scopedSlots,scaleFn:()=>this.dealColumnScale(r)}}}),!r.type&&(r.isSum||!v.isNil((o=r==null?void 0:r.cellRendererParams)==null?void 0:o.scale)||((c=r==null?void 0:r.cellRendererParams)==null?void 0:c.dateFormat)||r.isSwitchUnit)&&(h.cellRendererSelector=U=>U.node.rowPinned?{component:"AgFormat",params:{...r==null?void 0:r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:{component:"AgFormat",params:{...r==null?void 0:r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}),r.cellRendererParams&&(h.cellRendererParams=r.cellRendererParams,r.type=="input"&&((d=(p=r.cellRendererParams)==null?void 0:p.props)==null?void 0:d.number)&&(h.cellDataType="number")),r.cellRenderer&&(h.cellRenderer=r.cellRenderer),r.valueGetter&&(h.valueGetter=r.valueGetter),r.cellRendererSelector&&(h.cellRendererSelector=r.cellRendererSelector),r.valueSetter&&v.isString(r.valueSetter)?h.valueSetter=r.valueSetter:r.valueSetter&&(h.valueSetter=U=>{const{newValue:S,data:Z,colDef:L}=U;if(this.isRevertingOldValue)return Z[L.field||L.key]=S,!0;const Q=r.valueSetter(U);if(!Q){const{oldValue:A,column:H}=U;this.isRevertingOldValue=!0,Z[L.field||L.key]=S,setTimeout(()=>{U.node.setDataValue(H,A),this.isRevertingOldValue=!1},0)}if(!this.isRevertingOldValue)return Q}),this.columnCalcMap&&this.columnCalcMap[r.field||r.key]){let U=this.columnCalcMap[r.field||r.key];h.valueSetter=S=>{S.data[r.field||r.key]=S.newValue;let Z=[];u.default.forEach(U,(Q,A)=>{var H;Z.push({rltKey:A,ast:Q,precision:((H=r==null?void 0:r.cellRendererParams)==null?void 0:H.scale)||2,errRtn:0})});let L={calcRules:Z};return pi(S.data,L),!0}}r.valueFormatter&&(h.valueFormatter=r.valueFormatter),r.align&&(h.cellClass=h.cellClass+(r.align=="right"?" ag-right-aligned-cell":r.align=="center"?" ag-center-aligned-cell":""))}r.autoMergeRow&&(h.rowSpan=R=>R.node.rowPinned?0:this.tableRowSpanMergeIndexMap[R.colDef.field]&&this.tableRowSpanMergeIndexMap[R.colDef.field][R.node.rowIndex+""]||0,h.cellClassRules={"cell-span":R=>this.tableRowSpanMergeIndexMap[R.colDef.field]&&this.tableRowSpanMergeIndexMap[R.colDef.field][R.node.rowIndex+""]}),h.cellClass=h.cellClass+" "+r.type+" autoMergeRow-"+r.autoMergeRow,r.cellClassRules&&(h.cellClassRules?h.cellClassRules={...r.cellClassRules,...h.cellClassRules}:h.cellClassRules=r.cellClassRules),a.push(h),r.children&&r.children.length&&(h.children=this.tableColumnsInner(r.children))}return t||(this.cloneColumns2=u.default.cloneDeep(a)),a},columnsFilter(){this.columnID=di(JSON.stringify(this.$route.path+this.cloneColumns2.length));let e=this.cloneColumns2,t=new Array,a=localStorage.getItem("tableColumns");if(a!=null){let n=JSON.parse(a).filter(i=>i.id==this.columnID);if(n.length==1){let i=n[0].value;e.forEach(l=>{let o="";o+=l.key||"",o+=l.type||"",o+=l.title,o!=""&&i.filter(p=>p==o).length>=1&&t.push(l)})}}t.length>0?this.cloneColumns=u.default.cloneDeep(t):this.cloneColumns=u.default.cloneDeep(this.cloneColumns2),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.cloneColumns2.length!=this.cloneColumns.length&&(this.checkAll=!1),this.checkAllGroup=this.selectedColumnNameArr.slice(0)},getParams(){return Object.assign({},this.paginationParams,this.sortParams,this.searchParams)},onPageChange(e){this.currentPage=e,this.tableRefresh(),this.$emit("on-page-change",e)},onPageSizeChange(e){this.limitNumber=e,this.tableRefresh(),this.$emit("on-page-size-change",e)},handleCheckAll(){this.checkAll=!this.checkAll,this.checkAll?this.checkAllGroup=this.columnNameArr.slice(0):this.checkAllGroup=[]},checkAllGroupChange(e){e.length===this.columnNameArr.length?this.checkAll=!0:e.length>0?this.checkAll=!1:this.checkAll=!1},tableSettingToggle(e){this.btnSel=e,this.optionDropdownVisible=!this.optionDropdownVisible},closeTableSettingDropdown(){this.optionDropdownVisible=!1},columnSelect(){let e=[];this.columns.forEach(t=>{for(let a of this.checkAllGroup)if(t.title===a){e.push(t);break}}),this.cloneColumns=e,this.tableColumns=this.tableColumnsInner(this.cloneColumns),this.optionDropdownVisible=!1},columnSave(){this.columnSelect();let e=new Array;this.cloneColumns.forEach(s=>{let n="";n+=s.key||"",n+=s.type||"",n+=s.title,n!=""&&e.push(n)});let t=localStorage.getItem("tableColumns"),a=null;if(t==null)a=new Array;else{a=JSON.parse(t);let s=a.findIndex(n=>n.id==this.columnID);s>-1&&a.splice(s,1)}a.push({id:this.columnID,value:e}),localStorage.setItem("tableColumns",JSON.stringify(a)),this.optionDropdownVisible=!1},columnClear(){let e=localStorage.getItem("tableColumns"),t=null;if(e==null)t=new Array;else{t=JSON.parse(e);let a=t.findIndex(s=>s.id==this.columnID);a>-1&&t.splice(a,1)}localStorage.setItem("tableColumns",JSON.stringify(t)),this.cloneColumns=u.default.cloneDeep(this.cloneColumns2),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.checkAll=!1,this.handleCheckAll(),this.optionDropdownVisible=!1},forceUpdate(){this.hackReset=!1,this.$nextTick(()=>{this.hackReset=!0})},renderSumRow:u.default.debounce(async function(){var t;if(u.default.some(this.flatColumns,a=>a.isSum)){console.time("calcSum");let a=u.default.filter(this.flatColumns,f=>f.isSum),s=u.default.remove(a,f=>v.isString(f.isSum)),n=u.default.remove(a,f=>f.isSum instanceof Function);const i={};u.default.forEach(s,f=>{It(i,f.isSum,f.field||f.key)});let l={};for(let f=0;f<this.flatColumns.length;f++)if(!["checkbox","radios","index"].includes((t=this.flatColumns[f])==null?void 0:t.type)){let r=this.flatColumns[f];l[r.field||r.key]="\u5408\u8BA1";break}a.forEach(f=>l[f.field||f.key]=0),l=u.default.reduce(this.rowDataFiltered,(f,r,h)=>(a.forEach(R=>{if(v.isString(R.isSum))return;let U=R.field||R.key,S=this.tableRowSpanMergeIndexMap[U],Z=[];u.default.forEach(S,(L,Q)=>{let A=u.default.range(Q,parseInt(Q)+L);Z.push(...A.slice(1))}),Z.includes(h)||(l[U]=u.default.round(l[U]+(!r[U]||isNaN(r[U])?0:parseFloat(r[U])),6))}),f),l),u.default.forEach(n,f=>{l[f.field||f.key]=f.isSum(this.rowDataFiltered,f)});let o=[l],c={};u.default.forEach(i,(f,r)=>{u.default.merge(c,f)});let p=[];u.default.forEach(c,(f,r)=>{var R;let h=u.default.find(s,U=>U.field==r||U.key==r);p.push({rltKey:r,ast:f,precision:((R=h==null?void 0:h.cellRendererParams)==null?void 0:R.scale)||2,errRtn:0})}),zt(o,{calcRules:p}),this.topRows=this.pinnedTopRowDataWithUnit?u.default.concat(this.pinnedTopRowDataWithUnit,o):o,console.timeEnd("calcSum")}else this.topRows=this.pinnedTopRowDataWithUnit},5),async renderTreeData(e){if(this.treeData=u.default.some(e,t=>{var a,s;return((a=t.children)==null?void 0:a.length)||((s=t.treeLevelFlag)==null?void 0:s.length)}),this.renderTreeFlag(e),this.treeData){let t=[];He(null,e,(a,s,n)=>{a.seq=n,t.push(a)}),e=t}return e},renderTreeFlag(e){let t=u.default.find(this.columns,{tree:!0});if(He(null,e,(s,n,i)=>{s.uuid=s.uuid||v.uuid()}),u.default.isEmpty(t))return;let a=(t==null?void 0:t.field)||(t==null?void 0:t.key);He(null,e,(s,n,i)=>{if(s.treeLevelFlag=n?[...n.treeLevelFlag,s[a]]:[s[a]],n){let l=n.path?u.default.cloneDeep(n.path):[n.uuid];l.push(s.uuid),s.path=l}else s.path=[s.uuid]})},tableRefresh:function(e){this.dataApi&&!e?(this.gridApi&&this.gridApi.hideOverlay(),this.tableLoading=!0,this.dataApi(Object.assign({},this.disablePage?{}:this.paginationParams,this.sortParams,this.searchParams)).then(async t=>{if(t){this.overlayNoRowsTemplate='<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>',this.$emit("on-data-load",t);let a=t.data.rows||t.data.records||[];this.disablePage&&t.data instanceof Array&&(a=t.data),this.renderDataFn&&(a=this.renderDataFn(a)),a.forEach((s,n)=>{s._initialseq=n}),this.unitType!=this.defaultUnitType&&a.forEach(s=>{this.switchCols.forEach(n=>{he(this.defaultUnitType,this.unitType,s,n)})}),this.tableData=await this.renderTreeData(a),this.totalNumber=t.data.total||0,this.$emit("on-data-format-load",t)}this.tableLoading=!1}).catch(()=>{this.tableData=[],this.totalNumber=0,this.tableLoading=!1})):this.dataApi||(this.totalNumber=this.value.length),this.optionDropdownVisible=!1},setUnitType(e){this.unitType=e},toggleUnitIfNeeded:u.default.debounce(async function(){setTimeout(()=>{if(this.pinnedTopRowDataWithUnit&&this.pinnedTopRowDataWithUnit.length){let t=u.default.cloneDeep(this.pinnedTopRowDataWithUnit);this.unitType!=this.defaultUnitType&&(t.forEach(a=>{this.switchCols.forEach(s=>{he(this.defaultUnitType,this.unitType,a,s)})}),this.pinnedTopRowDataWithUnit=t,this.renderSumRow())}let e=u.default.cloneDeep(this.tableData);this.unitType!=this.defaultUnitType&&(e.forEach(t=>{this.switchCols.forEach(a=>{he(this.defaultUnitType,this.unitType,t,a)})}),this.$emit("input",e))},10)},1),getSelection(){return this.gridApi.getSelectedRows()},clearSelection(){this.gridApi.getSelectedNodes().forEach(e=>e.setSelected(!1))},selectAll(){this.gridApi.selectAll()},deselectAll(){this.gridApi.deselectAll()},setDefaultSelection(e,t){console.log("setIndexSelection",e);let a=(e||[]).map(i=>i[this.uuid]);console.log("setIndexSelection sels",a);let s=[],n=[];setTimeout(()=>{const i=this;this.gridApi.forEachNode(l=>{console.log("setIndexSelection each include node",a.includes(l.data.uuid)),a.includes(l.data[i.uuid])?s.push(l):t||n.push(l)}),console.log("setIndexSelection selected",s),console.log("setIndexSelection deselected",n),this.gridApi.setNodesSelected({nodes:s,newValue:!0}),this.gridApi.setNodesSelected({nodes:n,newValue:!1})},50)},setSelection(e,t){let a=(e||[]).map(i=>i[this.rowKey||"uuid"]),s=[],n=[];setTimeout(()=>{this.gridApi.forEachNode(i=>{a.includes(i.data[this.rowKey||"uuid"])?s.push(i):t&&n.push(i)}),this.gridApi.setNodesSelected({nodes:s,newValue:!0}),this.gridApi.setNodesSelected({nodes:n,newValue:!1})},50)},getXData(){if(this.unitType=="X")return this.tableData;{let e=u.default.cloneDeep(this.tableData);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"X",t,a)})}),e}},getWZData(){if(this.unitType=="WZ")return this.tableData;{let e=u.default.cloneDeep(this.tableData);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"WZ",t,a)})}),e}},getXSum(){if(this.unitType=="X")return this.topRows;{let e=u.default.cloneDeep(this.topRows);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"X",t,a)})}),e}},getWZSum(){if(this.unitType=="WZ")return this.topRows;{let e=u.default.cloneDeep(this.topRows);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"WZ",t,a)})}),e}},flattenData(e){return u.default.reduce(e,(t,a)=>{let s=a.children&&a.children.length?this.flattenData(a.children):[];return[...t,a,...s]},[])},async updateTableData(e,t=!0){if(!this.rowKey){console.warn("\u8BF7\u4F20rowKey\uFF0C\u8C22\u8C22");return}this.updating=!0;const a=this.flattenData(this.value),s=u.default.reduce(a||[],(n,i)=>(Object.assign(n,{[i[this.rowKey]]:i}),n),{});this.gridApi.forEachNode(n=>{e(n.data,(i,l)=>{if(t){const c=s[n.data[this.rowKey]];c[i]=l}const o=this.gridColumnApi.getColumn(i);o&&n.setDataValue(o,l)})}),await this.$nextTick(),this.updating=!1}}},fi={};var Rm=b(vm,Vm,Tm,!1,Um,null,null,null);function Um(e){for(let t in fi)this[t]=fi[t]}var Qt=function(){return Rm.exports}(),gm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"export-data"})},bm=[];const Sm={},Vi={};var ym=b(Sm,gm,bm,!1,km,null,null,null);function km(e){for(let t in Vi)this[t]=Vi[t]}var Fm=function(){return ym.exports}(),Wm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"index-manager"},[a("IndButton",{attrs:{bizType:"reset"},on:{click:e.manageIndex}},[e._v(" \u5217\u7B5B\u9009 ")]),a("IndDrawer",{staticClass:"index-manager",attrs:{width:"800",title:"\u9884\u7F6E\u5217\u7BA1\u7406",lazyRender:!1},model:{value:e.showManager,callback:function(s){e.showManager=s},expression:"showManager"}},[a("div",{staticClass:"ind-flex-column height100"},[a("IndTable",{ref:"mangeTable",staticStyle:{padding:"0"},attrs:{columns:e.manageColumns,disablePage:"",showTableOption:!1,isIndexManageTable:"",rowKey:"uuid"},model:{value:e.curIndex.columnList,callback:function(s){e.$set(e.curIndex,"columnList",s)},expression:"curIndex.columnList"}})],1),a("IndButtonGroup",{attrs:{slot:"footer",split:"",right:""},slot:"footer"},[a("IndButton",{attrs:{bizType:"save",loading:e.saving},on:{click:e.apply}},[e._v(" \u786E\u8BA4 ")]),a("IndButton",{attrs:{bizType:"save",ghost:"",loading:e.saving},on:{click:function(s){e.showManager=!1}}},[e._v(" \u53D6\u6D88 ")])],1)],1)],1)},Zm=[];function ot(e,t,a){Array.isArray(t)&&t.length&&u.default.forEach(t,(s,n)=>{let i=!1;if(typeof a=="function")try{const l=a(s,e,n);typeof l=="boolean"&&(i=l)}catch(l){console.error(l)}i||ot(s,s.children,a)})}const xm={name:"IndexManage",props:{funId:String,tableRef:Object},computed:{isTreeColumn(){return u.default.some(this.curIndex.columnList,e=>{var t,a;return((t=e.children)==null?void 0:t.length)||((a=e.treeLevelFlag)==null?void 0:a.length)})}},data(){return{indexCacheList:[],curIndex:{columnList:[],titleName:"",id:""},manageColumns:[],titleForm:{titleName:""},fieldList:[{formKey:"titleName",title:"\u9884\u7F6E\u65B9\u6848\u540D",type:"input",required:!0}],showManager:!1,saving:!1}},watch:{isTreeColumn(){this.renderManageColumns()}},mounted(){let e;if(typeof window!="undefined"&&(e=localStorage.getItem("index-cache"+this.funId)),e){let t=JSON.parse(e);t.forEach(a=>{ot(null,a.columnList,s=>{s.checked=s.checked=="1",s.pinned=s.pinned||"none"})}),this.indexCacheList=t}else this.indexCacheList=[];this.renderManageColumns()},methods:{async syncToStorage(){let e=u.default.cloneDeep(this.indexCacheList);e.forEach(t=>{ot(null,t.columnList,a=>{a.checked=a.checked?"1":"0",a.pinned=="none"&&delete a.pinned})}),typeof window!="undefined"&&localStorage.setItem("index-cache"+this.funId,JSON.stringify(e)),await this.$nextTick()},renderManageColumns(){console.log("this.isTreeColumn",this.isTreeColumn),this.isTreeColumn?this.manageColumns=[{field:"headerName",headerName:"\u5217\u540D",minWidth:200,flex:2,tree:!0,cellRendererParams:{checkbox:!0,suppressCount:!0}},{field:"pinned",headerName:"\u9501\u5B9A",width:200,type:"select",cellRendererParams:{datas:[{K:"none",V:"\u4E0D\u9501\u5B9A"},{K:"left",V:"\u9501\u5B9A\u5230\u5DE6\u4FA7"},{K:"right",V:"\u9501\u5B9A\u5230\u53F3\u4FA7"}]}},{field:"width",headerName:"\u5217\u5BBD",width:100,type:"input",cellRendererParams:{props:{number:!0,type:"number"}}}]:this.manageColumns=[{headerName:"",minWidth:60,width:60,type:"checkbox"},{field:"headerName",headerName:"\u5217\u540D",minWidth:200,flex:2},{field:"pinned",headerName:"\u9501\u5B9A",flex:1,minWidth:100,type:"select",cellRendererParams:{datas:[{K:"",V:"\u4E0D\u9501\u5B9A"},{K:"left",V:"\u9501\u5B9A\u5230\u5DE6\u4FA7"},{K:"right",V:"\u9501\u5B9A\u5230\u53F3\u4FA7"}]}},{field:"width",headerName:"\u5217\u5BBD",width:100,type:"input",cellRendererParams:{props:{number:!0,type:"number"}}}],console.log("this.manageColumns is",this.manageColumns)},triggerToogle(e){if(e!="manage"){let t=u.default.find(this.indexCacheList,{id:e})||{};t&&(this.curIndex=t,this.$emit("resetColumns",u.default.cloneDeep(this.curIndex.columnList)))}},apply(){let e=u.default.cloneDeep(this.curIndex),t=this.$refs.mangeTable.getSelection();ot(null,e.columnList,a=>{a.checked=u.default.some(t,{field:a.field})}),this.$emit("resetColumns",u.default.cloneDeep(e.columnList)),this.showManager=!1},async saveIndex(e){if(await this.$refs.editForm.validate()){let t=u.default.cloneDeep(this.indexCacheList);if(this.curIndex.id){let a=u.default.find(t,{id:this.curIndex.id});u.default.assign(a,u.default.cloneDeep(this.curIndex),this.titleForm)}else{let a=u.default.cloneDeep(this.curIndex);a.titleName=this.titleForm.titleName,a.id=new Date().getTime()+""+Math.ceil(Math.random()*1e4),a.isDefault=e?"1":"0",t.push(a)}this.indexCacheList=t,await this.syncToStorage(),this.$emit("resetColumns",u.default.cloneDeep(this.curIndex.columnList))}},saveIndexAsDefault(){this.saveIndex(!0)},saveTableIndex(){},saveAsIndex(){},async manageIndex(){this.showManager=!0;let e=u.default.cloneDeep(this.curIndex);if(!e.id){let t=u.default.cloneDeep(this.tableRef.columns);ot(null,t,a=>{var s;a.field=a.field||a.key,a.headerName=a.headerName||a.title,(s=a.children)!=null&&s.length||(a.checked=!a.hide),a.pinned=a.fixed||a.pinned||"none",!a.width&&a.minWidth&&(a.width=a.minWidth)}),e.columnList=t,this.curIndex=e,this.titleForm={titleName:""}}console.log("manageIndex this.curIndex",this.curIndex),this.setTableSelected()},async editIndex(e){this.curIndex=e,this.titleForm={titleName:e.titleName},this.setTableSelected()},async setTableSelected(){setTimeout(()=>{let e=[];ot(null,this.curIndex.columnList,t=>{t.checked&&e.push(t)}),this.$refs.mangeTable.setSelection(e)},10)},async removeIndex(e,t){try{await this.$Modal.confirm({title:"\u5220\u9664\u64CD\u4F5C",content:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",loading:!0});let a=u.default.cloneDeep(this.indexCacheList);u.default.remove(a,{id:t}),this.indexCacheList=a,this.syncToStorage()}catch(a){console.log(a)}this.$Modal.remove()}}},Ti={};var Mm=b(xm,Wm,Zm,!1,wm,null,null,null);function wm(e){for(let t in Ti)this[t]=Ti[t]}var Em=function(){return Mm.exports}(),Dm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"lineChart",staticStyle:{width:"100%",height:"100%"}})},Cm=[];const _m={name:"LineChart",computed:{chartData(){return this.getData("data")},xxAxis(){return this.getData("xAxis")}},mounted(){setTimeout(()=>{this.initChart()},0),window.addEventListener("resize",this.handleResize)},beforeDestroy(){window.removeEventListener("resize",this.handleResize)},methods:{getData(e,t=[]){var a,s;return((s=(a=this.params)==null?void 0:a.value)==null?void 0:s[this.params.config[e]])||t},initChart(){const e=this.$refs.lineChart;if(!e){console.error("Chart container not found!");return}const t=echarts.init(e);this.setChartOption(t)},setChartOption(e){var n,i,l,o;e.off("click");const t=this.$refs.lineChart.offsetHeight,a=t*.8,s={grid:{left:"5%",right:"5%",top:(t-a)/2,bottom:(t-a)/2,containLabel:!1},tooltip:{trigger:"item",formatter:c=>`${c.name}: ${c.value}`,position:(c,p,d,f,r)=>{let h=c[0]+10,R=c[1]-30;return[h,R]},zIndex:1e3},xAxis:{type:"category",data:this.xxAxis,show:!1},yAxis:{type:"value",show:!1},series:[{data:this.chartData,type:"line",smooth:!0,symbolSize:4,symbol:(i=(n=this.params)==null?void 0:n.config)!=null&&i.symbol?this.params.config.symbol:"circle",itemStyle:{color:(o=(l=this.params)==null?void 0:l.config)!=null&&o.color?this.params.config.color:"rgb(19, 127, 209)"}}]};e.on("click",c=>{console.log("Clicked item:",c)}),e.setOption(s)},handleResize(){const e=this.$refs.lineChart,t=echarts.getInstanceByDom(e);t&&(this.setChartOption(t),t.resize())}}},Ni={};var Jm=b(_m,Dm,Cm,!1,Ym,null,null,null);function Ym(e){for(let t in Ni)this[t]=Ni[t]}var Bm=function(){return Jm.exports}(),zm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"lambo-grid-table",class:[e.fullSreen?"fullscreen-fixed":""]},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.$slots.search,expression:"$slots.search"}],ref:"search",staticClass:"search"},[e._t("search")],2),a("div",{directives:[{name:"show",rawName:"v-show",value:e.$slots.tip,expression:"$slots.tip"}],ref:"tip",staticClass:"tip"},[e._t("tip")],2),a("div",{directives:[{name:"show",rawName:"v-show",value:e.$slots.important-e.tip,expression:"$slots.important - tip"}],ref:"important-tip",staticClass:"important-tip"},[a("Icon",{attrs:{type:"md-information-circle"}}),e._t("important-tip")],2),a("div",{ref:"buttons",staticClass:"other-button"},[a("Row",[[a("i-col",{staticStyle:{"text-align":"left"},attrs:{flex:"1 1 0%"}},[e.showUnitSwitch&&e.isShowUnitSwitch?a("IndUnitRadio",{staticStyle:{"margin-top":"var(--ind-unit-switch-bottom)","line-height":"1","margin-left":"10px"},attrs:{isShowWX:e.isShowWX,isShowJ:e.isShowJ},model:{value:e.unitType,callback:function(s){e.unitType=s},expression:"unitType"}}):e._e()],1)],a("i-col",{directives:[{name:"show",rawName:"v-show",value:e.showUnitSwitch&&e.isShowUnitSwitch||e.showTableOption||e.$slots.options,expression:"(showUnitSwitch && isShowUnitSwitch) || showTableOption || $slots.options"}],staticStyle:{"text-align":"right"},attrs:{flex:"0 0 auto"}},[a("div",{staticClass:"ind-flex end"},[a("div",{staticStyle:{"line-height":"var(--ivu-form-item-content-line-height)","padding-bottom":"calc(var(--ind-table-button-padding) + 2px)","margin-right":"10px"}},[e._t("options")],2)])])],2)],1),a("IndLoadingPanel",{attrs:{loading:e.tableLoading}},[e.refreshTable?e._e():a("ag-grid-vue",e._g(e._b({ref:"tableRef",staticClass:"ag-theme-balham",style:{height:e.height&&!e.fullSreen?e.height+"px":"100%"},attrs:{id:"agTable",suppressCellFocus:!0,suppressMenu:!0,suppressContextMenu:!e.showTableOption,defaultColDef:e.defaultColDef,headerHeight:e.headerHeight,rowHeight:e.getRowHeightProp?e.getRowHeightProp():e.getRowHeight(),getRowHeight:e.getRowHeightProp||e.getRowHeight,rowData:e.rowDataFiltered,suppressRowClickSelection:(e.isPc||e.isEditTable)&&e.rowSelection=="multiple"||e.suppressRowClickSelection,rowSelection:e.rowSelection,rowMultiSelectWithClick:!e.isPc&&!e.isEditTable&&(e.rowSelection=="multiple"||e.rowMultiSelectWithClick),columnDefs:e.tableColumns,localeText:e.localeText,singleClickEdit:!0,pinnedTopRowData:e.topRows,pinnedBottomRowData:e.pinnedBottomRowData,suppressRowTransform:!0,stopEditingWhenCellsLoseFocus:!0,getRowClass:e.getRowClassCommon,getRowId:e.getRowId,tooltipShowDelay:500,overlayNoRowsTemplate:e.noRowsTemplate||e.overlayNoRowsTemplate,treeData:e.treeData,getDataPath:e.getDataPath,autoGroupColumnDef:e.autoGroupColumnDef,groupDisplayType:e.groupDisplayType,groupSelectsChildren:e.groupSelectsChildren,groupDefaultExpanded:e.groupDefaultExpanded,getContextMenuItems:e.getContextMenuItems},on:{sortChanged:e.sortChanged,"selection-changed":e.selectionChanged,rowSelected:e.rowSelected,"grid-ready":e.onGridReady,cellClicked:e.cellClicked,cellDoubleClicked:e.cellDoubleClicked}},"ag-grid-vue",e.$attrs,!1),e.$listeners))],1),e.showBottom?a("div",{ref:"bottom"},[a("Row",{staticStyle:{"margin-top":"10px"}},[a("i-col",{staticStyle:{"text-align":"left"},attrs:{span:"18"}},[a("Page",{directives:[{name:"show",rawName:"v-show",value:!e.disablePage,expression:"!disablePage"}],attrs:{size:"small",total:e.totalNumber,current:e.currentPage,"page-size":e.limitNumber,"show-sizer":"","show-total":"","show-elevator":""},on:{"on-change":e.onPageChange,"on-page-size-change":e.onPageSizeChange}}),a("span",{directives:[{name:"show",rawName:"v-show",value:e.disablePage,expression:"disablePage"}]},[e._v("\u5171 "+e._s(e.tableData.length)+" \u6761\u6570\u636E")])],1)],1)],1):e._e()],1)},Im=[];function Qm(e){var t="A",a="C",s="V",n="D",i="PageUp",l="PageDown",o="Tab",c="ArrowLeft",p="ArrowUp",d="ArrowRight",f="ArrowDown",r="F2",h="Backspace",R="Escape",U=" ",S="Delete",Z="Home",L="End",Q=e.event,A=Q.key,H=[i,l,o,r,R],oe=[c,d,p,f,h,S,U,Z,L];if((Q.ctrlKey||Q.metaKey)&&(H.push(t),H.push(s),H.push(a),H.push(n)),e.editing||(H=H.concat(oe)),e.column.getId()==="country"&&(A===p||A===f))return!1;var ue=H.some(function(ne){return ne===A||A.toUpperCase()===ne});return ue}function Xe(e,t,a){Array.isArray(t)&&t.length&&u.default.forEach(t,(s,n)=>{let i=!1;if(typeof a=="function")try{const l=a(s,e,n);typeof l=="boolean"&&(i=l)}catch(l){console.error(l)}i||Xe(s,s.children,a)})}const Gm={name:"IndMobileTable",components:{ExportData:Fm,IndexManage:Em,Tooltip:$e,AgTooltip:Jn,AgInput:Bn,AgSelect:In,AgDate:Gn,AgTreeSelect:Ln,AgButton:$n,AgLink:Xn,AgEnum:An,AgFormat:qn,AgImage:ti,AgChart:Bm},props:{rowSpanDefs:Array,headerHeight:{type:Number,default:28},getRowHeightProp:Function,rowMultiSelectWithClick:Boolean,pinnedTopRowData:Array,pinnedBottomRowData:Array,rowSpanColumns:Array,rowSpanIndexCol:String,getRowClass:Function,paramLeft:String,paramRight:String,exportFileName:String,rowKey:{type:String,default:""},disablePage:{type:Boolean,default:!1},dataChildren:{type:Boolean,default:!1},noSortLine:{type:Number,default:-1},dataApi:{type:Function,default:null},searchParams:{type:Object,default(){return{}}},value:{type:Array,default(){return[]}},columns:{type:Array,default(){return[]}},size:{type:String,validator(e){return["small","large","default"].indexOf(e)>-1},default:"default"},width:{type:Number},height:{type:[Number,String]},rowClassName:{type:Function,default:e=>{if(e&&e.color){if(e.color=="Blue")return"demo-table-Blue-row";if(e.color=="red")return"demo-table-red-row"}if(e&&e.fontColor){if(e.fontColor=="yellow")return"demo-table-yellow-font-row";if(e.fontColor=="red")return"demo-table-red-font-row"}}},loading:{type:Boolean,default:!1},showTableOption:{type:Boolean,default:!0},showBottom:{type:Boolean,default:!0},tooltipTheme:{type:String,default:"dark"},showSummary:{type:Boolean,default:!1},autoRefresh:{type:Boolean,default:!1},summaryMethod:{type:Function},exportEnum:{type:Object,default(){return{}}},headerAutoHeight:{type:Boolean,default:!0},cellAutoHeight:{type:Boolean,default:!1},rowAddHeight:{type:Number,default:0},renderDataFn:Function,revertBtn:Boolean,isIndexManageTable:Boolean,isShowUnitSwitch:{type:Boolean,default:!0},isShowWX:Boolean,isShowJ:Boolean,defaultUnitType:{type:String,default:"X"},defaultTableUnitType:{type:String,default:"X"},xScale:{type:Number,default:2},wzScale:{type:Number,default:2},funId:String,groupDefaultExpanded:{type:Number,default:-1},xmlInfo:String,rowClick:Boolean,groupSelectsChildren:{type:Boolean,default:!0},showZeroDefault:{type:String,default:"Y"},noRowsTemplate:String},data(){function e(){const t=navigator.userAgent,a=["Windows","Macintosh","Linux"];for(const s of a)if(t.includes(s))return!0;return!1}return{isPc:e(),tableRef:null,refreshTable:!1,rowSelection:"single",suppressRowClickSelection:!1,localeText:Ms,isRevertingOldValue:!1,btnSel:"",tableDataSrc:[],tableData:u.default.cloneDeep(this.value),tableWidth:this.width,tableHeight:this.height,tableLoading:this.loading,cloneColumns:[],cloneColumns2:[],fullSreen:!1,tableSize:"tableSize"in localStorage?localStorage.getItem("tableSize"):this.size,tableShowSummary:this.showSummary,tableSummaryMethod:this.summaryMethod,totalNumber:0,currentPage:1,limitNumber:20,optionDropdownVisible:!1,checkAll:!0,checkAllGroup:[],dataExportFormat:"xlsx",sortParams:{},hackReset:!0,columnID:"",parsedColumns:[],index:1,tableColumns:[],defaultColDef:{unSortIcon:!0,suppressMenu:!0,wrapHeaderText:this.headerAutoHeight,autoHeaderHeight:this.headerAutoHeight,wrapText:this.cellAutoHeight,autoHeight:this.cellAutoHeight,suppressKeyboardEvent:t=>Qm(t)},gridApi:null,gridColumnApi:null,overlayNoRowsTemplate:'<span style="padding: 10px;">\u8BF7\u9009\u62E9\u67E5\u8BE2\u6761\u4EF6</span>',showZero:this.showZeroDefault,showZeroSwitch:!1,switchZeroCol:null,switchZeroTitle:"",showUnitSwitch:!1,switchCols:[],unitType:this.defaultTableUnitType||this.defaultUnitType||"X",pinnedTopRowDataWithUnit:this.pinnedTopRowData||null,topRows:this.pinnedTopRowData||null,treeData:!1,getDataPath:t=>t.treeLevelFlag,autoGroupColumnDef:null,groupDisplayType:""}},computed:{mergeIndexCol(){let e=u.default.find(this.columns,t=>t.autoMergeRow===!0);return(e==null?void 0:e.key)||(e==null?void 0:e.field)},mergeColumns(){let e=u.default.filter(this.columns,t=>!!t.autoMergeRow).map(t=>t.key||t.field);return e!=null&&e.length?e:void 0},paramRightUnit(){return u.default.some(this.flatColumns,e=>e.isSwitchUnit)?"\u5355\u4F4D\uFF1A"+(this.unitType=="X"?"\u7BB1":"\u4E07\u652F"):""},isEditTable(){return u.default.some(this.flatColumns,e=>["input","select","treeselect"].includes(e.type))},getRowId(){return this.rowKey?e=>e.data[this.rowKey]:null},flatColumns(){let e=[];return Xe(null,this.columns,t=>{e.push(t)}),e},columnCalcMap(){let e={};return u.default.forEach(this.flatColumns,t=>{t.calcRule&&It(e,t.calcRule,t.field||t.key)}),e},getTheme(){var e,t;return((t=(e=this.$store)==null?void 0:e.getters)==null?void 0:t.getTheme)||st()},columnNameArr(){return this.columns.map(e=>e.title)},selectedColumnNameArr(){var e=[];for(var t of this.cloneColumns)e.push(t.title);return e},paginationParams(){return{offset:(this.currentPage-1)*this.limitNumber,limit:this.limitNumber}},slots(){return this.$slots},tableSpanMergeColumns(){const e=a=>a.children?a.children.map(s=>e(s)).flat():[a];return e({children:this.tableColumns})},tableRowSpanMergeIndexMap(){const e={};return this.tableSpanMergeColumns.forEach(t=>{let a=/autoMergeRow-([^\s]*)/.exec(t.cellClass);if(a[1]!="undefined"&&a[1]!="null"){const n=[];this.tableData.forEach((o,c)=>{c===0?n.push([0]):o[t.field]===this.tableData[c-1][t.field]&&(a[1]==="true"||o[a[1]]===this.tableData[c-1][a[1]])?n[n.length-1].push(c):n.push([c])});let i=n.filter(o=>o.length!==1),l={};u.default.forEach(i,o=>{l[o[0]+""]=o.length}),e[t.field]=l}}),e},rowDataFiltered(){return this.showZeroSwitch?this.tableData.filter(t=>this.showZero=="Y"?!0:parseFloat(t[this.switchZeroCol])>0):this.tableData}},watch:{pinnedTopRowData:{handler:function(){this.pinnedTopRowDataWithUnit=u.default.cloneDeep(this.pinnedTopRowData),this.renderSumRow()},deep:!0},unitType(e,t){let a=u.default.cloneDeep(this.tableData);if(a.forEach(s=>{this.switchCols.forEach(n=>{he(t,e,s,n)})}),this.tableData=a,this.pinnedTopRowDataWithUnit&&this.pinnedTopRowDataWithUnit.length){let s=u.default.cloneDeep(this.pinnedTopRowDataWithUnit);s.forEach(n=>{this.switchCols.forEach(i=>{he(t,e,n,i)})}),this.pinnedTopRowDataWithUnit=s,this.renderSumRow()}},getTheme(){this.gridApi.resetRowHeights()},rowHeight(){this.gridApi.resetRowHeights()},width(){this.tableWidth=this.width},searchParams:{handler(){this.currentPage=1,this.tableRefresh()},deep:!0},dataApi:{handler(){this.currentPage=1,this.tableRefresh()},deep:!0},columns:{async handler(e){this.columnsHander(e)},deep:!0},value:{async handler(e){this.updating||(u.default.some(e,t=>{var a;return(a=t.treeLevelFlag)==null?void 0:a.length})||(e=await this.renderTreeData(e)),this.calcRulesData(e))},deep:!0},tableData:{async handler(e){if(this.overlayNoRowsTemplate='<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>',this.updating=!0,this.renderSumRow(),u.default.some(this.columns,{tree:!0})){let a=u.default.cloneDeep(e),s=mi(a);this.$emit("input",s)}else this.$emit("input",u.default.cloneDeep(e));this.$nextTick(()=>{this.updating=!1})},deep:!0},columnCalcMap:{handler:function(){this.calcRulesData()},deep:!0,immediate:!0},showSummary:{handler(e){this.tableShowSummary=e}},optionDropdownVisible(e){e&&(this.parsedColumns=this.$refs.tableRef.cloneColumns)},loading(e){this.tableLoading=e},height:{handler(){this.tableHeight=this.height}},showZero(){this.renderSumRow()}},async created(){var a;this.tableRef=this,this.unitType=this.defaultTableUnitType,this.cloneColumns=this.tableColumnsInner(u.default.cloneDeep(this.columns)||[]),this.cloneColumns2=this.tableColumnsInner(u.default.cloneDeep(this.columns)||[]),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.showUnitSwitch=u.default.some(this.flatColumns,{isSwitchUnit:!0}),this.showZeroSwitch=u.default.some(this.flatColumns,s=>!!s.isSwitchZero),this.switchCols=u.default.filter(this.flatColumns,{isSwitchUnit:!0}).map(s=>s.field||s.key);let e=u.default.find(this.flatColumns,s=>!!s.isSwitchZero),t=((a=u.default.find(this.flatColumns,s=>!!s.isSwitchZero))==null?void 0:a.isSwitchZero)||"\u662F\u5426\u5C55\u793A\u8F93\u5165\u91CF\u4E3A\u96F6\u7684\u6570\u636E";this.switchZeroTitle=t,this.switchZeroCol=(e==null?void 0:e.field)||(e==null?void 0:e.key),this.renderSumRow(),await this.$nextTick(),this.checkAllGroup=this.columns.map(s=>s.title)},activated(){this.autoRefresh&&this.tableRefresh()},destroyed(){this.optionDropdownVisible=!1},deactivated(){this.optionDropdownVisible=!1},methods:{getContextMenuItems:function(){return this.rowSelection=="multiple"?[{name:"\u5BFC\u51FA\u6570\u636E\u5230Excel",action:()=>{this.$refs.exportData.exportCurrentPage()}},{name:"\u5168\u9009\u9009\u4E2D",action:()=>{this.selectAll()}},{name:"\u5168\u90E8\u53D6\u6D88",action:()=>{this.deselectAll()}},{name:"\u5168\u90E8\u9009\u53CD",action:()=>{let e=this.getSelection(),t=u.default.cloneDeep(this.rowDataFiltered);u.default.remove(t,a=>u.default.some(e,s=>s.uuid===a.uuid)),this.setSelection(t,!0)}}]:[{name:"\u5BFC\u51FA\u6570\u636E\u5230Excel",action:()=>{this.$refs.exportData.exportCurrentPage()}}]},getRowClassCommon(e){var n;let t;this.getRowClass instanceof Function&&(t=this.getRowClass(e));let a,s=((n=e==null?void 0:e.data)==null?void 0:n.sumLevel)||"";return s&&(a="ind-table-sum-level"+s,t instanceof Array?t.push(a):typeof t=="string"?t+=" "+a:t=a),t},async columnsHander(e){this.showUnitSwitch=u.default.some(this.flatColumns,{isSwitchUnit:!0}),this.switchCols=u.default.filter(this.flatColumns,{isSwitchUnit:!0}).map(a=>a.field||a.key),this.cloneColumns=this.tableColumnsInner(u.default.cloneDeep(e)||[]),this.cloneColumns2=this.tableColumnsInner(u.default.cloneDeep(e)||[]),this.currentPage=1,this.tableRefresh(!0),this.columnsFilter();let t=u.default.cloneDeep(this.cloneColumns);this.tableColumns=t,this.checkAllGroup=e.map(a=>a.title),this.refreshTable=!0,await this.$nextTick(),this.refreshTable=!1},calcRulesData(e){if(u.default.isEmpty(this.columnCalcMap))this.tableData=u.default.cloneDeep(e||this.value),this.totalNumber=this.tableData.length;else{let t=u.default.cloneDeep(e||this.value),a={};u.default.forEach(this.columnCalcMap,(i,l)=>{u.default.merge(a,i)});let s=[];u.default.forEach(a,(i,l)=>{var c;let o=u.default.find(this.flatColumns,p=>p.field==l||p.key==l);s.push({rltKey:l,ast:i,precision:((c=o==null?void 0:o.cellRendererParams)==null?void 0:c.scale)||2,errRtn:0})}),zt(t,{calcRules:s}),this.tableData=t,this.totalNumber=t.length}},resetColumns(e){const t={};Xe(null,this.columns||[],a=>{let s=a.field||a.key||a.type||a.headerName||a.title;Object.assign(t,{[s]:a})}),Xe(null,e,(a,s)=>{let n=t[a.field||a.key||a.type||a.headerName||a.title];n.hide=!a.checked,a.pinned&&a.pinned!="none"||(s==null?void 0:s.pinned)&&(s==null?void 0:s.pinned)!="none"?n.pinned.fixed=n.pinned=a.pinned=="none"?(s==null?void 0:s.pinned)=="none"||s==null?void 0:s.pinned:a.pinned:(delete n.pinned,delete n.fixed),a.width&&(n.width&&(n.width=a.width),n.minWidth&&(n.minWidth=a.width))}),this.columnsHander(this.columns)},cellClicked(e){var t;if(this.$listeners&&this.$listeners.cellClicked)this.$listeners.cellClicked(e);else{let a=e.colDef||{};((t=a==null?void 0:a.cellRendererParams)==null?void 0:t.onClick)instanceof Function&&a.cellRendererParams.onClick(e.data)}},cellDoubleClicked(e){if(this.$listeners&&this.$listeners.cellDoubleClicked)this.$listeners.cellDoubleClicked(e);else{let t=e.colDef||{};t=u.default.find(this.columns,s=>t.key&&s.key==t.key||t.field&&s.field==t.field);let a=u.default.find(this.columns,{type:"link"});a&&(!t.type||["span","tooltip","enum"].includes(t.type))&&a.cellRendererParams.onClick instanceof Function&&a.cellRendererParams.onClick(e.data)}},sortChanged(){var e=this.gridColumnApi.getColumnState(),t=e.filter(function(s){return s.sort!=null}).map(function(s){return{sort:s.colId,order:s.sort,sortIndex:s.sortIndex}});let a=t[0]||{};if(a.order===void 0?(Reflect.deleteProperty(this.sortParams,"sort"),Reflect.deleteProperty(this.sortParams,"order")):this.sortParams={sort:a.sort,order:a.order},this.dataApi&&!this.disablePage)this.currentPage=1,this.tableRefresh();else{let s=[];if(a.order===void 0)if(this.dataApi){let n=u.default.cloneDeep(this.tableData);n=u.default.orderBy(n,["_initialseq"],["asc"]),this.tableData=n}else this.tableData=u.default.cloneDeep(this.value);else this.noSortLine>-1&&(s=this.tableData.slice(0,this.noSortLine),this.tableData.splice(0,this.noSortLine)),this.tableData.sort((n,i)=>{if(typeof n[this.sortParams.sort]=="number"&&typeof i[this.sortParams.sort]=="number"){let l=isNaN(parseFloat(n[this.sortParams.sort]))?0:parseFloat(n[this.sortParams.sort]),o=isNaN(parseFloat(i[this.sortParams.sort]))?0:parseFloat(i[this.sortParams.sort]);return this.sortParams.order==="asc"?l-o:o-l}else{let l=n[this.sortParams.sort]||"",o=i[this.sortParams.sort]||"";return this.sortParams.order==="asc"?String(l||"").localeCompare(String(o||""),"zh-CN"):String(o||"").localeCompare(String(l||""),"zh-CN")}}),this.noSortLine>-1&&this.tableData.splice(0,0,...s);this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})}this.$emit("on-sort-change",a)},refreshCells(){this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})},refreshHeader(){this.$nextTick().then(()=>{this.gridApi.refreshHeader()})},redrawRows(){this.$nextTick().then(()=>{this.gridApi.redrawRows()})},toggleFullScreen(){top!==self&&top.toggleFullScreen(),this.fullSreen=!this.fullSreen},getRowHeight(){return({"ind-default-theme":42,"ind-small-theme":28}[this.getTheme]||0)+this.rowAddHeight},onGridReady(e){window.gridApi=this.gridApi=e.api,this.gridColumnApi=e.columnApi},rowSelected(e){var s,n;if(this.selecting)return;let t=this.flatColumns.filter(i=>i.autoMergeRow);if(t!=null&&t.length){let i=((s=t[0])==null?void 0:s.field)||((n=t[0])==null?void 0:n.key);u.default.forEach(t,d=>{typeof d.autoMergeRow=="string"&&(i=d.autoMergeRow)});let l=this.tableRowSpanMergeIndexMap[i],o={};u.default.forEach(l,(d,f)=>{let r=parseInt(f),h=r+d,R=u.default.range(r,h);for(let U=r;U<h;U++)o[U]=R});let c={};u.default.forEach(this.rowDataFiltered,(d,f)=>{c[f+""]=d.uuid});let p=o[e.node.rowIndex]||[];if(e.node.selected){let d=this.rowDataFiltered.filter((f,r)=>p.includes(r));this.selecting=!0,this.setSelection(d)}else{let d=this.getSelection();d.length>0&&u.default.forEach(p,f=>{u.default.remove(d,(r,h)=>r.uuid==c[f+""])}),this.selecting=!0,this.setSelection(d,!0)}}setTimeout(()=>{this.selecting=!1},100);var a=this.gridApi.getSelectedRows();this.$emit("on-select-change",a)},selectionChanged(){var e=this.gridApi.getSelectedRows();this.$emit("on-select-change",e)},resetTableSize(e){this.tableSize=e,this.optionDropdownVisible=!1},dealColumnScale(e){var t;if(!v.isNil((t=e.cellRendererParams)==null?void 0:t.scale))return e.cellRendererParams.scale;if(e.isSwitchUnit){const a=this.unitType.toLowerCase();return this[`${a}Scale`]||2}return null},tableColumnsInner(e,t){var s,n,i,l,o,c,p,d;let a=[];for(let f=0;f<e.length;f++){let r=e[f],h={resizable:!0,headerName:r.title||r.headerName,width:r.width?parseInt(r.width)-(this.getTheme=="ind-small-theme"?10:0):r.width,minWidth:r.minWidth?parseInt(r.minWidth)-(this.getTheme=="ind-small-theme"?10:0):r.minWidth,maxWidth:r.maxWidth?parseInt(r.maxWidth)-(this.getTheme=="ind-small-theme"?10:0):r.maxWidth,pinned:r.fixed||r.pinned,cellDataType:r.cellDataType||"text",headerTooltip:(i=(n=(s=this.$store)==null?void 0:s.getters)==null?void 0:n.getIndexDesc)==null?void 0:i[r.standardField||r.key||r.field],suppressStickyLabel:!0,suppressMovable:!!r.suppressMovable};if(r.flex&&(h.flex=r.flex),r.key&&(h.key=r.key),r.showRowGroup&&(h.showRowGroup=r.showRowGroup),r.rowGroup&&(h.rowGroup=r.rowGroup),r.hide&&(h.hide=r.hide),r.align&&(h.align=r.align),r.dataType&&(h.dataType=r.dataType),r.headerTooltip&&(h.headerTooltip=h.headerTooltip||r.headerTooltip),r.tooltipShowDelay&&(h.tooltipShowDelay=r.tooltipShowDelay),v.isNil(r.wrapHeaderText)||(h.wrapHeaderText=r.wrapHeaderText),r.autoHeaderHeight&&(h.autoHeaderHeight=r.autoHeaderHeight),h.cellClass=" ag-wrap-cell ",r.cellClass&&typeof r.cellClass=="string"&&(h.cellClass=h.cellClass+r.cellClass),r.cellClass&&r.cellClass instanceof Array&&(h.cellClass=h.cellClass+r.cellClass.join(" ")),r.cellStyle&&(h.cellStyle=r.cellStyle),r.headerClass&&(h.headerClass=r.headerClass),r.headerComponent&&(h.headerComponent=r.headerComponent),r.headerComponentParams&&(h.headerComponentParams=r.headerComponentParams),r.filter&&(h.filter=r.filter),r.filterParams&&(h.filterParams=r.filterParams),v.isNil(r.wrapText)||(h.wrapText=r.wrapText,r.wrapText&&(h.cellClass=h.cellClass+" ag-wrap-cell")),r.autoHeight&&(h.autoHeight=r.autoHeight),r.initialSort&&(h.initialSort=r.initialSort),r.rowSpan&&(h.rowSpan=r.rowSpan),r.colSpan&&(h.colSpan=r.colSpan),r.tree&&(h.cellRenderer="agGroupCellRenderer",h.showRowGroup=!0,this.groupDisplayType="custom",(l=r==null?void 0:r.cellRendererParams)!=null&&l.checkbox?this.rowSelection="multiple":this.rowSelection="single"),r.rowDrag&&(h.rowDrag=r.rowDrag),h.sortable=r.sortable,r.type=="index")h.cellRenderer=function(R){return R.node.rowPinned?"":R.node.rowIndex+1},h.cellClass=h.cellClass+" ag-center-aligned-cell";else if(r.type=="checkbox")h.headerName="",h.headerCheckboxSelection=!0,h.checkboxSelection=r.checkboxSelection||!0,h.showDisabledCheckboxes=!0,this.rowSelection="multiple",h.cellClass=h.cellClass+" ag-center-aligned-cell ind-ag-check-cell",this.suppressRowClickSelection=!1;else if(r.type=="radio")h.headerCheckboxSelection=!1,h.checkboxSelection=r.checkboxSelection||!0,h.showDisabledCheckboxes=!0,this.rowSelection="single",this.suppressRowClickSelection=!1,h.cellClass=h.cellClass+" ag-center-aligned-cell ind-ag-check-cell ind-radio";else{r.field&&(h.field=r.field),!h.field&&isNaN(r.key)&&(h.field=r.key);const R={tooltip:"AgTooltip",input:"AgInput",select:"AgSelect",datepicker:"AgDate",treeSelect:"AgTreeSelect",button:"AgButton",link:"AgLink",enum:"AgEnum",format:"AgFormat",image:"AgImage",chart:"AgChart"};if(r.type&&(r.isSum?h.cellRendererSelector=U=>U.node.rowPinned?{component:"AgFormat",params:{...r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:{component:R[r.type],params:{...r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:h.cellRendererSelector=U=>{if(!U.node.rowPinned)return{component:R[r.type],params:{...r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}}),!r.type&&(r.isSum||!v.isNil((o=r==null?void 0:r.cellRendererParams)==null?void 0:o.scale)||((c=r==null?void 0:r.cellRendererParams)==null?void 0:c.dateFormat)||r.isSwitchUnit)&&(h.cellRendererSelector=U=>U.node.rowPinned?{component:"AgFormat",params:{...r==null?void 0:r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:{component:"AgFormat",params:{...r==null?void 0:r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}),r.cellRendererParams&&(h.cellRendererParams=r.cellRendererParams,r.type=="input"&&((d=(p=r.cellRendererParams)==null?void 0:p.props)==null?void 0:d.number)&&(h.cellDataType="number")),r.cellRenderer&&(h.cellRenderer=r.cellRenderer),r.valueGetter&&(h.valueGetter=r.valueGetter),r.cellRendererSelector&&(h.cellRendererSelector=r.cellRendererSelector),r.valueSetter&&v.isString(r.valueSetter)?h.valueSetter=r.valueSetter:r.valueSetter&&(h.valueSetter=U=>{const{newValue:S,data:Z,colDef:L}=U;if(this.isRevertingOldValue)return Z[L.field||L.key]=S,!0;const Q=r.valueSetter(U);if(!Q){const{oldValue:A,column:H}=U;this.isRevertingOldValue=!0,Z[L.field||L.key]=S,setTimeout(()=>{U.node.setDataValue(H,A),this.isRevertingOldValue=!1},0)}if(!this.isRevertingOldValue)return Q}),this.columnCalcMap&&this.columnCalcMap[r.field||r.key]){let U=this.columnCalcMap[r.field||r.key];h.valueSetter=S=>{S.data[r.field||r.key]=S.newValue;let Z=[];u.default.forEach(U,(Q,A)=>{var H;Z.push({rltKey:A,ast:Q,precision:((H=r==null?void 0:r.cellRendererParams)==null?void 0:H.scale)||2,errRtn:0})});let L={calcRules:Z};return pi(S.data,L),!0}}r.valueFormatter&&(h.valueFormatter=r.valueFormatter),r.align&&(h.cellClass=h.cellClass+(r.align=="right"?" ag-right-aligned-cell":r.align=="center"?" ag-center-aligned-cell":""))}r.autoMergeRow&&(h.rowSpan=R=>R.node.rowPinned?0:this.tableRowSpanMergeIndexMap[R.colDef.field]&&this.tableRowSpanMergeIndexMap[R.colDef.field][R.node.rowIndex+""]||0,h.cellClassRules={"cell-span":R=>this.tableRowSpanMergeIndexMap[R.colDef.field]&&this.tableRowSpanMergeIndexMap[R.colDef.field][R.node.rowIndex+""]}),h.cellClass=h.cellClass+" "+r.type+" autoMergeRow-"+r.autoMergeRow,r.cellClassRules&&(h.cellClassRules?h.cellClassRules={...r.cellClassRules,...h.cellClassRules}:h.cellClassRules=r.cellClassRules),a.push(h),r.children&&r.children.length&&(h.children=this.tableColumnsInner(r.children))}return t||(this.cloneColumns2=u.default.cloneDeep(a)),a},columnsFilter(){this.columnID=di(JSON.stringify(this.$route.path+this.cloneColumns2.length));let e=this.cloneColumns2,t=new Array,a=localStorage.getItem("tableColumns");if(a!=null){let n=JSON.parse(a).filter(i=>i.id==this.columnID);if(n.length==1){let i=n[0].value;e.forEach(l=>{let o="";o+=l.key||"",o+=l.type||"",o+=l.title,o!=""&&i.filter(p=>p==o).length>=1&&t.push(l)})}}t.length>0?this.cloneColumns=u.default.cloneDeep(t):this.cloneColumns=u.default.cloneDeep(this.cloneColumns2),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.cloneColumns2.length!=this.cloneColumns.length&&(this.checkAll=!1),this.checkAllGroup=this.selectedColumnNameArr.slice(0)},getParams(){return Object.assign({},this.paginationParams,this.sortParams,this.searchParams)},onPageChange(e){this.currentPage=e,this.tableRefresh(),this.$emit("on-page-change",e)},onPageSizeChange(e){this.limitNumber=e,this.tableRefresh(),this.$emit("on-page-size-change",e)},handleCheckAll(){this.checkAll=!this.checkAll,this.checkAll?this.checkAllGroup=this.columnNameArr.slice(0):this.checkAllGroup=[]},checkAllGroupChange(e){e.length===this.columnNameArr.length?this.checkAll=!0:e.length>0?this.checkAll=!1:this.checkAll=!1},tableSettingToggle(e){this.btnSel=e,this.optionDropdownVisible=!this.optionDropdownVisible},closeTableSettingDropdown(){this.optionDropdownVisible=!1},columnSelect(){let e=[];this.columns.forEach(t=>{for(let a of this.checkAllGroup)if(t.title===a){e.push(t);break}}),this.cloneColumns=e,this.tableColumns=this.tableColumnsInner(this.cloneColumns),this.optionDropdownVisible=!1},columnSave(){this.columnSelect();let e=new Array;this.cloneColumns.forEach(s=>{let n="";n+=s.key||"",n+=s.type||"",n+=s.title,n!=""&&e.push(n)});let t=localStorage.getItem("tableColumns"),a=null;if(t==null)a=new Array;else{a=JSON.parse(t);let s=a.findIndex(n=>n.id==this.columnID);s>-1&&a.splice(s,1)}a.push({id:this.columnID,value:e}),localStorage.setItem("tableColumns",JSON.stringify(a)),this.optionDropdownVisible=!1},columnClear(){let e=localStorage.getItem("tableColumns"),t=null;if(e==null)t=new Array;else{t=JSON.parse(e);let a=t.findIndex(s=>s.id==this.columnID);a>-1&&t.splice(a,1)}localStorage.setItem("tableColumns",JSON.stringify(t)),this.cloneColumns=u.default.cloneDeep(this.cloneColumns2),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.checkAll=!1,this.handleCheckAll(),this.optionDropdownVisible=!1},forceUpdate(){this.hackReset=!1,this.$nextTick(()=>{this.hackReset=!0})},renderSumRow:u.default.debounce(async function(){if(this.flatColumns.some(t=>t.isSum)){console.time("calcSum");let t={};for(let d of this.flatColumns)if(!["checkbox","radios","index"].includes(d.type)){t[d.field||d.key]="\u5408\u8BA1";break}let a=this.flatColumns.filter(d=>d.isSum),s=[],n=[];a.forEach(d=>{typeof d.isSum=="string"?s.push(d):d.isSum instanceof Function&&n.push(d)});const i={};s.forEach(d=>{It(i,d.isSum,d.field||d.key)}),a.forEach(d=>{(d.field||d.key)in t||(t[d.field||d.key]=0)}),this.rowDataFiltered.forEach(d=>{a.forEach(f=>{if(typeof f.isSum=="string")return;let r=f.field||f.key,h=d[r];this.isNullOrNaN(h)||(t[r]=(t[r]||0)+parseFloat(h))})}),n.forEach(d=>{t[d.field||d.key]=d.isSum(this.rowDataFiltered,d)});let l=[t],o={};u.default.forEach(i,(d,f)=>{u.default.merge(o,d)});let c=[];u.default.forEach(o,(d,f)=>{var h;let r=u.default.find(s,R=>R.field==f||R.key==f);c.push({rltKey:f,ast:d,precision:((h=r==null?void 0:r.cellRendererParams)==null?void 0:h.scale)||2,errRtn:0})}),zt(l,{calcRules:c}),this.topRows=this.pinnedTopRowDataWithUnit?u.default.concat(this.pinnedTopRowDataWithUnit,l):l,console.timeEnd("calcSum")}else this.topRows=this.pinnedTopRowDataWithUnit},5),isNullOrNaN(e){return typeof e=="object"||isNaN(e)},async renderTreeData(e){if(this.treeData=u.default.some(e,t=>{var a,s;return((a=t.children)==null?void 0:a.length)||((s=t.treeLevelFlag)==null?void 0:s.length)}),this.renderTreeFlag(e),this.treeData){let t=[];Xe(null,e,(a,s,n)=>{a.seq=n,t.push(a)}),e=t}return e},renderTreeFlag(e){let t=u.default.find(this.columns,{tree:!0});if(Xe(null,e,(s,n,i)=>{s.uuid=s.uuid||v.uuid()}),u.default.isEmpty(t))return;let a=(t==null?void 0:t.field)||(t==null?void 0:t.key);Xe(null,e,(s,n,i)=>{if(s.treeLevelFlag=n?[...n.treeLevelFlag,s[a]]:[s[a]],n){let l=n.path?u.default.cloneDeep(n.path):[n.uuid];l.push(s.uuid),s.path=l}else s.path=[s.uuid]})},tableRefresh:function(e){this.dataApi&&!e?(this.gridApi&&this.gridApi.hideOverlay(),this.tableLoading=!0,this.dataApi(Object.assign({},this.disablePage?{}:this.paginationParams,this.sortParams,this.searchParams)).then(async t=>{if(t){this.overlayNoRowsTemplate='<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>',this.$emit("on-data-load",t);let a=t.data.rows||t.data.records||[];this.disablePage&&t.data instanceof Array&&(a=t.data),this.renderDataFn&&(a=this.renderDataFn(a)),a.forEach((s,n)=>{s._initialseq=n}),this.unitType!=this.defaultUnitType&&a.forEach(s=>{this.switchCols.forEach(n=>{he(this.defaultUnitType,this.unitType,s,n)})}),this.tableData=await this.renderTreeData(a),this.totalNumber=t.data.total||0,this.$emit("on-data-format-load",t)}this.tableLoading=!1}).catch(()=>{this.tableData=[],this.totalNumber=0,this.tableLoading=!1})):this.dataApi||(this.totalNumber=this.value.length),this.optionDropdownVisible=!1},setUnitType(e){this.unitType=e},toggleUnitIfNeeded:u.default.debounce(async function(){setTimeout(()=>{if(this.pinnedTopRowDataWithUnit&&this.pinnedTopRowDataWithUnit.length){let t=u.default.cloneDeep(this.pinnedTopRowDataWithUnit);this.unitType!=this.defaultUnitType&&(t.forEach(a=>{this.switchCols.forEach(s=>{he(this.defaultUnitType,this.unitType,a,s)})}),this.pinnedTopRowDataWithUnit=t,this.renderSumRow())}let e=u.default.cloneDeep(this.tableData);this.unitType!=this.defaultUnitType&&(e.forEach(t=>{this.switchCols.forEach(a=>{he(this.defaultUnitType,this.unitType,t,a)})}),this.$emit("input",e))},10)},1),toggleRowUnitIfNeeded:u.default.debounce(async function(t,a){setTimeout(()=>{let s=u.default.cloneDeep(this.tableData),n=[];const i=l=>{l.forEach(o=>{o.isRowSwitchUnit&&n.push(o),o.children&&o.children.length>0&&i(o.children)})};i(this.columns),s.forEach(l=>{n.forEach(o=>{o.isRowSwitchUnit&&t[o.rowSwitchUnitType]!=a[o.rowSwitchUnitType]&&he(t[o.rowSwitchUnitType],a[o.rowSwitchUnitType],l,o.key)})}),this.$emit("input",s)},10)},1),getSelection(){return this.gridApi.getSelectedRows()},clearSelection(){this.gridApi.getSelectedNodes().forEach(e=>e.setSelected(!1))},selectAll(){this.gridApi.selectAll()},deselectAll(){this.gridApi.deselectAll()},setSelection(e,t){let a=(e||[]).map(i=>i[this.rowKey||"uuid"]),s=[],n=[];setTimeout(()=>{this.gridApi.forEachNode(i=>{a.includes(i.data[this.rowKey||"uuid"])?s.push(i):t&&n.push(i)}),this.gridApi.setNodesSelected({nodes:s,newValue:!0}),this.gridApi.setNodesSelected({nodes:n,newValue:!1})},50)},getXData(){if(this.unitType=="X")return this.tableData;{let e=u.default.cloneDeep(this.tableData);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"X",t,a)})}),e}},getWZData(){if(this.unitType=="WZ")return this.tableData;{let e=u.default.cloneDeep(this.tableData);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"WZ",t,a)})}),e}},getXSum(){if(this.unitType=="X")return this.topRows;{let e=u.default.cloneDeep(this.topRows);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"X",t,a)})}),e}},getWZSum(){if(this.unitType=="WZ")return this.topRows;{let e=u.default.cloneDeep(this.topRows);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"WZ",t,a)})}),e}},async updateTableData(e,t=!0){if(!this.rowKey){console.warn("\u8BF7\u4F20rowKey\uFF0C\u8C22\u8C22");return}this.updating=!0;const a=u.default.reduce(this.value||[],(s,n)=>(Object.assign(s,{[n[this.rowKey]]:n}),s),{});this.gridApi.forEachNode(s=>{e(s.data,(n,i)=>{if(t){const o=a[s.data[this.rowKey]];o[n]=i}const l=this.gridColumnApi.getColumn(n);l&&s.setDataValue(l,i)})}),await this.$nextTick(),this.updating=!1},async outSortChanged(e){if(e.order===void 0?(Reflect.deleteProperty(this.sortParams,"sort"),Reflect.deleteProperty(this.sortParams,"order")):this.sortParams={sort:e.sort,order:e.order},this.dataApi&&!this.disablePage)this.currentPage=1,this.tableRefresh();else{let t=[];if(e.order===void 0)if(this.dataApi){let a=u.default.cloneDeep(this.tableData);a=u.default.orderBy(a,["_initialseq"],["asc"]),this.tableData=a}else this.tableData=u.default.cloneDeep(this.value);else this.noSortLine>-1&&(t=this.tableData.slice(0,this.noSortLine),this.tableData.splice(0,this.noSortLine)),this.tableData.sort((a,s)=>{if(typeof a[this.sortParams.sort]=="number"&&typeof s[this.sortParams.sort]=="number"){let n=isNaN(parseFloat(a[this.sortParams.sort]))?0:parseFloat(a[this.sortParams.sort]),i=isNaN(parseFloat(s[this.sortParams.sort]))?0:parseFloat(s[this.sortParams.sort]);return this.sortParams.order==="asc"?n-i:i-n}else{let n=a[this.sortParams.sort]||"",i=s[this.sortParams.sort]||"";return this.sortParams.order==="asc"?n.localeCompare(i,"zh-CN"):i.localeCompare(n,"zh-CN")}}),this.noSortLine>-1&&(this.tableData=[...t,...u.default.cloneDeep(this.tableData)]);this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})}this.refreshCells(),this.$emit("on-sort-change",e)}}},vi={};var Om=b(Gm,zm,Im,!1,Lm,null,null,null);function Lm(e){for(let t in vi)this[t]=vi[t]}var Ri=function(){return Om.exports}(),jm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"audittable"},[a("Modal",{attrs:{width:e.width,closable:!0,"footer-hide":!0},model:{value:e.modal,callback:function(s){e.modal=s},expression:"modal"}},[a("br"),a("Table",{attrs:{showTableOption:!1,"disable-page":"",columns:e.tableColumns,data:e.tableData}})],1)],1)},$m=[];const Hm={name:"IndAuditLogModal",components:{Modal:te,Table:Qt},props:{busiPk:{type:String,default:""},auditModal:Boolean,dictData:{type:Object,default:()=>({})},serverContext:{type:String,default:""},busiType:{type:String,default:""},width:{type:Number,default:()=>Math.floor(parseInt(window.innerWidth)*.5)}},data(){return{baseUrl:"/ipmUtils/getAuditLog",dataUrl:"",tableData:[],modal:!1,tableColumns:[{title:"\u5904\u7406\u4EBA",key:"dealUserName",align:"center",sortable:!1},{title:"\u5904\u7406\u65F6\u95F4",align:"center",sortable:"custom",key:"dealTime",formatter:"formatDate"},{title:"\u5904\u7406\u610F\u89C1",key:"dealOpinion",align:"center",sortable:!1},{title:"\u5904\u7406\u540E\u72B6\u6001",align:"center",sortable:!1,render:(e,t)=>e("span",this.dictData[t.row.status])}]}},watch:{auditModal:{handler(){this.modal=this.auditModal,this.modal&&this.query()}},modal(){this.modal||this.$emit("update:auditModal",!1)}},methods:{async query(){let e=await this.getAuditLog();this.tableData=e.data},getAuditLog(){return this.dataUrl=`${this.serverContext}${this.baseUrl}?busiPk=${this.busiPk}&busiType=${this.busiType}`,v.axios.get(this.dataUrl)}}},Ui={};var Xm=b(Hm,jm,$m,!1,Pm,null,null,null);function Pm(e){for(let t in Ui)this[t]=Ui[t]}var gi=function(){return Xm.exports}(),Am=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("IndModal",{attrs:{width:"1000",footerHide:"","mask-closable":!1,title:e.title||"\u5BFC\u5165",value:e.value},on:{input:function(s){return e.$emit("input",s)}}},[e.refresh?a("div",{staticClass:"excel-flow-wrap"},[a("Steps",{staticClass:"common-flex-no-shrink",attrs:{current:e.currentStepIndex}},[a("Step",{attrs:{title:"\u4E0B\u8F7D\u6A21\u677F"}}),a("Step",{attrs:{title:"\u5BFC\u5165\u6570\u636E"}}),a("Step",{attrs:{title:"\u6210\u529F"}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:e.currentStepIndex===0,expression:"currentStepIndex === 0"}],staticClass:"content-wrap"},[a("div",{staticClass:"download-btn"},[a("div",{staticClass:"icon"},[a("Icon",{attrs:{type:"md-cloud-download",size:"60"}})],1),a("div",{staticClass:"text-panel"},[a("div",{staticClass:"title"},[e._v(e._s(e.exportTitle||"\u586B\u5199\u5BFC\u5165\u51C6\u8FD0\u8BC1\u4FE1\u606F"))]),a("div",{staticClass:"desc",staticStyle:{"margin-bottom":"10px"}},[e._v(" "+e._s(e.exportDesc||"\u8BF7\u6309\u7167\u6A21\u677F\u6570\u636E\u7684\u683C\u5F0F\u51C6\u5907\u5BFC\u5165\u6570\u636E\uFF0C\u6A21\u677F\u4E2D\u7684\u8868\u5934\u540D\u79F0\u4E0D\u53EF\u66F4\u6539\uFF0C\u8868\u5934\u884C\u4E0D\u80FD\u5220\u9664")+" ")]),a("Button",{on:{click:e.download}},[a("Icon",{attrs:{type:"md-cloud-download",size:"20"}}),e._v("\xA0\u4E0B\u8F7D\u6A21\u677F ")],1)],1)]),a("div",{staticClass:"import-btn"},[a("div",{staticClass:"icon"},[a("Icon",{attrs:{type:"md-cloud-upload",size:"60"}})],1),a("div",{staticClass:"text-panel"},[a("div",{staticClass:"title"},[e._v(e._s(e.importTitle||"\u4E0A\u4F20\u586B\u597D\u7684\u51C6\u8FD0\u8BC1\u4FE1\u606F"))]),a("div",{staticClass:"desc",staticStyle:{"margin-bottom":"10px"}},[e._v(" "+e._s(e.importDesc||"\u6587\u4EF6\u540D\u540E\u7F00\u5FC5\u987B\u4E3Axls\u6216xlsx\uFF08\u5373excel\u683C\u5F0F\uFF09\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u5F97\u5927\u4E8E10M")+" ")]),a("IndUploadFile",{attrs:{multiple:!1,accept:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel
|
|
43
|
+
</div>`}:null},gridApi:null,gridColumnApi:null,overlayNoRowsTemplate:'<span style="padding: 10px;">\u8BF7\u9009\u62E9\u67E5\u8BE2\u6761\u4EF6</span>',showZero:this.showZeroDefault,showZeroSwitch:!1,switchZeroCol:null,switchZeroTitle:"",showUnitSwitch:!1,switchCols:[],unitType:this.defaultTableUnitType||this.defaultUnitType||"X",pinnedTopRowDataWithUnit:this.pinnedTopRowData||null,topRows:this.pinnedTopRowData||null,treeData:!1,getDataPath:s=>s.treeLevelFlag,autoGroupColumnDef:null,groupDisplayType:"",inited:!1}},computed:{mergeIndexCol(){let e=u.default.find(this.columns,t=>t.autoMergeRow===!0);return(e==null?void 0:e.key)||(e==null?void 0:e.field)},mergeColumns(){let e=u.default.filter(this.columns,t=>!!t.autoMergeRow).map(t=>t.key||t.field);return e!=null&&e.length?e:void 0},paramRightUnit(){return u.default.some(this.flatColumns,e=>e.isSwitchUnit)?"\u5355\u4F4D\uFF1A"+(this.unitType=="X"?"\u7BB1":"\u4E07\u652F"):""},isEditTable(){return u.default.some(this.flatColumns,e=>["input","select","treeselect"].includes(e.type))},getRowId(){return this.rowKey?e=>e.data[this.rowKey]:null},flatColumns(){let e=[];return He(null,this.columns,t=>{e.push(t)}),e},columnCalcMap(){let e={};return u.default.forEach(this.flatColumns,t=>{t.calcRule&&It(e,t.calcRule,t.field||t.key)}),e},getTheme(){var e,t;return((t=(e=this.$store)==null?void 0:e.getters)==null?void 0:t.getTheme)||st()},columnNameArr(){return this.columns.map(e=>e.title)},selectedColumnNameArr(){var e=[];for(var t of this.cloneColumns)e.push(t.title);return e},paginationParams(){return{offset:(this.currentPage-1)*this.limitNumber,limit:this.limitNumber}},slots(){return this.$slots},tableSpanMergeColumns(){const e=a=>a.children?a.children.map(s=>e(s)).flat():[a];return e({children:this.tableColumns})},tableRowSpanMergeIndexMap(){const e={};return console.time("calcMerge"),this.tableSpanMergeColumns.forEach(t=>{let a=/autoMergeRow-([^\s]*)/.exec(t.cellClass);if(a[1]!="undefined"&&a[1]!="null"){const n=[];this.tableData.forEach((o,c)=>{c===0?n.push([0]):o[t.field]===this.tableData[c-1][t.field]&&(a[1]==="true"||o[a[1]]===this.tableData[c-1][a[1]])?n[n.length-1].push(c):n.push([c])});let i=n.filter(o=>o.length!==1),l={};u.default.forEach(i,o=>{l[o[0]+""]=o.length}),e[t.field]=l}}),console.timeEnd("calcMerge"),e},rowDataFiltered(){return this.showZeroSwitch?this.tableData.filter(t=>this.showZero=="Y"?!0:parseFloat(t[this.switchZeroCol])>0):this.tableData},shareFullSreen(){return this.$store.state.app.isFullSreen}},watch:{pinnedTopRowData:{handler:function(){this.pinnedTopRowDataWithUnit=u.default.cloneDeep(this.pinnedTopRowData),this.renderSumRow()},deep:!0},unitType(e,t){let a=u.default.cloneDeep(this.tableData);if(a.forEach(s=>{this.switchCols.forEach(n=>{he(t,e,s,n)})}),this.tableData=a,this.pinnedTopRowDataWithUnit&&this.pinnedTopRowDataWithUnit.length){let s=u.default.cloneDeep(this.pinnedTopRowDataWithUnit);s.forEach(n=>{this.switchCols.forEach(i=>{he(t,e,n,i)})}),this.pinnedTopRowDataWithUnit=s,this.renderSumRow()}},getTheme(){this.gridApi.resetRowHeights()},rowHeight(){this.gridApi.resetRowHeights()},width(){this.tableWidth=this.width},searchParams:{handler(){this.currentPage=1,this.tableRefresh()},deep:!0},dataApi:{handler(){this.currentPage=1,this.tableRefresh()},deep:!0},columns:{async handler(e){this.columnsHander(e)},deep:!0},value:{async handler(e){this.updating||(u.default.some(e,t=>{var a;return(a=t.treeLevelFlag)==null?void 0:a.length})||(e=await this.renderTreeData(e)),this.calcRulesData(e))},deep:!0},tableData:{async handler(e){if(this.overlayNoRowsTemplate='<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>',this.updating=!0,this.renderSumRow(),u.default.some(this.columns,{tree:!0})){let a=u.default.cloneDeep(e),s=mi(a);this.$emit("input",s)}else this.$emit("input",u.default.cloneDeep(e));this.$nextTick(()=>{this.updating=!1})},deep:!0},columnCalcMap:{handler:function(){this.calcRulesData(this.tableData)},deep:!0,immediate:!0},showSummary:{handler(e){this.tableShowSummary=e}},optionDropdownVisible(e){e&&(this.parsedColumns=this.$refs.tableRef.cloneColumns)},loading(e){this.tableLoading=e},height:{handler(){this.tableHeight=this.height}},showZero(){this.renderSumRow()}},created(){this.autoRefresh&&(this.tableRefresh(),this.inited=!0)},async mounted(){var a;this.tableRef=this,this.unitType=this.defaultTableUnitType,this.cloneColumns=this.tableColumnsInner(u.default.cloneDeep(this.columns)||[]),this.cloneColumns2=this.tableColumnsInner(u.default.cloneDeep(this.columns)||[]),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.showUnitSwitch=u.default.some(this.flatColumns,{isSwitchUnit:!0}),this.showZeroSwitch=u.default.some(this.flatColumns,s=>!!s.isSwitchZero),this.switchCols=u.default.filter(this.flatColumns,{isSwitchUnit:!0}).map(s=>s.field||s.key);let e=u.default.find(this.flatColumns,s=>!!s.isSwitchZero),t=((a=u.default.find(this.flatColumns,s=>!!s.isSwitchZero))==null?void 0:a.isSwitchZero)||"\u662F\u5426\u5C55\u793A\u8F93\u5165\u91CF\u4E3A\u96F6\u7684\u6570\u636E";this.switchZeroTitle=t,this.switchZeroCol=(e==null?void 0:e.field)||(e==null?void 0:e.key),this.renderSumRow(),await this.$nextTick(),this.checkAllGroup=this.columns.map(s=>s.title)},activated(){console.log(this._uid+"activated"),this.autoRefresh&&(this.inited||this.tableRefresh(),this.inited=!1)},destroyed(){this.optionDropdownVisible=!1},deactivated(){this.optionDropdownVisible=!1},methods:{getContextMenuItems:function(){return this.rowSelection=="multiple"?[{name:"\u9884\u89C8Excel",action:()=>{this.$refs.exportData.previewCurrentPage()}},{name:"\u5BFC\u51FA\u6570\u636E\u5230Excel",action:()=>{this.$refs.exportData.exportCurrentPage()}},{name:"\u5168\u9009\u9009\u4E2D",action:()=>{this.selectAll()}},{name:"\u5168\u90E8\u53D6\u6D88",action:()=>{this.deselectAll()}},{name:"\u5168\u90E8\u9009\u53CD",action:()=>{let e=this.getSelection(),t=u.default.cloneDeep(this.rowDataFiltered);u.default.remove(t,a=>u.default.some(e,s=>s.uuid===a.uuid)),this.setSelection(t,!0)}}]:[{name:"\u9884\u89C8Excel",action:()=>{this.$refs.exportData.previewCurrentPage()}},{name:"\u5BFC\u51FA\u6570\u636E\u5230Excel",action:()=>{this.$refs.exportData.exportCurrentPage()}}]},getRowClassCommon(e){var n;let t;this.getRowClass instanceof Function&&(t=this.getRowClass(e));let a,s=((n=e==null?void 0:e.data)==null?void 0:n.sumLevel)||"";return s&&(a="ind-table-sum-level"+s,t instanceof Array?t.push(a):typeof t=="string"?t+=" "+a:t=a),t},async columnsHander(e){this.showUnitSwitch=u.default.some(this.flatColumns,{isSwitchUnit:!0}),this.switchCols=u.default.filter(this.flatColumns,{isSwitchUnit:!0}).map(a=>a.field||a.key),this.cloneColumns=this.tableColumnsInner(u.default.cloneDeep(e)||[]),this.cloneColumns2=this.tableColumnsInner(u.default.cloneDeep(e)||[]),this.currentPage=1,this.tableRefresh(!0),this.columnsFilter();let t=u.default.cloneDeep(this.cloneColumns);this.tableColumns=t,this.checkAllGroup=e.map(a=>a.title),this.refreshTable=!0,await this.$nextTick(),this.refreshTable=!1},calcRulesData(e){if(u.default.isEmpty(this.columnCalcMap))this.tableData=u.default.cloneDeep(e||this.value),this.totalNumber=this.tableData.length;else{let t=u.default.cloneDeep(e||this.value),a={};u.default.forEach(this.columnCalcMap,(i,l)=>{u.default.merge(a,i)});let s=[];u.default.forEach(a,(i,l)=>{var c;let o=u.default.find(this.flatColumns,p=>p.field==l||p.key==l);s.push({rltKey:l,ast:i,precision:((c=o==null?void 0:o.cellRendererParams)==null?void 0:c.scale)||2,errRtn:0})}),zt(t,{calcRules:s}),this.tableData=t,this.totalNumber=t.length}},resetColumns(e){const t={};He(null,this.columns||[],a=>{let s=a.field||a.key||a.type||a.headerName||a.title;Object.assign(t,{[s]:a})}),He(null,e,(a,s)=>{let n=t[a.field||a.key||a.type||a.headerName||a.title];n.hide=!a.checked,a.pinned&&a.pinned!="none"||(s==null?void 0:s.pinned)&&(s==null?void 0:s.pinned)!="none"?n.pinned.fixed=n.pinned=a.pinned=="none"?(s==null?void 0:s.pinned)=="none"||s==null?void 0:s.pinned:a.pinned:(delete n.pinned,delete n.fixed),a.width&&(n.width&&(n.width=a.width),n.minWidth&&(n.minWidth=a.width))}),this.columnsHander(this.columns)},cellClicked(e){var t;if(this.$listeners&&this.$listeners.cellClicked)this.$listeners.cellClicked(e);else{let a=e.colDef||{};((t=a==null?void 0:a.cellRendererParams)==null?void 0:t.onClick)instanceof Function&&a.cellRendererParams.onClick(e.data)}},cellDoubleClicked(e){if(this.$listeners&&this.$listeners.cellDoubleClicked)this.$listeners.cellDoubleClicked(e);else{let t=e.colDef||{};t=u.default.find(this.columns,s=>t.key&&s.key==t.key||t.field&&s.field==t.field);let a=u.default.find(this.columns,{type:"link"});a&&(!t.type||["span","tooltip","enum"].includes(t.type))&&a.cellRendererParams.onClick instanceof Function&&a.cellRendererParams.onClick(e.data)}},sortChanged(){var e=this.gridColumnApi.getColumnState(),t=e.filter(function(s){return s.sort!=null}).map(function(s){return{sort:s.colId,order:s.sort,sortIndex:s.sortIndex}});let a=t[0]||{};if(a.order===void 0?(Reflect.deleteProperty(this.sortParams,"sort"),Reflect.deleteProperty(this.sortParams,"order")):this.sortParams={sort:a.sort,order:a.order},this.dataApi&&!this.disablePage)this.currentPage=1,this.tableRefresh();else{let s=[];if(a.order===void 0)if(this.dataApi){let n=u.default.cloneDeep(this.tableData);n=u.default.orderBy(n,["_initialseq"],["asc"]),this.tableData=n}else this.tableData=u.default.cloneDeep(this.value);else this.noSortLine>-1&&(s=this.tableData.slice(0,this.noSortLine),this.tableData.splice(0,this.noSortLine)),this.tableData.sort((n,i)=>{if(typeof n[this.sortParams.sort]=="number"&&typeof i[this.sortParams.sort]=="number"){let l=isNaN(parseFloat(n[this.sortParams.sort]))?0:parseFloat(n[this.sortParams.sort]),o=isNaN(parseFloat(i[this.sortParams.sort]))?0:parseFloat(i[this.sortParams.sort]);return this.sortParams.order==="asc"?l-o:o-l}else{let l=n[this.sortParams.sort]||"",o=i[this.sortParams.sort]||"";return this.sortParams.order==="asc"?l.localeCompare(o,"zh-CN"):o.localeCompare(l,"zh-CN")}}),this.noSortLine>-1&&this.tableData.splice(0,0,...s);this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})}this.$emit("on-sort-change",a)},refreshCells(){this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})},refreshHeader(){this.$nextTick().then(()=>{this.gridApi.refreshHeader()})},redrawRows(){this.$nextTick().then(()=>{this.gridApi.redrawRows()})},toggleFullScreen(){top!==self&&(top.toggleFullScreen(),this.shareFullSreen||this.$nextTick(()=>{top.document.getElementsByClassName("fullscreen-fixed")[0].style.zIndex=1e5})),this.$store.dispatch("updateIsFullSreen",!this.shareFullSreen),this.fullSreen=!this.fullSreen},getRowHeight(){let e={"ind-default-theme":42,"ind-small-theme":28};return(this.$config.agLineHeight||e[this.getTheme]||0)+this.rowAddHeight},onGridReady(e){window.gridApi=this.gridApi=e.api,this.gridColumnApi=e.columnApi},rowSelected(e){var s,n;if(this.selecting)return;let t=this.flatColumns.filter(i=>i.autoMergeRow);if(t!=null&&t.length){let i=((s=t[0])==null?void 0:s.field)||((n=t[0])==null?void 0:n.key);u.default.forEach(t,d=>{typeof d.autoMergeRow=="string"&&(i=d.autoMergeRow)});let l=this.tableRowSpanMergeIndexMap[i],o={};u.default.forEach(l,(d,f)=>{let r=parseInt(f),h=r+d,R=u.default.range(r,h);for(let U=r;U<h;U++)o[U]=R});let c={};u.default.forEach(this.rowDataFiltered,(d,f)=>{c[f+""]=d.uuid});let p=o[e.node.rowIndex]||[];if(e.node.selected){let d=this.rowDataFiltered.filter((f,r)=>p.includes(r));this.selecting=!0,this.setSelection(d)}else{let d=this.getSelection();d.length>0&&u.default.forEach(p,f=>{u.default.remove(d,(r,h)=>r.uuid==c[f+""])}),this.selecting=!0,this.setSelection(d,!0)}}setTimeout(()=>{this.selecting=!1},100);var a=this.gridApi.getSelectedRows();this.$emit("on-select-change",a)},selectionChanged(){var e=this.gridApi.getSelectedRows();this.$emit("on-select-change",e)},resetTableSize(e){this.tableSize=e,this.optionDropdownVisible=!1},dealColumnScale(e){var t;if(!v.isNil((t=e.cellRendererParams)==null?void 0:t.scale))return e.cellRendererParams.scale;if(e.isSwitchUnit){const a=this.unitType.toLowerCase();return this[`${a}Scale`]||2}return null},tableColumnsInner(e,t){var s,n,i,l,o,c,p,d;let a=[];for(let f=0;f<e.length;f++){let r=e[f],h={resizable:!0,headerName:r.title||r.headerName,width:r.width?parseInt(r.width)-(this.getTheme=="ind-small-theme"?10:0):r.width,minWidth:r.minWidth?parseInt(r.minWidth)-(this.getTheme=="ind-small-theme"?10:0):r.minWidth,maxWidth:r.maxWidth?parseInt(r.maxWidth)-(this.getTheme=="ind-small-theme"?10:0):r.maxWidth,pinned:r.fixed||r.pinned,align:r.align||"left",cellDataType:r.cellDataType||"text",headerTooltip:(i=(n=(s=this.$store)==null?void 0:s.getters)==null?void 0:n.getIndexDesc)==null?void 0:i[r.standardField||r.key||r.field],suppressStickyLabel:!0,suppressMovable:!!r.suppressMovable};if(r.flex&&(h.flex=r.flex),r.key&&(h.key=r.key),r.showRowGroup&&(h.showRowGroup=r.showRowGroup),r.rowGroup&&(h.rowGroup=r.rowGroup),r.hide&&(h.hide=r.hide),r.align&&(h.align=r.align),r.dataType&&(h.dataType=r.dataType),r.headerTooltip&&(h.headerTooltip=h.headerTooltip||r.headerTooltip),r.tooltipShowDelay&&(h.tooltipShowDelay=r.tooltipShowDelay),v.isNil(r.wrapHeaderText)||(h.wrapHeaderText=r.wrapHeaderText),r.autoHeaderHeight&&(h.autoHeaderHeight=r.autoHeaderHeight),h.cellClass=" ag-wrap-cell ",r.cellClass&&typeof r.cellClass=="string"&&(h.cellClass=h.cellClass+r.cellClass),r.cellClass&&r.cellClass instanceof Array&&(h.cellClass=h.cellClass+r.cellClass.join(" ")),r.cellStyle&&(h.cellStyle=r.cellStyle),r.headerClass&&(h.headerClass=r.headerClass),r.filter&&(h.filter=r.filter),r.filterParams&&(h.filterParams=r.filterParams),v.isNil(r.wrapText)||(h.wrapText=r.wrapText,r.wrapText&&(h.cellClass=h.cellClass+" ag-wrap-cell")),r.autoHeight&&(h.autoHeight=r.autoHeight),r.initialSort&&(h.initialSort=r.initialSort),r.rowSpan&&(h.rowSpan=r.rowSpan),r.colSpan&&(h.colSpan=r.colSpan),r.tree&&(h.cellRenderer="agGroupCellRenderer",h.showRowGroup=!0,this.groupDisplayType="custom",(l=r==null?void 0:r.cellRendererParams)!=null&&l.checkbox?this.rowSelection="multiple":this.rowSelection="single"),r.rowDrag&&(h.rowDrag=r.rowDrag),h.sortable=r.sortable,r.type=="index")h.cellRenderer=function(R){return R.node.rowPinned?"":R.node.rowIndex+1},h.cellClass=h.cellClass+" ag-center-aligned-cell";else if(r.type=="checkbox")h.headerName="",h.headerCheckboxSelection=!0,h.checkboxSelection=r.checkboxSelection||!0,h.showDisabledCheckboxes=!0,this.rowSelection="multiple",h.cellClass=h.cellClass+" ag-center-aligned-cell ind-ag-check-cell",this.suppressRowClickSelection=!1;else if(r.type=="radio")h.headerCheckboxSelection=!1,h.checkboxSelection=r.checkboxSelection||!0,h.showDisabledCheckboxes=!0,this.rowSelection="single",this.suppressRowClickSelection=!1,h.cellClass=h.cellClass+" ag-center-aligned-cell ind-ag-check-cell ind-radio";else{r.field&&(h.field=r.field),!h.field&&isNaN(r.key)&&(h.field=r.key);const R={tooltip:"AgTooltip",input:"AgInput",select:"AgSelect",datepicker:"AgDate",timepicker:"AgTime",treeSelect:"AgTreeSelect",button:"AgButton",link:"AgLink",enum:"AgEnum",format:"AgFormat",image:"AgImage",progress:"AgProgress",custom:"AgCustom",switch:"AgSwitch"};if(r.type&&(r.isSum?h.cellRendererSelector=U=>U.node.rowPinned?{component:"AgFormat",params:{...r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:{component:R[r.type],params:{...r.cellRendererParams,scopedSlots:this.$scopedSlots,scaleFn:()=>this.dealColumnScale(r)}}:h.cellRendererSelector=U=>{if(!U.node.rowPinned)return{component:R[r.type],params:{...r.cellRendererParams,scopedSlots:this.$scopedSlots,scaleFn:()=>this.dealColumnScale(r)}}}),!r.type&&(r.isSum||!v.isNil((o=r==null?void 0:r.cellRendererParams)==null?void 0:o.scale)||((c=r==null?void 0:r.cellRendererParams)==null?void 0:c.dateFormat)||r.isSwitchUnit)&&(h.cellRendererSelector=U=>U.node.rowPinned?{component:"AgFormat",params:{...r==null?void 0:r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:{component:"AgFormat",params:{...r==null?void 0:r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}),r.cellRendererParams&&(h.cellRendererParams=r.cellRendererParams,r.type=="input"&&((d=(p=r.cellRendererParams)==null?void 0:p.props)==null?void 0:d.number)&&(h.cellDataType="number")),r.cellRenderer&&(h.cellRenderer=r.cellRenderer),r.valueGetter&&(h.valueGetter=r.valueGetter),r.cellRendererSelector&&(h.cellRendererSelector=r.cellRendererSelector),r.valueSetter&&v.isString(r.valueSetter)?h.valueSetter=r.valueSetter:r.valueSetter&&(h.valueSetter=U=>{const{newValue:S,data:Z,colDef:L}=U;if(this.isRevertingOldValue)return Z[L.field||L.key]=S,!0;const Q=r.valueSetter(U);if(!Q){const{oldValue:A,column:H}=U;this.isRevertingOldValue=!0,Z[L.field||L.key]=S,setTimeout(()=>{U.node.setDataValue(H,A),this.isRevertingOldValue=!1},0)}if(!this.isRevertingOldValue)return Q}),this.columnCalcMap&&this.columnCalcMap[r.field||r.key]){let U=this.columnCalcMap[r.field||r.key];h.valueSetter=S=>{S.data[r.field||r.key]=S.newValue;let Z=[];u.default.forEach(U,(Q,A)=>{var H;Z.push({rltKey:A,ast:Q,precision:((H=r==null?void 0:r.cellRendererParams)==null?void 0:H.scale)||2,errRtn:0})});let L={calcRules:Z};return pi(S.data,L),!0}}r.valueFormatter&&(h.valueFormatter=r.valueFormatter),r.align&&(h.cellClass=h.cellClass+(r.align=="right"?" ag-right-aligned-cell":r.align=="center"?" ag-center-aligned-cell":""))}r.autoMergeRow&&(h.rowSpan=R=>R.node.rowPinned?0:this.tableRowSpanMergeIndexMap[R.colDef.field]&&this.tableRowSpanMergeIndexMap[R.colDef.field][R.node.rowIndex+""]||0,h.cellClassRules={"cell-span":R=>this.tableRowSpanMergeIndexMap[R.colDef.field]&&this.tableRowSpanMergeIndexMap[R.colDef.field][R.node.rowIndex+""]}),h.cellClass=h.cellClass+" "+r.type+" autoMergeRow-"+r.autoMergeRow,r.cellClassRules&&(h.cellClassRules?h.cellClassRules={...r.cellClassRules,...h.cellClassRules}:h.cellClassRules=r.cellClassRules),a.push(h),r.children&&r.children.length&&(h.children=this.tableColumnsInner(r.children))}return t||(this.cloneColumns2=u.default.cloneDeep(a)),a},columnsFilter(){this.columnID=di(JSON.stringify(this.$route.path+this.cloneColumns2.length));let e=this.cloneColumns2,t=new Array,a=localStorage.getItem("tableColumns");if(a!=null){let n=JSON.parse(a).filter(i=>i.id==this.columnID);if(n.length==1){let i=n[0].value;e.forEach(l=>{let o="";o+=l.key||"",o+=l.type||"",o+=l.title,o!=""&&i.filter(p=>p==o).length>=1&&t.push(l)})}}t.length>0?this.cloneColumns=u.default.cloneDeep(t):this.cloneColumns=u.default.cloneDeep(this.cloneColumns2),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.cloneColumns2.length!=this.cloneColumns.length&&(this.checkAll=!1),this.checkAllGroup=this.selectedColumnNameArr.slice(0)},getParams(){return Object.assign({},this.paginationParams,this.sortParams,this.searchParams)},onPageChange(e){this.currentPage=e,this.tableRefresh(),this.$emit("on-page-change",e)},onPageSizeChange(e){this.limitNumber=e,this.tableRefresh(),this.$emit("on-page-size-change",e)},handleCheckAll(){this.checkAll=!this.checkAll,this.checkAll?this.checkAllGroup=this.columnNameArr.slice(0):this.checkAllGroup=[]},checkAllGroupChange(e){e.length===this.columnNameArr.length?this.checkAll=!0:e.length>0?this.checkAll=!1:this.checkAll=!1},tableSettingToggle(e){this.btnSel=e,this.optionDropdownVisible=!this.optionDropdownVisible},closeTableSettingDropdown(){this.optionDropdownVisible=!1},columnSelect(){let e=[];this.columns.forEach(t=>{for(let a of this.checkAllGroup)if(t.title===a){e.push(t);break}}),this.cloneColumns=e,this.tableColumns=this.tableColumnsInner(this.cloneColumns),this.optionDropdownVisible=!1},columnSave(){this.columnSelect();let e=new Array;this.cloneColumns.forEach(s=>{let n="";n+=s.key||"",n+=s.type||"",n+=s.title,n!=""&&e.push(n)});let t=localStorage.getItem("tableColumns"),a=null;if(t==null)a=new Array;else{a=JSON.parse(t);let s=a.findIndex(n=>n.id==this.columnID);s>-1&&a.splice(s,1)}a.push({id:this.columnID,value:e}),localStorage.setItem("tableColumns",JSON.stringify(a)),this.optionDropdownVisible=!1},columnClear(){let e=localStorage.getItem("tableColumns"),t=null;if(e==null)t=new Array;else{t=JSON.parse(e);let a=t.findIndex(s=>s.id==this.columnID);a>-1&&t.splice(a,1)}localStorage.setItem("tableColumns",JSON.stringify(t)),this.cloneColumns=u.default.cloneDeep(this.cloneColumns2),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.checkAll=!1,this.handleCheckAll(),this.optionDropdownVisible=!1},forceUpdate(){this.hackReset=!1,this.$nextTick(()=>{this.hackReset=!0})},renderSumRow:u.default.debounce(async function(){var t;if(u.default.some(this.flatColumns,a=>a.isSum)){console.time("calcSum");let a=u.default.filter(this.flatColumns,f=>f.isSum),s=u.default.remove(a,f=>v.isString(f.isSum)),n=u.default.remove(a,f=>f.isSum instanceof Function);const i={};u.default.forEach(s,f=>{It(i,f.isSum,f.field||f.key)});let l={};for(let f=0;f<this.flatColumns.length;f++)if(!["checkbox","radios","index"].includes((t=this.flatColumns[f])==null?void 0:t.type)){let r=this.flatColumns[f];l[r.field||r.key]="\u5408\u8BA1";break}a.forEach(f=>l[f.field||f.key]=0),l=u.default.reduce(this.rowDataFiltered,(f,r,h)=>(a.forEach(R=>{if(v.isString(R.isSum))return;let U=R.field||R.key,S=this.tableRowSpanMergeIndexMap[U],Z=[];u.default.forEach(S,(L,Q)=>{let A=u.default.range(Q,parseInt(Q)+L);Z.push(...A.slice(1))}),Z.includes(h)||(l[U]=u.default.round(l[U]+(!r[U]||isNaN(r[U])?0:parseFloat(r[U])),6))}),f),l),u.default.forEach(n,f=>{l[f.field||f.key]=f.isSum(this.rowDataFiltered,f)});let o=[l],c={};u.default.forEach(i,(f,r)=>{u.default.merge(c,f)});let p=[];u.default.forEach(c,(f,r)=>{var R;let h=u.default.find(s,U=>U.field==r||U.key==r);p.push({rltKey:r,ast:f,precision:((R=h==null?void 0:h.cellRendererParams)==null?void 0:R.scale)||2,errRtn:0})}),zt(o,{calcRules:p}),this.topRows=this.pinnedTopRowDataWithUnit?u.default.concat(this.pinnedTopRowDataWithUnit,o):o,console.timeEnd("calcSum")}else this.topRows=this.pinnedTopRowDataWithUnit},5),async renderTreeData(e){if(this.treeData=u.default.some(e,t=>{var a,s;return((a=t.children)==null?void 0:a.length)||((s=t.treeLevelFlag)==null?void 0:s.length)}),this.renderTreeFlag(e),this.treeData){let t=[];He(null,e,(a,s,n)=>{a.seq=n,t.push(a)}),e=t}return e},renderTreeFlag(e){let t=u.default.find(this.columns,{tree:!0});if(He(null,e,(s,n,i)=>{s.uuid=s.uuid||v.uuid()}),u.default.isEmpty(t))return;let a=(t==null?void 0:t.field)||(t==null?void 0:t.key);He(null,e,(s,n,i)=>{if(s.treeLevelFlag=n?[...n.treeLevelFlag,s[a]]:[s[a]],n){let l=n.path?u.default.cloneDeep(n.path):[n.uuid];l.push(s.uuid),s.path=l}else s.path=[s.uuid]})},tableRefresh:function(e){this.dataApi&&!e?(this.gridApi&&this.gridApi.hideOverlay(),this.tableLoading=!0,this.dataApi(Object.assign({},this.disablePage?{}:this.paginationParams,this.sortParams,this.searchParams)).then(async t=>{if(t){this.overlayNoRowsTemplate='<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>',this.$emit("on-data-load",t);let a=t.data.rows||t.data.records||[];this.disablePage&&t.data instanceof Array&&(a=t.data),this.renderDataFn&&(a=this.renderDataFn(a)),a.forEach((s,n)=>{s._initialseq=n}),this.unitType!=this.defaultUnitType&&a.forEach(s=>{this.switchCols.forEach(n=>{he(this.defaultUnitType,this.unitType,s,n)})}),this.tableData=await this.renderTreeData(a),this.totalNumber=t.data.total||0,this.$emit("on-data-format-load",t)}this.tableLoading=!1}).catch(()=>{this.tableData=[],this.totalNumber=0,this.tableLoading=!1})):this.dataApi||(this.totalNumber=this.value.length),this.optionDropdownVisible=!1},setUnitType(e){this.unitType=e},toggleUnitIfNeeded:u.default.debounce(async function(){setTimeout(()=>{if(this.pinnedTopRowDataWithUnit&&this.pinnedTopRowDataWithUnit.length){let t=u.default.cloneDeep(this.pinnedTopRowDataWithUnit);this.unitType!=this.defaultUnitType&&(t.forEach(a=>{this.switchCols.forEach(s=>{he(this.defaultUnitType,this.unitType,a,s)})}),this.pinnedTopRowDataWithUnit=t,this.renderSumRow())}let e=u.default.cloneDeep(this.tableData);this.unitType!=this.defaultUnitType&&(e.forEach(t=>{this.switchCols.forEach(a=>{he(this.defaultUnitType,this.unitType,t,a)})}),this.$emit("input",e))},10)},1),getSelection(){return this.gridApi.getSelectedRows()},clearSelection(){this.gridApi.getSelectedNodes().forEach(e=>e.setSelected(!1))},selectAll(){this.gridApi.selectAll()},deselectAll(){this.gridApi.deselectAll()},setDefaultSelection(e,t){console.log("setIndexSelection",e);let a=(e||[]).map(i=>i[this.uuid]);console.log("setIndexSelection sels",a);let s=[],n=[];setTimeout(()=>{const i=this;this.gridApi.forEachNode(l=>{console.log("setIndexSelection each include node",a.includes(l.data.uuid)),a.includes(l.data[i.uuid])?s.push(l):t||n.push(l)}),console.log("setIndexSelection selected",s),console.log("setIndexSelection deselected",n),this.gridApi.setNodesSelected({nodes:s,newValue:!0}),this.gridApi.setNodesSelected({nodes:n,newValue:!1})},50)},setSelection(e,t){let a=(e||[]).map(i=>i[this.rowKey||"uuid"]),s=[],n=[];setTimeout(()=>{this.gridApi.forEachNode(i=>{a.includes(i.data[this.rowKey||"uuid"])?s.push(i):t&&n.push(i)}),this.gridApi.setNodesSelected({nodes:s,newValue:!0}),this.gridApi.setNodesSelected({nodes:n,newValue:!1})},50)},getXData(){if(this.unitType=="X")return this.tableData;{let e=u.default.cloneDeep(this.tableData);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"X",t,a)})}),e}},getWZData(){if(this.unitType=="WZ")return this.tableData;{let e=u.default.cloneDeep(this.tableData);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"WZ",t,a)})}),e}},getXSum(){if(this.unitType=="X")return this.topRows;{let e=u.default.cloneDeep(this.topRows);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"X",t,a)})}),e}},getWZSum(){if(this.unitType=="WZ")return this.topRows;{let e=u.default.cloneDeep(this.topRows);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"WZ",t,a)})}),e}},flattenData(e){return u.default.reduce(e,(t,a)=>{let s=a.children&&a.children.length?this.flattenData(a.children):[];return[...t,a,...s]},[])},async updateTableData(e,t=!0){if(!this.rowKey){console.warn("\u8BF7\u4F20rowKey\uFF0C\u8C22\u8C22");return}this.updating=!0;const a=this.flattenData(this.value),s=u.default.reduce(a||[],(n,i)=>(Object.assign(n,{[i[this.rowKey]]:i}),n),{});this.gridApi.forEachNode(n=>{e(n.data,(i,l)=>{if(t){const c=s[n.data[this.rowKey]];c[i]=l}const o=this.gridColumnApi.getColumn(i);o&&n.setDataValue(o,l)})}),await this.$nextTick(),this.updating=!1}}},fi={};var Rm=b(vm,Vm,Tm,!1,Um,null,null,null);function Um(e){for(let t in fi)this[t]=fi[t]}var Qt=function(){return Rm.exports}(),gm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"export-data"})},bm=[];const Sm={},Vi={};var ym=b(Sm,gm,bm,!1,km,null,null,null);function km(e){for(let t in Vi)this[t]=Vi[t]}var Fm=function(){return ym.exports}(),Wm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"index-manager"},[a("IndButton",{attrs:{bizType:"reset"},on:{click:e.manageIndex}},[e._v(" \u5217\u7B5B\u9009 ")]),a("IndDrawer",{staticClass:"index-manager",attrs:{width:"800",title:"\u9884\u7F6E\u5217\u7BA1\u7406",lazyRender:!1},model:{value:e.showManager,callback:function(s){e.showManager=s},expression:"showManager"}},[a("div",{staticClass:"ind-flex-column height100"},[a("IndTable",{ref:"mangeTable",staticStyle:{padding:"0"},attrs:{columns:e.manageColumns,disablePage:"",showTableOption:!1,isIndexManageTable:"",rowKey:"uuid"},model:{value:e.curIndex.columnList,callback:function(s){e.$set(e.curIndex,"columnList",s)},expression:"curIndex.columnList"}})],1),a("IndButtonGroup",{attrs:{slot:"footer",split:"",right:""},slot:"footer"},[a("IndButton",{attrs:{bizType:"save",loading:e.saving},on:{click:e.apply}},[e._v(" \u786E\u8BA4 ")]),a("IndButton",{attrs:{bizType:"save",ghost:"",loading:e.saving},on:{click:function(s){e.showManager=!1}}},[e._v(" \u53D6\u6D88 ")])],1)],1)],1)},Zm=[];function ot(e,t,a){Array.isArray(t)&&t.length&&u.default.forEach(t,(s,n)=>{let i=!1;if(typeof a=="function")try{const l=a(s,e,n);typeof l=="boolean"&&(i=l)}catch(l){console.error(l)}i||ot(s,s.children,a)})}const xm={name:"IndexManage",props:{funId:String,tableRef:Object},computed:{isTreeColumn(){return u.default.some(this.curIndex.columnList,e=>{var t,a;return((t=e.children)==null?void 0:t.length)||((a=e.treeLevelFlag)==null?void 0:a.length)})}},data(){return{indexCacheList:[],curIndex:{columnList:[],titleName:"",id:""},manageColumns:[],titleForm:{titleName:""},fieldList:[{formKey:"titleName",title:"\u9884\u7F6E\u65B9\u6848\u540D",type:"input",required:!0}],showManager:!1,saving:!1}},watch:{isTreeColumn(){this.renderManageColumns()}},mounted(){let e;if(typeof window!="undefined"&&(e=localStorage.getItem("index-cache"+this.funId)),e){let t=JSON.parse(e);t.forEach(a=>{ot(null,a.columnList,s=>{s.checked=s.checked=="1",s.pinned=s.pinned||"none"})}),this.indexCacheList=t}else this.indexCacheList=[];this.renderManageColumns()},methods:{async syncToStorage(){let e=u.default.cloneDeep(this.indexCacheList);e.forEach(t=>{ot(null,t.columnList,a=>{a.checked=a.checked?"1":"0",a.pinned=="none"&&delete a.pinned})}),typeof window!="undefined"&&localStorage.setItem("index-cache"+this.funId,JSON.stringify(e)),await this.$nextTick()},renderManageColumns(){console.log("this.isTreeColumn",this.isTreeColumn),this.isTreeColumn?this.manageColumns=[{field:"headerName",headerName:"\u5217\u540D",minWidth:200,flex:2,tree:!0,cellRendererParams:{checkbox:!0,suppressCount:!0}},{field:"pinned",headerName:"\u9501\u5B9A",width:200,type:"select",cellRendererParams:{datas:[{K:"none",V:"\u4E0D\u9501\u5B9A"},{K:"left",V:"\u9501\u5B9A\u5230\u5DE6\u4FA7"},{K:"right",V:"\u9501\u5B9A\u5230\u53F3\u4FA7"}]}},{field:"width",headerName:"\u5217\u5BBD",width:100,type:"input",cellRendererParams:{props:{number:!0,type:"number"}}}]:this.manageColumns=[{headerName:"",minWidth:60,width:60,type:"checkbox"},{field:"headerName",headerName:"\u5217\u540D",minWidth:200,flex:2},{field:"pinned",headerName:"\u9501\u5B9A",flex:1,minWidth:100,type:"select",cellRendererParams:{datas:[{K:"",V:"\u4E0D\u9501\u5B9A"},{K:"left",V:"\u9501\u5B9A\u5230\u5DE6\u4FA7"},{K:"right",V:"\u9501\u5B9A\u5230\u53F3\u4FA7"}]}},{field:"width",headerName:"\u5217\u5BBD",width:100,type:"input",cellRendererParams:{props:{number:!0,type:"number"}}}],console.log("this.manageColumns is",this.manageColumns)},triggerToogle(e){if(e!="manage"){let t=u.default.find(this.indexCacheList,{id:e})||{};t&&(this.curIndex=t,this.$emit("resetColumns",u.default.cloneDeep(this.curIndex.columnList)))}},apply(){let e=u.default.cloneDeep(this.curIndex),t=this.$refs.mangeTable.getSelection();ot(null,e.columnList,a=>{a.checked=u.default.some(t,{field:a.field})}),this.$emit("resetColumns",u.default.cloneDeep(e.columnList)),this.showManager=!1},async saveIndex(e){if(await this.$refs.editForm.validate()){let t=u.default.cloneDeep(this.indexCacheList);if(this.curIndex.id){let a=u.default.find(t,{id:this.curIndex.id});u.default.assign(a,u.default.cloneDeep(this.curIndex),this.titleForm)}else{let a=u.default.cloneDeep(this.curIndex);a.titleName=this.titleForm.titleName,a.id=new Date().getTime()+""+Math.ceil(Math.random()*1e4),a.isDefault=e?"1":"0",t.push(a)}this.indexCacheList=t,await this.syncToStorage(),this.$emit("resetColumns",u.default.cloneDeep(this.curIndex.columnList))}},saveIndexAsDefault(){this.saveIndex(!0)},saveTableIndex(){},saveAsIndex(){},async manageIndex(){this.showManager=!0;let e=u.default.cloneDeep(this.curIndex);if(!e.id){let t=u.default.cloneDeep(this.tableRef.columns);ot(null,t,a=>{var s;a.field=a.field||a.key,a.headerName=a.headerName||a.title,(s=a.children)!=null&&s.length||(a.checked=!a.hide),a.pinned=a.fixed||a.pinned||"none",!a.width&&a.minWidth&&(a.width=a.minWidth)}),e.columnList=t,this.curIndex=e,this.titleForm={titleName:""}}console.log("manageIndex this.curIndex",this.curIndex),this.setTableSelected()},async editIndex(e){this.curIndex=e,this.titleForm={titleName:e.titleName},this.setTableSelected()},async setTableSelected(){setTimeout(()=>{let e=[];ot(null,this.curIndex.columnList,t=>{t.checked&&e.push(t)}),this.$refs.mangeTable.setSelection(e)},10)},async removeIndex(e,t){try{await this.$Modal.confirm({title:"\u5220\u9664\u64CD\u4F5C",content:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",loading:!0});let a=u.default.cloneDeep(this.indexCacheList);u.default.remove(a,{id:t}),this.indexCacheList=a,this.syncToStorage()}catch(a){console.log(a)}this.$Modal.remove()}}},Ti={};var Mm=b(xm,Wm,Zm,!1,wm,null,null,null);function wm(e){for(let t in Ti)this[t]=Ti[t]}var Em=function(){return Mm.exports}(),Dm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"lineChart",staticStyle:{width:"100%",height:"100%"}})},Cm=[];const _m={name:"LineChart",computed:{chartData(){return this.getData("data")},xxAxis(){return this.getData("xAxis")}},mounted(){setTimeout(()=>{this.initChart()},0),window.addEventListener("resize",this.handleResize)},beforeDestroy(){window.removeEventListener("resize",this.handleResize)},methods:{getData(e,t=[]){var a,s;return((s=(a=this.params)==null?void 0:a.value)==null?void 0:s[this.params.config[e]])||t},initChart(){const e=this.$refs.lineChart;if(!e){console.error("Chart container not found!");return}const t=echarts.init(e);this.setChartOption(t)},setChartOption(e){var n,i,l,o;e.off("click");const t=this.$refs.lineChart.offsetHeight,a=t*.8,s={grid:{left:"5%",right:"5%",top:(t-a)/2,bottom:(t-a)/2,containLabel:!1},tooltip:{trigger:"item",formatter:c=>`${c.name}: ${c.value}`,position:(c,p,d,f,r)=>{let h=c[0]+10,R=c[1]-30;return[h,R]},zIndex:1e3},xAxis:{type:"category",data:this.xxAxis,show:!1},yAxis:{type:"value",show:!1},series:[{data:this.chartData,type:"line",smooth:!0,symbolSize:4,symbol:(i=(n=this.params)==null?void 0:n.config)!=null&&i.symbol?this.params.config.symbol:"circle",itemStyle:{color:(o=(l=this.params)==null?void 0:l.config)!=null&&o.color?this.params.config.color:"rgb(19, 127, 209)"}}]};e.on("click",c=>{console.log("Clicked item:",c)}),e.setOption(s)},handleResize(){const e=this.$refs.lineChart,t=echarts.getInstanceByDom(e);t&&(this.setChartOption(t),t.resize())}}},Ni={};var Jm=b(_m,Dm,Cm,!1,Ym,null,null,null);function Ym(e){for(let t in Ni)this[t]=Ni[t]}var Bm=function(){return Jm.exports}(),zm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"lambo-grid-table",class:[e.fullSreen?"fullscreen-fixed":""]},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.$slots.search,expression:"$slots.search"}],ref:"search",staticClass:"search"},[e._t("search")],2),a("div",{directives:[{name:"show",rawName:"v-show",value:e.$slots.tip,expression:"$slots.tip"}],ref:"tip",staticClass:"tip"},[e._t("tip")],2),a("div",{directives:[{name:"show",rawName:"v-show",value:e.$slots.important-e.tip,expression:"$slots.important - tip"}],ref:"important-tip",staticClass:"important-tip"},[a("Icon",{attrs:{type:"md-information-circle"}}),e._t("important-tip")],2),a("div",{ref:"buttons",staticClass:"other-button"},[a("Row",[[a("i-col",{staticStyle:{"text-align":"left"},attrs:{flex:"1 1 0%"}},[e.showUnitSwitch&&e.isShowUnitSwitch?a("IndUnitRadio",{staticStyle:{"margin-top":"var(--ind-unit-switch-bottom)","line-height":"1","margin-left":"10px"},attrs:{isShowWX:e.isShowWX,isShowJ:e.isShowJ},model:{value:e.unitType,callback:function(s){e.unitType=s},expression:"unitType"}}):e._e()],1)],a("i-col",{directives:[{name:"show",rawName:"v-show",value:e.showUnitSwitch&&e.isShowUnitSwitch||e.showTableOption||e.$slots.options,expression:"(showUnitSwitch && isShowUnitSwitch) || showTableOption || $slots.options"}],staticStyle:{"text-align":"right"},attrs:{flex:"0 0 auto"}},[a("div",{staticClass:"ind-flex end"},[a("div",{staticStyle:{"line-height":"var(--ivu-form-item-content-line-height)","padding-bottom":"calc(var(--ind-table-button-padding) + 2px)","margin-right":"10px"}},[e._t("options")],2)])])],2)],1),a("IndLoadingPanel",{attrs:{loading:e.tableLoading}},[e.refreshTable?e._e():a("ag-grid-vue",e._g(e._b({ref:"tableRef",staticClass:"ag-theme-balham",style:{height:e.height&&!e.fullSreen?e.height+"px":"100%"},attrs:{id:"agTable",suppressCellFocus:!0,suppressMenu:!0,suppressContextMenu:!e.showTableOption,defaultColDef:e.defaultColDef,headerHeight:e.headerHeight,rowHeight:e.getRowHeightProp?e.getRowHeightProp():e.getRowHeight(),getRowHeight:e.getRowHeightProp||e.getRowHeight,rowData:e.rowDataFiltered,suppressRowClickSelection:(e.isPc||e.isEditTable)&&e.rowSelection=="multiple"||e.suppressRowClickSelection,rowSelection:e.rowSelection,rowMultiSelectWithClick:!e.isPc&&!e.isEditTable&&(e.rowSelection=="multiple"||e.rowMultiSelectWithClick),columnDefs:e.tableColumns,localeText:e.localeText,singleClickEdit:!0,pinnedTopRowData:e.topRows,pinnedBottomRowData:e.pinnedBottomRowData,suppressRowTransform:!0,stopEditingWhenCellsLoseFocus:!0,getRowClass:e.getRowClassCommon,getRowId:e.getRowId,tooltipShowDelay:500,overlayNoRowsTemplate:e.noRowsTemplate||e.overlayNoRowsTemplate,treeData:e.treeData,getDataPath:e.getDataPath,autoGroupColumnDef:e.autoGroupColumnDef,groupDisplayType:e.groupDisplayType,groupSelectsChildren:e.groupSelectsChildren,groupDefaultExpanded:e.groupDefaultExpanded,getContextMenuItems:e.getContextMenuItems},on:{sortChanged:e.sortChanged,"selection-changed":e.selectionChanged,rowSelected:e.rowSelected,"grid-ready":e.onGridReady,cellClicked:e.cellClicked,cellDoubleClicked:e.cellDoubleClicked}},"ag-grid-vue",e.$attrs,!1),e.$listeners))],1),e.showBottom?a("div",{ref:"bottom"},[a("Row",{staticStyle:{"margin-top":"10px"}},[a("i-col",{staticStyle:{"text-align":"left"},attrs:{span:"18"}},[a("Page",{directives:[{name:"show",rawName:"v-show",value:!e.disablePage,expression:"!disablePage"}],attrs:{size:"small",total:e.totalNumber,current:e.currentPage,"page-size":e.limitNumber,"show-sizer":"","show-total":"","show-elevator":""},on:{"on-change":e.onPageChange,"on-page-size-change":e.onPageSizeChange}}),a("span",{directives:[{name:"show",rawName:"v-show",value:e.disablePage,expression:"disablePage"}]},[e._v("\u5171 "+e._s(e.tableData.length)+" \u6761\u6570\u636E")])],1)],1)],1):e._e()],1)},Im=[];function Qm(e){var t="A",a="C",s="V",n="D",i="PageUp",l="PageDown",o="Tab",c="ArrowLeft",p="ArrowUp",d="ArrowRight",f="ArrowDown",r="F2",h="Backspace",R="Escape",U=" ",S="Delete",Z="Home",L="End",Q=e.event,A=Q.key,H=[i,l,o,r,R],oe=[c,d,p,f,h,S,U,Z,L];if((Q.ctrlKey||Q.metaKey)&&(H.push(t),H.push(s),H.push(a),H.push(n)),e.editing||(H=H.concat(oe)),e.column.getId()==="country"&&(A===p||A===f))return!1;var ue=H.some(function(ne){return ne===A||A.toUpperCase()===ne});return ue}function Xe(e,t,a){Array.isArray(t)&&t.length&&u.default.forEach(t,(s,n)=>{let i=!1;if(typeof a=="function")try{const l=a(s,e,n);typeof l=="boolean"&&(i=l)}catch(l){console.error(l)}i||Xe(s,s.children,a)})}const Gm={name:"IndMobileTable",components:{ExportData:Fm,IndexManage:Em,Tooltip:$e,AgTooltip:Jn,AgInput:Bn,AgSelect:In,AgDate:Gn,AgTreeSelect:Ln,AgButton:$n,AgLink:Xn,AgEnum:An,AgFormat:qn,AgImage:ti,AgChart:Bm},props:{rowSpanDefs:Array,headerHeight:{type:Number,default:28},getRowHeightProp:Function,rowMultiSelectWithClick:Boolean,pinnedTopRowData:Array,pinnedBottomRowData:Array,rowSpanColumns:Array,rowSpanIndexCol:String,getRowClass:Function,paramLeft:String,paramRight:String,exportFileName:String,rowKey:{type:String,default:""},disablePage:{type:Boolean,default:!1},dataChildren:{type:Boolean,default:!1},noSortLine:{type:Number,default:-1},dataApi:{type:Function,default:null},searchParams:{type:Object,default(){return{}}},value:{type:Array,default(){return[]}},columns:{type:Array,default(){return[]}},size:{type:String,validator(e){return["small","large","default"].indexOf(e)>-1},default:"default"},width:{type:Number},height:{type:[Number,String]},rowClassName:{type:Function,default:e=>{if(e&&e.color){if(e.color=="Blue")return"demo-table-Blue-row";if(e.color=="red")return"demo-table-red-row"}if(e&&e.fontColor){if(e.fontColor=="yellow")return"demo-table-yellow-font-row";if(e.fontColor=="red")return"demo-table-red-font-row"}}},loading:{type:Boolean,default:!1},showTableOption:{type:Boolean,default:!0},showBottom:{type:Boolean,default:!0},tooltipTheme:{type:String,default:"dark"},showSummary:{type:Boolean,default:!1},autoRefresh:{type:Boolean,default:!1},summaryMethod:{type:Function},exportEnum:{type:Object,default(){return{}}},headerAutoHeight:{type:Boolean,default:!0},cellAutoHeight:{type:Boolean,default:!1},rowAddHeight:{type:Number,default:0},renderDataFn:Function,revertBtn:Boolean,isIndexManageTable:Boolean,isShowUnitSwitch:{type:Boolean,default:!0},isShowWX:Boolean,isShowJ:Boolean,defaultUnitType:{type:String,default:"X"},defaultTableUnitType:{type:String,default:"X"},xScale:{type:Number,default:2},wzScale:{type:Number,default:2},funId:String,groupDefaultExpanded:{type:Number,default:-1},xmlInfo:String,rowClick:Boolean,groupSelectsChildren:{type:Boolean,default:!0},showZeroDefault:{type:String,default:"Y"},noRowsTemplate:String},data(){function e(){const t=navigator.userAgent,a=["Windows","Macintosh","Linux"];for(const s of a)if(t.includes(s))return!0;return!1}return{isPc:e(),tableRef:null,refreshTable:!1,rowSelection:"single",suppressRowClickSelection:!1,localeText:Ms,isRevertingOldValue:!1,btnSel:"",tableDataSrc:[],tableData:u.default.cloneDeep(this.value),tableWidth:this.width,tableHeight:this.height,tableLoading:this.loading,cloneColumns:[],cloneColumns2:[],fullSreen:!1,tableSize:"tableSize"in localStorage?localStorage.getItem("tableSize"):this.size,tableShowSummary:this.showSummary,tableSummaryMethod:this.summaryMethod,totalNumber:0,currentPage:1,limitNumber:20,optionDropdownVisible:!1,checkAll:!0,checkAllGroup:[],dataExportFormat:"xlsx",sortParams:{},hackReset:!0,columnID:"",parsedColumns:[],index:1,tableColumns:[],defaultColDef:{unSortIcon:!0,suppressMenu:!0,wrapHeaderText:this.headerAutoHeight,autoHeaderHeight:this.headerAutoHeight,wrapText:this.cellAutoHeight,autoHeight:this.cellAutoHeight,suppressKeyboardEvent:t=>Qm(t)},gridApi:null,gridColumnApi:null,overlayNoRowsTemplate:'<span style="padding: 10px;">\u8BF7\u9009\u62E9\u67E5\u8BE2\u6761\u4EF6</span>',showZero:this.showZeroDefault,showZeroSwitch:!1,switchZeroCol:null,switchZeroTitle:"",showUnitSwitch:!1,switchCols:[],unitType:this.defaultTableUnitType||this.defaultUnitType||"X",pinnedTopRowDataWithUnit:this.pinnedTopRowData||null,topRows:this.pinnedTopRowData||null,treeData:!1,getDataPath:t=>t.treeLevelFlag,autoGroupColumnDef:null,groupDisplayType:""}},computed:{mergeIndexCol(){let e=u.default.find(this.columns,t=>t.autoMergeRow===!0);return(e==null?void 0:e.key)||(e==null?void 0:e.field)},mergeColumns(){let e=u.default.filter(this.columns,t=>!!t.autoMergeRow).map(t=>t.key||t.field);return e!=null&&e.length?e:void 0},paramRightUnit(){return u.default.some(this.flatColumns,e=>e.isSwitchUnit)?"\u5355\u4F4D\uFF1A"+(this.unitType=="X"?"\u7BB1":"\u4E07\u652F"):""},isEditTable(){return u.default.some(this.flatColumns,e=>["input","select","treeselect"].includes(e.type))},getRowId(){return this.rowKey?e=>e.data[this.rowKey]:null},flatColumns(){let e=[];return Xe(null,this.columns,t=>{e.push(t)}),e},columnCalcMap(){let e={};return u.default.forEach(this.flatColumns,t=>{t.calcRule&&It(e,t.calcRule,t.field||t.key)}),e},getTheme(){var e,t;return((t=(e=this.$store)==null?void 0:e.getters)==null?void 0:t.getTheme)||st()},columnNameArr(){return this.columns.map(e=>e.title)},selectedColumnNameArr(){var e=[];for(var t of this.cloneColumns)e.push(t.title);return e},paginationParams(){return{offset:(this.currentPage-1)*this.limitNumber,limit:this.limitNumber}},slots(){return this.$slots},tableSpanMergeColumns(){const e=a=>a.children?a.children.map(s=>e(s)).flat():[a];return e({children:this.tableColumns})},tableRowSpanMergeIndexMap(){const e={};return this.tableSpanMergeColumns.forEach(t=>{let a=/autoMergeRow-([^\s]*)/.exec(t.cellClass);if(a[1]!="undefined"&&a[1]!="null"){const n=[];this.tableData.forEach((o,c)=>{c===0?n.push([0]):o[t.field]===this.tableData[c-1][t.field]&&(a[1]==="true"||o[a[1]]===this.tableData[c-1][a[1]])?n[n.length-1].push(c):n.push([c])});let i=n.filter(o=>o.length!==1),l={};u.default.forEach(i,o=>{l[o[0]+""]=o.length}),e[t.field]=l}}),e},rowDataFiltered(){return this.showZeroSwitch?this.tableData.filter(t=>this.showZero=="Y"?!0:parseFloat(t[this.switchZeroCol])>0):this.tableData}},watch:{pinnedTopRowData:{handler:function(){this.pinnedTopRowDataWithUnit=u.default.cloneDeep(this.pinnedTopRowData),this.renderSumRow()},deep:!0},unitType(e,t){let a=u.default.cloneDeep(this.tableData);if(a.forEach(s=>{this.switchCols.forEach(n=>{he(t,e,s,n)})}),this.tableData=a,this.pinnedTopRowDataWithUnit&&this.pinnedTopRowDataWithUnit.length){let s=u.default.cloneDeep(this.pinnedTopRowDataWithUnit);s.forEach(n=>{this.switchCols.forEach(i=>{he(t,e,n,i)})}),this.pinnedTopRowDataWithUnit=s,this.renderSumRow()}},getTheme(){this.gridApi.resetRowHeights()},rowHeight(){this.gridApi.resetRowHeights()},width(){this.tableWidth=this.width},searchParams:{handler(){this.currentPage=1,this.tableRefresh()},deep:!0},dataApi:{handler(){this.currentPage=1,this.tableRefresh()},deep:!0},columns:{async handler(e){this.columnsHander(e)},deep:!0},value:{async handler(e){this.updating||(u.default.some(e,t=>{var a;return(a=t.treeLevelFlag)==null?void 0:a.length})||(e=await this.renderTreeData(e)),this.calcRulesData(e))},deep:!0},tableData:{async handler(e){if(this.overlayNoRowsTemplate='<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>',this.updating=!0,this.renderSumRow(),u.default.some(this.columns,{tree:!0})){let a=u.default.cloneDeep(e),s=mi(a);this.$emit("input",s)}else this.$emit("input",u.default.cloneDeep(e));this.$nextTick(()=>{this.updating=!1})},deep:!0},columnCalcMap:{handler:function(){this.calcRulesData()},deep:!0,immediate:!0},showSummary:{handler(e){this.tableShowSummary=e}},optionDropdownVisible(e){e&&(this.parsedColumns=this.$refs.tableRef.cloneColumns)},loading(e){this.tableLoading=e},height:{handler(){this.tableHeight=this.height}},showZero(){this.renderSumRow()}},async created(){var a;this.tableRef=this,this.unitType=this.defaultTableUnitType,this.cloneColumns=this.tableColumnsInner(u.default.cloneDeep(this.columns)||[]),this.cloneColumns2=this.tableColumnsInner(u.default.cloneDeep(this.columns)||[]),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.showUnitSwitch=u.default.some(this.flatColumns,{isSwitchUnit:!0}),this.showZeroSwitch=u.default.some(this.flatColumns,s=>!!s.isSwitchZero),this.switchCols=u.default.filter(this.flatColumns,{isSwitchUnit:!0}).map(s=>s.field||s.key);let e=u.default.find(this.flatColumns,s=>!!s.isSwitchZero),t=((a=u.default.find(this.flatColumns,s=>!!s.isSwitchZero))==null?void 0:a.isSwitchZero)||"\u662F\u5426\u5C55\u793A\u8F93\u5165\u91CF\u4E3A\u96F6\u7684\u6570\u636E";this.switchZeroTitle=t,this.switchZeroCol=(e==null?void 0:e.field)||(e==null?void 0:e.key),this.renderSumRow(),await this.$nextTick(),this.checkAllGroup=this.columns.map(s=>s.title)},activated(){this.autoRefresh&&this.tableRefresh()},destroyed(){this.optionDropdownVisible=!1},deactivated(){this.optionDropdownVisible=!1},methods:{getContextMenuItems:function(){return this.rowSelection=="multiple"?[{name:"\u5BFC\u51FA\u6570\u636E\u5230Excel",action:()=>{this.$refs.exportData.exportCurrentPage()}},{name:"\u5168\u9009\u9009\u4E2D",action:()=>{this.selectAll()}},{name:"\u5168\u90E8\u53D6\u6D88",action:()=>{this.deselectAll()}},{name:"\u5168\u90E8\u9009\u53CD",action:()=>{let e=this.getSelection(),t=u.default.cloneDeep(this.rowDataFiltered);u.default.remove(t,a=>u.default.some(e,s=>s.uuid===a.uuid)),this.setSelection(t,!0)}}]:[{name:"\u5BFC\u51FA\u6570\u636E\u5230Excel",action:()=>{this.$refs.exportData.exportCurrentPage()}}]},getRowClassCommon(e){var n;let t;this.getRowClass instanceof Function&&(t=this.getRowClass(e));let a,s=((n=e==null?void 0:e.data)==null?void 0:n.sumLevel)||"";return s&&(a="ind-table-sum-level"+s,t instanceof Array?t.push(a):typeof t=="string"?t+=" "+a:t=a),t},async columnsHander(e){this.showUnitSwitch=u.default.some(this.flatColumns,{isSwitchUnit:!0}),this.switchCols=u.default.filter(this.flatColumns,{isSwitchUnit:!0}).map(a=>a.field||a.key),this.cloneColumns=this.tableColumnsInner(u.default.cloneDeep(e)||[]),this.cloneColumns2=this.tableColumnsInner(u.default.cloneDeep(e)||[]),this.currentPage=1,this.tableRefresh(!0),this.columnsFilter();let t=u.default.cloneDeep(this.cloneColumns);this.tableColumns=t,this.checkAllGroup=e.map(a=>a.title),this.refreshTable=!0,await this.$nextTick(),this.refreshTable=!1},calcRulesData(e){if(u.default.isEmpty(this.columnCalcMap))this.tableData=u.default.cloneDeep(e||this.value),this.totalNumber=this.tableData.length;else{let t=u.default.cloneDeep(e||this.value),a={};u.default.forEach(this.columnCalcMap,(i,l)=>{u.default.merge(a,i)});let s=[];u.default.forEach(a,(i,l)=>{var c;let o=u.default.find(this.flatColumns,p=>p.field==l||p.key==l);s.push({rltKey:l,ast:i,precision:((c=o==null?void 0:o.cellRendererParams)==null?void 0:c.scale)||2,errRtn:0})}),zt(t,{calcRules:s}),this.tableData=t,this.totalNumber=t.length}},resetColumns(e){const t={};Xe(null,this.columns||[],a=>{let s=a.field||a.key||a.type||a.headerName||a.title;Object.assign(t,{[s]:a})}),Xe(null,e,(a,s)=>{let n=t[a.field||a.key||a.type||a.headerName||a.title];n.hide=!a.checked,a.pinned&&a.pinned!="none"||(s==null?void 0:s.pinned)&&(s==null?void 0:s.pinned)!="none"?n.pinned.fixed=n.pinned=a.pinned=="none"?(s==null?void 0:s.pinned)=="none"||s==null?void 0:s.pinned:a.pinned:(delete n.pinned,delete n.fixed),a.width&&(n.width&&(n.width=a.width),n.minWidth&&(n.minWidth=a.width))}),this.columnsHander(this.columns)},cellClicked(e){var t;if(this.$listeners&&this.$listeners.cellClicked)this.$listeners.cellClicked(e);else{let a=e.colDef||{};((t=a==null?void 0:a.cellRendererParams)==null?void 0:t.onClick)instanceof Function&&a.cellRendererParams.onClick(e.data)}},cellDoubleClicked(e){if(this.$listeners&&this.$listeners.cellDoubleClicked)this.$listeners.cellDoubleClicked(e);else{let t=e.colDef||{};t=u.default.find(this.columns,s=>t.key&&s.key==t.key||t.field&&s.field==t.field);let a=u.default.find(this.columns,{type:"link"});a&&(!t.type||["span","tooltip","enum"].includes(t.type))&&a.cellRendererParams.onClick instanceof Function&&a.cellRendererParams.onClick(e.data)}},sortChanged(){var e=this.gridColumnApi.getColumnState(),t=e.filter(function(s){return s.sort!=null}).map(function(s){return{sort:s.colId,order:s.sort,sortIndex:s.sortIndex}});let a=t[0]||{};if(a.order===void 0?(Reflect.deleteProperty(this.sortParams,"sort"),Reflect.deleteProperty(this.sortParams,"order")):this.sortParams={sort:a.sort,order:a.order},this.dataApi&&!this.disablePage)this.currentPage=1,this.tableRefresh();else{let s=[];if(a.order===void 0)if(this.dataApi){let n=u.default.cloneDeep(this.tableData);n=u.default.orderBy(n,["_initialseq"],["asc"]),this.tableData=n}else this.tableData=u.default.cloneDeep(this.value);else this.noSortLine>-1&&(s=this.tableData.slice(0,this.noSortLine),this.tableData.splice(0,this.noSortLine)),this.tableData.sort((n,i)=>{if(typeof n[this.sortParams.sort]=="number"&&typeof i[this.sortParams.sort]=="number"){let l=isNaN(parseFloat(n[this.sortParams.sort]))?0:parseFloat(n[this.sortParams.sort]),o=isNaN(parseFloat(i[this.sortParams.sort]))?0:parseFloat(i[this.sortParams.sort]);return this.sortParams.order==="asc"?l-o:o-l}else{let l=n[this.sortParams.sort]||"",o=i[this.sortParams.sort]||"";return this.sortParams.order==="asc"?String(l||"").localeCompare(String(o||""),"zh-CN"):String(o||"").localeCompare(String(l||""),"zh-CN")}}),this.noSortLine>-1&&this.tableData.splice(0,0,...s);this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})}this.$emit("on-sort-change",a)},refreshCells(){this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})},refreshHeader(){this.$nextTick().then(()=>{this.gridApi.refreshHeader()})},redrawRows(){this.$nextTick().then(()=>{this.gridApi.redrawRows()})},toggleFullScreen(){top!==self&&top.toggleFullScreen(),this.fullSreen=!this.fullSreen},getRowHeight(){return({"ind-default-theme":42,"ind-small-theme":28}[this.getTheme]||0)+this.rowAddHeight},onGridReady(e){window.gridApi=this.gridApi=e.api,this.gridColumnApi=e.columnApi},rowSelected(e){var s,n;if(this.selecting)return;let t=this.flatColumns.filter(i=>i.autoMergeRow);if(t!=null&&t.length){let i=((s=t[0])==null?void 0:s.field)||((n=t[0])==null?void 0:n.key);u.default.forEach(t,d=>{typeof d.autoMergeRow=="string"&&(i=d.autoMergeRow)});let l=this.tableRowSpanMergeIndexMap[i],o={};u.default.forEach(l,(d,f)=>{let r=parseInt(f),h=r+d,R=u.default.range(r,h);for(let U=r;U<h;U++)o[U]=R});let c={};u.default.forEach(this.rowDataFiltered,(d,f)=>{c[f+""]=d.uuid});let p=o[e.node.rowIndex]||[];if(e.node.selected){let d=this.rowDataFiltered.filter((f,r)=>p.includes(r));this.selecting=!0,this.setSelection(d)}else{let d=this.getSelection();d.length>0&&u.default.forEach(p,f=>{u.default.remove(d,(r,h)=>r.uuid==c[f+""])}),this.selecting=!0,this.setSelection(d,!0)}}setTimeout(()=>{this.selecting=!1},100);var a=this.gridApi.getSelectedRows();this.$emit("on-select-change",a)},selectionChanged(){var e=this.gridApi.getSelectedRows();this.$emit("on-select-change",e)},resetTableSize(e){this.tableSize=e,this.optionDropdownVisible=!1},dealColumnScale(e){var t;if(!v.isNil((t=e.cellRendererParams)==null?void 0:t.scale))return e.cellRendererParams.scale;if(e.isSwitchUnit){const a=this.unitType.toLowerCase();return this[`${a}Scale`]||2}return null},tableColumnsInner(e,t){var s,n,i,l,o,c,p,d;let a=[];for(let f=0;f<e.length;f++){let r=e[f],h={resizable:!0,headerName:r.title||r.headerName,width:r.width?parseInt(r.width)-(this.getTheme=="ind-small-theme"?10:0):r.width,minWidth:r.minWidth?parseInt(r.minWidth)-(this.getTheme=="ind-small-theme"?10:0):r.minWidth,maxWidth:r.maxWidth?parseInt(r.maxWidth)-(this.getTheme=="ind-small-theme"?10:0):r.maxWidth,pinned:r.fixed||r.pinned,cellDataType:r.cellDataType||"text",headerTooltip:(i=(n=(s=this.$store)==null?void 0:s.getters)==null?void 0:n.getIndexDesc)==null?void 0:i[r.standardField||r.key||r.field],suppressStickyLabel:!0,suppressMovable:!!r.suppressMovable};if(r.flex&&(h.flex=r.flex),r.key&&(h.key=r.key),r.showRowGroup&&(h.showRowGroup=r.showRowGroup),r.rowGroup&&(h.rowGroup=r.rowGroup),r.hide&&(h.hide=r.hide),r.align&&(h.align=r.align),r.dataType&&(h.dataType=r.dataType),r.headerTooltip&&(h.headerTooltip=h.headerTooltip||r.headerTooltip),r.tooltipShowDelay&&(h.tooltipShowDelay=r.tooltipShowDelay),v.isNil(r.wrapHeaderText)||(h.wrapHeaderText=r.wrapHeaderText),r.autoHeaderHeight&&(h.autoHeaderHeight=r.autoHeaderHeight),h.cellClass=" ag-wrap-cell ",r.cellClass&&typeof r.cellClass=="string"&&(h.cellClass=h.cellClass+r.cellClass),r.cellClass&&r.cellClass instanceof Array&&(h.cellClass=h.cellClass+r.cellClass.join(" ")),r.cellStyle&&(h.cellStyle=r.cellStyle),r.headerClass&&(h.headerClass=r.headerClass),r.headerComponent&&(h.headerComponent=r.headerComponent),r.headerComponentParams&&(h.headerComponentParams=r.headerComponentParams),r.filter&&(h.filter=r.filter),r.filterParams&&(h.filterParams=r.filterParams),v.isNil(r.wrapText)||(h.wrapText=r.wrapText,r.wrapText&&(h.cellClass=h.cellClass+" ag-wrap-cell")),r.autoHeight&&(h.autoHeight=r.autoHeight),r.initialSort&&(h.initialSort=r.initialSort),r.rowSpan&&(h.rowSpan=r.rowSpan),r.colSpan&&(h.colSpan=r.colSpan),r.tree&&(h.cellRenderer="agGroupCellRenderer",h.showRowGroup=!0,this.groupDisplayType="custom",(l=r==null?void 0:r.cellRendererParams)!=null&&l.checkbox?this.rowSelection="multiple":this.rowSelection="single"),r.rowDrag&&(h.rowDrag=r.rowDrag),h.sortable=r.sortable,r.type=="index")h.cellRenderer=function(R){return R.node.rowPinned?"":R.node.rowIndex+1},h.cellClass=h.cellClass+" ag-center-aligned-cell";else if(r.type=="checkbox")h.headerName="",h.headerCheckboxSelection=!0,h.checkboxSelection=r.checkboxSelection||!0,h.showDisabledCheckboxes=!0,this.rowSelection="multiple",h.cellClass=h.cellClass+" ag-center-aligned-cell ind-ag-check-cell",this.suppressRowClickSelection=!1;else if(r.type=="radio")h.headerCheckboxSelection=!1,h.checkboxSelection=r.checkboxSelection||!0,h.showDisabledCheckboxes=!0,this.rowSelection="single",this.suppressRowClickSelection=!1,h.cellClass=h.cellClass+" ag-center-aligned-cell ind-ag-check-cell ind-radio";else{r.field&&(h.field=r.field),!h.field&&isNaN(r.key)&&(h.field=r.key);const R={tooltip:"AgTooltip",input:"AgInput",select:"AgSelect",datepicker:"AgDate",treeSelect:"AgTreeSelect",button:"AgButton",link:"AgLink",enum:"AgEnum",format:"AgFormat",image:"AgImage",chart:"AgChart"};if(r.type&&(r.isSum?h.cellRendererSelector=U=>U.node.rowPinned?{component:"AgFormat",params:{...r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:{component:R[r.type],params:{...r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:h.cellRendererSelector=U=>{if(!U.node.rowPinned)return{component:R[r.type],params:{...r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}}),!r.type&&(r.isSum||!v.isNil((o=r==null?void 0:r.cellRendererParams)==null?void 0:o.scale)||((c=r==null?void 0:r.cellRendererParams)==null?void 0:c.dateFormat)||r.isSwitchUnit)&&(h.cellRendererSelector=U=>U.node.rowPinned?{component:"AgFormat",params:{...r==null?void 0:r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}:{component:"AgFormat",params:{...r==null?void 0:r.cellRendererParams,scaleFn:()=>this.dealColumnScale(r)}}),r.cellRendererParams&&(h.cellRendererParams=r.cellRendererParams,r.type=="input"&&((d=(p=r.cellRendererParams)==null?void 0:p.props)==null?void 0:d.number)&&(h.cellDataType="number")),r.cellRenderer&&(h.cellRenderer=r.cellRenderer),r.valueGetter&&(h.valueGetter=r.valueGetter),r.cellRendererSelector&&(h.cellRendererSelector=r.cellRendererSelector),r.valueSetter&&v.isString(r.valueSetter)?h.valueSetter=r.valueSetter:r.valueSetter&&(h.valueSetter=U=>{const{newValue:S,data:Z,colDef:L}=U;if(this.isRevertingOldValue)return Z[L.field||L.key]=S,!0;const Q=r.valueSetter(U);if(!Q){const{oldValue:A,column:H}=U;this.isRevertingOldValue=!0,Z[L.field||L.key]=S,setTimeout(()=>{U.node.setDataValue(H,A),this.isRevertingOldValue=!1},0)}if(!this.isRevertingOldValue)return Q}),this.columnCalcMap&&this.columnCalcMap[r.field||r.key]){let U=this.columnCalcMap[r.field||r.key];h.valueSetter=S=>{S.data[r.field||r.key]=S.newValue;let Z=[];u.default.forEach(U,(Q,A)=>{var H;Z.push({rltKey:A,ast:Q,precision:((H=r==null?void 0:r.cellRendererParams)==null?void 0:H.scale)||2,errRtn:0})});let L={calcRules:Z};return pi(S.data,L),!0}}r.valueFormatter&&(h.valueFormatter=r.valueFormatter),r.align&&(h.cellClass=h.cellClass+(r.align=="right"?" ag-right-aligned-cell":r.align=="center"?" ag-center-aligned-cell":""))}r.autoMergeRow&&(h.rowSpan=R=>R.node.rowPinned?0:this.tableRowSpanMergeIndexMap[R.colDef.field]&&this.tableRowSpanMergeIndexMap[R.colDef.field][R.node.rowIndex+""]||0,h.cellClassRules={"cell-span":R=>this.tableRowSpanMergeIndexMap[R.colDef.field]&&this.tableRowSpanMergeIndexMap[R.colDef.field][R.node.rowIndex+""]}),h.cellClass=h.cellClass+" "+r.type+" autoMergeRow-"+r.autoMergeRow,r.cellClassRules&&(h.cellClassRules?h.cellClassRules={...r.cellClassRules,...h.cellClassRules}:h.cellClassRules=r.cellClassRules),a.push(h),r.children&&r.children.length&&(h.children=this.tableColumnsInner(r.children))}return t||(this.cloneColumns2=u.default.cloneDeep(a)),a},columnsFilter(){this.columnID=di(JSON.stringify(this.$route.path+this.cloneColumns2.length));let e=this.cloneColumns2,t=new Array,a=localStorage.getItem("tableColumns");if(a!=null){let n=JSON.parse(a).filter(i=>i.id==this.columnID);if(n.length==1){let i=n[0].value;e.forEach(l=>{let o="";o+=l.key||"",o+=l.type||"",o+=l.title,o!=""&&i.filter(p=>p==o).length>=1&&t.push(l)})}}t.length>0?this.cloneColumns=u.default.cloneDeep(t):this.cloneColumns=u.default.cloneDeep(this.cloneColumns2),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.cloneColumns2.length!=this.cloneColumns.length&&(this.checkAll=!1),this.checkAllGroup=this.selectedColumnNameArr.slice(0)},getParams(){return Object.assign({},this.paginationParams,this.sortParams,this.searchParams)},onPageChange(e){this.currentPage=e,this.tableRefresh(),this.$emit("on-page-change",e)},onPageSizeChange(e){this.limitNumber=e,this.tableRefresh(),this.$emit("on-page-size-change",e)},handleCheckAll(){this.checkAll=!this.checkAll,this.checkAll?this.checkAllGroup=this.columnNameArr.slice(0):this.checkAllGroup=[]},checkAllGroupChange(e){e.length===this.columnNameArr.length?this.checkAll=!0:e.length>0?this.checkAll=!1:this.checkAll=!1},tableSettingToggle(e){this.btnSel=e,this.optionDropdownVisible=!this.optionDropdownVisible},closeTableSettingDropdown(){this.optionDropdownVisible=!1},columnSelect(){let e=[];this.columns.forEach(t=>{for(let a of this.checkAllGroup)if(t.title===a){e.push(t);break}}),this.cloneColumns=e,this.tableColumns=this.tableColumnsInner(this.cloneColumns),this.optionDropdownVisible=!1},columnSave(){this.columnSelect();let e=new Array;this.cloneColumns.forEach(s=>{let n="";n+=s.key||"",n+=s.type||"",n+=s.title,n!=""&&e.push(n)});let t=localStorage.getItem("tableColumns"),a=null;if(t==null)a=new Array;else{a=JSON.parse(t);let s=a.findIndex(n=>n.id==this.columnID);s>-1&&a.splice(s,1)}a.push({id:this.columnID,value:e}),localStorage.setItem("tableColumns",JSON.stringify(a)),this.optionDropdownVisible=!1},columnClear(){let e=localStorage.getItem("tableColumns"),t=null;if(e==null)t=new Array;else{t=JSON.parse(e);let a=t.findIndex(s=>s.id==this.columnID);a>-1&&t.splice(a,1)}localStorage.setItem("tableColumns",JSON.stringify(t)),this.cloneColumns=u.default.cloneDeep(this.cloneColumns2),this.tableColumns=u.default.cloneDeep(this.cloneColumns),this.checkAll=!1,this.handleCheckAll(),this.optionDropdownVisible=!1},forceUpdate(){this.hackReset=!1,this.$nextTick(()=>{this.hackReset=!0})},renderSumRow:u.default.debounce(async function(){if(this.flatColumns.some(t=>t.isSum)){console.time("calcSum");let t={};for(let d of this.flatColumns)if(!["checkbox","radios","index"].includes(d.type)){t[d.field||d.key]="\u5408\u8BA1";break}let a=this.flatColumns.filter(d=>d.isSum),s=[],n=[];a.forEach(d=>{typeof d.isSum=="string"?s.push(d):d.isSum instanceof Function&&n.push(d)});const i={};s.forEach(d=>{It(i,d.isSum,d.field||d.key)}),a.forEach(d=>{(d.field||d.key)in t||(t[d.field||d.key]=0)}),this.rowDataFiltered.forEach(d=>{a.forEach(f=>{if(typeof f.isSum=="string")return;let r=f.field||f.key,h=d[r];this.isNullOrNaN(h)||(t[r]=(t[r]||0)+parseFloat(h))})}),n.forEach(d=>{t[d.field||d.key]=d.isSum(this.rowDataFiltered,d)});let l=[t],o={};u.default.forEach(i,(d,f)=>{u.default.merge(o,d)});let c=[];u.default.forEach(o,(d,f)=>{var h;let r=u.default.find(s,R=>R.field==f||R.key==f);c.push({rltKey:f,ast:d,precision:((h=r==null?void 0:r.cellRendererParams)==null?void 0:h.scale)||2,errRtn:0})}),zt(l,{calcRules:c}),this.topRows=this.pinnedTopRowDataWithUnit?u.default.concat(this.pinnedTopRowDataWithUnit,l):l,console.timeEnd("calcSum")}else this.topRows=this.pinnedTopRowDataWithUnit},5),isNullOrNaN(e){return typeof e=="object"||isNaN(e)},async renderTreeData(e){if(this.treeData=u.default.some(e,t=>{var a,s;return((a=t.children)==null?void 0:a.length)||((s=t.treeLevelFlag)==null?void 0:s.length)}),this.renderTreeFlag(e),this.treeData){let t=[];Xe(null,e,(a,s,n)=>{a.seq=n,t.push(a)}),e=t}return e},renderTreeFlag(e){let t=u.default.find(this.columns,{tree:!0});if(Xe(null,e,(s,n,i)=>{s.uuid=s.uuid||v.uuid()}),u.default.isEmpty(t))return;let a=(t==null?void 0:t.field)||(t==null?void 0:t.key);Xe(null,e,(s,n,i)=>{if(s.treeLevelFlag=n?[...n.treeLevelFlag,s[a]]:[s[a]],n){let l=n.path?u.default.cloneDeep(n.path):[n.uuid];l.push(s.uuid),s.path=l}else s.path=[s.uuid]})},tableRefresh:function(e){this.dataApi&&!e?(this.gridApi&&this.gridApi.hideOverlay(),this.tableLoading=!0,this.dataApi(Object.assign({},this.disablePage?{}:this.paginationParams,this.sortParams,this.searchParams)).then(async t=>{if(t){this.overlayNoRowsTemplate='<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>',this.$emit("on-data-load",t);let a=t.data.rows||t.data.records||[];this.disablePage&&t.data instanceof Array&&(a=t.data),this.renderDataFn&&(a=this.renderDataFn(a)),a.forEach((s,n)=>{s._initialseq=n}),this.unitType!=this.defaultUnitType&&a.forEach(s=>{this.switchCols.forEach(n=>{he(this.defaultUnitType,this.unitType,s,n)})}),this.tableData=await this.renderTreeData(a),this.totalNumber=t.data.total||0,this.$emit("on-data-format-load",t)}this.tableLoading=!1}).catch(()=>{this.tableData=[],this.totalNumber=0,this.tableLoading=!1})):this.dataApi||(this.totalNumber=this.value.length),this.optionDropdownVisible=!1},setUnitType(e){this.unitType=e},toggleUnitIfNeeded:u.default.debounce(async function(){setTimeout(()=>{if(this.pinnedTopRowDataWithUnit&&this.pinnedTopRowDataWithUnit.length){let t=u.default.cloneDeep(this.pinnedTopRowDataWithUnit);this.unitType!=this.defaultUnitType&&(t.forEach(a=>{this.switchCols.forEach(s=>{he(this.defaultUnitType,this.unitType,a,s)})}),this.pinnedTopRowDataWithUnit=t,this.renderSumRow())}let e=u.default.cloneDeep(this.tableData);this.unitType!=this.defaultUnitType&&(e.forEach(t=>{this.switchCols.forEach(a=>{he(this.defaultUnitType,this.unitType,t,a)})}),this.$emit("input",e))},10)},1),toggleRowUnitIfNeeded:u.default.debounce(async function(t,a){setTimeout(()=>{let s=u.default.cloneDeep(this.tableData),n=[];const i=l=>{l.forEach(o=>{o.isRowSwitchUnit&&n.push(o),o.children&&o.children.length>0&&i(o.children)})};i(this.columns),s.forEach(l=>{n.forEach(o=>{o.isRowSwitchUnit&&t[o.rowSwitchUnitType]!=a[o.rowSwitchUnitType]&&he(t[o.rowSwitchUnitType],a[o.rowSwitchUnitType],l,o.key)})}),this.$emit("input",s)},10)},1),getSelection(){return this.gridApi.getSelectedRows()},clearSelection(){this.gridApi.getSelectedNodes().forEach(e=>e.setSelected(!1))},selectAll(){this.gridApi.selectAll()},deselectAll(){this.gridApi.deselectAll()},setSelection(e,t){let a=(e||[]).map(i=>i[this.rowKey||"uuid"]),s=[],n=[];setTimeout(()=>{this.gridApi.forEachNode(i=>{a.includes(i.data[this.rowKey||"uuid"])?s.push(i):t&&n.push(i)}),this.gridApi.setNodesSelected({nodes:s,newValue:!0}),this.gridApi.setNodesSelected({nodes:n,newValue:!1})},50)},getXData(){if(this.unitType=="X")return this.tableData;{let e=u.default.cloneDeep(this.tableData);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"X",t,a)})}),e}},getWZData(){if(this.unitType=="WZ")return this.tableData;{let e=u.default.cloneDeep(this.tableData);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"WZ",t,a)})}),e}},getXSum(){if(this.unitType=="X")return this.topRows;{let e=u.default.cloneDeep(this.topRows);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"X",t,a)})}),e}},getWZSum(){if(this.unitType=="WZ")return this.topRows;{let e=u.default.cloneDeep(this.topRows);return e.forEach(t=>{this.switchCols.forEach(a=>{he(this.unitType,"WZ",t,a)})}),e}},async updateTableData(e,t=!0){if(!this.rowKey){console.warn("\u8BF7\u4F20rowKey\uFF0C\u8C22\u8C22");return}this.updating=!0;const a=u.default.reduce(this.value||[],(s,n)=>(Object.assign(s,{[n[this.rowKey]]:n}),s),{});this.gridApi.forEachNode(s=>{e(s.data,(n,i)=>{if(t){const o=a[s.data[this.rowKey]];o[n]=i}const l=this.gridColumnApi.getColumn(n);l&&s.setDataValue(l,i)})}),await this.$nextTick(),this.updating=!1},async outSortChanged(e){if(e.order===void 0?(Reflect.deleteProperty(this.sortParams,"sort"),Reflect.deleteProperty(this.sortParams,"order")):this.sortParams={sort:e.sort,order:e.order},this.dataApi&&!this.disablePage)this.currentPage=1,this.tableRefresh();else{let t=[];if(e.order===void 0)if(this.dataApi){let a=u.default.cloneDeep(this.tableData);a=u.default.orderBy(a,["_initialseq"],["asc"]),this.tableData=a}else this.tableData=u.default.cloneDeep(this.value);else this.noSortLine>-1&&(t=this.tableData.slice(0,this.noSortLine),this.tableData.splice(0,this.noSortLine)),this.tableData.sort((a,s)=>{if(typeof a[this.sortParams.sort]=="number"&&typeof s[this.sortParams.sort]=="number"){let n=isNaN(parseFloat(a[this.sortParams.sort]))?0:parseFloat(a[this.sortParams.sort]),i=isNaN(parseFloat(s[this.sortParams.sort]))?0:parseFloat(s[this.sortParams.sort]);return this.sortParams.order==="asc"?n-i:i-n}else{let n=a[this.sortParams.sort]||"",i=s[this.sortParams.sort]||"";return this.sortParams.order==="asc"?String(n||"").localeCompare(String(i||""),"zh-CN"):String(i||"").localeCompare(String(n||""),"zh-CN")}}),this.noSortLine>-1&&(this.tableData=[...t,...u.default.cloneDeep(this.tableData)]);this.$nextTick().then(()=>{this.gridApi.refreshCells({force:!0})})}this.refreshCells(),this.$emit("on-sort-change",e)}}},vi={};var Om=b(Gm,zm,Im,!1,Lm,null,null,null);function Lm(e){for(let t in vi)this[t]=vi[t]}var Ri=function(){return Om.exports}(),jm=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"audittable"},[a("Modal",{attrs:{width:e.width,closable:!0,"footer-hide":!0},model:{value:e.modal,callback:function(s){e.modal=s},expression:"modal"}},[a("br"),a("Table",{attrs:{showTableOption:!1,"disable-page":"",columns:e.tableColumns,data:e.tableData}})],1)],1)},$m=[];const Hm={name:"IndAuditLogModal",components:{Modal:te,Table:Qt},props:{busiPk:{type:String,default:""},auditModal:Boolean,dictData:{type:Object,default:()=>({})},serverContext:{type:String,default:""},busiType:{type:String,default:""},width:{type:Number,default:()=>Math.floor(parseInt(window.innerWidth)*.5)}},data(){return{baseUrl:"/ipmUtils/getAuditLog",dataUrl:"",tableData:[],modal:!1,tableColumns:[{title:"\u5904\u7406\u4EBA",key:"dealUserName",align:"center",sortable:!1},{title:"\u5904\u7406\u65F6\u95F4",align:"center",sortable:"custom",key:"dealTime",formatter:"formatDate"},{title:"\u5904\u7406\u610F\u89C1",key:"dealOpinion",align:"center",sortable:!1},{title:"\u5904\u7406\u540E\u72B6\u6001",align:"center",sortable:!1,render:(e,t)=>e("span",this.dictData[t.row.status])}]}},watch:{auditModal:{handler(){this.modal=this.auditModal,this.modal&&this.query()}},modal(){this.modal||this.$emit("update:auditModal",!1)}},methods:{async query(){let e=await this.getAuditLog();this.tableData=e.data},getAuditLog(){return this.dataUrl=`${this.serverContext}${this.baseUrl}?busiPk=${this.busiPk}&busiType=${this.busiType}`,v.axios.get(this.dataUrl)}}},Ui={};var Xm=b(Hm,jm,$m,!1,Pm,null,null,null);function Pm(e){for(let t in Ui)this[t]=Ui[t]}var gi=function(){return Xm.exports}(),Am=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("IndModal",{attrs:{width:"1000",footerHide:"","mask-closable":!1,title:e.title||"\u5BFC\u5165",value:e.value},on:{input:function(s){return e.$emit("input",s)}}},[e.refresh?a("div",{staticClass:"excel-flow-wrap"},[a("Steps",{staticClass:"common-flex-no-shrink",attrs:{current:e.currentStepIndex}},[a("Step",{attrs:{title:"\u4E0B\u8F7D\u6A21\u677F"}}),a("Step",{attrs:{title:"\u5BFC\u5165\u6570\u636E"}}),a("Step",{attrs:{title:"\u6210\u529F"}})],1),a("div",{directives:[{name:"show",rawName:"v-show",value:e.currentStepIndex===0,expression:"currentStepIndex === 0"}],staticClass:"content-wrap"},[a("div",{staticClass:"download-btn"},[a("div",{staticClass:"icon"},[a("Icon",{attrs:{type:"md-cloud-download",size:"60"}})],1),a("div",{staticClass:"text-panel"},[a("div",{staticClass:"title"},[e._v(e._s(e.exportTitle||"\u586B\u5199\u5BFC\u5165\u51C6\u8FD0\u8BC1\u4FE1\u606F"))]),a("div",{staticClass:"desc",staticStyle:{"margin-bottom":"10px"}},[e._v(" "+e._s(e.exportDesc||"\u8BF7\u6309\u7167\u6A21\u677F\u6570\u636E\u7684\u683C\u5F0F\u51C6\u5907\u5BFC\u5165\u6570\u636E\uFF0C\u6A21\u677F\u4E2D\u7684\u8868\u5934\u540D\u79F0\u4E0D\u53EF\u66F4\u6539\uFF0C\u8868\u5934\u884C\u4E0D\u80FD\u5220\u9664")+" ")]),a("Button",{on:{click:e.download}},[a("Icon",{attrs:{type:"md-cloud-download",size:"20"}}),e._v("\xA0\u4E0B\u8F7D\u6A21\u677F ")],1)],1)]),a("div",{staticClass:"import-btn"},[a("div",{staticClass:"icon"},[a("Icon",{attrs:{type:"md-cloud-upload",size:"60"}})],1),a("div",{staticClass:"text-panel"},[a("div",{staticClass:"title"},[e._v(e._s(e.importTitle||"\u4E0A\u4F20\u586B\u597D\u7684\u51C6\u8FD0\u8BC1\u4FE1\u606F"))]),a("div",{staticClass:"desc",staticStyle:{"margin-bottom":"10px"}},[e._v(" "+e._s(e.importDesc||"\u6587\u4EF6\u540D\u540E\u7F00\u5FC5\u987B\u4E3Axls\u6216xlsx\uFF08\u5373excel\u683C\u5F0F\uFF09\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u5F97\u5927\u4E8E10M")+" ")]),a("IndUploadFile",{attrs:{multiple:!1,accept:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel
|
|
44
44
|
`},on:{onSuccess:e.onSuccess,handleBeforeUpload:e.handleBeforeUpload}})],1)])]),a("div",{directives:[{name:"show",rawName:"v-show",value:e.currentStepIndex===1,expression:"currentStepIndex === 1"}],staticClass:"content-wrap"},[a("div",{staticClass:"download-btn"},[a("div",{staticClass:"icon"},[a("Icon",{attrs:{type:"ios-checkmark-circle-outline",size:"60"}})],1),a("div",{staticClass:"text-panel"},[a("div",{staticClass:"title"},[e._v(e._s(e.sucessTitle||"\u672C\u6B21\u53EF\u5BFC\u5165\u51C6\u8FD0\u8BC1\u6570\u91CF"))]),a("div",{staticClass:"desc",staticStyle:{"margin-bottom":"10px",color:"var(--ind-blue)"}},[e._v(" "+e._s(e.sucessDesc||"5\u6761")+" ")])])]),a("div",{staticClass:"import-btn"},[a("div",{staticClass:"icon"},[a("Icon",{attrs:{type:"ios-information-circle-outline",size:"60"}})],1),a("div",{staticClass:"text-panel"},[a("div",{staticClass:"title"},[e._v(e._s(e.errorTitle||"\u672C\u6B21\u4E0D\u53EF\u5BFC\u5165\u51C6\u8FD0\u8BC1\u6570\u91CF"))]),a("div",{staticClass:"desc",staticStyle:{"margin-bottom":"10px",color:"var(--ind-blue)"}},[e._v(" "+e._s(e.errorDesc||"3\u6761")+" ")])])]),e._t("ext-table",null,{serverData:e.serverData})],2),a("div",{directives:[{name:"show",rawName:"v-show",value:e.currentStepIndex===2,expression:"currentStepIndex === 2"}],staticClass:"content-wrap",staticStyle:{"justify-content":"center"}},[a("div",{staticClass:"done-wrap"},[a("Icon",{attrs:{type:"md-checkmark-circle",size:"60",color:"#34b11c"}}),a("div",{staticClass:"success-title"},[e._v("\u6279\u91CF\u5BFC\u5165\u5B8C\u6210")]),a("div",{staticClass:"success-desc"},[e._v(e._s(e.successMsg||"\u6210\u529F\u5BFC\u5165\u51C6\u8FD0\u8BC15\u6761"))])],1)]),a("div",{staticClass:"bottom-btn-area common-flex-no-shrink"},[a("IndButtonGroup",{attrs:{right:""}},[e.currentStepIndex===1?a("IndButton",{attrs:{bizType:"cancel",loading:e.saving},on:{click:e.pre}},[e._v(" \u91CD\u65B0\u5BFC\u5165\u9644\u4EF6 ")]):e._e(),a("IndButton",{attrs:{bizType:"confirm",loading:e.saving,disabled:e.disabled},on:{click:e.next}},[e._v(e._s(e.currentStepIndex===2?"\u5B8C\u6210":"\u4E0B\u4E00\u6B65")+" ")])],1)],1)],1):e._e()])},Km=[];const qm={name:"IndExcelFlowModal",props:{value:Boolean,title:String,exportTitle:String,exportDesc:String,importTitle:String,importDesc:String,sucessTitle:String,sucessDesc:String,errorTitle:String,errorDesc:String,successMsg:String,templateParams:Object,updateApi:Function,submitApi:Function,dataValidate:{type:Boolean,default:!0}},data(){return{refresh:!0,saving:!1,currentStepIndex:0,file:null,fileList:[],serverData:{}}},computed:{disabled(){return this.currentStepIndex===0?!this.file:this.currentStepIndex===1&&!this.dataValidate}},methods:{onSuccess(e,t,a){this.fileList=t},handleBeforeUpload(e){this.file=e},download(){v.exportJsonToExcel(this.templateParams)},async next(){this.saving=!0,await this.$nextTick();try{if(console.log("this.currentStepIndex ",this.currentStepIndex),this.currentStepIndex===0){const e=await v.importJsonFromExcel({...this.templateParams,file:this.file});if(console.log("rlt",e),this.updateApi){const{data:t}=await this.updateApi(e,this.fileList);this.serverData=t}}else if(this.currentStepIndex===1)this.submitApi&&await this.submitApi(this.serverData);else if(this.currentStepIndex===2){this.$emit("uploadDone"),this.$emit("input",!1),this.refresh=!1,await this.$nextTick(),this.refresh=!0,this.saving=!1,this.file=null,await this.$nextTick(),this.currentStepIndex=0;return}this.currentStepIndex=this.currentStepIndex+1}catch(e){console.log("next e",e)}this.saving=!1},pre(){this.currentStepIndex=this.currentStepIndex-1}}},bi={};var ef=b(qm,Am,Km,!1,tf,null,null,null);function tf(e){for(let t in bi)this[t]=bi[t]}var Si=function(){return ef.exports}(),af=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Modal",{attrs:{lazyRender:!1,value:e.value,title:e.title,"mask-closable":!1,width:e.width,transfer:""},on:{"on-cancel":e.close},scopedSlots:e._u([{key:"footer",fn:function(){return[a("ButtonGroup",{attrs:{right:""}},[a("Button",{attrs:{bizType:"cancel"},on:{click:e.onClear}},[e._v(e._s(e.clearText))]),a("Button",{attrs:{bizType:"confirm"},on:{click:e.onOk}},[e._v("\u786E\u5B9A")])],1)]},proxy:!0}])},[a("Table",{ref:"table",attrs:{height:e.height,autoDataHeight:!1,value:e.data,dataApi:e.dataApi,columns:e.tableColumnsClone,searchParams:e.searchParams,showTableOption:!1,disablePage:e.disablePage,"auto-refresh":""},on:{"on-select-change":e.selectChange},scopedSlots:e._u([{key:"search",fn:function(){return[e.dataApi?a("FormWrap",{attrs:{fieldList:e.fieldList,labelWidth:e.$config.labelStyle.labelWidthSmall},model:{value:e.form,callback:function(s){e.form=s},expression:"form"}}):e._e()]},proxy:!0}])})],1)},sf=[];const nf={name:"IndHelpTableModal",components:{Button:Ve,ButtonGroup:Ne,FormWrap:Za,Modal:te,Table:Qt},props:{value:Boolean,disablePage:Boolean,dataApi:{type:Function,default:null},columns:Array,data:Array,title:{type:String,default:"\u5E2E\u52A9\u6846"},width:{type:Number,default:720},height:{type:Number,default:350},multiSelect:{type:Boolean},helpBoxSearchParams:{type:Object,default:()=>null},clearText:{type:String,default:"\u53D6\u6D88"}},data(){return{searchText:"",selection:[],tableColumnsClone:[],form:{searchText:""},fieldList:[{title:"\u641C\u7D22",type:"input",formKey:"searchText",props:{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22"}}]}},computed:{searchParams(){return{search:this.form.searchText,...this.helpBoxSearchParams}}},watch:{value(){this.form.searchText=""},multiSelect(){this.init()},columns(){this.init()},helpBoxSearchParams(){this.init()},"form.searchText"(){this.doSearch()}},created(){this.init()},methods:{init(){let e={width:50,align:"center",title:""};e.type=this.multiSelect?"checkbox":"radio",this.tableColumnsClone=JSON.parse(JSON.stringify(this.columns)),this.tableColumnsClone.unshift(e)},doSearch(){this.clearSelectData()},selectChange(e){this.selection=e},clearSelectData(){var e;this.selection=[],(e=this.$refs)==null||e.table.clearSelection()},close(){this.clearSelectData(),this.$emit("input",!1)},onClear(){this.$emit("onClear"),this.close()},onOk(){if(!this.selection.length){this.$Message.error("\u8BF7\u9009\u62E9\u4E00\u6761\u8BB0\u5F55");return}const e=this.multiSelect?this.selection:this.selection[0];this.$emit("onOk",e),this.close()}}},yi={};var lf=b(nf,af,sf,!1,rf,null,null,null);function rf(e){for(let t in yi)this[t]=yi[t]}var ki=function(){return lf.exports}(),of=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"treeWrapper",staticClass:"tree-wrapper ind-flex-column",style:{height:e.height}},[e.loading?a("Spin",{attrs:{fix:""}}):e._e(),e.isShowHeader?a("div",{staticClass:"header ind-flex-no-shrink"},[a("span",{staticClass:"title"},[e._v(e._s(e.treeName))])]):e._e(),a("div",{staticClass:"content ind-flex-grow ind-flex-column"},[e.isShowSearch?a("Input",{staticClass:"ind-flex-no-shrink",attrs:{clearable:"",search:"",placeholder:"\u591A\u4E2A\u7528\u7A7A\u683C\u5206\u9694"},on:{"on-clear":e.clearHighlightNodes,"on-change":e.onSearchChange,"on-search":e.search},model:{value:e.searchValue,callback:function(s){e.searchValue=typeof s=="string"?s.trim():s},expression:"searchValue"}}):e._e(),a("Tree",e._b({ref:"tree",staticClass:"ind-flex-grow",attrs:{data:e.treeData,"check-strictly":e.checkStrictly,render:e.renderContentProps||e.renderContent,"expand-node":e.expandNode,"show-checkbox":e.showCheckbox},on:{"on-check-change":e.onCheckChange,"on-select-change":e.onSelectChange}},"Tree",e.$attrs,!1))],1)],1)},cf=[];function K(e,t,a){a!=null&&(a+=1),Array.isArray(e)&&e.length&&u.default.forEach(e,(s,n)=>{let i=!1;if(a&&(s.level=a),typeof t=="function")try{const l=t(s,n);typeof l=="boolean"&&(i=l)}catch(l){console.error(l)}i||K(s.children,t,a)})}function Fi(e,t){let a=u.default.cloneDeep(t);Array.isArray(e)&&e.length&&u.default.forEach(e,s=>{s.parentList=[...a,{id:s.id,title:s.title}],Fi(s.children,s.parentList)})}const df={inheritAttrs:!1,props:{renderContentProps:Function,noTriggerInDefault:Boolean,alwaysShowSelected:Boolean,checkStrictly:Boolean,expandNode:Boolean,noToggleExpandOnSelect:Boolean,selectBootNode:Boolean,selectFirstLeaf:Boolean,hideFirstLevel:Boolean,foldFirstLevel:Boolean,expandProvincial:Boolean,expandAll:Boolean,defaultExpandLevel:Number,showCheckbox:Boolean,selectLeafOnly:Boolean,isShowHeader:{type:Boolean,default:!0},isShowSearch:{type:Boolean,default:!0},treeName:{type:String,default:"\u5730\u5E02\u6811"},height:{type:String,default:null},data:{type:Array,default(){return[]}},dataApi:{type:Function,default:null},urlParams:{type:Object,default(){return{}}},defaultValue:{type:Array,default(){return[]}},statusName:{type:Object,default(){return{}}},statusColor:{type:Object,default(){return{}}},statusDataApi:{type:Function,default:null},statusUrlParams:{type:Object,default(){return{}}},statusData:{type:Array,default(){return[]}},importantStatus:{type:String,default:""},firstLeafByStatus:{type:Array,default(){return[]}}},data(){return{loading:!0,treeData:[],backupTreeData:[],backupDefaultValue:[],searchValue:"",defaultValueCalc:[]}},async created(){await this.init(),this.watchDataProp(),this.watchUrlParamsProp(),this.watchDefaultValueProp(),this.$nextTick(()=>{this.$emit("on-load",u.default.cloneDeep(this.treeData),this.showCheckbox?this.getCheckedNodes():this.getSelectedNodes())})},activated(){this.defaultValue.length&&this.scrollToDefaultNode()},computed:{defaultValueStr(){return JSON.stringify(this.defaultValue.map(e=>e.id||e))}},methods:{async init(){this.loading=!0;let e=await this.fetchComTree();this.hideFirstLevel&&Array.isArray(e[0].children)&&(e=e[0].children),K(e,t=>{t.status="",t.statusName="",t.statusColor="",this.expandProvincial?t.expand=t.comIsImported=="0"||t.id=="ALL":t.expand=t.id=="ALL",t.expand||(t.expand=!1),this.expandAll||t.expand?t.expand=!0:this.defaultExpandLevel!=null&&(t.expand=t.level<=this.defaultExpandLevel),t.checked=!1,t.selected=!1,t.indeterminate=!1,t.important=!1,t.weak=!1,t.matched=!1,this.showCheckbox&&this.selectLeafOnly&&Array.isArray(t.children)&&t.children.length&&(t.disabled=!0)},0),Fi(e,[]),this.treeData=u.default.cloneDeep(e),this.backupTreeData=u.default.cloneDeep(this.treeData),this.defaultValueHandler(),this.loading=!1},async fetchComTree(){if(this.data.length)return this.inited=!0,u.default.cloneDeep(this.data);if(this.dataApi)try{const e=await this.dataApi(this.urlParams);return this.inited=!0,e.data}catch(e){console.error(e)}return this.inited=!0,[]},async fetchStatusData(){if(this.statusDataApi)try{const{data:e}=await this.statusDataApi(this.statusUrlParams);return e}catch{}else if(this.statusData.length)return this.statusData;return[]},clearHighlightNodes(){this.highlightNodes(null,()=>{})},onSearchChange(){this.searchValue?this.highlightNodes(this.searchValue.split(" "),()=>{}):this.clearHighlightNodes()},search(e){e&&this.highlightNodes(e.split(" "),()=>{})},setDefaultValue2Nodes(){K(this.treeData,e=>{e.expand=this.expandAll||e.expand?!0:e.expand,this.defaultExpandLevel!=null&&(e.expand=e.level<=this.defaultExpandLevel),this.defaultValueCalc.includes(e.id)?this.showCheckbox?e.checked=!0:e.selected=!0:(e.checked=!1,e.selected=!1)}),K(this.backupTreeData,e=>{e.expand=this.expandAll||e.expand?!0:e.expand,this.defaultExpandLevel!=null&&(e.expand=e.level<=this.defaultExpandLevel),this.defaultValueCalc.includes(e.id)?this.showCheckbox?e.checked=!0:e.selected=!0:(e.checked=!1,e.selected=!1)})},_selectFirstLeaf(){let e=!1;this.firstLeafByStatus.length?u.default.forEach(this.firstLeafByStatus,t=>{if(e&&!this.showCheckbox)return!1;K(this.treeData,a=>{if(e&&!this.showCheckbox||Array.isArray(a.children)&&a.children.length===0&&a.status===t&&(this.showCheckbox?a.checked=!0:a.selected=!0,e=!0,!this.showCheckbox))return!0})}):K(this.treeData,t=>{if(e)return!0;if(!t.children||Array.isArray(t.children)&&t.children.length===0)return this.showCheckbox?t.checked=!0:t.selected=!0,e=!0,!0}),this.backupTreeData=u.default.cloneDeep(this.treeData)},_selectBootNode(){let e=!1;K(this.treeData,t=>{if(e)return!0;if(this.showCheckbox)t.checked=!0;else return t.selected=!0,e=!0,!0}),this.backupTreeData=u.default.cloneDeep(this.treeData)},processAncestorNodesExpandStatus(){this.showCheckbox||(K(this.treeData,e=>{let t=!1;K(e.children,a=>{if(a.selected||a.checked||a.expand||e.expand)return t=!0}),e.expand=t}),K(this.backupTreeData,e=>{let t=!1;K(e.children,a=>{if(a.selected||a.checked||a.expand||e.expand)return t=!0}),e.expand=t}))},watchDataProp(){this.dataApi||this.$watch("data",this.init,{})},defaultValueHandler(){let t=(this.defaultValue||[]).map(a=>a.id||a);if(this.defaultValueCalc=t,!this.inited){console.log("not inited yet");return}!this.foldFirstLevel&&this.firstLeafByStatus.length<1&&this.treeData.length&&this.expandFirstLevel(),this.defaultValue.length?(this.setDefaultValue2Nodes(),this.processAncestorNodesExpandStatus(),this.scrollToDefaultNode(),!this.foldFirstLevel&&this.firstLeafByStatus.length<1&&this.treeData.length&&this.expandFirstLevel(),this.$nextTick(()=>{this.$emit("on-default-change",this.showCheckbox?this.getCheckedNodes():this.getSelectedNodes())})):(this.clearCheckedAndSelectedNodes(!0),!this.foldFirstLevel&&this.firstLeafByStatus.length<1&&this.treeData.length&&this.expandFirstLevel(),(this.selectFirstLeaf||this.selectBootNode)&&(this.selectFirstLeaf?this._selectFirstLeaf():this._selectBootNode(),this.processAncestorNodesExpandStatus(),this.$nextTick(()=>{this.showCheckbox?this.$emit("on-check-change",this.getCheckedNodes(),null,!0):this.$emit("on-select-change",this.getSelectedNodes(),null,!0)})))},watchUrlParamsProp(){this.$watch("urlParams",(e,t)=>{v.isEqual(e,t)||this.init()},{immediate:!0})},watchDefaultValueProp(){this.$watch("defaultValueStr",()=>{this.defaultValueHandler()},{immediate:!0})},expandFirstLevel(){this.treeData.length&&(this.$set(this.treeData[0],"expand",!0),this.$set(this.backupTreeData[0],"expand",!0))},updateStatusOptions2Nodes(e){K(this.treeData,t=>{const a=u.default.find(e,{id:t.id});if(a){const s=a.status;t.status=s,t.statusName=this.statusName[s]||"\u672A\u77E5\u72B6\u6001",t.statusColor=this.statusColor[s]}else t.status="",t.statusName="",t.statusColor=""}),K(this.backupTreeData,t=>{const a=u.default.find(e,{id:t.id});if(a){const s=a.status;t.status=s,t.statusName=this.statusName[s]||"\u672A\u77E5\u72B6\u6001",t.statusColor=this.statusColor[s]}else t.status="",t.statusName="",t.statusColor=""})},renderContent(e,{data:t}){return t.status?e("div",{attrs:{id:"tree-node-"+t.id},class:{"custom-title":!0,weak:t.weak,important:t.important}},[e("span",t.title),e("span",{class:["title-status",t.statusColor]},`[${t.statusName}]`)]):e("span",{attrs:{id:"tree-node-"+t.id},class:{"custom-title":!0,weak:t.weak,important:t.important}},t.title)},onCheckChange(e,t){let a=[];this.showCheckbox?K(e,s=>{(s.selected||s.checked)&&a.push(s.id)}):a=[t.id],this.setCheckStatus(a),this.$emit("on-check-change",e,t)},async onSelectChange(e,t){if(this.showCheckbox){let a=this.getCheckedNodes();t.selected=!1;let s=a.map(n=>n.id);if(this.checkStrictly||!t.children||t.children.length===0)if(s.includes(t.id)){let n=u.default.find(a,{id:t.id});u.default.remove(s,i=>i==t.id),u.default.remove(a,i=>i.id==t.id),n.checked=!1}else t.checked=!0,s.push(t.id),a.push(t);else{let n=!0;K(t.children,i=>{s.includes(i.id)||(n=!1)}),t.indeterminate=!1,n?(t.checked=!1,u.default.remove(a,i=>i.id==t.id),u.default.remove(s,i=>i==t.id),K(t.children,i=>{i.checked=!1,u.default.remove(a,l=>l.id==i.id),u.default.remove(s,l=>l==i.id)})):(t.checked=!0,u.default.findIndex(a,{id:t.id})==-1&&(a.push(t),s.push(t.id)),K(t.children,i=>{i.checked=!0,u.default.findIndex(a,{id:i.id})==-1&&(a.push(i),s.push(i.id))}))}this.checkStrictly||this.setCheckStatus(s),await this.$nextTick(),this.$emit("on-check-change",a)}else{let a=[];this.showCheckbox?K(e,s=>{(s.selected||s.checked)&&a.push(s.id)}):(this.selectLeafOnly&&Array.isArray(t.children)&&t.children.length?(a=[],t.selected=!1,console.log("\u5355\u9009 leafOnly \u9009\u62E9\u4E86\u975E\u53F6\u5B50\u8282\u70B9")):t!=null&&t.id&&(a=[t.id],console.log("\u5355\u9009 \u975EleafOnly \u9009\u62E9\u4E86\u8282\u70B9"),this.$emit("on-select-change",t.selected||!e||e.length!==1?[t]:e,t)),this.noToggleExpandOnSelect?t.expand=!0:t.expand=!t.expand),this.setSelectStatus(a)}},setCheckStatus(e){K(this.treeData,t=>{e.includes(t.id)?t.checked=!0:(this.treeData[0].checked=!1,t.checked=!1),t.checked&&t.children&&K(t.children,a=>{e.includes(a.id)||(t.checked=!1)})}),K(this.backupTreeData,t=>{e.includes(t.id)?(t.checked=!0,t.expand=t.expand):(this.backupTreeData[0].checked=!1,t.checked=!1),t.checked&&t.children&&K(t.children,a=>{e.includes(a.id)||(t.checked=!1)})})},setSelectStatus(e){K(this.treeData,t=>{e.includes(t.id)?t.selected=!0:(this.treeData[0].checked=!1,t.selected=!1)}),K(this.backupTreeData,t=>{e.includes(t.id)?t.selected=!0:(this.backupTreeData[0].checked=!1,t.selected=!1)})},markAncestorNodesImportant(e){K(this.treeData,t=>{let a=!1;K(t.children,s=>{if(s.status===e)return a=!0}),t.important=a}),K(this.backupTreeData,t=>{let a=!1;K(t.children,s=>{if(s.status===e)return a=!0}),t.important=a})},scrollToDefaultNode(){this.treeData.length&&this.$nextTick(()=>{const e=document.getElementById("tree-node-"+this.defaultValueCalc[0]);e&&(this.$refs.treeWrapper.scrollTop=e.offsetTop-50)})},async refreshStatus(e=!1){if(this.treeData.length){const t=await this.fetchStatusData();this.updateStatusOptions2Nodes(t),this.importantStatus&&this.markAncestorNodesImportant(this.importantStatus),e&&(this.selectFirstLeaf||this.firstLeafByStatus.length)&&this.defaultValue.length===0&&(this.clearCheckedAndSelectedNodes(),this._selectFirstLeaf(),this.processAncestorNodesExpandStatus(),this.showCheckbox?this.$emit("on-check-change",this.getCheckedNodes()):this.$emit("on-select-change",this.getSelectedNodes()))}},getSelectedNodes(){return this.$refs.tree.getSelectedNodes()},getCheckedNodes(e=!1){if(this.$refs.tree){const t=this.$refs.tree.getCheckedNodes()||[];return e?t.filter(a=>!a.children||!a.children.length):t}},getCheckedAndIndeterminateNodes(){return this.$refs.tree.getCheckedAndIndeterminateNodes()},getNodeById(e){let t=null;return K(this.treeData,a=>{if(a.id===e)return t=a,!0}),t},clearCheckedAndSelectedNodes(e){K(this.treeData,t=>{t.expand=!!(this.expandAll||t.expand),this.defaultExpandLevel!=null&&(t.expand=t.level<=this.defaultExpandLevel),t.checked=!1,t.selected=!1,t.indeterminate=!1}),this.noTriggerInDefault||(this.showCheckbox?this.$emit("on-check-change",[],null,e):this.$emit("on-select-change",[],null,e)),K(this.backupTreeData,t=>{t.expand=!!(this.expandAll||t.expand),this.defaultExpandLevel!=null&&(t.expand=t.level<=this.defaultExpandLevel),t.checked=!1,t.selected=!1,t.indeterminate=!1})},updateNodeStatus(e){Array.isArray(e)&&e.length&&(K(this.treeData,t=>{const a=u.default.find(e,{id:t.id});if(a){const s=a.status;t.status=s,t.statusName=this.statusName[s]||"\u672A\u77E5\u72B6\u6001",t.statusColor=this.statusColor[s]}}),K(this.backupTreeData,t=>{const a=u.default.find(e,{id:t.id});if(a){const s=a.status;t.status=s,t.statusName=this.statusName[s]||"\u672A\u77E5\u72B6\u6001",t.statusColor=this.statusColor[s]}}),this.importantStatus&&this.markAncestorNodesImportant(this.importantStatus))},highlightNodes(e,t){if(!e||!e[0]){let i=this.getCheckedNodes(!0);return this.treeData=u.default.cloneDeep(this.backupTreeData),this.$nextTick(()=>{this.$emit("on-check-change",i)}),typeof t=="function"&&t(0),!1}let a=0,s=u.default.cloneDeep(this.backupTreeData);Array.isArray(e)&&e.length&&(K(s,i=>{let l=!1;(e.some(o=>i.title.includes(o))||i.selected||i.checked)&&(i.children&&(i.parentMatched=!0),l=!0,a++),K(i.children,o=>{if(e.some(c=>o.title.includes(c))||o.selected||o.checked)return l=!0}),i.matched=l}),K(s,i=>{i.matched?i.expand=!0:i.expand=!!(this.expandAll||i.expand)}));let n=this.getCheckedNodes(!0);this.treeData=u.default.cloneDeep(this.deleteNoMatchedNodes(s)),this.$nextTick(()=>{this.$emit("on-check-change",n)}),typeof t=="function"&&t(a)},deleteNoMatchedNodes(e){if(e.length>0)for(let t=0;t<e.length;t++){let a=e[t];a.matched?a.children&&!a.parentMatched&&this.deleteNoMatchedNodes(a.children):(e.splice(t,1),t--)}return e},addNode(e){var s;let{parentId:t}=e,a=this.getNodeById(t);(s=a==null?void 0:a.children)!=null&&s.length?a.children.push(e):a.children=[e]},updateNode(e){let{id:t}=e,a=this.getNodeById(t);u.default.merge(a,e)},deleteNode(e){let{id:t,parentId:a}=e,s=this.getNodeById(a);s.children=s.children.filter(n=>n.id!==t),s.selected=!0,this.$emit("on-select-change",this.getSelectedNodes(),null,!0)}}},Wi={};var hf=b(df,of,cf,!1,uf,null,null,null);function uf(e){for(let t in Wi)this[t]=Wi[t]}var St=function(){return hf.exports}(),pf=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Modal",{attrs:{title:e.boxTitle,"mask-closable":!1,width:e.width,transfer:""},on:{"on-cancel":e.onCancel},model:{value:e.boxShow,callback:function(s){e.boxShow=s},expression:"boxShow"}},[e.boxShow?a("div",[[a("div",{ref:"treeWrapper",staticClass:"tree-wrapper",style:{height:e.height+"px",overflow:"auto"}},[a("Tree",{ref:"tree",attrs:{"data-api":e.dataApi,"url-params":e.helpBoxSearchParams,isShowHeader:e.isShowHeader,"show-checkbox":e.showCheckbox,"check-directly":""},on:{"on-select-change":e.onSelectChange,"on-check-change":e.updateSelectedTitles,"on-load":e.initSelectedTitles,"on-default-change":e.updateSelectedTitles}})],1)]],2):e._e(),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("ButtonGroup",{attrs:{right:""}},[a("Button",{attrs:{bizType:"confirm"},on:{click:e.onOk}},[e._v("\u786E\u5B9A")])],1)],1)])},mf=[];const ff={name:"IndHelpTreeModal",components:{ButtonGroup:Ne,Button:Ve,Modal:te,Tree:St},props:{value:Boolean,dataApi:{type:Function,default:null},title:{type:String,default:"\u5E2E\u52A9\u6846"},width:{type:Number,default:520},height:{type:Number,default:350},helpBoxSearchParams:{type:Object,default:()=>null},showCheckbox:Boolean,selectLeafOnly:{type:Boolean,default:!0},isShowSearch:{type:Boolean,default:!0},isShowHeader:Boolean},data(){return{boxShow:this.value,searchText:"",reSetPages:!1,selection:[],searchNum:0,searchValue:"",tableColumnsClone:[]}},computed:{tableUrl(){return this.url},boxTitle(){return this.title}},methods:{onOk(){let e=[];this.showCheckbox&&this.selectLeafOnly?e=this.getCheckedNodes(!0):this.showCheckbox?e=this.getCheckedNodes(!1):e=this.getSelectedNodes(),this.$emit("onOk",e),this.$emit("input",!1),this.boxShow=!1},onClear(){this.$emit("onClear"),this.$emit("input",!1),this.boxShow=!1},onCancel(){this.$emit("input",!1),this.boxShow=!1},initSelectedTitles(e,t){this.updateSelectedTitles(t),this.loading=!1},onSelectChange(e){this.updateSelectedTitles(e),this.visible=!1},clearSelected(){this.$refs.tree.highlightNodes(null,this.updateSearchNum),this.searchValue="",this.$refs.tree.clearCheckedAndSelectedNodes(),this.selectedTitles=""},updateSearchNum(e){this.searchNum=e},updateSelectedTitles(){let e=this.getCheckedNodes(!0);e.length||(e=this.getSelectedNodes()),this.selectedTitles=u.default.join(u.default.map(e||[],"title"),",")},getSelectedNodes(){return this.$refs.tree.getSelectedNodes()},getCheckedNodes(e=!1){return this.$refs.tree.getCheckedNodes(e)},getCheckedAndIndeterminateNodes(){return this.$refs.tree.getCheckedAndIndeterminateNodes()},updateNodeStatus(e,t){return this.$refs.tree.updateNodeStatus(e,t)}},watch:{value(){this.value&&(this.boxShow=!0)}}},Zi={};var Vf=b(ff,pf,mf,!1,Tf,null,null,null);function Tf(e){for(let t in Zi)this[t]=Zi[t]}var xi=function(){return Vf.exports}(),Nf=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("Modal",{attrs:{title:e.boxTitle,"mask-closable":!1,width:e.width,transfer:""},on:{"on-cancel":e.onCancel},model:{value:e.boxShow,callback:function(s){e.boxShow=s},expression:"boxShow"}},[e.boxShow?a("div",[a("IndTable",{ref:"itemBoxTable",attrs:{value:e.data,dataApi:e.dataApi,columns:e.tableColumnsClone,searchParams:e.searchParams,size:"small",showTableOption:!1,height:e.height,"disable-page":"","auto-refresh":""},on:{"on-select-change":e.selectChage},scopedSlots:e._u([{key:"search",fn:function(){return[a("Form",{attrs:{"label-width":e.$config.labelStyle.labelWidthSmall,inline:"","label-colon":""}},[a("FormItem",{attrs:{label:"\u7269\u6599\u540D\u79F0"}},[a("Input",{staticStyle:{width:"200px"},attrs:{placeholder:"\u8BF7\u8F93\u5165\u7269\u6599\u540D\u79F0"},model:{value:e.searchText,callback:function(s){e.searchText=s},expression:"searchText"}})],1),a("FormItem",{attrs:{label:""}}),a("FormItem",{attrs:{label:""}}),a("FormItem",{staticClass:"textAlignRight",attrs:{"label-width":50}},[a("Button",{attrs:{type:"primary",icon:"ios-search",disabled:e.tableLoading},on:{click:e.doSearch}},[e._v("\u67E5\u8BE2")])],1)],1)]},proxy:!0}],null,!1,1733436567)})],1):e._e(),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("ButtonGroup",{attrs:{right:""}},[a("Button",{attrs:{bizType:"table"},on:{click:e.onClear}},[e._v(e._s(e.clearText))]),a("Button",{attrs:{bizType:"primary"},on:{click:e.onOk}},[e._v("\u786E\u8BA4")])],1)],1)])},vf=[];const Rf={name:"Itembox",components:{Modal:te,Button:Ve,ButtonGroup:Ne},props:{value:Boolean,url:String,data:Array,title:{type:String,default:"\u5E2E\u52A9\u6846"},width:{type:Number,default:700},height:{type:Number,default:350},multiSelect:{type:Boolean,default:!1},itemBoxSearchParams:{type:Object,default(){return{}}},clearText:{type:String,require:!1,default:"\u53D6\u6D88"}},data(){return{boxShow:this.value,searchText:"",reSetPages:!1,selection:[],searchParams:{},columns:[{title:"\u7269\u6599\u7F16\u7801",key:"item_id",width:80},{title:"\u7269\u6599\u540D\u79F0",key:"item_name"},{title:"\u5355\u4F4D",key:"unit_name",width:60,align:"center"},{title:"\u5305\u88C5\u89C4\u683C",key:"package_form",width:80},{title:"\u542B\u7A0E\u5355\u4EF7\uFF08\u5143\uFF09",key:"tax_price",width:100,align:"right"},{title:"\u4E0B\u8FBE\u622A\u6B62\u65E5\u671F",key:"relEndDate",width:100,align:"center"}],tableColumnsClone:[],tableLoading:!1}},computed:{boxTitle(){return this.title},dataApi(){return e=>v.axios.get(this.url,{params:e})}},methods:{init(){this.selectStore=[];let e={width:60,align:"center",title:"\u9009\u62E9"};this.multiSelect?e.type="selection":e.render=(t,a)=>{let s=a.index;return t("Radio",{props:{value:this.selection[s]===void 0?!1:this.selection[s]},on:{"on-change"(){this.selectOnChange(a.row,s)}}})},this.tableColumnsClone=JSON.parse(JSON.stringify(this.columns)),this.tableColumnsClone.unshift(e),this.searchParams=Object.assign({},{search:this.searchText},this.itemBoxSearchParams)},onOk(){let e=null;this.selectStore.length>0?(this.multiSelect?e=this.selectStore:e=this.selectStore[0],this.$emit("onOk",e),this.$emit("input",!1),this.clearSelectData(),this.boxShow=!1):this.$Message.error("\u8BF7\u9009\u62E9\u4E00\u6761\u8BB0\u5F55")},onClear(){this.clearSelectData(),this.$emit("onClear"),this.$emit("input",!1),this.boxShow=!1},onCancel(){this.clearSelectData(),this.$emit("input",!1),this.boxShow=!1},doSearch(){this.tableLoading=!0,this.clearSelectData(),this.searchParams=Object.assign({},{search:this.searchText},this.itemBoxSearchParams),this.tableLoading=!1},onRowClick(e,t){this.selectOnChange(e,t)},selectChage(){this.selectStore=rows},clearSelectData(){this.selection=[],this.selectStore=[]}},watch:{value(){this.value&&(this.boxShow=!0),this.searchText="",this.searchParams=Object.assign({},{search:this.searchText},this.itemBoxSearchParams)},multiSelect(){this.init()},columns(){this.init()},itemBoxSearchParams(){this.init()}},created(){this.init()}},Mi={};var Uf=b(Rf,Nf,vf,!1,gf,null,null,null);function gf(e){for(let t in Mi)this[t]=Mi[t]}var wi=function(){return Uf.exports}(),bf=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pro-layout-nav-wrapper custom-bread-crumb"},[a("Menu",{ref:"topNav",attrs:{mode:"horizontal",theme:"dark","active-name":e.appInfo.appId},on:{"on-select":e.handleAppMenu}},[e._l(e.topMenList,function(s){return[s.children?a("Submenu",{key:s.name,staticClass:"ibp-nav-sub-menu",attrs:{name:s.name}},[a("template",{slot:"title"},[e._v(" "+e._s(s.name)+" ")]),e._l(s.children,function(n){return a("MenuItem",{key:n.appId,attrs:{name:n.appId}},[a("Icon",{directives:[{name:"show",rawName:"v-show",value:e.systemInfo.navLogo==="1",expression:"systemInfo.navLogo === '1'"}],attrs:{type:n.icon,size:20}}),e._v(e._s(n.name))],1)})],2):a("MenuItem",{key:s.appId,attrs:{name:s.appId}},[a("Icon",{directives:[{name:"show",rawName:"v-show",value:e.systemInfo.navLogo==="1",expression:"systemInfo.navLogo === '1'"}],attrs:{type:s.icon,size:20}}),e._v(e._s(s.name)+" "),a("div",{staticClass:"line"})],1)]}),e.otherList.length>0?a("Submenu",{attrs:{name:"other"}},[a("template",{slot:"title"},[e._v(" ... ")]),e._l(e.otherList,function(s){return a("MenuItem",{key:s.appId,attrs:{name:s.appId}},[a("Icon",{directives:[{name:"show",rawName:"v-show",value:e.systemInfo.navLogo==="1",expression:"systemInfo.navLogo === '1'"}],attrs:{type:s.icon,size:20}}),e._v(e._s(s.name)+" ")],1)})],2):e._e()],2)],1)},Sf=[],lS="";const yf={name:"IndAppMenu",components:{Menu:C.Menu,MenuItem:C.MenuItem,Icons:le,Submenu:C.Submenu},props:{appList:{type:Array,default:()=>[]}},data(){return{systemInfo:{},navList:[],topMenList:[],otherList:[],topMenuNum:99,lastTopMenuNum:-1,acceptAppId:""}},computed:{appInfo(){return this.$store.getters.getAppInfo}},created(){this.getAppMenu()},mounted(){setTimeout(()=>{this.calcTopMenus()},1e3)},watch:{appList:{handler(){this.getAppMenu()},deep:!0}},methods:{getAppMenu(){let e=u.default.cloneDeep(this.appList);if(console.log("appList changed",e),u.default.forEach(e,t=>{var n;let a=t.extendProps,s=a==null?void 0:a.extendProps;t.parentName=s?(n=JSON.parse(s))==null?void 0:n.parentName:""}),console.log("data",e),u.default.some(e,t=>t.parentName)){console.log("render group");let t=u.default.reduce(e,(a,s)=>{if(s.parentName){let n=u.default.find(a,{name:s.parentName});n?n.children.push(s):a.push({name:s.parentName,children:[s]})}else a.push(s);return a},[]);this.navList=t}else this.navList=e;if(this.lastTopMenuNum=this.topMenuNum,this.navList.length>this.topMenuNum){let t=u.default.cloneDeep(this.navList);this.topMenList=t.splice(0,this.topMenuNum),this.otherList=t}else this.topMenList=this.navList,this.otherList=[];if(this.navList.length>0){let t=this.navList[0].appId;for(let a=0;a<this.navList.length;a++)this.navList[a].selected==!0&&(t=this.navList[a].appId);this.activeName&&(t=this.activeName),this.handleAppMenu(t)}},handleAppMenu(e){this.$store.commit("setAppInfo",e)},calcTopMenus(){var c;let e=document.getElementsByTagName("body")[0].clientWidth,t=document.getElementsByClassName("sys-name")[0].clientWidth,a=document.getElementsByClassName("custom-bread-crumb")[0].clientWidth,s=document.getElementsByClassName("custom-content-con")[0].clientWidth,n=80,i=e-t-a-s-n,l=0,o=0;(c=document.querySelectorAll(".pro-layout-nav-wrapper>.ivu-menu>li"))==null||c.forEach(p=>{o+=p.clientWidth,o<i&&l++}),console.log("topMenuNumCalc",l,"this.topMenuNum",this.topMenuNum),l&&this.topMenuNum>l&&(this.topMenuNum=l,console.log("this.topMenuNum",this.topMenuNum),this.getAppMenu())}}},Ei={};var kf=b(yf,bf,Sf,!1,Ff,null,null,null);function Ff(e){for(let t in Ei)this[t]=Ei[t]}var Ea=function(){return kf.exports}(),Wf=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{class:e.classes,style:Object.assign({},e.styles,e.topStyles),on:{click:e.back}},[e._t("default",function(){return[a("div",{ref:"inner",class:e.innerClasses},[a("i",{staticClass:"ivu-icon ivu-icon-ios-arrow-up"})])]})],2)},Zf=[];const Da="ivu-back-top",xf={name:"IndBackTop",props:{offsetTop:{type:Number,default:100},bottom:{type:Number,default:80},right:{type:Number,default:20},duration:{type:Number,default:1e3},container:{type:[String,HTMLElement],default:null}},data(){return{backTop:!1,sTop:0,topStyles:{}}},computed:{containerEle(){if(typeof this.container=="string"&&this.container){const e=document.querySelector(this.container);if(e)return e}return this.container instanceof HTMLElement?this.container:document.documentElement||document.body},classes(){return[`${Da}`,{[`${Da}-show`]:this.backTop}]},styles(){const e={bottom:`${this.bottom}px`,right:`${this.right}px`};return this.container&&(e.position="absolute"),e},innerClasses(){return`${Da}-inner`}},mounted(){this.$nextTick(()=>{v.on(this.containerEle,"scroll",this.handleScroll),v.on(this.containerEle,"resize",this.handleScroll)})},beforeDestroy(){v.off(this.containerEle,"scroll",this.handleScroll),v.off(this.containerEle,"resize",this.handleScroll)},methods:{handleScroll(){var e;if(this.sTop=this.containerEle.scrollTop,this.backTop=this.sTop>=this.offsetTop,this.container){const t=this.containerEle.clientHeight,a=((e=this.$refs.inner)==null?void 0:e.clientHeight)||40,s=this.sTop+t-this.bottom-a;this.topStyles={top:`${s}px`}}},back(){this.scrollTop(this.sTop,0,this.duration),this.$emit("on-click")},scrollTop(e=0,t,a=500,s){window.requestAnimationFrame||(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(l){return window.setTimeout(l,1e3/60)});const n=Math.abs(e-t),i=Math.ceil(n/a*50);this.scrollTo(e,t,i,s)},scrollTo(e,t,a,s){if(e===t){s&&s();return}let n=Math.min(e+a,t);e>t&&(n=Math.max(e-a,t)),this.containerEle.scrollTop=n,this.handleScroll(),window.requestAnimationFrame(()=>this.scrollTo(n,t,a,s))}}},Di={};var Mf=b(xf,Wf,Zf,!1,wf,null,null,null);function wf(e){for(let t in Di)this[t]=Di[t]}var Ca=function(){return Mf.exports}();/*!
|
|
45
45
|
* vuex v3.6.2
|
|
46
46
|
* (c) 2021 Evan You
|