vxe-gantt 0.0.3 → 3.0.0-beta.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/README.md +14 -46
- package/es/components.js +3 -2
- package/es/gantt/src/gantt-body.js +83 -49
- package/es/gantt/src/gantt-chart.js +91 -43
- package/es/gantt/src/gantt-header.js +63 -36
- package/es/gantt/src/gantt-view.js +638 -586
- package/es/gantt/src/gantt.js +1347 -1178
- package/es/gantt/src/util.js +1 -4
- package/es/gantt/style.css +42 -17
- package/es/gantt/style.min.css +1 -1
- package/es/index.esm.js +5 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +9 -3
- package/es/ui/src/comp.js +1 -2
- package/es/ui/src/log.js +3 -2
- package/es/ui/src/utils.js +17 -17
- package/es/vxe-gantt/style.css +42 -17
- package/es/vxe-gantt/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/components.js +20 -19
- package/lib/components.min.js +1 -1
- package/lib/gantt/index.js +3 -3
- package/lib/gantt/index.min.js +1 -1
- package/lib/gantt/src/gantt-body.js +109 -87
- package/lib/gantt/src/gantt-body.min.js +1 -1
- package/lib/gantt/src/gantt-chart.js +109 -69
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt-header.js +75 -56
- package/lib/gantt/src/gantt-header.min.js +1 -1
- package/lib/gantt/src/gantt-view.js +684 -686
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +1631 -1559
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/gantt/src/util.js +1 -4
- package/lib/gantt/src/util.min.js +1 -1
- package/lib/gantt/style/style.css +42 -17
- package/lib/gantt/style/style.min.css +1 -1
- package/lib/index.common.js +12 -7
- package/lib/index.umd.js +10705 -5870
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +12 -16
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/comp.js +3 -2
- package/lib/ui/src/comp.min.js +1 -1
- package/lib/ui/src/dom.js +33 -33
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +4 -3
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/utils.js +21 -24
- package/lib/ui/src/utils.min.js +1 -1
- package/lib/vxe-gantt/index.js +4 -2
- package/lib/vxe-gantt/index.min.js +1 -1
- package/lib/vxe-gantt/style/style.css +42 -17
- package/lib/vxe-gantt/style/style.min.css +1 -1
- package/lib/vxe-ui/index.js +4 -2
- package/lib/vxe-ui/index.min.js +1 -1
- package/package.json +13 -13
- package/packages/components.ts +8 -5
- package/packages/gantt/index.ts +2 -2
- package/packages/gantt/src/gantt-body.ts +89 -53
- package/packages/gantt/src/gantt-chart.ts +100 -49
- package/packages/gantt/src/gantt-header.ts +69 -39
- package/packages/gantt/src/gantt-view.ts +692 -624
- package/packages/gantt/src/gantt.ts +1460 -1240
- package/packages/gantt/src/util.ts +1 -4
- package/packages/index.ts +6 -2
- package/packages/ui/index.ts +9 -3
- package/packages/ui/src/comp.ts +2 -2
- package/packages/ui/src/log.ts +3 -1
- package/packages/ui/src/utils.ts +22 -21
- package/styles/components/gantt-module/gantt-chart.scss +28 -9
- package/styles/components/gantt.scss +12 -7
- package/styles/theme/base.scss +5 -1
- package/types/all.d.ts +3 -3
- package/types/index.d.ts +2 -2
- package/README.en.md +0 -72
- package/README.ja-JP.md +0 -72
- package/README.zh-TW.md +0 -73
- package/es/gantt/src/emits.js +0 -4
- package/es/gantt/src/grid-emits.js +0 -16
- package/es/gantt/src/grid-props.js +0 -7
- package/es/gantt/src/props.js +0 -2
- package/es/gantt/src/table-emits.js +0 -97
- package/es/gantt/src/table-props.js +0 -298
- package/lib/gantt/src/emits.js +0 -8
- package/lib/gantt/src/emits.min.js +0 -1
- package/lib/gantt/src/grid-emits.js +0 -8
- package/lib/gantt/src/grid-emits.min.js +0 -1
- package/lib/gantt/src/grid-props.js +0 -24
- package/lib/gantt/src/grid-props.min.js +0 -1
- package/lib/gantt/src/props.js +0 -13
- package/lib/gantt/src/props.min.js +0 -1
- package/lib/gantt/src/table-emits.js +0 -7
- package/lib/gantt/src/table-emits.min.js +0 -1
- package/lib/gantt/src/table-props.js +0 -306
- package/lib/gantt/src/table-props.min.js +0 -1
- package/packages/gantt/src/emits.ts +0 -7
- package/packages/gantt/src/grid-emits.ts +0 -19
- package/packages/gantt/src/grid-props.ts +0 -23
- package/packages/gantt/src/props.ts +0 -13
- package/packages/gantt/src/table-emits.ts +0 -109
- package/packages/gantt/src/table-props.ts +0 -304
package/lib/gantt/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VxeGantt=exports.Gantt=void 0;var _core=require("@vxe-ui/core"),_gantt=_interopRequireDefault(require("./src/gantt"));function _interopRequireDefault(
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VxeGantt=exports.Gantt=void 0;var _core=require("@vxe-ui/core"),_gantt=_interopRequireDefault(require("./src/gantt"));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var VxeGantt=exports.VxeGantt=Object.assign({},_gantt.default,{install:function(t){t.component(_gantt.default.name,_gantt.default)}}),Gantt=(_core.VxeUI.dynamicApp&&_core.VxeUI.dynamicApp.use(VxeGantt),_core.VxeUI.component(_gantt.default),exports.Gantt=VxeGantt),_default=exports.default=VxeGantt;
|
|
@@ -4,115 +4,137 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _vue = require("vue");
|
|
8
7
|
var _comp = require("../../ui/src/comp");
|
|
9
8
|
var _util = require("./util");
|
|
10
9
|
var _ganttChart = _interopRequireDefault(require("./gantt-chart"));
|
|
11
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
11
|
var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
13
12
|
name: 'VxeGanttViewBody',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
13
|
+
inject: {
|
|
14
|
+
$xeGantt: {
|
|
15
|
+
default: null
|
|
16
|
+
},
|
|
17
|
+
$xeGanttView: {
|
|
18
|
+
default: null
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
props: {},
|
|
22
|
+
data: function data() {
|
|
23
|
+
return {};
|
|
24
|
+
},
|
|
25
|
+
computed: Object.assign({}, {}),
|
|
26
|
+
methods: {
|
|
27
|
+
//
|
|
28
|
+
// Render
|
|
29
|
+
//
|
|
30
|
+
renderRows: function renderRows(h) {
|
|
31
|
+
var _vm = this;
|
|
32
|
+
var $xeGantt = _vm.$xeGantt;
|
|
33
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
34
|
+
var $xeTable = $xeGanttView.internalData.xeTable;
|
|
35
|
+
var tableInternalData = $xeTable ? $xeTable : {};
|
|
36
|
+
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData || {};
|
|
37
|
+
var cellOpts = {};
|
|
38
|
+
var rowOpts = {};
|
|
39
|
+
var defaultRowHeight = 0;
|
|
35
40
|
if ($xeTable) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
computeDefaultRowHeight
|
|
40
|
-
} = $xeTable.getComputeMaps();
|
|
41
|
-
cellOpts = computeCellOpts.value;
|
|
42
|
-
rowOpts = computeRowOpts.value;
|
|
43
|
-
defaultRowHeight = computeDefaultRowHeight.value;
|
|
41
|
+
cellOpts = $xeTable.computeCellOpts;
|
|
42
|
+
rowOpts = $xeTable.computeRowOpts;
|
|
43
|
+
defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
tableColumn
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
trVNs.push((0, _vue.h)('tr', {
|
|
45
|
+
var reactData = $xeGanttView.reactData;
|
|
46
|
+
var tableData = reactData.tableData,
|
|
47
|
+
tableColumn = reactData.tableColumn;
|
|
48
|
+
var trVNs = [];
|
|
49
|
+
tableData.forEach(function (row, rIndex) {
|
|
50
|
+
var rowid = $xeTable ? $xeTable.getRowid(row) : '';
|
|
51
|
+
var rowRest = fullAllDataRowIdData[rowid] || {};
|
|
52
|
+
var cellHeight = (0, _util.getCellRestHeight)(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
53
|
+
trVNs.push(h('tr', {
|
|
55
54
|
key: rIndex
|
|
56
|
-
}, tableColumn.map((column, cIndex)
|
|
57
|
-
return
|
|
55
|
+
}, tableColumn.map(function (column, cIndex) {
|
|
56
|
+
return h('td', {
|
|
58
57
|
key: cIndex,
|
|
59
58
|
class: 'vxe-gantt-view--body-column',
|
|
60
59
|
style: {
|
|
61
|
-
height:
|
|
60
|
+
height: "".concat(cellHeight, "px")
|
|
61
|
+
},
|
|
62
|
+
on: {
|
|
63
|
+
click: function click(evnt) {
|
|
64
|
+
$xeGantt.handleTaskCellClickEvent(evnt, {
|
|
65
|
+
row: row
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
dblclick: function dblclick(evnt) {
|
|
69
|
+
$xeGantt.handleTaskCellDblclickEvent(evnt, {
|
|
70
|
+
row: row
|
|
71
|
+
});
|
|
72
|
+
}
|
|
62
73
|
}
|
|
63
74
|
});
|
|
64
75
|
})));
|
|
65
76
|
});
|
|
66
77
|
return trVNs;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
78
|
+
},
|
|
79
|
+
renderVN: function renderVN(h) {
|
|
80
|
+
var _vm = this;
|
|
81
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
82
|
+
var reactData = $xeGanttView.reactData;
|
|
83
|
+
var tableColumn = reactData.tableColumn,
|
|
84
|
+
viewCellWidth = reactData.viewCellWidth;
|
|
85
|
+
return h('div', {
|
|
86
|
+
ref: 'refElem',
|
|
74
87
|
class: 'vxe-gantt-view--body-wrapper'
|
|
75
|
-
}, [
|
|
76
|
-
ref: refBodyScroll,
|
|
88
|
+
}, [h('div', {
|
|
89
|
+
ref: 'refBodyScroll',
|
|
77
90
|
class: 'vxe-gantt-view--body-inner-wrapper',
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
on: {
|
|
92
|
+
scroll: $xeGanttView.triggerBodyScrollEvent
|
|
93
|
+
}
|
|
94
|
+
}, [h('div', {
|
|
95
|
+
ref: 'refBodyXSpace',
|
|
81
96
|
class: 'vxe-body--x-space'
|
|
82
|
-
}),
|
|
83
|
-
ref: refBodyYSpace,
|
|
97
|
+
}), h('div', {
|
|
98
|
+
ref: 'refBodyYSpace',
|
|
84
99
|
class: 'vxe-body--y-space'
|
|
85
|
-
}),
|
|
86
|
-
ref: refBodyTable,
|
|
100
|
+
}), h('table', {
|
|
101
|
+
ref: 'refBodyTable',
|
|
87
102
|
class: 'vxe-gantt-view--body-table'
|
|
88
|
-
}, [
|
|
89
|
-
return
|
|
90
|
-
key: cIndex
|
|
103
|
+
}, [h('colgroup', {}, tableColumn.map(function (column, cIndex) {
|
|
104
|
+
return h('col', {
|
|
105
|
+
key: cIndex,
|
|
106
|
+
style: {
|
|
107
|
+
width: "".concat(viewCellWidth, "px")
|
|
108
|
+
}
|
|
91
109
|
});
|
|
92
|
-
})),
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
})), h('tbody', {}, _vm.renderRows(h))]), h(_ganttChart.default)])]);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
mounted: function mounted() {
|
|
114
|
+
var _vm = this;
|
|
115
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
116
|
+
var internalData = $xeGanttView.internalData;
|
|
117
|
+
var elemStore = internalData.elemStore;
|
|
118
|
+
var prefix = 'main-body-';
|
|
119
|
+
elemStore["".concat(prefix, "wrapper")] = _vm.$refs.refElem;
|
|
120
|
+
elemStore["".concat(prefix, "scroll")] = _vm.$refs.refBodyScroll;
|
|
121
|
+
elemStore["".concat(prefix, "table")] = _vm.$refs.refBodyTable;
|
|
122
|
+
elemStore["".concat(prefix, "xSpace")] = _vm.$refs.refBodyXSpace;
|
|
123
|
+
elemStore["".concat(prefix, "ySpace")] = _vm.$refs.refBodyYSpace;
|
|
124
|
+
},
|
|
125
|
+
destroyed: function destroyed() {
|
|
126
|
+
var _vm = this;
|
|
127
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
128
|
+
var internalData = $xeGanttView.internalData;
|
|
129
|
+
var elemStore = internalData.elemStore;
|
|
130
|
+
var prefix = 'main-body-';
|
|
131
|
+
elemStore["".concat(prefix, "wrapper")] = null;
|
|
132
|
+
elemStore["".concat(prefix, "scroll")] = null;
|
|
133
|
+
elemStore["".concat(prefix, "table")] = null;
|
|
134
|
+
elemStore["".concat(prefix, "xSpace")] = null;
|
|
135
|
+
elemStore["".concat(prefix, "ySpace")] = null;
|
|
136
|
+
},
|
|
137
|
+
render: function render(h) {
|
|
138
|
+
return this.renderVN(h);
|
|
117
139
|
}
|
|
118
140
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_util=require("./util"),_ganttChart=_interopRequireDefault(require("./gantt-chart"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeGanttViewBody",inject:{$xeGantt:{default:null},$xeGanttView:{default:null}},props:{},data:function(){return{}},computed:Object.assign({},{}),methods:{renderRows:function(n){var l=this.$xeGantt,e=this.$xeGanttView,o=e.internalData.xeTable,c=(o||{}).fullAllDataRowIdData||{},i={},u={},d=0,e=(o&&(i=o.computeCellOpts,u=o.computeRowOpts,d=o.computeDefaultRowHeight),e.reactData),t=e.tableData,s=e.tableColumn,f=[];return t.forEach(function(a,e){var t=o?o.getRowid(a):"",t=c[t]||{},r=(0,_util.getCellRestHeight)(t,i,u,d);f.push(n("tr",{key:e},s.map(function(e,t){return n("td",{key:t,class:"vxe-gantt-view--body-column",style:{height:"".concat(r,"px")},on:{click:function(e){l.handleTaskCellClickEvent(e,{row:a})},dblclick:function(e){l.handleTaskCellDblclickEvent(e,{row:a})}}})})))}),f},renderVN:function(a){var e=this.$xeGanttView,t=e.reactData,r=t.tableColumn,n=t.viewCellWidth;return a("div",{ref:"refElem",class:"vxe-gantt-view--body-wrapper"},[a("div",{ref:"refBodyScroll",class:"vxe-gantt-view--body-inner-wrapper",on:{scroll:e.triggerBodyScrollEvent}},[a("div",{ref:"refBodyXSpace",class:"vxe-body--x-space"}),a("div",{ref:"refBodyYSpace",class:"vxe-body--y-space"}),a("table",{ref:"refBodyTable",class:"vxe-gantt-view--body-table"},[a("colgroup",{},r.map(function(e,t){return a("col",{key:t,style:{width:"".concat(n,"px")}})})),a("tbody",{},this.renderRows(a))]),a(_ganttChart.default)])])}},mounted:function(){var e=this,t=e.$xeGanttView.internalData.elemStore,a="main-body-";t["".concat(a,"wrapper")]=e.$refs.refElem,t["".concat(a,"scroll")]=e.$refs.refBodyScroll,t["".concat(a,"table")]=e.$refs.refBodyTable,t["".concat(a,"xSpace")]=e.$refs.refBodyXSpace,t["".concat(a,"ySpace")]=e.$refs.refBodyYSpace},destroyed:function(){var e=this.$xeGanttView.internalData.elemStore,t="main-body-";e["".concat(t,"wrapper")]=null,e["".concat(t,"scroll")]=null,e["".concat(t,"table")]=null,e["".concat(t,"xSpace")]=null,e["".concat(t,"ySpace")]=null},render:function(e){return this.renderVN(e)}});
|
|
@@ -4,91 +4,131 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _vue = require("vue");
|
|
8
7
|
var _comp = require("../../ui/src/comp");
|
|
8
|
+
var _core = require("@vxe-ui/core");
|
|
9
9
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
10
10
|
var _util = require("./util");
|
|
11
|
+
var _utils = require("../../ui/src/utils");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
var renderEmptyElement = _core.VxeUI.renderEmptyElement;
|
|
12
14
|
var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
13
15
|
name: 'VxeGanttViewChart',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
inject: {
|
|
17
|
+
$xeGantt: {
|
|
18
|
+
default: null
|
|
19
|
+
},
|
|
20
|
+
$xeGanttView: {
|
|
21
|
+
default: null
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
props: {},
|
|
25
|
+
data: function data() {
|
|
26
|
+
return {};
|
|
27
|
+
},
|
|
28
|
+
computed: Object.assign({}, {}),
|
|
29
|
+
methods: {
|
|
30
|
+
//
|
|
31
|
+
// Render
|
|
32
|
+
//
|
|
33
|
+
renderVN: function renderVN(h) {
|
|
34
|
+
var _vm = this;
|
|
35
|
+
var $xeGantt = _vm.$xeGantt;
|
|
36
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
37
|
+
var $xeTable = $xeGanttView.internalData.xeTable;
|
|
38
|
+
var tableInternalData = $xeTable ? $xeTable : {};
|
|
39
|
+
var fullAllDataRowIdData = tableInternalData.fullAllDataRowIdData || {};
|
|
40
|
+
var cellOpts = {};
|
|
41
|
+
var rowOpts = {};
|
|
42
|
+
var defaultRowHeight = 0;
|
|
34
43
|
if ($xeTable) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
computeDefaultRowHeight
|
|
39
|
-
} = $xeTable.getComputeMaps();
|
|
40
|
-
cellOpts = computeCellOpts.value;
|
|
41
|
-
rowOpts = computeRowOpts.value;
|
|
42
|
-
defaultRowHeight = computeDefaultRowHeight.value;
|
|
44
|
+
cellOpts = $xeTable.computeCellOpts;
|
|
45
|
+
rowOpts = $xeTable.computeRowOpts;
|
|
46
|
+
defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
43
47
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
var reactData = $xeGanttView.reactData;
|
|
49
|
+
var tableData = reactData.tableData;
|
|
50
|
+
var titleField = $xeGantt.computeTitleField;
|
|
51
|
+
var progressField = $xeGantt.computeProgressField;
|
|
52
|
+
var taskBarOpts = $xeGantt.computeTaskBarOpts;
|
|
53
|
+
var showProgress = taskBarOpts.showProgress,
|
|
54
|
+
showContent = taskBarOpts.showContent,
|
|
55
|
+
contentMethod = taskBarOpts.contentMethod,
|
|
56
|
+
barStyle = taskBarOpts.barStyle;
|
|
57
|
+
var _ref = barStyle || {},
|
|
58
|
+
round = _ref.round;
|
|
59
|
+
var trVNs = [];
|
|
60
|
+
tableData.forEach(function (row, rIndex) {
|
|
61
|
+
var rowid = $xeTable ? $xeTable.getRowid(row) : '';
|
|
62
|
+
var rowRest = fullAllDataRowIdData[rowid] || {};
|
|
63
|
+
var cellHeight = (0, _util.getCellRestHeight)(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
64
|
+
var title = (0, _utils.getStringValue)(_xeUtils.default.get(row, titleField));
|
|
65
|
+
var progressValue = showProgress ? Math.min(100, Math.max(0, _xeUtils.default.toNumber(_xeUtils.default.get(row, progressField)))) : 0;
|
|
66
|
+
if (contentMethod) {
|
|
67
|
+
title = (0, _utils.getStringValue)(contentMethod({
|
|
68
|
+
row: row,
|
|
69
|
+
title: title
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
trVNs.push(h('div', {
|
|
55
73
|
key: rIndex,
|
|
56
|
-
|
|
57
|
-
|
|
74
|
+
attrs: {
|
|
75
|
+
rowid: rowid
|
|
76
|
+
},
|
|
77
|
+
class: ['vxe-gantt-view--chart-row', {
|
|
78
|
+
'is--round': round
|
|
79
|
+
}],
|
|
58
80
|
style: {
|
|
59
|
-
height:
|
|
81
|
+
height: "".concat(cellHeight, "px")
|
|
60
82
|
}
|
|
61
|
-
}, [
|
|
83
|
+
}, [h('div', {
|
|
62
84
|
class: 'vxe-gantt-view--chart-bar',
|
|
63
|
-
|
|
64
|
-
|
|
85
|
+
attrs: {
|
|
86
|
+
rowid: rowid
|
|
87
|
+
},
|
|
88
|
+
on: {
|
|
89
|
+
click: function click(evnt) {
|
|
90
|
+
$xeGantt.handleTaskBarClickEvent(evnt, {
|
|
91
|
+
row: row
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
dblclick: function dblclick(evnt) {
|
|
95
|
+
$xeGantt.handleTaskBarDblclickEvent(evnt, {
|
|
96
|
+
row: row
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}, [showProgress ? h('div', {
|
|
65
101
|
class: 'vxe-gantt-view--chart-progress',
|
|
66
|
-
style:
|
|
67
|
-
width:
|
|
68
|
-
}
|
|
69
|
-
})
|
|
102
|
+
style: {
|
|
103
|
+
width: "".concat(progressValue || 0, "%")
|
|
104
|
+
}
|
|
105
|
+
}) : renderEmptyElement($xeGantt), showContent ? h('div', {
|
|
70
106
|
class: 'vxe-gantt-view--chart-content'
|
|
71
|
-
})])]));
|
|
107
|
+
}, title) : renderEmptyElement($xeGantt)])]));
|
|
72
108
|
});
|
|
73
|
-
return
|
|
74
|
-
ref: refElem,
|
|
109
|
+
return h('div', {
|
|
110
|
+
ref: 'refElem',
|
|
75
111
|
class: 'vxe-gantt-view--chart-wrapper'
|
|
76
112
|
}, trVNs);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
mounted: function mounted() {
|
|
116
|
+
var _vm = this;
|
|
117
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
118
|
+
var internalData = $xeGanttView.internalData;
|
|
119
|
+
var elemStore = internalData.elemStore;
|
|
120
|
+
var prefix = 'main-chart-';
|
|
121
|
+
elemStore["".concat(prefix, "wrapper")] = _vm.$refs.refElem;
|
|
122
|
+
},
|
|
123
|
+
destroyed: function destroyed() {
|
|
124
|
+
var _vm = this;
|
|
125
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
126
|
+
var internalData = $xeGanttView.internalData;
|
|
127
|
+
var elemStore = internalData.elemStore;
|
|
128
|
+
var prefix = 'main-chart-';
|
|
129
|
+
elemStore["".concat(prefix, "wrapper")] = null;
|
|
130
|
+
},
|
|
131
|
+
render: function render(h) {
|
|
132
|
+
return this.renderVN(h);
|
|
93
133
|
}
|
|
94
134
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_core=require("@vxe-ui/core"),_xeUtils=_interopRequireDefault(require("xe-utils")),_util=require("./util"),_utils=require("../../ui/src/utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var renderEmptyElement=_core.VxeUI.renderEmptyElement,_default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeGanttViewChart",inject:{$xeGantt:{default:null},$xeGanttView:{default:null}},props:{},data:function(){return{}},computed:Object.assign({},{}),methods:{renderVN:function(l){var o=this.$xeGantt,e=this.$xeGanttView,u=e.internalData.xeTable,s=(u||{}).fullAllDataRowIdData||{},c={},d={},p=0;u&&(c=u.computeCellOpts,d=u.computeRowOpts,p=u.computeDefaultRowHeight);var e=e.reactData.tableData,m=o.computeTitleField,f=o.computeProgressField,t=o.computeTaskBarOpts,h=t.showProgress,w=t.showContent,x=t.contentMethod,v=(t.barStyle||{}).round,g=[];return e.forEach(function(t,e){var r=u?u.getRowid(t):"",a=s[r]||{},a=(0,_util.getCellRestHeight)(a,c,d,p),n=(0,_utils.getStringValue)(_xeUtils.default.get(t,m)),i=h?Math.min(100,Math.max(0,_xeUtils.default.toNumber(_xeUtils.default.get(t,f)))):0;x&&(n=(0,_utils.getStringValue)(x({row:t,title:n}))),g.push(l("div",{key:e,attrs:{rowid:r},class:["vxe-gantt-view--chart-row",{"is--round":v}],style:{height:"".concat(a,"px")}},[l("div",{class:"vxe-gantt-view--chart-bar",attrs:{rowid:r},on:{click:function(e){o.handleTaskBarClickEvent(e,{row:t})},dblclick:function(e){o.handleTaskBarDblclickEvent(e,{row:t})}}},[h?l("div",{class:"vxe-gantt-view--chart-progress",style:{width:"".concat(i||0,"%")}}):renderEmptyElement(o),w?l("div",{class:"vxe-gantt-view--chart-content"},n):renderEmptyElement(o)])]))}),l("div",{ref:"refElem",class:"vxe-gantt-view--chart-wrapper"},g)}},mounted:function(){this.$xeGanttView.internalData.elemStore["".concat("main-chart-","wrapper")]=this.$refs.refElem},destroyed:function(){this.$xeGanttView.internalData.elemStore["".concat("main-chart-","wrapper")]=null},render:function(e){return this.renderVN(e)}});
|
|
@@ -4,75 +4,94 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _vue = require("vue");
|
|
8
7
|
var _comp = require("../../ui/src/comp");
|
|
9
8
|
var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
10
9
|
name: 'VxeGanttView',
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
10
|
+
inject: {
|
|
11
|
+
$xeGantt: {
|
|
12
|
+
default: null
|
|
13
|
+
},
|
|
14
|
+
$xeGanttView: {
|
|
15
|
+
default: null
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
props: {},
|
|
19
|
+
data: function data() {
|
|
20
|
+
return {};
|
|
21
|
+
},
|
|
22
|
+
computed: Object.assign({}, {}),
|
|
23
|
+
methods: {
|
|
24
|
+
//
|
|
25
|
+
// Render
|
|
26
|
+
//
|
|
27
|
+
renderVN: function renderVN(h) {
|
|
28
|
+
var _vm = this;
|
|
29
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
30
|
+
var reactData = $xeGanttView.reactData;
|
|
31
|
+
var tableColumn = reactData.tableColumn,
|
|
32
|
+
headerGroups = reactData.headerGroups,
|
|
33
|
+
viewCellWidth = reactData.viewCellWidth;
|
|
34
|
+
return h('div', {
|
|
35
|
+
ref: 'refElem',
|
|
28
36
|
class: 'vxe-gantt-view--header-wrapper'
|
|
29
|
-
}, [
|
|
30
|
-
ref: refHeaderScroll,
|
|
37
|
+
}, [h('div', {
|
|
38
|
+
ref: 'refHeaderScroll',
|
|
31
39
|
class: 'vxe-gantt-view--header-inner-wrapper',
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
on: {
|
|
41
|
+
scroll: $xeGanttView.triggerHeaderScrollEvent
|
|
42
|
+
}
|
|
43
|
+
}, [h('div', {
|
|
44
|
+
ref: 'refHeaderXSpace',
|
|
35
45
|
class: 'vxe-body--x-space'
|
|
36
|
-
}),
|
|
37
|
-
ref: refHeaderTable,
|
|
46
|
+
}), h('table', {
|
|
47
|
+
ref: 'refHeaderTable',
|
|
38
48
|
class: 'vxe-gantt-view--header-table'
|
|
39
|
-
}, [
|
|
40
|
-
return
|
|
41
|
-
key: cIndex
|
|
49
|
+
}, [h('colgroup', {}, tableColumn.map(function (column, cIndex) {
|
|
50
|
+
return h('col', {
|
|
51
|
+
key: cIndex,
|
|
52
|
+
style: {
|
|
53
|
+
width: "".concat(viewCellWidth, "px")
|
|
54
|
+
}
|
|
42
55
|
});
|
|
43
|
-
})),
|
|
44
|
-
return
|
|
56
|
+
})), h('thead', {}, headerGroups.map(function (cols, rIndex) {
|
|
57
|
+
return h('tr', {
|
|
45
58
|
key: rIndex
|
|
46
|
-
}, cols.map((column, cIndex)
|
|
47
|
-
return
|
|
59
|
+
}, cols.map(function (column, cIndex) {
|
|
60
|
+
return h('th', {
|
|
48
61
|
key: cIndex,
|
|
49
62
|
class: 'vxe-gantt-view--header-column',
|
|
50
|
-
|
|
51
|
-
|
|
63
|
+
attrs: {
|
|
64
|
+
colspan: column.children ? column.children.length : null,
|
|
65
|
+
title: "".concat(column.field)
|
|
66
|
+
}
|
|
52
67
|
}, column.title);
|
|
53
68
|
}));
|
|
54
69
|
}))])])]);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
mounted: function mounted() {
|
|
73
|
+
var _vm = this;
|
|
74
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
75
|
+
var internalData = $xeGanttView.internalData;
|
|
76
|
+
var elemStore = internalData.elemStore;
|
|
77
|
+
var prefix = 'main-header-';
|
|
78
|
+
elemStore["".concat(prefix, "wrapper")] = _vm.$refs.refElem;
|
|
79
|
+
elemStore["".concat(prefix, "scroll")] = _vm.$refs.refHeaderScroll;
|
|
80
|
+
elemStore["".concat(prefix, "table")] = _vm.$refs.refHeaderTable;
|
|
81
|
+
elemStore["".concat(prefix, "xSpace")] = _vm.$refs.refHeaderXSpace;
|
|
82
|
+
},
|
|
83
|
+
destroyed: function destroyed() {
|
|
84
|
+
var _vm = this;
|
|
85
|
+
var $xeGanttView = _vm.$xeGanttView;
|
|
86
|
+
var internalData = $xeGanttView.internalData;
|
|
87
|
+
var elemStore = internalData.elemStore;
|
|
88
|
+
var prefix = 'main-header-';
|
|
89
|
+
elemStore["".concat(prefix, "wrapper")] = null;
|
|
90
|
+
elemStore["".concat(prefix, "scroll")] = null;
|
|
91
|
+
elemStore["".concat(prefix, "table")] = null;
|
|
92
|
+
elemStore["".concat(prefix, "xSpace")] = null;
|
|
93
|
+
},
|
|
94
|
+
render: function render(h) {
|
|
95
|
+
return this.renderVN(h);
|
|
77
96
|
}
|
|
78
97
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeGanttView",inject:{$xeGantt:{default:null},$xeGanttView:{default:null}},props:{},data:function(){return{}},computed:Object.assign({},{}),methods:{renderVN:function(r){var e=this.$xeGanttView,t=e.reactData,a=t.tableColumn,n=t.headerGroups,l=t.viewCellWidth;return r("div",{ref:"refElem",class:"vxe-gantt-view--header-wrapper"},[r("div",{ref:"refHeaderScroll",class:"vxe-gantt-view--header-inner-wrapper",on:{scroll:e.triggerHeaderScrollEvent}},[r("div",{ref:"refHeaderXSpace",class:"vxe-body--x-space"}),r("table",{ref:"refHeaderTable",class:"vxe-gantt-view--header-table"},[r("colgroup",{},a.map(function(e,t){return r("col",{key:t,style:{width:"".concat(l,"px")}})})),r("thead",{},n.map(function(e,t){return r("tr",{key:t},e.map(function(e,t){return r("th",{key:t,class:"vxe-gantt-view--header-column",attrs:{colspan:e.children?e.children.length:null,title:"".concat(e.field)}},e.title)}))}))])])])}},mounted:function(){var e=this,t=e.$xeGanttView.internalData.elemStore,r="main-header-";t["".concat(r,"wrapper")]=e.$refs.refElem,t["".concat(r,"scroll")]=e.$refs.refHeaderScroll,t["".concat(r,"table")]=e.$refs.refHeaderTable,t["".concat(r,"xSpace")]=e.$refs.refHeaderXSpace},destroyed:function(){var e=this.$xeGanttView.internalData.elemStore,t="main-header-";e["".concat(t,"wrapper")]=null,e["".concat(t,"scroll")]=null,e["".concat(t,"table")]=null,e["".concat(t,"xSpace")]=null},render:function(e){return this.renderVN(e)}});
|