hy-dispatch-ui-v3 0.2.67 → 0.2.68

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 (280) hide show
  1. package/dist/tailwind.css +232 -20
  2. package/es/api/device.mjs +2 -3
  3. package/es/api/exportExcel.mjs +57 -0
  4. package/es/api/index.mjs +27 -16
  5. package/es/api/mapRail.mjs +31 -0
  6. package/es/api/organization.mjs +17 -9
  7. package/es/api/rule.mjs +30 -0
  8. package/es/api/sypct.mjs +2 -3
  9. package/es/api/task.mjs +2 -3
  10. package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +18 -19
  11. package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
  12. package/es/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.mjs +511 -0
  13. package/es/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.mjs +169 -0
  14. package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.mjs +318 -0
  15. package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.mjs +123 -0
  16. package/es/bussiness/hyElectronicFence/electronicFence.vue.mjs +358 -0
  17. package/es/bussiness/hyElectronicFence/index.mjs +13 -0
  18. package/es/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
  19. package/es/bussiness/hyMapAearchPlace/js/index.mjs +1 -1
  20. package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +4 -6
  21. package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
  22. package/es/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.mjs +270 -0
  23. package/es/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.mjs +251 -0
  24. package/es/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.mjs +251 -0
  25. package/es/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.mjs +395 -0
  26. package/es/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.mjs +651 -0
  27. package/es/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.mjs +357 -0
  28. package/es/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.mjs +261 -0
  29. package/es/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.mjs +360 -0
  30. package/es/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.mjs +240 -0
  31. package/es/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.mjs +258 -0
  32. package/es/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.mjs +240 -0
  33. package/es/bussiness/hyRuleSetting/index.mjs +15 -0
  34. package/es/bussiness/hyRuleSetting/js/ruleSetting.mjs +65 -0
  35. package/es/bussiness/hyRuleSetting/ruleSetting.vue.mjs +129 -0
  36. package/es/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
  37. package/es/bussiness/index.mjs +2 -0
  38. package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -13
  39. package/es/components/hyAudioPlayer/js/index.mjs +9 -14
  40. package/es/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
  41. package/es/components/hyButton/button.vue.mjs +2 -2
  42. package/es/components/hyButton/style/button.scss +48 -74
  43. package/es/components/hyCheckboxGroup/checkboxGroup.vue.mjs +119 -0
  44. package/es/components/hyCheckboxGroup/index.mjs +7 -0
  45. package/es/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
  46. package/es/components/hyConfigProvider/configProvider.vue.mjs +51 -38
  47. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +57 -62
  48. package/es/components/hyConfirmDialog/confirmMethod.mjs +24 -22
  49. package/es/components/hyCutter/cutter.vue.mjs +9 -23
  50. package/es/components/hyDatePicker/datePicker.vue.mjs +12 -17
  51. package/es/components/hyDialog/dialog.vue.mjs +5 -9
  52. package/es/components/hyDialog/style/dialog.scss +12 -13
  53. package/es/components/hyDrawer/drawer.vue.mjs +100 -0
  54. package/es/components/hyDrawer/index.mjs +7 -0
  55. package/es/components/hyDrawer/style/drawer.scss +0 -0
  56. package/es/components/hyForm/cpns/arrayItem.vue.mjs +10 -28
  57. package/es/components/hyForm/cpns/arrayItem2.vue.mjs +198 -0
  58. package/es/components/hyForm/cpns/extraItem.vue.mjs +2 -3
  59. package/es/components/hyForm/cpns/formItem.vue.mjs +65 -35
  60. package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
  61. package/es/components/hyForm/form.vue.mjs +56 -24
  62. package/es/components/hyForm/js/index.mjs +4 -8
  63. package/es/components/hyForm/js/useAppForm.mjs +4 -9
  64. package/es/components/hyForm/style/form.scss +4 -13
  65. package/es/components/hyIcon/icon.vue.mjs +3 -3
  66. package/es/components/hyIconBox/style/iconBox.scss +2 -6
  67. package/es/components/hyInput/inputSearch.vue.mjs +8 -11
  68. package/es/components/hyInput/style/inputSearch.scss +3 -0
  69. package/es/components/hyLoading/index.mjs +3 -5
  70. package/es/components/hyMap/js/index.mjs +29 -4
  71. package/es/components/hyMap/map.vue.mjs +17 -3
  72. package/es/components/hyMenu/style/menu.scss +5 -15
  73. package/es/components/hyNoPermissions/noPermissions.vue.mjs +3 -4
  74. package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +3 -6
  75. package/es/components/hyOrgCascader/js/index.mjs +1 -5
  76. package/es/components/hyOrgCascader/orgCascader.vue.mjs +25 -11
  77. package/es/components/hyOrgCascader/style/orgCascader.scss +7 -0
  78. package/es/components/hyRadioGroup/radioGroup.vue.mjs +48 -41
  79. package/es/components/hyRadioGroup/style/radioGroup.scss +9 -0
  80. package/es/components/hySearch/cpns/searchItem.vue.mjs +33 -20
  81. package/es/components/hySearch/js/index.mjs +1 -4
  82. package/es/components/hySearch/js/useAppSearch.mjs +5 -10
  83. package/es/components/hySearch/search.vue.mjs +9 -16
  84. package/es/components/hySearch/style/search.scss +2 -0
  85. package/es/components/hyStatus/index.mjs +7 -0
  86. package/es/components/hyStatus/status.vue.mjs +110 -0
  87. package/es/components/hyStatus/style/status.scss +0 -0
  88. package/es/components/hyTable/cpns/columnSelect.vue.mjs +24 -28
  89. package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +8 -9
  90. package/es/components/hyTable/cpns/headerItem.vue.mjs +2 -2
  91. package/es/components/hyTable/cpns/virtualTable.vue.mjs +18 -28
  92. package/es/components/hyTable/js/index.mjs +56 -59
  93. package/es/components/hyTable/js/useAppTable.mjs +3 -4
  94. package/es/components/hyTable/style/table.scss +8 -0
  95. package/es/components/hyTable/table.vue.mjs +35 -41
  96. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +4 -4
  97. package/es/components/hyTableForm/batchTableForm.vue.mjs +3 -7
  98. package/es/components/hyTableForm/js/index.mjs +2 -8
  99. package/es/components/hyTableForm/js/useAppTableForm.mjs +2 -7
  100. package/es/components/hyTableForm/style/batchTableForm.scss +26 -54
  101. package/es/components/hyTableForm/style/tableForm.scss +3 -2
  102. package/es/components/hyTableForm/tableForm.vue.mjs +90 -46
  103. package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
  104. package/es/components/hyTree/js/index.mjs +13 -40
  105. package/es/components/hyTree/style/index.css +1 -1
  106. package/es/components/hyTree/tree.vue.mjs +17 -16
  107. package/es/components/hyUserAvatar/userAvatar.vue.mjs +3 -6
  108. package/es/components/hyVideoPlayer/js/index.mjs +14 -23
  109. package/es/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
  110. package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +16 -26
  111. package/es/components/index.mjs +3 -0
  112. package/es/hooks/index.mjs +6 -2
  113. package/es/hooks/useAudioPlayerConfig.mjs +1 -3
  114. package/es/hooks/useBaseMainStore.mjs +29 -0
  115. package/es/hooks/useCurrentBus.mjs +20 -0
  116. package/es/hooks/useDialog.mjs +327 -0
  117. package/es/hooks/useExportFile.mjs +133 -0
  118. package/es/hooks/useGlobalConfig.mjs +10 -6
  119. package/es/hooks/useLocale.mjs +22 -12
  120. package/es/hooks/usePermissionMap.mjs +1 -3
  121. package/es/hooks/useResizeHandler.mjs +1 -4
  122. package/es/hooks/useResizeObserver.mjs +3 -1
  123. package/es/hooks/useSubscribe.mjs +2 -2
  124. package/es/hooks/useUserAvatarMap.mjs +1 -3
  125. package/es/hooks/useVideoPlayerConfig.mjs +1 -3
  126. package/es/index.mjs +11 -2
  127. package/es/locale/{en.mjs → en_US.mjs} +79 -4
  128. package/es/locale/index.mjs +2 -2
  129. package/es/locale/zh_CN.mjs +79 -2
  130. package/es/style/tailwind.scss +7 -3
  131. package/es/utils/adaptive.mjs +1 -3
  132. package/es/utils/form.mjs +7 -10
  133. package/es/utils/handler.mjs +4 -8
  134. package/es/utils/input.mjs +8 -9
  135. package/es/utils/map/hook/bigMap.mjs +14 -53
  136. package/es/utils/map/hook/gaode.mjs +5 -20
  137. package/es/utils/map/hook/leafletjs.mjs +23 -79
  138. package/es/utils/map/index.mjs +2 -8
  139. package/es/utils/map/js/webgis.mjs +12 -12
  140. package/es/version.mjs +1 -1
  141. package/lib/api/device.js +2 -3
  142. package/lib/api/exportExcel.js +62 -0
  143. package/lib/api/index.js +27 -16
  144. package/lib/api/mapRail.js +34 -0
  145. package/lib/api/organization.js +17 -8
  146. package/lib/api/rule.js +33 -0
  147. package/lib/api/sypct.js +2 -3
  148. package/lib/api/task.js +2 -3
  149. package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +17 -18
  150. package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
  151. package/lib/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.js +515 -0
  152. package/lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.js +173 -0
  153. package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.js +322 -0
  154. package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.js +127 -0
  155. package/lib/bussiness/hyElectronicFence/electronicFence.vue.js +362 -0
  156. package/lib/bussiness/hyElectronicFence/index.js +21 -0
  157. package/lib/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
  158. package/lib/bussiness/hyMapAearchPlace/js/index.js +1 -1
  159. package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +4 -6
  160. package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
  161. package/lib/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.js +274 -0
  162. package/lib/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.js +255 -0
  163. package/lib/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.js +255 -0
  164. package/lib/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.js +399 -0
  165. package/lib/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.js +655 -0
  166. package/lib/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.js +361 -0
  167. package/lib/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.js +265 -0
  168. package/lib/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.js +364 -0
  169. package/lib/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.js +244 -0
  170. package/lib/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.js +262 -0
  171. package/lib/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.js +244 -0
  172. package/lib/bussiness/hyRuleSetting/index.js +24 -0
  173. package/lib/bussiness/hyRuleSetting/js/ruleSetting.js +68 -0
  174. package/lib/bussiness/hyRuleSetting/ruleSetting.vue.js +133 -0
  175. package/lib/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
  176. package/lib/bussiness/index.js +21 -10
  177. package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -13
  178. package/lib/components/hyAudioPlayer/js/index.js +9 -14
  179. package/lib/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
  180. package/lib/components/hyButton/button.vue.js +2 -2
  181. package/lib/components/hyButton/style/button.scss +48 -74
  182. package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +123 -0
  183. package/lib/components/hyCheckboxGroup/index.js +12 -0
  184. package/lib/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
  185. package/lib/components/hyConfigProvider/configProvider.vue.js +50 -56
  186. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +56 -61
  187. package/lib/components/hyConfirmDialog/confirmMethod.js +23 -21
  188. package/lib/components/hyCutter/cutter.vue.js +8 -22
  189. package/lib/components/hyDatePicker/datePicker.vue.js +11 -16
  190. package/lib/components/hyDialog/dialog.vue.js +5 -9
  191. package/lib/components/hyDialog/style/dialog.scss +12 -13
  192. package/lib/components/hyDrawer/drawer.vue.js +104 -0
  193. package/lib/components/hyDrawer/index.js +12 -0
  194. package/lib/components/hyDrawer/style/drawer.scss +0 -0
  195. package/lib/components/hyForm/cpns/arrayItem.vue.js +9 -27
  196. package/lib/components/hyForm/cpns/arrayItem2.vue.js +202 -0
  197. package/lib/components/hyForm/cpns/extraItem.vue.js +2 -3
  198. package/lib/components/hyForm/cpns/formItem.vue.js +66 -36
  199. package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
  200. package/lib/components/hyForm/form.vue.js +51 -19
  201. package/lib/components/hyForm/js/index.js +3 -7
  202. package/lib/components/hyForm/js/useAppForm.js +4 -9
  203. package/lib/components/hyForm/style/form.scss +4 -13
  204. package/lib/components/hyIcon/icon.vue.js +3 -3
  205. package/lib/components/hyIconBox/style/iconBox.scss +2 -6
  206. package/lib/components/hyInput/inputSearch.vue.js +7 -10
  207. package/lib/components/hyInput/style/inputSearch.scss +3 -0
  208. package/lib/components/hyLoading/index.js +2 -4
  209. package/lib/components/hyMap/js/index.js +29 -4
  210. package/lib/components/hyMap/map.vue.js +17 -3
  211. package/lib/components/hyMenu/style/menu.scss +5 -15
  212. package/lib/components/hyNoPermissions/noPermissions.vue.js +3 -4
  213. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +3 -6
  214. package/lib/components/hyOrgCascader/js/index.js +1 -5
  215. package/lib/components/hyOrgCascader/orgCascader.vue.js +23 -9
  216. package/lib/components/hyOrgCascader/style/orgCascader.scss +7 -0
  217. package/lib/components/hyRadioGroup/radioGroup.vue.js +47 -40
  218. package/lib/components/hyRadioGroup/style/radioGroup.scss +9 -0
  219. package/lib/components/hySearch/cpns/searchItem.vue.js +33 -20
  220. package/lib/components/hySearch/js/index.js +1 -4
  221. package/lib/components/hySearch/js/useAppSearch.js +5 -10
  222. package/lib/components/hySearch/search.vue.js +9 -16
  223. package/lib/components/hySearch/style/search.scss +2 -0
  224. package/lib/components/hyStatus/index.js +12 -0
  225. package/lib/components/hyStatus/status.vue.js +114 -0
  226. package/lib/components/hyStatus/style/status.scss +0 -0
  227. package/lib/components/hyTable/cpns/columnSelect.vue.js +22 -26
  228. package/lib/components/hyTable/cpns/columnSelectItem.vue.js +7 -8
  229. package/lib/components/hyTable/cpns/headerItem.vue.js +2 -2
  230. package/lib/components/hyTable/cpns/virtualTable.vue.js +17 -27
  231. package/lib/components/hyTable/js/index.js +54 -57
  232. package/lib/components/hyTable/js/useAppTable.js +2 -3
  233. package/lib/components/hyTable/style/table.scss +8 -0
  234. package/lib/components/hyTable/table.vue.js +35 -41
  235. package/lib/components/hyTableActionButton/tableActionButton.vue.js +4 -4
  236. package/lib/components/hyTableForm/batchTableForm.vue.js +3 -7
  237. package/lib/components/hyTableForm/js/index.js +2 -8
  238. package/lib/components/hyTableForm/js/useAppTableForm.js +2 -7
  239. package/lib/components/hyTableForm/style/batchTableForm.scss +26 -54
  240. package/lib/components/hyTableForm/style/tableForm.scss +3 -2
  241. package/lib/components/hyTableForm/tableForm.vue.js +89 -45
  242. package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
  243. package/lib/components/hyTree/js/index.js +13 -40
  244. package/lib/components/hyTree/style/index.css +1 -1
  245. package/lib/components/hyTree/tree.vue.js +17 -16
  246. package/lib/components/hyUserAvatar/userAvatar.vue.js +3 -6
  247. package/lib/components/hyVideoPlayer/js/index.js +14 -23
  248. package/lib/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
  249. package/lib/components/hyVideoPlayer/videoPlayer.vue.js +16 -26
  250. package/lib/components/index.js +46 -40
  251. package/lib/hooks/index.js +17 -0
  252. package/lib/hooks/useAudioPlayerConfig.js +1 -3
  253. package/lib/hooks/useBaseMainStore.js +32 -0
  254. package/lib/hooks/useCurrentBus.js +23 -0
  255. package/lib/hooks/useDialog.js +331 -0
  256. package/lib/hooks/useExportFile.js +135 -0
  257. package/lib/hooks/useGlobalConfig.js +10 -6
  258. package/lib/hooks/useLocale.js +25 -11
  259. package/lib/hooks/usePermissionMap.js +1 -3
  260. package/lib/hooks/useResizeHandler.js +1 -4
  261. package/lib/hooks/useResizeObserver.js +3 -1
  262. package/lib/hooks/useSubscribe.js +2 -1
  263. package/lib/hooks/useUserAvatarMap.js +1 -3
  264. package/lib/hooks/useVideoPlayerConfig.js +1 -3
  265. package/lib/index.js +107 -73
  266. package/lib/locale/{en.js → en_US.js} +79 -4
  267. package/lib/locale/index.js +3 -3
  268. package/lib/locale/zh_CN.js +79 -2
  269. package/lib/style/tailwind.scss +7 -3
  270. package/lib/utils/adaptive.js +1 -3
  271. package/lib/utils/form.js +6 -9
  272. package/lib/utils/handler.js +3 -7
  273. package/lib/utils/input.js +7 -8
  274. package/lib/utils/map/hook/bigMap.js +14 -53
  275. package/lib/utils/map/hook/gaode.js +5 -20
  276. package/lib/utils/map/hook/leafletjs.js +23 -79
  277. package/lib/utils/map/index.js +2 -8
  278. package/lib/utils/map/js/webgis.js +12 -12
  279. package/lib/version.js +1 -1
  280. package/package.json +3 -2
