From 40eb05d618ceb870ea536c5ffbaf2ea44024eb26 Mon Sep 17 00:00:00 2001 From: Kevser <> Date: Tue, 22 Jul 2025 10:17:15 +0300 Subject: [PATCH] =?UTF-8?q?-=20Silme=20butonu=20t=C4=B1kland=C4=B1=C4=9F?= =?UTF-8?q?=C4=B1nda=20silme=20fonksiyonu=20direkt=20=C3=A7al=C4=B1=C5=9Fm?= =?UTF-8?q?a=20sorunu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/global/DialogItem.vue | 10 ++++++++-- src/init/axios-init.ts | 3 ++- src/module/site-yonetimi/views/PopupListe.vue | 6 ++---- src/module/site-yonetimi/views/SayfaListesi.vue | 4 ++-- src/module/site-yonetimi/views/SliderListe.vue | 11 +++++++++-- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/components/global/DialogItem.vue b/src/components/global/DialogItem.vue index 8e6eac7..43abaa9 100644 --- a/src/components/global/DialogItem.vue +++ b/src/components/global/DialogItem.vue @@ -19,7 +19,7 @@ v-for="(button, i) in dialogData.buttons"> @@ -60,7 +60,13 @@ const CreateData = () => { Object.assign(localData, props.dialogData) } - + const LocalFunction = ( + fun: Function | undefined, + id: string | number, + data: Record + ) => { + if (fun !== undefined) fun(id, data) + } const CloseDialog = () => { delete dialogStore.dialogs[props.id] } diff --git a/src/init/axios-init.ts b/src/init/axios-init.ts index fcbf462..3602669 100644 --- a/src/init/axios-init.ts +++ b/src/init/axios-init.ts @@ -2,7 +2,8 @@ import axios from 'axios' import { useUsersStore } from '@/stores/usersStore' import router from '@/router' -axios.defaults.baseURL = 'https://panelapi.cekilisevi.gov.tr/' +//axios.defaults.baseURL = 'https://panelapi.cekilisevi.gov.tr/' +axios.defaults.baseURL = 'https://mpiapi.beyaz.net/' //axios.defaults.timeout = 2000; axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8' import { useDataStore } from '@/stores/dataStore' diff --git a/src/module/site-yonetimi/views/PopupListe.vue b/src/module/site-yonetimi/views/PopupListe.vue index 483026b..9f4eb01 100644 --- a/src/module/site-yonetimi/views/PopupListe.vue +++ b/src/module/site-yonetimi/views/PopupListe.vue @@ -120,7 +120,7 @@ { label: 'Popup Sil', type: 'alert', - function: DeleteRow(data.id) + function: () => DeleteRow(data.id) } ] }) @@ -168,9 +168,7 @@ panel.value = true } const updateAction = (row: any) => { - panelPopup.value = popups.value.find((x) => x.id == row.id) || {} - - console.log("panelPopup",panelPopup.value) + Object.assign(panelPopup.value,row) panel.value = true isUpdate.value = true } diff --git a/src/module/site-yonetimi/views/SayfaListesi.vue b/src/module/site-yonetimi/views/SayfaListesi.vue index 95cafd0..14bceeb 100644 --- a/src/module/site-yonetimi/views/SayfaListesi.vue +++ b/src/module/site-yonetimi/views/SayfaListesi.vue @@ -45,7 +45,7 @@ { label: 'Sil', type: 'alert', - function: DeleteRow(data.id) + function: () => DeleteRow(data.id) } ] }) @@ -64,7 +64,7 @@ { text: 'Sil', class: 'alert', - action: DeleteRowPop + action: () => DeleteRowPop } ]) diff --git a/src/module/site-yonetimi/views/SliderListe.vue b/src/module/site-yonetimi/views/SliderListe.vue index 2d38932..313e484 100644 --- a/src/module/site-yonetimi/views/SliderListe.vue +++ b/src/module/site-yonetimi/views/SliderListe.vue @@ -50,6 +50,9 @@ import { useDataStore } from '@/stores/dataStore' import PanelWrapper from '@/components/PanelWrapper.vue' import { useDialogStore } from '@/components/global/dialogStore' + import { useGlobalStore } from '@/stores/globalStore' + const globalStore = useGlobalStore() + const dialogStore = useDialogStore() const dataStore = useDataStore() @@ -73,7 +76,11 @@ { name: 'resimUrl', title: 'Resim Url', - sort: true + computeHtml: (v: Record) => { + if (v.resimUrl !== null && v.resimUrl !== undefined) { + return globalStore.TableCellDocument(v.resimUrl) + } + } }, { name: 'url', @@ -92,7 +99,7 @@ { label: 'Slider Sil', type: 'alert', - function: DeleteRow(data.id) + function: () => DeleteRow(data.id) } ] })