甘特图自适应,排产时长不能为0

This commit is contained in:
DESKTOP-J7ED0MB\yinjinlu 2022-11-03 23:10:21 +08:00
parent 37f769d67a
commit 622c0277ae
3 changed files with 9 additions and 5 deletions

View File

@ -116,13 +116,15 @@ export default {
this.form.endTime = endDate.getFullYear()+'-'+(endDate.getMonth()+1)+'-'+endDate.getDate()+' '+endDate.getHours()+':'+endDate.getMinutes()+':'+endDate.getSeconds(); this.form.endTime = endDate.getFullYear()+'-'+(endDate.getMonth()+1)+'-'+endDate.getDate()+' '+endDate.getHours()+':'+endDate.getMinutes()+':'+endDate.getSeconds();
updateProtask(this.form).then(response =>{ updateProtask(this.form).then(response =>{
console.log("update success:"+id); console.log("update success:"+id);
this.$modal.msgSuccess("保存成功");
},err =>{ },err =>{
debugger; debugger;
console.log("update failed:"+err.msg); console.log("update failed:"+err.msg);
this.$modal.msgSuccess("保存失败");
}); });
}); });
this.changedTaskIds =[]; //this.changedTaskIds =[];
this.$modal.msgSuccess("保存成功");
} }
}, },
handleRefresh(){ handleRefresh(){

View File

@ -162,17 +162,19 @@ export default {
// 3.1 ,project // 3.1 ,project
gantt.config.auto_types = false; gantt.config.auto_types = false;
// 3.2 // 3.2
gantt.config.drag_progress = true; gantt.config.drag_progress = false;
// 3.3 Task // 3.3 Task
gantt.config.drag_move = true; gantt.config.drag_move = true;
// 3.4 // 3.4
gantt.config.drag_links = true; gantt.config.drag_links = false;
// 3.5 Task // 3.5 Task
gantt.config.drag_resize = true; gantt.config.drag_resize = true;
// 3.6 // 3.6
gantt.config.details_on_create = true; gantt.config.details_on_create = true;
// 3.7 // 3.7
gantt.config.details_on_dblclick = true; gantt.config.details_on_dblclick = true;
//
gantt.config.fit_tasks = true;
let t = this.$props.tasks; let t = this.$props.tasks;
let c = this.$props.ids; let c = this.$props.ids;

View File

@ -139,7 +139,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="生产时长" prop="duration"> <el-form-item label="生产时长" prop="duration">
<el-input-number :precision="0" :step="1" v-model="form.duration" @change="calculateEndTime" placeholder="请输入生产时长" /> <el-input-number :min="1" :precision="0" :step="1" v-model="form.duration" @change="calculateEndTime" placeholder="请输入生产时长" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">