|
@@ -269,14 +269,12 @@
|
|
|
<el-form-item label="任务内容" prop="name">
|
|
|
<el-input v-model="addForm.name" :maxlength="40" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id" placeholder="请输入任务内容" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
-
|
|
|
<el-form-item label="开始时间" prop="startDate">
|
|
|
<el-date-picker v-model="addForm.startDate" type="date" style="width:40%;" value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择日期" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id"></el-date-picker>
|
|
|
+ placeholder="请选择日期" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id" @change="DateChange()"></el-date-picker>
|
|
|
<span style="margin-left:30px;margin-right:10px;">截止时间</span>
|
|
|
<el-date-picker v-model="addForm.endDate" type="date" value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择日期" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id"></el-date-picker>
|
|
|
+ placeholder="请选择日期" :disabled="this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id" @change="DateChange()"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<div style="border: 1px solid #ddd;margin:5px 0;padding:5px 0;">
|
|
|
<el-form-item :label="'执行人'+(index+1)" v-for="(executorItem, index) in addForm.executorListFront" :key="index">
|
|
@@ -2053,7 +2051,6 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
this.$refs.form1.validate(valid => {
|
|
|
if (valid) {
|
|
|
delete this.addForm.subTaskList;
|
|
@@ -2096,6 +2093,23 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ DateChange(){
|
|
|
+ if(this.addForm.startDate != undefined && this.addForm.endDate != undefined){
|
|
|
+ let stdate = Date.parse(this.addForm.startDate)
|
|
|
+ let eddate = Date.parse(this.addForm.endDate)
|
|
|
+ if(stdate <= eddate){
|
|
|
+ let days = (eddate - stdate) / (1*24*60*60*1000) + 1
|
|
|
+ for (let i=0;i<this.gstimday.length;i++) {
|
|
|
+ this.gstimday[i] = days
|
|
|
+ this.gstimhour[i] = days * this.user.timeType.allday
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ console.log("gstimday",this.gstimday);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
// 删除
|
|
|
deletePro(i, item) {
|