hy-dispatch-ui-v3 0.2.58 → 0.2.60

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.
Files changed (107) hide show
  1. package/dist/tailwind.css +129 -0
  2. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  3. package/es/api/index.mjs +137 -0
  4. package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +365 -0
  5. package/es/bussiness/hyAddDepartmentType/index.mjs +6 -0
  6. package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
  7. package/es/bussiness/index.mjs +1 -1
  8. package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
  9. package/es/components/hyBatchUploadDialog/batchUploadDialog.vue.mjs +45 -36
  10. package/es/components/hyDatePicker/datePicker.vue.mjs +2 -0
  11. package/es/components/hyForm/cpns/formItem.vue.mjs +106 -43
  12. package/es/components/hyForm/cpns/locationSelect.vue.mjs +358 -0
  13. package/es/components/hyForm/form.vue.mjs +83 -31
  14. package/es/components/hyForm/js/index.mjs +12 -5
  15. package/es/components/hyForm/js/useAppForm.mjs +6 -36
  16. package/es/components/hyMap/map.vue.mjs +3 -3
  17. package/es/components/hyRadioGroup/index.mjs +6 -0
  18. package/es/components/hyRadioGroup/radioGroup.vue.mjs +123 -0
  19. package/es/components/hyRadioGroup/style/radioGroup.scss +0 -0
  20. package/es/components/hySearch/cpns/searchItem.vue.mjs +20 -13
  21. package/es/components/hySearch/js/useAppSearch.mjs +3 -33
  22. package/es/components/hyTable/cpns/virtualTable.vue.mjs +9 -1
  23. package/es/components/hyTable/js/index.mjs +6 -3
  24. package/es/components/hyTable/js/search.mjs +1 -0
  25. package/es/components/hyTable/table.vue.mjs +11 -4
  26. package/es/components/hyTableForm/batchTableForm.vue.mjs +5 -2
  27. package/es/components/hyTableForm/tableForm.vue.mjs +6 -0
  28. package/es/components/hyTree/js/index.mjs +69 -53
  29. package/es/components/hyTree/tree.vue.mjs +36 -1
  30. package/es/components/index.mjs +1 -0
  31. package/es/index.mjs +3 -1
  32. package/es/locale/en.mjs +17 -1
  33. package/es/locale/zh_CN.mjs +17 -1
  34. package/es/static/hy-svg-icons/hy-icon-dispatch-share-charu.js +10 -0
  35. package/es/static/hy-svg-icons/hy-icon-dispatch-share-zhongduan.js +8 -0
  36. package/es/static/hy-svg-icons/hy-icon-ops-button-dingweishangchuan.js +9 -0
  37. package/es/static/hy-svg-icons/hy-icon-ops-button-lamp.js +8 -0
  38. package/es/static/hy-svg-icons/hy-icon-ops-button-restart.js +8 -0
  39. package/es/static/hy-svg-icons/hy-icon-ops-button-shutdown.js +8 -0
  40. package/es/static/hy-svg-icons/hy-icon-ops-button-volume.js +8 -0
  41. package/es/static/hy-svg-icons/hy-icon-ops-button-wifi.js +8 -0
  42. package/es/static/hy-svg-icons/hy-icon-ops-button-yujing.js +8 -0
  43. package/es/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
  44. package/es/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
  45. package/es/style/index.scss +53 -0
  46. package/es/style/theme.scss +0 -53
  47. package/es/utils/form.mjs +56 -7
  48. package/es/utils/index.mjs +1 -1
  49. package/es/utils/input.mjs +4 -8
  50. package/es/utils/map/hook/bigMap.mjs +4 -0
  51. package/es/utils/map/hook/gaode.mjs +3 -0
  52. package/es/utils/map/hook/leafletjs.mjs +10 -10
  53. package/es/utils/map/index.mjs +27 -7
  54. package/es/version.mjs +1 -1
  55. package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
  56. package/lib/api/index.js +147 -0
  57. package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +369 -0
  58. package/lib/bussiness/hyAddDepartmentType/index.js +11 -0
  59. package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +31 -0
  60. package/lib/bussiness/index.js +5 -0
  61. package/lib/components/hyBatchUploadDialog/batchUploadDialog.vue.js +44 -35
  62. package/lib/components/hyDatePicker/datePicker.vue.js +2 -0
  63. package/lib/components/hyForm/cpns/formItem.vue.js +111 -48
  64. package/lib/components/hyForm/cpns/locationSelect.vue.js +362 -0
  65. package/lib/components/hyForm/form.vue.js +79 -27
  66. package/lib/components/hyForm/js/index.js +12 -4
  67. package/lib/components/hyForm/js/useAppForm.js +5 -35
  68. package/lib/components/hyMap/map.vue.js +3 -3
  69. package/lib/components/hyRadioGroup/index.js +11 -0
  70. package/lib/components/hyRadioGroup/radioGroup.vue.js +127 -0
  71. package/lib/components/hyRadioGroup/style/radioGroup.scss +0 -0
  72. package/lib/components/hySearch/cpns/searchItem.vue.js +19 -12
  73. package/lib/components/hySearch/js/useAppSearch.js +2 -32
  74. package/lib/components/hyTable/cpns/virtualTable.vue.js +9 -1
  75. package/lib/components/hyTable/js/index.js +6 -3
  76. package/lib/components/hyTable/js/search.js +1 -0
  77. package/lib/components/hyTable/table.vue.js +43 -36
  78. package/lib/components/hyTableForm/batchTableForm.vue.js +5 -2
  79. package/lib/components/hyTableForm/tableForm.vue.js +6 -0
  80. package/lib/components/hyTree/js/index.js +69 -53
  81. package/lib/components/hyTree/tree.vue.js +36 -1
  82. package/lib/components/index.js +14 -12
  83. package/lib/index.js +56 -49
  84. package/lib/locale/en.js +17 -1
  85. package/lib/locale/zh_CN.js +17 -1
  86. package/lib/static/hy-svg-icons/hy-icon-dispatch-share-charu.js +10 -0
  87. package/lib/static/hy-svg-icons/hy-icon-dispatch-share-zhongduan.js +8 -0
  88. package/lib/static/hy-svg-icons/hy-icon-ops-button-dingweishangchuan.js +9 -0
  89. package/lib/static/hy-svg-icons/hy-icon-ops-button-lamp.js +8 -0
  90. package/lib/static/hy-svg-icons/hy-icon-ops-button-restart.js +8 -0
  91. package/lib/static/hy-svg-icons/hy-icon-ops-button-shutdown.js +8 -0
  92. package/lib/static/hy-svg-icons/hy-icon-ops-button-volume.js +8 -0
  93. package/lib/static/hy-svg-icons/hy-icon-ops-button-wifi.js +8 -0
  94. package/lib/static/hy-svg-icons/hy-icon-ops-button-yujing.js +8 -0
  95. package/lib/static/hy-svg-icons/hy-icon-ops-linear-shouqi.js +8 -0
  96. package/lib/static/hy-svg-icons/hy-icon-ops-linear-zhankai.js +8 -0
  97. package/lib/style/index.scss +53 -0
  98. package/lib/style/theme.scss +0 -53
  99. package/lib/utils/form.js +57 -5
  100. package/lib/utils/index.js +3 -0
  101. package/lib/utils/input.js +4 -8
  102. package/lib/utils/map/hook/bigMap.js +4 -0
  103. package/lib/utils/map/hook/gaode.js +3 -0
  104. package/lib/utils/map/hook/leafletjs.js +10 -10
  105. package/lib/utils/map/index.js +26 -6
  106. package/lib/version.js +1 -1
  107. package/package.json +2 -2
