'Контрагенты'
},
data: () => ({
counteragents: []
}),
methods: {
contr_burger (el) {
var table_item = document.getElementsByClassName('table_item');
var table_item_flag = 0;
if (this.counteragents[el].menuActive == true) {
table_item_flag = 1;
}
for (var i = 0; i < table_item.length; i++) {
this.counteragents[i].menuActive = false;
}
if(table_item_flag != 1) {
this.counteragents[el].menuActive = true;
}
}
},
beforeCreate: function () {
var token = Vue.localStorage.get('MallerToken');
if(token == null) {
this.$router.push('/Login');
}
},
created: function () {
for (var key in this.counteragents) {
this.counteragents[key].menuActive = false
}
axios.get(`http://46.254.19.111/api/counteragents/?format=json`)
.then(response => {
// JSON responses are automatically parsed.
this.counteragents = response.data
})
.catch(e => {
this.errors.push(e)
})
},
mounted: function () {
$(".left_menu").mCustomScrollbar({
axis:"y",
theme:"minimal-dark"
});
$(".scroll_cont").mCustomScrollbar({
axis:"y",
theme:"minimal-dark"
});
$(".info_block").mCustomScrollbar({
axis:"y",
theme:"minimal-dark"
});
}
}
Пичаль что за простыни, устыдись невежа!
Обсуждают сегодня