gds-plus-design-vue 1.2.61 → 1.2.63
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/lib/addPermission.5036013c.js +1 -0
- package/lib/addPermission.9fc97a47.mjs +421 -0
- package/lib/approvalModel.51d07afe.mjs +340 -0
- package/lib/approvalModel.66f49dfb.js +1 -0
- package/lib/attribute.318f485c.js +1 -0
- package/lib/attribute.a06ac9e7.mjs +237 -0
- package/lib/buildItem.6a834227.js +1 -0
- package/lib/buildItem.fd8634ab.mjs +205 -0
- package/lib/businessRules.0e4dbb3a.js +1 -0
- package/lib/businessRules.db6ba874.mjs +538 -0
- package/lib/components.chartbi.b043dcdc.mjs +1729 -0
- package/lib/components.chartbi.e4680eaa.js +7 -0
- package/lib/components.coloreditor.044983d2.mjs +1505 -0
- package/lib/components.coloreditor.779a9419.js +6 -0
- package/lib/components.dataassign.1853ed5c.js +1 -0
- package/lib/components.dataassign.56632583.mjs +147 -0
- package/lib/components.echarts.10d3ffe2.mjs +794 -0
- package/lib/components.echarts.e4d6b13e.js +3 -0
- package/lib/components.exception.3cc33e29.js +1 -0
- package/lib/components.exception.cc2f4ca3.mjs +61 -0
- package/lib/components.form.3344c817.mjs +7785 -0
- package/lib/components.form.91d5ed3e.js +41 -0
- package/lib/components.globalheader.07a90c4b.js +1 -0
- package/lib/components.globalheader.43fafa8c.mjs +54 -0
- package/lib/components.iconselector.8caabeaa.mjs +1165 -0
- package/lib/components.iconselector.d712170f.js +1 -0
- package/lib/components.imgpreview.57290b54.mjs +213 -0
- package/lib/components.imgpreview.86bf7971.js +1 -0
- package/lib/components.lunccalendar.76159d2e.js +1 -0
- package/lib/components.lunccalendar.f6765c94.mjs +1137 -0
- package/lib/components.middleware.3bad5748.js +1 -0
- package/lib/components.middleware.457b1182.mjs +147 -0
- package/lib/components.modaltitle.ae92f96c.mjs +127 -0
- package/lib/components.modaltitle.e0b34fcb.js +1 -0
- package/lib/components.multitab.82fd0544.js +1 -0
- package/lib/components.multitab.8441aa6b.mjs +140 -0
- package/lib/components.selecttree.85d940a9.mjs +170 -0
- package/lib/components.selecttree.d710a362.js +1 -0
- package/lib/components.settingdrawer.779f6715.js +1 -0
- package/lib/components.settingdrawer.a6693034.mjs +237 -0
- package/lib/components.sidemenu.725677e3.mjs +277 -0
- package/lib/components.sidemenu.80e46c2d.js +1 -0
- package/lib/components.sidenavmenu.23b8edce.mjs +1331 -0
- package/lib/components.sidenavmenu.b9bb9304.js +1 -0
- package/lib/components.statuschange.15938660.mjs +116 -0
- package/lib/components.statuschange.ed1218a4.js +1 -0
- package/lib/components.table.17c02054.js +8 -0
- package/lib/components.table.e3e5e3bc.mjs +4635 -0
- package/lib/components.tableumy.2f5dfa12.mjs +450 -0
- package/lib/components.tableumy.9cf33062.js +1 -0
- package/lib/components.tablevirtual.38d4d3d8.js +1 -0
- package/lib/components.tablevirtual.ba03746e.mjs +561 -0
- package/lib/components.teamsharing.05503821.js +1 -0
- package/lib/components.teamsharing.fb4351ec.mjs +373 -0
- package/lib/components.tooltip.950dc77b.mjs +86 -0
- package/lib/components.tooltip.a05d8dd1.js +1 -0
- package/lib/components.uploadfile.10f6cb2a.mjs +228 -0
- package/lib/components.uploadfile.5a9b6cc1.js +1 -0
- package/lib/components.uploadimg.cce7452a.js +1 -0
- package/lib/components.uploadimg.f4fe4e77.mjs +192 -0
- package/lib/components.verificationcode.afb9aa1a.mjs +71 -0
- package/lib/components.verificationcode.d1946db4.js +1 -0
- package/lib/components.viewformdetails.1621bc18.js +1 -0
- package/lib/components.viewformdetails.f362d69e.mjs +1048 -0
- package/lib/components.viewloading.807bbf68.js +1 -0
- package/lib/components.viewloading.ea40b244.mjs +96 -0
- package/lib/components.watermark.1ffc66e0.mjs +53 -0
- package/lib/components.watermark.da3d7220.js +2 -0
- package/lib/components.xlsxexport.d98572f8.mjs +263 -0
- package/lib/components.xlsxexport.f5ace2cd.js +1 -0
- package/lib/components.xlsximport.cffa88fe.mjs +913 -0
- package/lib/components.xlsximport.dbd826bb.js +1 -0
- package/lib/createFile.6b37ecf2.js +1 -0
- package/lib/createFile.82d6e415.mjs +239 -0
- package/lib/createSubfolders.47af629c.js +1 -0
- package/lib/createSubfolders.d35b97e9.mjs +154 -0
- package/lib/dialogLayout.08823bb7.js +1 -0
- package/lib/dialogLayout.c4bc3b55.mjs +138 -0
- package/lib/drawerContainer.604a1271.mjs +146 -0
- package/lib/drawerContainer.6a9813ce.js +1 -0
- package/lib/drawerLayout.36cf4d05.js +1 -0
- package/lib/drawerLayout.fb60950f.mjs +119 -0
- package/lib/fileSearch.65311ded.js +1 -0
- package/lib/fileSearch.86c356fe.mjs +338 -0
- package/lib/flow.designer.1ba3a90d.js +1 -0
- package/lib/flow.designer.6da03949.mjs +7686 -0
- package/lib/flow.list.03694808.mjs +3030 -0
- package/lib/flow.list.4eb10554.js +1 -0
- package/lib/form.build.51bd261e.js +1 -0
- package/lib/form.build.b768d613.mjs +251 -0
- package/lib/form.designer.build.5a950455.js +1 -0
- package/lib/form.designer.build.e521c9c6.mjs +5091 -0
- package/lib/formFiled.464856f5.js +1 -0
- package/lib/formFiled.fe7d9df3.mjs +505 -0
- package/lib/gd-initial.js +1 -35
- package/lib/gd-initial.mjs +221 -91087
- package/lib/http.appmanage.4554a629.mjs +50 -0
- package/lib/http.appmanage.b998818f.js +1 -0
- package/lib/http.codegeneratemanage.2f925b10.mjs +112 -0
- package/lib/http.codegeneratemanage.aecadd5d.js +1 -0
- package/lib/http.configmanage.6cfb8ae7.js +1 -0
- package/lib/http.configmanage.c23c7fa8.mjs +34 -0
- package/lib/http.currencymanage.37ab5ced.js +1 -0
- package/lib/http.currencymanage.c25bd2e6.mjs +10 -0
- package/lib/http.datasource.294b01e2.js +1 -0
- package/lib/http.datasource.aa5cd0d1.mjs +58 -0
- package/lib/http.dictdatamanage.4baf16c0.mjs +42 -0
- package/lib/http.dictdatamanage.70545d8a.js +1 -0
- package/lib/http.dictmanage.3dc07b5d.js +1 -0
- package/lib/http.dictmanage.77c69971.mjs +50 -0
- package/lib/http.duplicatechecking.31964ce7.mjs +50 -0
- package/lib/http.duplicatechecking.ee5c414c.js +1 -0
- package/lib/http.emailmanage.1ddaa8b5.js +1 -0
- package/lib/http.emailmanage.64fd611f.mjs +18 -0
- package/lib/http.filedocument.7c656b91.js +1 -0
- package/lib/http.filedocument.d456d26a.mjs +156 -0
- package/lib/http.filemanage.7e6e3e1a.js +1 -0
- package/lib/http.filemanage.c0de21d6.mjs +71 -0
- package/lib/http.languagemanage.2ef16159.mjs +10 -0
- package/lib/http.languagemanage.e2c098ec.js +1 -0
- package/lib/http.loginmanage.05500c29.mjs +74 -0
- package/lib/http.loginmanage.326984c3.js +1 -0
- package/lib/http.logmanage.1e12a9bd.js +1 -0
- package/lib/http.logmanage.8ba72635.mjs +82 -0
- package/lib/http.machinemanage.29d72a65.js +1 -0
- package/lib/http.machinemanage.7bbe6c16.mjs +26 -0
- package/lib/http.main.2f8a6936.js +1 -0
- package/lib/http.main.40657f51.mjs +517 -0
- package/lib/http.menumanage.3240ba0d.mjs +66 -0
- package/lib/http.menumanage.6d740f2c.js +1 -0
- package/lib/http.message.5004bf60.mjs +178 -0
- package/lib/http.message.87f319d7.js +1 -0
- package/lib/http.noticemanage.2507d094.js +1 -0
- package/lib/http.noticemanage.e03bd5f3.mjs +82 -0
- package/lib/http.noticereceivedmanage.50797be1.mjs +10 -0
- package/lib/http.noticereceivedmanage.e8ec9c9d.js +1 -0
- package/lib/http.onlineusermanage.3893f897.js +1 -0
- package/lib/http.onlineusermanage.c8d84337.mjs +18 -0
- package/lib/http.orgmanage.5162fd7a.js +1 -0
- package/lib/http.orgmanage.84e43edb.mjs +58 -0
- package/lib/http.pluginmanage.6a876040.js +1 -0
- package/lib/http.pluginmanage.6bc6197f.mjs +82 -0
- package/lib/http.posmanage.c0f80aec.js +1 -0
- package/lib/http.posmanage.ee6a7613.mjs +34 -0
- package/lib/http.promptmanagement.c7912f6c.mjs +42 -0
- package/lib/http.promptmanagement.d115c4b0.js +1 -0
- package/lib/http.rolemanage.03363732.js +1 -0
- package/lib/http.rolemanage.dbf3fda1.mjs +114 -0
- package/lib/http.solution.175d36c8.mjs +91 -0
- package/lib/http.solution.c6b2634f.js +1 -0
- package/lib/http.sumberrules.0b68ce6d.js +1 -0
- package/lib/http.sumberrules.608a06d6.mjs +34 -0
- package/lib/http.sysapps.469d47f7.js +1 -0
- package/lib/http.sysapps.e294ceaf.mjs +58 -0
- package/lib/http.syscodegenerateconfigmanage.6d2e5da0.mjs +42 -0
- package/lib/http.syscodegenerateconfigmanage.840f1136.js +1 -0
- package/lib/http.tabledevelopment.1d370398.mjs +362 -0
- package/lib/http.tabledevelopment.a880bb76.js +1 -0
- package/lib/http.team.c8487c0b.mjs +90 -0
- package/lib/http.team.e45400d5.js +1 -0
- package/lib/http.timersmanage.01dbc1a2.mjs +146 -0
- package/lib/http.timersmanage.6e894942.js +1 -0
- package/lib/http.timezonemanage.b9deffe3.mjs +10 -0
- package/lib/http.timezonemanage.e0aa212f.js +1 -0
- package/lib/http.translationmanage.1f9dce46.js +1 -0
- package/lib/http.translationmanage.a4640c9a.mjs +104 -0
- package/lib/http.useraffiliation.840741ed.mjs +90 -0
- package/lib/http.useraffiliation.af2013ad.js +1 -0
- package/lib/http.usermanage.3e5eff33.mjs +219 -0
- package/lib/http.usermanage.6dcbc7de.js +1 -0
- package/lib/http.webresource.5158b431.mjs +50 -0
- package/lib/http.webresource.7c01b9cd.js +1 -0
- package/lib/index.69ad4631.mjs +44291 -0
- package/lib/index.cca024bf.js +8 -0
- package/lib/layoutBlocks.1a9e3e05.mjs +204 -0
- package/lib/layoutBlocks.5e6be06f.js +1 -0
- package/lib/layouts.051a0bba.mjs +376 -0
- package/lib/layouts.a6a36612.js +2 -0
- package/lib/main.457f4326.js +1 -0
- package/lib/main.4fff412e.js +1 -0
- package/lib/{main.6c47713a.mjs → main.70357352.mjs} +12 -10
- package/lib/main.77373aa4.mjs +441 -0
- package/lib/{main.28952cf7.mjs → main.7f44e3bf.mjs} +78 -143
- package/lib/main.8a2a590d.js +1 -0
- package/lib/main.ad1e8d4d.js +1 -0
- package/lib/{main.5b3edd34.mjs → main.b0e5e1b0.mjs} +9 -8
- package/lib/{main.b4704b4b.mjs → main.c1df94d8.mjs} +4 -4
- package/lib/main.c3726602.js +1 -0
- package/lib/manage.5bb4f719.js +1 -0
- package/lib/manage.a1df9b88.mjs +419 -0
- package/lib/messages.7b74736f.js +9 -0
- package/lib/{messages.1787f71e.mjs → messages.ad082386.mjs} +994 -1952
- package/lib/moveFile.0ce803e0.js +1 -0
- package/lib/moveFile.8310ea94.mjs +254 -0
- package/lib/page.build.685c1e15.mjs +3158 -0
- package/lib/page.build.846096e6.js +12 -0
- package/lib/personal.echarts.b22fba61.mjs +701 -0
- package/lib/personal.echarts.f77bfc9e.js +1 -0
- package/lib/result.19351665.mjs +526 -0
- package/lib/result.e59c0e40.js +1 -0
- package/lib/router.config.2501ec51.js +1 -0
- package/lib/router.config.98a73167.mjs +3172 -0
- package/lib/solution.58580123.js +1 -0
- package/lib/solution.890ff164.mjs +6942 -0
- package/lib/store.config.3cb11578.js +1 -0
- package/lib/store.config.fff8a5a1.mjs +542 -0
- package/lib/style.css +3 -3
- package/lib/system.account.014f3e0b.mjs +2097 -0
- package/lib/system.account.0d4f1fdc.js +216 -0
- package/lib/{system.config.9bee857f.mjs → system.config.0899edb8.mjs} +7 -6
- package/lib/system.config.210f516c.js +1 -0
- package/lib/system.datasource.82492d27.js +1 -0
- package/lib/{system.datasource.926c6da1.mjs → system.datasource.986768c9.mjs} +15 -64
- package/lib/{system.dict.d48f77d5.mjs → system.dict.ef24873d.mjs} +28 -107
- package/lib/system.dict.f5708400.js +1 -0
- package/lib/system.duplicatechecking.8e3a37c0.js +1 -0
- package/lib/system.duplicatechecking.dcf9f86b.mjs +742 -0
- package/lib/system.email.070ab2be.js +1 -0
- package/lib/system.email.252fd642.mjs +138 -0
- package/lib/{system.fieldsecurity.a91a8420.mjs → system.fieldsecurity.0234d390.mjs} +224 -685
- package/lib/system.fieldsecurity.3ef07bf7.js +1 -0
- package/lib/system.file.17a7f2ed.js +1 -0
- package/lib/{system.file.ca5f4aae.mjs → system.file.73eeb731.mjs} +8 -7
- package/lib/{system.log.e80ba9c9.mjs → system.log.b86cf57f.mjs} +31 -93
- package/lib/system.log.fc60f5e6.js +1 -0
- package/lib/{system.machine.c1e753fb.mjs → system.machine.0114001b.mjs} +5 -25
- package/lib/system.machine.f1d95c86.js +1 -0
- package/lib/{system.notice.a6017645.mjs → system.notice.25ea8dca.mjs} +292 -474
- package/lib/system.notice.96c770a6.js +1 -0
- package/lib/{system.noticereceived.bbf6efd3.mjs → system.noticereceived.369f634c.mjs} +17 -24
- package/lib/system.noticereceived.dfe4ecc7.js +1 -0
- package/lib/{system.onlineuser.2b756c66.mjs → system.onlineuser.2dc284b1.mjs} +11 -24
- package/lib/system.onlineuser.e2e39bdc.js +1 -0
- package/lib/system.org.79ee5bd6.js +1 -0
- package/lib/{system.org.5f9e7b94.mjs → system.org.c20fe6b2.mjs} +3 -3
- package/lib/system.permissions.90f73461.js +9 -0
- package/lib/{system.permissions.17fe31d5.mjs → system.permissions.c3d34921.mjs} +4 -3
- package/lib/{system.plugin.c503c5b7.mjs → system.plugin.45a0f530.mjs} +23 -93
- package/lib/system.plugin.b34a3b47.js +1 -0
- package/lib/system.pos.0a3d2a37.js +1 -0
- package/lib/{system.pos.a169dcb9.mjs → system.pos.7946a99c.mjs} +31 -62
- package/lib/system.promptmanagement.b5fa6b2d.js +1 -0
- package/lib/{system.promptmanagement.00fc2917.mjs → system.promptmanagement.d7250932.mjs} +153 -287
- package/lib/system.role.03be0982.js +1 -0
- package/lib/{system.role.52d67131.mjs → system.role.75da7929.mjs} +8 -5
- package/lib/{system.sumberrules.357dc3bb.mjs → system.sumberrules.4a1376a6.mjs} +13 -39
- package/lib/system.sumberrules.bb228fce.js +1 -0
- package/lib/system.team.32183b63.js +1 -0
- package/lib/system.team.e6a9608e.mjs +450 -0
- package/lib/{system.teammembers.90598753.mjs → system.teammembers.4a7e7339.mjs} +135 -82
- package/lib/system.teammembers.847d8ea7.js +1 -0
- package/lib/system.timers.28691ce4.js +38 -0
- package/lib/{system.timers.f66ddd64.mjs → system.timers.eb0b6f3e.mjs} +50 -174
- package/lib/system.translation.6237f071.js +1 -0
- package/lib/{system.translation.279d9e27.mjs → system.translation.e34f0891.mjs} +5 -5
- package/lib/{system.user.80ca9f42.mjs → system.user.fa2d2997.mjs} +17 -16
- package/lib/{system.user.10ae5122.js → system.user.fca3f2d6.js} +5 -5
- package/lib/{system.useraffiliation.b5c11d9e.mjs → system.useraffiliation.518e341e.mjs} +4 -3
- package/lib/system.useraffiliation.7547b9c7.js +1 -0
- package/lib/system.webresource.12712b90.js +1 -0
- package/lib/{system.webresource.6dbe70f3.mjs → system.webresource.469db736.mjs} +16 -58
- package/lib/{system.welcome.a162fc7d.mjs → system.welcome.191e98f5.mjs} +10 -3
- package/lib/system.welcome.f64e49f8.js +1 -0
- package/lib/tcheckboxs.090e75eb.mjs +52 -0
- package/lib/tcheckboxs.99361be3.js +1 -0
- package/lib/tcurrency.0ddac2f8.mjs +92 -0
- package/lib/tcurrency.62763c6d.js +1 -0
- package/lib/tdatepicker.8fe48b1b.mjs +52 -0
- package/lib/tdatepicker.b19e689d.js +1 -0
- package/lib/tdictSwitch.2e07dc8a.js +1 -0
- package/lib/tdictSwitch.43d882c7.mjs +60 -0
- package/lib/tfile.1bc381f9.js +1 -0
- package/lib/tfile.72925615.mjs +62 -0
- package/lib/tparticipants.77b876e2.js +1 -0
- package/lib/tparticipants.ca5b556c.mjs +56 -0
- package/lib/translation.mains.1ce7e110.js +1 -0
- package/lib/translation.mains.278e4ba6.mjs +383 -0
- package/lib/utils.datepicker.js.2076c2a2.mjs +61 -0
- package/lib/utils.datepicker.js.8576e2fc.js +1 -0
- package/lib/utils.echarts.js.461a74e7.js +54 -0
- package/lib/utils.echarts.js.d1bb8ac6.mjs +25711 -0
- package/lib/utils.mixins.js.750ca50e.js +1 -0
- package/lib/utils.mixins.js.be01e599.mjs +41 -0
- package/lib/utils.util.js.50d1ec9c.js +1 -0
- package/lib/utils.util.js.82cd8447.mjs +424 -0
- package/lib/view.build.b44fd7d7.js +1 -0
- package/lib/view.build.f2a9fcfb.mjs +2727 -0
- package/lib/viewList.5a25c4b6.mjs +346 -0
- package/lib/viewList.be5a5ec5.js +1 -0
- package/locale/en_US.js +48 -23
- package/locale/id_ID.js +32 -7
- package/locale/vi_VN.js +1973 -1948
- package/locale/zh_CN.js +53 -29
- package/package.json +106 -105
- package/lib/chartbi.0d1d3b58.mjs +0 -27639
- package/lib/chartbi.d3f580d6.js +0 -60
- package/lib/main.0088ac99.js +0 -1
- package/lib/main.34c14bdb.js +0 -1
- package/lib/main.4b9adacf.js +0 -1
- package/lib/main.d1239940.js +0 -1
- package/lib/messages.add7c391.js +0 -9
- package/lib/system.account.00b82418.mjs +0 -2552
- package/lib/system.account.04cb26b6.js +0 -216
- package/lib/system.config.6244fa9b.js +0 -1
- package/lib/system.datasource.32878f5f.js +0 -1
- package/lib/system.dict.d25839ec.js +0 -1
- package/lib/system.duplicatechecking.4ed8c391.mjs +0 -2142
- package/lib/system.duplicatechecking.670ee24a.js +0 -1
- package/lib/system.email.52671629.mjs +0 -7432
- package/lib/system.email.dd537fd0.js +0 -41
- package/lib/system.fieldsecurity.4947c737.js +0 -1
- package/lib/system.file.93d65d16.js +0 -1
- package/lib/system.log.252cce0b.js +0 -1
- package/lib/system.machine.4e393981.js +0 -1
- package/lib/system.notice.ab23c15b.js +0 -1
- package/lib/system.noticereceived.123b764e.js +0 -1
- package/lib/system.onlineuser.295ad7f5.js +0 -1
- package/lib/system.org.c3bb51ff.js +0 -1
- package/lib/system.permissions.967200f1.js +0 -9
- package/lib/system.plugin.f8da8731.js +0 -1
- package/lib/system.pos.22fabf30.js +0 -1
- package/lib/system.promptmanagement.639a98e1.js +0 -1
- package/lib/system.role.4cf72743.js +0 -1
- package/lib/system.sumberrules.1a5b80df.js +0 -1
- package/lib/system.team.777feecf.mjs +0 -1000
- package/lib/system.team.ad10fc96.js +0 -1
- package/lib/system.teammembers.b193dd23.js +0 -1
- package/lib/system.timers.e31fe5fd.js +0 -38
- package/lib/system.translation.d3ed3d35.js +0 -1
- package/lib/system.useraffiliation.593c9ad4.js +0 -1
- package/lib/system.webresource.25e56654.js +0 -1
- package/lib/system.welcome.ec4e941f.js +0 -1
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
import { t as u } from "./utils.util.js.82cd8447.mjs";
|
|
2
|
+
import { m as p, n as f } from "./components.chartbi.b043dcdc.mjs";
|
|
3
|
+
const g = {
|
|
4
|
+
name: "GdTableUmy",
|
|
5
|
+
props: Object.assign(
|
|
6
|
+
{},
|
|
7
|
+
{
|
|
8
|
+
record: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default: () => ({})
|
|
11
|
+
},
|
|
12
|
+
dataSource: {
|
|
13
|
+
type: Function,
|
|
14
|
+
required: !0
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "small"
|
|
19
|
+
},
|
|
20
|
+
rowKey: {
|
|
21
|
+
type: [String, Function],
|
|
22
|
+
default: "id"
|
|
23
|
+
},
|
|
24
|
+
amount: {
|
|
25
|
+
type: Function
|
|
26
|
+
},
|
|
27
|
+
load: {
|
|
28
|
+
type: Function
|
|
29
|
+
},
|
|
30
|
+
tableTree: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
lazy: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
border: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
columns: {
|
|
43
|
+
type: Array,
|
|
44
|
+
default: () => []
|
|
45
|
+
},
|
|
46
|
+
cellStyle: {
|
|
47
|
+
type: Function
|
|
48
|
+
},
|
|
49
|
+
cellClassName: {
|
|
50
|
+
type: Function
|
|
51
|
+
},
|
|
52
|
+
rowClassName: {
|
|
53
|
+
type: Function
|
|
54
|
+
},
|
|
55
|
+
defaultExpandedKeys: {
|
|
56
|
+
type: Array,
|
|
57
|
+
default: () => []
|
|
58
|
+
},
|
|
59
|
+
selectedRowKeys: {
|
|
60
|
+
type: Array,
|
|
61
|
+
default: () => []
|
|
62
|
+
},
|
|
63
|
+
selectedKeep: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: !1
|
|
66
|
+
},
|
|
67
|
+
height: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 0
|
|
70
|
+
},
|
|
71
|
+
maxHeight: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 0
|
|
74
|
+
},
|
|
75
|
+
indent: {
|
|
76
|
+
type: Number,
|
|
77
|
+
default: 16
|
|
78
|
+
},
|
|
79
|
+
pageSize: {
|
|
80
|
+
type: Number,
|
|
81
|
+
default: 10
|
|
82
|
+
},
|
|
83
|
+
pageSizes: {
|
|
84
|
+
type: Array,
|
|
85
|
+
default: () => [10, 20, 30, 40, 50, 100, 200, 500]
|
|
86
|
+
},
|
|
87
|
+
tableExpand: {
|
|
88
|
+
type: Array,
|
|
89
|
+
default: () => []
|
|
90
|
+
},
|
|
91
|
+
defaultExpandAll: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: !1
|
|
94
|
+
},
|
|
95
|
+
method: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: !1
|
|
98
|
+
},
|
|
99
|
+
columnKey: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: ""
|
|
102
|
+
},
|
|
103
|
+
showSummary: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: !1
|
|
106
|
+
},
|
|
107
|
+
headerCellStyle: {
|
|
108
|
+
type: [Object, Function],
|
|
109
|
+
default: () => ({})
|
|
110
|
+
},
|
|
111
|
+
showPagination: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: !0
|
|
114
|
+
},
|
|
115
|
+
initialLoading: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: !0
|
|
118
|
+
},
|
|
119
|
+
filtering: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: !1
|
|
122
|
+
},
|
|
123
|
+
disabledRowId: {
|
|
124
|
+
type: Array,
|
|
125
|
+
default: () => []
|
|
126
|
+
},
|
|
127
|
+
disabledRefresh: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: !1
|
|
130
|
+
},
|
|
131
|
+
stripe: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: !1
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
computed: {
|
|
138
|
+
fadeColord() {
|
|
139
|
+
return this.fadeColor(this.primaryColor, 0.3);
|
|
140
|
+
},
|
|
141
|
+
getColumns() {
|
|
142
|
+
return this.columnsSetting.filter((t) => t.checked === void 0 || t.checked);
|
|
143
|
+
},
|
|
144
|
+
selectionType() {
|
|
145
|
+
const t = this.columns.filter((e) => e.type === "selection" || e.type === "selection-radio")[0];
|
|
146
|
+
return t ? t.type === "selection" ? "checkbox" : "radio" : null;
|
|
147
|
+
},
|
|
148
|
+
hasClear() {
|
|
149
|
+
let t = [];
|
|
150
|
+
for (let e in this.sorter)
|
|
151
|
+
t.push(e);
|
|
152
|
+
return t.length;
|
|
153
|
+
},
|
|
154
|
+
dropdownActive() {
|
|
155
|
+
return `background-color: ${this.fadeColor(this.primaryColor, 0.1)};color:${this.primaryColor}`;
|
|
156
|
+
},
|
|
157
|
+
totalPages() {
|
|
158
|
+
return Math.ceil(this.total / this.pageSized);
|
|
159
|
+
},
|
|
160
|
+
...p(["primaryColor", "language"])
|
|
161
|
+
},
|
|
162
|
+
data() {
|
|
163
|
+
return {
|
|
164
|
+
tableData: [],
|
|
165
|
+
loading: !1,
|
|
166
|
+
customSize: this.size,
|
|
167
|
+
keyValue: null,
|
|
168
|
+
currentRow: "",
|
|
169
|
+
total: 0,
|
|
170
|
+
sorter: {},
|
|
171
|
+
state: !1,
|
|
172
|
+
currentPage: 1,
|
|
173
|
+
pageSized: this.pageSize,
|
|
174
|
+
columnsSetting: [],
|
|
175
|
+
visibleFilter: !1
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
watch: {
|
|
179
|
+
tableExpand: {
|
|
180
|
+
handler() {
|
|
181
|
+
const t = this.$refs.refTable, e = this.getChildRens(this.tableData);
|
|
182
|
+
u(JSON.parse(JSON.stringify(this.tableData)), "children").map((a) => {
|
|
183
|
+
e.includes(a.id) ? t.toggleRowExpansion(a, !1) : t.toggleRowExpansion(a, !0);
|
|
184
|
+
});
|
|
185
|
+
},
|
|
186
|
+
deep: !0
|
|
187
|
+
},
|
|
188
|
+
tableData: {
|
|
189
|
+
handler() {
|
|
190
|
+
this.keyValue = void 0, this.numbers = 0;
|
|
191
|
+
},
|
|
192
|
+
deep: !0
|
|
193
|
+
},
|
|
194
|
+
language: {
|
|
195
|
+
handler() {
|
|
196
|
+
this.$nextTick(() => {
|
|
197
|
+
setTimeout(() => {
|
|
198
|
+
this.$refs.refTable.doLayout();
|
|
199
|
+
}, 0);
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
deep: !0
|
|
203
|
+
},
|
|
204
|
+
size: {
|
|
205
|
+
handler(t) {
|
|
206
|
+
this.$nextTick(() => {
|
|
207
|
+
setTimeout(() => {
|
|
208
|
+
this.customSize = t, this.$refs.refTable.doLayout();
|
|
209
|
+
}, 0);
|
|
210
|
+
});
|
|
211
|
+
},
|
|
212
|
+
deep: !0
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
methods: {
|
|
216
|
+
selecTables({ row: t }) {
|
|
217
|
+
return !this.disabledRowId.includes(t.id);
|
|
218
|
+
},
|
|
219
|
+
changeFilter(t) {
|
|
220
|
+
this.visibleFilter = t;
|
|
221
|
+
},
|
|
222
|
+
closeFilter() {
|
|
223
|
+
this.$refs.filterdropdown.hide();
|
|
224
|
+
},
|
|
225
|
+
cellClassNamed({ row: t, rowIndex: e }) {
|
|
226
|
+
return this.cellClassName && typeof this.cellClassName == "function" ? this.cellClassName({ row: t, rowIndex: e }) : "";
|
|
227
|
+
},
|
|
228
|
+
rowClassNamed({ row: t, rowIndex: e }) {
|
|
229
|
+
return this.rowClassName && typeof this.rowClassName == "function" ? this.rowClassName({ row: t, rowIndex: e }) : "";
|
|
230
|
+
},
|
|
231
|
+
columnChange(t) {
|
|
232
|
+
let e = t.filter((a) => a.fixed), l = [...t];
|
|
233
|
+
return l.forEach((a, s) => {
|
|
234
|
+
l[s].fixed = !1, s < e.length && (l[s].fixed = !0);
|
|
235
|
+
}), this.$emit("columnChange", l), this.columnsSetting = l, new Promise((a, s) => {
|
|
236
|
+
this.$nextTick(() => {
|
|
237
|
+
setTimeout(() => {
|
|
238
|
+
this.$refs.refTable.doLayout(), a();
|
|
239
|
+
}, 0);
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
summaries(t) {
|
|
244
|
+
return this.amount(t);
|
|
245
|
+
},
|
|
246
|
+
spanMethod({ row: t, column: e }) {
|
|
247
|
+
if (e.property === this.columnKey) {
|
|
248
|
+
let l = 0, a = 0;
|
|
249
|
+
if (this.keyValue !== t[this.columnKey]) {
|
|
250
|
+
for (; l < this.tableData.length; )
|
|
251
|
+
this.tableData[l][this.columnKey] === t[this.columnKey] && a++, l++;
|
|
252
|
+
this.keyValue = t[this.columnKey];
|
|
253
|
+
} else
|
|
254
|
+
a = 0;
|
|
255
|
+
return {
|
|
256
|
+
rowspan: a,
|
|
257
|
+
colspan: 1
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
handlerClick(t) {
|
|
262
|
+
this.$emit("handlerClick", t);
|
|
263
|
+
},
|
|
264
|
+
handleButton(t, e, l) {
|
|
265
|
+
this.$emit("handleButton", {
|
|
266
|
+
methods: t,
|
|
267
|
+
row: e
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
handleFilterChange(t) {
|
|
271
|
+
this.$emit("handleFilterChange", t);
|
|
272
|
+
},
|
|
273
|
+
handleSelectionChange(t) {
|
|
274
|
+
if (this.loading)
|
|
275
|
+
return;
|
|
276
|
+
const e = this.rowKey || "index";
|
|
277
|
+
let l = [];
|
|
278
|
+
t.forEach((a, s) => {
|
|
279
|
+
l.push(a[e]);
|
|
280
|
+
}), this.$emit("onChange", l, t);
|
|
281
|
+
},
|
|
282
|
+
changRadio(t) {
|
|
283
|
+
if (this.loading)
|
|
284
|
+
return;
|
|
285
|
+
const e = this.rowKey || "index";
|
|
286
|
+
let l = {};
|
|
287
|
+
this.tableData.forEach((a) => {
|
|
288
|
+
if (a[e] === t && (l = { ...a }), a.children && a.children.length > 0) {
|
|
289
|
+
const s = a.children.filter((i) => i[e] === t)[0];
|
|
290
|
+
l = s ? { ...s } : l;
|
|
291
|
+
}
|
|
292
|
+
}), this.$emit("onChange", [l[e]], [l]);
|
|
293
|
+
},
|
|
294
|
+
handleSelect(t, e) {
|
|
295
|
+
this.$emit("handleSelect", t, e);
|
|
296
|
+
},
|
|
297
|
+
selectAll(t) {
|
|
298
|
+
this.$emit("selectAll", t);
|
|
299
|
+
},
|
|
300
|
+
rowClick(t, e, l) {
|
|
301
|
+
this.$emit("rowClick", t, e);
|
|
302
|
+
},
|
|
303
|
+
handleSizeChange(t) {
|
|
304
|
+
this.pageSized = t, this.currentPage > this.totalPages && (this.currentPage = this.totalPages), this.selectedKeep || this.$emit("onChange", [], []), this.loadData();
|
|
305
|
+
},
|
|
306
|
+
handleCurrentChange(t) {
|
|
307
|
+
this.currentPage = t, this.selectedKeep || this.$emit("onChange", [], []), this.loadData();
|
|
308
|
+
},
|
|
309
|
+
expandChange(t, e) {
|
|
310
|
+
this.$emit("expandChange", { val: t, expanded: e });
|
|
311
|
+
},
|
|
312
|
+
getChildRens(t) {
|
|
313
|
+
const e = [];
|
|
314
|
+
return t.map((l) => {
|
|
315
|
+
if (this.tableExpand.includes(l.id) || e.push(l.id), Object.prototype.hasOwnProperty.call(l, "children")) {
|
|
316
|
+
const a = this.getChildRens(l.children);
|
|
317
|
+
e.push(...a);
|
|
318
|
+
}
|
|
319
|
+
}), e;
|
|
320
|
+
},
|
|
321
|
+
handleCurrentRowChange(t) {
|
|
322
|
+
this.$emit("handleCurrentRowChange", t);
|
|
323
|
+
},
|
|
324
|
+
handleHeaderDragEnd() {
|
|
325
|
+
this.$nextTick(() => {
|
|
326
|
+
this.$refs.refTable.doLayout();
|
|
327
|
+
});
|
|
328
|
+
},
|
|
329
|
+
changColumnHeight(t) {
|
|
330
|
+
this.customSize = t, this.$nextTick(() => {
|
|
331
|
+
this.$refs.refTable.doLayout();
|
|
332
|
+
});
|
|
333
|
+
},
|
|
334
|
+
sortChange({ prop: t, order: e }) {
|
|
335
|
+
this.sorter = e ? { sortField: t, sortOrder: e.replace("ending", "") } : {}, this.loadData();
|
|
336
|
+
},
|
|
337
|
+
loadData() {
|
|
338
|
+
this.loading = !0;
|
|
339
|
+
const t = this.dataSource(Object.assign({ ...this.sorter }, { pageNo: this.currentPage, pageSize: this.pageSized }));
|
|
340
|
+
(typeof t == "object" || typeof t == "function") && typeof t.then == "function" ? t.then((e) => {
|
|
341
|
+
let l = e && e.rows ? e.rows : [];
|
|
342
|
+
this.tableData = [...l], this.currentPage = e.pageNo, this.total = e.totalRows, this.toggleRowSelection();
|
|
343
|
+
}) : this.loading = !1;
|
|
344
|
+
},
|
|
345
|
+
setLoadData(t) {
|
|
346
|
+
this.tableData = [...t], this.total = t.length, this.$nextTick(() => {
|
|
347
|
+
setTimeout(() => {
|
|
348
|
+
this.$refs.refTable.doLayout();
|
|
349
|
+
}, 0);
|
|
350
|
+
});
|
|
351
|
+
},
|
|
352
|
+
doLayout() {
|
|
353
|
+
this.$nextTick(() => {
|
|
354
|
+
setTimeout(() => {
|
|
355
|
+
this.$refs.refTable.doLayout();
|
|
356
|
+
}, 0);
|
|
357
|
+
});
|
|
358
|
+
},
|
|
359
|
+
getLoadData() {
|
|
360
|
+
return new Promise((t, e) => {
|
|
361
|
+
t(this.tableData);
|
|
362
|
+
});
|
|
363
|
+
},
|
|
364
|
+
async toggleRowSelection() {
|
|
365
|
+
if (!this.selectionType) {
|
|
366
|
+
this.loading = !1;
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
this.selectionType === "radio" && (this.currentRow = this.selectedRowKeys[0] ? this.selectedRowKeys[0] : ""), this.$nextTick(async () => {
|
|
370
|
+
setTimeout(async () => {
|
|
371
|
+
const t = this.rowKey || "index";
|
|
372
|
+
let e = [];
|
|
373
|
+
const l = (n, o) => (n = n.filter((r, h) => (this.selectedRowKeys.includes(r[t]) && e.push(r), r.children && r.children.length > 0 && l(r.children), !0)), n);
|
|
374
|
+
await l(this.tableData);
|
|
375
|
+
const a = this.selectedRowKeys.filter((n) => !this.tableData.filter((r) => n === r[t])[0]);
|
|
376
|
+
let s = [];
|
|
377
|
+
for (let n = 0; n < a.length; n++) {
|
|
378
|
+
let o = /* @__PURE__ */ new Map();
|
|
379
|
+
o.set(t, a[n]), s.push(Object.fromEntries(o));
|
|
380
|
+
}
|
|
381
|
+
const i = e.concat(s);
|
|
382
|
+
let d = [];
|
|
383
|
+
for (let n = 0; n < i.length; n++) {
|
|
384
|
+
let o = new Promise((r, h) => {
|
|
385
|
+
this.$refs.refTable.toggleRowSelection([{ row: i[n], selected: !0 }]), r(n);
|
|
386
|
+
});
|
|
387
|
+
d.push(o);
|
|
388
|
+
}
|
|
389
|
+
Promise.all(d).then((n) => {
|
|
390
|
+
this.loading = !1;
|
|
391
|
+
});
|
|
392
|
+
}, 10);
|
|
393
|
+
});
|
|
394
|
+
},
|
|
395
|
+
refresh(t = !0) {
|
|
396
|
+
!this.selectedKeep && t && this.$emit("onChange", [], []), t && (this.currentPage = 1), this.loadData();
|
|
397
|
+
},
|
|
398
|
+
clearAll() {
|
|
399
|
+
if (this.state || this.loading)
|
|
400
|
+
return;
|
|
401
|
+
let t = [];
|
|
402
|
+
for (let e in this.sorter)
|
|
403
|
+
t.push(e);
|
|
404
|
+
t.length !== 0 && (this.state = !0, this.sorter = {}, this.$refs.refTable.clearSort(), this.$refs.refTable.clearFilter(), setTimeout(() => {
|
|
405
|
+
this.refresh(), this.state = !1;
|
|
406
|
+
}, 100));
|
|
407
|
+
},
|
|
408
|
+
fadeColor(t, e) {
|
|
409
|
+
let l = parseInt(t.substring(1, 3), 16), a = parseInt(t.substring(3, 5), 16), s = parseInt(t.substring(5, 7), 16);
|
|
410
|
+
return `rgba(${l},${a},${s},${e})`;
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
created() {
|
|
414
|
+
this.columnsSetting = this.columns, this.initialLoading && this.loadData();
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
var m = function() {
|
|
418
|
+
var e = this, l = e._self._c;
|
|
419
|
+
return l("div", { staticClass: "gd-tables", style: { "--theme": e.primaryColor, "--fadecolor": e.fadeColord } }, [l("div", { staticClass: "tables-tool" }, [l("div", { staticClass: "tables-tool-l" }, [e._t("operator")], 2), l("div", { staticClass: "tables-tool-r" }, [e.hasClear ? l("el-tooltip", { directives: [{ name: "delTabIndex", rawName: "v-delTabIndex" }], staticClass: "item", attrs: { effect: "dark", content: e.$i18nt("gd.basics.reset", "\u91CD\u7F6E"), placement: "bottom" } }, [l("i", { staticClass: "el-icon-brush", on: { click: e.clearAll } })]) : e._e(), e.filtering ? l("el-tooltip", { directives: [{ name: "delTabIndex", rawName: "v-delTabIndex" }], staticClass: "item", attrs: { effect: "dark", content: e.$i18nt("gd.basics.screen", "\u7B5B\u9009"), placement: "bottom" } }, [l("el-dropdown", { ref: "filterdropdown", attrs: { trigger: "click", placement: "bottom" }, on: { "visible-change": e.changeFilter } }, [l("span", { staticClass: "el-dropdown-link" }, [l("i", { staticClass: "gd-icons gd-icon-a-guangqi_guolv11x" })]), l("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, [e._t("filtering", null, { columns: e.columns, height: e.height, colse: e.closeFilter, visible: e.visibleFilter })], 2)], 1)], 1) : e._e(), e.disabledRefresh ? e._e() : l("el-tooltip", { directives: [{ name: "delTabIndex", rawName: "v-delTabIndex" }], staticClass: "item", attrs: { effect: "dark", content: e.$i18nt("gd.basics.refresh", "\u5237\u65B0"), placement: "bottom" } }, [l("i", { staticClass: "el-icon-refresh", on: { click: function(a) {
|
|
420
|
+
return e.refresh(!1);
|
|
421
|
+
} } })]), l("el-tooltip", { directives: [{ name: "delTabIndex", rawName: "v-delTabIndex" }], staticClass: "item", attrs: { effect: "dark", content: e.$i18nt("gd.basics.density", "\u5BC6\u5EA6"), placement: "bottom" } }, [l("el-dropdown", { attrs: { trigger: "click", placement: "bottom" }, on: { command: e.changColumnHeight } }, [l("span", { staticClass: "el-dropdown-link" }, [l("i", { staticClass: "el-icon-s-operation" })]), l("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, [l("el-dropdown-item", { style: e.customSize === "medium" ? e.dropdownActive : "", attrs: { command: "medium" } }, [e._v(" " + e._s(e.$i18nt("gd.basics.default", "\u9ED8\u8BA4")) + " ")]), l("el-dropdown-item", { style: e.customSize === "small" ? e.dropdownActive : "", attrs: { command: "small" } }, [e._v(" " + e._s(e.$i18nt("gd.basics.secondary", "\u4E2D\u7B49")) + " ")]), l("el-dropdown-item", { style: e.customSize === "mini" ? e.dropdownActive : "", attrs: { command: "mini" } }, [e._v(" " + e._s(e.$i18nt("gd.basics.compact", "\u7D27\u51D1")) + " ")])], 1)], 1)], 1), l("el-tooltip", { staticClass: "item", attrs: { effect: "dark", content: e.$i18nt("gd.basics.columnSettings", "\u5217\u8BBE\u7F6E"), placement: "bottom" } }, [l("el-dropdown", { attrs: { trigger: "click", placement: "bottom" } }, [l("span", { staticClass: "el-dropdown-link" }, [l("i", { staticClass: "el-icon-setting" })]), l("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, [l("gd-column-settings", { attrs: { columns: e.columns, height: e.height }, on: { columnChange: e.columnChange } })], 1)], 1)], 1)], 1)]), l("ux-grid", { directives: [{ name: "loading", rawName: "v-loading", value: e.loading, expression: "loading" }], ref: "refTable", staticClass: "table", staticStyle: { width: "100%" }, attrs: { stripe: e.stripe, "row-key": "", "expand-row-keys": e.tableExpand, "tree-props": e.tableTree ? { children: "children", hasChildren: "isLeaf" } : void 0, "tree-config": e.tableTree ? { children: "children", hasChildren: "isLeaf" } : void 0, tooltip: !0, border: e.border, size: e.customSize, indent: e.indent, lazy: e.lazy, "show-summary": e.showSummary, "summary-method": e.summaries, "default-expand-all": e.defaultExpandAll, "virtual-scroll": !0, "element-loading-background": "rgba(255, 255, 255, 0.8)", "element-loading-spinner": "el-icon-loading", data: e.tableData, "cell-style": e.cellStyle, height: e.height || null, "max-height": e.maxHeight || null, "default-sort": { prop: "id", order: null }, load: e.lazy ? e.load : null, "span-method": e.method ? e.spanMethod : null, "header-cell-style": e.headerCellStyle, "cell-class-name": e.cellClassNamed, "row-class-name": e.rowClassNamed, "checkbox-config": { checkMethod: e.selecTables } }, on: { "sort-change": e.sortChange, "filter-change": e.handleFilterChange, "selection-change": e.handleSelectionChange, "row-click": e.rowClick, "expand-change": e.expandChange, "select-all": e.selectAll, select: e.handleSelect, "current-change": e.handleCurrentRowChange, "header-dragend": e.handleHeaderDragEnd } }, [e._l(e.getColumns, function(a, s) {
|
|
422
|
+
return [a.type == "selection" ? [l("ux-table-column", { attrs: { "tree-node": "", type: "checkbox", width: a.width, align: a.align ? a.align : "center" } })] : a.type == "selection-radio" ? [l("ux-table-column", { key: a.key ? a.key : s, attrs: { "tree-node": "", width: a.width, label: "", fixed: a.fixed ? a.fixed : "left", align: a.align ? a.align : "center" }, scopedSlots: e._u([{ key: "default", fn: function(i) {
|
|
423
|
+
return [l("el-radio", { attrs: { label: i.row[e.rowKey], size: "small", disabled: e.disabledRowId.includes(i.row[e.rowKey]) }, on: { input: e.changRadio }, model: { value: e.currentRow, callback: function(d) {
|
|
424
|
+
e.currentRow = d;
|
|
425
|
+
}, expression: "currentRow" } }, [e._v(" " + e._s("") + " ")])];
|
|
426
|
+
} }], null, !0) })] : a.hidden != !1 && a.type !== "slot" && a.type != "expand" && a.type != "selection-radio" ? [l("ux-table-column", { attrs: { width: a.width, field: a.prop, label: e.$i18nt(a.transKey, a.label), fixed: a.fixed ? a.fixed : "", title: e.$i18nt(a.transKey, a.label) } })] : a.type === "slot" ? [l("ux-table-column", { key: a.key ? a.key : s, attrs: { width: a.width, "show-header-overflow": typeof a.showTooltip > "u" ? !0 : a.showTooltip, "min-width": a.minWidth, field: a.prop, title: e.$i18nt(a.transKey, a.label), fixed: a.fixed ? a.fixed : "", sortable: a.sortable ? a.sortable : !1, align: a.align ? a.align : "center", "render-header": a.renderHeader, filters: a.filters, "filter-method": a.filterTag, "filter-placement": "bottom-end", "reserve-selection": a.reserveSelection, type: a.colType }, scopedSlots: e._u([{ key: "default", fn: function(i) {
|
|
427
|
+
return [e._t(a.slotType, null, { row: i.row, index: i.$index, column: i.column })];
|
|
428
|
+
} }], null, !0) })] : e._e()];
|
|
429
|
+
}), l("template", { slot: "empty" }, [l("div", { staticClass: "gd-table-empty" }, [l("i", { staticClass: "el-icon-receiving" }), l("div", { staticClass: "empty-title" }, [e._v(e._s(e.$i18nt("gd.echarts.noData", "\u6682\u65E0\u6570\u636E\u5C55\u793A")))])])])], 2), l("div", { staticClass: "gd-paging" }, [e.showPagination ? l("el-pagination", { attrs: { background: "", "page-sizes": e.pageSizes, "page-size": e.pageSized, "current-page": e.currentPage, layout: "total, sizes, prev, pager, next, jumper", total: e.total }, on: { "update:currentPage": function(a) {
|
|
430
|
+
e.currentPage = a;
|
|
431
|
+
}, "update:current-page": function(a) {
|
|
432
|
+
e.currentPage = a;
|
|
433
|
+
}, "size-change": e.handleSizeChange, "current-change": e.handleCurrentChange } }) : e._e()], 1)], 1);
|
|
434
|
+
}, y = [], b = /* @__PURE__ */ f(
|
|
435
|
+
g,
|
|
436
|
+
m,
|
|
437
|
+
y,
|
|
438
|
+
!1,
|
|
439
|
+
null,
|
|
440
|
+
"5815332a",
|
|
441
|
+
null,
|
|
442
|
+
null
|
|
443
|
+
);
|
|
444
|
+
const c = b.exports;
|
|
445
|
+
c.install = function(t) {
|
|
446
|
+
t.component(c.name, c);
|
|
447
|
+
};
|
|
448
|
+
export {
|
|
449
|
+
c as G
|
|
450
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("./utils.util.js.50d1ec9c.js"),h=require("./components.chartbi.e4680eaa.js");const f={name:"GdTableUmy",props:Object.assign({},{record:{type:Object,default:()=>({})},dataSource:{type:Function,required:!0},size:{type:String,default:"small"},rowKey:{type:[String,Function],default:"id"},amount:{type:Function},load:{type:Function},tableTree:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},border:{type:Boolean,default:!1},columns:{type:Array,default:()=>[]},cellStyle:{type:Function},cellClassName:{type:Function},rowClassName:{type:Function},defaultExpandedKeys:{type:Array,default:()=>[]},selectedRowKeys:{type:Array,default:()=>[]},selectedKeep:{type:Boolean,default:!1},height:{type:Number,default:0},maxHeight:{type:Number,default:0},indent:{type:Number,default:16},pageSize:{type:Number,default:10},pageSizes:{type:Array,default:()=>[10,20,30,40,50,100,200,500]},tableExpand:{type:Array,default:()=>[]},defaultExpandAll:{type:Boolean,default:!1},method:{type:Boolean,default:!1},columnKey:{type:String,default:""},showSummary:{type:Boolean,default:!1},headerCellStyle:{type:[Object,Function],default:()=>({})},showPagination:{type:Boolean,default:!0},initialLoading:{type:Boolean,default:!0},filtering:{type:Boolean,default:!1},disabledRowId:{type:Array,default:()=>[]},disabledRefresh:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1}}),computed:{fadeColord(){return this.fadeColor(this.primaryColor,.3)},getColumns(){return this.columnsSetting.filter(t=>t.checked===void 0||t.checked)},selectionType(){const t=this.columns.filter(e=>e.type==="selection"||e.type==="selection-radio")[0];return t?t.type==="selection"?"checkbox":"radio":null},hasClear(){let t=[];for(let e in this.sorter)t.push(e);return t.length},dropdownActive(){return`background-color: ${this.fadeColor(this.primaryColor,.1)};color:${this.primaryColor}`},totalPages(){return Math.ceil(this.total/this.pageSized)},...h.mapGetters(["primaryColor","language"])},data(){return{tableData:[],loading:!1,customSize:this.size,keyValue:null,currentRow:"",total:0,sorter:{},state:!1,currentPage:1,pageSized:this.pageSize,columnsSetting:[],visibleFilter:!1}},watch:{tableExpand:{handler(){const t=this.$refs.refTable,e=this.getChildRens(this.tableData);p.treeToArray(JSON.parse(JSON.stringify(this.tableData)),"children").map(a=>{e.includes(a.id)?t.toggleRowExpansion(a,!1):t.toggleRowExpansion(a,!0)})},deep:!0},tableData:{handler(){this.keyValue=void 0,this.numbers=0},deep:!0},language:{handler(){this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable.doLayout()},0)})},deep:!0},size:{handler(t){this.$nextTick(()=>{setTimeout(()=>{this.customSize=t,this.$refs.refTable.doLayout()},0)})},deep:!0}},methods:{selecTables({row:t}){return!this.disabledRowId.includes(t.id)},changeFilter(t){this.visibleFilter=t},closeFilter(){this.$refs.filterdropdown.hide()},cellClassNamed({row:t,rowIndex:e}){return this.cellClassName&&typeof this.cellClassName=="function"?this.cellClassName({row:t,rowIndex:e}):""},rowClassNamed({row:t,rowIndex:e}){return this.rowClassName&&typeof this.rowClassName=="function"?this.rowClassName({row:t,rowIndex:e}):""},columnChange(t){let e=t.filter(a=>a.fixed),l=[...t];return l.forEach((a,s)=>{l[s].fixed=!1,s<e.length&&(l[s].fixed=!0)}),this.$emit("columnChange",l),this.columnsSetting=l,new Promise((a,s)=>{this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable.doLayout(),a()},0)})})},summaries(t){return this.amount(t)},spanMethod({row:t,column:e}){if(e.property===this.columnKey){let l=0,a=0;if(this.keyValue!==t[this.columnKey]){for(;l<this.tableData.length;)this.tableData[l][this.columnKey]===t[this.columnKey]&&a++,l++;this.keyValue=t[this.columnKey]}else a=0;return{rowspan:a,colspan:1}}},handlerClick(t){this.$emit("handlerClick",t)},handleButton(t,e,l){this.$emit("handleButton",{methods:t,row:e})},handleFilterChange(t){this.$emit("handleFilterChange",t)},handleSelectionChange(t){if(this.loading)return;const e=this.rowKey||"index";let l=[];t.forEach((a,s)=>{l.push(a[e])}),this.$emit("onChange",l,t)},changRadio(t){if(this.loading)return;const e=this.rowKey||"index";let l={};this.tableData.forEach(a=>{if(a[e]===t&&(l={...a}),a.children&&a.children.length>0){const s=a.children.filter(i=>i[e]===t)[0];l=s?{...s}:l}}),this.$emit("onChange",[l[e]],[l])},handleSelect(t,e){this.$emit("handleSelect",t,e)},selectAll(t){this.$emit("selectAll",t)},rowClick(t,e,l){this.$emit("rowClick",t,e)},handleSizeChange(t){this.pageSized=t,this.currentPage>this.totalPages&&(this.currentPage=this.totalPages),this.selectedKeep||this.$emit("onChange",[],[]),this.loadData()},handleCurrentChange(t){this.currentPage=t,this.selectedKeep||this.$emit("onChange",[],[]),this.loadData()},expandChange(t,e){this.$emit("expandChange",{val:t,expanded:e})},getChildRens(t){const e=[];return t.map(l=>{if(this.tableExpand.includes(l.id)||e.push(l.id),Object.prototype.hasOwnProperty.call(l,"children")){const a=this.getChildRens(l.children);e.push(...a)}}),e},handleCurrentRowChange(t){this.$emit("handleCurrentRowChange",t)},handleHeaderDragEnd(){this.$nextTick(()=>{this.$refs.refTable.doLayout()})},changColumnHeight(t){this.customSize=t,this.$nextTick(()=>{this.$refs.refTable.doLayout()})},sortChange({prop:t,order:e}){this.sorter=e?{sortField:t,sortOrder:e.replace("ending","")}:{},this.loadData()},loadData(){this.loading=!0;const t=this.dataSource(Object.assign({...this.sorter},{pageNo:this.currentPage,pageSize:this.pageSized}));(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"?t.then(e=>{let l=e&&e.rows?e.rows:[];this.tableData=[...l],this.currentPage=e.pageNo,this.total=e.totalRows,this.toggleRowSelection()}):this.loading=!1},setLoadData(t){this.tableData=[...t],this.total=t.length,this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable.doLayout()},0)})},doLayout(){this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable.doLayout()},0)})},getLoadData(){return new Promise((t,e)=>{t(this.tableData)})},async toggleRowSelection(){if(!this.selectionType){this.loading=!1;return}this.selectionType==="radio"&&(this.currentRow=this.selectedRowKeys[0]?this.selectedRowKeys[0]:""),this.$nextTick(async()=>{setTimeout(async()=>{const t=this.rowKey||"index";let e=[];const l=(n,o)=>(n=n.filter((r,u)=>(this.selectedRowKeys.includes(r[t])&&e.push(r),r.children&&r.children.length>0&&l(r.children),!0)),n);await l(this.tableData);const a=this.selectedRowKeys.filter(n=>!this.tableData.filter(r=>n===r[t])[0]);let s=[];for(let n=0;n<a.length;n++){let o=new Map;o.set(t,a[n]),s.push(Object.fromEntries(o))}const i=e.concat(s);let d=[];for(let n=0;n<i.length;n++){let o=new Promise((r,u)=>{this.$refs.refTable.toggleRowSelection([{row:i[n],selected:!0}]),r(n)});d.push(o)}Promise.all(d).then(n=>{this.loading=!1})},10)})},refresh(t=!0){!this.selectedKeep&&t&&this.$emit("onChange",[],[]),t&&(this.currentPage=1),this.loadData()},clearAll(){if(this.state||this.loading)return;let t=[];for(let e in this.sorter)t.push(e);t.length!==0&&(this.state=!0,this.sorter={},this.$refs.refTable.clearSort(),this.$refs.refTable.clearFilter(),setTimeout(()=>{this.refresh(),this.state=!1},100))},fadeColor(t,e){let l=parseInt(t.substring(1,3),16),a=parseInt(t.substring(3,5),16),s=parseInt(t.substring(5,7),16);return`rgba(${l},${a},${s},${e})`}},created(){this.columnsSetting=this.columns,this.initialLoading&&this.loadData()}};var g=function(){var e=this,l=e._self._c;return l("div",{staticClass:"gd-tables",style:{"--theme":e.primaryColor,"--fadecolor":e.fadeColord}},[l("div",{staticClass:"tables-tool"},[l("div",{staticClass:"tables-tool-l"},[e._t("operator")],2),l("div",{staticClass:"tables-tool-r"},[e.hasClear?l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.reset","\u91CD\u7F6E"),placement:"bottom"}},[l("i",{staticClass:"el-icon-brush",on:{click:e.clearAll}})]):e._e(),e.filtering?l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.screen","\u7B5B\u9009"),placement:"bottom"}},[l("el-dropdown",{ref:"filterdropdown",attrs:{trigger:"click",placement:"bottom"},on:{"visible-change":e.changeFilter}},[l("span",{staticClass:"el-dropdown-link"},[l("i",{staticClass:"gd-icons gd-icon-a-guangqi_guolv11x"})]),l("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e._t("filtering",null,{columns:e.columns,height:e.height,colse:e.closeFilter,visible:e.visibleFilter})],2)],1)],1):e._e(),e.disabledRefresh?e._e():l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.refresh","\u5237\u65B0"),placement:"bottom"}},[l("i",{staticClass:"el-icon-refresh",on:{click:function(a){return e.refresh(!1)}}})]),l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.density","\u5BC6\u5EA6"),placement:"bottom"}},[l("el-dropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:e.changColumnHeight}},[l("span",{staticClass:"el-dropdown-link"},[l("i",{staticClass:"el-icon-s-operation"})]),l("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[l("el-dropdown-item",{style:e.customSize==="medium"?e.dropdownActive:"",attrs:{command:"medium"}},[e._v(" "+e._s(e.$i18nt("gd.basics.default","\u9ED8\u8BA4"))+" ")]),l("el-dropdown-item",{style:e.customSize==="small"?e.dropdownActive:"",attrs:{command:"small"}},[e._v(" "+e._s(e.$i18nt("gd.basics.secondary","\u4E2D\u7B49"))+" ")]),l("el-dropdown-item",{style:e.customSize==="mini"?e.dropdownActive:"",attrs:{command:"mini"}},[e._v(" "+e._s(e.$i18nt("gd.basics.compact","\u7D27\u51D1"))+" ")])],1)],1)],1),l("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.columnSettings","\u5217\u8BBE\u7F6E"),placement:"bottom"}},[l("el-dropdown",{attrs:{trigger:"click",placement:"bottom"}},[l("span",{staticClass:"el-dropdown-link"},[l("i",{staticClass:"el-icon-setting"})]),l("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[l("gd-column-settings",{attrs:{columns:e.columns,height:e.height},on:{columnChange:e.columnChange}})],1)],1)],1)],1)]),l("ux-grid",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"refTable",staticClass:"table",staticStyle:{width:"100%"},attrs:{stripe:e.stripe,"row-key":"","expand-row-keys":e.tableExpand,"tree-props":e.tableTree?{children:"children",hasChildren:"isLeaf"}:void 0,"tree-config":e.tableTree?{children:"children",hasChildren:"isLeaf"}:void 0,tooltip:!0,border:e.border,size:e.customSize,indent:e.indent,lazy:e.lazy,"show-summary":e.showSummary,"summary-method":e.summaries,"default-expand-all":e.defaultExpandAll,"virtual-scroll":!0,"element-loading-background":"rgba(255, 255, 255, 0.8)","element-loading-spinner":"el-icon-loading",data:e.tableData,"cell-style":e.cellStyle,height:e.height||null,"max-height":e.maxHeight||null,"default-sort":{prop:"id",order:null},load:e.lazy?e.load:null,"span-method":e.method?e.spanMethod:null,"header-cell-style":e.headerCellStyle,"cell-class-name":e.cellClassNamed,"row-class-name":e.rowClassNamed,"checkbox-config":{checkMethod:e.selecTables}},on:{"sort-change":e.sortChange,"filter-change":e.handleFilterChange,"selection-change":e.handleSelectionChange,"row-click":e.rowClick,"expand-change":e.expandChange,"select-all":e.selectAll,select:e.handleSelect,"current-change":e.handleCurrentRowChange,"header-dragend":e.handleHeaderDragEnd}},[e._l(e.getColumns,function(a,s){return[a.type=="selection"?[l("ux-table-column",{attrs:{"tree-node":"",type:"checkbox",width:a.width,align:a.align?a.align:"center"}})]:a.type=="selection-radio"?[l("ux-table-column",{key:a.key?a.key:s,attrs:{"tree-node":"",width:a.width,label:"",fixed:a.fixed?a.fixed:"left",align:a.align?a.align:"center"},scopedSlots:e._u([{key:"default",fn:function(i){return[l("el-radio",{attrs:{label:i.row[e.rowKey],size:"small",disabled:e.disabledRowId.includes(i.row[e.rowKey])},on:{input:e.changRadio},model:{value:e.currentRow,callback:function(d){e.currentRow=d},expression:"currentRow"}},[e._v(" "+e._s("")+" ")])]}}],null,!0)})]:a.hidden!=!1&&a.type!=="slot"&&a.type!="expand"&&a.type!="selection-radio"?[l("ux-table-column",{attrs:{width:a.width,field:a.prop,label:e.$i18nt(a.transKey,a.label),fixed:a.fixed?a.fixed:"",title:e.$i18nt(a.transKey,a.label)}})]:a.type==="slot"?[l("ux-table-column",{key:a.key?a.key:s,attrs:{width:a.width,"show-header-overflow":typeof a.showTooltip>"u"?!0:a.showTooltip,"min-width":a.minWidth,field:a.prop,title:e.$i18nt(a.transKey,a.label),fixed:a.fixed?a.fixed:"",sortable:a.sortable?a.sortable:!1,align:a.align?a.align:"center","render-header":a.renderHeader,filters:a.filters,"filter-method":a.filterTag,"filter-placement":"bottom-end","reserve-selection":a.reserveSelection,type:a.colType},scopedSlots:e._u([{key:"default",fn:function(i){return[e._t(a.slotType,null,{row:i.row,index:i.$index,column:i.column})]}}],null,!0)})]:e._e()]}),l("template",{slot:"empty"},[l("div",{staticClass:"gd-table-empty"},[l("i",{staticClass:"el-icon-receiving"}),l("div",{staticClass:"empty-title"},[e._v(e._s(e.$i18nt("gd.echarts.noData","\u6682\u65E0\u6570\u636E\u5C55\u793A")))])])])],2),l("div",{staticClass:"gd-paging"},[e.showPagination?l("el-pagination",{attrs:{background:"","page-sizes":e.pageSizes,"page-size":e.pageSized,"current-page":e.currentPage,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"update:currentPage":function(a){e.currentPage=a},"update:current-page":function(a){e.currentPage=a},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}):e._e()],1)],1)},m=[],y=h.normalizeComponent(f,g,m,!1,null,"5815332a",null,null);const c=y.exports;c.install=function(t){t.component(c.name,c)};exports.GDpackage=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const g=require("./utils.util.js.50d1ec9c.js"),f=require("./components.chartbi.e4680eaa.js");const m={name:"GdTableVirtual",props:Object.assign({},{record:{type:Object,default:()=>({})},dataSource:{type:Function,required:!0},size:{type:String,default:"small"},rowKey:{type:[String,Function],default:"id"},amount:{type:Function},load:{type:Function},tableTree:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},border:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},cellStyle:{type:Function},cellClassName:{type:Function},rowClassName:{type:Function},defaultExpandedKeys:{type:Array,default:()=>[]},selectedRowKeys:{type:Array,default:()=>[]},selectedKeep:{type:Boolean,default:!1},height:{type:Number,default:0},maxHeight:{type:Number,default:0},indent:{type:Number,default:16},pageSize:{type:Number,default:10},pageSizes:{type:Array,default:()=>[10,20,30,40,50,100,200,500]},tableExpand:{type:Array,default:()=>[]},defaultExpandAll:{type:Boolean,default:!1},method:{type:Boolean,default:!1},columnKey:{type:String,default:""},showSummary:{type:Boolean,default:!1},headerCellStyle:{type:[Object,Function],default:()=>({})},showPagination:{type:Boolean,default:!0},initialLoading:{type:Boolean,default:!0},filtering:{type:Boolean,default:!1},isGather:{type:Boolean,default:!1},disabledRowId:{type:Array,default:()=>[]},disabledRefresh:{type:Boolean,default:!1},disabledColumnSettings:{type:Boolean,default:!1},stripe:{type:Boolean,default:!0},rowHeight:{type:Number,default:25}}),computed:{getRowHeight(){let t=0;return this.rowHeight+t},fadeColord(){return this.fadeColor(this.primaryColor,.3)},getColumns(){let t=0,e=this.columnsSetting.filter(d=>{const n=d.checked===void 0||d.checked,i=this.columns.filter(c=>c.prop===d.prop)[0],r=i?i.owidth?i.owidth:i.width?i.width:i.minWidth?i.minWidth:"150":"150";return i&&i.width&&!d.width&&(d.width=i.width),i&&i.minWidth&&!d.minWidth&&(d.minWidth=i.minWidth),n&&(t+=Number(r)),n});if(this.wid===0||e.filter(d=>d.width||d.minWidth).length!==e.length)return e;const s=t-this.wid,a=e[e.length-1],o=a?a.width?Number(a.width):a.minWidth?Number(a.minWidth):0:0;if(s<0){const d=e.length===0?0:Math.floor(Math.abs(s)/e.length);e.filter(n=>(n.width&&!["selection","selection-radio"].includes(n.type)&&(n.width=d+Number(n.owidth)),a.prop===n.prop&&delete n.width,n))}else s<o&&(a.minWidth||a.width)&&(a.width=o);return e},selectionType(){const t=this.columns.filter(e=>e.type==="selection"||e.type==="selection-radio")[0];return t?t.type==="selection"?"checkbox":"radio":null},hasClear(){let t=[];for(let e in this.sorter)t.push(e);return t.length},dropdownActive(){return`background-color: ${this.fadeColor(this.primaryColor,.1)};color:${this.primaryColor}`},totalPages(){return Math.ceil(this.total/this.pageSized)},...f.mapGetters(["primaryColor","language","screenWidth","multiTab"])},data(){return{tableData:[],loading:!1,customSize:this.size,keyValue:null,currentRow:"",total:0,sorter:{},state:!1,currentPage:1,pageSized:this.pageSize,columnsSetting:[],visibleFilter:!1,frozenColumn:0,wid:0}},watch:{screenWidth(){this.$nextTick(()=>{this.getWid(),setTimeout(()=>{this.$refs.refTable.doLayout()},0)})},tableExpand:{handler(){const t=this.$refs.refTable,e=this.getChildRens(this.tableData);g.treeToArray(JSON.parse(JSON.stringify(this.tableData)),"children").map(s=>{e.includes(s.id)?t.toggleRowExpansion(s,!1):t.toggleRowExpansion(s,!0)})},deep:!0},tableData:{handler(){this.keyValue=void 0,this.numbers=0},deep:!0},language:{handler(){this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable.doLayout()},0)})},deep:!0},size:{handler(t){this.$nextTick(()=>{setTimeout(()=>{this.customSize=t,this.$refs.refTable.doLayout(),this.getWid()},0)})},deep:!0},"$route.path"(t,e){t!==e&&this.multiTab&&this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable&&this.$refs.refTable.doLayout()},0)})}},methods:{doLayout(){this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable.doLayout()},0)})},getWid(){let t=this.$refs.reftables;this.wid=t?t.clientWidth:this.wid},setTableData(t,e=!1){this.tableData=t,this.loading=e},selecTables(t,e){return!this.disabledRowId.includes(t.id)},changeFilter(t){this.visibleFilter=t},closeFilter(){this.$refs.filterdropdown.doClose()},cellClassNamed({row:t,rowIndex:e}){return this.cellClassName&&typeof this.cellClassName=="function"?this.cellClassName({row:t,rowIndex:e}):""},rowClassNamed({row:t,rowIndex:e}){return this.rowClassName&&typeof this.rowClassName=="function"?this.rowClassName({row:t,rowIndex:e}):""},columnChange(t){this.columns.filter(a=>a.fixed);let e=[...t],l=1;return e.forEach((a,o)=>{e[o].fixed=!1,l<this.frozenColumn&&a.checked&&(e[o].fixed=!0,l++)}),e.filter(a=>["selection","selection-radio"].includes(a.type)?!1:a.checked).length===0&&(e=JSON.parse(JSON.stringify(e))),this.$emit("columnChange",e),this.columnsSetting=e,new Promise((a,o)=>{this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable.doLayout(),a()},0)})})},summaries(t){return this.$nextTick(()=>{setTimeout(()=>{this.$refs.refTable&&this.$refs.refTable.doLayout()},10)}),this.amount(t)},spanMethod({row:t,column:e}){if(e.property===this.columnKey){let l=0,s=0;if(this.keyValue!==t[this.columnKey]){for(;l<this.tableData.length;)this.tableData[l][this.columnKey]===t[this.columnKey]&&s++,l++;this.keyValue=t[this.columnKey]}else s=0;return{rowspan:s,colspan:1}}},handlerClick(t){this.$emit("handlerClick",t)},handleButton(t,e,l){this.$emit("handleButton",{methods:t,row:e})},handleFilterChange(t){this.$emit("handleFilterChange",t)},handleSelectionChange(t){if(!this.loading){const e=this.rowKey||"index";let l=[];t.forEach((s,a)=>{l.push(s[e])}),this.$emit("onChange",l,t);return}this.selectedKeep&&this.$emit("onChange",this.selectedRowKeys,[])},changRadio(t){if(this.loading)return;const e=this.rowKey||"index",l=this.tableData.filter(s=>s[e]===t)[0];this.$emit("onChange",[l[e]],[l])},handleSelect(t,e){this.$emit("handleSelect",t,e)},selectAll(t){this.$emit("selectAll",t)},rowClick(t,e,l){this.$emit("rowClick",t,e)},handleSizeChange(t){this.pageSized=t,this.currentPage>this.totalPages&&(this.currentPage=this.totalPages),this.selectedKeep||this.$emit("onChange",[],[]),this.loadData()},handleCurrentChange(t){this.currentPage=t,this.selectedKeep||this.$emit("onChange",[],[]),this.loadData()},expandChange(t,e){this.$emit("expandChange",{val:t,expanded:e})},getChildRens(t){const e=[];return t.map(l=>{if(this.tableExpand.includes(l.id)||e.push(l.id),Object.prototype.hasOwnProperty.call(l,"children")){const s=this.getChildRens(l.children);e.push(...s)}}),e},handleCurrentRowChange(t){this.$emit("handleCurrentRowChange",t)},handleHeaderDragEnd(){this.$nextTick(()=>{this.$refs.refTable.doLayout()})},changColumnHeight(t){this.customSize=t,this.$nextTick(()=>{this.$refs.refTable.doLayout()})},sortChange({prop:t,order:e}){this.sorter=e?{sortField:t,sortOrder:e.replace("ending","")}:{},this.loadData()},loadData(){if(this.loading)return;this.loading=!0;const t=this.dataSource(Object.assign({...this.sorter},{pageNo:this.currentPage,pageSize:this.pageSized}));(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"?t.then(e=>{let l=e&&e.rows?e.rows:[];this.tableData=l,this.currentPage=e.pageno,this.total=e.totalrows,this.getWid(),this.toggleRowSelection()}):this.loading=!1},loadColumns(){return new Promise(t=>{this.$nextTick(()=>{this.columnsSetting=[...this.columns],this.$emit("columnChange",this.columnsSetting);const e=this.columns.filter(l=>l.fixed);this.frozenColumn=e.length,setTimeout(()=>{this.$refs.columnSettings.init(),this.$refs.refTable.doLayout(),t(!0)},0)})})},setLoadData(t){this.tableData=[...t],this.total=t.length},getLoadData(){return new Promise((t,e)=>{t(this.tableData)})},toggleRowSelectioClear(t){if(!this.selectionType){this.loading=!1;return}this.selectionType==="radio"&&(this.currentRow=t[0]?t[0]:""),this.$nextTick(async()=>{setTimeout(async()=>{const e=this.rowKey||"index";let l=[];const s=(i,r)=>(i=i.filter((c,h)=>(t.includes(c[e])&&l.push(c),c.children&&c.children.length>0&&s(c.children),!0)),i);await s(this.tableData);const a=t.filter(i=>{let r=null;return this.tableData.filter(c=>{if(i===c[e]&&(r=c),c.children&&c.children.length>0){const h=c.children.filter(p=>i===p[e])[0];r=h||r}return!0})[0],!r});let o=[];for(let i=0;i<a.length;i++){let r=new Map;r.set(e,a[i]),o.push(Object.fromEntries(r))}const d=l.concat(o);let n=[];for(let i=0;i<d.length;i++){let r=new Promise((c,h)=>{this.$refs.refTable.toggleRowSelection(d[i],!1),c(i)});n.push(r)}Promise.all(n).then(i=>{this.loading=!1})},10)})},async toggleRowSelection(){if(!this.selectionType){this.loading=!1;return}this.selectionType==="radio"&&(this.currentRow=this.selectedRowKeys[0]?this.selectedRowKeys[0]:""),this.$nextTick(async()=>{setTimeout(async()=>{const t=this.rowKey||"index";let e=[];const l=(n,i)=>(n=n.filter((r,c)=>(this.selectedRowKeys.includes(r[t])&&e.push(r),r.children&&r.children.length>0&&l(r.children),!0)),n);await l(this.tableData);const s=this.selectedRowKeys.filter(n=>!this.tableData.filter(r=>n===r[t])[0]);let a=[];for(let n=0;n<s.length;n++){let i=new Map;i.set(t,s[n]),a.push(Object.fromEntries(i))}const o=e.concat(a);let d=[];for(let n=0;n<o.length;n++){let i=new Promise((r,c)=>{this.$refs.refTable.toggleRowSelection(o[n],!0),r(n)});d.push(i)}Promise.all(d).then(n=>{this.loading=!1})},10)})},refresh(t=!0){!this.selectedKeep&&t&&this.$emit("onChange",[],[]),t&&(this.currentPage=1),this.loadData()},clearAll(){if(this.state||this.loading)return;let t=[];for(let e in this.sorter)t.push(e);t.length!==0&&(this.state=!0,this.sorter={},this.$refs.refTable.clearSort(),this.$refs.refTable.clearFilter(),setTimeout(()=>{this.refresh(),this.state=!1},100))},fadeColor(t,e){let l=parseInt(t.substring(1,3),16),s=parseInt(t.substring(3,5),16),a=parseInt(t.substring(5,7),16);return`rgba(${l},${s},${a},${e})`}},created(){this.columnsSetting=[...this.columns];const t=this.columns.filter(e=>e.fixed);this.frozenColumn=t.length,this.initialLoading&&this.loadData()}};var y=function(){var e=this,l=e._self._c;return l("div",{ref:"reftables",staticClass:"gd-tables",style:{"--theme":e.primaryColor,"--fadecolor":e.fadeColord},attrs:{id:"reftables"}},[l("div",{staticClass:"tables-tool"},[l("div",{staticClass:"tables-tool-l"},[e._t("operator")],2),l("div",{staticClass:"tables-tool-r"},[e.hasClear?l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.reset","\u91CD\u7F6E"),placement:"bottom"}},[l("i",{staticClass:"el-icon-brush",on:{click:e.clearAll}})]):e._e(),e.filtering?l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.screen","\u7B5B\u9009"),placement:"bottom"}},[l("el-popover",{ref:"filterdropdown",attrs:{trigger:"click",placement:"bottom"},on:{show:function(s){return e.changeFilter(!0)},hide:function(s){return e.changeFilter(!1)}}},[l("span",{staticClass:"el-dropdown-link",attrs:{slot:"reference"},slot:"reference"},[l("i",{staticClass:"gd-icons gd-icon-a-guangqi_guolv11x"})]),l("div",[e._t("filtering",null,{columns:e.columns,height:e.height,colse:e.closeFilter,visible:e.visibleFilter})],2)])],1):e._e(),e.isGather?l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.chart","\u56FE\u8868"),placement:"bottom"}},[l("i",{staticClass:"gd-icons gd-icon-zhuzhuangtu",on:{click:function(s){return e.$emit("baseSeecharts")}}})]):e._e(),e.disabledRefresh?e._e():l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.refresh","\u5237\u65B0"),placement:"bottom"}},[l("i",{staticClass:"el-icon-refresh",on:{click:function(s){return e.refresh(!1)}}})]),l("el-tooltip",{directives:[{name:"delTabIndex",rawName:"v-delTabIndex"}],staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.density","\u5BC6\u5EA6"),placement:"bottom"}},[l("el-dropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:e.changColumnHeight}},[l("span",{staticClass:"el-dropdown-link"},[l("i",{staticClass:"el-icon-s-operation"})]),l("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[l("el-dropdown-item",{style:e.customSize==="medium"?e.dropdownActive:"",attrs:{command:"medium"}},[e._v(" "+e._s(e.$i18nt("gd.basics.default","\u9ED8\u8BA4"))+" ")]),l("el-dropdown-item",{style:e.customSize==="small"?e.dropdownActive:"",attrs:{command:"small"}},[e._v(" "+e._s(e.$i18nt("gd.basics.secondary","\u4E2D\u7B49"))+" ")]),l("el-dropdown-item",{style:e.customSize==="mini"?e.dropdownActive:"",attrs:{command:"mini"}},[e._v(" "+e._s(e.$i18nt("gd.basics.compact","\u7D27\u51D1"))+" ")])],1)],1)],1),e.disabledColumnSettings?e._e():l("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$i18nt("gd.basics.columnSettings","\u5217\u8BBE\u7F6E"),placement:"bottom"}},[l("el-dropdown",{attrs:{trigger:"click",placement:"bottom"}},[l("span",{staticClass:"el-dropdown-link"},[l("i",{staticClass:"el-icon-setting"})]),l("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[l("gd-column-settings",{ref:"columnSettings",attrs:{columns:e.columns,height:e.height},on:{columnChange:e.columnChange}})],1)],1)],1)],1)]),l("u-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"refTable",staticClass:"table",class:e.border?"":"table-border",staticStyle:{width:"100%"},attrs:{"row-height":e.getRowHeight,"use-virtual":"",stripe:e.stripe,"row-key":e.rowKey,"expand-row-keys":e.tableExpand,"tree-props":e.tableTree?{children:"children",hasChildren:"isLeaf"}:void 0,tooltip:!0,border:e.border,size:e.customSize,indent:e.indent,lazy:e.lazy,"show-summary":e.showSummary,"summary-method":e.summaries,"default-expand-all":e.defaultExpandAll,"virtual-scroll":!0,"element-loading-background":"rgba(255, 255, 255, 0.8)","element-loading-spinner":"el-icon-loading",data:e.tableData,"cell-style":e.cellStyle,height:e.height||null,"max-height":e.maxHeight||null,"default-sort":{prop:"id",order:null},load:e.lazy?e.load:null,"span-method":e.method?e.spanMethod:null,"header-cell-style":e.headerCellStyle,"cell-class-name":e.cellClassNamed,"row-class-name":e.rowClassNamed},on:{"sort-change":e.sortChange,"filter-change":e.handleFilterChange,"selection-change":e.handleSelectionChange,"row-click":e.rowClick,"expand-change":e.expandChange,"select-all":e.selectAll,select:e.handleSelect,"current-change":e.handleCurrentRowChange,"header-dragend":e.handleHeaderDragEnd}},[e._l(e.getColumns,function(s,a){return[s.type=="selection"?[l("u-table-column",{attrs:{type:"selection",width:s.width,fixed:s.fixed?s.fixed:!1,align:s.align?s.align:"center",selectable:e.selecTables}})]:s.type=="selection-radio"?[l("u-table-column",{key:s.key?s.key:a,attrs:{width:s.width,label:"",fixed:s.fixed?s.fixed:!1,align:s.align?s.align:"center"},scopedSlots:e._u([{key:"default",fn:function(o){return[l("el-radio",{attrs:{label:o.row[e.rowKey],size:"small"},on:{input:e.changRadio},model:{value:e.currentRow,callback:function(d){e.currentRow=d},expression:"currentRow"}},[e._v(" "+e._s("")+" ")])]}}],null,!0)})]:s.hidden!=!1&&s.type!=="slot"&&s.type!="expand"&&s.type!="selection-radio"?[l("u-table-column",{attrs:{width:s.width,prop:s.prop,label:e.$i18nt(s.transKey,s.label),fixed:s.fixed?s.fixed:!1,title:e.$i18nt(s.transKey,s.label)}})]:s.type=="expand"?[l("u-table-column",{key:s.key?s.key:a,attrs:{width:s.width,label:e.$i18nt(s.transKey,s.label),type:"expand"},scopedSlots:e._u([{key:"default",fn:function(o){return[e._t(s.slotType,null,{row:o.row,index:o.$index})]}}],null,!0)})]:s.type==="slot"?[l("u-table-column",{key:s.key?s.key:a,attrs:{width:s.width,"show-overflow-tooltip":typeof s.showTooltip>"u"?!0:s.showTooltip,"min-width":s.minWidth,prop:s.prop,label:e.$i18nt(s.transKey,s.label),fixed:s.fixed?s.fixed:!1,sortable:s.sortable?s.sortable:!1,align:s.align?s.align:"center","render-header":s.renderHeader,filters:s.filters,"filter-method":s.filterTag,"filter-placement":"bottom-end","reserve-selection":s.reserveSelection,type:s.colType},scopedSlots:e._u([{key:"default",fn:function(o){return[e._t(s.slotType,null,{row:o.row,index:o.$index,column:o.column})]}}],null,!0)})]:e._e()]}),l("template",{slot:"empty"},[l("div",{staticClass:"gd-table-empty"},[l("i",{staticClass:"el-icon-receiving"}),l("div",{staticClass:"empty-title"},[e._v(" "+e._s(e.$i18nt("gd.echarts.noData","\u6682\u65E0\u6570\u636E\u5C55\u793A"))+" ")])])])],2),l("div",{staticClass:"gd-paging"},[e.showPagination?l("el-pagination",{attrs:{background:"","page-sizes":e.pageSizes,"page-size":e.pageSized,"current-page":e.currentPage,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"update:currentPage":function(s){e.currentPage=s},"update:current-page":function(s){e.currentPage=s},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}):e._e()],1)],1)},b=[],w=f.normalizeComponent(m,y,b,!1,null,"0b2ba49e",null,null);const u=w.exports;u.install=function(t){t.component(u.name,u)};exports.GDpackage=u;
|