|
@@ -23,14 +23,33 @@ switch(method) {
|
|
const res = await fetch(fullurl, options);
|
|
const res = await fetch(fullurl, options);
|
|
return await res.json();
|
|
return await res.json();
|
|
};
|
|
};
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+<<<<<<< HEAD
|
|
var app = new Vue({
|
|
var app = new Vue({
|
|
|
|
+=======
|
|
|
|
+
|
|
|
|
+var vueapp = new Vue({
|
|
|
|
+>>>>>>> master
|
|
|
|
+=======
|
|
|
|
+var app = new Vue({
|
|
|
|
+>>>>>>> b5fe990a18b258e28401117b0be0a70e1a10db12
|
|
el: '#app',
|
|
el: '#app',
|
|
delimiters: ['${', '}'],
|
|
delimiters: ['${', '}'],
|
|
data: {
|
|
data: {
|
|
groups:[],
|
|
groups:[],
|
|
teachers:[],
|
|
teachers:[],
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ selected:null
|
|
|
|
+ },
|
|
|
|
+=======
|
|
|
|
+ specialties:[],
|
|
|
|
+ },
|
|
|
|
+>>>>>>> master
|
|
|
|
+=======
|
|
selected:null
|
|
selected:null
|
|
},
|
|
},
|
|
|
|
+>>>>>>> b5fe990a18b258e28401117b0be0a70e1a10db12
|
|
methods: {
|
|
methods: {
|
|
showGroups() {
|
|
showGroups() {
|
|
console.log(this.groups)
|
|
console.log(this.groups)
|
|
@@ -44,10 +63,31 @@ var app = new Vue({
|
|
Vue.set(this.teachers, i, teachers[i]);
|
|
Vue.set(this.teachers, i, teachers[i]);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+<<<<<<< HEAD
|
|
async mountFunc(){
|
|
async mountFunc(){
|
|
await this.getTeachers()
|
|
await this.getTeachers()
|
|
await this.getGroups()
|
|
await this.getGroups()
|
|
},
|
|
},
|
|
|
|
+=======
|
|
|
|
+ async getSpecilties(){
|
|
|
|
+ specialties = await requestFunc("/specialty/", "GET")
|
|
|
|
+ for(let i =0; i < specialties.length; i++) {
|
|
|
|
+ Vue.set(this.specialties, i, specialties[i]);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async mountFunc(){
|
|
|
|
+ await this.getTeachers()
|
|
|
|
+ await this.getGroups()
|
|
|
|
+ await this.getSpecilties()
|
|
|
|
+ }
|
|
|
|
+>>>>>>> master
|
|
|
|
+=======
|
|
|
|
+ async mountFunc(){
|
|
|
|
+ await this.getTeachers()
|
|
|
|
+ await this.getGroups()
|
|
|
|
+ },
|
|
|
|
+>>>>>>> b5fe990a18b258e28401117b0be0a70e1a10db12
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
await this.mountFunc()
|
|
await this.mountFunc()
|
|
@@ -58,6 +98,10 @@ var app = new Vue({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+>>>>>>> b5fe990a18b258e28401117b0be0a70e1a10db12
|
|
// const requestFunc = async(url, method = "GET", data = null, token = null) => {
|
|
// const requestFunc = async(url, method = "GET", data = null, token = null) => {
|
|
// apihost = 'http://schedule.tomtit.tomsk.ru/api'
|
|
// apihost = 'http://schedule.tomtit.tomsk.ru/api'
|
|
// method = method.toLocaleUpperCase()
|
|
// method = method.toLocaleUpperCase()
|
|
@@ -69,6 +113,55 @@ var app = new Vue({
|
|
// "Authorization": `Bearer ${token}`,
|
|
// "Authorization": `Bearer ${token}`,
|
|
// },
|
|
// },
|
|
// };
|
|
// };
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+
|
|
|
|
+// switch(method) {
|
|
|
|
+// case "PUT":
|
|
|
|
+// delete options.headers["Content-Type"];
|
|
|
|
+// options.body = data;
|
|
|
|
+// break;
|
|
|
|
+// case "POST": case "PATCH": case "DELETE":
|
|
|
|
+// options.body = JSON.stringify(data);
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+// const res = await fetch(fullurl, options);
|
|
|
|
+// return await res.json();
|
|
|
|
+// };
|
|
|
|
+// var app = new Vue({
|
|
|
|
+// el: '#app',
|
|
|
|
+// delimiters: ['${', '}'],
|
|
|
|
+// data: {
|
|
|
|
+// groups:[],
|
|
|
|
+// teachers:[],
|
|
|
|
+// profmoduls:[],
|
|
|
|
+// },
|
|
|
|
+// methods: {
|
|
|
|
+// showGroups() {
|
|
|
|
+// console.log(this.groups)
|
|
|
|
+// },
|
|
|
|
+// async getGroups(){
|
|
|
|
+// this.groups = await requestFunc("/group/", "GET")
|
|
|
|
+// },
|
|
|
|
+// async getTeachers(){
|
|
|
|
+// teachers = await requestFunc("/teacher/", "GET")
|
|
|
|
+// for(let i =0; i < teachers.length; i++) {
|
|
|
|
+// Vue.set(this.teachers, i, teachers[i]);
|
|
|
|
+// },
|
|
|
|
+// },
|
|
|
|
+// async mountFunc(){
|
|
|
|
+// await this.getTeachers()
|
|
|
|
+// await this.getGroups()
|
|
|
|
+// },
|
|
|
|
+// },
|
|
|
|
+// async mounted() {
|
|
|
|
+// await this.mountFunc()
|
|
|
|
+// console.log(this.teachers)
|
|
|
|
+// }
|
|
|
|
+// });
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+>>>>>>> b5fe990a18b258e28401117b0be0a70e1a10db12
|
|
|
|
|
|
// switch(method) {
|
|
// switch(method) {
|
|
// case "PUT":
|
|
// case "PUT":
|
|
@@ -80,6 +173,9 @@ var app = new Vue({
|
|
// break;
|
|
// break;
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+>>>>>>> master
|
|
|
|
+=======
|
|
// const res = await fetch(fullurl, options);
|
|
// const res = await fetch(fullurl, options);
|
|
// return await res.json();
|
|
// return await res.json();
|
|
// };
|
|
// };
|
|
@@ -113,4 +209,5 @@ var app = new Vue({
|
|
// await this.mountFunc()
|
|
// await this.mountFunc()
|
|
// console.log(this.teachers)
|
|
// console.log(this.teachers)
|
|
// }
|
|
// }
|
|
-// });
|
|
|
|
|
|
+// });
|
|
|
|
+>>>>>>> b5fe990a18b258e28401117b0be0a70e1a10db12
|