Browse Source

处理点击预估工时申请被驳回的消息进行跳转的页面

seyason 1 year ago
parent
commit
b1e3509ad2

+ 21 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -137,6 +137,9 @@
                     if (loginUserId.includes('#/')) {
                         loginUserId = loginUserId.substring(0, loginUserId.indexOf('#/'));
                     }
+                    if (loginUserId.includes('&')) {
+                        loginUserId = loginUserId.substring(0, loginUserId.indexOf('&'));
+                    }
                     var path = null;
                     if (href.indexOf('path') > 0) {
                         path = href.split('path=')[1].split('&')[0];
@@ -173,6 +176,9 @@
                     if (loginUserId.includes('#/')) {
                         loginUserId = loginUserId.substring(0, loginUserId.indexOf('#/'));
                     }
+                    if (loginUserId.includes('&')) {
+                        loginUserId = loginUserId.substring(0, loginUserId.indexOf('&'));
+                    }
                     var path = null;
                     if (href.indexOf('path') > 0) {
                         path = href.split('path=')[1].split('&')[0];
@@ -362,7 +368,21 @@
                                 this.permissionsList(res.data)
                                 if(user.moduleList.length > 0) {
                                     if (path) {
-                                        this.$router.push({ path: path })
+                                        var action = '';
+                                        //url上传来的格式
+                                        if (path.includes('projectInside')) {
+                                            //跳转进入项目的任务看板
+                                            path = decodeURIComponent(path);
+                                            console.log('pppp='+path);
+                                            if (path.includes('@adjustBudget-')) {
+                                                //需要打开分组预估工时设置
+                                                action = path.split('@')[1];
+                                                path = path.split('@')[0];
+                                            }
+                                        }
+                                        console.log('action==='+action);
+                                        sessionStorage.action = action
+                                        this.$router.push({ path: path})
                                     } else {
                                         this.$router.push({ path: user.moduleList[0].path })
                                     }

+ 18 - 11
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -57,7 +57,7 @@
                                         <el-dropdown-item divided @click.native="renameGroup(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
                                             <i class="el-icon-edit"></i>
                                             {{ $t('changegroups') }}</el-dropdown-item>
-                                        <el-dropdown-item divided @click.native="setManDay(item)" v-if="user.timeType.projectManDay==1" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
+                                        <el-dropdown-item divided @click.native="setManDay()" v-if="user.timeType.projectManDay==1" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
                                             <i class="el-icon-time"></i>
                                             预估工时</el-dropdown-item>
                                         <el-dropdown-item divided @click.native="addToTemplate(item)" :disabled="!(projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement || isManageDept)">
@@ -3202,9 +3202,9 @@
                 this.groupForm = JSON.parse(JSON.stringify(item));
                 this.setInchargerDialog = true;
             },
-            setManDay(item) {
+            setManDay() {
                 this.modGroupManDayKey++
-                this.groupForm = JSON.parse(JSON.stringify(item));
+                // this.groupForm = JSON.parse(JSON.stringify(item));
                 this.modGroupManDayDialog = true;
             },
             renameGroup(item) {
@@ -3421,11 +3421,15 @@
                 this.addGroupDialog = true;
                 this.groupForm = {projectId: this.curProjectId};
             },
-            getInsideData() {
-                this.getTaskGroups();
+            getInsideData(action) {
+                var targetGpId = null;
+                if (action) {
+                    targetGpId = action.split('-')[1];
+                }
+                this.getTaskGroups(targetGpId);
             },
             //加载项目内的任务分组
-            getTaskGroups() {
+            getTaskGroups(errorGroupId) {
                 this.http.post('/task-group/list',{projectId: this.curProjectId},
                 res => {
                     if (res.code == "ok") {
@@ -3439,6 +3443,10 @@
                         } else {
                             this.groupList = res.data;
                         }
+                        if (errorGroupId != null) {
+                            //需要修正分组工时
+                            this.setManDay();
+                        }
                         console.log(this.groupList, '返回的数据')
                         console.log(this.groupList,'grouplist');
                         if (this.groupList.length > 0) {
@@ -3865,7 +3873,6 @@
             },
             // 企业微信搜索
             echartDepartment() {
-                console.log('我点击了搜索')
                 if(this.participantsFilterText != '') {
                     this.filterNodeFlag = true
                     this.http.post("/user/getEmployeeList", {
@@ -3935,15 +3942,15 @@
             }, 1000)
         },
         mounted() {
-
             this.curProjectId = parseInt(this.$route.params.id);
             this.activeName = this.$route.path.split("/")[1];
             this.getDetail();
-
             this.getUsers();
             this.getMyProjectList();
-            
-            this.getInsideData();
+            console.log('action==params='+sessionStorage.action);
+            var action = sessionStorage.action
+            this.getInsideData(action);
+            sessionStorage.removeItem('action');
             this.getGroupTemplate();
         }
     };

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -5424,8 +5424,9 @@
                 }
                 param.stateKey = this.stateKey
                 // param.departmentId = this.user.departmentId
-                console.log(param, '《=== 导出传的参数')
-                this.http.post( this.port.report.export, param,
+                console.log(param, '《=== 导出传的参数');
+                console.log('开始调用exportReport接口');
+                this.http.post(this.port.report.export, param,
                 res => {
                     this.exportingData = false;
                     if (res.code == "ok") {