@@ -0,0 +1,357 @@
1
+ import { useTemplateRef, ref, computed, nextTick, openBlock, createBlock, unref, isRef, withCtx, createVNode, mergeProps, createElementVNode } from 'vue';
2
+ import { ElMessage } from 'element-plus';
3
+ import { selectApi, saveApi } from '../../../../api/index.mjs';
4
+ import '../../../../hooks/index.mjs';
5
+ import '../../../../components/index.mjs';
6
+ import { useAppForm } from '../../../../components/hyForm/js/useAppForm.mjs';
7
+ import { $t } from '../../../../hooks/useLocale.mjs';
8
+ import { useMixins } from '../../../../hooks/useMixins.mjs';
9
+ import { useDialog, useDialogIsEdit } from '../../../../hooks/useDialog.mjs';
10
+ import { HyDialog } from '../../../../components/hyDialog/index.mjs';
11
+ import { HyForm } from '../../../../components/hyForm/index.mjs';
12
+ import { HyInput } from '../../../../components/hyInput/index.mjs';
13
+
14
+ const _sfc_main = {
15
+ __name: "ruleSettingDialog",
16
+ props: {
17
+ ifDraggable: {
18
+ type: Boolean,
19
+ default: false
20
+ },
21
+ ifShrink: {
22
+ type: Boolean,
23
+ default: false
24
+ }
25
+ },
26
+ emits: ["onSubmit"],
27
+ setup(__props, { expose: __expose, emit: __emit }) {
28
+ const props = __props;
29
+ const emits = __emit;
30
+ const useRuleSettingDialog = (hy) => {
31
+ const { emits: emits2 } = hy;
32
+ const HyDialogRef = useTemplateRef("HyDialogRef");
33
+ const dialogVisible2 = ref(false);
34
+ const loading2 = ref(false);
35
+ const title2 = computed(() => {
36
+ switch (hy.formModel.value.type) {
37
+ case 1:
38
+ return hy.isAdd.value ? "\u6DFB\u52A0\u7981\u5165\u89C4\u5219" : "\u7F16\u8F91\u7981\u5165\u89C4\u5219";
39
+ case 2:
40
+ return hy.isAdd.value ? "\u6DFB\u52A0\u7981\u51FA\u89C4\u5219" : "\u7F16\u8F91\u7981\u51FA\u89C4\u5219";
41
+ case 3:
42
+ return hy.isAdd.value ? "\u6DFB\u52A0\u9759\u9ED8\u8BBE\u7F6E" : "\u7F16\u8F91\u9759\u9ED8\u8BBE\u7F6E";
43
+ case 4:
44
+ return hy.isAdd.value ? "\u6DFB\u52A0\u5B9A\u65F6\u62CD\u7167" : "\u7F16\u8F91\u5B9A\u65F6\u62CD\u7167";
45
+ case 5:
46
+ return hy.isAdd.value ? "\u6DFB\u52A0\u5B9A\u65F6\u5F55\u50CF" : "\u7F16\u8F91\u5B9A\u65F6\u5F55\u50CF";
47
+ case 6:
48
+ return hy.isAdd.value ? "\u6DFB\u52A0\u5B9A\u65F6\u56DE\u4F20" : "\u7F16\u8F91\u5B9A\u65F6\u56DE\u4F20";
49
+ case 7:
50
+ return hy.isAdd.value ? "\u6DFB\u52A0\u805A\u96C6\u89C4\u5219" : "\u7F16\u8F91\u805A\u96C6\u89C4\u5219";
51
+ }
52
+ return "\u6DFB\u52A0\u89C4\u5219";
53
+ });
54
+ const isAdd = computed(() => !hy.formModel.value.id);
55
+ const { formModel: formModel2, formColumns: formColumns2 } = useAppForm(
56
+ [
57
+ {
58
+ type: "input",
59
+ prop: "ruleName",
60
+ label: "\u89C4\u5219\u540D\u79F0",
61
+ required: true,
62
+ attrs: {
63
+ clearable: true
64
+ }
65
+ },
66
+ {
67
+ type: "input",
68
+ prop: "stopHour",
69
+ label: "\u505C\u7559\u65F6\u95F4\uFF08\u5206\u949F\uFF09",
70
+ required: true,
71
+ show: (column, model) => {
72
+ return model.type === 3;
73
+ },
74
+ attrs: {
75
+ type: "number",
76
+ min: 0
77
+ }
78
+ },
79
+ {
80
+ type: "select",
81
+ prop: "snapMode",
82
+ label: "\u6293\u62CD\u6A21\u5F0F",
83
+ required: true,
84
+ show: (column, model) => {
85
+ return model.type === 4;
86
+ },
87
+ attrs: {
88
+ options: [
89
+ { label: "\u5FAA\u73AF\u6293\u62CD", value: 1 },
90
+ { label: "\u72EC\u7ACB\u6293\u62CD", value: 2 }
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ type: "input",
96
+ prop: "snapSpace",
97
+ label: "\u6293\u62CD\u95F4\u9694\uFF08\u79D2\uFF09",
98
+ required: true,
99
+ show: (column, model) => {
100
+ return model.type === 4;
101
+ },
102
+ attrs: {
103
+ type: "number",
104
+ min: 1,
105
+ max: 9999
106
+ }
107
+ },
108
+ {
109
+ type: "input",
110
+ prop: "gatherLimit",
111
+ label: "\u4EBA\u5458\u95F4\u9694\u9608\u503C",
112
+ slot: "gatherLimit",
113
+ required: true,
114
+ show: (column, model) => {
115
+ return model.type === 7;
116
+ },
117
+ attrs: {
118
+ type: "number",
119
+ min: 0
120
+ }
121
+ },
122
+ {
123
+ type: "radio-group",
124
+ prop: "ruleDateType",
125
+ label: "\u89C4\u5219\u6267\u884C\u65E5\u671F",
126
+ required: true,
127
+ rules: [
128
+ {
129
+ validator: (rule, value, callback) => {
130
+ if (value === 2) {
131
+ if (!hy.formModel.value.weekDate.length) {
132
+ callback(new Error("\u8BF7\u9009\u62E9\u6307\u5B9A\u661F\u671F"));
133
+ return;
134
+ }
135
+ }
136
+ callback();
137
+ },
138
+ trigger: ["change", "blur"]
139
+ }
140
+ ],
141
+ attrs: {
142
+ options: [
143
+ { label: "\u6BCF\u65E5", value: 1 },
144
+ { label: "\u6307\u5B9A\u661F\u671F", value: 2 },
145
+ { label: "\u6307\u5B9A\u65E5\u671F", value: 4 }
146
+ ]
147
+ }
148
+ },
149
+ {
150
+ type: "checkbox-group",
151
+ prop: "weekDate",
152
+ label: "\u9009\u62E9\u89E6\u53D1\u7684\u661F\u671F",
153
+ required: true,
154
+ show: (column, model) => model.ruleDateType === 2,
155
+ attrs: {
156
+ options: [
157
+ { label: $t("hy.monday"), value: "1" },
158
+ { label: $t("hy.tuesday"), value: "2" },
159
+ { label: $t("hy.wednesday"), value: "3" },
160
+ { label: $t("hy.thursday"), value: "4" },
161
+ { label: $t("hy.friday"), value: "5" },
162
+ { label: $t("hy.saturday"), value: "6" },
163
+ { label: $t("hy.sunday"), value: "7" }
164
+ ]
165
+ }
166
+ },
167
+ {
168
+ type: "date-picker",
169
+ prop: ["apStartDtm", "apEndDtm"],
170
+ label: "\u6307\u5B9A\u65E5\u671F\u8303\u56F4",
171
+ required: true,
172
+ timeRangeFill: true,
173
+ show: (column, model) => {
174
+ return model.ruleDateType === 4;
175
+ },
176
+ attrs: {
177
+ type: "daterange",
178
+ isRange: true,
179
+ timeRangeFill: true,
180
+ clearable: true,
181
+ teleported: true
182
+ }
183
+ },
184
+ {
185
+ type: "time-picker",
186
+ prop: ["startDtm1", "endDtm1"],
187
+ label: "\u89C4\u5219\u751F\u6548\u65F6\u95F4",
188
+ required: true,
189
+ attrs: {
190
+ isRange: true,
191
+ clearable: true,
192
+ teleported: true
193
+ }
194
+ }
195
+ ],
196
+ {
197
+ type: 1
198
+ }
199
+ );
200
+ const rules2 = ref({});
201
+ async function show2(data) {
202
+ if (hy.loading.value) {
203
+ ElMessage.error("\u6570\u636E\u52A0\u8F7D\u4E2D\uFF0C\u8BF7\u52FF\u91CD\u590D\u70B9\u51FB");
204
+ return;
205
+ }
206
+ await hy.watchPause();
207
+ hy.loading.value = true;
208
+ if (data && data.id) {
209
+ try {
210
+ const res = await selectApi("rule", data.id);
211
+ if (res.code === 200) {
212
+ const data2 = res.data || {};
213
+ hy.formModel.value = {
214
+ ...data2,
215
+ ruleDateType: data2.ruleDateType || 1,
216
+ weekDate: data2.weekDate ? data2.weekDate.split(",") : []
217
+ };
218
+ }
219
+ } catch (err) {
220
+ console.error(err);
221
+ }
222
+ } else {
223
+ hy.formModel.value = {
224
+ ruleName: null,
225
+ stopHour: null,
226
+ gatherLimit: null,
227
+ ruleDateType: 1,
228
+ apStartDtm: null,
229
+ apEndDtm: null,
230
+ startDtm1: null,
231
+ endDtm1: null,
232
+ weekDate: [],
233
+ ...data || {}
234
+ };
235
+ }
236
+ hy.setDragLevelIndex("HyDialogRef");
237
+ hy.dialogVisible.value = true;
238
+ await nextTick();
239
+ hy.formRef.value.clearValidate();
240
+ hy.loading.value = false;
241
+ hy.watchResume();
242
+ }
243
+ async function onSubmit2() {
244
+ await hy.formRef.value.validate();
245
+ const form = { ...hy.formModel.value };
246
+ if (form.ruleDateType === 2) {
247
+ form.weekDate = form.weekDate.join(",");
248
+ form.apStartDtm = null;
249
+ form.apEndDtm = null;
250
+ } else if (form.ruleDateType === 4) {
251
+ form.weekDate = null;
252
+ } else {
253
+ form.weekDate = null;
254
+ form.apStartDtm = null;
255
+ form.apEndDtm = null;
256
+ }
257
+ const res = await saveApi("rule", form);
258
+ if (res.code === 200) {
259
+ ElMessage.success("\u64CD\u4F5C\u6210\u529F");
260
+ emits2("onSubmit", form.id ? null : 1);
261
+ } else {
262
+ return Promise.reject();
263
+ }
264
+ }
265
+ const formRef2 = useTemplateRef("formRef");
266
+ function setWeekDate2(week) {
267
+ const index = hy.formModel.value.weekDate?.indexOf(week);
268
+ if (index === -1) {
269
+ hy.formModel.value.weekDate.push(week);
270
+ } else {
271
+ hy.formModel.value.weekDate.splice(index, 1);
272
+ }
273
+ hy.formRef.value.validate(["ruleDateType"]);
274
+ }
275
+ return {
276
+ HyDialogRef,
277
+ dialogVisible: dialogVisible2,
278
+ loading: loading2,
279
+ title: title2,
280
+ isAdd,
281
+ formModel: formModel2,
282
+ formColumns: formColumns2,
283
+ rules: rules2,
284
+ show: show2,
285
+ onSubmit: onSubmit2,
286
+ formRef: formRef2,
287
+ setWeekDate: setWeekDate2
288
+ };
289
+ };
290
+ const {
291
+ onMinimized,
292
+ setDragLevelIndex,
293
+ dialogVisible,
294
+ loading,
295
+ title,
296
+ formModel,
297
+ formColumns,
298
+ rules,
299
+ show,
300
+ onSubmit,
301
+ formRef,
302
+ setWeekDate
303
+ } = useMixins({ emits }, [useDialog, useDialogIsEdit, useRuleSettingDialog]);
304
+ __expose({
305
+ show,
306
+ setDragLevelIndex
307
+ });
308
+ return (_ctx, _cache) => {
309
+ return openBlock(), createBlock(unref(HyDialog), {
310
+ ref: "HyDialogRef",
311
+ modelValue: unref(dialogVisible),
312
+ "onUpdate:modelValue": ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null,
313
+ loading: unref(loading),
314
+ "onUpdate:loading": ($event) => isRef(loading) ? loading.value = $event : null,
315
+ title: unref(title),
316
+ width: "500",
317
+ "dialog-type": "default",
318
+ "show-operate": true,
319
+ "if-draggable": __props.ifDraggable,
320
+ "if-shrink": __props.ifShrink,
321
+ "on-submit": unref(onSubmit),
322
+ onOnMinimized: unref(onMinimized),
323
+ onOnDialogMousedown: ($event) => unref(setDragLevelIndex)("HyDialogRef")
324
+ }, {
325
+ default: withCtx(() => [
326
+ createVNode(unref(HyForm), {
327
+ ref_key: "formRef",
328
+ ref: formRef,
329
+ model: unref(formModel),
330
+ columns: unref(formColumns),
331
+ rules: unref(rules),
332
+ "column-num": 1
333
+ }, {
334
+ gatherLimit: withCtx(({ column }) => [
335
+ createVNode(unref(HyInput), mergeProps({
336
+ modelValue: unref(formModel).gatherLimit,
337
+ "onUpdate:modelValue": ($event) => unref(formModel).gatherLimit = $event
338
+ }, column.attrs), {
339
+ suffix: withCtx(() => [
340
+ createElementVNode("span", { class: "text-main" }, "\u7C73")
341
+ ]),
342
+ _: 1
343
+ /* STABLE */
344
+ }, 16, ["modelValue", "onUpdate:modelValue"])
345
+ ]),
346
+ _: 1
347
+ /* STABLE */
348
+ }, 8, ["model", "columns", "rules"])
349
+ ]),
350
+ _: 1
351
+ /* STABLE */
352
+ }, 8, ["modelValue", "onUpdate:modelValue", "loading", "onUpdate:loading", "title", "if-draggable", "if-shrink", "on-submit", "onOnMinimized", "onOnDialogMousedown"]);
353
+ };
354
+ }
355
+ };
356
+
357
+ export { _sfc_main as default };
@@ -0,0 +1,261 @@
1
+ import { useTemplateRef, ref, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, createCommentVNode } from 'vue';
2
+ import { ElMessage, ElPopover } from 'element-plus';
3
+ import { deleteBatchApi } from '../../../../api/index.mjs';
4
+ import '../../../../hooks/index.mjs';
5
+ import { weekDateFn } from '../../js/ruleSetting.mjs';
6
+ import '../../../../components/index.mjs';
7
+ import { useAppTable } from '../../../../components/hyTable/js/useAppTable.mjs';
8
+ import { $t } from '../../../../hooks/useLocale.mjs';
9
+ import { HyConfirmDialog } from '../../../../components/hyConfirmDialog/index.mjs';
10
+ import { useMixins } from '../../../../hooks/useMixins.mjs';
11
+ import { HyTable } from '../../../../components/hyTable/index.mjs';
12
+ import { HyTableActionButton } from '../../../../components/hyTableActionButton/index.mjs';
13
+ import { HyIcon } from '../../../../components/hyIcon/index.mjs';
14
+
15
+ const _sfc_main = {
16
+ __name: "sedentary",
17
+ emits: ["on-add", "on-edit", "on-rule-assign"],
18
+ setup(__props, { expose: __expose, emit: __emit }) {
19
+ const emits = __emit;
20
+ const tableRef = useTemplateRef("tableRef");
21
+ function useSedentary(hy) {
22
+ const { tableRef: tableRef2 } = hy;
23
+ const { tableColumns: tableColumns2, filterModel: filterModel2, filterColumns: filterColumns2 } = useAppTable({
24
+ columns: [
25
+ {
26
+ prop: "ruleName",
27
+ label: $t("ruleSetting.ruleName"),
28
+ isSearch: true
29
+ },
30
+ {
31
+ prop: "railName",
32
+ label: $t("ruleSetting.areaName")
33
+ },
34
+ {
35
+ prop: "attendanceTime",
36
+ label: $t("ruleSetting.executionTime"),
37
+ slot: "attendanceTime"
38
+ },
39
+ {
40
+ prop: "stopHour",
41
+ label: $t("ruleSetting.stayTime"),
42
+ slot: "stopHour"
43
+ },
44
+ {
45
+ prop: "attendanceTime",
46
+ label: $t("ruleSetting.executionTime"),
47
+ slot: "attendanceTime"
48
+ },
49
+ {
50
+ type: "operator",
51
+ operator: [
52
+ {
53
+ label: $t("ruleSetting.distribution"),
54
+ desc: $t("ruleSetting.assignRules"),
55
+ svgName: "ops-linear-fen-pei",
56
+ handler: ({ row }) => {
57
+ hy.assingRules(row);
58
+ }
59
+ },
60
+ {
61
+ label: $t("bussiness.edit"),
62
+ desc: $t("bussiness.edit"),
63
+ svgName: "ops-button-edit",
64
+ handler: ({ row }) => {
65
+ emits("on-edit", row);
66
+ }
67
+ },
68
+ {
69
+ desc: $t("bussiness.delete"),
70
+ label: $t("bussiness.delete"),
71
+ svgName: "ops-linear-delete",
72
+ className: "text-danger-2",
73
+ handler: ({ row }) => {
74
+ hy.deleteShow(row);
75
+ }
76
+ }
77
+ ]
78
+ }
79
+ ],
80
+ filterColumns: [],
81
+ filterModel: {
82
+ type: 3
83
+ }
84
+ });
85
+ const searchArr2 = ref([
86
+ {
87
+ label: $t("ruleSetting.userName")
88
+ },
89
+ {
90
+ label: $t("ruleSetting.deviceIMEI")
91
+ }
92
+ ]);
93
+ function showAddRuleFenceDialog2(row) {
94
+ emits("on-add", row);
95
+ }
96
+ function assingRules(row) {
97
+ emits("on-rule-assign", row);
98
+ }
99
+ function deleteShow(data) {
100
+ HyConfirmDialog.danger({
101
+ title: "\u786E\u8BA4\u5220\u9664",
102
+ content: `<div><p>\u5220\u9664\u540E\u65E0\u6CD5\u8FD8\u539F\uFF0C\u662F\u5426\u786E\u8BA4\u5220\u9664\u8BE5\u89C4\u5219\uFF1F</p><p class="text-theme mt-1">"${data.ruleName}"</p></div>`,
103
+ onSubmit() {
104
+ return new Promise((resolve, reject) => {
105
+ deleteBatchApi("rule", data.id).then((res) => {
106
+ if (res.code === 200) {
107
+ ElMessage.success($t("bussiness.successfulDeletion"));
108
+ hy.getData();
109
+ resolve();
110
+ }
111
+ }).catch(() => {
112
+ reject();
113
+ });
114
+ });
115
+ }
116
+ });
117
+ }
118
+ function getData2(page = null) {
119
+ tableRef2.value.getData(page);
120
+ }
121
+ return {
122
+ // data
123
+ tableColumns: tableColumns2,
124
+ filterModel: filterModel2,
125
+ filterColumns: filterColumns2,
126
+ searchArr: searchArr2,
127
+ // methods
128
+ showAddRuleFenceDialog: showAddRuleFenceDialog2,
129
+ assingRules,
130
+ deleteShow,
131
+ getData: getData2
132
+ };
133
+ }
134
+ const { tableColumns, filterModel, filterColumns, searchArr, showAddRuleFenceDialog, getData } = useMixins({ tableRef }, [useSedentary]);
135
+ __expose({
136
+ getData
137
+ });
138
+ return (_ctx, _cache) => {
139
+ return openBlock(), createElementBlock("div", { class: "w-full h-full" }, [
140
+ createVNode(unref(HyTable), {
141
+ ref_key: "tableRef",
142
+ ref: tableRef,
143
+ controller: "rule",
144
+ "table-columns": unref(tableColumns),
145
+ "filter-model": unref(filterModel),
146
+ "filter-columns": unref(filterColumns),
147
+ "search-arr": unref(searchArr),
148
+ "show-editable": false
149
+ }, {
150
+ "operator-left-box": withCtx(() => [
151
+ createVNode(unref(HyTableActionButton), {
152
+ type: "success",
153
+ "svg-name": "ops-button-add",
154
+ label: "\u6DFB\u52A0",
155
+ "operate-list": [
156
+ {
157
+ children: [
158
+ {
159
+ label: "\u6DFB\u52A0\u9759\u9ED8\u89C4\u5219",
160
+ value: "showAddRuleFenceDialog",
161
+ altText: `\u5728\u6307\u5B9A\u533A\u57DF\u548C\u65F6\u6BB5\u5185\uFF0C\u505C\u7559\u8BBE\u5907\u53EF\u89E6\u53D1\u544A\u8B66\u3002`
162
+ }
163
+ ]
164
+ }
165
+ ],
166
+ onChange: ($event) => unref(showAddRuleFenceDialog)({ type: unref(filterModel).type })
167
+ }, null, 8, ["onChange"]),
168
+ createVNode(unref(ElPopover), {
169
+ placement: "bottom-start",
170
+ width: "200",
171
+ trigger: "hover"
172
+ }, {
173
+ reference: withCtx(() => [
174
+ createElementVNode("span", { class: "text-xs text-theme ml-2" }, [
175
+ createVNode(unref(HyIcon), {
176
+ "svg-name": "dispatch-share-v3-base-help",
177
+ class: "!w-3 !h-3 mr-1"
178
+ }),
179
+ createElementVNode(
180
+ "span",
181
+ null,
182
+ toDisplayString(unref($t)("hy.help")),
183
+ 1
184
+ /* TEXT */
185
+ )
186
+ ])
187
+ ]),
188
+ default: withCtx(() => [
189
+ createElementVNode("div", { class: "p-[10px_20px] text-xs" }, [
190
+ createElementVNode("div", { class: "mb-2 break-keep" }, "\u89C4\u5219\u4F7F\u7528\u8BF4\u660E\uFF1A"),
191
+ createElementVNode("ul", null, [
192
+ createElementVNode("li", { class: "flex mb_10" }, [
193
+ createElementVNode("span", null, "1\u3001"),
194
+ createElementVNode("span", null, "\u6DFB\u52A0\u89C4\u5219")
195
+ ]),
196
+ createElementVNode("li", { class: "flex mb_10" }, [
197
+ createElementVNode("span", null, "2\u3001"),
198
+ createElementVNode("span", null, "\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u7684\u89C4\u5219\u6761\u4EF6")
199
+ ]),
200
+ createElementVNode("li", { class: "flex mb_10" }, [
201
+ createElementVNode("span", null, "3\u3001"),
202
+ createElementVNode("span", null, "\u5E76\u628A\u9700\u8981\u6267\u884C\u6B64\u89C4\u5219\u7684\u4EBA\u5458\u6388\u6743\u7ED9\u5B83")
203
+ ])
204
+ ])
205
+ ])
206
+ ]),
207
+ _: 1
208
+ /* STABLE */
209
+ })
210
+ ]),
211
+ attendanceTime: withCtx(({ row }) => [
212
+ row.ruleDateType === 1 || !row.ruleDateType ? (openBlock(), createElementBlock("div", { key: 0 }, [
213
+ createTextVNode(
214
+ toDisplayString(unref($t)("ruleSetting.everyDay")) + " ",
215
+ 1
216
+ /* TEXT */
217
+ ),
218
+ createElementVNode(
219
+ "span",
220
+ { class: "text-auxiliary text-xs" },
221
+ "(" + toDisplayString(row.startDtm1) + "-" + toDisplayString(row.endDtm1) + ")",
222
+ 1
223
+ /* TEXT */
224
+ )
225
+ ])) : row.ruleDateType === 2 ? (openBlock(), createElementBlock("div", { key: 1 }, [
226
+ createTextVNode(
227
+ toDisplayString(unref(weekDateFn)(row.weekDate)) + " ",
228
+ 1
229
+ /* TEXT */
230
+ ),
231
+ createElementVNode(
232
+ "span",
233
+ { class: "text-auxiliary text-xs" },
234
+ "(" + toDisplayString(row.startDtm1) + "-" + toDisplayString(row.endDtm1) + "})",
235
+ 1
236
+ /* TEXT */
237
+ )
238
+ ])) : row.ruleDateType === 4 ? (openBlock(), createElementBlock("div", { key: 2 }, [
239
+ createTextVNode(
240
+ toDisplayString(row.apStartDtm.split(" 00:00:00")[0]) + " ~ " + toDisplayString(row.apEndDtm.split(" 00:00:00")[0]) + " ",
241
+ 1
242
+ /* TEXT */
243
+ ),
244
+ createElementVNode(
245
+ "span",
246
+ { class: "text-auxiliary text-xs" },
247
+ "(" + toDisplayString(row.startDtm1) + "-" + toDisplayString(row.endDtm1) + "})",
248
+ 1
249
+ /* TEXT */
250
+ )
251
+ ])) : createCommentVNode("v-if", true)
252
+ ]),
253
+ _: 1
254
+ /* STABLE */
255
+ }, 8, ["table-columns", "filter-model", "filter-columns", "search-arr"])
256
+ ]);
257
+ };
258
+ }
259
+ };
260
+
261
+ export { _sfc_main as default };