Update event-calendar.vue
This commit is contained in:
1 parent
849cb65efb
commit
597c6b5136
1 file changed
+23
-22
@@ -61,8 +61,7 @@
|
|||||||
<template #arrow-next>
|
<template #arrow-next>
|
||||||
<v-icon icon="mdi-menu-right"></v-icon>
|
<v-icon icon="mdi-menu-right"></v-icon>
|
||||||
</template>
|
</template>
|
||||||
<template #today-button>
|
<template #today-button> </template>
|
||||||
</template>
|
|
||||||
</vue-cal>
|
</vue-cal>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -72,36 +71,38 @@
|
|||||||
<script>
|
<script>
|
||||||
import VueCal from "vue-cal";
|
import VueCal from "vue-cal";
|
||||||
import "vue-cal/dist/vuecal.css";
|
import "vue-cal/dist/vuecal.css";
|
||||||
import { ref, onMounted } from "vue";
|
import { ref } from "vue";
|
||||||
import { axiosApiInstance } from "@/utils/axios-api";
|
import { axiosApiInstance } from "@/utils/axios-api";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { VueCal },
|
components: { VueCal },
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
const events = ref([]);
|
const events = ref([
|
||||||
|
|
||||||
|
]);
|
||||||
function f_generalvacation() {
|
function f_generalvacation() {
|
||||||
axiosApiInstance
|
// axiosApiInstance
|
||||||
.get("api/general_vacation/generalvacation/")
|
// .get("api/general_vacation/generalvacation/")
|
||||||
.then((data) => {
|
// .then((data) => {
|
||||||
for (let x in data.data) {
|
// for (let x in data.data) {
|
||||||
if (x == "План-график") {
|
// if (x == "План-график") {
|
||||||
data.data[x].map((e) => {
|
// data.data[x].map((e) => {
|
||||||
events.value.push({
|
// events.value.push({
|
||||||
name: e.name,
|
// name: e.name,
|
||||||
start: e.start_work_period,
|
// start: e.start_work_period,
|
||||||
end: e.end_work_period,
|
// end: e.end_work_period,
|
||||||
content: e.name,
|
// content: e.name,
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
f_generalvacation();
|
f_generalvacation();
|
||||||
});
|
|
||||||
|
|
||||||
const selectedDate = ref(null);
|
const selectedDate = ref(null);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user