Commit a724bf89 authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents 72b61d3e 11d14424
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
.forEach(l => { .forEach(l => {
if (l.isCritical) { if (l.isCritical) {
l.isCritical = false l.isCritical = false
this.gantt.refreshLink(l.id) this.gantt.updateLink(l.id)
this.modifyLink(l, 'MODIFY') this.modifyLink(l, 'MODIFY')
} }
}) })
...@@ -46,10 +46,11 @@ export default { ...@@ -46,10 +46,11 @@ export default {
.forEach(l => { .forEach(l => {
if (!l.isCritical) { if (!l.isCritical) {
l.isCritical = true l.isCritical = true
this.gantt.refreshLink(l.id) this.gantt.updateLink(l.id)
this.modifyLink(l, 'MODIFY') this.modifyLink(l, 'MODIFY')
} }
}) })
this.gantt.parse(this.params)
}, },
modifyTask(task, operator) { modifyTask(task, operator) {
const _task = { const _task = {
...@@ -142,7 +143,8 @@ export default { ...@@ -142,7 +143,8 @@ export default {
return allGroups.filter(g => g.links.find(id => str.includes(id + ''))) return allGroups.filter(g => g.links.find(id => str.includes(id + '')))
}, },
getPeerTasks(link) { getPeerTasks(link) {
const allTasks = this.gantt.getTableData().data.data this.params = this.gantt.getTableData().data
const allTasks = this.params.data
const target = Number(link.target) const target = Number(link.target)
const targetTask = allTasks.find(t => t.id === target) const targetTask = allTasks.find(t => t.id === target)
if (!targetTask) { if (!targetTask) {
...@@ -151,7 +153,7 @@ export default { ...@@ -151,7 +153,7 @@ export default {
return allTasks.filter(t => t.parenId === targetTask.parenId) return allTasks.filter(t => t.parenId === targetTask.parenId)
}, },
getPeerLinks(tasks) { getPeerLinks(tasks) {
const allLinks = this.gantt.getTableData().data.links const allLinks = this.params.links
return allLinks.filter(l => tasks.find(t => t.id === Number(l.target))) return allLinks.filter(l => tasks.find(t => t.id === Number(l.target)))
} }
......
...@@ -312,7 +312,6 @@ export default { ...@@ -312,7 +312,6 @@ export default {
} }
ganttAss.config.drag_resize = false ganttAss.config.drag_resize = false
ganttAss.config.start_on_monday = true ganttAss.config.start_on_monday = true
ganttAss.config.highlight_critical_path = true
ganttAss.config.columns = [ ganttAss.config.columns = [
{ {
name: 'id', name: 'id',
......
<template>
<div>
content
</div>
</template>
<script>
export default {
name: 'TfMomWebContent',
data() {
return {
}
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="show-page-com assembly-plan-maintenance-page">
<dee-fold-pane
:min-percent="minPercent"
:default-percent="defaultPercent"
split="vertical"
class="detail-pane"
>
<template slot="paneL">
<search />
</template>
<template slot="paneR">
<content2 />
</template>
</dee-fold-pane>
</div>
</template>
<script>
import search from './search.vue'
import content2 from './content.vue'
export default {
name: 'TfMomWebIndex',
components: { search, content2 },
data() {
return {
minPercent: 15,
defaultPercent: 15
}
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" >
.assembly-plan-maintenance-page{
margin: 4px;
margin-top: 0px;
padding: 8px;
height: calc(100% - 20px);
width: calc(100% - 24px);
background-color: #fff;
}
</style>
<template>
<div>
search
</div>
</template>
<script>
export default {
name: 'TfMomWebSearch',
data() {
return {
}
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
...@@ -27,6 +27,7 @@ export default { ...@@ -27,6 +27,7 @@ export default {
tooltipLoading: true, tooltipLoading: true,
tooltipData: {}, tooltipData: {},
start_date: null, start_date: null,
planStateOptions: [],
openTree: [], openTree: [],
seePdfShow: false, seePdfShow: false,
onlyUuid: 'stationPlan-gantt', onlyUuid: 'stationPlan-gantt',
...@@ -48,6 +49,9 @@ export default { ...@@ -48,6 +49,9 @@ export default {
}, },
mounted() { mounted() {
this.initGantt() this.initGantt()
this.$utils.getDicListByCode('WRProductionState').then(res => {
this.planStateOptions = res
})
}, },
methods: { methods: {
...@@ -246,7 +250,7 @@ export default { ...@@ -246,7 +250,7 @@ export default {
resize: true, resize: true,
template: function(task) { template: function(task) {
if (task.$level === 0) { if (task.$level === 0) {
const state = that.stateOptions.find(r => r.value === task.status) const state = that.planStateOptions.find(r => r.value === task.status)
return ( return (
"<div class='ca color " + "<div class='ca color " +
task.status + task.status +
...@@ -255,9 +259,9 @@ export default { ...@@ -255,9 +259,9 @@ export default {
'</div>' '</div>'
) )
} else { } else {
const state = that.stateOptions.find(r => r.value === task.status) const state = that.planStateOptions.find(r => r.value === task.status)
return ( return (
"<div class='ao " + "<div class='ao color " +
task.status + task.status +
"'>" + "'>" +
(state && state.label || task.status) + (state && state.label || task.status) +
...@@ -367,8 +371,7 @@ export default { ...@@ -367,8 +371,7 @@ export default {
getData() { getData() {
const params = { const params = {
positionNumber: this.form.positionNumber, positionNumber: this.form.positionNumber,
sorties: this.form.sortiesName, sorties: this.form.sortiesName
serialNumber: this.form.AOName || ''
} }
if (this.form.state) { if (this.form.state) {
params.state = this.form.state params.state = this.form.state
...@@ -397,6 +400,11 @@ export default { ...@@ -397,6 +400,11 @@ export default {
} }
data.forEach(p => { data.forEach(p => {
this.addwrProduction(p, params) this.addwrProduction(p, params)
if (p.aoPlans) {
p.aoPlans.forEach(t => {
this.addAO(p, t, params)
})
}
}) })
this.$nextTick(() => { this.$nextTick(() => {
this.gantt.parse(params) this.gantt.parse(params)
...@@ -431,6 +439,34 @@ export default { ...@@ -431,6 +439,34 @@ export default {
60 60
} }
}, },
toAO(m, p) {
return {
id: p.id,
start_date: p.joExecutePlan[0].scheduledStart,
status: p.joExecutePlan[0].state,
text: p.serialNumber,
parent: m.id,
right_text: p.name,
// 齐套率
fitRates: Math.round(p.fitRates * 1000) / 10 + '%',
// 问题状态
problemStatus: p.problemStatus,
tooltipId: p.joExecutePlan[0].id,
progress: p.joExecutePlan[0].percentage,
constPeriod: Number(p.joExecutePlan[0].workHour) || 0,
open: this.openTree.includes(p.id),
duration:
(new Date(p.joExecutePlan[0].scheduledEnd) -
new Date(p.joExecutePlan[0].scheduledStart)) /
1000 /
60
}
},
addAO(m, p, params) {
if (p.joExecutePlan && p.joExecutePlan[0]) {
params.data.push(this.toAO(m, p))
}
},
addwrProduction(p, params) { addwrProduction(p, params) {
if (p.wrProduction && p.wrProduction[0]) { if (p.wrProduction && p.wrProduction[0]) {
params.data.push(this.toWrProduction(p)) params.data.push(this.toWrProduction(p))
......
...@@ -85,6 +85,9 @@ export default { ...@@ -85,6 +85,9 @@ export default {
&.TF_ZF{ &.TF_ZF{
background-color: #666; background-color: #666;
} }
&.New{
background-color: #97b552;
}
} }
.gantt-bar{ .gantt-bar{
height: calc(100% - 208px); height: calc(100% - 208px);
......
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