Commit 352c1cb5 authored by 旭艳's avatar 旭艳

站位计划维护-样式修改

parent 7c2feb6d
......@@ -182,13 +182,13 @@ export default {
ganttStm.attachEvent('onLinkDblClick', function(id, e) {
return false
})
ganttStm.attachEvent('onAfterTaskUpdate', function(id, item) {
// var data = {
// id: item.tooltipId,
// scheduledStart: that.formatDate(item.start_date)
// }
// that.updatePlanTime(data)
})
// ganttStm.attachEvent('onAfterTaskUpdate', function(id, item) {
// var data = {
// id: item.tooltipId,
// scheduledStart: that.formatDate(item.start_date)
// }
// that.updatePlanTime(data)
// })
// 当分支被打开时触发
ganttStm.attachEvent('onTaskOpened', function(id) {
that.openTree.push(Number(id))
......@@ -355,6 +355,7 @@ export default {
ganttStm.config.drag_links = false
ganttStm.config.details_on_dblclick = false
ganttStm.config.show_task_cells = true
ganttStm.config.readonly = true
// ganttStm.config.auto_scheduling = true
// ganttStm.config.auto_scheduling_initial = false
ganttStm.config.open_split_tasks = true
......
......@@ -184,7 +184,7 @@ export default {
id: item.tooltipId,
scheduledStart: that.formatDate(item.start_date)
}
that.updatePlanTime(data)
that.updatePlanTime(data, item)
})
// 当分支被打开时触发
ganttStm.attachEvent('onTaskOpened', function(id) {
......@@ -568,37 +568,34 @@ export default {
/**
* 修改工期及开工时间
*/
updatePlanTime(item) {
// const that = this
// that.loading = true
// const param = {
// // maxTime: that.getLongTime(),
// // minTime: _min_date,
// minTime: that.start_date,
// parentId: that.$parent.platformId,
// wrProduction: [item]
// }
// // return tooltipData
// this.HttpRequest(`/WrProduction/updatePlanTime`, param, 'post', true)
// .then((res) => {
// if (res.message.includes('成功')) {
// this.$message({
// showClose: true,
// message: '修改成功!',
// type: 'success'
// })
// } else {
// this.$message({
// showClose: true,
// message: res.message,
// type: 'error'
// })
// }
// })
// .catch((err) => console.error(err))
// .finally(() => {
// that.getGanttData()
// })
updatePlanTime(data, item) {
const that = this
that.loading = true
const params = {
scheduledStart: data.scheduledStart,
wrProductionId: item.$rendered_parent,
joId: data.id
}
post(`/JoExecutePlan/updatePlanTime`, params)
.then((res) => {
if (res.message.includes('成功')) {
this.$message({
showClose: true,
message: '修改成功!',
type: 'success'
})
} else {
this.$message({
showClose: true,
message: res.message,
type: 'error'
})
}
})
.catch((err) => console.error(err))
.finally(() => {
that.getData()
})
}
}
}
......
<template>
<div class="show-page-com stationPlan-maintenance-page">
<searchBar :state-options="stateOptions" @showStation="showStation" @search="search" />
<station v-show="headerShow" :state-options="stateOptions" :sorties-id="sortiesId" :form="form" @change="change" />
<gantt :form="form" :state-options="stateOptions" :class="[headerShow?'gantt-bar':'gantt-bar no-header']" />
<dee-tab :tabs="tabItems" :show-swipe="false" :is-detail="false">
<div slot="0" style="height:100%;box-sizing:border-box">
列表
</div>
<div slot="1" style="height:100%;box-sizing:border-box">
<searchBar :state-options="stateOptions" @showStation="showStation" @search="search" />
<station v-show="headerShow" :state-options="stateOptions" :sorties-id="sortiesId" :form="form" @change="change" />
<gantt :form="form" :state-options="stateOptions" :class="[headerShow?'gantt-bar':'gantt-bar no-header']" />
</div>
</dee-tab>
</div>
</template>
......@@ -22,7 +29,20 @@ export default {
headerShow: true
}
},
computed: {
tabItems() {
return [
{
name: '列表',
id: '0'
},
{
name: '甘特图',
id: '1'
}
]
}
},
mounted() {
this.getStateOptions()
},
......@@ -57,6 +77,12 @@ export default {
height: calc(100% - 20px);
width: calc(100% - 24px);
background-color: #fff;
.dee-panel{
height: 100%;
}
.el-tab-pane{
height: calc(100% - 10px);
}
.color{
&.Not{
background-color: #cccccc;
......
......@@ -80,7 +80,7 @@ export default {
},
data() {
return {
headerShow: true,
headerShow: false,
modelData: [],
sortiesData: [],
SoriteTypeOptions: [],
......@@ -123,6 +123,7 @@ export default {
}
},
created() { // SoriteType
this.$emit('showStation', this.headerShow)
this.$utils.getDicListByCode('SoriteType').then(res => {
this.SoriteTypeOptions = res
this.getModelData()
......@@ -183,7 +184,13 @@ export default {
}, 500)
},
goto() {
this.$router.push({
path: '/dee-mes/assembly-plan-maintenance',
query: {
title: '装配计划维护',
menuRootAppId: 1626782294437
}
})
}
}
}
......
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