fix [P-227]: чистка логов

This commit is contained in:
Denis Voinovich committed 2025-05-30 13:03:47 +03:00
1 parent bc37d2823c
commit 853c63dfdd
17 files changed
+1 -53

No files matched your search

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