|
@@ -97,7 +97,7 @@
|
|
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
|
|
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <el-link v-if="executorItem.executorId && addForm.startDate && addForm.endDate" style="margin-left:5px;" @click.stop="viewTaskTimeList(executorItem.executorId)">查看</el-link>
|
|
|
|
|
|
+ <el-link v-if="executorItem.executorId && addForm.startDate && addForm.endDate" style="margin-left:5px;" @click.stop="viewTaskTimeList(executorItem.executorId, executorItem.indexList)" type="primary" :underline="false">查看/修改</el-link>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 计划工时 -->
|
|
<!-- 计划工时 -->
|
|
@@ -605,6 +605,41 @@
|
|
</div>
|
|
</div>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!-- 修改工时弹窗 -->
|
|
|
|
+ <el-dialog title="修改计划" :visible.sync="modifyWorkingHoursRowVisable" width="840px" top="6.5vh" :before-close="handleClose" append-to-body>
|
|
|
|
+ <div>
|
|
|
|
+ <div class="modifyPlanTitle">
|
|
|
|
+ <div class="modifyPlanTitle-item">
|
|
|
|
+ <div>执行人:</div>
|
|
|
|
+ <el-select v-model="modifyWorkingHoursRow.userId" placeholder="请选择" filterable size="small" style="width: 180px;" @change="getViewTaskTimeList()">
|
|
|
|
+ <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 20px" v-if="item.jobNumber">{{ item.jobNumber }}</span>
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="modifyPlanTitle-item">
|
|
|
|
+ <div>时间段:</div>
|
|
|
|
+ <el-date-picker v-model="modifyWorkingHoursRow.startDate" type="datetime" style="width: 200px;" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ default-time="09:00:00" :placeholder="$t('pleaseselectadate')" size="small" @change="getViewTaskTimeList()" :clearable="false"></el-date-picker>
|
|
|
|
+ <span style="margin:0 10px;">至</span>
|
|
|
|
+ <el-date-picker style="width: 200px;" v-model="modifyWorkingHoursRow.endDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ default-time="17:30:00" :placeholder="$t('pleaseselectadate')" size="small" @change="getViewTaskTimeList()" :clearable="false"></el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <el-table :data="modifyWorkingHoursList" style="width: 100%" border v-loading="modifyWorkingHoursListLoading" height="58vh">
|
|
|
|
+ <el-table-column prop="name" label="项目名称"></el-table-column>
|
|
|
|
+ <el-table-column prop="typeName" label="计划名称"></el-table-column>
|
|
|
|
+ <el-table-column prop="startDate" label="开始时间" width="180"></el-table-column>
|
|
|
|
+ <el-table-column prop="endDate" label="截止时间" width="180"></el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="modifyWorkingHoursRowVisable = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="confirmArrangement()">确认安排</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -876,6 +911,11 @@ export default {
|
|
},
|
|
},
|
|
pmUserList: [],
|
|
pmUserList: [],
|
|
millerSReviewer: [],
|
|
millerSReviewer: [],
|
|
|
|
+
|
|
|
|
+ modifyWorkingHoursRow: {},
|
|
|
|
+ modifyWorkingHoursList: [],
|
|
|
|
+ modifyWorkingHoursListLoading: false,
|
|
|
|
+ modifyWorkingHoursRowVisable: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -923,16 +963,48 @@ export default {
|
|
onTypeChange(e) {
|
|
onTypeChange(e) {
|
|
this.selectType = this.typeList.filter(a=>a.id == e)[0];
|
|
this.selectType = this.typeList.filter(a=>a.id == e)[0];
|
|
},
|
|
},
|
|
- viewTaskTimeList(executorId) {
|
|
|
|
- this.http.post('/task/viewUserTaskSchedule', { taskId: this.addForm.id, userId: executorId, startDate: this.addForm.startDate, endDate: this.addForm.endDate},
|
|
|
|
|
|
+ confirmArrangement() {
|
|
|
|
+ const { index, userId, startDate, endDate } = this.modifyWorkingHoursRow
|
|
|
|
+ const userList = (this.addForm.executorListFront || []).filter(item => item.executorId == userId)
|
|
|
|
+ const row = this.addForm.executorListFront[index].executorId
|
|
|
|
+
|
|
|
|
+ if(userList.length > 0 && row != userId) {
|
|
|
|
+ this.$message({ message: '执行人已存在', type: "error" });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const name = this.users.find(item => item.id == userId).name
|
|
|
|
+
|
|
|
|
+ this.addForm.executorListFront[index].executorId = userId
|
|
|
|
+ this.addForm.executorListFront[index].executorName = name
|
|
|
|
+
|
|
|
|
+ this.addForm.startDate = startDate
|
|
|
|
+ this.addForm.endDate = endDate
|
|
|
|
+
|
|
|
|
+ this.modifyWorkingHoursRowVisable = false
|
|
|
|
+
|
|
|
|
+ this.$message({ message: '修改成功', type: "success" });
|
|
|
|
+ },
|
|
|
|
+ viewTaskTimeList(executorId, index) {
|
|
|
|
+ this.modifyWorkingHoursRow = { taskId: this.addForm.id, userId: executorId, startDate: this.addForm.startDate, endDate: this.addForm.endDate, index}
|
|
|
|
+ this.modifyWorkingHoursRowVisable = true
|
|
|
|
+ this.getViewTaskTimeList()
|
|
|
|
+ },
|
|
|
|
+ getViewTaskTimeList() {
|
|
|
|
+ this.modifyWorkingHoursListLoading = true
|
|
|
|
+ let obj = { ...this.modifyWorkingHoursRow }
|
|
|
|
+ delete obj.index
|
|
|
|
+ this.http.post('/task/viewUserTaskSchedule', { ...obj },
|
|
res => {
|
|
res => {
|
|
|
|
+ this.modifyWorkingHoursListLoading = false
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
-
|
|
|
|
|
|
+ this.modifyWorkingHoursList = res.data;
|
|
} else {
|
|
} else {
|
|
this.$message({ message: res.msg, type: "error" });
|
|
this.$message({ message: res.msg, type: "error" });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
|
|
+ this.modifyWorkingHoursListLoading = false
|
|
this.$message({ message: error, type: "error" });
|
|
this.$message({ message: error, type: "error" });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -1127,7 +1199,7 @@ export default {
|
|
projectId: obj.stage.projectId,
|
|
projectId: obj.stage.projectId,
|
|
groupId: obj.stage.groupId,
|
|
groupId: obj.stage.groupId,
|
|
stagesId: obj.stage.id,
|
|
stagesId: obj.stage.id,
|
|
- startDate: obj.addForm.startDate,
|
|
|
|
|
|
+ startDate: obj.addForm.startDate + ' 08:00:00',
|
|
taskLevel:0,
|
|
taskLevel:0,
|
|
planHours: 8,
|
|
planHours: 8,
|
|
taskType: 0
|
|
taskType: 0
|
|
@@ -2704,4 +2776,15 @@ export default {
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.modifyPlanTitle {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+}
|
|
|
|
+.modifyPlanTitle-item {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|