diff --git a/hb_client/src/components/Gantt/components/leftMenu.vue b/hb_client/src/components/Gantt/components/leftMenu.vue new file mode 100644 index 0000000..2167e1c --- /dev/null +++ b/hb_client/src/components/Gantt/components/leftMenu.vue @@ -0,0 +1,200 @@ + + + + + + diff --git a/hb_client/src/components/Gantt/components/slider.vue b/hb_client/src/components/Gantt/components/slider.vue new file mode 100644 index 0000000..b355b75 --- /dev/null +++ b/hb_client/src/components/Gantt/components/slider.vue @@ -0,0 +1,156 @@ + + + diff --git a/hb_client/src/components/Gantt/index.vue b/hb_client/src/components/Gantt/index.vue new file mode 100644 index 0000000..1ba94e5 --- /dev/null +++ b/hb_client/src/components/Gantt/index.vue @@ -0,0 +1,1374 @@ + + + + + diff --git a/hb_client/src/views/pm/gantt.vue b/hb_client/src/views/pm/gantt.vue index 36b3b6c..564d3b3 100644 --- a/hb_client/src/views/pm/gantt.vue +++ b/hb_client/src/views/pm/gantt.vue @@ -4,11 +4,12 @@ +
@@ -944,7 +945,7 @@ }; this.handlerSelect(); }, - //获取近三年的所有天数 + //获取要显示的所有天数 getDay() { this.getAllDate(); }, @@ -959,8 +960,13 @@ return false; }, getAllDate() { - let obj = {}; - let arr = [this.currentYear - 1, this.currentYear, this.currentYear + 1]; + let obj = {},arr=[]; + let start = new Date(this.timeRange[0]).getFullYear(); + let end = new Date(this.timeRange[1]).getFullYear(); + for(let i=start;i { obj.year = item; obj.days = this.isLeapYear(item) ? 365 : 366; @@ -974,7 +980,6 @@ this.allDays.forEach(item => { item.month = this.handleMonthDay(item.days, item.year); }); - // console.log(this.allDays); this.allDays.forEach(element => { if (element.year == this.currentYear) { element.month[0][this.currentMonth].forEach(k => { @@ -1063,15 +1068,6 @@ break; } }, - setList() { - /*getPlanGantt().then(res=>{ - if(res.code===200){ - this.list = res.data.results; - }else{ - this.$message.error(res.msg); - } - })*/ - }, //设置里程碑线的高度 setStoneLine(isFirst) { this.$nextTick(() => { @@ -1112,7 +1108,6 @@ mounted() { document.addEventListener("scroll", this.handleScroll); this.getDay(); - this.setList(); this.setStoneLine(); }, beforeDestroy() { diff --git a/hb_client/src/views/pm/plan.vue b/hb_client/src/views/pm/plan.vue index 7cc3913..4d114e1 100644 --- a/hb_client/src/views/pm/plan.vue +++ b/hb_client/src/views/pm/plan.vue @@ -1,63 +1,62 @@ - + - \ No newline at end of file +