|
@@ -25,11 +25,11 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
- selectedProjectCode: {
|
|
|
|
|
|
+ firstSelectedTaskCode: {
|
|
type: String,
|
|
type: String,
|
|
default: ''
|
|
default: ''
|
|
},
|
|
},
|
|
- firstSelectedTaskCode: {
|
|
|
|
|
|
+ selectedProjectCode: {
|
|
type: String,
|
|
type: String,
|
|
default: ''
|
|
default: ''
|
|
},
|
|
},
|
|
@@ -66,16 +66,13 @@ export default {
|
|
this.searchTasks = this.tasks
|
|
this.searchTasks = this.tasks
|
|
},
|
|
},
|
|
getSimpleTaskDatas (projectCode) {
|
|
getSimpleTaskDatas (projectCode) {
|
|
- console.log(projectCode)
|
|
|
|
Http.get(Api.TASK.GET_SIMPLE_DATAS_BY_PROJECT.replace('{projectCode}', projectCode)).then((res) => {
|
|
Http.get(Api.TASK.GET_SIMPLE_DATAS_BY_PROJECT.replace('{projectCode}', projectCode)).then((res) => {
|
|
this.tasks = res.data
|
|
this.tasks = res.data
|
|
this.searchTasks = res.data
|
|
this.searchTasks = res.data
|
|
- if (!this.firstSelectedTaskCode) {
|
|
|
|
|
|
+ this.selectedTaskData = this.searchTasks.find(task => task.code === this.selectedTaskCode)
|
|
|
|
+ if (!this.selectedTaskData) {
|
|
this.selectedTaskData = this.tasks[0]
|
|
this.selectedTaskData = this.tasks[0]
|
|
this.selectedTaskCode = this.selectedTaskData.code
|
|
this.selectedTaskCode = this.selectedTaskData.code
|
|
- } else {
|
|
|
|
- this.firstSelectedTaskCode = ''
|
|
|
|
- this.selectedTaskData = this.searchTasks.find(task => task.code === this.selectedTaskCode)
|
|
|
|
}
|
|
}
|
|
}).catch((error) => {
|
|
}).catch((error) => {
|
|
notify('error', '获取任务列表数据失败:系统异常')
|
|
notify('error', '获取任务列表数据失败:系统异常')
|