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

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" :projectAccessLevel="projectAccessLevel"
:projectGroup="projectGroup" :projectGroup="projectGroup"
@groupChanged="groupChanged" @groupChanged="groupChanged"
@created="viewCreated"
></router-view> ></router-view>
</el-main> </el-main>
</el-container> </el-container>
@ -121,6 +122,9 @@ export default {
this.getProjectGroup() this.getProjectGroup()
}, },
methods: { methods: {
viewCreated() {
this.getProjectInfo();
},
back() { back() {
router.push({path: '/'}) router.push({path: '/'})
}, },
@ -157,6 +161,18 @@ export default {
}, },
groupChanged() { groupChanged() {
console.log('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() this.getProjectGroup()
} }
} }

View File

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