vxe-gantt 3.9.0 → 3.9.2
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/es/components.d.ts +6 -0
- package/es/components.js +11 -9
- package/es/gantt/index.d.ts +1421 -0
- package/es/gantt/index.js +27 -22
- package/es/gantt/src/gantt-body.d.ts +19 -0
- package/es/gantt/src/gantt-body.js +291 -288
- package/es/gantt/src/gantt-chart.d.ts +19 -0
- package/es/gantt/src/gantt-chart.js +486 -495
- package/es/gantt/src/gantt-footer.d.ts +16 -0
- package/es/gantt/src/gantt-footer.js +62 -57
- package/es/gantt/src/gantt-header.d.ts +16 -0
- package/es/gantt/src/gantt-header.js +172 -174
- package/es/gantt/src/gantt-view.d.ts +76 -0
- package/es/gantt/src/gantt-view.js +2437 -2512
- package/es/gantt/src/gantt.d.ts +729 -0
- package/es/gantt/src/gantt.js +2815 -2858
- package/es/gantt/src/static.d.ts +34 -0
- package/es/gantt/src/static.js +16 -36
- package/es/gantt/src/util.d.ts +9 -0
- package/es/gantt/src/util.js +28 -19
- package/es/gantt/style.css +1 -1
- package/es/gantt/style.mini.css +1 -0
- package/es/index.d.ts +6 -0
- package/es/index.esm.js +6 -6
- package/es/index.js +6 -0
- package/es/ui/index.d.ts +3 -0
- package/es/ui/index.js +123 -120
- package/es/ui/src/comp.d.ts +2 -0
- package/es/ui/src/comp.js +4 -1
- package/es/ui/src/depend.d.ts +1 -0
- package/es/ui/src/depend.js +14 -12
- package/es/ui/src/dom.d.ts +49 -0
- package/es/ui/src/dom.js +180 -169
- package/es/ui/src/log.d.ts +6 -0
- package/es/ui/src/log.js +18 -13
- package/es/ui/src/utils.d.ts +21 -0
- package/es/ui/src/utils.js +60 -62
- package/es/ui/src/vn.d.ts +2 -0
- package/es/ui/src/vn.js +12 -9
- package/es/vxe-gantt/index.d.ts +3 -0
- package/es/vxe-gantt/index.js +6 -3
- package/es/vxe-gantt/style.css +1 -1
- package/es/vxe-gantt/style.mini.css +1 -0
- package/es/vxe-ui/index.d.ts +3 -0
- package/es/vxe-ui/index.js +6 -3
- package/lib/components.js +39 -35
- package/lib/gantt/index.js +50 -36
- package/lib/gantt/src/gantt-body.js +240 -245
- package/lib/gantt/src/gantt-chart.js +405 -375
- package/lib/gantt/src/gantt-footer.js +63 -46
- package/lib/gantt/src/gantt-header.js +186 -162
- package/lib/gantt/src/gantt-view.js +1554 -1745
- package/lib/gantt/src/gantt.js +2455 -2676
- package/lib/gantt/src/static.js +34 -40
- package/lib/gantt/src/util.js +32 -15
- package/lib/gantt/style/index.js +1 -1
- package/lib/gantt/style/style.css +1 -1
- package/lib/gantt/style/style.mini.css +1 -0
- package/lib/index.common.js +35 -23
- package/lib/index.js +37 -0
- package/lib/index.umd.js +4910 -15882
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +989 -1
- package/lib/style.mini.css +1 -0
- package/lib/ui/index.js +36 -25
- package/lib/ui/src/comp.js +22 -7
- package/lib/ui/src/depend.js +30 -13
- package/lib/ui/src/dom.js +88 -95
- package/lib/ui/src/log.js +34 -18
- package/lib/ui/src/utils.js +58 -50
- package/lib/ui/src/vn.js +35 -9
- package/lib/ui/style/index.js +1 -1
- package/lib/vxe-gantt/index.js +35 -20
- package/lib/vxe-gantt/style/index.js +1 -1
- package/lib/vxe-gantt/style/style.css +1 -1
- package/lib/vxe-gantt/style/style.mini.css +1 -0
- package/lib/vxe-ui/index.js +35 -20
- package/lib/vxe-ui/style/index.js +1 -1
- package/package.json +7 -4
- package/packages/gantt/src/gantt-view.ts +2 -0
- package/packages/gantt/src/gantt.ts +4 -0
- package/packages/ui/src/utils.ts +3 -12
- package/es/gantt/style.min.css +0 -1
- package/es/style.css +0 -1
- package/es/style.min.css +0 -1
- package/es/vxe-gantt/style.min.css +0 -1
- package/lib/components.min.js +0 -1
- package/lib/gantt/index.min.js +0 -1
- package/lib/gantt/src/gantt-body.min.js +0 -1
- package/lib/gantt/src/gantt-chart.min.js +0 -1
- package/lib/gantt/src/gantt-footer.min.js +0 -1
- package/lib/gantt/src/gantt-header.min.js +0 -1
- package/lib/gantt/src/gantt-view.min.js +0 -1
- package/lib/gantt/src/gantt.min.js +0 -1
- package/lib/gantt/src/static.min.js +0 -1
- package/lib/gantt/src/util.min.js +0 -1
- package/lib/gantt/style/style.min.css +0 -1
- package/lib/style.min.css +0 -1
- package/lib/ui/index.min.js +0 -1
- package/lib/ui/src/comp.min.js +0 -1
- package/lib/ui/src/depend.min.js +0 -1
- package/lib/ui/src/dom.min.js +0 -1
- package/lib/ui/src/log.min.js +0 -1
- package/lib/ui/src/utils.min.js +0 -1
- package/lib/ui/src/vn.min.js +0 -1
- package/lib/vxe-gantt/index.min.js +0 -1
- package/lib/vxe-gantt/style/style.min.css +0 -1
- package/lib/vxe-ui/index.min.js +0 -1
- /package/es/ui/{style.min.css → style.mini.css} +0 -0
- /package/es/vxe-ui/{style.min.css → style.mini.css} +0 -0
- /package/lib/ui/style/{style.min.css → style.mini.css} +0 -0
- /package/lib/vxe-ui/style/{style.min.css → style.mini.css} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CreateElement } from 'vue';
|
|
2
|
+
import type { VxeGanttViewPrivateMethods, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types';
|
|
3
|
+
declare const _default: import("vue/types/vue").ExtendedVue<import("vue").default, unknown, {
|
|
4
|
+
renderVN(h: CreateElement): import("vue").VNode;
|
|
5
|
+
}, {
|
|
6
|
+
$xeGantt: import("vxe-pc-ui").VxeComponentBaseOptions & {
|
|
7
|
+
reactData: import("vxe-pc-ui/types/components/gantt").GanttReactData<any>;
|
|
8
|
+
internalData: import("vxe-pc-ui/types/components/gantt").GanttInternalData;
|
|
9
|
+
} & import("vxe-pc-ui/types/components/gantt").VxeGanttMethods<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttPrivateComputed<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttProps<any> & import("vue").default & VxeGanttPrivateMethods<any>;
|
|
10
|
+
$xeGanttView: import("vxe-pc-ui").VxeComponentBaseOptions & {
|
|
11
|
+
reactData: import("vxe-pc-ui/types/components/gantt-module").GanttViewReactData;
|
|
12
|
+
internalData: import("vxe-pc-ui/types/components/gantt-module").GanttViewInternalData;
|
|
13
|
+
$xeGantt: VxeGanttConstructor;
|
|
14
|
+
} & import("vxe-pc-ui/types/components/gantt-module").VxeGanttViewMethods & import("vxe-pc-ui/types/components/gantt-module").GanttViewPrivateComputed & import("vxe-pc-ui/types/components/gantt-module").VxeGanttViewProps & import("vue").default & VxeGanttViewPrivateMethods;
|
|
15
|
+
}, unknown>;
|
|
16
|
+
export default _default;
|
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
import { defineVxeComponent } from
|
|
2
|
-
const sourceType =
|
|
3
|
-
const viewType =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
$xeGanttView: {
|
|
11
|
-
default: null
|
|
12
|
-
}
|
|
1
|
+
import { defineVxeComponent } from "../../ui/src/comp";
|
|
2
|
+
const sourceType = "gantt";
|
|
3
|
+
const viewType = "footer";
|
|
4
|
+
var gantt_footer_default = defineVxeComponent({
|
|
5
|
+
name: "VxeGanttViewHeader",
|
|
6
|
+
inject: {
|
|
7
|
+
$xeGantt: {
|
|
8
|
+
default: null
|
|
13
9
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const { elemStore } = internalData;
|
|
44
|
-
const prefix = 'main-footer-';
|
|
45
|
-
elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
|
|
46
|
-
elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
|
|
47
|
-
},
|
|
48
|
-
destroyed() {
|
|
49
|
-
const _vm = this;
|
|
50
|
-
const $xeGanttView = _vm.$xeGanttView;
|
|
51
|
-
const { internalData } = $xeGanttView;
|
|
52
|
-
const { elemStore } = internalData;
|
|
53
|
-
const prefix = 'main-headefooterr-';
|
|
54
|
-
elemStore[`${prefix}wrapper`] = null;
|
|
55
|
-
elemStore[`${prefix}scroll`] = null;
|
|
56
|
-
},
|
|
57
|
-
render(h) {
|
|
58
|
-
return this.renderVN(h);
|
|
10
|
+
$xeGanttView: {
|
|
11
|
+
default: null
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
props: {},
|
|
15
|
+
computed: {
|
|
16
|
+
...{}
|
|
17
|
+
},
|
|
18
|
+
methods: {
|
|
19
|
+
//
|
|
20
|
+
// Render
|
|
21
|
+
//
|
|
22
|
+
renderVN(h) {
|
|
23
|
+
const _vm = this;
|
|
24
|
+
const $xeGantt = _vm.$xeGantt;
|
|
25
|
+
return h("div", {
|
|
26
|
+
ref: "refElem",
|
|
27
|
+
class: "vxe-gantt-view--footer-wrapper"
|
|
28
|
+
}, [
|
|
29
|
+
h("div", {
|
|
30
|
+
ref: "refHeaderScroll",
|
|
31
|
+
class: "vxe-gantt-view--footer-inner-wrapper",
|
|
32
|
+
on: {
|
|
33
|
+
contextmenu(evnt) {
|
|
34
|
+
$xeGantt.handleTaskFooterContextmenuEvent(evnt, { source: sourceType, type: viewType, $rowIndex: -1 });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, [])
|
|
38
|
+
]);
|
|
59
39
|
}
|
|
40
|
+
},
|
|
41
|
+
mounted() {
|
|
42
|
+
const _vm = this;
|
|
43
|
+
const $xeGanttView = _vm.$xeGanttView;
|
|
44
|
+
const { internalData } = $xeGanttView;
|
|
45
|
+
const { elemStore } = internalData;
|
|
46
|
+
const prefix = "main-footer-";
|
|
47
|
+
elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
|
|
48
|
+
elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
|
|
49
|
+
},
|
|
50
|
+
destroyed() {
|
|
51
|
+
const _vm = this;
|
|
52
|
+
const $xeGanttView = _vm.$xeGanttView;
|
|
53
|
+
const { internalData } = $xeGanttView;
|
|
54
|
+
const { elemStore } = internalData;
|
|
55
|
+
const prefix = "main-headefooterr-";
|
|
56
|
+
elemStore[`${prefix}wrapper`] = null;
|
|
57
|
+
elemStore[`${prefix}scroll`] = null;
|
|
58
|
+
},
|
|
59
|
+
render(h) {
|
|
60
|
+
return this.renderVN(h);
|
|
61
|
+
}
|
|
60
62
|
});
|
|
63
|
+
export {
|
|
64
|
+
gantt_footer_default as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CreateElement } from 'vue';
|
|
2
|
+
import type { VxeGanttViewPrivateMethods, VxeGanttConstructor, VxeGanttPrivateMethods } from '../../../types';
|
|
3
|
+
declare const _default: import("vue/types/vue").ExtendedVue<import("vue").default, unknown, {
|
|
4
|
+
renderVN(h: CreateElement): import("vue").VNode;
|
|
5
|
+
}, {
|
|
6
|
+
$xeGantt: import("vxe-pc-ui").VxeComponentBaseOptions & {
|
|
7
|
+
reactData: import("vxe-pc-ui/types/components/gantt").GanttReactData<any>;
|
|
8
|
+
internalData: import("vxe-pc-ui/types/components/gantt").GanttInternalData;
|
|
9
|
+
} & import("vxe-pc-ui/types/components/gantt").VxeGanttMethods<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttPrivateComputed<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttProps<any> & import("vue").default & VxeGanttPrivateMethods<any>;
|
|
10
|
+
$xeGanttView: import("vxe-pc-ui").VxeComponentBaseOptions & {
|
|
11
|
+
reactData: import("vxe-pc-ui/types/components/gantt-module").GanttViewReactData;
|
|
12
|
+
internalData: import("vxe-pc-ui/types/components/gantt-module").GanttViewInternalData;
|
|
13
|
+
$xeGantt: VxeGanttConstructor;
|
|
14
|
+
} & import("vxe-pc-ui/types/components/gantt-module").VxeGanttViewMethods & import("vxe-pc-ui/types/components/gantt-module").GanttViewPrivateComputed & import("vxe-pc-ui/types/components/gantt-module").VxeGanttViewProps & import("vue").default & VxeGanttViewPrivateMethods;
|
|
15
|
+
}, Record<never, any>>;
|
|
16
|
+
export default _default;
|
|
@@ -1,179 +1,177 @@
|
|
|
1
|
-
import { defineVxeComponent } from
|
|
2
|
-
import { VxeUI } from
|
|
3
|
-
import XEUtils from
|
|
1
|
+
import { defineVxeComponent } from "../../ui/src/comp";
|
|
2
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
3
|
+
import XEUtils from "xe-utils";
|
|
4
4
|
const { getI18n } = VxeUI;
|
|
5
|
-
const sourceType =
|
|
6
|
-
const viewType =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
$xeGanttView: {
|
|
14
|
-
default: null
|
|
15
|
-
}
|
|
5
|
+
const sourceType = "gantt";
|
|
6
|
+
const viewType = "header";
|
|
7
|
+
var gantt_header_default = defineVxeComponent({
|
|
8
|
+
name: "VxeGanttViewHeader",
|
|
9
|
+
inject: {
|
|
10
|
+
$xeGantt: {
|
|
11
|
+
default: null
|
|
16
12
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
13
|
+
$xeGanttView: {
|
|
14
|
+
default: null
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
computed: {
|
|
18
|
+
...{}
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
//
|
|
22
|
+
// Render
|
|
23
|
+
//
|
|
24
|
+
renderVN(h) {
|
|
25
|
+
const _vm = this;
|
|
26
|
+
const $xeGantt = _vm.$xeGantt;
|
|
27
|
+
const $xeGanttView = _vm.$xeGanttView;
|
|
28
|
+
const reactData = $xeGanttView.reactData;
|
|
29
|
+
const internalData = $xeGanttView.internalData;
|
|
30
|
+
const { headerGroups, viewCellWidth } = reactData;
|
|
31
|
+
const { todayDateMaps, visibleColumn } = internalData;
|
|
32
|
+
const taskViewOpts = $xeGantt.computeTaskViewOpts;
|
|
33
|
+
const minScale = $xeGantt.computeMinScale;
|
|
34
|
+
const scaleStep = $xeGantt.computeScaleStep;
|
|
35
|
+
const { showNowLine } = taskViewOpts;
|
|
36
|
+
return h("div", {
|
|
37
|
+
ref: "refElem",
|
|
38
|
+
class: "vxe-gantt-view--header-wrapper"
|
|
39
|
+
}, [
|
|
40
|
+
h("div", {
|
|
41
|
+
ref: "refHeaderScroll",
|
|
42
|
+
class: "vxe-gantt-view--header-inner-wrapper",
|
|
43
|
+
on: {
|
|
44
|
+
scroll: $xeGanttView.triggerHeaderScrollEvent
|
|
45
|
+
}
|
|
46
|
+
}, [
|
|
47
|
+
h("div", {
|
|
48
|
+
ref: "refHeaderXSpace",
|
|
49
|
+
class: "vxe-body--x-space"
|
|
50
|
+
}),
|
|
51
|
+
h("table", {
|
|
52
|
+
ref: "refHeaderTable",
|
|
53
|
+
class: "vxe-gantt-view--header-table"
|
|
54
|
+
}, [
|
|
55
|
+
h("colgroup", {}, visibleColumn.map((column, cIndex) => {
|
|
56
|
+
return h("col", {
|
|
57
|
+
key: cIndex,
|
|
58
|
+
style: {
|
|
59
|
+
width: `${viewCellWidth}px`
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
})),
|
|
63
|
+
h("thead", {}, headerGroups.map(({ scaleItem, columns }, $rowIndex) => {
|
|
64
|
+
const { type, titleFormat, titleMethod, headerCellStyle, slots } = scaleItem;
|
|
65
|
+
const titleSlot = slots ? slots.title : null;
|
|
66
|
+
const isLast = $rowIndex === headerGroups.length - 1;
|
|
67
|
+
const todayValue = isLast && showNowLine ? todayDateMaps[type] : null;
|
|
68
|
+
return h("tr", {
|
|
69
|
+
key: $rowIndex
|
|
70
|
+
}, columns.map((column, cIndex) => {
|
|
71
|
+
const { field, childCount, dateObj, startDateObj, endDateObj } = column;
|
|
72
|
+
let label = `${column.title}`;
|
|
73
|
+
if ((isLast || minScale && (minScale.type === "date" || minScale.type === "day") && (type === "date" || type === "day")) && scaleStep > 1) {
|
|
74
|
+
label = getI18n(`vxe.gantt.stepFormat.${type}`, {
|
|
75
|
+
start: startDateObj,
|
|
76
|
+
end: endDateObj,
|
|
77
|
+
eStartLabel: getI18n(`vxe.gantt.dayss.w${startDateObj.e}`),
|
|
78
|
+
eEndLabel: getI18n(`vxe.gantt.dayss.w${endDateObj.e}`)
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
if (type === "day") {
|
|
82
|
+
if ($rowIndex) {
|
|
83
|
+
label = getI18n(`vxe.gantt.tSimpleFormat.${type}`, {
|
|
84
|
+
eLabel: getI18n(`vxe.gantt.dayss.w${dateObj.e}`)
|
|
85
|
+
});
|
|
86
|
+
} else {
|
|
87
|
+
label = getI18n(`vxe.gantt.tFullFormat.${type}`, {
|
|
88
|
+
eLabel: getI18n(`vxe.gantt.dayss.w${dateObj.e}`)
|
|
89
|
+
});
|
|
43
90
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
let cellVNs = label;
|
|
102
|
-
const ctParams = {
|
|
103
|
-
source: sourceType,
|
|
104
|
-
type: viewType,
|
|
105
|
-
column,
|
|
106
|
-
scaleObj: scaleItem,
|
|
107
|
-
title: label,
|
|
108
|
-
dateObj,
|
|
109
|
-
startDateObj,
|
|
110
|
-
endDateObj,
|
|
111
|
-
$rowIndex
|
|
112
|
-
};
|
|
113
|
-
if (titleSlot) {
|
|
114
|
-
cellVNs = $xeGantt.callSlot(titleSlot, ctParams, h);
|
|
115
|
-
}
|
|
116
|
-
else if (titleMethod) {
|
|
117
|
-
cellVNs = `${titleMethod(ctParams)}`;
|
|
118
|
-
}
|
|
119
|
-
else if (titleFormat) {
|
|
120
|
-
cellVNs = XEUtils.toDateString(dateObj.date, titleFormat);
|
|
121
|
-
}
|
|
122
|
-
let cellStys = {};
|
|
123
|
-
if (headerCellStyle) {
|
|
124
|
-
if (XEUtils.isFunction(headerCellStyle)) {
|
|
125
|
-
cellStys = headerCellStyle(ctParams) || null;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
cellStys = headerCellStyle;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return h('th', {
|
|
132
|
-
key: cIndex,
|
|
133
|
-
class: ['vxe-gantt-view--header-column', {
|
|
134
|
-
'is--now': showNowLine && todayValue && todayValue === field
|
|
135
|
-
}],
|
|
136
|
-
attrs: {
|
|
137
|
-
colspan: childCount || null,
|
|
138
|
-
title: titleSlot ? null : label
|
|
139
|
-
},
|
|
140
|
-
style: cellStys || undefined,
|
|
141
|
-
on: {
|
|
142
|
-
contextmenu(evnt) {
|
|
143
|
-
$xeGantt.handleTaskHeaderContextmenuEvent(evnt, ctParams);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}, cellVNs);
|
|
147
|
-
}));
|
|
148
|
-
}))
|
|
149
|
-
])
|
|
150
|
-
])
|
|
151
|
-
]);
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
mounted() {
|
|
155
|
-
const _vm = this;
|
|
156
|
-
const $xeGanttView = _vm.$xeGanttView;
|
|
157
|
-
const { internalData } = $xeGanttView;
|
|
158
|
-
const { elemStore } = internalData;
|
|
159
|
-
const prefix = 'main-header-';
|
|
160
|
-
elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
|
|
161
|
-
elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
|
|
162
|
-
elemStore[`${prefix}table`] = _vm.$refs.refHeaderTable;
|
|
163
|
-
elemStore[`${prefix}xSpace`] = _vm.$refs.refHeaderXSpace;
|
|
164
|
-
},
|
|
165
|
-
destroyed() {
|
|
166
|
-
const _vm = this;
|
|
167
|
-
const $xeGanttView = _vm.$xeGanttView;
|
|
168
|
-
const { internalData } = $xeGanttView;
|
|
169
|
-
const { elemStore } = internalData;
|
|
170
|
-
const prefix = 'main-header-';
|
|
171
|
-
elemStore[`${prefix}wrapper`] = null;
|
|
172
|
-
elemStore[`${prefix}scroll`] = null;
|
|
173
|
-
elemStore[`${prefix}table`] = null;
|
|
174
|
-
elemStore[`${prefix}xSpace`] = null;
|
|
175
|
-
},
|
|
176
|
-
render(h) {
|
|
177
|
-
return this.renderVN(h);
|
|
91
|
+
} else {
|
|
92
|
+
if ($rowIndex) {
|
|
93
|
+
label = getI18n(`vxe.gantt.tSimpleFormat.${type}`, dateObj);
|
|
94
|
+
} else {
|
|
95
|
+
label = getI18n(`vxe.gantt.tFullFormat.${type}`, dateObj);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
let cellVNs = label;
|
|
100
|
+
const ctParams = {
|
|
101
|
+
source: sourceType,
|
|
102
|
+
type: viewType,
|
|
103
|
+
column,
|
|
104
|
+
scaleObj: scaleItem,
|
|
105
|
+
title: label,
|
|
106
|
+
dateObj,
|
|
107
|
+
startDateObj,
|
|
108
|
+
endDateObj,
|
|
109
|
+
$rowIndex
|
|
110
|
+
};
|
|
111
|
+
if (titleSlot) {
|
|
112
|
+
cellVNs = $xeGantt.callSlot(titleSlot, ctParams, h);
|
|
113
|
+
} else if (titleMethod) {
|
|
114
|
+
cellVNs = `${titleMethod(ctParams)}`;
|
|
115
|
+
} else if (titleFormat) {
|
|
116
|
+
cellVNs = XEUtils.toDateString(dateObj.date, titleFormat);
|
|
117
|
+
}
|
|
118
|
+
let cellStys = {};
|
|
119
|
+
if (headerCellStyle) {
|
|
120
|
+
if (XEUtils.isFunction(headerCellStyle)) {
|
|
121
|
+
cellStys = headerCellStyle(ctParams) || null;
|
|
122
|
+
} else {
|
|
123
|
+
cellStys = headerCellStyle;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return h("th", {
|
|
127
|
+
key: cIndex,
|
|
128
|
+
class: ["vxe-gantt-view--header-column", {
|
|
129
|
+
"is--now": showNowLine && todayValue && todayValue === field
|
|
130
|
+
}],
|
|
131
|
+
attrs: {
|
|
132
|
+
colspan: childCount || null,
|
|
133
|
+
title: titleSlot ? null : label
|
|
134
|
+
},
|
|
135
|
+
style: cellStys || void 0,
|
|
136
|
+
on: {
|
|
137
|
+
contextmenu(evnt) {
|
|
138
|
+
$xeGantt.handleTaskHeaderContextmenuEvent(evnt, ctParams);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}, cellVNs);
|
|
142
|
+
}));
|
|
143
|
+
}))
|
|
144
|
+
])
|
|
145
|
+
])
|
|
146
|
+
]);
|
|
178
147
|
}
|
|
148
|
+
},
|
|
149
|
+
mounted() {
|
|
150
|
+
const _vm = this;
|
|
151
|
+
const $xeGanttView = _vm.$xeGanttView;
|
|
152
|
+
const { internalData } = $xeGanttView;
|
|
153
|
+
const { elemStore } = internalData;
|
|
154
|
+
const prefix = "main-header-";
|
|
155
|
+
elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
|
|
156
|
+
elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
|
|
157
|
+
elemStore[`${prefix}table`] = _vm.$refs.refHeaderTable;
|
|
158
|
+
elemStore[`${prefix}xSpace`] = _vm.$refs.refHeaderXSpace;
|
|
159
|
+
},
|
|
160
|
+
destroyed() {
|
|
161
|
+
const _vm = this;
|
|
162
|
+
const $xeGanttView = _vm.$xeGanttView;
|
|
163
|
+
const { internalData } = $xeGanttView;
|
|
164
|
+
const { elemStore } = internalData;
|
|
165
|
+
const prefix = "main-header-";
|
|
166
|
+
elemStore[`${prefix}wrapper`] = null;
|
|
167
|
+
elemStore[`${prefix}scroll`] = null;
|
|
168
|
+
elemStore[`${prefix}table`] = null;
|
|
169
|
+
elemStore[`${prefix}xSpace`] = null;
|
|
170
|
+
},
|
|
171
|
+
render(h) {
|
|
172
|
+
return this.renderVN(h);
|
|
173
|
+
}
|
|
179
174
|
});
|
|
175
|
+
export {
|
|
176
|
+
gantt_header_default as default
|
|
177
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { VNode, CreateElement } from 'vue';
|
|
2
|
+
import type { VxeTableConstructor, VxeTableMethods, VxeTablePrivateMethods, VxeTablePropTypes } from 'vxe-table';
|
|
3
|
+
import type { VxeScrollbarProps } from 'vxe-pc-ui';
|
|
4
|
+
import type { VxeGanttViewConstructor, GanttViewReactData, VxeGanttPropTypes, VxeGanttViewPrivateMethods, GanttViewInternalData, VxeGanttPrivateMethods } from '../../../types';
|
|
5
|
+
export declare function handleCriticalPath($xeGanttView: VxeGanttViewConstructor & VxeGanttViewPrivateMethods, data: any[], links: VxeGanttPropTypes.Links): void;
|
|
6
|
+
declare const _default: import("vue/types/vue").ExtendedVue<import("vue").default, {
|
|
7
|
+
xID: string;
|
|
8
|
+
reactData: GanttViewReactData;
|
|
9
|
+
internalData: GanttViewInternalData;
|
|
10
|
+
scrollDefaultConf: VxeScrollbarProps;
|
|
11
|
+
reScrollFlag: number;
|
|
12
|
+
}, {
|
|
13
|
+
getScrollViewElem(): HTMLElement | null;
|
|
14
|
+
refreshData(): Promise<void>;
|
|
15
|
+
updateViewData(force?: boolean): Promise<void>;
|
|
16
|
+
connectUpdate({ $table }: {
|
|
17
|
+
$table: VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
handleUpdateStyle(): Promise<[void, void | null]> | undefined;
|
|
20
|
+
handleLazyRecalculate(): Promise<void>;
|
|
21
|
+
handleUpdateCurrentRow(row: any): void;
|
|
22
|
+
handleUpdateHoverRow(row: any): void;
|
|
23
|
+
handleSyncScrollTop(params: {
|
|
24
|
+
scrollTop: number;
|
|
25
|
+
}): void;
|
|
26
|
+
handleScrollEvent(evnt: Event, isRollY: boolean, isRollX: boolean, scrollTop: number, scrollLeft: number): void;
|
|
27
|
+
triggerHeaderScrollEvent(evnt: Event): void;
|
|
28
|
+
triggerBodyScrollEvent(evnt: Event): void;
|
|
29
|
+
triggerVirtualScrollXEvent(evnt: Event): void;
|
|
30
|
+
triggerVirtualScrollYEvent(evnt: Event): void;
|
|
31
|
+
handleUpdateSXSpace(): Promise<void>;
|
|
32
|
+
handleUpdateSYSpace(): Promise<void>;
|
|
33
|
+
handleUpdateSYStatus(sYLoad: boolean): void;
|
|
34
|
+
/**
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
updateScrollbar(): Promise<void>;
|
|
38
|
+
handleGlobalResizeEvent(): void;
|
|
39
|
+
bindScrollbarResize(): void;
|
|
40
|
+
renderScrollX(h: CreateElement): VNode;
|
|
41
|
+
renderScrollY(h: CreateElement): VNode;
|
|
42
|
+
renderViewport(h: CreateElement): VNode;
|
|
43
|
+
renderNativeBody(h: CreateElement): VNode;
|
|
44
|
+
renderVirtualBody(h: CreateElement): VNode;
|
|
45
|
+
renderVN(h: CreateElement): VNode;
|
|
46
|
+
}, {
|
|
47
|
+
computeGanttIsVScrollbar: import("vxe-pc-ui").VxeComponentIsVScrollbar;
|
|
48
|
+
computeScrollbarXOpts: VxeTablePropTypes.ScrollbarXConfig;
|
|
49
|
+
computeScrollbarYOpts: VxeTablePropTypes.ScrollbarYConfig;
|
|
50
|
+
computeScrollXHeight: number;
|
|
51
|
+
computeScrollYWidth: number;
|
|
52
|
+
computeScrollXVisible: boolean | "auto" | "hidden" | "visible" | undefined;
|
|
53
|
+
computeScrollYVisible: boolean | "auto" | "hidden" | "visible" | undefined;
|
|
54
|
+
computeScrollXAutoHide: boolean | undefined;
|
|
55
|
+
computeScrollYAutoHide: boolean | undefined;
|
|
56
|
+
computeScrollbarXToTop: boolean;
|
|
57
|
+
computeScrollbarYToLeft: boolean;
|
|
58
|
+
computeScrollbarWrapperClss: string;
|
|
59
|
+
computeScaleDateList: Date[];
|
|
60
|
+
computeNowLineLeft: number;
|
|
61
|
+
computeSize: import("vxe-pc-ui").VxeComponentSizeType;
|
|
62
|
+
updateThumbSize: () => void;
|
|
63
|
+
updateThumbOffset: () => void;
|
|
64
|
+
clickTrackXEvent: (evnt: MouseEvent) => void;
|
|
65
|
+
clickTrackYEvent: (evnt: MouseEvent) => void;
|
|
66
|
+
pointerdownThumbXEvent: (evnt: PointerEvent) => void;
|
|
67
|
+
pointermoveThumbXEvent: (evnt: PointerEvent) => void;
|
|
68
|
+
cleatPointerThumbEvent: (evnt: PointerEvent) => void;
|
|
69
|
+
pointerdownThumbYEvent: (evnt: PointerEvent) => void;
|
|
70
|
+
pointermoveThumbYEvent: (evnt: PointerEvent) => void;
|
|
71
|
+
$xeGantt: import("vxe-pc-ui").VxeComponentBaseOptions & {
|
|
72
|
+
reactData: import("vxe-pc-ui/types/components/gantt").GanttReactData<any>;
|
|
73
|
+
internalData: import("vxe-pc-ui/types/components/gantt").GanttInternalData;
|
|
74
|
+
} & import("vxe-pc-ui/types/components/gantt").VxeGanttMethods<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttPrivateComputed<any> & import("vxe-pc-ui/types/components/gantt").VxeGanttProps<any> & import("vue").default & VxeGanttPrivateMethods<any>;
|
|
75
|
+
}, unknown>;
|
|
76
|
+
export default _default;
|