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 {
.forEach(l => {
if (l.isCritical) {
l.isCritical = false
this.gantt.refreshLink(l.id)
this.gantt.updateLink(l.id)
this.modifyLink(l, 'MODIFY')
}
})
......@@ -46,10 +46,11 @@ export default {
.forEach(l => {
if (!l.isCritical) {
l.isCritical = true
this.gantt.refreshLink(l.id)
this.gantt.updateLink(l.id)
this.modifyLink(l, 'MODIFY')
}
})
this.gantt.parse(this.params)
},
modifyTask(task, operator) {
const _task = {
......@@ -142,7 +143,8 @@ export default {
return allGroups.filter(g => g.links.find(id => str.includes(id + '')))
},
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 targetTask = allTasks.find(t => t.id === target)
if (!targetTask) {
......@@ -151,7 +153,7 @@ export default {
return allTasks.filter(t => t.parenId === targetTask.parenId)
},
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)))
}
......
......@@ -312,7 +312,6 @@ export default {
}
ganttAss.config.drag_resize = false
ganttAss.config.start_on_monday = true
ganttAss.config.highlight_critical_path = true
ganttAss.config.columns = [
{
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 {
tooltipLoading: true,
tooltipData: {},
start_date: null,
planStateOptions: [],
openTree: [],
seePdfShow: false,
onlyUuid: 'stationPlan-gantt',
......@@ -48,6 +49,9 @@ export default {
},
mounted() {
this.initGantt()
this.$utils.getDicListByCode('WRProductionState').then(res => {
this.planStateOptions = res
})
},
methods: {
......@@ -246,7 +250,7 @@ export default {
resize: true,
template: function(task) {
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 (
"<div class='ca color " +
task.status +
......@@ -255,9 +259,9 @@ export default {
'</div>'
)
} else {
const state = that.stateOptions.find(r => r.value === task.status)
const state = that.planStateOptions.find(r => r.value === task.status)
return (
"<div class='ao " +
"<div class='ao color " +
task.status +
"'>" +
(state && state.label || task.status) +
......@@ -367,8 +371,7 @@ export default {
getData() {
const params = {
positionNumber: this.form.positionNumber,
sorties: this.form.sortiesName,
serialNumber: this.form.AOName || ''
sorties: this.form.sortiesName
}
if (this.form.state) {
params.state = this.form.state
......@@ -397,6 +400,11 @@ export default {
}
data.forEach(p => {
this.addwrProduction(p, params)
if (p.aoPlans) {
p.aoPlans.forEach(t => {
this.addAO(p, t, params)
})
}
})
this.$nextTick(() => {
this.gantt.parse(params)
......@@ -431,6 +439,34 @@ export default {
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) {
if (p.wrProduction && p.wrProduction[0]) {
params.data.push(this.toWrProduction(p))
......
......@@ -85,6 +85,9 @@ export default {
&.TF_ZF{
background-color: #666;
}
&.New{
background-color: #97b552;
}
}
.gantt-bar{
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