|
@@ -110,7 +110,7 @@ export default {
|
|
|
},
|
|
|
detailDayList: [], // 详细的日期
|
|
|
schedule: '',
|
|
|
- selectTask: '', // 选择的任务id
|
|
|
+ selectTask: null, // 选择的任务id
|
|
|
tasksOptions: [], // 任务下拉选项
|
|
|
tasksDetailList: [], // 已有任务项目
|
|
|
loading: false
|
|
@@ -138,8 +138,20 @@ export default {
|
|
|
created() {
|
|
|
this.getType()
|
|
|
this.remoteMethod()
|
|
|
+ this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async init() {
|
|
|
+ const res = await allTaskList({
|
|
|
+ bizId: Number(localStorage.getItem('bizId')),
|
|
|
+ name: this.$route.query.id
|
|
|
+ })
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.tasksOptions = res.data
|
|
|
+ this.tasksDetailList = [...res.data]
|
|
|
+ this.form.taskList.push(res.data.id)
|
|
|
+ }
|
|
|
+ },
|
|
|
async getScheduleData(id) { // 当有传入的详细信息的时候
|
|
|
const res = await scheduleGet(id)
|
|
|
let obj
|
|
@@ -192,6 +204,7 @@ export default {
|
|
|
})
|
|
|
this.tasksDetailList.push(res)
|
|
|
this.form.taskList.push(res.id)
|
|
|
+ this.selectTask = null
|
|
|
},
|
|
|
cancelTask(id) { // 删除单个关联任务
|
|
|
if (this.disabled) {
|