diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 904a21025..3ce895f7f 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -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,35 +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.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 diff --git a/jero-web/src/views/toDoCenter/projectParameterTasks/index.vue b/jero-web/src/views/toDoCenter/projectParameterTasks/index.vue index ab810c84a..0216f842b 100644 --- a/jero-web/src/views/toDoCenter/projectParameterTasks/index.vue +++ b/jero-web/src/views/toDoCenter/projectParameterTasks/index.vue @@ -47,16 +47,19 @@ {{text ? text:'--'}} - {{text ? text:'--'}} + {{text}} + {{'--'}} - {{text ? text:'--'}} + {{text}} + {{'--'}} - {{text ? text:'--'}} + {{text}} + {{'--'}}
@@ -165,6 +168,9 @@ //待填写数量 waitFillClick(item) { let _this = this + item.type = '1' + item.userType = 'dre' + console.log(item) let newUrl = _this.$router.resolve({ path: '/ParameterItemCollection', query: item @@ -175,6 +181,9 @@ //待分配填写人数量 waitSdtClick(item) { let _this = this + item.type = '1' + item.userType = 'sdt' + console.log(item) let newUrl = _this.$router.resolve({ path: '/ParameterItemCollection', query: item @@ -185,6 +194,9 @@ //参数待发起数量 waitCollectClick(item) { let _this = this + item.type = '1' + item.userType = 'homo' + console.log(item) let newUrl = _this.$router.resolve({ path: '/ParameterItemCollection', query: item