@@ -0,0 +1,9 @@
1
+ export default {
2
+ id: 'hy-icon-ops-button-dingweishangchuan',
3
+ symbol: `<symbol id="hy-icon-ops-button-dingweishangchuan" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-button-dingweishangchuan-RButton/dingweishangchuan" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M7.77887592,0.000866018274 C10.9860502,-0.0470985085 13.1668096,1.90398273 14.0835506,4.19686925 C14.6925212,5.71998405 14.6086364,7.85651264 13.9947427,9.29846632 C13.4950255,10.4722579 12.6577718,11.2658512 11.8339909,12.1058733 L9.31804276,14.7019578 L8.43005178,15.6075695 C8.30310332,15.7370344 8.14633617,15.8450706 8.04526445,16 L8.01570855,16 L8.01570855,15.9698213 C7.7336398,15.7784096 7.51353857,15.4576937 7.27570731,15.2151389 C6.76265753,14.6918863 6.24960192,14.1686694 5.73654046,13.6454882 C4.5758363,12.4616786 3.23739379,11.368191 2.3622273,9.90229078 C2.12984469,9.51300311 2.02425287,9.09450101 1.85904117,8.63442727 C1.64237383,8.03104923 1.37666856,6.7794358 1.56295658,5.91759218 L1.77016323,4.83085458 C1.98831976,4.14276184 2.26748023,3.48329423 2.62863335,2.92905931 C3.37471397,1.78385712 4.49494739,0.945281479 5.82531328,0.393296562 C6.23150981,0.224760001 6.70804832,0.166723995 7.15729099,0.0611520356 C7.35218123,0.0154732345 7.62824069,0.0967593574 7.77887592,0.000866018274 Z M7.57166926,2.26487339 C7.47415406,2.32560985 7.31325224,2.29109181 7.18688193,2.32527056 C6.92152706,2.39700306 6.63407973,2.45798551 6.38769881,2.56675391 C5.24801841,3.06991716 4.42691802,3.97152883 3.96054098,5.16285625 C3.85141016,5.44160765 3.8183503,5.76878786 3.75335185,6.06846794 C3.61100349,6.72463195 3.7910019,7.530261 3.96054098,8.00042408 C4.45260204,9.3649488 5.24269239,10.2349889 6.565297,10.7474557 C7.06552229,10.9412781 7.93944487,11.1605114 8.66684938,10.988957 C10.1767056,10.632848 11.3632515,9.85084409 11.9227813,8.54380181 C12.0752035,8.18760359 12.1790784,7.80260166 12.2779777,7.3966889 C12.4871115,6.53839888 12.2290799,5.54601889 11.9819807,4.95153376 C11.2755123,3.25182879 9.96937631,2.25950237 7.57166926,2.26487339 Z" id="hy-icon-ops-button-dingweishangchuan-形状结合" fill-rule="nonzero"></path>
6
+ <path d="M10.8886817,6.44673415 C10.9549834,6.51556351 10.9922364,6.60895442 10.9922364,6.70633892 C10.9922364,6.80372342 10.9549834,6.89711433 10.8886817,6.96594368 L10.3890026,7.48339318 C10.2511545,7.62627658 10.0280183,7.62627658 9.89017032,7.48339318 L8.67734252,6.33321207 L8.67734252,9.22255439 C8.67734252,9.42495811 8.51981655,9.58952113 8.32502637,9.58952113 L7.61870024,9.58952113 C7.42398448,9.58903593 7.26638352,9.42488135 7.26638408,9.22255439 L7.26638408,6.33321207 L6.09430253,7.48251317 C5.9564545,7.62539657 5.73331832,7.62539657 5.59547029,7.48251317 L5.09579113,6.96418365 C5.02948947,6.8953543 4.99223643,6.80196339 4.99223643,6.70457889 C4.99223643,6.60719439 5.02948947,6.51380348 5.09579113,6.44497412 L7.74409067,3.69668368 C7.8819387,3.55380028 8.10507489,3.55380028 8.24292292,3.69668368 L10.8886817,6.44673415 Z" id="hy-icon-ops-button-dingweishangchuan-路径" fill-rule="nonzero"></path>
7
+ </g>
8
+ </symbol>`,
9
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-button-lamp',
3
+ symbol: `<symbol id="hy-icon-ops-button-lamp" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-button-lamp-RButton/lamp" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M5.92883943,14.4379646 C5.48001411,14.437021 5.11640066,14.0679329 5.1154711,13.6123499 L5.1154711,13.1297885 L10.8817119,13.1297885 L10.8817119,13.6123499 C10.8817119,14.0651801 10.5178365,14.4373928 10.0689068,14.4373928 L5.92883943,14.4373928 L5.92883943,14.4379646 Z M6.39354087,15.0646083 L9.60138898,15.0646083 C9.82557222,15.0646083 10.0080731,15.2521441 10.0052889,15.4774157 L10.0052889,15.5871927 C10.0052889,15.8151799 9.82317807,16 9.59857261,16 L6.39354087,16 C6.16893541,16 5.9868567,15.8151799 5.9868567,15.5871927 L5.9868567,15.4774157 C5.9868567,15.2498571 6.16879436,15.0646083 6.39354087,15.0646083 L6.39354087,15.0646083 Z M2,6.08919383 C2,2.72555746 4.6851294,0 7.99887311,0 C11.3098004,0 13.9949298,2.72555746 14,6.08919383 C14.000601,8.31360833 12.8062031,10.3613508 10.8845282,11.4305317 L10.8845282,12.3041738 L5.1154711,12.3041738 L5.1154711,11.4305317 C3.25948172,10.3933676 2,8.39108062 2,6.08919383 L2,6.08919383 Z M8.93858464,2.07786239 C8.88357764,2.03186243 8.8306334,2.04252909 8.78043951,2.10986237 L5.2036091,6.63652571 C5.1596035,6.69252567 5.1541028,6.7431923 5.187107,6.78585893 C5.21186015,6.83119223 5.25036505,6.85252555 5.30880999,6.85252555 L7.63079313,6.85252555 L7.0972252,9.89985664 C7.0752224,9.96652326 7.1027259,10.0125232 7.18317364,10.0331899 C7.19417504,10.0445232 7.21342749,10.0498565 7.23543029,10.0498565 C7.28139828,10.049633 7.32530947,10.0313522 7.35713329,9.9991899 L10.6575535,5.47519323 C10.6686688,5.425774 10.6686688,5.37461257 10.6575535,5.32519334 C10.6334879,5.27986004 10.594983,5.25852672 10.5365381,5.25852672 L8.49096515,5.25852672 L9.02453308,2.21186229 C9.02453308,2.13386235 8.99702958,2.08786239 8.93858464,2.07786239 Z" id="hy-icon-ops-button-lamp-形状" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-button-restart',
3
+ symbol: `<symbol id="hy-icon-ops-button-restart" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-button-restart-RButton/Restart" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M8,16 C3.5816,16 0,12.4184 0,8 C0,3.5816 3.5816,0 8,0 C12.4184,0 16,3.5816 16,8 C16,12.4184 12.4184,16 8,16 Z M11.856,12.0608 C13.9704694,10.049625 14.1860587,6.75179958 12.3514202,4.48245886 C10.5167818,2.21311815 7.24697057,1.73304935 4.83745528,3.37926974 C2.42793998,5.02549012 1.68650073,8.24611105 3.13364176,10.7801964 C4.58078278,13.3142817 7.73135598,14.3122896 10.3736,13.0736 L9.59440001,11.6696 C7.97275039,12.3743998 6.08075213,11.9308558 4.94130202,10.5787671 C3.80185191,9.22667849 3.68532961,7.28688177 4.65473215,5.80811573 C5.62413469,4.32934969 7.44943295,3.66251012 9.14379104,4.16811957 C10.8381491,4.67372902 11.9995135,6.23181165 12,8 L9.59999999,8 L11.856,12.0608 L11.856,12.0608 Z" id="hy-icon-ops-button-restart-形状" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-button-shutdown',
3
+ symbol: `<symbol id="hy-icon-ops-button-shutdown" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-button-shutdown-RButton/Shutdown" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M8,0 C3.57818181,0 0,3.57818181 0,8 C0,12.4218182 3.57818183,16 8,16 C12.4218182,16 16,12.4218182 16,8 C16,3.57818183 12.4218182,0 8,0 Z M7.12727274,3.05454544 C7.12727274,2.57454545 7.52,2.18181818 8,2.18181818 C8.48,2.18181818 8.87272726,2.57454545 8.87272726,3.05454544 L8.87272726,8.21818183 C8.87272726,8.69818182 8.48,9.09090909 8,9.09090909 C7.52,9.09090909 7.12727274,8.69818182 7.12727274,8.21818183 L7.12727274,3.05454544 Z M8,13.4545455 C4.9890909,13.4545455 2.54545455,11.0109091 2.54545455,8 C2.54545455,6.08727273 3.52727274,4.40727273 5.01818182,3.43272726 L5.97090909,4.77090909 C4.90181817,5.44727273 4.18181818,6.64000001 4.18181818,8 C4.18181818,10.1018182 5.89818181,11.8181818 8,11.8181818 C10.1018182,11.8181818 11.8181818,10.1018182 11.8181818,8 C11.8181818,6.64727272 11.1054546,5.45454545 10.0436364,4.77818182 L10.9963636,3.44000001 C12.4727273,4.41454545 13.4545455,6.09454546 13.4545455,8 C13.4545455,11.0109091 11.0109091,13.4545455 8,13.4545455 L8,13.4545455 Z" id="hy-icon-ops-button-shutdown-形状" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-button-volume',
3
+ symbol: `<symbol id="hy-icon-ops-button-volume" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-button-volume-RButton/volume" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M1.77635684e-15,6.22591963 L1.77635684e-15,9.77408037 C1.77635684e-15,10.2639791 0.397958533,10.6611205 0.888865261,10.6611205 L3.55546104,10.6611205 L6.47982776,13.5794827 C6.73412363,13.8353583 7.11827016,13.9122664 7.45178549,13.7740736 C7.78530082,13.6358808 8.00188742,13.3100576 7.9998025,12.9496842 L7.9998025,3.04144539 C8.00188742,2.68107194 7.78530082,2.3552488 7.45178549,2.21705601 C7.11827016,2.07886321 6.73412363,2.15577129 6.47982776,2.41164686 L3.55546104,5.33887945 L0.888865261,5.33887945 C0.397958533,5.33887945 1.77635684e-15,5.73602087 1.77635684e-15,6.22591963 Z M11.9996836,7.99999999 C11.9992999,6.48397432 11.1383777,5.09901723 9.77751788,4.42522808 L9.77751788,11.5659015 C11.1393256,10.8977315 12.001386,9.51438461 11.9996836,7.99999999 L11.9996836,7.99999999 Z M9.7775051,1.30284664 L9.7775051,1.48025468 C9.7846082,1.81659274 9.99564032,2.11494106 10.310837,2.23423882 C12.6738717,3.17681397 14.2235542,5.46041857 14.2235542,8 C14.2235542,10.5395814 12.6738717,12.823186 10.310837,13.7657612 C9.99324482,13.8819566 9.78087678,14.1821936 9.7775051,14.5197453 L9.7775051,14.6971534 C9.7760383,14.9587806 9.90310998,15.2045277 10.1176376,15.3549195 C10.3321652,15.5053113 10.6069197,15.5412592 10.8530448,15.4511375 C13.9518813,14.2739648 16,11.3089469 16,8 C16,4.69105314 13.9518813,1.72603525 10.8530448,0.548862478 C10.6069197,0.458740837 10.3321652,0.494688727 10.1176376,0.645080504 C9.90310998,0.795472281 9.7760383,1.04121942 9.7775051,1.30284664 L9.7775051,1.30284664 Z" id="hy-icon-ops-button-volume-形状" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-button-wifi',
3
+ symbol: `<symbol id="hy-icon-ops-button-wifi" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-button-wifi-RButton/Wifi" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M8.00096269,11.9956339 C8.65566806,11.9956339 9.18639957,12.5562483 9.18639957,13.247817 C9.18639957,13.9393856 8.65566806,14.5 8.00096269,14.5 C7.34625732,14.5 6.81552582,13.9393856 6.81552582,13.247817 C6.81552582,12.5562483 7.34625732,11.9956339 8.00096269,11.9956339 Z M8.00096269,8.41052121 C9.29106335,8.41052121 10.5281858,8.99031569 11.3956603,10.0006257 C11.7600448,10.4249234 11.7293044,11.08004 11.3276234,11.4649576 C11.140518,11.6453096 10.9043432,11.7337748 10.668838,11.7337748 C10.4019072,11.7337748 10.135646,11.6190398 9.94200014,11.3937643 C9.44545061,10.8146771 8.73824983,10.483648 8.00096269,10.483648 C7.25123301,10.483648 6.56234567,10.8049884 6.06123335,11.3889281 C5.69748738,11.8139331 5.07730658,11.8464043 4.67495601,11.4607959 C4.27327506,11.0758947 4.24251908,10.4207616 4.6069191,9.99715487 C5.47177739,8.98891749 6.70889988,8.41052121 8.00096269,8.41052121 Z M8.00093155,4.95527705 C10.0904698,4.95527705 12.0570464,5.81217931 13.5381612,7.36841436 C13.9228368,7.77198567 13.9241449,8.42848403 13.5420855,8.83481885 C13.3504017,9.03729538 13.0978756,9.14026906 12.8460036,9.14026906 C12.5954708,9.14026906 12.3449068,9.03936801 12.1538771,8.83827324 C11.0430332,7.67108461 9.56842783,7.02842026 8.00093155,7.02842026 C6.43018059,7.02842026 4.95492112,7.66971931 3.8460394,8.83412797 C3.46201784,9.23769928 2.84051336,9.23561019 2.45845395,8.8299827 C2.07639454,8.42433876 2.07770265,7.7678404 2.46237826,7.36426909 C3.94089241,5.81079756 5.90810748,4.95527705 8.00093155,4.95527705 Z M8.00097827,1.5 C10.8840832,1.5 13.6173792,2.66026339 15.6977763,4.7658943 C16.0889925,5.1618495 16.1020891,5.81836432 15.7272086,6.23160791 C15.5342168,6.44375673 15.2764583,6.55089213 15.0186842,6.55089213 C14.7746763,6.55089213 14.5299988,6.45484367 14.3396232,6.26273031 C12.6262423,4.5282159 10.3757607,3.5731761 8.00096269,3.5731761 C5.62160186,3.5731761 3.3697966,4.5268177 1.66100966,6.25995035 C1.27043202,6.65590555 0.648943111,6.64279532 0.273424217,6.22953528 C-0.102094676,5.81629168 -0.0890136496,5.15980977 0.301563997,4.76382167 C2.37803678,2.65888164 5.1119713,1.5 8.00097827,1.5 Z" id="hy-icon-ops-button-wifi-形状结合" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-button-yujing',
3
+ symbol: `<symbol id="hy-icon-ops-button-yujing" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-button-yujing-RButton/yujing" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M13.1136364,14.1363636 L14.8181818,14.1363636 C15.1947006,14.1364188 15.4999001,14.4416631 15.4999001,14.8181818 C15.4999001,15.1947006 15.1947006,15.5 14.8181818,15.5 L1.18181819,15.5 C0.805299432,15.5 0.500099938,15.1947006 0.500099938,14.8181818 C0.500099938,14.4416631 0.805299432,14.1364188 1.18181819,14.1363636 L2.88636364,14.1363636 L2.88636364,7.65909091 C2.88636364,4.835 5.17590909,2.54545455 8,2.54545455 C10.8240909,2.54545455 13.1136364,4.835 13.1136364,7.65909091 L13.1136364,14.1363636 Z M8.11528403,10.0372435 L7.16431031,12.3046052 L8.95432222,12.9137729 L10.8734905,8.33855321 L8,8.31270451 L8.95527893,6.01863247 L7.1633536,5.41377291 L5.24849052,10.0122565 L8.11528403,10.0372435 Z M6.63636364,0.5 L9.36363636,0.5 L9.36363636,1.86363636 L6.63636364,1.86363636 L6.63636364,0.5 Z M12.3390909,1.73238636 L14.2676136,3.66090909 L13.3031818,4.62534091 L11.375,2.69681819 L12.3394318,1.73238636 L12.3390909,1.73238636 Z M15.5,6.63636364 L15.5,9.36363636 L14.1363636,9.36363636 L14.1363636,6.63636364 L15.5,6.63636364 Z M0.5,9.36363636 L0.5,6.63636364 L1.86363636,6.63636364 L1.86363636,9.36363636 L0.5,9.36363636 Z M1.73238636,3.66090909 L3.66090909,1.73238636 L4.62534091,2.69681819 L2.69681819,4.625 L1.73238636,3.66090909 Z" id="hy-icon-ops-button-yujing-形状" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-linear-shouqi',
3
+ symbol: `<symbol id="hy-icon-ops-linear-shouqi" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-linear-shouqi-导航/shouqi" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M1,2 C1.55228475,2 2,2.44771525 2,3 L2,13 C2,13.5522847 1.55228475,14 1,14 C0.44771525,14 0,13.5522847 0,13 L0,3 C0,2.44771525 0.44771525,2 1,2 Z M14.9962476,6.99721351 L7.22134415,6.99721351 L7.22134415,6.99721351 L10.3410325,3.80591026 C10.6688751,3.47054177 10.6627742,2.93290294 10.3274057,2.60506033 C10.3232766,2.6010239 10.3191065,2.59702968 10.3148959,2.59307831 C9.96535062,2.26505074 9.41645109,2.28110608 9.08667668,2.62900381 L4.65060824,7.30886388 C4.28556459,7.69396911 4.2848692,8.29714332 4.64902391,8.68308924 L9.01892515,13.3144877 C9.35293318,13.668483 9.91067004,13.6846858 10.2646653,13.3506778 C10.2790116,13.3371414 10.2928995,13.3231273 10.3063053,13.308659 C10.6624129,12.9243285 10.6464065,12.3259543 10.2702613,11.9612115 L7.22134415,9.00471827 L7.22134415,9.00471827 L14.9962476,9.00471827 C15.5506048,9.00471827 16,8.55532302 16,8.00096589 C16,7.44660876 15.5506048,6.99721351 14.9962476,6.99721351 Z" id="hy-icon-ops-linear-shouqi-收起" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -0,0 +1,8 @@
1
+ export default {
2
+ id: 'hy-icon-ops-linear-zhankai',
3
+ symbol: `<symbol id="hy-icon-ops-linear-zhankai" viewBox="0 0 16 16">
4
+ <g id="hy-icon-ops-linear-zhankai-导航/zhankai" stroke="none" stroke-width="1" fill-rule="evenodd">
5
+ <path d="M15,2 C15.5522847,2 16,2.44771525 16,3 L16,13 C16,13.5522847 15.5522847,14 15,14 C14.4477153,14 14,13.5522847 14,13 L14,3 C14,2.44771525 14.4477153,2 15,2 Z M1.00375238,6.99721351 L8.77865585,6.99721351 L8.77865585,6.99721351 L5.65896747,3.80591026 C5.33112486,3.47054177 5.33722579,2.93290294 5.67259429,2.60506033 C5.67672338,2.6010239 5.68089354,2.59702968 5.68510411,2.59307831 C6.03464938,2.26505074 6.58354891,2.28110608 6.91332332,2.62900381 L11.3493918,7.30886388 C11.7144354,7.69396911 11.7151308,8.29714332 11.3509761,8.68308924 L6.98107485,13.3144877 C6.64706682,13.668483 6.08932996,13.6846858 5.73533471,13.3506778 C5.72098837,13.3371414 5.70710053,13.3231273 5.69369467,13.308659 C5.33758707,12.9243285 5.35359349,12.3259543 5.72973868,11.9612115 L8.77865585,9.00471827 L8.77865585,9.00471827 L1.00375238,9.00471827 C0.449395248,9.00471827 0,8.55532302 0,8.00096589 C0,7.44660876 0.449395248,6.99721351 1.00375238,6.99721351 Z" id="hy-icon-ops-linear-zhankai-形状结合" fill-rule="nonzero"></path>
6
+ </g>
7
+ </symbol>`,
8
+ };
@@ -90,3 +90,56 @@ video {
90
90
  -ms-user-select: none; /*IE10*/
91
91
  user-select: none;
92
92
  }
93
+
94
+ .search_lightColor {
95
+ min-width: 254px;
96
+ line-height: 32px;
97
+ background: rgba(var(--hy-background), 1);
98
+ border-radius: 8px;
99
+ padding: 4px;
100
+ display: flex;
101
+ border: 1px solid rgba(var(--hy-border), 1);
102
+ transition: 0.3s;
103
+ position: relative;
104
+ z-index: 1;
105
+ }
106
+
107
+ .search_lightColor:focus,
108
+ .search_lightColor:hover {
109
+ border-color: rgba(var(--hy-theme), 1);
110
+ }
111
+ .search_lightColor .hy-el-input .hy-el-input__wrapper {
112
+ background: rgba(var(--hy-background), 1);
113
+ border-color: rgba(var(--hy-background), 1);
114
+ box-shadow: none;
115
+ padding: 0 26px 0 10px;
116
+ font-size: 12px;
117
+ color: rgba(var(--hy-main), 1);
118
+ }
119
+
120
+ .search_lightColor .hy-el-input .hy-el-input__wrapper:focus,
121
+ .search_lightColor .hy-el-input .hy-el-input__wrapper:hover {
122
+ border-color: rgba(var(--hy-background), 1);
123
+ box-shadow: none;
124
+ }
125
+
126
+ .search_lightColor .searchBox:active {
127
+ opacity: 0.6;
128
+ }
129
+ .search_lightColor .searchBox {
130
+ width: 42px;
131
+ height: 32px;
132
+ background: rgba(var(--hy-background-3), 1);
133
+ border-radius: 8px;
134
+ line-height: 30px;
135
+ text-align: center;
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
139
+ cursor: pointer;
140
+ }
141
+ .search_lightColor .searchBox .svgBox {
142
+ width: 18px;
143
+ height: 18px;
144
+ vertical-align: middle;
145
+ }
@@ -20,59 +20,6 @@
20
20
  --hy-border: 54, 93, 132;
21
21
  }
22
22
 
23
- .search_lightColor {
24
- min-width: 254px;
25
- line-height: 32px;
26
- background: rgba(var(--hy-background), 1);
27
- border-radius: 8px;
28
- padding: 4px;
29
- display: flex;
30
- border: 1px solid rgba(var(--hy-border), 1);
31
- transition: 0.3s;
32
- position: relative;
33
- z-index: 1;
34
- }
35
-
36
- .search_lightColor:focus,
37
- .search_lightColor:hover {
38
- border-color: rgba(var(--hy-theme), 1);
39
- }
40
- .search_lightColor .hy-el-input .hy-el-input__wrapper {
41
- background: rgba(var(--hy-background), 1);
42
- border-color: rgba(var(--hy-background), 1);
43
- box-shadow: none;
44
- padding: 0 26px 0 10px;
45
- font-size: 12px;
46
- color: rgba(var(--hy-main), 1);
47
- }
48
-
49
- .search_lightColor .hy-el-input .hy-el-input__wrapper:focus,
50
- .search_lightColor .hy-el-input .hy-el-input__wrapper:hover {
51
- border-color: rgba(var(--hy-background), 1);
52
- box-shadow: none;
53
- }
54
-
55
- .search_lightColor .searchBox:active {
56
- opacity: 0.6;
57
- }
58
- .search_lightColor .searchBox {
59
- width: 42px;
60
- height: 32px;
61
- background: rgba(var(--hy-background-3), 1);
62
- border-radius: 8px;
63
- line-height: 30px;
64
- text-align: center;
65
- display: flex;
66
- align-items: center;
67
- justify-content: center;
68
- cursor: pointer;
69
- }
70
- .search_lightColor .searchBox .svgBox {
71
- width: 18px;
72
- height: 18px;
73
- vertical-align: middle;
74
- }
75
-
76
23
  .deviceType-sos {
77
24
  font-size: 14px;
78
25
  font-weight: bold;
package/es/utils/form.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { unref } from 'vue';
2
- import { isString, isArray, isObject, isBoolean, isFunction } from './is.mjs';
2
+ import { isString, isArray, isEmpty, isFunction, isObject, isBoolean } from './is.mjs';
3
3
  import { useLocale } from '../hooks/useLocale.mjs';
4
4
 
5
5
  function getValueByProp(model, prop) {
@@ -50,9 +50,10 @@ function clearSpace(value, type = "between") {
50
50
  }
51
51
  return value;
52
52
  }
53
- const genRuleRequiredMsgHandler = (config) => {
53
+ const genRuleRequiredMsgHandler = (column, model) => {
54
54
  const { t } = useLocale();
55
- const { type, prop, label } = config || {};
55
+ const { type, prop } = column || {};
56
+ const label = columnLabelHandler(column, model);
56
57
  if (!prop || !prop?.length) return "";
57
58
  switch (type) {
58
59
  case "input":
@@ -73,16 +74,64 @@ const requiredHandler = (column, model) => {
73
74
  if (isFunction(required)) return required(column, model);
74
75
  return false;
75
76
  };
77
+ const ruleHandler = (column, model) => {
78
+ const rules = unref(column.rules);
79
+ if (isArray(rules)) return [...rules];
80
+ if (isObject(rules)) return [rules];
81
+ if (isFunction(rules)) {
82
+ return ruleHandler({ rules: rules(column, model) }, model);
83
+ }
84
+ return [];
85
+ };
76
86
  const columnRuleHandler = (column, model) => {
77
- let { rules } = column;
78
- rules = isArray(rules) ? [...rules] : isObject(rules) ? [rules] : [];
87
+ const rules = ruleHandler(column, model);
79
88
  if (column.required) {
80
89
  rules.unshift({
81
90
  required: requiredHandler(column, model),
82
- message: genRuleRequiredMsgHandler(column)
91
+ message: genRuleRequiredMsgHandler(column, model)
83
92
  });
84
93
  }
85
94
  return rules;
86
95
  };
96
+ const genColumnDefaultLabel = (column) => {
97
+ if (column.label) return unref(column.label);
98
+ const { t } = useLocale();
99
+ switch (column.type) {
100
+ // 部门级联选择框
101
+ case "org-cascader":
102
+ return t("form.department");
103
+ }
104
+ };
105
+ const columnLabelHandler = (column, model) => {
106
+ const label = unref(column.label);
107
+ if (isEmpty(label)) return "";
108
+ if (isFunction(label)) {
109
+ return label(column, model);
110
+ }
111
+ return label;
112
+ };
113
+ function columnPlaceholderHandler(column, model) {
114
+ const { t } = useLocale();
115
+ const { type, attrs = {} } = column || {};
116
+ const label = columnLabelHandler(column, model);
117
+ let placeholder = attrs.placeholder;
118
+ switch (type) {
119
+ case "input":
120
+ case "input-number":
121
+ case "lat":
122
+ case "lon":
123
+ placeholder = placeholder || t("hy.pleaseEnterPlaceholder", [label]);
124
+ break;
125
+ case "select":
126
+ case "date-picker":
127
+ case "time-picker":
128
+ case "org-cascader":
129
+ placeholder = placeholder || t("hy.pleaseSelectPlaceholder", [label]);
130
+ break;
131
+ default:
132
+ placeholder = placeholder || label;
133
+ }
134
+ return placeholder;
135
+ }
87
136
 
88
- export { clearSpace, columnRuleHandler, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp };
137
+ export { clearSpace, columnLabelHandler, columnPlaceholderHandler, columnRuleHandler, genColumnDefaultLabel, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp };
@@ -4,7 +4,7 @@ export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isOb
4
4
  export { cloneDeep, copyText, createUniqueId, funRunHandler, mergeDeep, withInstall } from './handler.mjs';
5
5
  export { formatDuration, getDefaultValueFormatByType } from './date.mjs';
6
6
  export { blobToDataURL, fileFormUpload, fileJsonUplaod, fileUpload, presignedUrl, sizeToTextHandler } from './file.mjs';
7
- export { clearSpace, columnRuleHandler, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './form.mjs';
7
+ export { clearSpace, columnLabelHandler, columnPlaceholderHandler, columnRuleHandler, genColumnDefaultLabel, genRuleRequiredMsgHandler, genValueByProp, getValueByProp, setValueByProp } from './form.mjs';
8
8
  export { enterNumbersRrLetters, enterTheMumber, filterSpaces, formatNumber, formatTimeFn, getPublicFileSize, inputForbidden, keepTwoDecimalPlaces, onlyNumber } from './input.mjs';
9
9
  export { PERMISSION } from './permission.mjs';
10
10
  export { InitMap, setMapServer, setPoiServer } from './map/index.mjs';
@@ -57,14 +57,10 @@ function keepTwoDecimalPlaces(value) {
57
57
  return num.toString();
58
58
  }
59
59
  function filterSpaces(row, name) {
60
- if (typeof row === "string") {
61
- this[row] = this[row].toString().replace(/[`\s]/g, "");
62
- } else {
63
- if (row[name] && row[name].length !== 0 && row[name] !== null) {
64
- row[name] += "";
65
- row[name] = row[name].replace(/[` ]/g, "");
66
- row[name] = row[name].replace(/\s/g, "");
67
- }
60
+ if (row[name] && row[name].length !== 0 && row[name] !== null) {
61
+ row[name] += "";
62
+ row[name] = row[name].replace(/[` ]/g, "");
63
+ row[name] = row[name].replace(/\s/g, "");
68
64
  }
69
65
  }
