浏览代码

提交代码

Lijy 3 天之前
父节点
当前提交
92297086eb

+ 15 - 8
fhKeeper/formulahousekeeper/timesheet_mld/src/views/Home.vue

@@ -773,14 +773,21 @@
                             this.drawer = false;
                         } else if(type == 11) {
                             console.log(row, '<====== ganttData')
-                            const { taskId, ganttData } = row
-                            this.$router.push({
-                                path: '/list',
-                                query: { 
-                                    messageTaskId: taskId,
-                                    ganttData: JSON.stringify(ganttData || {}) 
-                                }
-                            });
+                            const { taskId, ganttData, msg } = row
+                            if(msg.indexOf('取消') != -1 || msg.indexOf('驳回') != -1 || msg.indexOf('审核') != -1) {
+                                this.$router.push({
+                                    path: '/task',
+                                    query: { doICreateIt: true }
+                                })
+                            } else {
+                                this.$router.push({
+                                    path: '/list',
+                                    query: { 
+                                        messageTaskId: taskId,
+                                        ganttData: JSON.stringify(ganttData || {}) 
+                                    }
+                                });
+                            }
                             this.drawer = false;
                         }
                         

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_mld/src/views/project/gantt.vue

@@ -244,8 +244,8 @@ export default {
           const d2 = this.dayjs(task.end_date);
           this.tooltip.task = {
             ...task,
-            end_date: this.dayjs(task.end_date).format('YYYY-MM-DD HH:mm:ss'),
-            start_date: this.dayjs(task.start_date).format('YYYY-MM-DD HH:mm:ss'),
+            end_date: this.dayjs(task.endDateStr).format('YYYY-MM-DD HH:mm:ss'),
+            start_date: this.dayjs(task.startDateStr).format('YYYY-MM-DD HH:mm:ss'),
             projectName: list[0],
             planName: list[1],
             dayDifference:  d2.diff(d1, 'day'),

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet_mld/src/views/project/project_gantt.vue

@@ -565,6 +565,8 @@ export default {
                                   if(res.data[i].id.indexOf(this.$t('other.AskForLeave')) != '-1') {
                                     res.data[i].color = '#F56C6C'
                                   }
+                                  res.data[i].startDateStr = JSON.parse(JSON.stringify(res.data[i].start_date || []))
+                                  res.data[i].endDateStr = JSON.parse(JSON.stringify(res.data[i].end_date || []))
                                 }
                                 this.tasks = {data:res.data};
                                 if(this.user.userNameNeedTranslate != '1') {

+ 7 - 0
fhKeeper/formulahousekeeper/timesheet_mld/src/views/task/list.vue

@@ -2559,6 +2559,13 @@ import { getThemeColor } from '@/utils/commonMethod.js'
             // if(this.user.companyId == '428') {
             //     this.getSthForSb()
             // }
+            console.log(this.$route.query)
+            const query = this.$route.query
+            if(query.doICreateIt) {
+                setTimeout(() => {
+                    this.switchs(2)
+                }, 500)
+            }
         },
     };
 </script>