|
|
@ -39,8 +39,17 @@ |
|
|
|
<!-- 列表 --> |
|
|
|
<!-- 列表 --> |
|
|
|
<el-table v-loading="loading" stripe :data="list"> |
|
|
|
<el-table v-loading="loading" stripe :data="list"> |
|
|
|
<el-table-column label="讨论ID" align="center" prop="id" /> |
|
|
|
<el-table-column label="讨论ID" align="center" prop="id" /> |
|
|
|
<el-table-column label="项目名" align="center" prop="projectId" /> |
|
|
|
<el-table-column label="项目名" align="center" prop="projectId"> |
|
|
|
<el-table-column label="任务内容" align="center" prop="taskId" /> |
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<span v-if="scope.row.projectId">{{convertProject(scope.row.projectId)}}</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="任务ID" align="center" prop="taskId" /> |
|
|
|
|
|
|
|
<el-table-column label="任务内容" align="center" prop="taskId" width="120"> |
|
|
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<span v-if="scope.row.taskId">{{convertTask(scope.row.taskId)}}</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="采收数量" align="center" prop="recoveryNumber" /> |
|
|
|
<el-table-column label="采收数量" align="center" prop="recoveryNumber" /> |
|
|
|
<el-table-column label="工时" align="center" prop="workingHours" /> |
|
|
|
<el-table-column label="工时" align="center" prop="workingHours" /> |
|
|
|
<el-table-column label="参与人" align="center" prop="joinPerson" width="80" > |
|
|
|
<el-table-column label="参与人" align="center" prop="joinPerson" width="80" > |
|
|
@ -248,7 +257,6 @@ export default { |
|
|
|
getProjectPage({ |
|
|
|
getProjectPage({ |
|
|
|
pageNo: 1, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 400, |
|
|
|
pageSize: 400, |
|
|
|
state: 'STARTING' //只看进行中的项目 |
|
|
|
|
|
|
|
}).then(res=>{ |
|
|
|
}).then(res=>{ |
|
|
|
this.projectList = res.data.list; |
|
|
|
this.projectList = res.data.list; |
|
|
|
this.getTask(); |
|
|
|
this.getTask(); |
|
|
@ -260,8 +268,6 @@ export default { |
|
|
|
pageNo: 1, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 400, |
|
|
|
pageSize: 400, |
|
|
|
draft:false, |
|
|
|
draft:false, |
|
|
|
status:'STARTED' //只能看已开始的任务 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).then(res=>{ |
|
|
|
}).then(res=>{ |
|
|
|
this.taskList = res.data.list; |
|
|
|
this.taskList = res.data.list; |
|
|
|
this.getList(); |
|
|
|
this.getList(); |
|
|
@ -275,19 +281,6 @@ export default { |
|
|
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); |
|
|
|
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); |
|
|
|
// 执行查询 |
|
|
|
// 执行查询 |
|
|
|
getDiscussPage(params).then(response => { |
|
|
|
getDiscussPage(params).then(response => { |
|
|
|
response.data.list.forEach(discuss => { |
|
|
|
|
|
|
|
this.projectList.forEach(project => { |
|
|
|
|
|
|
|
if (project.id == discuss.projectId) { |
|
|
|
|
|
|
|
discuss.projectId = project.name; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.taskList.forEach(task =>{ |
|
|
|
|
|
|
|
if (task.id == discuss.taskId) { |
|
|
|
|
|
|
|
discuss.taskId = task.taskMsg; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.list = response.data.list; |
|
|
|
this.list = response.data.list; |
|
|
|
this.total = response.data.total; |
|
|
|
this.total = response.data.total; |
|
|
|
this.loading = false; |
|
|
|
this.loading = false; |
|
|
@ -306,7 +299,6 @@ export default { |
|
|
|
taskId: undefined, |
|
|
|
taskId: undefined, |
|
|
|
content: undefined, |
|
|
|
content: undefined, |
|
|
|
images: undefined, |
|
|
|
images: undefined, |
|
|
|
// resources: [], |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
this.resetForm("form"); |
|
|
|
this.resetForm("form"); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -325,6 +317,7 @@ export default { |
|
|
|
handleAdd() { |
|
|
|
handleAdd() { |
|
|
|
this.reset(); |
|
|
|
this.reset(); |
|
|
|
// this.twoRescoure(); |
|
|
|
// this.twoRescoure(); |
|
|
|
|
|
|
|
this.projectList = this.projectList.filter(item => item.state == 'STARTING'); |
|
|
|
this.open = true; |
|
|
|
this.open = true; |
|
|
|
this.title = "添加农场任务讨论"; |
|
|
|
this.title = "添加农场任务讨论"; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -408,9 +401,10 @@ export default { |
|
|
|
this.exportLoading = false; |
|
|
|
this.exportLoading = false; |
|
|
|
}).catch(() => {}); |
|
|
|
}).catch(() => {}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//新增/修改 选择项目时 |
|
|
|
changeProject(row){ |
|
|
|
changeProject(row){ |
|
|
|
this.form.taskId = null; |
|
|
|
this.form.taskId = null; |
|
|
|
this.selectTaskList = this.taskList.filter(task => task.projectId == row); |
|
|
|
this.selectTaskList = this.taskList.filter(task => task.status == 'STARTED' && task.projectId == row); |
|
|
|
this.showCpUserList(row); |
|
|
|
this.showCpUserList(row); |
|
|
|
}, |
|
|
|
}, |
|
|
|
showCpUserList(projectId){ |
|
|
|
showCpUserList(projectId){ |
|
|
@ -442,6 +436,16 @@ export default { |
|
|
|
//采收数量不可编辑 |
|
|
|
//采收数量不可编辑 |
|
|
|
reco.setAttribute("disabled", true); |
|
|
|
reco.setAttribute("disabled", true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//展示项目名 |
|
|
|
|
|
|
|
convertProject(projectId){ |
|
|
|
|
|
|
|
let project = this.projectList.filter(item => item.id == projectId)[0]; |
|
|
|
|
|
|
|
return project.name; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//展示任务类型 任务内容 |
|
|
|
|
|
|
|
convertTask(taskId){ |
|
|
|
|
|
|
|
let task = this.taskList.filter(item => item.id == taskId)[0]; |
|
|
|
|
|
|
|
return task.taskName +"/\n"+ task.taskMsg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|