|
@@ -4,18 +4,12 @@
|
|
|
<el-form ref="form1" :model="addForm" :rules="taskRules" label-width="120px">
|
|
|
<el-form-item label="所属项目" v-if="showOrNot" prop="projectId">
|
|
|
<el-select v-model="addForm.projectId" :placeholder="$t('defaultText.pleaseChoose')" @change="agentCreatesEvents(1)" filterable="true" style="width:100%;">
|
|
|
-
|
|
|
- <!-- <el-option v-for="item in projectList" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
|
|
|
- <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
|
|
|
- <span style="float: right;font-size: 13px;">{{ item.projectName }}</span>
|
|
|
- </el-option> -->
|
|
|
<el-option-group v-for="group in integrationProjectList" :key="group.label" :label="group.label">
|
|
|
<el-option v-for="item in group.peojectList" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
|
|
|
<span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
|
|
|
<span style="float: right;">{{ item.projectName }}</span>
|
|
|
</el-option>
|
|
|
</el-option-group>
|
|
|
-
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属任务分组" v-if="showOrNot" prop="groupId">
|
|
@@ -34,6 +28,11 @@
|
|
|
<el-option v-for="item in stageList" :key="item.id" :label="item.stagesName" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="前置任务" prop="aheadTidList" >
|
|
|
+ <el-select v-model="addForm.aheadTidList" style="width:100%;" multiple filterable @change="$forceUpdate()">
|
|
|
+ <el-option v-for="item in relationdata" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item :label="$t('types')">
|
|
|
<el-select v-model="addForm.taskType" style="width:100%;" :disabled="((this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement) && !(groupResponsibleId == user.id)" @change="selchg()">
|
|
|
<el-option v-for="item in taskTypeList" :key="item.id" :label="item.name" :value="item.id">
|
|
@@ -873,7 +872,8 @@ export default {
|
|
|
this.gstimday = [1]
|
|
|
this.getSapServiceList()
|
|
|
|
|
|
- this.timess()
|
|
|
+ this.timess();
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
// 刷新数据
|
|
@@ -899,6 +899,7 @@ export default {
|
|
|
if(obj.create) {
|
|
|
this.mileageCup = false
|
|
|
this.addFormVisible = true;
|
|
|
+ this.curProjectId = obj.stage.projectId;
|
|
|
this.addForm = {projectId: obj.stage.projectId, groupId: obj.stage.groupId, stagesId: obj.stage.id, taskLevel:0, planHours: 8, taskType: 0};
|
|
|
this.addForm.executorListFront = [{executorId:null, planHours:this.user.timeType.allday}];
|
|
|
this.gstimhour = [this.user.timeType.allday]
|
|
@@ -913,6 +914,7 @@ export default {
|
|
|
this.isEditFile = true;
|
|
|
this.getDetail(obj.curProjectId)
|
|
|
}
|
|
|
+ this.curProjectId = obj.task.projectId;
|
|
|
this.getTaskDetail(obj.id);
|
|
|
this.getTaskProgressList(obj.id); // 获取任务进展列表
|
|
|
this.gain(obj.task); // 获取评论列表
|
|
@@ -920,6 +922,7 @@ export default {
|
|
|
this.getRelationTaskList(obj.num, obj.id)
|
|
|
this.getTaskFileList(obj.num,obj.id)
|
|
|
}
|
|
|
+ this.getrelation();
|
|
|
},
|
|
|
// 代办任务创建事件
|
|
|
agentCreatesEvents(num) {
|
|
@@ -927,6 +930,7 @@ export default {
|
|
|
this.addForm.groupId = ''
|
|
|
this.addForm.stagesId = ''
|
|
|
this.getTaskGrouping()
|
|
|
+ this.getrelation();
|
|
|
} else if(num == 2) {
|
|
|
this.addForm.stagesId = ''
|
|
|
this.getTaskList()
|
|
@@ -1069,6 +1073,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.addForm = res.data;
|
|
|
+ if (this.addForm.aheadTid) {
|
|
|
+ this.addForm.aheadTidList = JSON.parse(this.addForm.aheadTid);
|
|
|
+ } else {
|
|
|
+ this.addForm.aheadTidList = [];
|
|
|
+ }
|
|
|
+
|
|
|
this.addForm.createDate = null;
|
|
|
this.addForm.indate = null;
|
|
|
this.addLoading = false;
|
|
@@ -1417,6 +1427,7 @@ export default {
|
|
|
this.addForm.executorListFront.serviceId= JSON.stringify(this.addForm.executorListFront.serviceId);
|
|
|
}
|
|
|
this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
|
|
|
+ this.addForm.aheadTid = JSON.stringify(this.addForm.aheadTidList);
|
|
|
this.addLoading = true;
|
|
|
this.http.post('/task/save',this.addForm,
|
|
|
res => {
|
|
@@ -1631,16 +1642,20 @@ export default {
|
|
|
this.isRelationTab = true
|
|
|
this.getrelation()
|
|
|
},
|
|
|
- getrelation(){ //获取选择关联列表
|
|
|
+ getrelation(){
|
|
|
+
|
|
|
+ //获取选择关联列表
|
|
|
this.http.post('/task/getTaskOnlyList',{
|
|
|
- projectId: this.curProjectId
|
|
|
+ projectId: this.curProjectId?this.curProjectId:this.addForm.projectId
|
|
|
},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.relationdata = []
|
|
|
res.data.forEach( (item) =>{
|
|
|
if(item.taskType != 1){
|
|
|
- this.relationdata.push(item)
|
|
|
+ if (item.id != this.addForm.id) {
|
|
|
+ this.relationdata.push(item)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
|