70
66
  function inputForbidden(row, name, content) {
@@ -264,6 +264,10 @@ class bigMap extends EventEmitter {
264
264
  const center2 = target.getCenter();
265
265
  return latAndLngCheckExport(center2);
266
266
  },
267
+ // 自适应地图容器大小
268
+ invalidateSize: function(target) {
269
+ return target.invalidateSize();
270
+ },
267
271
  // 四个角
268
272
  getBounds: function(target) {
269
273
  const bounds = target.getBounds();
@@ -166,6 +166,9 @@ class Google extends EventEmitter {
166
166
  getCenter: function(target) {
167
167
  return target.getCenter();
168
168
  },
169
+ invalidateSize: function(target) {
170
+ return null;
171
+ },
169
172
  fitBounds: function(target, params) {
170
173
  if (!Array.isArray(params)) {
171
174
  params = [params];
@@ -345,6 +345,10 @@ class Leafletjs extends EventEmitter {
345
345
  const { lng: lng2, lat: lat2 } = latAndLngCheckExport(center2);
346
346
  return L.latLng(lat2, lng2);
347
347
  },
348
+ // 自适应地图容器大小
349
+ invalidateSize: function(target) {
350
+ return target.invalidateSize();
351
+ },
348
352
  // 四个角
349
353
  getBounds: function(target) {
350
354
  const bounds = target.getBounds();
@@ -403,24 +407,20 @@ class Leafletjs extends EventEmitter {
403
407
  return map;
404
408
  }
405
409
  // 设置地图瓦片地址
406
- setLayersUrl(map) {
410
+ setLayersUrl(map, changeColorType = true) {
407
411
  const layersUrlList = this.initParams.layersUrlList || [];
408
412
  const layersIndex = this.initParams.layersIndex || 0;
409
- const layersOption = layersUrlList[layersIndex];
410
- if (!layersOption) {
413
+ const layersUrls = layersUrlList[layersIndex];
414
+ if (!layersUrls) {
411
415
  return;
412
416
  }
413
417
  const { mapServerType } = this.initParams;
414
418
  if (mapServerType === "WMTS" || mapServerType === "Dynamic") {
415
- return this.createLayers(map, layersOption);
419
+ return this.createLayers(map, layersUrls);
416
420
  }
417
- const { layersUrls = "", filter, key } = layersOption;
418
421
  layersUrls.split(",").forEach((layersUrl) => {
419
- if (layersUrl.indexOf("{mapKey}") !== -1) {
420
- layersUrl = layersUrl.replace("{mapKey}", key);
421
- }
422
- if (filter) {
423
- this.createCustomLayers(map, layersUrl, { filter });
422
+ if (changeColorType) {
423
+ this.createCustomLayers(map, layersUrl);
424
424
  } else {
425
425
  this.createLayers(map, layersUrl);
426
426
  }
@@ -2,7 +2,8 @@ import Google from './hook/gaode.mjs';
2
2
  import Leafletjs from './hook/leafletjs.mjs';
3
3
  import bigMap from './hook/bigMap.mjs';
4
4
  import { EventEmitter } from 'events';
5
- import hyCommon from 'hy-common';
5
+ import hyCommon, { Common } from 'hy-common';
6
+ import { useApi } from '../../hooks/useApi.mjs';
6
7
 
7
8
  const scriptPromises = new globalThis.Map();
8
9
  const mapServerPromises = new globalThis.Map();
@@ -51,17 +52,17 @@ function setMapServer(mapType, mapConfig = {}) {
51
52
  if (mapType === "gaode" && window.AMap?.Map) {
52
53
  return Promise.resolve();
53
54
  }
54
- if (mapType === "bigMap" && window.BM) {
55
+ if (mapType === "bigmap" && window.BM) {
55
56
  return Promise.resolve();
56
57
  }
57
- if (mapType !== "gaode" && mapType !== "bigMap") {
58
+ if (mapType !== "gaode" && mapType !== "bigmap") {
58
59
  return Promise.resolve();
59
60
  }
60
61
  if (mapServerPromises.has(mapType)) {
61
62
  return mapServerPromises.get(mapType);
62
63
  }
63
64
  const promise = (async () => {
64
- if (mapType === "bigMap") {
65
+ if (mapType === "bigmap") {
65
66
  const staticBaseUrl = mapConfig.staticBaseUrl;
66
67
  await loadScript(staticUrl("bigemap.js", staticBaseUrl));
67
68
  await Promise.all([
@@ -106,6 +107,8 @@ function setPoiServer(mapConfig) {
106
107
  projectCoordinate: data.projectPoiCoordinate,
107
108
  mapSk: data.mapSk
108
109
  };
110
+ const { api } = useApi();
111
+ Common.setAxios(api.value);
109
112
  return new hyCommon.Map({
110
113
  poiServer
111
114
  });
@@ -163,6 +166,22 @@ class InitMap extends EventEmitter {
163
166
  }
164
167
  // 初始化地图
165
168
  NewMap(params = {}) {
169
+ const leftletjsObj = {};
170
+ if (params.mapType === "leafletjs") {
171
+ const { layersServer, layersUrl, mapKey, mapServerType } = params;
172
+ if (layersUrl && mapServerType !== "WMTS") {
173
+ const layersUrlList = (layersUrl || "").split(",").filter(Boolean);
174
+ leftletjsObj.layersUrlList = layersUrlList.map((url) => {
175
+ const index = url.indexOf("{mapKey}");
176
+ if (index !== -1) {
177
+ return url.replace("{mapKey}", mapKey);
178
+ }
179
+ return url;
180
+ });
181
+ } else {
182
+ leftletjsObj.layersUrlList = params.mapServerList;
183
+ }
184
+ }
166
185
  params = {
167
186
  mapType: "gaode",
168
187
  // 地图类型
@@ -181,13 +200,14 @@ class InitMap extends EventEmitter {
181
200
  // 地图瓦片地址
182
201
  zoomOffset: params.zoomOffset || 0,
183
202
  // 缩放偏移量
184
- ...params
203
+ ...params,
204
+ ...leftletjsObj
185
205
  };
186
206
  if (params.mapType === "gaode") {
187
207
  this.map = new Google(params);
188
- } else if (params.mapType === "leaflet") {
208
+ } else if (params.mapType === "leafletjs") {
189
209
  this.map = new Leafletjs(params);
190
- } else if (params.mapType === "bigMap") {
210
+ } else if (params.mapType === "bigmap") {
191
211
  this.map = new bigMap(params);
192
212
  }
193
213
  }
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "0.2.57";
1
+ const version = "0.2.59";
2
2
 
3
3
  export { version };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _export_sfc = (sfc, props) => {
6
+ const target = sfc.__vccOpts || sfc;
7
+ for (const [key, val] of props) {
8
+ target[key] = val;
9
+ }
10
+ return target;
11
+ };
12
+
13
+ exports.default = _export_sfc;
@@ -0,0 +1,147 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var useLocale = require('../hooks/useLocale.js');
5
+ var useApi = require('../hooks/useApi.js');
6
+
7
+ const { t } = useLocale.useLocale();
8
+ function selectApi(controller, params) {
9
+ return new Promise((resolve, reject) => {
10
+ const { api } = useApi.useApi();
11
+ const http = vue.unref(api);
12
+ if (!params) {
13
+ return reject(new Error(t("iDNotPassed")));
14
+ }
15
+ http.post(controller + "/select", {
16
+ id: params !== -1 ? params : null
17
+ }).then((res) => {
18
+ resolve(res);
19
+ }).catch((res) => {
20
+ reject(new Error(t("interfaceError")));
21
+ });
22
+ });
23
+ }
24
+ function detailApi(controller, params) {
25
+ return new Promise((resolve, reject) => {
26
+ const { api } = useApi.useApi();
27
+ const http = vue.unref(api);
28
+ if (!params) {
29
+ return reject(new Error(t("iDNotPassed")));
30
+ }
31
+ http.post(controller + "/detail", { id: params }).then((res) => {
32
+ resolve(res);
33
+ }).catch((res) => {
34
+ reject(new Error(t("interfaceError")));
35
+ });
36
+ });
37
+ }
38
+ function insertFnApi(controller, params) {
39
+ for (const obj in params) {
40
+ if (obj.indexOf("createDtm") > -1 || obj.indexOf("updateDtm") > -1) {
41
+ delete params[obj];
42
+ } else if (params[obj] === null) {
43
+ delete params[obj];
44
+ }
45
+ }
46
+ const url = controller + "/insert";
47
+ return new Promise((resolve, reject) => {
48
+ const { api } = useApi.useApi();
49
+ const http = vue.unref(api);
50
+ http.post(url, params, { isJSON: true }).then((res) => {
51
+ return resolve(res);
52
+ });
53
+ });
54
+ }
55
+ function saveFnApi(controller, params, options) {
56
+ for (const obj in params) {
57
+ if (obj.indexOf("createDtm") > -1 || obj.indexOf("updateDtm") > -1) {
58
+ delete params[obj];
59
+ } else if (params[obj] === null) {
60
+ delete params[obj];
61
+ }
62
+ }
63
+ const url = controller + "/save";
64
+ return new Promise((resolve, reject) => {
65
+ const { api } = useApi.useApi();
66
+ const http = vue.unref(api);
67
+ http.post(url, params, { isJSON: true, ...options }).then((res) => {
68
+ return resolve(res);
69
+ }).catch((res) => {
70
+ reject(res);
71
+ });
72
+ });
73
+ }
74
+ function saveApi(controller, params) {
75
+ for (const obj in params) {
76
+ if (obj.indexOf("createDtm") > -1 || obj.indexOf("updateDtm") > -1) {
77
+ delete params[obj];
78
+ } else if (params[obj] === null) {
79
+ delete params[obj];
80
+ }
81
+ }
82
+ let url = "";
83
+ if (params.id) {
84
+ url = controller + "/update";
85
+ } else {
86
+ url = controller + "/insert";
87
+ }
88
+ return new Promise((resolve, reject) => {
89
+ const { api } = useApi.useApi();
90
+ const http = vue.unref(api);
91
+ http.post(url, params, { isJSON: true }).then((res) => {
92
+ return resolve(res);
93
+ });
94
+ });
95
+ }
96
+ function findAllApi(controller, params) {
97
+ return new Promise((resolve, reject) => {
98
+ const { api } = useApi.useApi();
99
+ const http = vue.unref(api);
100
+ http.post(controller + "/findAll", params).then((res) => {
101
+ resolve(res);
102
+ });
103
+ });
104
+ }
105
+ function pageApi(controller, params, isJsonData) {
106
+ return new Promise((resolve, reject) => {
107
+ const { api } = useApi.useApi();
108
+ const http = vue.unref(api);
109
+ http.post(controller + "/page", params, { isJSON: isJsonData }).then((res) => {
110
+ resolve(res);
111
+ });
112
+ });
113
+ }
114
+ function deleteBatchApi(controller, ids) {
115
+ return new Promise((resolve, reject) => {
116
+ const { api } = useApi.useApi();
117
+ const http = vue.unref(api);
118
+ if (!ids) {
119
+ return reject(new Error(t("iDNotPassed")));
120
+ }
121
+ http.post(controller + "/deleteBatch", { ids }).then((res) => {
122
+ resolve(res);
123
+ });
124
+ });
125
+ }
126
+ function displayChangeApi(controller, ids, display) {
127
+ return new Promise((resolve) => {
128
+ const { api } = useApi.useApi();
129
+ const http = vue.unref(api);
130
+ http.post(controller + "/displayChange", {
131
+ ids: ids.toString(),
132
+ display
133
+ }).then(() => {
134
+ resolve();
135
+ });
136
+ });
137
+ }
138
+
139
+ exports.deleteBatchApi = deleteBatchApi;
140
+ exports.detailApi = detailApi;
141
+ exports.displayChangeApi = displayChangeApi;
142
+ exports.findAllApi = findAllApi;
143
+ exports.insertFnApi = insertFnApi;
144
+ exports.pageApi = pageApi;
145
+ exports.saveApi = saveApi;
146
+ exports.saveFnApi = saveFnApi;
147
+ exports.selectApi = selectApi;