Merge remote-tracking branch 'origin/feature_dev_20221008_TODO' into dev_2nd_period_test
# Conflicts: # jero-boot/db/蔚来标准sql/dev_third_record.sql # jero-web/src/common/lang/en-us.js # jero-web/src/common/lang/zh-cn.js # jero-web/src/store/modules/user.js # jero-web/src/views/processCenter/components/feedbackInformation.vue # jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
This commit is contained in:
@@ -670,6 +670,10 @@
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.$route.query)
|
||||
if(this.$route.query.type == '1'){
|
||||
this.handleOkRoleSwitching()
|
||||
}
|
||||
this.GetgetLoginUserType()
|
||||
console.log(this.currentPersonRole)
|
||||
setTimeout(() => {
|
||||
@@ -704,36 +708,62 @@
|
||||
})
|
||||
},
|
||||
handleOkRoleSwitching() {
|
||||
this.$refs.ruleFormRoleSwitching.validate(valid => {
|
||||
if (valid) {
|
||||
let query = {
|
||||
userType: this.formInlineRoleSwitching.roleSwitchingCode,
|
||||
paramsManifestId: this.$route.query.id,
|
||||
projectId: this.$route.query.projectId,
|
||||
userId: this.userInfo().id
|
||||
}
|
||||
this.confirmLoadingRoleSwitching = true
|
||||
postAction('/params/userTypeLog/edit', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$refs.CollectionTabel.getHeader(this.currentPersonRole)
|
||||
this.visibleRoleSwitching = false
|
||||
this.confirmLoadingRoleSwitching = false
|
||||
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
|
||||
this.RoleType.forEach((item,index) => {
|
||||
if(item.value == this.currentPersonRole){
|
||||
this.rolename = item.label
|
||||
}
|
||||
})
|
||||
this.selectedRowKeysValue = []
|
||||
} else {
|
||||
this.confirmLoadingRoleSwitching = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
if(this.$route.query.type == '1'){
|
||||
let query = {
|
||||
userType:this.$route.query.userType,
|
||||
paramsManifestId: this.$route.query.id,
|
||||
projectId: this.$route.query.projectId,
|
||||
userId: this.userInfo().id
|
||||
}
|
||||
})
|
||||
this.confirmLoadingRoleSwitching = true
|
||||
postAction('/params/userTypeLog/edit', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.currentPersonRole = this.$route.query.userType
|
||||
this.visibleRoleSwitching = false
|
||||
this.confirmLoadingRoleSwitching = false
|
||||
localStorage.setItem('currentPersonRole', JSON.stringify(this.$route.query.userType))
|
||||
this.RoleType.forEach((item,index) => {
|
||||
if(item.value == this.currentPersonRole){
|
||||
this.rolename = item.label
|
||||
}
|
||||
})
|
||||
this.selectedRowKeysValue = []
|
||||
} else {
|
||||
this.confirmLoadingRoleSwitching = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.$refs.ruleFormRoleSwitching.validate(valid => {
|
||||
if (valid) {
|
||||
let query = {
|
||||
userType: this.formInlineRoleSwitching.roleSwitchingCode,
|
||||
paramsManifestId: this.$route.query.id,
|
||||
projectId: this.$route.query.projectId,
|
||||
userId: this.userInfo().id
|
||||
}
|
||||
this.confirmLoadingRoleSwitching = true
|
||||
postAction('/params/userTypeLog/edit', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visibleRoleSwitching = false
|
||||
this.confirmLoadingRoleSwitching = false
|
||||
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
|
||||
this.RoleType.forEach((item,index) => {
|
||||
if(item.value == this.currentPersonRole){
|
||||
this.rolename = item.label
|
||||
}
|
||||
})
|
||||
this.selectedRowKeysValue = []
|
||||
} else {
|
||||
this.confirmLoadingRoleSwitching = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
roleSwitchingClick() {
|
||||
this.visibleRoleSwitching = true
|
||||
|
||||
Reference in New Issue
Block a user