- Silme butonu tıklandığında silme fonksiyonu direkt çalışma sorunu
This commit is contained in:
@ -19,7 +19,7 @@
|
|||||||
v-for="(button, i) in dialogData.buttons">
|
v-for="(button, i) in dialogData.buttons">
|
||||||
<button
|
<button
|
||||||
:class="['button-c', 'button-' + button.type]"
|
:class="['button-c', 'button-' + button.type]"
|
||||||
@click="button.function(id, button.data)">
|
@click="LocalFunction(button.function, id, button.data)">
|
||||||
{{ button.label }}
|
{{ button.label }}
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
@ -60,7 +60,13 @@
|
|||||||
const CreateData = () => {
|
const CreateData = () => {
|
||||||
Object.assign(localData, props.dialogData)
|
Object.assign(localData, props.dialogData)
|
||||||
}
|
}
|
||||||
|
const LocalFunction = (
|
||||||
|
fun: Function | undefined,
|
||||||
|
id: string | number,
|
||||||
|
data: Record<string, any>
|
||||||
|
) => {
|
||||||
|
if (fun !== undefined) fun(id, data)
|
||||||
|
}
|
||||||
const CloseDialog = () => {
|
const CloseDialog = () => {
|
||||||
delete dialogStore.dialogs[props.id]
|
delete dialogStore.dialogs[props.id]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,8 @@ import axios from 'axios'
|
|||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
import router from '@/router'
|
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.timeout = 2000;
|
||||||
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
|
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
|||||||
@ -120,7 +120,7 @@
|
|||||||
{
|
{
|
||||||
label: 'Popup Sil',
|
label: 'Popup Sil',
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
function: DeleteRow(data.id)
|
function: () => DeleteRow(data.id)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@ -168,9 +168,7 @@
|
|||||||
panel.value = true
|
panel.value = true
|
||||||
}
|
}
|
||||||
const updateAction = (row: any) => {
|
const updateAction = (row: any) => {
|
||||||
panelPopup.value = popups.value.find((x) => x.id == row.id) || {}
|
Object.assign(panelPopup.value,row)
|
||||||
|
|
||||||
console.log("panelPopup",panelPopup.value)
|
|
||||||
panel.value = true
|
panel.value = true
|
||||||
isUpdate.value = true
|
isUpdate.value = true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
{
|
{
|
||||||
label: 'Sil',
|
label: 'Sil',
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
function: DeleteRow(data.id)
|
function: () => DeleteRow(data.id)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@ -64,7 +64,7 @@
|
|||||||
{
|
{
|
||||||
text: 'Sil',
|
text: 'Sil',
|
||||||
class: 'alert',
|
class: 'alert',
|
||||||
action: DeleteRowPop
|
action: () => DeleteRowPop
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@ -50,6 +50,9 @@
|
|||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
import { useDialogStore } from '@/components/global/dialogStore'
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
|
||||||
const dialogStore = useDialogStore()
|
const dialogStore = useDialogStore()
|
||||||
|
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
@ -73,7 +76,11 @@
|
|||||||
{
|
{
|
||||||
name: 'resimUrl',
|
name: 'resimUrl',
|
||||||
title: 'Resim Url',
|
title: 'Resim Url',
|
||||||
sort: true
|
computeHtml: (v: Record<string, any>) => {
|
||||||
|
if (v.resimUrl !== null && v.resimUrl !== undefined) {
|
||||||
|
return globalStore.TableCellDocument(v.resimUrl)
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'url',
|
name: 'url',
|
||||||
@ -92,7 +99,7 @@
|
|||||||
{
|
{
|
||||||
label: 'Slider Sil',
|
label: 'Slider Sil',
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
function: DeleteRow(data.id)
|
function: () => DeleteRow(data.id)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user