fix [P-227]: чистка логов
This commit is contained in:
1 parent
bc37d2823c
commit
853c63dfdd
17 files changed
+1
-53
No files matched your search
@@ -9,7 +9,6 @@ import { useAccountStore } from '@/store/AccountStore';
|
||||
* Получаем информацию о юзере из стора.
|
||||
*/
|
||||
const accountStore = useAccountStore();
|
||||
console.log("dfdffdfdf");
|
||||
accountStore.setUser(accountStore.getuserFromStorage());
|
||||
</script>
|
||||
|
||||
|
||||
@@ -161,9 +161,6 @@ export default {
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
console.log(true);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -127,7 +127,6 @@ export default {
|
||||
// return files.value;
|
||||
// },
|
||||
// set(newValue) {
|
||||
// // console.log(newValue,'file')
|
||||
// newValue.forEach((e) => {
|
||||
// if (!files.value.some((l) => l.name == e.name.split(" ").join("_"))) {
|
||||
// files.value.push(e);
|
||||
|
||||
@@ -136,7 +136,6 @@ export default {
|
||||
});
|
||||
|
||||
let actRule = rule.all();
|
||||
console.log(actRule, '--------------------------------actRule')
|
||||
|
||||
let lastDateMonth = new Date(
|
||||
new Date(dayNextMonth.value).setDate(
|
||||
@@ -332,7 +331,6 @@ export default {
|
||||
|
||||
}
|
||||
if (ev.rule.freq == 0) {
|
||||
console.log(ev, 'ev')
|
||||
if (zeroTime(day.date) == zeroTime(ev.start_event)) {
|
||||
return "rounded-e-lg"
|
||||
}
|
||||
|
||||
@@ -109,7 +109,6 @@ export default {
|
||||
},
|
||||
|
||||
setup(props, { emit }) {
|
||||
console.log("sd")
|
||||
const filtered = ref('');
|
||||
const accountStore = useAccountStore();
|
||||
const back = ref([]);
|
||||
|
||||
@@ -553,7 +553,6 @@ export default {
|
||||
for (let x = s; x <= e; x++) {
|
||||
dateNumbers.push(x);
|
||||
}
|
||||
console.log(dateNumbers.length, "дни в месяце");
|
||||
return dateNumbers;
|
||||
};
|
||||
|
||||
@@ -575,7 +574,6 @@ export default {
|
||||
month.push(sm + 1);
|
||||
|
||||
if (!month.includes(em + 1)) month.push(em + 1);
|
||||
console.log(month, "month");
|
||||
return month;
|
||||
};
|
||||
|
||||
|
||||
@@ -181,7 +181,6 @@ export default {
|
||||
const onPickFile = (ex) => {
|
||||
const sdata = new FormData()
|
||||
sdata.append('dailyfiles', dailyfiles.value)
|
||||
console.log(dailyfiles.value);
|
||||
axiosApiInstance.post(`api/general_vacation/dailyroundup/?excel=${ex}`, sdata).then(result => {
|
||||
info.value = result.data
|
||||
dailyfun()
|
||||
|
||||
@@ -77,7 +77,6 @@ export default {
|
||||
const onPickFile = (ex) => {
|
||||
const sdata = new FormData()
|
||||
sdata.append('dailyfiles', dailyfiles.value)
|
||||
console.log(dailyfiles.value);
|
||||
axiosApiInstance.post(`api/general_vacation/dailyroundup/?excel=${ex}`, sdata).then(result => {
|
||||
textFromAlert(result.data['mess'])
|
||||
})
|
||||
|
||||
@@ -207,7 +207,6 @@ export default {
|
||||
messeger.value.key = 'good'
|
||||
|
||||
}).catch(e => {
|
||||
console.log(e);
|
||||
messeger.value.key = 'bad'
|
||||
}
|
||||
).finally(() => isVoteSubmitted.value = true)
|
||||
|
||||
@@ -81,7 +81,6 @@ export default {
|
||||
// const
|
||||
const perc_thanks = computed({
|
||||
get(){
|
||||
// console.log(props.all_cod);
|
||||
return Math.round(props.uservotedthanks.length*100/(props.all_cod.length+1))
|
||||
}
|
||||
})
|
||||
@@ -159,18 +158,15 @@ export default {
|
||||
get(){
|
||||
|
||||
let logins = props.usersvotedbest.reduce((arr,elm)=>[...arr,elm.voted_user],[])
|
||||
console.log(props.usersvotedbest);
|
||||
let grpd = Object.groupBy(props.all_cod.filter(el=>logins.includes(el.login)==false
|
||||
), ({ department }) => department);
|
||||
|
||||
console.log(grpd);
|
||||
return novoted(grpd)
|
||||
}})
|
||||
|
||||
const notvotedthanks = computed({
|
||||
get(){
|
||||
|
||||
console.log(props.usersvotedbest);
|
||||
let logins = props.uservotedthanks.reduce((arr,elm)=>[...arr,elm.voted_user],[])
|
||||
|
||||
let grpd = Object.groupBy(props.all_cod.filter(el=>logins.includes(el.login)==false), ({ department }) => department);
|
||||
@@ -243,7 +239,6 @@ export default {
|
||||
// }
|
||||
|
||||
// });
|
||||
// console.log(max_bst);
|
||||
|
||||
|
||||
// };
|
||||
|
||||
@@ -103,7 +103,6 @@ export default {
|
||||
}
|
||||
|
||||
const voteSend = () => {
|
||||
console.log(vote.value);
|
||||
axiosApiInstance.post(send_address, {
|
||||
cand_name_id: vote.value,
|
||||
// department_user: props.myrealdep.department,
|
||||
|
||||
@@ -230,7 +230,6 @@ export default {
|
||||
if (!accountStore.cod2user) {
|
||||
|
||||
clearAxios.get(`api/navigation/screensaver/`).then((data) => {
|
||||
// console.log(data, 'saver--')
|
||||
scrimg.value = data.data.img;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -29,15 +29,12 @@ export const useAccountStore = defineStore("AccountStore", () => {
|
||||
};
|
||||
|
||||
function get_setting(key) {
|
||||
console.log(settingsStorage.value);
|
||||
return settingsStorage.value === null? defaultSettings[key]: settingsStorage.value[key];
|
||||
}
|
||||
|
||||
const cod2user = ref(false);
|
||||
const calendar = ref(get_setting("calendar")
|
||||
);
|
||||
console.log(calendar.value, 'calval');
|
||||
|
||||
const setUser = (value) => {
|
||||
value.photo = checkremote(`${spravURL}${value.login}.jpg`);
|
||||
user.value = value;
|
||||
|
||||
@@ -172,7 +172,6 @@ async function getVoteDetail(id) {
|
||||
async function deleteVote(id) {
|
||||
try {
|
||||
await axiosApiInstance.delete(`/api/vote/votedetail/${id}/`);
|
||||
console.log("Голосование успешно удалено");
|
||||
} catch (error) {
|
||||
console.error("Ошибка удаления голосования:", error);
|
||||
throw error;
|
||||
@@ -252,8 +251,6 @@ async function assignTest(testId, employeeIds, completionDate) {
|
||||
}
|
||||
|
||||
const userIds = Array.from(employeeIds).map(id => Number(id));
|
||||
console.log('Назначение теста для пользователей:', userIds);
|
||||
|
||||
const promises = userIds.map(userId =>
|
||||
assignTestToUser(userId, testId, completionDate)
|
||||
);
|
||||
@@ -281,7 +278,6 @@ async function deleteTest(id) {
|
||||
const testingRecords = await getTestToUser(id);
|
||||
|
||||
if (testingRecords && testingRecords.length > 0) {
|
||||
console.log(`Удаляем ${testingRecords.length} записей назначенных тестов для теста ${id}`);
|
||||
const deletePromises = testingRecords.map(record => deleteTestingRecord(record.id));
|
||||
await Promise.all(deletePromises);
|
||||
}
|
||||
@@ -289,7 +285,6 @@ async function deleteTest(id) {
|
||||
await axiosApiInstance.delete('/api/tests/gettests/', {
|
||||
data: { test_id: id }
|
||||
});
|
||||
console.log("Тест успешно удален");
|
||||
} catch (error) {
|
||||
console.error("Ошибка удаления теста:", error);
|
||||
throw error;
|
||||
@@ -298,11 +293,6 @@ async function deleteTest(id) {
|
||||
|
||||
async function assignTestToUser(userId, testId, completionDate) {
|
||||
try {
|
||||
console.log('Отправка запроса на назначение теста:', {
|
||||
user_id: userId,
|
||||
test_id: testId,
|
||||
completion_date: completionDate
|
||||
});
|
||||
|
||||
const response = await axiosApiInstance.post('/api/tests/testingview/', {
|
||||
user_id: Number(userId),
|
||||
@@ -329,11 +319,9 @@ async function getTestToUser(testId) {
|
||||
|
||||
async function deleteTestingRecord(testingId) {
|
||||
try {
|
||||
console.log(`Удаляем назначение теста с ID: ${testingId}`);
|
||||
await axiosApiInstance.put('/api/tests/testingview/', {
|
||||
id: testingId
|
||||
});
|
||||
console.log(`Назначение теста с ID: ${testingId} успешно удалено`);
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.error(`Ошибка удаления назначения теста с ID: ${testingId}`, error);
|
||||
|
||||
@@ -60,9 +60,6 @@ export default {
|
||||
const burl = baseURL.slice(0, -1);
|
||||
const carous = ref([{ link: '' }]);
|
||||
|
||||
|
||||
console.log("adыыыыыыыыыыыыыыыsааd")
|
||||
|
||||
|
||||
axiosApiInstance.get(`api/fns/links/`).then((data) => {
|
||||
carous.value = data.data;
|
||||
|
||||
@@ -217,13 +217,10 @@ export default {
|
||||
const status = activeTab.value === 2 ? '' :
|
||||
activeTab.value === 0 ? '?status=active' :
|
||||
activeTab.value === 1 ? '?status=completed' : '';
|
||||
|
||||
console.log('Запрашиваем тесты со статусом:', status);
|
||||
|
||||
|
||||
axiosApiInstance
|
||||
.get(`/api/tests/gettests${status}`)
|
||||
.then((resp) => {
|
||||
console.log('Получен ответ от сервера:', resp.data);
|
||||
getAllTests.value = resp.data;
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -270,13 +267,10 @@ export default {
|
||||
};
|
||||
|
||||
const openAddDialog = async (id) => {
|
||||
console.log('Открываем диалог для теста:', id);
|
||||
selectedTestId.value = id;
|
||||
try {
|
||||
const response = await getTestToUser(id);
|
||||
console.log('Получены назначения теста:', response);
|
||||
|
||||
// Сгруппируем тесты по пользователям и возьмем самую позднюю дату для каждого
|
||||
const assignmentsByUser = response.reduce((acc, testing) => {
|
||||
if (testing.user_details && testing.is_active) {
|
||||
const existingUser = acc.find(u => u.id === testing.user_details.id);
|
||||
@@ -291,10 +285,8 @@ export default {
|
||||
}, []);
|
||||
|
||||
assignedEmployees.value = assignmentsByUser.map(user => user.id);
|
||||
console.log('ID назначенных сотрудников:', assignedEmployees.value);
|
||||
|
||||
assignedEmployeesDetails.value = assignmentsByUser.sort((a, b) => a.fio.localeCompare(b.fio));
|
||||
console.log('Детали назначенных сотрудников:', assignedEmployeesDetails.value);
|
||||
|
||||
} catch (error) {
|
||||
console.error('Ошибка при получении назначенных сотрудников:', error);
|
||||
@@ -322,9 +314,7 @@ export default {
|
||||
|
||||
const deleteTest = async () => {
|
||||
try {
|
||||
console.log(`Начинаем процесс удаления теста с ID: ${selectedTestId.value}`);
|
||||
await apiDeleteTest(selectedTestId.value);
|
||||
console.log('Тест успешно удален, обновляем список тестов');
|
||||
deleteDialog.value = false;
|
||||
getTestById();
|
||||
} catch (error) {
|
||||
@@ -336,8 +326,6 @@ export default {
|
||||
|
||||
const handleAssign = async ({ selectedEmployees: employees, completionDate }) => {
|
||||
try {
|
||||
const selectedIds = employees.map(id => Number(id));
|
||||
console.log('Назначаем тест:', selectedTestId.value, 'сотрудникам:', selectedIds, 'дата окончания:', completionDate);
|
||||
|
||||
let employeesToAssign = [...employees];
|
||||
if (!accountStore.user.is_staff) {
|
||||
|
||||
@@ -138,7 +138,6 @@ export default {
|
||||
if (type === 'vote') {
|
||||
try {
|
||||
await loadVoteDetails(voting.id);
|
||||
console.log('sd;lkjs;ljlmnjlk');
|
||||
voteModal.value = true;
|
||||
router.push({ name: 'Voting', params: { id: voting.id } });
|
||||
} catch (e) {
|
||||
@@ -163,7 +162,6 @@ export default {
|
||||
watch(currentTab, async () => {
|
||||
if (currentTab.value !== 'constructor') {
|
||||
await updating(currentTab.value);
|
||||
console.log(constructor.value, '!!!');
|
||||
if (constructor.value !== null) {
|
||||
constructor.value.resetForm();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user