Сделала CalendarClockColumn
This commit is contained in:
20
src/pages/calendar/components/CalendarClockColumn.vue
Normal file
20
src/pages/calendar/components/CalendarClockColumn.vue
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<template lang="pug">
|
||||||
|
.calendar-clock-column.flex.flex-col.items-end.gap-y-43.pt-9.pb-12.px-3
|
||||||
|
span.font-medium.text-base(v-for="hour in hoursArray") {{ hour }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "CalendarClockColumn",
|
||||||
|
props: {
|
||||||
|
hoursArray: Array,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
.calendar-clock-column
|
||||||
|
width: 80px
|
||||||
|
height: 100%
|
||||||
|
color: var(--font-dark-blue-color)
|
||||||
|
</style>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.calendar-column-wrapper.flex.flex-col(@click="updateTime")
|
.calendar-column-wrapper.flex.flex-col
|
||||||
.header.flex.items-center.justify-between.py-2.px-6
|
.header.flex.items-center.justify-between.py-2.px-6
|
||||||
.flex.items-center
|
.flex.items-center
|
||||||
img.avatar-wrapper.mr-2(:src="info.avatar" alt="Team member")
|
img.avatar-wrapper.mr-2(:src="info.avatar" alt="Team member")
|
||||||
@@ -7,13 +7,11 @@
|
|||||||
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
|
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
|
||||||
base-doc-ok-button
|
base-doc-ok-button
|
||||||
.body.flex.flex-col
|
.body.flex.flex-col
|
||||||
.line.flex.items-center(v-for="hour in hourArray" :key="hour")
|
.line.flex.items-center(v-for="hour in hoursArray" :key="hour")
|
||||||
span.self-start {{ hour}}
|
|
||||||
.middle-line
|
.middle-line
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as moment from "moment/moment";
|
|
||||||
import BaseDocOkButton from "@/components/base/buttons/BaseDocOkButton.vue";
|
import BaseDocOkButton from "@/components/base/buttons/BaseDocOkButton.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "CalendarColumn",
|
name: "CalendarColumn",
|
||||||
@@ -25,33 +23,7 @@ export default {
|
|||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
hoursArray: Array,
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
currtentTime: "",
|
|
||||||
hourArray: [
|
|
||||||
"8:00",
|
|
||||||
"9:00",
|
|
||||||
"10:00",
|
|
||||||
"11:00",
|
|
||||||
"12:00",
|
|
||||||
"13:00",
|
|
||||||
"14:00",
|
|
||||||
"15:00",
|
|
||||||
"16:00",
|
|
||||||
"17:00",
|
|
||||||
"18:00",
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
updateTime() {
|
|
||||||
setInterval(this.changeCurrentTime, 30000);
|
|
||||||
},
|
|
||||||
changeCurrentTime() {
|
|
||||||
this.currtentTime = moment().format("h:mm:ss");
|
|
||||||
console.log(this.currtentTime);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -59,7 +31,6 @@ export default {
|
|||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
.calendar-column-wrapper
|
.calendar-column-wrapper
|
||||||
width: 100%
|
width: 100%
|
||||||
background-color: var(--default-white)
|
|
||||||
|
|
||||||
.header
|
.header
|
||||||
height: 48px
|
height: 48px
|
||||||
|
|||||||
@@ -5,16 +5,20 @@
|
|||||||
@previous-date="previousDate"
|
@previous-date="previousDate"
|
||||||
@next-date="nextDate"
|
@next-date="nextDate"
|
||||||
@selected-layout="selectedLayout")
|
@selected-layout="selectedLayout")
|
||||||
calendar-column(:info="columnInfo")
|
.schedule-body.flex
|
||||||
|
calendar-clock-column(:hoursArray="hoursArray")
|
||||||
|
calendar-column(:info="columnInfo" :hoursArray="hoursArray")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import * as moment from "moment/moment";
|
||||||
import CalendarHeader from "./CalendarHeader.vue";
|
import CalendarHeader from "./CalendarHeader.vue";
|
||||||
import CalendarColumn from "./CalendarColumn.vue";
|
import CalendarColumn from "./CalendarColumn.vue";
|
||||||
|
import CalendarClockColumn from "./CalendarClockColumn.vue";
|
||||||
import teamMemberAvatar from "@/assets/images/team-member.svg";
|
import teamMemberAvatar from "@/assets/images/team-member.svg";
|
||||||
export default {
|
export default {
|
||||||
name: "CalendarSchedule",
|
name: "CalendarSchedule",
|
||||||
components: { CalendarHeader, CalendarColumn },
|
components: { CalendarHeader, CalendarColumn, CalendarClockColumn },
|
||||||
props: {
|
props: {
|
||||||
currentDate: {
|
currentDate: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -29,6 +33,20 @@ export default {
|
|||||||
name: "Захарова А.О.",
|
name: "Захарова А.О.",
|
||||||
avatar: teamMemberAvatar,
|
avatar: teamMemberAvatar,
|
||||||
},
|
},
|
||||||
|
currtentTime: "",
|
||||||
|
hoursArray: [
|
||||||
|
"8:00",
|
||||||
|
"9:00",
|
||||||
|
"10:00",
|
||||||
|
"11:00",
|
||||||
|
"12:00",
|
||||||
|
"13:00",
|
||||||
|
"14:00",
|
||||||
|
"15:00",
|
||||||
|
"16:00",
|
||||||
|
"17:00",
|
||||||
|
"18:00",
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -41,6 +59,13 @@ export default {
|
|||||||
selectedLayout(option) {
|
selectedLayout(option) {
|
||||||
this.$emit("selected-layout", option);
|
this.$emit("selected-layout", option);
|
||||||
},
|
},
|
||||||
|
updateTime() {
|
||||||
|
setInterval(this.changeCurrentTime, 30000);
|
||||||
|
},
|
||||||
|
changeCurrentTime() {
|
||||||
|
this.currtentTime = moment().format("h:mm:ss");
|
||||||
|
console.log(this.currtentTime);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -48,4 +73,5 @@ export default {
|
|||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
.schedule
|
.schedule
|
||||||
width: 100%
|
width: 100%
|
||||||
|
background-color: var(--default-white)
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ module.exports = {
|
|||||||
"3xl": ["60px", { lineHeight: "70px" }],
|
"3xl": ["60px", { lineHeight: "70px" }],
|
||||||
"4xl": ["44px", { lineHeight: "48px" }],
|
"4xl": ["44px", { lineHeight: "48px" }],
|
||||||
},
|
},
|
||||||
|
gap: {
|
||||||
|
43: "43px",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [],
|
plugins: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user