|
@ -200,7 +200,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
...mapMutations('project', ['setProjectItemShow']), |
|
|
...mapMutations('project', ['setProjectItemShow', 'setProjects']), |
|
|
// 展开子项目 |
|
|
// 展开子项目 |
|
|
openSubProject(length, index) { |
|
|
openSubProject(length, index) { |
|
|
this.setProjectItemShow({ index, show: this.itemList[index].show ? false : true }); |
|
|
this.setProjectItemShow({ index, show: this.itemList[index].show ? false : true }); |
|
@ -472,7 +472,15 @@ export default { |
|
|
success: async ({ confirm }) => { |
|
|
success: async ({ confirm }) => { |
|
|
if (confirm) { |
|
|
if (confirm) { |
|
|
await this.$u.api.delProject(id); |
|
|
await this.$u.api.delProject(id); |
|
|
this.$emit('delPro', 1); |
|
|
let flag_index = 0; |
|
|
|
|
|
this.itemList.forEach((item, index) => { |
|
|
|
|
|
if (item.id == id) { |
|
|
|
|
|
flag_index = index; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.itemList.splice(flag_index, 1); |
|
|
|
|
|
this.setProjects(this.itemList); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|