From 6cd08a5982b2144489b5c29d93f73c061a893743 Mon Sep 17 00:00:00 2001 From: Jack <1638169491@qq.com> Date: Tue, 9 Aug 2022 15:11:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B9=96=E9=87=8C=E5=A4=A7=E5=B1=8F(=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E8=AE=A1=E5=88=92)=EF=BC=9A=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E6=A0=85=E6=A0=BC=20ref=20=E7=BB=91?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jlw/planProgress/centerTop.vue | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/views/projectAdmin/jlw/planProgress/centerTop.vue b/src/views/projectAdmin/jlw/planProgress/centerTop.vue index c06b6e28..b10a1b4c 100644 --- a/src/views/projectAdmin/jlw/planProgress/centerTop.vue +++ b/src/views/projectAdmin/jlw/planProgress/centerTop.vue @@ -13,7 +13,7 @@ {{ date }}
-
{{ day }}
+
{{ day.num }}
@@ -27,10 +27,10 @@
{{ p.endTime }}
-
+
-
+
@@ -39,7 +39,7 @@
{{ child.endTime }}
-
+
@@ -65,6 +65,10 @@ export default { created() { console.log(this.getDays('2022/09'), '到') }, + mounted() { + console.log(this.projects) + console.log(this.$refs, 'sdfsf') + }, data() { return { dates: ['2020/04', '2020/05', '2020/07', '2020/08'], @@ -73,10 +77,10 @@ export default { pName: '地基与基础工程', startTime: '2020/04/06', endTime: '2020/05/09', - gantts: [{ startTime: '', endTime: '', status: '' }], + gantts: [{ left: '420px', width: '100px', status: '' }], children: [ - { pName: '无支护土方工程', startTime: '2020/04', endTime: '2020/05' }, - { pName: '有支护土方工程', startTime: '2020/04', endTime: '2020/05' } + { pName: '无支护土方工程', startTime: '2020/04/06', endTime: '2020/05/07' }, + { pName: '有支护土方工程', startTime: '2020/04/10', endTime: '2020/05/08' } ] }, { pName: '主体结构', startTime: '2020/03/12', endTime: '2020/06/04' }, @@ -108,12 +112,16 @@ export default { return (() => { const days = new Array(count) .fill(0) - .map((item, index) => index + 1) - .filter(item => item % 2) + .map((item, index) => { + let num = index + 1 + let fulldate = date + (num < 10 ? '/0' + num : '/' + num) + return { num, date: fulldate } + }) + .filter(item => item.num % 2) if (count === 28) { - days.push(28) + days.push({ num: 28, date: date + '/28' }) } else if (count === 30) { - days.push(30) + days.push({ num: 30, date: date + '/30' }) } return days })() @@ -187,6 +195,7 @@ export default { border-right: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 4px solid #5be1f4; + z-index: 99; } &.open { &::before {