From abe7dcafaa02c37600efbc79b0daf051bb9cd183 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Wed, 2 Nov 2022 18:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=94=B6=E9=9B=86=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E4=BB=BB=E5=8A=A1=E8=B7=B3=E8=BD=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParameterItemCollectionList.vue | 11 +- .../projectParameterTasks/index.vue | 109 +++++++++++++----- 2 files changed, 87 insertions(+), 33 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 3ce895f7f..643c7897c 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -670,12 +670,11 @@ // } }, mounted() { - console.log(this.$route.query) + this.GetgetLoginUserType() + console.log(this.currentPersonRole) if(this.$route.query.type == '1'){ this.handleOkRoleSwitching() } - this.GetgetLoginUserType() - console.log(this.currentPersonRole) setTimeout(() => { if (this.currentPersonRole == 'dre') { this.handlePreservation() @@ -710,7 +709,7 @@ handleOkRoleSwitching() { if(this.$route.query.type == '1'){ let query = { - userType:this.$route.query.userType, + userType:this.formInlineRoleSwitching.roleSwitchingCode ? this.formInlineRoleSwitching.roleSwitchingCode : this.$route.query.userType, paramsManifestId: this.$route.query.id, projectId: this.$route.query.projectId, userId: this.userInfo().id @@ -718,10 +717,10 @@ this.confirmLoadingRoleSwitching = true postAction('/params/userTypeLog/edit', query).then((res) => { if (res.success) { - this.currentPersonRole = this.$route.query.userType + this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode ? this.formInlineRoleSwitching.roleSwitchingCode : this.$route.query.userType this.visibleRoleSwitching = false this.confirmLoadingRoleSwitching = false - localStorage.setItem('currentPersonRole', JSON.stringify(this.$route.query.userType)) + localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode ? this.formInlineRoleSwitching.roleSwitchingCode : this.$route.query.userType)) this.RoleType.forEach((item,index) => { if(item.value == this.currentPersonRole){ this.rolename = item.label diff --git a/jero-web/src/views/toDoCenter/projectParameterTasks/index.vue b/jero-web/src/views/toDoCenter/projectParameterTasks/index.vue index 0216f842b..33e86e093 100644 --- a/jero-web/src/views/toDoCenter/projectParameterTasks/index.vue +++ b/jero-web/src/views/toDoCenter/projectParameterTasks/index.vue @@ -167,42 +167,97 @@ }, //待填写数量 waitFillClick(item) { - let _this = this - item.type = '1' - item.userType = 'dre' - console.log(item) - let newUrl = _this.$router.resolve({ - path: '/ParameterItemCollection', - query: item - // projectName:this.$route.query.projectName + let query = { + paramsManifestId: item.id, + projectId: item.projectId + } + this.loading = true + let userType = '' + let valueList = [] + getAction('params/collectManifest/getLoginUserType', query).then((res) => { + if(res.result){ + res.result.find((item,index) => { + if(item.value){ + valueList.push(item.value) + } + }) + let flag = valueList.find((item,index) => { + return item == 'dre' + }) + let _this = this + item.type = '1' + item.userType = _this.flag == undefined ? valueList[0] : 'dre' + let newUrl = _this.$router.resolve({ + path: '/ParameterItemCollection', + query: item + // projectName:this.$route.query.projectName + }) + window.open(newUrl.href, '_blank') + } }) - window.open(newUrl.href, '_blank') }, //待分配填写人数量 waitSdtClick(item) { - let _this = this - item.type = '1' - item.userType = 'sdt' - console.log(item) - let newUrl = _this.$router.resolve({ - path: '/ParameterItemCollection', - query: item - // projectName:this.$route.query.projectName + let query = { + paramsManifestId: item.id, + projectId: item.projectId + } + this.loading = true + let userType = '' + let valueList = [] + getAction('params/collectManifest/getLoginUserType', query).then((res) => { + if(res.result){ + res.result.find((item,index) => { + if(item.value){ + valueList.push(item.value) + } + }) + let flag = valueList.find((item,index) => { + return item == 'sdt' + }) + let _this = this + item.type = '1' + item.userType = _this.flag == undefined ? valueList[0] : 'sdt' + let newUrl = _this.$router.resolve({ + path: '/ParameterItemCollection', + query: item + // projectName:this.$route.query.projectName + }) + window.open(newUrl.href, '_blank') + } }) - window.open(newUrl.href, '_blank') + }, //参数待发起数量 waitCollectClick(item) { - let _this = this - item.type = '1' - item.userType = 'homo' - console.log(item) - let newUrl = _this.$router.resolve({ - path: '/ParameterItemCollection', - query: item - // projectName:this.$route.query.projectName + let query = { + paramsManifestId: item.id, + projectId: item.projectId + } + this.loading = true + let userType = '' + let valueList = [] + getAction('params/collectManifest/getLoginUserType', query).then((res) => { + if(res.result){ + res.result.find((item,index) => { + if(item.value){ + valueList.push(item.value) + } + }) + let flag = valueList.find((item,index) => { + return item == 'homo' + }) + let _this = this + item.type = '1' + item.userType = _this.flag == undefined ? valueList[0] : 'homo' + let newUrl = _this.$router.resolve({ + path: '/ParameterItemCollection', + query: item + // projectName:this.$route.query.projectName + }) + window.open(newUrl.href, '_blank') + } }) - window.open(newUrl.href, '_blank') }, SizeChange(page, pageSize) { this.pageNo = 1