Commit 018b021c authored by arvin's avatar arvin

站点路线

parent fbba8819
......@@ -52,7 +52,7 @@ export default {
val.items.push({ fieldName: 'status', operator: 'EQ', value: 'disposed' })
val.items.push({ fieldName: 'usableAmount', operator: 'GT', value: 0 })
val.items.push({ fieldName: 'disposeDes', operator: 'LIKE', value: '三期' })
const extWorkCenterName = this.basicData.extWorkCenteName || (this.basicData.extWorkCeter && this.basicData.extWorkCeter.extname)
const extWorkCenterName = this.basicData.extWorkCenteName || (this.basicData.extWorkCenter && this.basicData.extWorkCenter.extname)
if (extWorkCenterName) {
val.items.push({ fieldName: 'workcenter', operator: 'EQ', value: extWorkCenterName })
}
......
export default {
data() {
return {
loading: false
}
},
watch: {
showFlag(val) {
if (!val) {
......@@ -33,7 +38,9 @@ export default {
},
methods: {
search() {
}
}
}
......@@ -101,7 +101,7 @@ export default {
this.currentId = this.node.id
const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': this.node.id }] },
'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }],
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }],
'openProps': [
{
'name': 'extProcessExecutorRoutes'
......@@ -185,6 +185,7 @@ export default {
ganttAg.config.scale_height = 70
ganttAg.config.show_task_cells = true
ganttAg.config.autofit = false
ganttAg.config.fit_tasks = false
ganttAg.config.drag_move = false
ganttAg.config.details_on_dblclick = false
ganttAg.config.auto_scheduling = true
......@@ -290,6 +291,9 @@ export default {
}
ganttAg.clearAll()
ganttAg.parse(data)
setTimeout(() => {
ganttAg.autoSchedule()
}, 1000)
}
})
// 在将新链接添加到甘特图之前触发
......@@ -300,15 +304,7 @@ export default {
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')
ganttAg.autoSchedule()
})
this.$nextTick(() => {
ganttAg.init(this.ganttElId)
......@@ -343,18 +339,21 @@ export default {
}
},
save() {
if (this.loading) {
return
}
this.loading = true
const tasks = this.gantt.getTableData().data.data
const links = this.gantt.getTableData().data.links
const params = this.ganttData.map(item => {
const routes = item.extProcessExecutorRoutes.map(r => {
const routes = item.extProcessExecutorRoutes ? item.extProcessExecutorRoutes.map(r => {
return {
id: r.id,
operator: 'REMOVE'
}
})
}) : []
const task = tasks.find(r => r.id === item.id)
if (item.extProcessExecutorRoutes) {
const link = links.find(r => r.target === item.id)
const link = links.find(r => Number(r.target) === item.id)
if (link) {
routes.push({
operator: 'ADD',
......@@ -366,7 +365,7 @@ export default {
isCritical: link.isCritical
})
}
}
return {
id: item.id,
operator: 'MODIFY',
......@@ -376,8 +375,9 @@ export default {
}
})
this.$api.recursion('ExtPosition', params, true).then(() => {
this.$utils.showMessageSuccess('保存成功!')
this.getData()
})
}).finally(() => { this.loading = false })
}
}
}
......@@ -389,5 +389,15 @@ export default {
.gatt{
height: 100%;
}
.gantt_critical_task{
background: #f39c4f;
border: 1px solid #f39c4f;
}
.gantt_task_line{
&.workday_over{
background: #f39c4f;
border: 1px solid #f39c4f;
}
}
}
</style>
......@@ -116,7 +116,7 @@ export default {
getPosition() {
const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': this.AircraftSortiesId }] },
'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }]
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
}
this.$api.searchApi('ExtPosition', params).then(res => {
......
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