解决更新工作项后项目概览不刷新的问题

main
wuyize 2022-07-14 09:20:07 +08:00
parent ce78768aaf
commit 324b32ea1c
2 changed files with 18 additions and 1 deletions

View File

@ -64,6 +64,7 @@
:projectAccessLevel="projectAccessLevel"
:projectGroup="projectGroup"
@groupChanged="groupChanged"
@created="viewCreated"
></router-view>
</el-main>
</el-container>
@ -121,6 +122,9 @@ export default {
this.getProjectGroup()
},
methods: {
viewCreated() {
this.getProjectInfo();
},
back() {
router.push({path: '/'})
},
@ -157,6 +161,18 @@ export default {
},
groupChanged() {
console.log('groupChanged')
const that = this
request({
url: 'project/' + this.$route.params.projectId + '/group/' + this.$store.state.staff.staffId,
method: 'get',
}).then(response => {
if (response.data.code === 200) {
that.projectStaffPosition = response.data.data.projectStaffPosition.replaceAll(',','')
that.projectAccessLevel = response.data.data.projectAccessLevel
}
}).catch(function (error) {
console.log(error)
})
this.getProjectGroup()
}
}

View File

@ -410,9 +410,10 @@ export default {
this.getselfTaskStats();
},
},
emits: ['created'],
created() {
this.$emit("created");
//this.getProjectInfo();
},
mounted() {
const that = this