Commit b28e2062 authored by arvin's avatar arvin

甘特图站位路线

parent 264c8cd0
...@@ -36,10 +36,10 @@ export default { ...@@ -36,10 +36,10 @@ export default {
computed: { computed: {
columns() { columns() {
return [ return [
{ name: 'index', label: '节点', width: 60, align: 'center', resize: true }, { name: 'index', label: '节点', width: 30, align: 'center', resize: true },
{ name: 'text', label: '站位号', width: 160, align: 'center', resize: true }, { name: 'text', label: '站位号', width: 40, align: 'center', resize: true },
{ name: 'duration', label: '工期(天)', width: 100, align: 'center', resize: true, editor: { type: 'number', map_to: 'duration', min: 0, max: 100 }}, { name: 'duration', label: '工期(天)', width: 30, align: 'center', resize: true, editor: { type: 'number', map_to: 'duration', min: 0, max: 100 }},
{ name: '', label: '前置', width: 150, align: 'center', resize: true, template: (task) => { { name: '', label: '前置', width: 40, align: 'center', resize: true, template: (task) => {
var links = task.$target var links = task.$target
var labels = [] var labels = []
for (var i = 0; i < links.length; i++) { for (var i = 0; i < links.length; i++) {
...@@ -197,11 +197,6 @@ export default { ...@@ -197,11 +197,6 @@ export default {
// 允许通过拖放来调整任务大小 // 允许通过拖放来调整任务大小
ganttAg.config.drag_resize = true ganttAg.config.drag_resize = true
ganttAg.config.highlight_critical_path = true ganttAg.config.highlight_critical_path = true
ganttAg.templates.link_class = function(link) {
if (link.isCritical) {
return 'critical_path'
}
}
ganttAg.config.editor_types.custom_datepicker_editor = { ganttAg.config.editor_types.custom_datepicker_editor = {
show: function(id, column, config, placeholder) { show: function(id, column, config, placeholder) {
var html = var html =
...@@ -303,6 +298,17 @@ export default { ...@@ -303,6 +298,17 @@ export default {
} }
return true return true
}) })
ganttAg.attachEvent('onAfterBatchUpdate', function(action) {
console.log('onAfterBatchUpdate')
// your code here
})
ganttAg.attachEvent('onAutoScheduleCircularLink', function(groups) {
console.log(groups, 'onAutoScheduleCircularLink')
// any custom logic here
})
ganttAg.attachEvent('onAfterTaskAutoSchedule', function(task, start, link, predecessor) {
console.log(task, start, link, predecessor, 'onAfterTaskAutoSchedule')
})
this.$nextTick(() => { this.$nextTick(() => {
ganttAg.init(this.ganttElId) ganttAg.init(this.ganttElId)
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment