hys-ui 0.2.0 → 0.3.0
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/CHANGELOG.md +38 -0
- package/README.md +15 -1
- package/dist/components/HysAlert/HysAlert.vue.js +5 -54
- package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
- package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
- package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
- package/dist/components/HysCascader/HysCascader.vue.js +2 -2
- package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
- package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
- package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
- package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
- package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
- package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
- package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
- package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
- package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
- package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
- package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
- package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
- package/dist/components/HysMention/HysMention.vue.js +1 -1
- package/dist/components/HysMention/HysMention2.vue.js +112 -100
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +490 -85
- package/dist/components/HysPopover/HysPopover.vue.js +5 -91
- package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
- package/dist/components/HysProgress/HysProgress.vue.js +2 -2
- package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +730 -594
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
- package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
- package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +389 -368
- package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
- package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
- package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
- package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
- package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
- package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
- package/dist/components/HysTour/HysTour.vue.js +46 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
- package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
- package/dist/components/HysTree/HysTree.vue.js +2 -2
- package/dist/components/HysTree/HysTree2.vue.js +195 -184
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
- package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
- package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
- package/dist/composables/color.js +97 -0
- package/dist/composables/dataGrid.js +68 -0
- package/dist/composables/drawer.js +17 -0
- package/dist/composables/feedback.js +14 -0
- package/dist/composables/menu.js +96 -0
- package/dist/composables/modal.js +14 -0
- package/dist/composables/overlayManager.js +48 -18
- package/dist/composables/progress.js +94 -0
- package/dist/composables/tagInput.js +16 -0
- package/dist/composables/timeline.js +19 -0
- package/dist/composables/transfer.js +19 -17
- package/dist/composables/upload.js +55 -0
- package/dist/composables/uploadRequest.js +58 -0
- package/dist/composables/useAlert.js +124 -0
- package/dist/composables/useColorPicker.js +402 -0
- package/dist/composables/useContextMenu.js +514 -0
- package/dist/composables/useDataGridRemote.js +67 -0
- package/dist/composables/useDialog.js +86 -43
- package/dist/composables/useDrawerPush.js +33 -0
- package/dist/composables/useDrawerResize.js +221 -0
- package/dist/composables/useFloating.js +110 -76
- package/dist/composables/useHysModal.js +185 -0
- package/dist/composables/useModal.js +295 -0
- package/dist/composables/useModalInteraction.js +394 -0
- package/dist/composables/usePopupSurface.js +458 -0
- package/dist/composables/useTagInput.js +313 -0
- package/dist/composables/useTransferMotion.js +185 -0
- package/dist/composables/useUpload.js +472 -0
- package/dist/composables/useUploadModel.js +65 -0
- package/dist/composables/useUploadRequests.js +266 -0
- package/dist/composables/useVirtualTableLayout.js +277 -0
- package/dist/composables/virtualTable.js +43 -0
- package/dist/index.js +27 -24
- package/dist/internal/PopupReference.js +39 -0
- package/dist/internal/PopupSurfacePanel.vue.js +7 -0
- package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
- package/dist/motion/PopupMotion.js +105 -0
- package/dist/motion/popup.js +10 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
- package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
- package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
- package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
- package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +1 -1
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
- package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
- package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -1
- package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +13 -4
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +2 -2
- package/dist/types/components/HysTable/HysTable.vue.d.ts +4 -4
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
- package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
- package/dist/types/components/HysTour/HysTour.vue.d.ts +2 -1
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
- package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
- package/dist/types/composables/autocomplete.d.ts +3 -0
- package/dist/types/composables/avatar.d.ts +3 -0
- package/dist/types/composables/cascader.d.ts +3 -0
- package/dist/types/composables/color.d.ts +97 -0
- package/dist/types/composables/dataGrid.d.ts +100 -0
- package/dist/types/composables/datePicker.d.ts +3 -0
- package/dist/types/composables/drawer.d.ts +102 -0
- package/dist/types/composables/feedback.d.ts +98 -0
- package/dist/types/composables/formContext.d.ts +2 -0
- package/dist/types/composables/menu.d.ts +183 -0
- package/dist/types/composables/modal.d.ts +183 -0
- package/dist/types/composables/overlayManager.d.ts +7 -3
- package/dist/types/composables/popupSurface.d.ts +83 -0
- package/dist/types/composables/progress.d.ts +92 -0
- package/dist/types/composables/selectOptions.d.ts +2 -0
- package/dist/types/composables/table.d.ts +3 -0
- package/dist/types/composables/tagInput.d.ts +96 -0
- package/dist/types/composables/timeline.d.ts +82 -0
- package/dist/types/composables/transfer.d.ts +7 -0
- package/dist/types/composables/tree.d.ts +3 -0
- package/dist/types/composables/treeSelect.d.ts +3 -0
- package/dist/types/composables/upload.d.ts +202 -0
- package/dist/types/composables/uploadRequest.d.ts +3 -0
- package/dist/types/composables/useAlert.d.ts +21 -0
- package/dist/types/composables/useCascader.d.ts +1 -1
- package/dist/types/composables/useColorPicker.d.ts +101 -0
- package/dist/types/composables/useContextMenu.d.ts +81 -0
- package/dist/types/composables/useDataGridRemote.d.ts +15 -0
- package/dist/types/composables/useDialog.d.ts +16 -3
- package/dist/types/composables/useDrawerPush.d.ts +6 -0
- package/dist/types/composables/useDrawerResize.d.ts +27 -0
- package/dist/types/composables/useFloating.d.ts +21 -2
- package/dist/types/composables/useHysModal.d.ts +44 -0
- package/dist/types/composables/useModal.d.ts +62 -0
- package/dist/types/composables/useModalInteraction.d.ts +27 -0
- package/dist/types/composables/usePopupSurface.d.ts +3341 -0
- package/dist/types/composables/useTagInput.d.ts +66 -0
- package/dist/types/composables/useTransferMotion.d.ts +36 -0
- package/dist/types/composables/useUpload.d.ts +94 -0
- package/dist/types/composables/useUploadModel.d.ts +14 -0
- package/dist/types/composables/useUploadRequests.d.ts +38 -0
- package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
- package/dist/types/composables/virtualTable.d.ts +126 -0
- package/dist/types/index.d.ts +17 -2
- package/dist/types/internal/PopupReference.d.ts +18 -0
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
- package/dist/types/motion/PopupMotion.d.ts +59 -0
- package/dist/types/motion/popup.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,61 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
1
|
+
import { defineComponent as Ot, ref as z, watch as N, computed as g, onMounted as Yt, onActivated as Xt, nextTick as te, onDeactivated as Jt, onBeforeUnmount as Qt, useId as Zt, shallowRef as jt, openBlock as r, createElementBlock as c, mergeProps as kt, unref as l, createElementVNode as d, createVNode as f, withCtx as H, createTextVNode as Z, createCommentVNode as y, toDisplayString as h, normalizeStyle as _, withModifiers as k, Fragment as B, renderList as j, withKeys as A, normalizeClass as O, createBlock as ze, Teleport as ea } from "vue";
|
|
2
|
+
import ta from "../../motion/PopupMotion.js";
|
|
3
|
+
import { useHysRootAttrs as aa } from "../../config.js";
|
|
4
|
+
import la from "../HysSegmented/HysSegmented.vue.js";
|
|
5
|
+
import U from "../HysButton/HysButton.vue.js";
|
|
6
|
+
import bt from "../HysInput/HysInput.vue.js";
|
|
7
|
+
import sa from "../HysPagination/HysPagination.vue.js";
|
|
8
|
+
import { ganttDependencyPickPath as ia, ganttDependencyPath as na, useGanttDependencies as oa } from "../../composables/useGanttDependencies.js";
|
|
9
|
+
import { Undo2 as ra, Redo2 as ua, TriangleAlert as wt, X as xt, Trash2 as It, ChevronDown as da, Search as Ct, LocateFixed as Xe, GitBranch as ca, Check as va, CornerDownRight as pa } from "lucide-vue-next";
|
|
10
|
+
import { useGanttLabelResize as ha } from "../../composables/useGanttLabelResize.js";
|
|
11
|
+
import { useFloating as ga } from "../../composables/useFloating.js";
|
|
12
|
+
import { useGanttHistory as fa } from "../../composables/useGanttHistory.js";
|
|
13
|
+
import { analyzeGanttSchedule as ya, previewGanttConflicts as ma, ganttEdgeKey as ka } from "../../composables/ganttConflicts.js";
|
|
14
|
+
const ba = { class: "hys-ui-pg-toolbar" }, wa = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "hys-ui-pg-history-controls",
|
|
16
17
|
role: "group",
|
|
17
18
|
"aria-label": "排期历史操作"
|
|
18
|
-
},
|
|
19
|
+
}, xa = { class: "hys-ui-pg-hint" }, Ia = { class: "hys-ui-pg-label-head" }, Ca = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], Ta = ["aria-pressed", "data-row-index", "onClick", "onKeydown"], Pa = ["title"], Ma = ["title"], za = {
|
|
19
20
|
key: 0,
|
|
20
21
|
class: "hys-ui-pg-empty"
|
|
21
|
-
},
|
|
22
|
+
}, Sa = { class: "hys-ui-pg-months" }, Da = ["title"], La = { class: "hys-ui-pg-days" }, $a = ["data-row-index"], Ea = ["aria-pressed", "aria-label", "title", "onClick", "onKeydown", "onPointerdown"], _a = { class: "hys-ui-pg-bar-title" }, Ka = ["onPointerdown"], Ha = ["onPointerdown"], Fa = ["aria-label", "onPointerdown", "onClick", "onKeydown"], Ra = ["width", "height", "aria-hidden"], Aa = ["data-edge-key"], Ua = ["d"], Va = ["d", "aria-label", "onClick", "onFocus", "onKeydown"], Wa = ["cx", "cy"], Ba = ["cx", "cy", "aria-label", "onFocus", "onPointerdown", "onClick", "onKeydown"], Na = ["d"], qa = ["cx", "cy"], Ga = ["transform", "aria-expanded", "aria-label", "onClick", "onKeydown"], Oa = {
|
|
22
23
|
key: 0,
|
|
23
24
|
cx: "29",
|
|
24
25
|
r: "13",
|
|
25
26
|
fill: "transparent",
|
|
26
27
|
class: "hys-ui-pg-incoming-hit"
|
|
27
|
-
},
|
|
28
|
+
}, Ya = {
|
|
28
29
|
"text-anchor": "middle",
|
|
29
30
|
dy: ".35em"
|
|
30
|
-
},
|
|
31
|
+
}, Xa = ["d"], Ja = { class: "hys-ui-pg-footer" }, Qa = { key: 0 }, Za = {
|
|
31
32
|
key: 1,
|
|
32
33
|
class: "hys-ui-pg-link-feedback"
|
|
33
|
-
},
|
|
34
|
+
}, ja = {
|
|
34
35
|
role: "status",
|
|
35
36
|
"aria-live": "polite"
|
|
36
|
-
},
|
|
37
|
+
}, el = {
|
|
37
38
|
key: 2,
|
|
38
39
|
class: "hys-ui-pg-history-message",
|
|
39
40
|
"aria-live": "polite"
|
|
40
|
-
},
|
|
41
|
+
}, tl = {
|
|
41
42
|
key: 3,
|
|
42
43
|
class: "hys-ui-pg-conflict-area"
|
|
43
|
-
},
|
|
44
|
+
}, al = { class: "hys-ui-pg-conflict-summary" }, ll = { "aria-live": "polite" }, sl = {
|
|
44
45
|
key: 0,
|
|
45
46
|
class: "hys-ui-pg-conflict-preview"
|
|
46
|
-
},
|
|
47
|
+
}, il = { class: "hys-ui-pg-conflict-list" }, nl = { class: "hys-ui-pg-conflict-tag" }, ol = {
|
|
47
48
|
key: 0,
|
|
48
49
|
class: "hys-ui-pg-conflict-empty"
|
|
49
|
-
},
|
|
50
|
+
}, rl = ["aria-label"], ul = { class: "hys-ui-pg-picker-heading" }, dl = { class: "hys-ui-pg-picker-target" }, cl = { class: "hys-ui-pg-picker-target-main" }, vl = ["title"], pl = { class: "hys-ui-pg-picker-options" }, hl = ["data-current"], gl = { class: "hys-ui-pg-picker-names" }, fl = ["title"], yl = { class: "hys-ui-pg-picker-check" }, ml = { class: "hys-ui-pg-picker-actions" }, kl = {
|
|
50
51
|
key: 0,
|
|
51
52
|
class: "hys-ui-pg-picker-empty"
|
|
52
|
-
},
|
|
53
|
+
}, bl = {
|
|
53
54
|
key: 0,
|
|
54
55
|
class: "hys-ui-pg-picker-notice",
|
|
55
56
|
role: "status"
|
|
56
|
-
},
|
|
57
|
+
}, Tt = 864e5, _l = /* @__PURE__ */ Ot({
|
|
57
58
|
__name: "HysGantt",
|
|
58
59
|
props: {
|
|
60
|
+
popupTransition: {},
|
|
61
|
+
popupTransitionDuration: {},
|
|
59
62
|
items: {},
|
|
60
63
|
modelValue: {},
|
|
61
64
|
scale: { default: "day" },
|
|
@@ -79,230 +82,230 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
|
|
|
79
82
|
showConflicts: { type: Boolean, default: !0 }
|
|
80
83
|
},
|
|
81
84
|
emits: ["update:modelValue", "update:scale", "scaleChange", "update:items", "change", "open", "dependencyAdd", "dependencyRemove", "dependencyInvalid", "dependencyMove", "update:labelWidth", "labelResize", "historyChange", "undo", "redo", "historyInvalid", "conflictChange"],
|
|
82
|
-
setup(
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
() =>
|
|
86
|
-
(e) =>
|
|
85
|
+
setup(L, { expose: Pt, emit: Mt }) {
|
|
86
|
+
const Je = aa(), u = L, b = Mt, Y = z(u.scale);
|
|
87
|
+
N(
|
|
88
|
+
() => u.scale,
|
|
89
|
+
(e) => Y.value = e
|
|
87
90
|
);
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
() =>
|
|
91
|
-
(e) =>
|
|
91
|
+
const K = z(u.modelValue ?? null);
|
|
92
|
+
N(
|
|
93
|
+
() => u.modelValue,
|
|
94
|
+
(e) => K.value = e ?? null
|
|
92
95
|
);
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
function
|
|
96
|
+
const Se = z(), w = z(null), De = z(null), Le = z(0), Qe = z(null), ke = /* @__PURE__ */ new Date();
|
|
97
|
+
ke.setHours(0, 0, 0, 0);
|
|
98
|
+
function Ze(e) {
|
|
96
99
|
return typeof e == "number" ? Number.isFinite(e) && e >= 0 ? e + "px" : void 0 : typeof e == "string" && e.trim() ? e : void 0;
|
|
97
100
|
}
|
|
98
|
-
const
|
|
99
|
-
height:
|
|
100
|
-
maxHeight:
|
|
101
|
-
|
|
101
|
+
const zt = g(() => ({
|
|
102
|
+
height: Ze(u.height),
|
|
103
|
+
maxHeight: u.maxHeight === !1 || u.height !== void 0 && u.maxHeight === void 0 ? "none" : Ze(
|
|
104
|
+
u.maxHeight ?? (u.height === void 0 ? 620 : void 0)
|
|
102
105
|
),
|
|
103
|
-
scrollPaddingInlineStart:
|
|
106
|
+
scrollPaddingInlineStart: Le.value + "px"
|
|
104
107
|
}));
|
|
105
|
-
function
|
|
108
|
+
function be(e) {
|
|
106
109
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(e)) return null;
|
|
107
|
-
const [t, s,
|
|
108
|
-
return
|
|
110
|
+
const [t, s, a] = e.split("-").map(Number), n = new Date(t, s - 1, a);
|
|
111
|
+
return n.getFullYear() === t && n.getMonth() === s - 1 && n.getDate() === a ? n : null;
|
|
109
112
|
}
|
|
110
|
-
function
|
|
113
|
+
function X(e) {
|
|
111
114
|
return Math.round(
|
|
112
|
-
(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()) - Date.UTC(1970, 0, 1)) /
|
|
115
|
+
(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()) - Date.UTC(1970, 0, 1)) / Tt
|
|
113
116
|
);
|
|
114
117
|
}
|
|
115
|
-
function
|
|
116
|
-
return new Date(e *
|
|
118
|
+
function we(e) {
|
|
119
|
+
return new Date(e * Tt);
|
|
117
120
|
}
|
|
118
|
-
function
|
|
119
|
-
return
|
|
121
|
+
function $e(e) {
|
|
122
|
+
return we(e).toISOString().slice(0, 10);
|
|
120
123
|
}
|
|
121
|
-
const
|
|
122
|
-
() => Number.isFinite(
|
|
123
|
-
),
|
|
124
|
+
const x = g(
|
|
125
|
+
() => Number.isFinite(u.rowHeight) && u.rowHeight > 0 ? u.rowHeight : 46
|
|
126
|
+
), $ = g(() => {
|
|
124
127
|
const e = /* @__PURE__ */ new Map(), t = (s) => {
|
|
125
128
|
if (!e.has(s)) {
|
|
126
|
-
const
|
|
127
|
-
e.set(s,
|
|
129
|
+
const a = be(s);
|
|
130
|
+
e.set(s, a ? X(a) : null);
|
|
128
131
|
}
|
|
129
132
|
return e.get(s);
|
|
130
133
|
};
|
|
131
|
-
return
|
|
132
|
-
const
|
|
133
|
-
return
|
|
134
|
+
return u.items.map((s) => {
|
|
135
|
+
const a = t(s.start), n = t(s.end);
|
|
136
|
+
return a === null || n === null || n < a ? null : {
|
|
134
137
|
...s,
|
|
135
|
-
s:
|
|
136
|
-
e:
|
|
138
|
+
s: a,
|
|
139
|
+
e: n,
|
|
137
140
|
progress: Math.min(100, Math.max(0, s.progress ?? 0))
|
|
138
141
|
};
|
|
139
142
|
}).filter((s) => s !== null);
|
|
140
|
-
}),
|
|
141
|
-
() =>
|
|
142
|
-
),
|
|
143
|
-
const e =
|
|
144
|
-
if (!
|
|
145
|
-
const t = Number.isFinite(
|
|
143
|
+
}), St = g(
|
|
144
|
+
() => $.value.filter((e) => e.status === "已完成").length
|
|
145
|
+
), Ae = z(620), ce = z(0), ae = g(() => {
|
|
146
|
+
const e = $.value.length;
|
|
147
|
+
if (!u.virtual) return { start: 0, end: e };
|
|
148
|
+
const t = Number.isFinite(u.overscan) ? Math.max(0, Math.min(100, Math.floor(u.overscan))) : 6, s = Math.min(
|
|
146
149
|
Math.max(0, e - 1),
|
|
147
|
-
Math.max(0, Math.floor(
|
|
150
|
+
Math.max(0, Math.floor(ce.value / x.value))
|
|
148
151
|
);
|
|
149
152
|
return {
|
|
150
153
|
start: Math.max(0, s - t),
|
|
151
154
|
end: Math.min(
|
|
152
155
|
e,
|
|
153
156
|
s + Math.ceil(
|
|
154
|
-
Math.max(
|
|
157
|
+
Math.max(x.value, Ae.value - 66) / x.value
|
|
155
158
|
) + t + 1
|
|
156
159
|
)
|
|
157
160
|
};
|
|
158
|
-
}),
|
|
159
|
-
() =>
|
|
160
|
-
),
|
|
161
|
-
() =>
|
|
162
|
-
),
|
|
163
|
-
const e =
|
|
161
|
+
}), je = g(
|
|
162
|
+
() => $.value.slice(ae.value.start, ae.value.end).map((e, t) => ({ task: e, index: t + ae.value.start }))
|
|
163
|
+
), Dt = g(
|
|
164
|
+
() => Y.value === "day" ? 36 : Y.value === "week" ? 17 : Y.value === "month" ? 7 : 36
|
|
165
|
+
), q = g(() => {
|
|
166
|
+
const e = X(ke);
|
|
164
167
|
let t = e - 7, s = e + 21;
|
|
165
|
-
for (const
|
|
166
|
-
t = Math.min(t,
|
|
168
|
+
for (const a of $.value)
|
|
169
|
+
t = Math.min(t, a.s), s = Math.max(s, a.e);
|
|
167
170
|
return { start: t - 7, end: s + 14 };
|
|
168
|
-
}),
|
|
171
|
+
}), Ue = g(() => q.value.end - q.value.start + 1), le = z(0), S = g(
|
|
169
172
|
() => Math.max(
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
Dt.value,
|
|
174
|
+
u.fitContainer ? le.value / Ue.value : 0
|
|
172
175
|
)
|
|
173
|
-
),
|
|
176
|
+
), Ve = g(
|
|
174
177
|
() => Math.max(
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
Ue.value * S.value,
|
|
179
|
+
u.fitContainer ? le.value : 0
|
|
177
180
|
)
|
|
178
181
|
);
|
|
179
|
-
let
|
|
180
|
-
const
|
|
181
|
-
width: () =>
|
|
182
|
-
min: () =>
|
|
183
|
-
max: () =>
|
|
184
|
-
enabled: () =>
|
|
185
|
-
available:
|
|
182
|
+
let se, C = !0;
|
|
183
|
+
const et = z(0), T = ha({
|
|
184
|
+
width: () => u.labelWidth,
|
|
185
|
+
min: () => u.minLabelWidth,
|
|
186
|
+
max: () => u.maxLabelWidth,
|
|
187
|
+
enabled: () => u.labelResizable,
|
|
188
|
+
available: et,
|
|
186
189
|
live: () => C,
|
|
187
190
|
start: () => {
|
|
188
|
-
|
|
191
|
+
V(), i.cancel();
|
|
189
192
|
},
|
|
190
|
-
update: (e) =>
|
|
191
|
-
commit: (e) =>
|
|
193
|
+
update: (e) => b("update:labelWidth", e),
|
|
194
|
+
commit: (e) => b("labelResize", e)
|
|
192
195
|
});
|
|
193
|
-
let
|
|
194
|
-
function
|
|
195
|
-
|
|
196
|
+
let Ee = !1, ve = 0, pe, xe, J = { top: 0, left: 0 };
|
|
197
|
+
function Lt() {
|
|
198
|
+
pe = void 0, C && u.virtual && (ce.value = Math.floor(J.top / x.value) * x.value);
|
|
196
199
|
}
|
|
197
|
-
|
|
198
|
-
[() =>
|
|
200
|
+
N(
|
|
201
|
+
[() => u.virtual, x],
|
|
199
202
|
() => {
|
|
200
203
|
var e;
|
|
201
|
-
|
|
202
|
-
(((e =
|
|
203
|
-
) *
|
|
204
|
+
ce.value = Math.floor(
|
|
205
|
+
(((e = w.value) == null ? void 0 : e.scrollTop) ?? J.top) / x.value
|
|
206
|
+
) * x.value;
|
|
204
207
|
},
|
|
205
208
|
{ flush: "sync" }
|
|
206
209
|
);
|
|
207
|
-
function
|
|
208
|
-
const e =
|
|
209
|
-
if (!C ||
|
|
210
|
-
const t =
|
|
211
|
-
|
|
210
|
+
function tt() {
|
|
211
|
+
const e = w.value;
|
|
212
|
+
if (!C || Ee || !(e != null && e.isConnected)) return;
|
|
213
|
+
const t = J.top !== e.scrollTop, s = J.left !== e.scrollLeft;
|
|
214
|
+
J = { top: e.scrollTop, left: e.scrollLeft }, (t || s) && M.close(), u.virtual && t && pe === void 0 && (pe = requestAnimationFrame(Lt));
|
|
212
215
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
216
|
+
function at() {
|
|
217
|
+
pe !== void 0 && cancelAnimationFrame(pe), xe !== void 0 && cancelAnimationFrame(xe), pe = xe = void 0;
|
|
215
218
|
}
|
|
216
|
-
function
|
|
217
|
-
var e, t, s,
|
|
218
|
-
C && (
|
|
219
|
+
function Ie() {
|
|
220
|
+
var e, t, s, a;
|
|
221
|
+
C && (et.value = ((e = w.value) == null ? void 0 : e.clientWidth) || 0, Le.value = ((t = De.value) == null ? void 0 : t.offsetWidth) || T.width.value, Ae.value = ((s = w.value) == null ? void 0 : s.clientHeight) || 620, le.value = Math.max(
|
|
219
222
|
0,
|
|
220
|
-
(((
|
|
223
|
+
(((a = w.value) == null ? void 0 : a.clientWidth) || 0) - Le.value
|
|
221
224
|
));
|
|
222
225
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
226
|
+
function We() {
|
|
227
|
+
se == null || se.disconnect(), se = void 0, window.removeEventListener("resize", Ie);
|
|
225
228
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
229
|
+
function lt() {
|
|
230
|
+
We(), !(!C || !w.value) && (Ie(), typeof ResizeObserver < "u" ? (se = new ResizeObserver(Ie), se.observe(w.value), De.value && se.observe(De.value)) : window.addEventListener("resize", Ie));
|
|
228
231
|
}
|
|
229
|
-
|
|
230
|
-
const e = ++
|
|
231
|
-
C = !0,
|
|
232
|
-
|
|
232
|
+
Yt(lt), Xt(async () => {
|
|
233
|
+
const e = ++ve;
|
|
234
|
+
C = !0, Ee = !0, await te(), !(!C || e !== ve) && (lt(), await te(), !(!C || e !== ve || !w.value) && (w.value.scrollTop = J.top, w.value.scrollLeft = J.left, ce.value = w.value.scrollTop, xe = requestAnimationFrame(() => {
|
|
235
|
+
xe = void 0, C && e === ve && (Ee = !1, tt());
|
|
233
236
|
})));
|
|
234
|
-
}),
|
|
235
|
-
C = !1,
|
|
236
|
-
}),
|
|
237
|
-
C = !1,
|
|
237
|
+
}), Jt(() => {
|
|
238
|
+
C = !1, Ee = !0, ve++, at(), We(), V();
|
|
239
|
+
}), Qt(() => {
|
|
240
|
+
C = !1, ve++, at(), We(), V();
|
|
238
241
|
});
|
|
239
|
-
function
|
|
240
|
-
!["day", "week", "month"].includes(e) || e ===
|
|
242
|
+
function $t(e) {
|
|
243
|
+
!["day", "week", "month"].includes(e) || e === Y.value || (i.cancel(), V(), Y.value = e, b("update:scale", e), b("scaleChange", e));
|
|
241
244
|
}
|
|
242
|
-
const
|
|
243
|
-
() => Array.from({ length:
|
|
244
|
-
),
|
|
245
|
+
const _e = g(
|
|
246
|
+
() => Array.from({ length: Ue.value }, (e, t) => q.value.start + t)
|
|
247
|
+
), Et = g(() => {
|
|
245
248
|
const e = [];
|
|
246
|
-
for (let t = 0; t <
|
|
247
|
-
const s =
|
|
248
|
-
(
|
|
249
|
-
key:
|
|
249
|
+
for (let t = 0; t < _e.value.length; t++) {
|
|
250
|
+
const s = we(_e.value[t]), a = `${s.getUTCFullYear()}-${s.getUTCMonth()}`, n = e[e.length - 1];
|
|
251
|
+
(n == null ? void 0 : n.key) === a ? n.width += S.value : e.push({
|
|
252
|
+
key: a,
|
|
250
253
|
label: `${s.getUTCFullYear()}年${s.getUTCMonth() + 1}月`,
|
|
251
|
-
left: t *
|
|
252
|
-
width:
|
|
254
|
+
left: t * S.value,
|
|
255
|
+
width: S.value
|
|
253
256
|
});
|
|
254
257
|
}
|
|
255
258
|
return e;
|
|
256
|
-
}),
|
|
259
|
+
}), he = g(
|
|
257
260
|
() => new Map(
|
|
258
|
-
|
|
261
|
+
$.value.map((e, t) => [
|
|
259
262
|
e.id,
|
|
260
263
|
{
|
|
261
|
-
x: (e.s -
|
|
262
|
-
w: (e.e - e.s + 1) *
|
|
263
|
-
y: t *
|
|
264
|
+
x: (e.s - q.value.start) * S.value,
|
|
265
|
+
w: (e.e - e.s + 1) * S.value,
|
|
266
|
+
y: t * x.value + x.value / 2,
|
|
264
267
|
index: t
|
|
265
268
|
}
|
|
266
269
|
])
|
|
267
270
|
)
|
|
268
|
-
),
|
|
269
|
-
() =>
|
|
271
|
+
), Be = g(
|
|
272
|
+
() => $.value.flatMap(
|
|
270
273
|
(e) => [...new Set(e.dependencies ?? [])].flatMap((t) => {
|
|
271
|
-
var
|
|
272
|
-
const s =
|
|
273
|
-
return !s || !
|
|
274
|
+
var n;
|
|
275
|
+
const s = he.value.get(t), a = he.value.get(e.id);
|
|
276
|
+
return !s || !a || t === e.id ? [] : [
|
|
274
277
|
{
|
|
275
278
|
id: JSON.stringify([t, e.id]),
|
|
276
279
|
sourceId: t,
|
|
277
|
-
sourceTitle:
|
|
280
|
+
sourceTitle: $.value[s.index].title,
|
|
278
281
|
targetId: e.id,
|
|
279
282
|
targetTitle: e.title,
|
|
280
|
-
first: Math.min(s.index,
|
|
281
|
-
last: Math.max(s.index,
|
|
282
|
-
endpoint: { x:
|
|
283
|
-
editable: !e.disabled && !((
|
|
283
|
+
first: Math.min(s.index, a.index),
|
|
284
|
+
last: Math.max(s.index, a.index),
|
|
285
|
+
endpoint: { x: a.x - 9, y: a.y },
|
|
286
|
+
editable: !e.disabled && !((n = $.value[s.index]) != null && n.disabled),
|
|
284
287
|
removable: !e.disabled,
|
|
285
|
-
path:
|
|
286
|
-
pickPath:
|
|
288
|
+
path: na(s, a, x.value),
|
|
289
|
+
pickPath: ia(s, a, x.value)
|
|
287
290
|
}
|
|
288
291
|
];
|
|
289
292
|
})
|
|
290
293
|
)
|
|
291
|
-
),
|
|
292
|
-
() =>
|
|
293
|
-
(e) => e.last >=
|
|
294
|
-
) :
|
|
295
|
-
),
|
|
294
|
+
), st = g(
|
|
295
|
+
() => u.virtual ? Be.value.filter(
|
|
296
|
+
(e) => e.last >= ae.value.start && e.first < ae.value.end
|
|
297
|
+
) : Be.value
|
|
298
|
+
), Ce = g(() => {
|
|
296
299
|
const e = /* @__PURE__ */ new Map();
|
|
297
|
-
for (const t of
|
|
300
|
+
for (const t of Be.value) {
|
|
298
301
|
const s = e.get(t.targetId);
|
|
299
302
|
s ? s.push(t) : e.set(t.targetId, [t]);
|
|
300
303
|
}
|
|
301
304
|
return e;
|
|
302
|
-
}),
|
|
303
|
-
() => [...
|
|
304
|
-
const s =
|
|
305
|
-
return t.length > 1 && s && s.index >=
|
|
305
|
+
}), _t = g(
|
|
306
|
+
() => [...Ce.value].flatMap(([e, t]) => {
|
|
307
|
+
const s = he.value.get(e);
|
|
308
|
+
return t.length > 1 && s && s.index >= ae.value.start && s.index < ae.value.end ? [
|
|
306
309
|
{
|
|
307
310
|
id: e,
|
|
308
311
|
title: t[0].targetTitle,
|
|
@@ -312,350 +315,350 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
|
|
|
312
315
|
}
|
|
313
316
|
] : [];
|
|
314
317
|
})
|
|
315
|
-
),
|
|
316
|
-
() =>
|
|
317
|
-
),
|
|
318
|
-
items: () =>
|
|
319
|
-
enabled: () =>
|
|
320
|
-
limit: () =>
|
|
318
|
+
), F = g(
|
|
319
|
+
() => u.dependencyEditable ?? u.editable
|
|
320
|
+
), m = fa({
|
|
321
|
+
items: () => u.items,
|
|
322
|
+
enabled: () => u.history,
|
|
323
|
+
limit: () => u.historyLimit,
|
|
321
324
|
live: () => C,
|
|
322
325
|
allowed: (e, t) => !e.disabled && t.every(
|
|
323
|
-
(s) => s === "dependencies" ?
|
|
326
|
+
(s) => s === "dependencies" ? F.value : u.editable
|
|
324
327
|
),
|
|
325
|
-
send: (e) =>
|
|
326
|
-
change: (e) =>
|
|
328
|
+
send: (e) => b("update:items", e),
|
|
329
|
+
change: (e) => b("change", e),
|
|
327
330
|
beforeReplay: () => {
|
|
328
|
-
|
|
331
|
+
V(), i.cancel(), i.clearSelected(), M.close();
|
|
329
332
|
},
|
|
330
333
|
external: () => {
|
|
331
|
-
|
|
334
|
+
V(), i.cancel(), i.clearSelected(), M.close();
|
|
332
335
|
},
|
|
333
|
-
state: (e) =>
|
|
334
|
-
invalid: (e) =>
|
|
336
|
+
state: (e) => b("historyChange", e),
|
|
337
|
+
invalid: (e) => b("historyInvalid", e),
|
|
335
338
|
replay: (e, t) => {
|
|
336
339
|
var s;
|
|
337
|
-
|
|
340
|
+
b(e === "undo" ? "undo" : "redo", t), (s = w.value) == null || s.focus({ preventScroll: !0 });
|
|
338
341
|
}
|
|
339
|
-
}),
|
|
340
|
-
() => new Map(
|
|
341
|
-
),
|
|
342
|
-
() =>
|
|
343
|
-
),
|
|
344
|
-
const e =
|
|
345
|
-
return e ?
|
|
342
|
+
}), Ne = g(
|
|
343
|
+
() => new Map(u.items.map((e) => [e.id, e]))
|
|
344
|
+
), ie = g(() => ya(u.items)), ne = g(() => ie.value.conflicts), Kt = g(
|
|
345
|
+
() => ne.value.map((e) => ({ ...e }))
|
|
346
|
+
), ee = z(!1), ge = z(""), oe = z(1), it = "hys-gantt-conflicts-" + Zt(), fe = g(() => {
|
|
347
|
+
const e = ge.value.trim().toLocaleLowerCase();
|
|
348
|
+
return e ? ne.value.filter(
|
|
346
349
|
(t) => (t.taskTitle + " " + t.taskId + " " + (t.sourceTitle ?? "") + " " + (t.sourceId ?? "") + " " + t.message).toLocaleLowerCase().includes(e)
|
|
347
|
-
) :
|
|
348
|
-
}),
|
|
349
|
-
() =>
|
|
350
|
-
(
|
|
351
|
-
|
|
350
|
+
) : ne.value;
|
|
351
|
+
}), Ht = g(
|
|
352
|
+
() => fe.value.slice(
|
|
353
|
+
(oe.value - 1) * 10,
|
|
354
|
+
oe.value * 10
|
|
352
355
|
)
|
|
353
356
|
);
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
Math.max(1, Math.ceil(
|
|
357
|
+
N([fe, ge], () => {
|
|
358
|
+
oe.value = Math.min(
|
|
359
|
+
oe.value,
|
|
360
|
+
Math.max(1, Math.ceil(fe.value.length / 10))
|
|
358
361
|
);
|
|
359
|
-
}),
|
|
360
|
-
() =>
|
|
362
|
+
}), N(ge, () => oe.value = 1), N(
|
|
363
|
+
() => u.showConflicts,
|
|
361
364
|
(e) => {
|
|
362
|
-
e || (
|
|
365
|
+
e || (ee.value = !1);
|
|
363
366
|
}
|
|
364
367
|
);
|
|
365
|
-
let
|
|
366
|
-
|
|
367
|
-
|
|
368
|
+
let nt = "";
|
|
369
|
+
N(
|
|
370
|
+
ne,
|
|
368
371
|
(e) => {
|
|
369
372
|
const t = JSON.stringify(e);
|
|
370
|
-
t !==
|
|
373
|
+
t !== nt && (nt = t, b(
|
|
371
374
|
"conflictChange",
|
|
372
375
|
e.map((s) => ({ ...s }))
|
|
373
376
|
));
|
|
374
377
|
},
|
|
375
378
|
{ immediate: !0 }
|
|
376
379
|
);
|
|
377
|
-
const i =
|
|
378
|
-
items: () =>
|
|
379
|
-
rows: () =>
|
|
380
|
-
enabled:
|
|
380
|
+
const i = oa({
|
|
381
|
+
items: () => u.items,
|
|
382
|
+
rows: () => $.value,
|
|
383
|
+
enabled: F,
|
|
381
384
|
live: () => C,
|
|
382
|
-
root:
|
|
383
|
-
viewport:
|
|
384
|
-
grid:
|
|
385
|
-
labelWidth: () =>
|
|
386
|
-
rowHeight: () =>
|
|
387
|
-
position: (e) =>
|
|
388
|
-
locate:
|
|
389
|
-
cancelTask:
|
|
385
|
+
root: Se,
|
|
386
|
+
viewport: w,
|
|
387
|
+
grid: Qe,
|
|
388
|
+
labelWidth: () => Le.value,
|
|
389
|
+
rowHeight: () => x.value,
|
|
390
|
+
position: (e) => he.value.get(e),
|
|
391
|
+
locate: Me,
|
|
392
|
+
cancelTask: V,
|
|
390
393
|
update: (e, t) => {
|
|
391
|
-
var s,
|
|
392
|
-
return
|
|
394
|
+
var s, a;
|
|
395
|
+
return m.capture(e, {
|
|
393
396
|
type: t.type === "add" ? "dependency-add" : t.type === "remove" ? "dependency-remove" : "dependency-move",
|
|
394
|
-
label: (t.type === "add" ? "添加依赖:" : t.type === "remove" ? "删除依赖:" : "改接依赖:") + (((s =
|
|
397
|
+
label: (t.type === "add" ? "添加依赖:" : t.type === "remove" ? "删除依赖:" : "改接依赖:") + (((s = Ne.value.get(t.sourceId)) == null ? void 0 : s.title) ?? t.sourceId) + " → " + (((a = Ne.value.get(t.targetId)) == null ? void 0 : a.title) ?? t.targetId)
|
|
395
398
|
});
|
|
396
399
|
},
|
|
397
|
-
change: (e) =>
|
|
398
|
-
added: (e, t) =>
|
|
399
|
-
removed: (e, t) =>
|
|
400
|
-
moved: (e, t, s) =>
|
|
401
|
-
invalid: (e) =>
|
|
402
|
-
}),
|
|
400
|
+
change: (e) => b("change", e),
|
|
401
|
+
added: (e, t) => b("dependencyAdd", e, t),
|
|
402
|
+
removed: (e, t) => b("dependencyRemove", e, t),
|
|
403
|
+
moved: (e, t, s) => b("dependencyMove", e, t, s),
|
|
404
|
+
invalid: (e) => b("dependencyInvalid", e)
|
|
405
|
+
}), re = g(() => {
|
|
403
406
|
var t;
|
|
404
407
|
const e = i.selected.value;
|
|
405
|
-
return e ? (t =
|
|
406
|
-
}),
|
|
408
|
+
return e ? (t = Ce.value.get(e.targetId)) == null ? void 0 : t.find((s) => s.sourceId === e.sourceId) : void 0;
|
|
409
|
+
}), ot = jt(), ye = z(), ue = z(), Ke = z(""), Te = z(), Pe = z(""), M = ga(ot, ye, {
|
|
407
410
|
placement: "bottom-start",
|
|
408
411
|
gap: 8,
|
|
409
412
|
width: () => 380
|
|
410
|
-
}),
|
|
411
|
-
() =>
|
|
412
|
-
),
|
|
413
|
-
const e =
|
|
414
|
-
return e ?
|
|
413
|
+
}), de = g(
|
|
414
|
+
() => ue.value === void 0 ? [] : Ce.value.get(ue.value) ?? []
|
|
415
|
+
), rt = g(() => {
|
|
416
|
+
const e = Ke.value.trim().toLocaleLowerCase();
|
|
417
|
+
return e ? de.value.filter(
|
|
415
418
|
(t) => (t.sourceTitle + " " + t.sourceId).toLocaleLowerCase().includes(e)
|
|
416
|
-
) :
|
|
419
|
+
) : de.value;
|
|
417
420
|
});
|
|
418
|
-
async function
|
|
419
|
-
var s,
|
|
420
|
-
if (!(!C || !
|
|
421
|
-
if (M.open.value &&
|
|
421
|
+
async function qe(e, t) {
|
|
422
|
+
var s, a, n;
|
|
423
|
+
if (!(!C || !F.value)) {
|
|
424
|
+
if (M.open.value && ue.value === t) {
|
|
422
425
|
M.close(!0);
|
|
423
426
|
return;
|
|
424
427
|
}
|
|
425
|
-
i.cancel(!i.selected.value), M.close(),
|
|
428
|
+
i.cancel(!i.selected.value), M.close(), ue.value = t, Ke.value = "", Pe.value = "", ot.value = e.currentTarget, await M.show(), C && M.open.value && ((n = ((s = ye.value) == null ? void 0 : s.querySelector(
|
|
426
429
|
'[data-pg-choice][aria-pressed="true"]'
|
|
427
|
-
)) ?? ((
|
|
430
|
+
)) ?? ((a = ye.value) == null ? void 0 : a.querySelector("[data-pg-choice]"))) == null || n.focus());
|
|
428
431
|
}
|
|
429
432
|
}
|
|
430
|
-
async function
|
|
431
|
-
var
|
|
432
|
-
if (M.close(), i.selectEdge(e, t.sourceId, t.targetId), await
|
|
433
|
+
async function Ft(e, t) {
|
|
434
|
+
var a, n;
|
|
435
|
+
if (M.close(), i.selectEdge(e, t.sourceId, t.targetId), await te(), !C) return;
|
|
433
436
|
const s = [
|
|
434
|
-
...((
|
|
435
|
-
].find((
|
|
436
|
-
(
|
|
437
|
+
...((a = Se.value) == null ? void 0 : a.querySelectorAll(".hys-ui-pg-edge-group")) ?? []
|
|
438
|
+
].find((v) => v.dataset.edgeKey === t.id);
|
|
439
|
+
(n = (s == null ? void 0 : s.querySelector(".hys-ui-pg-edge-endpoint-hit")) ?? (s == null ? void 0 : s.querySelector(".hys-ui-pg-edge-hit"))) == null || n.focus({ preventScroll: !0 });
|
|
437
440
|
}
|
|
438
|
-
async function
|
|
439
|
-
var
|
|
440
|
-
M.close(), t && s && i.selectEdge(t, s.sourceId, s.targetId), await
|
|
441
|
+
async function ut(e, t, s) {
|
|
442
|
+
var a;
|
|
443
|
+
M.close(), t && s && i.selectEdge(t, s.sourceId, s.targetId), await Me(e) && (K.value = e, b("update:modelValue", e), (a = w.value) == null || a.focus({ preventScroll: !0 }));
|
|
441
444
|
}
|
|
442
|
-
async function
|
|
443
|
-
M.close(), await
|
|
445
|
+
async function Rt(e) {
|
|
446
|
+
M.close(), await Me(e.targetId, { block: "nearest" }), i.beginKeyboard(e.sourceId, e.targetId);
|
|
444
447
|
}
|
|
445
|
-
async function
|
|
446
|
-
var t, s,
|
|
447
|
-
if (!
|
|
448
|
-
|
|
448
|
+
async function At(e) {
|
|
449
|
+
var t, s, a;
|
|
450
|
+
if (!Te.value) {
|
|
451
|
+
Te.value = e.id, Pe.value = "";
|
|
449
452
|
try {
|
|
450
|
-
await i.remove(e.sourceId, e.targetId) || (
|
|
453
|
+
await i.remove(e.sourceId, e.targetId) || (Pe.value = i.message.value);
|
|
451
454
|
} finally {
|
|
452
|
-
|
|
455
|
+
Te.value = void 0;
|
|
453
456
|
}
|
|
454
|
-
await
|
|
457
|
+
await te(), C && M.open.value ? (s = (t = ye.value) == null ? void 0 : t.querySelector("[data-pg-choice]")) == null || s.focus() : C && ((a = w.value) == null || a.focus({ preventScroll: !0 }));
|
|
455
458
|
}
|
|
456
459
|
}
|
|
457
|
-
function
|
|
458
|
-
var
|
|
459
|
-
if (
|
|
460
|
+
function Ut(e) {
|
|
461
|
+
var n, v;
|
|
462
|
+
if (ct(e) || !["ArrowUp", "ArrowDown", "Home", "End"].includes(e.key) || e.target instanceof HTMLInputElement && ["Home", "End"].includes(e.key))
|
|
460
463
|
return;
|
|
461
464
|
e.preventDefault(), e.stopPropagation();
|
|
462
465
|
const t = [
|
|
463
|
-
...((
|
|
466
|
+
...((n = ye.value) == null ? void 0 : n.querySelectorAll(
|
|
464
467
|
"[data-pg-choice]"
|
|
465
468
|
)) ?? []
|
|
466
|
-
], s = t.indexOf(document.activeElement),
|
|
467
|
-
(
|
|
469
|
+
], s = t.indexOf(document.activeElement), a = e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : s < 0 ? e.key === "ArrowUp" ? t.length - 1 : 0 : (s + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length;
|
|
470
|
+
(v = t[a]) == null || v.focus();
|
|
468
471
|
}
|
|
469
|
-
|
|
470
|
-
M.open.value && (
|
|
471
|
-
}),
|
|
472
|
-
[
|
|
472
|
+
N(de, () => {
|
|
473
|
+
M.open.value && (de.value.length < 2 ? M.close() : te(M.update));
|
|
474
|
+
}), N(
|
|
475
|
+
[F, () => u.showDependencies, () => !!i.draft.value],
|
|
473
476
|
() => {
|
|
474
|
-
(!
|
|
477
|
+
(!F.value || !u.showDependencies || i.draft.value) && M.close();
|
|
475
478
|
}
|
|
476
|
-
),
|
|
477
|
-
() =>
|
|
479
|
+
), N(
|
|
480
|
+
() => u.showDependencies,
|
|
478
481
|
(e) => {
|
|
479
482
|
e || i.cancel();
|
|
480
483
|
}
|
|
481
484
|
);
|
|
482
|
-
async function
|
|
485
|
+
async function Me(e, t = {}) {
|
|
483
486
|
if (!C) return !1;
|
|
484
|
-
const s =
|
|
485
|
-
if (s < 0 || (await
|
|
486
|
-
|
|
487
|
-
const
|
|
488
|
-
if (!
|
|
489
|
-
const
|
|
490
|
-
let
|
|
487
|
+
const s = $.value.findIndex((p) => p.id === e);
|
|
488
|
+
if (s < 0 || (await te(), !C || !w.value)) return !1;
|
|
489
|
+
Ie();
|
|
490
|
+
const a = w.value, n = $.value[s];
|
|
491
|
+
if (!n || n.id !== e) return !1;
|
|
492
|
+
const v = Math.max(x.value, a.clientHeight - 66), o = s * x.value, I = o + x.value;
|
|
493
|
+
let P = t.block === "start" ? o : t.block === "end" ? I - v : t.block === "nearest" ? o < a.scrollTop ? o : I > a.scrollTop + v ? I - v : a.scrollTop : o - (v - x.value) / 2, D = a.scrollLeft;
|
|
491
494
|
if (t.horizontal !== !1) {
|
|
492
|
-
const
|
|
493
|
-
|
|
495
|
+
const p = (n.s - q.value.start) * S.value, Q = (n.e - n.s + 1) * S.value;
|
|
496
|
+
p < D || Q > le.value ? D = p : p + Q > D + le.value && (D = p + Q - le.value);
|
|
494
497
|
}
|
|
495
|
-
const
|
|
496
|
-
top: Math.max(0,
|
|
497
|
-
left: Math.max(0,
|
|
498
|
+
const W = {
|
|
499
|
+
top: Math.max(0, P),
|
|
500
|
+
left: Math.max(0, D),
|
|
498
501
|
behavior: t.behavior ?? "auto"
|
|
499
502
|
};
|
|
500
|
-
return
|
|
503
|
+
return a.scrollTo ? a.scrollTo(W) : (a.scrollTop = W.top, a.scrollLeft = W.left), J = { top: a.scrollTop, left: a.scrollLeft }, ce.value = a.scrollTop, await te(), C;
|
|
501
504
|
}
|
|
502
|
-
function
|
|
503
|
-
if (!C || !
|
|
504
|
-
const t =
|
|
505
|
+
function Vt(e = {}) {
|
|
506
|
+
if (!C || !w.value) return;
|
|
507
|
+
const t = w.value;
|
|
505
508
|
t.scrollTo ? t.scrollTo({
|
|
506
509
|
top: 0,
|
|
507
510
|
left: t.scrollLeft,
|
|
508
511
|
behavior: e.behavior ?? "auto"
|
|
509
|
-
}) : t.scrollTop = 0,
|
|
512
|
+
}) : t.scrollTop = 0, J = { top: t.scrollTop, left: t.scrollLeft }, ce.value = t.scrollTop;
|
|
510
513
|
}
|
|
511
|
-
function
|
|
514
|
+
function He(e) {
|
|
512
515
|
var t;
|
|
513
516
|
if (((t = i.draft.value) == null ? void 0 : t.mode) === "keyboard") {
|
|
514
517
|
i.submit(e.id);
|
|
515
518
|
return;
|
|
516
519
|
}
|
|
517
|
-
performance.now() <
|
|
520
|
+
performance.now() < ht || (i.clearSelected(), K.value = e.id, b("update:modelValue", e.id), b("open", e));
|
|
518
521
|
}
|
|
519
|
-
function
|
|
520
|
-
|
|
522
|
+
function dt() {
|
|
523
|
+
K.value !== null && (K.value = null, b("update:modelValue", null));
|
|
521
524
|
}
|
|
522
|
-
function
|
|
523
|
-
|
|
525
|
+
function Wt(e) {
|
|
526
|
+
ct(e) || (i.key(e), !(e.defaultPrevented || e.key !== "Escape") && (!E.value && K.value === null || (E.value ? V() : dt(), e.preventDefault(), e.stopPropagation())));
|
|
524
527
|
}
|
|
525
|
-
function
|
|
526
|
-
if (!
|
|
528
|
+
function ct(e) {
|
|
529
|
+
if (!m.enabled.value || !u.historyKeyboard || e.defaultPrevented || e.isComposing || e.altKey || !(e.ctrlKey || e.metaKey))
|
|
527
530
|
return !1;
|
|
528
531
|
const t = e.key.toLowerCase(), s = t === "y" || t === "z" && e.shiftKey;
|
|
529
532
|
return t !== "z" && t !== "y" || e.target instanceof Element && e.target.closest(
|
|
530
533
|
'input,textarea,select,[contenteditable="true"],[role="textbox"]'
|
|
531
|
-
) ? !1 : (e.preventDefault(), e.stopPropagation(),
|
|
534
|
+
) ? !1 : (e.preventDefault(), e.stopPropagation(), E.value || i.draft.value || T.resizing.value ? (V(), i.cancel(), T.cancel(), !0) : (m.pending.value || (s ? m.redo() : m.undo()), !0));
|
|
532
535
|
}
|
|
533
|
-
function
|
|
536
|
+
function vt(e) {
|
|
534
537
|
if (e.type === "click" && e.detail > 0 || e.target instanceof Element && e.target.closest(
|
|
535
538
|
".hys-ui-pg-edge-hit, .hys-ui-pg-edge-endpoint-hit, .hys-ui-pg-incoming-trigger, .hys-ui-pg-link-feedback button"
|
|
536
539
|
))
|
|
537
540
|
return;
|
|
538
541
|
i.clearSelected(), M.close();
|
|
539
542
|
const t = e.target;
|
|
540
|
-
!i.draft.value && !
|
|
543
|
+
!i.draft.value && !E.value && t instanceof Element && !t.closest(
|
|
541
544
|
".hys-ui-pg-bar, .hys-ui-pg-task-label, .hys-ui-pg-link-port"
|
|
542
|
-
) && (t ===
|
|
545
|
+
) && (t === w.value || t.closest(".hys-ui-pg-grid, .hys-ui-pg-task-list")) && dt();
|
|
543
546
|
}
|
|
544
|
-
function
|
|
547
|
+
function pt() {
|
|
545
548
|
if (!C) return;
|
|
546
|
-
const e =
|
|
549
|
+
const e = w.value;
|
|
547
550
|
e && (e.scrollLeft = Math.max(
|
|
548
551
|
0,
|
|
549
|
-
(
|
|
552
|
+
(X(ke) - q.value.start) * S.value - le.value / 3
|
|
550
553
|
));
|
|
551
554
|
}
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
let
|
|
555
|
-
function
|
|
555
|
+
N(Y, () => te(pt));
|
|
556
|
+
const E = z(null);
|
|
557
|
+
let Ge, ht = 0;
|
|
558
|
+
function gt() {
|
|
556
559
|
var t, s;
|
|
557
|
-
const e =
|
|
558
|
-
|
|
560
|
+
const e = Ge;
|
|
561
|
+
Ge = void 0, (s = e == null ? void 0 : (t = e.element).hasPointerCapture) != null && s.call(t, e.id) && e.element.releasePointerCapture(e.id);
|
|
559
562
|
}
|
|
560
|
-
function
|
|
561
|
-
|
|
563
|
+
function V() {
|
|
564
|
+
E.value && (ht = performance.now() + 350), E.value = null, gt();
|
|
562
565
|
}
|
|
563
|
-
function
|
|
564
|
-
var
|
|
565
|
-
!
|
|
566
|
+
function Oe(e, t, s) {
|
|
567
|
+
var a;
|
|
568
|
+
!u.editable || t.disabled || e.button !== 0 || m.pending.value || (e.preventDefault(), e.stopPropagation(), e.currentTarget.setPointerCapture(e.pointerId), Ge = { element: e.currentTarget, id: e.pointerId }, (a = e.currentTarget.closest(".hys-ui-pg-bar")) == null || a.focus({ preventScroll: !0 }), E.value = {
|
|
566
569
|
id: t.id,
|
|
567
570
|
type: s,
|
|
568
571
|
x: e.clientX,
|
|
569
572
|
original: { ...t },
|
|
570
573
|
days: 0,
|
|
571
|
-
unitWidth:
|
|
572
|
-
},
|
|
574
|
+
unitWidth: S.value
|
|
575
|
+
}, K.value = t.id, b("update:modelValue", t.id));
|
|
573
576
|
}
|
|
574
|
-
function
|
|
575
|
-
|
|
576
|
-
(e.clientX -
|
|
577
|
+
function Ye(e) {
|
|
578
|
+
E.value && (E.value.days = Math.round(
|
|
579
|
+
(e.clientX - E.value.x) / E.value.unitWidth
|
|
577
580
|
));
|
|
578
581
|
}
|
|
579
|
-
function
|
|
580
|
-
const t =
|
|
581
|
-
if (!t || (
|
|
582
|
-
const s =
|
|
583
|
-
if (!
|
|
584
|
-
const
|
|
585
|
-
if (!
|
|
586
|
-
let
|
|
587
|
-
t.type === "move" ? (
|
|
588
|
-
const
|
|
582
|
+
function me(e) {
|
|
583
|
+
const t = E.value;
|
|
584
|
+
if (!t || (E.value = null, gt(), e.type === "pointercancel" || !t.days)) return;
|
|
585
|
+
const s = Ne.value.get(t.id);
|
|
586
|
+
if (!u.editable || !s || s.disabled) return;
|
|
587
|
+
const a = be(t.original.start), n = be(t.original.end);
|
|
588
|
+
if (!a || !n) return;
|
|
589
|
+
let v = X(a), o = X(n);
|
|
590
|
+
t.type === "move" ? (v += t.days, o += t.days) : t.type === "start" ? v = Math.min(o, v + t.days) : o = Math.max(v, o + t.days);
|
|
591
|
+
const I = {
|
|
589
592
|
...s,
|
|
590
|
-
start:
|
|
591
|
-
end:
|
|
593
|
+
start: $e(v),
|
|
594
|
+
end: $e(o)
|
|
592
595
|
};
|
|
593
|
-
|
|
594
|
-
|
|
596
|
+
m.capture(
|
|
597
|
+
u.items.map((P) => P.id === I.id ? I : P),
|
|
595
598
|
{
|
|
596
599
|
type: t.type === "move" ? "move" : t.type === "start" ? "resize-start" : "resize-end",
|
|
597
|
-
label: (t.type === "move" ? "移动任务:" : t.type === "start" ? "调整开始日期:" : "调整结束日期:") +
|
|
600
|
+
label: (t.type === "move" ? "移动任务:" : t.type === "start" ? "调整开始日期:" : "调整结束日期:") + I.title
|
|
598
601
|
}
|
|
599
|
-
) &&
|
|
602
|
+
) && b("change", I);
|
|
600
603
|
}
|
|
601
|
-
function
|
|
602
|
-
const t =
|
|
604
|
+
function ft(e) {
|
|
605
|
+
const t = E.value;
|
|
603
606
|
if (!t || t.id !== e.id) return { s: e.s, e: e.e };
|
|
604
607
|
const s = t.days;
|
|
605
608
|
return t.type === "move" ? { s: e.s + s, e: e.e + s } : t.type === "start" ? { s: Math.min(e.e, e.s + s), e: e.e } : { s: e.s, e: Math.max(e.s, e.e + s) };
|
|
606
609
|
}
|
|
607
|
-
function
|
|
608
|
-
const t =
|
|
610
|
+
function Bt(e) {
|
|
611
|
+
const t = ft(e);
|
|
609
612
|
return {
|
|
610
|
-
left: `${(t.s -
|
|
611
|
-
width: `${Math.max(
|
|
613
|
+
left: `${(t.s - q.value.start) * S.value}px`,
|
|
614
|
+
width: `${Math.max(S.value, (t.e - t.s + 1) * S.value)}px`,
|
|
612
615
|
background: e.color || "var(--hys-ui-primary,var(--hys-ui-theme-primary, #4776ed))"
|
|
613
616
|
};
|
|
614
617
|
}
|
|
615
|
-
function
|
|
618
|
+
function Nt(e) {
|
|
616
619
|
return {
|
|
617
|
-
left: (
|
|
620
|
+
left: (ft(e).e - q.value.start + 1) * S.value + 5 + "px"
|
|
618
621
|
};
|
|
619
622
|
}
|
|
620
|
-
function
|
|
621
|
-
if (!
|
|
622
|
-
const s =
|
|
623
|
-
if (!s || !
|
|
624
|
-
const
|
|
623
|
+
function Fe(e, t) {
|
|
624
|
+
if (!u.editable || e.disabled || m.pending.value) return;
|
|
625
|
+
const s = be(e.start), a = be(e.end);
|
|
626
|
+
if (!s || !a) return;
|
|
627
|
+
const n = {
|
|
625
628
|
...e,
|
|
626
|
-
start:
|
|
627
|
-
end:
|
|
629
|
+
start: $e(X(s) + t),
|
|
630
|
+
end: $e(X(a) + t)
|
|
628
631
|
};
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
{ type: "nudge", label: "微调排期:" +
|
|
632
|
-
) &&
|
|
632
|
+
m.capture(
|
|
633
|
+
u.items.map((v) => v.id === e.id ? n : v),
|
|
634
|
+
{ type: "nudge", label: "微调排期:" + n.title }
|
|
635
|
+
) && b("change", n);
|
|
633
636
|
}
|
|
634
|
-
const
|
|
635
|
-
const e =
|
|
637
|
+
const G = g(() => {
|
|
638
|
+
const e = E.value;
|
|
636
639
|
if (!e || !e.days) return;
|
|
637
|
-
const t =
|
|
640
|
+
const t = ie.value.tasks.get(e.id);
|
|
638
641
|
if (!t || t.s === null || t.e === null) return;
|
|
639
|
-
const s = e.type === "end" ? t.s : e.type === "start" ? Math.min(t.e, t.s + e.days) : t.s + e.days,
|
|
640
|
-
(
|
|
641
|
-
const
|
|
642
|
-
return (
|
|
642
|
+
const s = e.type === "end" ? t.s : e.type === "start" ? Math.min(t.e, t.s + e.days) : t.s + e.days, a = e.type === "start" ? t.e : e.type === "end" ? Math.max(t.s, t.e + e.days) : t.e + e.days, n = (ie.value.incident.get(e.id) ?? []).flatMap(
|
|
643
|
+
(P) => {
|
|
644
|
+
const D = ie.value.byEdge.get(P.id);
|
|
645
|
+
return (D == null ? void 0 : D.type) === "dependency-order" ? [D] : [];
|
|
643
646
|
}
|
|
644
|
-
),
|
|
647
|
+
), v = ma(ie.value, e.id, s, a), o = new Set(n.map((P) => P.id)), I = new Set(v.map((P) => P.id));
|
|
645
648
|
return {
|
|
646
|
-
conflicts:
|
|
647
|
-
added:
|
|
648
|
-
resolved:
|
|
649
|
-
before:
|
|
649
|
+
conflicts: v,
|
|
650
|
+
added: v.filter((P) => !o.has(P.id)).length,
|
|
651
|
+
resolved: n.filter((P) => !I.has(P.id)).length,
|
|
652
|
+
before: n.length
|
|
650
653
|
};
|
|
651
654
|
});
|
|
652
|
-
function
|
|
653
|
-
return
|
|
655
|
+
function Re(e) {
|
|
656
|
+
return ie.value.byTask.get(e) ?? [];
|
|
654
657
|
}
|
|
655
|
-
function
|
|
656
|
-
return
|
|
658
|
+
function yt(e, t) {
|
|
659
|
+
return ie.value.byEdge.get(ka(e, t));
|
|
657
660
|
}
|
|
658
|
-
function
|
|
661
|
+
function qt(e) {
|
|
659
662
|
return {
|
|
660
663
|
"dependency-order": "前后置日期冲突",
|
|
661
664
|
"invalid-date": "日期无效",
|
|
@@ -663,102 +666,102 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
|
|
|
663
666
|
"dependency-cycle": "循环依赖"
|
|
664
667
|
}[e];
|
|
665
668
|
}
|
|
666
|
-
async function
|
|
669
|
+
async function Gt(e) {
|
|
667
670
|
var t;
|
|
668
|
-
await
|
|
671
|
+
await Me(e.taskId) && (K.value = e.taskId, b("update:modelValue", e.taskId), e.sourceId !== void 0 && he.value.has(e.sourceId) && i.selectEdge(new Event("select"), e.sourceId, e.taskId), (t = w.value) == null || t.focus({ preventScroll: !0 }));
|
|
669
672
|
}
|
|
670
|
-
return
|
|
671
|
-
element:
|
|
672
|
-
viewport:
|
|
673
|
-
scrollToTask:
|
|
674
|
-
scrollToTop:
|
|
673
|
+
return Pt({
|
|
674
|
+
element: Se,
|
|
675
|
+
viewport: w,
|
|
676
|
+
scrollToTask: Me,
|
|
677
|
+
scrollToTop: Vt,
|
|
675
678
|
addDependency: i.add,
|
|
676
679
|
removeDependency: i.remove,
|
|
677
680
|
moveDependency: i.moveTarget,
|
|
678
681
|
cancelDependency: () => i.cancel(),
|
|
679
|
-
undo:
|
|
680
|
-
redo:
|
|
681
|
-
clearHistory:
|
|
682
|
-
canUndo:
|
|
683
|
-
canRedo:
|
|
684
|
-
historyState:
|
|
685
|
-
conflicts:
|
|
682
|
+
undo: m.undo,
|
|
683
|
+
redo: m.redo,
|
|
684
|
+
clearHistory: m.clear,
|
|
685
|
+
canUndo: m.canUndo,
|
|
686
|
+
canRedo: m.canRedo,
|
|
687
|
+
historyState: m.state,
|
|
688
|
+
conflicts: Kt
|
|
686
689
|
}), (e, t) => {
|
|
687
|
-
var s
|
|
688
|
-
return
|
|
690
|
+
var s;
|
|
691
|
+
return r(), c("section", kt({
|
|
689
692
|
ref_key: "root",
|
|
690
|
-
ref:
|
|
691
|
-
}, l(
|
|
693
|
+
ref: Se
|
|
694
|
+
}, l(Je), {
|
|
692
695
|
class: ["hys-ui-pg-gantt", { "hys-ui-pg-resizing-label": l(T).resizing.value }],
|
|
693
696
|
"aria-label": "项目甘特图",
|
|
694
|
-
onKeydown:
|
|
695
|
-
onPointerdownCapture:
|
|
696
|
-
onClickCapture:
|
|
697
|
+
onKeydown: Wt,
|
|
698
|
+
onPointerdownCapture: vt,
|
|
699
|
+
onClickCapture: vt
|
|
697
700
|
}), [
|
|
698
|
-
|
|
699
|
-
|
|
701
|
+
d("div", ba, [
|
|
702
|
+
f(la, {
|
|
700
703
|
class: "hys-ui-pg-scale",
|
|
701
|
-
"model-value":
|
|
704
|
+
"model-value": Y.value,
|
|
702
705
|
options: [
|
|
703
706
|
{ label: "日", value: "day" },
|
|
704
707
|
{ label: "周", value: "week" },
|
|
705
708
|
{ label: "月", value: "month" }
|
|
706
709
|
],
|
|
707
710
|
"aria-label": "时间刻度",
|
|
708
|
-
"onUpdate:modelValue":
|
|
711
|
+
"onUpdate:modelValue": $t
|
|
709
712
|
}, null, 8, ["model-value"]),
|
|
710
|
-
|
|
713
|
+
f(U, {
|
|
711
714
|
variant: "secondary",
|
|
712
715
|
size: "sm",
|
|
713
716
|
class: "hys-ui-pg-today",
|
|
714
|
-
onClick:
|
|
717
|
+
onClick: pt
|
|
715
718
|
}, {
|
|
716
|
-
default:
|
|
717
|
-
|
|
719
|
+
default: H(() => [...t[23] || (t[23] = [
|
|
720
|
+
Z("定位今天", -1)
|
|
718
721
|
])]),
|
|
719
722
|
_: 1
|
|
720
723
|
}),
|
|
721
|
-
l(
|
|
722
|
-
|
|
724
|
+
l(m).enabled.value && L.showHistoryControls && (L.editable || F.value || l(m).state.value.undoCount || l(m).state.value.redoCount) ? (r(), c("div", wa, [
|
|
725
|
+
f(U, {
|
|
723
726
|
variant: "secondary",
|
|
724
727
|
size: "sm",
|
|
725
|
-
disabled: !l(
|
|
728
|
+
disabled: !l(m).canUndo.value,
|
|
726
729
|
"aria-label": "撤销",
|
|
727
|
-
title: (l(
|
|
728
|
-
onClick: t[0] || (t[0] = (a) => l(
|
|
730
|
+
title: (l(m).state.value.undoLabel ? "撤销:" + l(m).state.value.undoLabel : "没有可撤销的操作") + "(Ctrl/⌘ + Z)",
|
|
731
|
+
onClick: t[0] || (t[0] = (a) => l(m).undo())
|
|
729
732
|
}, {
|
|
730
|
-
default:
|
|
731
|
-
|
|
732
|
-
t[24] || (t[24] =
|
|
733
|
+
default: H(() => [
|
|
734
|
+
f(l(ra), { size: 15 }),
|
|
735
|
+
t[24] || (t[24] = Z("撤销", -1))
|
|
733
736
|
]),
|
|
734
737
|
_: 1
|
|
735
738
|
}, 8, ["disabled", "title"]),
|
|
736
|
-
|
|
739
|
+
f(U, {
|
|
737
740
|
variant: "secondary",
|
|
738
741
|
size: "sm",
|
|
739
|
-
disabled: !l(
|
|
742
|
+
disabled: !l(m).canRedo.value,
|
|
740
743
|
"aria-label": "重做",
|
|
741
|
-
title: (l(
|
|
742
|
-
onClick: t[1] || (t[1] = (a) => l(
|
|
744
|
+
title: (l(m).state.value.redoLabel ? "重做:" + l(m).state.value.redoLabel : "没有可重做的操作") + "(Ctrl/⌘ + Shift + Z)",
|
|
745
|
+
onClick: t[1] || (t[1] = (a) => l(m).redo())
|
|
743
746
|
}, {
|
|
744
|
-
default:
|
|
745
|
-
|
|
746
|
-
t[25] || (t[25] =
|
|
747
|
+
default: H(() => [
|
|
748
|
+
f(l(ua), { size: 15 }),
|
|
749
|
+
t[25] || (t[25] = Z("重做", -1))
|
|
747
750
|
]),
|
|
748
751
|
_: 1
|
|
749
752
|
}, 8, ["disabled", "title"])
|
|
750
|
-
])) :
|
|
751
|
-
|
|
753
|
+
])) : y("", !0),
|
|
754
|
+
d("span", xa, h(L.editable ? "拖动任务条调整排期 · Alt + 左/右方向键微调日期 · Esc / 点击空白取消选中" : "点击任务查看详情 · Esc / 点击空白取消选中"), 1)
|
|
752
755
|
]),
|
|
753
|
-
|
|
756
|
+
d("div", {
|
|
754
757
|
ref_key: "scroller",
|
|
755
|
-
ref:
|
|
758
|
+
ref: w,
|
|
756
759
|
class: "hys-ui-pg-body hys-ui-pg-scroll",
|
|
757
|
-
style:
|
|
760
|
+
style: _(zt.value),
|
|
758
761
|
role: "region",
|
|
759
762
|
tabindex: "0",
|
|
760
763
|
"aria-label": "可滚动的甘特图任务与时间轴",
|
|
761
|
-
onScrollPassive:
|
|
764
|
+
onScrollPassive: tt,
|
|
762
765
|
onPointermove: t[11] || (t[11] = //@ts-ignore
|
|
763
766
|
(...a) => l(i).move && l(i).move(...a)),
|
|
764
767
|
onPointerup: t[12] || (t[12] = //@ts-ignore
|
|
@@ -768,18 +771,18 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
|
|
|
768
771
|
onLostpointercapture: t[14] || (t[14] = //@ts-ignore
|
|
769
772
|
(...a) => l(i).lost && l(i).lost(...a))
|
|
770
773
|
}, [
|
|
771
|
-
|
|
774
|
+
d("div", {
|
|
772
775
|
ref_key: "labels",
|
|
773
|
-
ref:
|
|
776
|
+
ref: De,
|
|
774
777
|
class: "hys-ui-pg-labels",
|
|
775
|
-
style:
|
|
778
|
+
style: _({
|
|
776
779
|
width: l(T).width.value + "px",
|
|
777
780
|
minWidth: l(T).width.value + "px"
|
|
778
781
|
})
|
|
779
782
|
}, [
|
|
780
|
-
|
|
781
|
-
t[26] || (t[26] =
|
|
782
|
-
|
|
783
|
+
d("div", Ia, [
|
|
784
|
+
t[26] || (t[26] = Z(" 任务 / 负责人 ", -1)),
|
|
785
|
+
L.labelResizable ? (r(), c("div", {
|
|
783
786
|
key: 0,
|
|
784
787
|
class: "hys-ui-pg-label-resizer",
|
|
785
788
|
role: "separator",
|
|
@@ -789,9 +792,9 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
|
|
|
789
792
|
"aria-valuenow": l(T).width.value,
|
|
790
793
|
"aria-valuemin": l(T).minimum.value,
|
|
791
794
|
"aria-valuemax": l(T).maximum.value,
|
|
792
|
-
style:
|
|
795
|
+
style: _({ height: Ae.value + "px" }),
|
|
793
796
|
title: "拖动调整任务列宽;左右键微调,Shift 加速,双击还原",
|
|
794
|
-
onPointerdown: t[2] || (t[2] =
|
|
797
|
+
onPointerdown: t[2] || (t[2] = k(
|
|
795
798
|
//@ts-ignore
|
|
796
799
|
(...a) => l(T).down && l(T).down(...a),
|
|
797
800
|
["stop", "prevent"]
|
|
@@ -806,248 +809,248 @@ const xa = { class: "hys-ui-pg-toolbar" }, Ia = {
|
|
|
806
809
|
(...a) => l(T).cancel && l(T).cancel(...a)),
|
|
807
810
|
onKeydown: t[7] || (t[7] = //@ts-ignore
|
|
808
811
|
(...a) => l(T).key && l(T).key(...a)),
|
|
809
|
-
onDblclick: t[8] || (t[8] =
|
|
812
|
+
onDblclick: t[8] || (t[8] = k(
|
|
810
813
|
//@ts-ignore
|
|
811
814
|
(...a) => l(T).reset && l(T).reset(...a),
|
|
812
815
|
["stop"]
|
|
813
816
|
))
|
|
814
|
-
}, null, 44,
|
|
817
|
+
}, null, 44, Ca)) : y("", !0)
|
|
815
818
|
]),
|
|
816
|
-
|
|
819
|
+
d("div", {
|
|
817
820
|
class: "hys-ui-pg-task-list",
|
|
818
|
-
style:
|
|
821
|
+
style: _({ height: $.value.length * x.value + "px" })
|
|
819
822
|
}, [
|
|
820
|
-
(
|
|
821
|
-
var
|
|
822
|
-
return
|
|
823
|
+
(r(!0), c(B, null, j(je.value, (a) => {
|
|
824
|
+
var n, v, o;
|
|
825
|
+
return r(), c("button", {
|
|
823
826
|
type: "button",
|
|
824
827
|
key: a.task.id,
|
|
825
|
-
class:
|
|
826
|
-
"hys-ui-selected":
|
|
827
|
-
"hys-ui-pg-task-has-conflict":
|
|
828
|
-
"hys-ui-pg-link-target": ((
|
|
829
|
-
"hys-ui-pg-link-invalid": ((v = l(i).draft.value) == null ? void 0 : v.targetId) === a.task.id && !!((
|
|
828
|
+
class: O(["hys-ui-pg-task-label", {
|
|
829
|
+
"hys-ui-selected": K.value === a.task.id,
|
|
830
|
+
"hys-ui-pg-task-has-conflict": L.showConflicts && Re(a.task.id).length > 0,
|
|
831
|
+
"hys-ui-pg-link-target": ((n = l(i).draft.value) == null ? void 0 : n.targetId) === a.task.id,
|
|
832
|
+
"hys-ui-pg-link-invalid": ((v = l(i).draft.value) == null ? void 0 : v.targetId) === a.task.id && !!((o = l(i).draft.value) != null && o.reason)
|
|
830
833
|
}]),
|
|
831
|
-
"aria-pressed":
|
|
834
|
+
"aria-pressed": K.value === a.task.id,
|
|
832
835
|
"data-row-index": a.index,
|
|
833
|
-
style:
|
|
834
|
-
height:
|
|
835
|
-
top: a.index *
|
|
836
|
+
style: _({
|
|
837
|
+
height: x.value + "px",
|
|
838
|
+
top: a.index * x.value + "px"
|
|
836
839
|
}),
|
|
837
|
-
onClick: (
|
|
840
|
+
onClick: (I) => He(a.task),
|
|
838
841
|
onKeydown: [
|
|
839
|
-
|
|
840
|
-
|
|
842
|
+
A(k((I) => Fe(a.task, -1), ["alt", "prevent"]), ["left"]),
|
|
843
|
+
A(k((I) => Fe(a.task, 1), ["alt", "prevent"]), ["right"])
|
|
841
844
|
]
|
|
842
845
|
}, [
|
|
843
|
-
|
|
846
|
+
d("strong", {
|
|
844
847
|
title: a.task.title
|
|
845
|
-
},
|
|
846
|
-
|
|
847
|
-
|
|
848
|
+
}, h(a.task.title), 9, Pa),
|
|
849
|
+
d("small", null, h(a.task.owner || "未分配") + " · " + h(a.task.status || "待办"), 1),
|
|
850
|
+
L.showConflicts && Re(a.task.id).length ? (r(), c("span", {
|
|
848
851
|
key: 0,
|
|
849
852
|
class: "hys-ui-pg-task-warning",
|
|
850
853
|
"aria-hidden": "true",
|
|
851
|
-
title:
|
|
854
|
+
title: Re(a.task.id).map((I) => I.message).join(`
|
|
852
855
|
`)
|
|
853
856
|
}, [
|
|
854
|
-
|
|
855
|
-
], 8,
|
|
856
|
-
], 46,
|
|
857
|
+
f(l(wt), { size: 14 })
|
|
858
|
+
], 8, Ma)) : y("", !0)
|
|
859
|
+
], 46, Ta);
|
|
857
860
|
}), 128))
|
|
858
861
|
], 4),
|
|
859
|
-
|
|
862
|
+
$.value.length ? y("", !0) : (r(), c("div", za, " 暂无有效排期任务 "))
|
|
860
863
|
], 4),
|
|
861
|
-
|
|
864
|
+
d("div", {
|
|
862
865
|
class: "hys-ui-pg-timeline",
|
|
863
|
-
style:
|
|
866
|
+
style: _({ width: Ve.value + "px" })
|
|
864
867
|
}, [
|
|
865
|
-
|
|
868
|
+
d("div", {
|
|
866
869
|
class: "hys-ui-pg-canvas",
|
|
867
|
-
style:
|
|
870
|
+
style: _({ width: Ve.value + "px" })
|
|
868
871
|
}, [
|
|
869
|
-
|
|
870
|
-
(
|
|
872
|
+
d("div", Sa, [
|
|
873
|
+
(r(!0), c(B, null, j(Et.value, (a) => (r(), c("span", {
|
|
871
874
|
key: a.key,
|
|
872
875
|
title: a.label,
|
|
873
|
-
style:
|
|
874
|
-
},
|
|
876
|
+
style: _({ left: a.left + "px", width: a.width + "px" })
|
|
877
|
+
}, h(a.label), 13, Da))), 128))
|
|
875
878
|
]),
|
|
876
|
-
|
|
877
|
-
(
|
|
879
|
+
d("div", La, [
|
|
880
|
+
(r(!0), c(B, null, j(_e.value, (a) => (r(), c("span", {
|
|
878
881
|
key: a,
|
|
879
|
-
class:
|
|
880
|
-
"hys-ui-weekend": [0, 6].includes(
|
|
881
|
-
"hys-ui-today": a ===
|
|
882
|
+
class: O({
|
|
883
|
+
"hys-ui-weekend": [0, 6].includes(we(a).getUTCDay()),
|
|
884
|
+
"hys-ui-today": a === X(l(ke))
|
|
882
885
|
}),
|
|
883
|
-
style:
|
|
884
|
-
},
|
|
886
|
+
style: _({ width: S.value + "px" })
|
|
887
|
+
}, h(Y.value === "month" ? "" : we(a).getUTCDate()), 7))), 128))
|
|
885
888
|
]),
|
|
886
|
-
|
|
889
|
+
d("div", {
|
|
887
890
|
ref_key: "grid",
|
|
888
|
-
ref:
|
|
891
|
+
ref: Qe,
|
|
889
892
|
class: "hys-ui-pg-grid",
|
|
890
|
-
style:
|
|
893
|
+
style: _({ height: $.value.length * x.value + "px" })
|
|
891
894
|
}, [
|
|
892
|
-
(
|
|
895
|
+
(r(!0), c(B, null, j(_e.value, (a) => (r(), c("div", {
|
|
893
896
|
key: a,
|
|
894
|
-
class:
|
|
895
|
-
"hys-ui-weekend": [0, 6].includes(
|
|
897
|
+
class: O(["hys-ui-pg-day-column", {
|
|
898
|
+
"hys-ui-weekend": [0, 6].includes(we(a).getUTCDay())
|
|
896
899
|
}]),
|
|
897
|
-
style:
|
|
898
|
-
left: (a -
|
|
899
|
-
width:
|
|
900
|
+
style: _({
|
|
901
|
+
left: (a - q.value.start) * S.value + "px",
|
|
902
|
+
width: S.value + "px"
|
|
900
903
|
})
|
|
901
904
|
}, null, 6))), 128)),
|
|
902
|
-
|
|
905
|
+
d("div", {
|
|
903
906
|
class: "hys-ui-pg-today-line",
|
|
904
|
-
style:
|
|
905
|
-
left: (
|
|
907
|
+
style: _({
|
|
908
|
+
left: (X(l(ke)) - q.value.start) * S.value + S.value / 2 + "px"
|
|
906
909
|
})
|
|
907
910
|
}, null, 4),
|
|
908
|
-
(
|
|
909
|
-
var
|
|
910
|
-
return
|
|
911
|
+
(r(!0), c(B, null, j(je.value, (a) => {
|
|
912
|
+
var n, v, o, I, P, D, W;
|
|
913
|
+
return r(), c("div", {
|
|
911
914
|
key: a.task.id,
|
|
912
915
|
class: "hys-ui-pg-row",
|
|
913
916
|
"data-row-index": a.index,
|
|
914
|
-
style:
|
|
915
|
-
top: a.index *
|
|
916
|
-
height:
|
|
917
|
+
style: _({
|
|
918
|
+
top: a.index * x.value + "px",
|
|
919
|
+
height: x.value + "px"
|
|
917
920
|
})
|
|
918
921
|
}, [
|
|
919
|
-
|
|
920
|
-
class:
|
|
921
|
-
"hys-ui-selected":
|
|
922
|
-
"hys-ui-dragging": ((
|
|
922
|
+
d("div", {
|
|
923
|
+
class: O(["hys-ui-pg-bar", {
|
|
924
|
+
"hys-ui-selected": K.value === a.task.id,
|
|
925
|
+
"hys-ui-dragging": ((n = E.value) == null ? void 0 : n.id) === a.task.id,
|
|
923
926
|
"hys-ui-disabled": a.task.disabled,
|
|
924
|
-
"hys-ui-pg-bar-has-conflict":
|
|
925
|
-
"hys-ui-pg-link-source": ((
|
|
926
|
-
"hys-ui-pg-link-target": ((
|
|
927
|
-
"hys-ui-pg-link-invalid": ((
|
|
927
|
+
"hys-ui-pg-bar-has-conflict": L.showConflicts && (((v = E.value) == null ? void 0 : v.id) === a.task.id && G.value ? G.value.conflicts.length > 0 : Re(a.task.id).length > 0),
|
|
928
|
+
"hys-ui-pg-link-source": ((o = l(i).draft.value) == null ? void 0 : o.sourceId) === a.task.id,
|
|
929
|
+
"hys-ui-pg-link-target": ((I = l(i).draft.value) == null ? void 0 : I.targetId) === a.task.id,
|
|
930
|
+
"hys-ui-pg-link-invalid": ((P = l(i).draft.value) == null ? void 0 : P.targetId) === a.task.id && !!((D = l(i).draft.value) != null && D.reason)
|
|
928
931
|
}]),
|
|
929
|
-
style:
|
|
932
|
+
style: _(Bt(a.task)),
|
|
930
933
|
role: "button",
|
|
931
|
-
"aria-pressed":
|
|
934
|
+
"aria-pressed": K.value === a.task.id,
|
|
932
935
|
tabindex: "0",
|
|
933
936
|
"aria-label": `${a.task.title},${a.task.start} 至 ${a.task.end},完成 ${a.task.progress}%`,
|
|
934
937
|
title: `${a.task.title}
|
|
935
938
|
${a.task.start} → ${a.task.end}
|
|
936
939
|
完成 ${a.task.progress}%`,
|
|
937
|
-
onClick: (
|
|
940
|
+
onClick: (p) => He(a.task),
|
|
938
941
|
onKeydown: [
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
942
|
+
A((p) => He(a.task), ["enter"]),
|
|
943
|
+
A(k((p) => He(a.task), ["prevent"]), ["space"]),
|
|
944
|
+
A(k((p) => Fe(a.task, -1), ["alt", "prevent"]), ["left"]),
|
|
945
|
+
A(k((p) => Fe(a.task, 1), ["alt", "prevent"]), ["right"])
|
|
943
946
|
],
|
|
944
|
-
onPointerdown: (
|
|
945
|
-
onPointermove:
|
|
946
|
-
onPointerup:
|
|
947
|
-
onPointercancel:
|
|
948
|
-
onLostpointercapture:
|
|
947
|
+
onPointerdown: (p) => Oe(p, a.task, "move"),
|
|
948
|
+
onPointermove: Ye,
|
|
949
|
+
onPointerup: me,
|
|
950
|
+
onPointercancel: me,
|
|
951
|
+
onLostpointercapture: V
|
|
949
952
|
}, [
|
|
950
|
-
|
|
953
|
+
d("div", {
|
|
951
954
|
class: "hys-ui-pg-progress",
|
|
952
|
-
style:
|
|
955
|
+
style: _({ width: a.task.progress + "%" })
|
|
953
956
|
}, null, 4),
|
|
954
|
-
|
|
955
|
-
|
|
957
|
+
d("span", _a, h(a.task.progress) + "%", 1),
|
|
958
|
+
L.editable && !a.task.disabled ? (r(), c("span", {
|
|
956
959
|
key: 0,
|
|
957
960
|
class: "hys-ui-pg-handle hys-ui-start",
|
|
958
961
|
title: "调整开始日期",
|
|
959
|
-
onPointerdown:
|
|
960
|
-
onPointermove:
|
|
961
|
-
onPointerup:
|
|
962
|
-
onPointercancel:
|
|
963
|
-
onLostpointercapture:
|
|
964
|
-
}, null, 40,
|
|
965
|
-
|
|
962
|
+
onPointerdown: k((p) => Oe(p, a.task, "start"), ["stop"]),
|
|
963
|
+
onPointermove: Ye,
|
|
964
|
+
onPointerup: me,
|
|
965
|
+
onPointercancel: me,
|
|
966
|
+
onLostpointercapture: V
|
|
967
|
+
}, null, 40, Ka)) : y("", !0),
|
|
968
|
+
L.editable && !a.task.disabled ? (r(), c("span", {
|
|
966
969
|
key: 1,
|
|
967
970
|
class: "hys-ui-pg-handle hys-ui-end",
|
|
968
971
|
title: "调整结束日期",
|
|
969
|
-
onPointerdown:
|
|
970
|
-
onPointermove:
|
|
971
|
-
onPointerup:
|
|
972
|
-
onPointercancel:
|
|
973
|
-
onLostpointercapture:
|
|
974
|
-
}, null, 40,
|
|
975
|
-
], 46,
|
|
976
|
-
|
|
972
|
+
onPointerdown: k((p) => Oe(p, a.task, "end"), ["stop"]),
|
|
973
|
+
onPointermove: Ye,
|
|
974
|
+
onPointerup: me,
|
|
975
|
+
onPointercancel: me,
|
|
976
|
+
onLostpointercapture: V
|
|
977
|
+
}, null, 40, Ha)) : y("", !0)
|
|
978
|
+
], 46, Ea),
|
|
979
|
+
F.value && L.showDependencies && !a.task.disabled ? (r(), c("button", {
|
|
977
980
|
key: 0,
|
|
978
981
|
type: "button",
|
|
979
|
-
class:
|
|
980
|
-
"hys-ui-pg-link-port-visible":
|
|
982
|
+
class: O(["hys-ui-pg-link-port", {
|
|
983
|
+
"hys-ui-pg-link-port-visible": K.value === a.task.id || ((W = l(i).draft.value) == null ? void 0 : W.sourceId) === a.task.id
|
|
981
984
|
}]),
|
|
982
|
-
style:
|
|
985
|
+
style: _(Nt(a.task)),
|
|
983
986
|
"aria-label": "连接后续任务:" + a.task.title,
|
|
984
987
|
title: "拖动到后置任务,或点击后选择任务;也支持 Enter 和上下键",
|
|
985
|
-
onPointerdown:
|
|
986
|
-
onClick:
|
|
988
|
+
onPointerdown: k((p) => l(i).beginPointer(p, a.task.id), ["stop", "prevent"]),
|
|
989
|
+
onClick: k((p) => l(i).clickSource(p, a.task.id), ["stop"]),
|
|
987
990
|
onKeydown: [
|
|
988
|
-
|
|
989
|
-
|
|
991
|
+
A(k((p) => l(i).beginKeyboard(a.task.id), ["stop", "prevent"]), ["enter"]),
|
|
992
|
+
A(k((p) => l(i).beginKeyboard(a.task.id), ["stop", "prevent"]), ["space"])
|
|
990
993
|
]
|
|
991
|
-
}, null, 46,
|
|
992
|
-
], 12,
|
|
994
|
+
}, null, 46, Fa)) : y("", !0)
|
|
995
|
+
], 12, $a);
|
|
993
996
|
}), 128)),
|
|
994
|
-
|
|
997
|
+
L.showDependencies && st.value.length || l(i).draft.value ? (r(), c("svg", {
|
|
995
998
|
key: 0,
|
|
996
|
-
class:
|
|
999
|
+
class: O(["hys-ui-pg-dependencies", {
|
|
997
1000
|
"hys-ui-pg-has-edge-selection": !!l(i).selected.value
|
|
998
1001
|
}]),
|
|
999
|
-
width:
|
|
1000
|
-
height:
|
|
1001
|
-
"aria-hidden": !
|
|
1002
|
+
width: Ve.value,
|
|
1003
|
+
height: $.value.length * x.value,
|
|
1004
|
+
"aria-hidden": !F.value || void 0
|
|
1002
1005
|
}, [
|
|
1003
|
-
|
|
1004
|
-
(
|
|
1005
|
-
var
|
|
1006
|
-
return
|
|
1006
|
+
L.showDependencies ? (r(), c(B, { key: 0 }, [
|
|
1007
|
+
(r(!0), c(B, null, j(st.value, (a) => {
|
|
1008
|
+
var n, v, o, I, P, D, W, p, Q, mt;
|
|
1009
|
+
return r(), c("g", {
|
|
1007
1010
|
key: a.id,
|
|
1008
|
-
class:
|
|
1009
|
-
"hys-ui-pg-edge-shared": (((
|
|
1010
|
-
"hys-ui-pg-edge-current": ((v = l(i).selected.value) == null ? void 0 : v.sourceId) === a.sourceId && ((
|
|
1011
|
-
"hys-ui-pg-edge-rewiring": ((
|
|
1011
|
+
class: O(["hys-ui-pg-edge-group", {
|
|
1012
|
+
"hys-ui-pg-edge-shared": (((n = Ce.value.get(a.targetId)) == null ? void 0 : n.length) ?? 0) > 1,
|
|
1013
|
+
"hys-ui-pg-edge-current": ((v = l(i).selected.value) == null ? void 0 : v.sourceId) === a.sourceId && ((o = l(i).selected.value) == null ? void 0 : o.targetId) === a.targetId,
|
|
1014
|
+
"hys-ui-pg-edge-rewiring": ((I = l(i).draft.value) == null ? void 0 : I.sourceId) === a.sourceId && ((P = l(i).draft.value) == null ? void 0 : P.previousTargetId) === a.targetId
|
|
1012
1015
|
}]),
|
|
1013
1016
|
"data-edge-key": a.id
|
|
1014
1017
|
}, [
|
|
1015
|
-
|
|
1016
|
-
class:
|
|
1017
|
-
"hys-ui-pg-edge-selected": ((
|
|
1018
|
-
"hys-ui-pg-edge-conflict":
|
|
1019
|
-
"hys-ui-pg-edge-related":
|
|
1018
|
+
d("path", {
|
|
1019
|
+
class: O(["hys-ui-pg-edge-line", {
|
|
1020
|
+
"hys-ui-pg-edge-selected": ((D = l(i).selected.value) == null ? void 0 : D.sourceId) === a.sourceId && ((W = l(i).selected.value) == null ? void 0 : W.targetId) === a.targetId,
|
|
1021
|
+
"hys-ui-pg-edge-conflict": L.showConflicts && !!yt(a.sourceId, a.targetId),
|
|
1022
|
+
"hys-ui-pg-edge-related": K.value === a.sourceId || K.value === a.targetId
|
|
1020
1023
|
}]),
|
|
1021
1024
|
d: a.path,
|
|
1022
1025
|
fill: "none",
|
|
1023
1026
|
stroke: "currentColor",
|
|
1024
1027
|
"stroke-width": "1.5"
|
|
1025
|
-
}, null, 10,
|
|
1026
|
-
|
|
1028
|
+
}, null, 10, Ua),
|
|
1029
|
+
F.value ? (r(), c("path", {
|
|
1027
1030
|
key: 0,
|
|
1028
1031
|
class: "hys-ui-pg-edge-hit",
|
|
1029
|
-
d: (((
|
|
1032
|
+
d: (((p = Ce.value.get(a.targetId)) == null ? void 0 : p.length) ?? 0) > 1 && !(((Q = l(i).selected.value) == null ? void 0 : Q.sourceId) === a.sourceId && ((mt = l(i).selected.value) == null ? void 0 : mt.targetId) === a.targetId) ? a.pickPath : a.path,
|
|
1030
1033
|
fill: "none",
|
|
1031
1034
|
stroke: "transparent",
|
|
1032
1035
|
"stroke-width": "12",
|
|
1033
1036
|
role: "button",
|
|
1034
1037
|
tabindex: "0",
|
|
1035
1038
|
"aria-label": "依赖 " + a.sourceId + " → " + a.targetId + ",选中后按 Delete 移除",
|
|
1036
|
-
onPointerdown: t[9] || (t[9] =
|
|
1039
|
+
onPointerdown: t[9] || (t[9] = k(() => {
|
|
1037
1040
|
}, ["stop"])),
|
|
1038
|
-
onClick:
|
|
1039
|
-
onFocus: (
|
|
1040
|
-
onKeydown:
|
|
1041
|
-
}, null, 40,
|
|
1042
|
-
|
|
1043
|
-
|
|
1041
|
+
onClick: k((R) => l(i).selectEdge(R, a.sourceId, a.targetId), ["stop"]),
|
|
1042
|
+
onFocus: (R) => l(i).selectEdge(R, a.sourceId, a.targetId),
|
|
1043
|
+
onKeydown: A(k((R) => l(i).selectEdge(R, a.sourceId, a.targetId), ["prevent", "stop"]), ["enter"])
|
|
1044
|
+
}, null, 40, Va)) : y("", !0),
|
|
1045
|
+
F.value && a.editable ? (r(), c(B, { key: 1 }, [
|
|
1046
|
+
d("circle", {
|
|
1044
1047
|
class: "hys-ui-pg-edge-endpoint",
|
|
1045
1048
|
cx: a.endpoint.x,
|
|
1046
1049
|
cy: a.endpoint.y,
|
|
1047
1050
|
r: "5",
|
|
1048
1051
|
"aria-hidden": "true"
|
|
1049
|
-
}, null, 8,
|
|
1050
|
-
|
|
1052
|
+
}, null, 8, Wa),
|
|
1053
|
+
d("circle", {
|
|
1051
1054
|
class: "hys-ui-pg-edge-endpoint-hit",
|
|
1052
1055
|
cx: a.endpoint.x,
|
|
1053
1056
|
cy: a.endpoint.y,
|
|
@@ -1056,76 +1059,76 @@ ${a.task.start} → ${a.task.end}
|
|
|
1056
1059
|
role: "button",
|
|
1057
1060
|
tabindex: "0",
|
|
1058
1061
|
"aria-label": "改接依赖终点:" + a.sourceId + " → " + a.targetId,
|
|
1059
|
-
onFocus: (
|
|
1060
|
-
onPointerdown:
|
|
1061
|
-
onClick:
|
|
1062
|
+
onFocus: (R) => l(i).selectEdge(R, a.sourceId, a.targetId),
|
|
1063
|
+
onPointerdown: k((R) => l(i).beginPointer(R, a.sourceId, a.targetId), ["stop", "prevent"]),
|
|
1064
|
+
onClick: k((R) => l(i).clickSource(R, a.sourceId, a.targetId), ["stop"]),
|
|
1062
1065
|
onKeydown: [
|
|
1063
|
-
|
|
1064
|
-
|
|
1066
|
+
A(k((R) => l(i).beginKeyboard(a.sourceId, a.targetId), ["stop", "prevent"]), ["enter"]),
|
|
1067
|
+
A(k((R) => l(i).beginKeyboard(a.sourceId, a.targetId), ["stop", "prevent"]), ["space"])
|
|
1065
1068
|
]
|
|
1066
1069
|
}, [
|
|
1067
|
-
|
|
1068
|
-
], 40,
|
|
1069
|
-
], 64)) :
|
|
1070
|
-
], 10,
|
|
1070
|
+
d("title", null, h(a.sourceTitle) + " → " + h(a.targetTitle) + ":拖动修改连接终点,或按 Enter 后用上下键选择新任务 ", 1)
|
|
1071
|
+
], 40, Ba)
|
|
1072
|
+
], 64)) : y("", !0)
|
|
1073
|
+
], 10, Aa);
|
|
1071
1074
|
}), 128)),
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
class:
|
|
1075
|
-
"hys-ui-pg-edge-conflict":
|
|
1076
|
-
|
|
1077
|
-
|
|
1075
|
+
re.value ? (r(), c(B, { key: 0 }, [
|
|
1076
|
+
d("path", {
|
|
1077
|
+
class: O(["hys-ui-pg-active-edge-line", {
|
|
1078
|
+
"hys-ui-pg-edge-conflict": L.showConflicts && !!yt(
|
|
1079
|
+
re.value.sourceId,
|
|
1080
|
+
re.value.targetId
|
|
1078
1081
|
)
|
|
1079
1082
|
}]),
|
|
1080
|
-
d:
|
|
1083
|
+
d: re.value.path,
|
|
1081
1084
|
fill: "none",
|
|
1082
1085
|
"stroke-width": "2.5"
|
|
1083
|
-
}, null, 10,
|
|
1084
|
-
|
|
1086
|
+
}, null, 10, Na),
|
|
1087
|
+
re.value.editable && F.value ? (r(), c("circle", {
|
|
1085
1088
|
key: 0,
|
|
1086
1089
|
class: "hys-ui-pg-active-endpoint",
|
|
1087
|
-
cx:
|
|
1088
|
-
cy:
|
|
1090
|
+
cx: re.value.endpoint.x,
|
|
1091
|
+
cy: re.value.endpoint.y,
|
|
1089
1092
|
r: "5"
|
|
1090
|
-
}, null, 8,
|
|
1091
|
-
], 64)) :
|
|
1092
|
-
|
|
1093
|
-
var
|
|
1094
|
-
return
|
|
1093
|
+
}, null, 8, qa)) : y("", !0)
|
|
1094
|
+
], 64)) : y("", !0),
|
|
1095
|
+
F.value ? (r(!0), c(B, { key: 1 }, j(_t.value, (a) => {
|
|
1096
|
+
var n;
|
|
1097
|
+
return r(), c("g", {
|
|
1095
1098
|
key: a.id,
|
|
1096
1099
|
class: "hys-ui-pg-incoming-trigger",
|
|
1097
1100
|
transform: `translate(${a.x} ${a.y})`,
|
|
1098
1101
|
role: "button",
|
|
1099
1102
|
tabindex: "0",
|
|
1100
1103
|
"aria-haspopup": "dialog",
|
|
1101
|
-
"aria-expanded": l(M).open.value &&
|
|
1104
|
+
"aria-expanded": l(M).open.value && ue.value === a.id,
|
|
1102
1105
|
"aria-label": "选择前置依赖:" + a.title + "," + a.count + " 条",
|
|
1103
|
-
onPointerdown: t[10] || (t[10] =
|
|
1106
|
+
onPointerdown: t[10] || (t[10] = k(() => {
|
|
1104
1107
|
}, ["stop"])),
|
|
1105
|
-
onClick:
|
|
1108
|
+
onClick: k((v) => qe(v, a.id), ["stop"]),
|
|
1106
1109
|
onKeydown: [
|
|
1107
|
-
|
|
1108
|
-
|
|
1110
|
+
A(k((v) => qe(v, a.id), ["stop", "prevent"]), ["enter"]),
|
|
1111
|
+
A(k((v) => qe(v, a.id), ["stop", "prevent"]), ["space"])
|
|
1109
1112
|
]
|
|
1110
1113
|
}, [
|
|
1111
|
-
t[27] || (t[27] =
|
|
1114
|
+
t[27] || (t[27] = d("circle", {
|
|
1112
1115
|
r: "13",
|
|
1113
1116
|
fill: "transparent",
|
|
1114
1117
|
class: "hys-ui-pg-incoming-hit"
|
|
1115
1118
|
}, null, -1)),
|
|
1116
|
-
((
|
|
1117
|
-
t[28] || (t[28] =
|
|
1119
|
+
((n = l(i).selected.value) == null ? void 0 : n.targetId) !== a.id ? (r(), c("circle", Oa)) : y("", !0),
|
|
1120
|
+
t[28] || (t[28] = d("circle", {
|
|
1118
1121
|
r: "9",
|
|
1119
1122
|
class: "hys-ui-pg-incoming-badge"
|
|
1120
1123
|
}, null, -1)),
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
], 40,
|
|
1124
|
-
}), 128)) :
|
|
1125
|
-
], 64)) :
|
|
1126
|
-
l(i).draft.value ? (
|
|
1124
|
+
d("text", Ya, h(a.count > 99 ? "99+" : a.count), 1),
|
|
1125
|
+
d("title", null, h(a.title) + " 有 " + h(a.count) + " 条前置关系,点击选择要编辑的连线 ", 1)
|
|
1126
|
+
], 40, Ga);
|
|
1127
|
+
}), 128)) : y("", !0)
|
|
1128
|
+
], 64)) : y("", !0),
|
|
1129
|
+
l(i).draft.value ? (r(), c("path", {
|
|
1127
1130
|
key: 1,
|
|
1128
|
-
class:
|
|
1131
|
+
class: O(["hys-ui-pg-link-preview", {
|
|
1129
1132
|
"hys-ui-pg-link-preview-invalid": !!l(i).draft.value.reason
|
|
1130
1133
|
}]),
|
|
1131
1134
|
d: l(i).path.value,
|
|
@@ -1133,29 +1136,29 @@ ${a.task.start} → ${a.task.end}
|
|
|
1133
1136
|
stroke: "currentColor",
|
|
1134
1137
|
"stroke-width": "2",
|
|
1135
1138
|
"stroke-dasharray": "5 4"
|
|
1136
|
-
}, null, 10,
|
|
1137
|
-
], 10,
|
|
1139
|
+
}, null, 10, Xa)) : y("", !0)
|
|
1140
|
+
], 10, Ra)) : y("", !0)
|
|
1138
1141
|
], 4)
|
|
1139
1142
|
], 4)
|
|
1140
1143
|
], 4)
|
|
1141
1144
|
], 36),
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
l(i).draft.value ? (
|
|
1145
|
+
d("div", Ja, [
|
|
1146
|
+
Z(h($.value.length) + " 项任务 · " + h(St.value) + " 项已完成 ", 1),
|
|
1147
|
+
$.value.length !== L.items.length ? (r(), c("span", Qa, "· " + h(L.items.length - $.value.length) + " 项日期无效已隐藏", 1)) : y("", !0),
|
|
1148
|
+
F.value ? (r(), c("div", Za, [
|
|
1149
|
+
d("span", ja, h(l(i).message.value || "拖动圆点连接依赖;选中连线可拖动终点改接或移除。"), 1),
|
|
1150
|
+
l(i).draft.value ? (r(), ze(U, {
|
|
1148
1151
|
key: 0,
|
|
1149
1152
|
variant: "ghost",
|
|
1150
1153
|
size: "sm",
|
|
1151
1154
|
onClick: t[15] || (t[15] = (a) => l(i).cancel())
|
|
1152
1155
|
}, {
|
|
1153
|
-
default:
|
|
1154
|
-
|
|
1155
|
-
t[29] || (t[29] =
|
|
1156
|
+
default: H(() => [
|
|
1157
|
+
f(l(xt), { size: 14 }),
|
|
1158
|
+
t[29] || (t[29] = Z("取消连接", -1))
|
|
1156
1159
|
]),
|
|
1157
1160
|
_: 1
|
|
1158
|
-
})) : l(i).selected.value ? (
|
|
1161
|
+
})) : l(i).selected.value ? (r(), ze(U, {
|
|
1159
1162
|
key: 1,
|
|
1160
1163
|
variant: "ghost",
|
|
1161
1164
|
size: "sm",
|
|
@@ -1164,238 +1167,250 @@ ${a.task.start} → ${a.task.end}
|
|
|
1164
1167
|
l(i).selected.value.targetId
|
|
1165
1168
|
))
|
|
1166
1169
|
}, {
|
|
1167
|
-
default:
|
|
1168
|
-
|
|
1169
|
-
t[30] || (t[30] =
|
|
1170
|
+
default: H(() => [
|
|
1171
|
+
f(l(It), { size: 14 }),
|
|
1172
|
+
t[30] || (t[30] = Z("移除依赖", -1))
|
|
1170
1173
|
]),
|
|
1171
1174
|
_: 1
|
|
1172
|
-
})) :
|
|
1173
|
-
])) :
|
|
1174
|
-
l(
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1175
|
+
})) : y("", !0)
|
|
1176
|
+
])) : y("", !0),
|
|
1177
|
+
l(m).message.value ? (r(), c("p", el, h(l(m).message.value), 1)) : y("", !0),
|
|
1178
|
+
L.showConflicts && (ne.value.length || ee.value || G.value && (G.value.before || G.value.conflicts.length)) ? (r(), c("div", tl, [
|
|
1179
|
+
d("div", al, [
|
|
1180
|
+
f(l(wt), { size: 14 }),
|
|
1181
|
+
d("span", ll, h(ne.value.length ? ne.value.length + " 项排期冲突" : "当前排期检查正常"), 1),
|
|
1182
|
+
f(U, {
|
|
1180
1183
|
variant: "ghost",
|
|
1181
1184
|
size: "sm",
|
|
1182
|
-
"aria-expanded":
|
|
1183
|
-
"aria-controls":
|
|
1184
|
-
onClick: t[17] || (t[17] = (a) =>
|
|
1185
|
+
"aria-expanded": ee.value,
|
|
1186
|
+
"aria-controls": it,
|
|
1187
|
+
onClick: t[17] || (t[17] = (a) => ee.value = !ee.value)
|
|
1185
1188
|
}, {
|
|
1186
|
-
default:
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
+
default: H(() => [
|
|
1190
|
+
Z(h(ee.value ? "收起详情" : "查看详情"), 1),
|
|
1191
|
+
f(l(da), {
|
|
1189
1192
|
size: 13,
|
|
1190
|
-
style:
|
|
1191
|
-
transform:
|
|
1193
|
+
style: _({
|
|
1194
|
+
transform: ee.value ? "rotate(180deg)" : void 0
|
|
1192
1195
|
})
|
|
1193
1196
|
}, null, 8, ["style"])
|
|
1194
1197
|
]),
|
|
1195
1198
|
_: 1
|
|
1196
1199
|
}, 8, ["aria-expanded"])
|
|
1197
1200
|
]),
|
|
1198
|
-
|
|
1199
|
-
|
|
1201
|
+
G.value ? (r(), c("p", sl, " 调整预览:相关依赖有 " + h(G.value.conflicts.length) + " 项冲突,新增 " + h(G.value.added) + " 项、消除 " + h(G.value.resolved) + " 项。" + h(((s = G.value.conflicts[0]) == null ? void 0 : s.message) ?? ""), 1)) : y("", !0),
|
|
1202
|
+
ee.value ? (r(), c("section", {
|
|
1200
1203
|
key: 1,
|
|
1201
|
-
id:
|
|
1204
|
+
id: it,
|
|
1202
1205
|
class: "hys-ui-pg-conflict-panel",
|
|
1203
1206
|
"aria-label": "排期冲突详情"
|
|
1204
1207
|
}, [
|
|
1205
|
-
|
|
1206
|
-
modelValue:
|
|
1207
|
-
"onUpdate:modelValue": t[18] || (t[18] = (a) =>
|
|
1208
|
+
f(bt, {
|
|
1209
|
+
modelValue: ge.value,
|
|
1210
|
+
"onUpdate:modelValue": t[18] || (t[18] = (a) => ge.value = a),
|
|
1208
1211
|
size: "sm",
|
|
1209
|
-
"prefix-icon": l(
|
|
1212
|
+
"prefix-icon": l(Ct),
|
|
1210
1213
|
clearable: "",
|
|
1211
1214
|
placeholder: "搜索任务、编号或冲突说明",
|
|
1212
1215
|
"aria-label": "搜索排期冲突"
|
|
1213
1216
|
}, null, 8, ["modelValue", "prefix-icon"]),
|
|
1214
|
-
|
|
1215
|
-
(
|
|
1217
|
+
d("ul", il, [
|
|
1218
|
+
(r(!0), c(B, null, j(Ht.value, (a) => (r(), c("li", {
|
|
1216
1219
|
key: a.id
|
|
1217
1220
|
}, [
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1221
|
+
d("div", null, [
|
|
1222
|
+
d("span", nl, h(qt(a.type)), 1),
|
|
1223
|
+
d("strong", null, h(a.sourceTitle ? a.sourceTitle + " → " : "") + h(a.taskTitle), 1),
|
|
1224
|
+
d("p", null, h(a.message), 1)
|
|
1222
1225
|
]),
|
|
1223
|
-
|
|
1226
|
+
f(U, {
|
|
1224
1227
|
variant: "ghost",
|
|
1225
1228
|
size: "sm",
|
|
1226
|
-
disabled: !
|
|
1229
|
+
disabled: !he.value.has(a.taskId),
|
|
1227
1230
|
"aria-label": "定位冲突任务:" + a.taskTitle,
|
|
1228
|
-
onClick: (
|
|
1231
|
+
onClick: (n) => Gt(a)
|
|
1229
1232
|
}, {
|
|
1230
|
-
default:
|
|
1231
|
-
|
|
1232
|
-
t[31] || (t[31] =
|
|
1233
|
+
default: H(() => [
|
|
1234
|
+
f(l(Xe), { size: 14 }),
|
|
1235
|
+
t[31] || (t[31] = Z("定位", -1))
|
|
1233
1236
|
]),
|
|
1234
1237
|
_: 1
|
|
1235
1238
|
}, 8, ["disabled", "aria-label", "onClick"])
|
|
1236
1239
|
]))), 128)),
|
|
1237
|
-
|
|
1240
|
+
fe.value.length ? y("", !0) : (r(), c("li", ol, h(ge.value ? "没有匹配的排期冲突" : "当前没有排期冲突"), 1))
|
|
1238
1241
|
]),
|
|
1239
|
-
|
|
1242
|
+
fe.value.length > 10 ? (r(), ze(sa, {
|
|
1240
1243
|
key: 0,
|
|
1241
|
-
page:
|
|
1242
|
-
"onUpdate:page": t[19] || (t[19] = (a) =>
|
|
1243
|
-
total:
|
|
1244
|
+
page: oe.value,
|
|
1245
|
+
"onUpdate:page": t[19] || (t[19] = (a) => oe.value = a),
|
|
1246
|
+
total: fe.value.length,
|
|
1244
1247
|
"page-size": 10,
|
|
1245
1248
|
compact: ""
|
|
1246
|
-
}, null, 8, ["page", "total"])) :
|
|
1247
|
-
])) :
|
|
1248
|
-
])) :
|
|
1249
|
+
}, null, 8, ["page", "total"])) : y("", !0)
|
|
1250
|
+
])) : y("", !0)
|
|
1251
|
+
])) : y("", !0)
|
|
1249
1252
|
]),
|
|
1250
|
-
(
|
|
1251
|
-
l(
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
},
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
]),
|
|
1274
|
-
_: 1
|
|
1275
|
-
})
|
|
1276
|
-
]),
|
|
1277
|
-
u("div", vl, [
|
|
1278
|
-
u("div", pl, [
|
|
1279
|
-
t[33] || (t[33] = u("span", null, "后置", -1)),
|
|
1280
|
-
u("strong", {
|
|
1281
|
-
title: (d = ce.value[0]) == null ? void 0 : d.targetTitle
|
|
1282
|
-
}, p((b = ce.value[0]) == null ? void 0 : b.targetTitle), 9, hl)
|
|
1283
|
-
]),
|
|
1284
|
-
y(W, {
|
|
1285
|
-
variant: "ghost",
|
|
1286
|
-
size: "sm",
|
|
1287
|
-
class: "hys-ui-pg-picker-action",
|
|
1288
|
-
"aria-label": "定位后置任务",
|
|
1289
|
-
title: "定位后置任务",
|
|
1290
|
-
onClick: t[21] || (t[21] = (a) => de.value !== void 0 && ct(de.value))
|
|
1291
|
-
}, {
|
|
1292
|
-
default: U(() => [
|
|
1293
|
-
y(l(Qe), { size: 15 })
|
|
1294
|
-
]),
|
|
1295
|
-
_: 1
|
|
1296
|
-
})
|
|
1297
|
-
]),
|
|
1298
|
-
y(It, {
|
|
1299
|
-
modelValue: Fe.value,
|
|
1300
|
-
"onUpdate:modelValue": t[22] || (t[22] = (a) => Fe.value = a),
|
|
1301
|
-
size: "sm",
|
|
1302
|
-
"prefix-icon": l(Mt),
|
|
1303
|
-
clearable: "",
|
|
1304
|
-
placeholder: "搜索前置任务或编号",
|
|
1305
|
-
"aria-label": "搜索前置关系",
|
|
1306
|
-
class: "hys-ui-pg-picker-search"
|
|
1307
|
-
}, null, 8, ["modelValue", "prefix-icon"]),
|
|
1308
|
-
u("div", gl, [
|
|
1309
|
-
(o(!0), c(q, null, ee(dt.value, (a) => {
|
|
1310
|
-
var k, v, P, K;
|
|
1311
|
-
return o(), c("div", {
|
|
1312
|
-
key: a.id,
|
|
1313
|
-
class: "hys-ui-pg-picker-option",
|
|
1314
|
-
"data-current": ((k = l(i).selected.value) == null ? void 0 : k.sourceId) === a.sourceId && ((v = l(i).selected.value) == null ? void 0 : v.targetId) === a.targetId
|
|
1315
|
-
}, [
|
|
1316
|
-
y(W, {
|
|
1317
|
-
variant: "ghost",
|
|
1318
|
-
"data-pg-choice": "",
|
|
1319
|
-
"aria-label": a.sourceTitle + " → " + a.targetTitle,
|
|
1320
|
-
"aria-pressed": ((P = l(i).selected.value) == null ? void 0 : P.sourceId) === a.sourceId && ((K = l(i).selected.value) == null ? void 0 : K.targetId) === a.targetId,
|
|
1321
|
-
onClick: (z) => Ut(z, a)
|
|
1322
|
-
}, {
|
|
1323
|
-
default: U(() => {
|
|
1324
|
-
var z, N;
|
|
1325
|
-
return [
|
|
1326
|
-
y(l(pa), {
|
|
1327
|
-
size: 15,
|
|
1328
|
-
class: "hys-ui-pg-picker-icon"
|
|
1329
|
-
}),
|
|
1330
|
-
u("span", yl, [
|
|
1331
|
-
u("span", {
|
|
1332
|
-
title: a.sourceTitle
|
|
1333
|
-
}, p(a.sourceTitle), 9, ml)
|
|
1334
|
-
]),
|
|
1335
|
-
u("span", kl, [
|
|
1336
|
-
((z = l(i).selected.value) == null ? void 0 : z.sourceId) === a.sourceId && ((N = l(i).selected.value) == null ? void 0 : N.targetId) === a.targetId ? (o(), De(l(ha), {
|
|
1337
|
-
key: 0,
|
|
1338
|
-
size: 14
|
|
1339
|
-
})) : g("", !0)
|
|
1340
|
-
])
|
|
1341
|
-
];
|
|
1342
|
-
}),
|
|
1343
|
-
_: 2
|
|
1344
|
-
}, 1032, ["aria-label", "aria-pressed", "onClick"]),
|
|
1345
|
-
u("div", bl, [
|
|
1346
|
-
y(W, {
|
|
1253
|
+
(r(), ze(ea, { to: "body" }, [
|
|
1254
|
+
f(l(ta), {
|
|
1255
|
+
"popup-transition": u.popupTransition,
|
|
1256
|
+
"popup-transition-duration": u.popupTransitionDuration,
|
|
1257
|
+
placement: l(M).placement.value
|
|
1258
|
+
}, {
|
|
1259
|
+
default: H(() => {
|
|
1260
|
+
var a, n, v;
|
|
1261
|
+
return [
|
|
1262
|
+
l(M).open.value ? (r(), c("div", kt({
|
|
1263
|
+
key: 0,
|
|
1264
|
+
ref_key: "pickerPanel",
|
|
1265
|
+
ref: ye
|
|
1266
|
+
}, l(Je), {
|
|
1267
|
+
class: "hys-ui-pg-dependency-picker hys-ui-floating-surface",
|
|
1268
|
+
style: l(M).style.value,
|
|
1269
|
+
role: "dialog",
|
|
1270
|
+
"aria-label": "选择前置依赖:" + (((a = de.value[0]) == null ? void 0 : a.targetTitle) ?? ""),
|
|
1271
|
+
onKeydown: Ut
|
|
1272
|
+
}), [
|
|
1273
|
+
d("div", ul, [
|
|
1274
|
+
t[32] || (t[32] = d("strong", null, "选择前置关系", -1)),
|
|
1275
|
+
f(U, {
|
|
1347
1276
|
variant: "ghost",
|
|
1348
1277
|
size: "sm",
|
|
1349
|
-
class: "hys-ui-pg-picker-
|
|
1350
|
-
"aria-label": "
|
|
1351
|
-
|
|
1352
|
-
onClick: m((z) => ct(a.sourceId, z, a), ["stop"])
|
|
1278
|
+
class: "hys-ui-pg-picker-close",
|
|
1279
|
+
"aria-label": "关闭前置关系列表",
|
|
1280
|
+
onClick: t[20] || (t[20] = (o) => l(M).close(!0))
|
|
1353
1281
|
}, {
|
|
1354
|
-
default:
|
|
1355
|
-
|
|
1282
|
+
default: H(() => [
|
|
1283
|
+
f(l(xt), { size: 15 })
|
|
1356
1284
|
]),
|
|
1357
1285
|
_: 1
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1286
|
+
})
|
|
1287
|
+
]),
|
|
1288
|
+
d("div", dl, [
|
|
1289
|
+
d("div", cl, [
|
|
1290
|
+
t[33] || (t[33] = d("span", null, "后置", -1)),
|
|
1291
|
+
d("strong", {
|
|
1292
|
+
title: (n = de.value[0]) == null ? void 0 : n.targetTitle
|
|
1293
|
+
}, h((v = de.value[0]) == null ? void 0 : v.targetTitle), 9, vl)
|
|
1294
|
+
]),
|
|
1295
|
+
f(U, {
|
|
1360
1296
|
variant: "ghost",
|
|
1361
1297
|
size: "sm",
|
|
1362
1298
|
class: "hys-ui-pg-picker-action",
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
onClick: m((z) => Vt(a), ["stop"])
|
|
1367
|
-
}, {
|
|
1368
|
-
default: U(() => [
|
|
1369
|
-
y(l(ga), { size: 14 })
|
|
1370
|
-
]),
|
|
1371
|
-
_: 1
|
|
1372
|
-
}, 8, ["disabled", "aria-label", "onClick"]),
|
|
1373
|
-
y(W, {
|
|
1374
|
-
variant: "ghost",
|
|
1375
|
-
size: "sm",
|
|
1376
|
-
class: "hys-ui-pg-picker-action hys-ui-pg-picker-delete",
|
|
1377
|
-
disabled: !a.removable || !!Pe.value,
|
|
1378
|
-
"aria-label": "删除依赖:" + a.sourceTitle + " → " + a.targetTitle,
|
|
1379
|
-
title: "删除这条依赖",
|
|
1380
|
-
onClick: m((z) => Wt(a), ["stop"])
|
|
1299
|
+
"aria-label": "定位后置任务",
|
|
1300
|
+
title: "定位后置任务",
|
|
1301
|
+
onClick: t[21] || (t[21] = (o) => ue.value !== void 0 && ut(ue.value))
|
|
1381
1302
|
}, {
|
|
1382
|
-
default:
|
|
1383
|
-
|
|
1303
|
+
default: H(() => [
|
|
1304
|
+
f(l(Xe), { size: 15 })
|
|
1384
1305
|
]),
|
|
1385
1306
|
_: 1
|
|
1386
|
-
}
|
|
1387
|
-
])
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1307
|
+
})
|
|
1308
|
+
]),
|
|
1309
|
+
f(bt, {
|
|
1310
|
+
modelValue: Ke.value,
|
|
1311
|
+
"onUpdate:modelValue": t[22] || (t[22] = (o) => Ke.value = o),
|
|
1312
|
+
size: "sm",
|
|
1313
|
+
"prefix-icon": l(Ct),
|
|
1314
|
+
clearable: "",
|
|
1315
|
+
placeholder: "搜索前置任务或编号",
|
|
1316
|
+
"aria-label": "搜索前置关系",
|
|
1317
|
+
class: "hys-ui-pg-picker-search"
|
|
1318
|
+
}, null, 8, ["modelValue", "prefix-icon"]),
|
|
1319
|
+
d("div", pl, [
|
|
1320
|
+
(r(!0), c(B, null, j(rt.value, (o) => {
|
|
1321
|
+
var I, P, D, W;
|
|
1322
|
+
return r(), c("div", {
|
|
1323
|
+
key: o.id,
|
|
1324
|
+
class: "hys-ui-pg-picker-option",
|
|
1325
|
+
"data-current": ((I = l(i).selected.value) == null ? void 0 : I.sourceId) === o.sourceId && ((P = l(i).selected.value) == null ? void 0 : P.targetId) === o.targetId
|
|
1326
|
+
}, [
|
|
1327
|
+
f(U, {
|
|
1328
|
+
variant: "ghost",
|
|
1329
|
+
"data-pg-choice": "",
|
|
1330
|
+
"aria-label": o.sourceTitle + " → " + o.targetTitle,
|
|
1331
|
+
"aria-pressed": ((D = l(i).selected.value) == null ? void 0 : D.sourceId) === o.sourceId && ((W = l(i).selected.value) == null ? void 0 : W.targetId) === o.targetId,
|
|
1332
|
+
onClick: (p) => Ft(p, o)
|
|
1333
|
+
}, {
|
|
1334
|
+
default: H(() => {
|
|
1335
|
+
var p, Q;
|
|
1336
|
+
return [
|
|
1337
|
+
f(l(ca), {
|
|
1338
|
+
size: 15,
|
|
1339
|
+
class: "hys-ui-pg-picker-icon"
|
|
1340
|
+
}),
|
|
1341
|
+
d("span", gl, [
|
|
1342
|
+
d("span", {
|
|
1343
|
+
title: o.sourceTitle
|
|
1344
|
+
}, h(o.sourceTitle), 9, fl)
|
|
1345
|
+
]),
|
|
1346
|
+
d("span", yl, [
|
|
1347
|
+
((p = l(i).selected.value) == null ? void 0 : p.sourceId) === o.sourceId && ((Q = l(i).selected.value) == null ? void 0 : Q.targetId) === o.targetId ? (r(), ze(l(va), {
|
|
1348
|
+
key: 0,
|
|
1349
|
+
size: 14
|
|
1350
|
+
})) : y("", !0)
|
|
1351
|
+
])
|
|
1352
|
+
];
|
|
1353
|
+
}),
|
|
1354
|
+
_: 2
|
|
1355
|
+
}, 1032, ["aria-label", "aria-pressed", "onClick"]),
|
|
1356
|
+
d("div", ml, [
|
|
1357
|
+
f(U, {
|
|
1358
|
+
variant: "ghost",
|
|
1359
|
+
size: "sm",
|
|
1360
|
+
class: "hys-ui-pg-picker-action",
|
|
1361
|
+
"aria-label": "定位前置任务:" + o.sourceTitle,
|
|
1362
|
+
title: "定位前置任务",
|
|
1363
|
+
onClick: k((p) => ut(o.sourceId, p, o), ["stop"])
|
|
1364
|
+
}, {
|
|
1365
|
+
default: H(() => [
|
|
1366
|
+
f(l(Xe), { size: 14 })
|
|
1367
|
+
]),
|
|
1368
|
+
_: 1
|
|
1369
|
+
}, 8, ["aria-label", "onClick"]),
|
|
1370
|
+
f(U, {
|
|
1371
|
+
variant: "ghost",
|
|
1372
|
+
size: "sm",
|
|
1373
|
+
class: "hys-ui-pg-picker-action",
|
|
1374
|
+
disabled: !o.editable || !!Te.value,
|
|
1375
|
+
"aria-label": "修改终点:" + o.sourceTitle + " → " + o.targetTitle,
|
|
1376
|
+
title: "修改连接终点",
|
|
1377
|
+
onClick: k((p) => Rt(o), ["stop"])
|
|
1378
|
+
}, {
|
|
1379
|
+
default: H(() => [
|
|
1380
|
+
f(l(pa), { size: 14 })
|
|
1381
|
+
]),
|
|
1382
|
+
_: 1
|
|
1383
|
+
}, 8, ["disabled", "aria-label", "onClick"]),
|
|
1384
|
+
f(U, {
|
|
1385
|
+
variant: "ghost",
|
|
1386
|
+
size: "sm",
|
|
1387
|
+
class: "hys-ui-pg-picker-action hys-ui-pg-picker-delete",
|
|
1388
|
+
disabled: !o.removable || !!Te.value,
|
|
1389
|
+
"aria-label": "删除依赖:" + o.sourceTitle + " → " + o.targetTitle,
|
|
1390
|
+
title: "删除这条依赖",
|
|
1391
|
+
onClick: k((p) => At(o), ["stop"])
|
|
1392
|
+
}, {
|
|
1393
|
+
default: H(() => [
|
|
1394
|
+
f(l(It), { size: 14 })
|
|
1395
|
+
]),
|
|
1396
|
+
_: 1
|
|
1397
|
+
}, 8, ["disabled", "aria-label", "onClick"])
|
|
1398
|
+
])
|
|
1399
|
+
], 8, hl);
|
|
1400
|
+
}), 128)),
|
|
1401
|
+
rt.value.length ? y("", !0) : (r(), c("p", kl, " 没有匹配的前置关系 "))
|
|
1402
|
+
]),
|
|
1403
|
+
Pe.value ? (r(), c("p", bl, h(Pe.value), 1)) : y("", !0)
|
|
1404
|
+
], 16, rl)) : y("", !0)
|
|
1405
|
+
];
|
|
1406
|
+
}),
|
|
1407
|
+
_: 1
|
|
1408
|
+
}, 8, ["popup-transition", "popup-transition-duration", "placement"])
|
|
1394
1409
|
]))
|
|
1395
1410
|
], 16);
|
|
1396
1411
|
};
|
|
1397
1412
|
}
|
|
1398
1413
|
});
|
|
1399
1414
|
export {
|
|
1400
|
-
|
|
1415
|
+
_l as default
|
|
1401
1416
|
};
|