listelere ve tablar ileri-geri gidildiğinde kaldığı yere dönüyor.
This commit is contained in:
@ -138,7 +138,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<data-table-pagination
|
<data-table-pagination
|
||||||
v-if="pagination !== undefined && showPagination && !isPreview"
|
v-if="pagination !== undefined && showPagination && !isPreview"
|
||||||
v-model:pagination="localPagination" />
|
v-model:pagination="localPagination"
|
||||||
|
:isUseRoute="isUseRoute" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed, watch } from 'vue'
|
import { ref, reactive, computed, watch } from 'vue'
|
||||||
@ -146,6 +147,9 @@
|
|||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
import icourl from '@/assets/images/icons.svg'
|
import icourl from '@/assets/images/icons.svg'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
interface ITableHead {
|
interface ITableHead {
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
@ -178,12 +182,14 @@
|
|||||||
rowActions?: Record<string, any>[]
|
rowActions?: Record<string, any>[]
|
||||||
actionFixed?: boolean
|
actionFixed?: boolean
|
||||||
rowActionStyle?: string
|
rowActionStyle?: string
|
||||||
|
isUseRoute?: boolean
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
tableData: () => [],
|
tableData: () => [],
|
||||||
rowNumber: false,
|
rowNumber: false,
|
||||||
isPreview: false,
|
isPreview: false,
|
||||||
actionFixed: false
|
actionFixed: false,
|
||||||
|
isUseRoute: false
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:sortData', 'update:pagination'])
|
const emit = defineEmits(['update:sortData', 'update:pagination'])
|
||||||
@ -254,9 +260,19 @@
|
|||||||
localSort.value.sortColumn = d.name
|
localSort.value.sortColumn = d.name
|
||||||
localSort.value.sortOrder = 'desc'
|
localSort.value.sortOrder = 'desc'
|
||||||
}
|
}
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
router.push({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
sortColumn: localSort.value.sortColumn,
|
||||||
|
sortOrder: localSort.value.sortOrder
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
emit('update:sortData', localSort.value)
|
emit('update:sortData', localSort.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const CellData = (d: Record<string, any>, key: string): any => {
|
const CellData = (d: Record<string, any>, key: string): any => {
|
||||||
if (d[key] === null) return d
|
if (d[key] === null) return d
|
||||||
else return d[key]
|
else return d[key]
|
||||||
|
|||||||
@ -29,10 +29,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, onBeforeMount, watch } from 'vue'
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
const validationStore = useValidationStore()
|
const validationStore = useValidationStore()
|
||||||
@ -45,9 +48,11 @@
|
|||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
pagination: IPagination
|
pagination: IPagination
|
||||||
|
isUseRoute?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
isUseRoute: false
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:pagination'])
|
const emit = defineEmits(['update:pagination'])
|
||||||
@ -66,6 +71,14 @@
|
|||||||
if (Number(pageNumber.value) < totalPage()) pageNumber.value++
|
if (Number(pageNumber.value) < totalPage()) pageNumber.value++
|
||||||
}
|
}
|
||||||
localPagination.value.pageNumber = pageNumber.value
|
localPagination.value.pageNumber = pageNumber.value
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
router.push({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
pageNumber: pageNumber.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
emit('update:pagination', localPagination.value)
|
emit('update:pagination', localPagination.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +89,7 @@
|
|||||||
(e.target as HTMLInputElement).value = String(totalPage())
|
(e.target as HTMLInputElement).value = String(totalPage())
|
||||||
pageNumber.value = Number((e.target as HTMLInputElement).value)
|
pageNumber.value = Number((e.target as HTMLInputElement).value)
|
||||||
|
|
||||||
if((e as KeyboardEvent).key === 'Enter') getPage()
|
if ((e as KeyboardEvent).key === 'Enter') getPage()
|
||||||
}
|
}
|
||||||
const PageNumberFocus = (e: Event) => {
|
const PageNumberFocus = (e: Event) => {
|
||||||
;(e.target as HTMLInputElement).select()
|
;(e.target as HTMLInputElement).select()
|
||||||
@ -85,4 +98,22 @@
|
|||||||
localPagination.value.pageNumber = pageNumber.value
|
localPagination.value.pageNumber = pageNumber.value
|
||||||
emit('update:pagination', localPagination.value)
|
emit('update:pagination', localPagination.value)
|
||||||
}
|
}
|
||||||
|
const SetPageNumber = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
if (route.query.pageNumber !== undefined && route.query.pageNumber !== '') {
|
||||||
|
localPagination.value.pageNumber = pageNumber.value = Number(
|
||||||
|
route.query.pageNumber
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onBeforeMount(() => {
|
||||||
|
SetPageNumber()
|
||||||
|
})
|
||||||
|
watch(
|
||||||
|
() => route.query.pageNumber,
|
||||||
|
() => {
|
||||||
|
SetPageNumber()
|
||||||
|
}
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -142,7 +142,7 @@
|
|||||||
multipleText: 'Tümü'
|
multipleText: 'Tümü'
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'change','clear'])
|
const emit = defineEmits(['update:modelValue', 'change', 'clear'])
|
||||||
|
|
||||||
const activated = ref<Boolean>(false)
|
const activated = ref<Boolean>(false)
|
||||||
const multipleAllSelected = ref<boolean>(false)
|
const multipleAllSelected = ref<boolean>(false)
|
||||||
@ -214,9 +214,8 @@
|
|||||||
} else {
|
} else {
|
||||||
let text = props.listData.filter((v: Record<string, any>) => {
|
let text = props.listData.filter((v: Record<string, any>) => {
|
||||||
let val = props.listVal !== undefined ? v[props.listVal] : v
|
let val = props.listVal !== undefined ? v[props.listVal] : v
|
||||||
return localValue.value === val
|
return String(localValue.value) === String(val)
|
||||||
})[0]
|
})[0]
|
||||||
|
|
||||||
return text !== undefined
|
return text !== undefined
|
||||||
? props.listText !== undefined
|
? props.listText !== undefined
|
||||||
? text[props.listText]
|
? text[props.listText]
|
||||||
@ -357,7 +356,7 @@
|
|||||||
|
|
||||||
const SetSelectedOption = () => {
|
const SetSelectedOption = () => {
|
||||||
selectedOption.value = props.listData.filter((v: Record<string, any>) => {
|
selectedOption.value = props.listData.filter((v: Record<string, any>) => {
|
||||||
return v[props.listVal as string] === props.modelValue
|
return String(v[props.listVal as string]) === String(props.modelValue)
|
||||||
})[0]
|
})[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -120,13 +120,17 @@
|
|||||||
:isPreview="isPreview"
|
:isPreview="isPreview"
|
||||||
:rowActions="rowActions"
|
:rowActions="rowActions"
|
||||||
:actionFixed="actionFixed"
|
:actionFixed="actionFixed"
|
||||||
:rowActionStyle="rowActionStyle" />
|
:rowActionStyle="rowActionStyle"
|
||||||
|
:isUseRoute="isUseRoute" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<panel-wrapper v-if="filterPanel" v-model="filterPanel" :panel-title="'Filtreleme'">
|
<panel-wrapper v-if="filterPanel" v-model="filterPanel" :panel-title="'Filtreleme'">
|
||||||
<template #panelContent>
|
<template #panelContent>
|
||||||
<panel-filter :filterHead="tableHeader" v-model:filterParams="localFilterParams" />
|
<panel-filter
|
||||||
|
:filterHead="tableHeader"
|
||||||
|
v-model:filterParams="localFilterParams"
|
||||||
|
:isUseRoute="isUseRoute" />
|
||||||
</template>
|
</template>
|
||||||
<template #footerButton>
|
<template #footerButton>
|
||||||
<div class="button-c button-save" @click="FilterData">Filtrele</div>
|
<div class="button-c button-save" @click="FilterData">Filtrele</div>
|
||||||
@ -140,8 +144,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount, watch, computed } from 'vue'
|
import { ref, reactive, onBeforeMount, watch, computed, nextTick } from 'vue'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
@ -200,7 +207,8 @@
|
|||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
rowActions?: Record<string, any>[]
|
rowActions?: Record<string, any>[]
|
||||||
actionFixed?: boolean
|
actionFixed?: boolean
|
||||||
rowActionStyle?:string
|
rowActionStyle?: string
|
||||||
|
isUseRoute?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
@ -213,7 +221,8 @@
|
|||||||
search: true,
|
search: true,
|
||||||
rowNumber: false,
|
rowNumber: false,
|
||||||
isPreview: false,
|
isPreview: false,
|
||||||
actionFixed:false
|
actionFixed: false,
|
||||||
|
isUseRoute: false
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
@ -238,6 +247,7 @@
|
|||||||
const localPagination = ref<IPagination>({} as IPagination)
|
const localPagination = ref<IPagination>({} as IPagination)
|
||||||
const localTotalValues = reactive<Record<string, any>>({})
|
const localTotalValues = reactive<Record<string, any>>({})
|
||||||
const searchFieldPos = ref<string>('')
|
const searchFieldPos = ref<string>('')
|
||||||
|
const localLoaded = ref<boolean>(false)
|
||||||
|
|
||||||
if (props.totalValues !== undefined) Object.assign(localTotalValues, props.totalValues)
|
if (props.totalValues !== undefined) Object.assign(localTotalValues, props.totalValues)
|
||||||
|
|
||||||
@ -265,8 +275,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const FilterData = async () => {
|
const FilterData = async () => {
|
||||||
|
Object.keys(filterParams).forEach((k) => {
|
||||||
|
delete filterParams[k]
|
||||||
|
})
|
||||||
Object.assign(filterParams, localFilterParams.value)
|
Object.assign(filterParams, localFilterParams.value)
|
||||||
EqualObjects(filterParams, localFilterParams.value)
|
EqualObjects(filterParams, localFilterParams.value)
|
||||||
|
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
Object.keys(route.query).forEach((k) => {
|
||||||
|
if (k.includes('Filters[')) delete route.query[k]
|
||||||
|
})
|
||||||
|
const q = {
|
||||||
|
query: {
|
||||||
|
...route.query
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Object.keys(filterParams).forEach((f, k) => {
|
||||||
|
q.query['Filters[' + f + ']'] = filterParams[f].op + filterParams[f].val
|
||||||
|
})
|
||||||
|
router.push(q)
|
||||||
|
}
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await GetLocalData()
|
await GetLocalData()
|
||||||
filterPanel.value = false
|
filterPanel.value = false
|
||||||
@ -289,6 +317,11 @@
|
|||||||
const RemoveFilterKey = (k: string) => {
|
const RemoveFilterKey = (k: string) => {
|
||||||
delete localFilterParams.value[k]
|
delete localFilterParams.value[k]
|
||||||
delete filterParams[k]
|
delete filterParams[k]
|
||||||
|
const query: Record<string, any> = { ...route.query }
|
||||||
|
Object.keys(query).forEach((q) => {
|
||||||
|
if (q.includes(k)) delete query[q]
|
||||||
|
})
|
||||||
|
router.push({ query: query })
|
||||||
GetLocalData()
|
GetLocalData()
|
||||||
}
|
}
|
||||||
const RemoveSearch = () => {
|
const RemoveSearch = () => {
|
||||||
@ -296,8 +329,127 @@
|
|||||||
searched.value = false
|
searched.value = false
|
||||||
GetLocalData()
|
GetLocalData()
|
||||||
}
|
}
|
||||||
|
const pageNumberChanging = ref<boolean>(false)
|
||||||
|
const sortChanging = ref<boolean>(false)
|
||||||
|
const searchChanging = ref<boolean>(false)
|
||||||
|
const filterChanging = ref<boolean>(false)
|
||||||
|
|
||||||
|
const RoutePageControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
const q = { ...route.query }
|
||||||
|
pageNumberChanging.value = true
|
||||||
|
|
||||||
|
if (q.pageNumber !== undefined && q.pageNumber !== '') {
|
||||||
|
localPagination.value.pageNumber = Number(q.pageNumber)
|
||||||
|
} else {
|
||||||
|
q.pageNumber = String(1)
|
||||||
|
localPagination.value.pageNumber = localPagination.value.pageNumber || 1
|
||||||
|
}
|
||||||
|
|
||||||
|
router.push({ query: q })
|
||||||
|
nextTick(() => {
|
||||||
|
pageNumberChanging.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const RouteSortControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
const q = { ...route.query }
|
||||||
|
sortChanging.value = true
|
||||||
|
if (q.sortOrder !== undefined && q.sortOrder !== null && q.sortOrder !== '') {
|
||||||
|
localSort.value.sortColumn = q.sortColumn as string
|
||||||
|
localSort.value.sortOrder = q.sortOrder as string
|
||||||
|
} else {
|
||||||
|
delete q.sortOrder
|
||||||
|
delete q.sortColumn
|
||||||
|
delete localSort.value.sortColumn
|
||||||
|
delete localSort.value.sortOrder
|
||||||
|
}
|
||||||
|
router.push({ query: q })
|
||||||
|
nextTick(() => {
|
||||||
|
sortChanging.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const RouteSearchControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
const q = { ...route.query }
|
||||||
|
searchChanging.value = true
|
||||||
|
if (
|
||||||
|
q.searchString !== undefined &&
|
||||||
|
q.searchString !== null &&
|
||||||
|
q.searchString !== ''
|
||||||
|
) {
|
||||||
|
localQuery.value = q.searchString as string
|
||||||
|
} else {
|
||||||
|
localQuery.value = ''
|
||||||
|
delete q.searchString
|
||||||
|
}
|
||||||
|
router.push({ query: q })
|
||||||
|
nextTick(() => {
|
||||||
|
searchChanging.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const RouteFilterControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
const q = { ...route.query }
|
||||||
|
localFilterParams.value = {}
|
||||||
|
Object.keys(filterParams).forEach((k) => {
|
||||||
|
delete filterParams[k]
|
||||||
|
})
|
||||||
|
filterChanging.value = true
|
||||||
|
if (Object.keys(route.query).length > 0) {
|
||||||
|
Object.keys(route.query).forEach((key) => {
|
||||||
|
if (key.includes('Filters[')) {
|
||||||
|
const newKey = key.match(/(?<=\[)[^\]]+(?=\])/)![0]
|
||||||
|
filterParams[newKey] = {}
|
||||||
|
localFilterParams.value[newKey] = {}
|
||||||
|
|
||||||
|
filterParams[newKey].op = (route.query[key]! as string).charAt(0)
|
||||||
|
localFilterParams.value[newKey].op = (route.query[key]! as string).charAt(0)
|
||||||
|
|
||||||
|
filterParams[newKey].val = (route.query[key]! as string).slice(1)
|
||||||
|
localFilterParams.value[newKey].val = (route.query[key]! as string).slice(1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
props.tableHeader.forEach((head: Record<string, any>) => {
|
||||||
|
if (head.filter !== undefined) {
|
||||||
|
Object.keys(filterParams).forEach((key) => {
|
||||||
|
if (
|
||||||
|
(head.filter.filterId !== undefined && key === head.filter.filterId) ||
|
||||||
|
key === head.name
|
||||||
|
) {
|
||||||
|
filterParams[key].title = head.title
|
||||||
|
localFilterParams.value[key].title = head.title
|
||||||
|
if (
|
||||||
|
head.filter.type === 'select' &&
|
||||||
|
head.filter.data !== undefined &&
|
||||||
|
head.filter.data.length > 0
|
||||||
|
) {
|
||||||
|
const forText = head.filter.data.find((o: Record<string, any>) => {
|
||||||
|
return String(o[head.filter.listVal]) === String(filterParams[key].val)
|
||||||
|
})
|
||||||
|
filterParams[key].text = forText[head.filter.listText]
|
||||||
|
localFilterParams.value[key].text = forText[head.filter.listText]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
nextTick(() => {
|
||||||
|
filterChanging.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const GetLocalData = async () => {
|
const GetLocalData = async () => {
|
||||||
console.log("GetLocalData",selectedExport.value)
|
localLoaded.value = false
|
||||||
if (selectedExport.value !== null) {
|
if (selectedExport.value !== null) {
|
||||||
let exportUrl = ''
|
let exportUrl = ''
|
||||||
let fileType = ''
|
let fileType = ''
|
||||||
@ -316,8 +468,6 @@
|
|||||||
fileName = 'export.xlsx'
|
fileName = 'export.xlsx'
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("dataStore",dataStore)
|
|
||||||
|
|
||||||
// Axios ile dosya indirme - interceptor otomatik olarak token ekleyecek
|
// Axios ile dosya indirme - interceptor otomatik olarak token ekleyecek
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(exportUrl, {
|
const response = await axios.get(exportUrl, {
|
||||||
@ -392,6 +542,9 @@
|
|||||||
}
|
}
|
||||||
emit('update:refresh', false)
|
emit('update:refresh', false)
|
||||||
}
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
localLoaded.value = true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const OpenMobileButtons = () => {
|
const OpenMobileButtons = () => {
|
||||||
searchForm.value = false
|
searchForm.value = false
|
||||||
@ -422,6 +575,14 @@
|
|||||||
const SearchQuery = () => {
|
const SearchQuery = () => {
|
||||||
if (props.apiList !== undefined) GetLocalData()
|
if (props.apiList !== undefined) GetLocalData()
|
||||||
else emit('update:query', localQuery.value)
|
else emit('update:query', localQuery.value)
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
router.push({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
searchString: localQuery.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
searchForm.value = false
|
searchForm.value = false
|
||||||
searched.value = true
|
searched.value = true
|
||||||
}
|
}
|
||||||
@ -432,6 +593,10 @@
|
|||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
|
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
|
||||||
mobileButtons.value = true
|
mobileButtons.value = true
|
||||||
|
RoutePageControl()
|
||||||
|
RouteSortControl()
|
||||||
|
RouteSearchControl()
|
||||||
|
RouteFilterControl()
|
||||||
|
|
||||||
if (props.apiList !== undefined) GetLocalData()
|
if (props.apiList !== undefined) GetLocalData()
|
||||||
|
|
||||||
@ -439,18 +604,38 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => localSort.value,
|
() => [localSort.value],
|
||||||
() => {
|
() => {
|
||||||
|
if (!sortChanging.value) GetLocalData()
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
)
|
||||||
|
watch(
|
||||||
|
() => [route],
|
||||||
|
() => {
|
||||||
|
RoutePageControl()
|
||||||
|
RouteSortControl()
|
||||||
|
RouteSearchControl()
|
||||||
|
RouteFilterControl()
|
||||||
GetLocalData()
|
GetLocalData()
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => localPagination.value.pageNumber,
|
() => localPagination.value.pageNumber,
|
||||||
() => {
|
() => {
|
||||||
|
if (!pageNumberChanging.value) {
|
||||||
GetLocalData()
|
GetLocalData()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
watch(
|
||||||
|
() => localPagination.value.pageNumber,
|
||||||
|
() => {
|
||||||
|
if (!pageNumberChanging.value) {
|
||||||
|
GetLocalData()
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
watch(
|
watch(
|
||||||
() => props.refresh,
|
() => props.refresh,
|
||||||
@ -461,8 +646,9 @@
|
|||||||
watch(
|
watch(
|
||||||
() => localQuery.value,
|
() => localQuery.value,
|
||||||
() => {
|
() => {
|
||||||
if (props.apiList !== undefined && localQuery.value.length === 0) GetLocalData()
|
if (props.apiList !== undefined && localQuery.value.length === 0) {
|
||||||
else if (localQuery.value.length === 0) emit('update:query', localQuery.value)
|
if (!searchChanging.value) GetLocalData()
|
||||||
|
} else if (localQuery.value.length === 0) emit('update:query', localQuery.value)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
:listVal="filter.filter.listVal"
|
:listVal="filter.filter.listVal"
|
||||||
:extraData="filter"
|
:extraData="filter"
|
||||||
:label="filter.title"
|
:label="filter.title"
|
||||||
v-model="localFilterData[filter.filter.filterId || filter.name]"
|
v-model="localFilterData[filter.filter.filterId || filter.name] as number"
|
||||||
@change="UpdateFilterSelect"
|
@change="UpdateFilterSelect"
|
||||||
clearable />
|
clearable />
|
||||||
</div>
|
</div>
|
||||||
@ -58,11 +58,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount } from 'vue'
|
import { ref, reactive, onBeforeMount, nextTick } from 'vue'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
filterHead: Record<string, any>
|
filterHead: Record<string, any>
|
||||||
filterParams: Record<string, any>
|
filterParams: Record<string, any>
|
||||||
|
isUseRoute?: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits(['update:filterParams'])
|
const emit = defineEmits(['update:filterParams'])
|
||||||
@ -117,6 +121,7 @@
|
|||||||
}
|
}
|
||||||
emit('update:filterParams', localFilterParams)
|
emit('update:filterParams', localFilterParams)
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
createFilterData()
|
createFilterData()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -46,10 +46,10 @@
|
|||||||
}
|
}
|
||||||
export interface Props {
|
export interface Props {
|
||||||
tabList: TabObj[]
|
tabList: TabObj[]
|
||||||
route?: boolean
|
isUseRoute?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), { route: false })
|
const props = withDefaults(defineProps<Props>(), { isUseRoute: false })
|
||||||
|
|
||||||
const currentTab = ref<number>(0)
|
const currentTab = ref<number>(0)
|
||||||
const rnd = ref<number>(Math.ceil(Number(Math.random() * 1000000000)))
|
const rnd = ref<number>(Math.ceil(Number(Math.random() * 1000000000)))
|
||||||
@ -84,7 +84,7 @@
|
|||||||
} else {
|
} else {
|
||||||
currentTab.value = Number(d)
|
currentTab.value = Number(d)
|
||||||
}
|
}
|
||||||
if (props.route) {
|
if (props.isUseRoute) {
|
||||||
router.push({
|
router.push({
|
||||||
params: { ...route.params, tabid: props.tabList[currentTab.value].id }
|
params: { ...route.params, tabid: props.tabList[currentTab.value].id }
|
||||||
})
|
})
|
||||||
@ -107,7 +107,7 @@
|
|||||||
CalculateNavPosition()
|
CalculateNavPosition()
|
||||||
}
|
}
|
||||||
const RouteTabControl = () => {
|
const RouteTabControl = () => {
|
||||||
if (props.route) {
|
if (props.isUseRoute) {
|
||||||
if (route.params.tabid !== undefined && route.params.tabid !== '') {
|
if (route.params.tabid !== undefined && route.params.tabid !== '') {
|
||||||
currentTab.value = props.tabList.findIndex((t) => t.id === route.params.tabid)
|
currentTab.value = props.tabList.findIndex((t) => t.id === route.params.tabid)
|
||||||
}
|
}
|
||||||
@ -129,7 +129,6 @@
|
|||||||
watch(
|
watch(
|
||||||
() => route.params.tabid,
|
() => route.params.tabid,
|
||||||
(t) => {
|
(t) => {
|
||||||
console.log('---')
|
|
||||||
RouteTabControl()
|
RouteTabControl()
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
:rowAction="OpenUser"
|
:rowAction="OpenUser"
|
||||||
:apiList="'Katilimci/ByCekilisId/' + piyangoStore.selectedLottery"
|
:apiList="'Katilimci/ByCekilisId/' + piyangoStore.selectedLottery"
|
||||||
v-model:pagination="paginationData"
|
v-model:pagination="paginationData"
|
||||||
v-model:refresh="piyangoKatilimciStore.refreshPiyangoKatilimciList">
|
v-model:refresh="piyangoKatilimciStore.refreshPiyangoKatilimciList"
|
||||||
|
isUseRoute>
|
||||||
<template #extraButtons>
|
<template #extraButtons>
|
||||||
<button
|
<button
|
||||||
class="button-c"
|
class="button-c"
|
||||||
@ -117,14 +118,9 @@
|
|||||||
import PanelKatilimciDocument from '@/module/cekilisler/components/panel/PanelKatilimciDocument.vue'
|
import PanelKatilimciDocument from '@/module/cekilisler/components/panel/PanelKatilimciDocument.vue'
|
||||||
import PanelPiyangoKatilimci from '@/module/cekilisler/components/panel/PanelPiyangoKatilimci.vue'
|
import PanelPiyangoKatilimci from '@/module/cekilisler/components/panel/PanelPiyangoKatilimci.vue'
|
||||||
|
|
||||||
import { useDateStore } from '@/stores/dateStore'
|
|
||||||
|
|
||||||
const dateStore = useDateStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
import { usePiyangoStore } from '../stores/piyangoStore'
|
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
listText="Talihli"
|
listText="Talihli"
|
||||||
:apiList="'Katilimci/AsilYedek/' + piyangoStore.selectedLottery"
|
:apiList="'Katilimci/AsilYedek/' + piyangoStore.selectedLottery"
|
||||||
v-model:refresh='refreshList'
|
v-model:refresh='refreshList'
|
||||||
|
isUseRoute
|
||||||
>
|
>
|
||||||
<template #extraButtons>
|
<template #extraButtons>
|
||||||
<a href='/data/ornek-talihli-listesi.xlsx' target='_blank' class='button-c' v-if='piyangoStore.lotteryData.cekilisYontemi =="Fiziksel"'>
|
<a href='/data/ornek-talihli-listesi.xlsx' target='_blank' class='button-c' v-if='piyangoStore.lotteryData.cekilisYontemi =="Fiziksel"'>
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
:apiList="
|
:apiList="
|
||||||
'TeminantStates/GetTeminantStateCekilisList/' + piyangoStore.selectedLottery
|
'TeminantStates/GetTeminantStateCekilisList/' + piyangoStore.selectedLottery
|
||||||
"
|
"
|
||||||
v-model:refresh="piyangoTeminatStore.refreshList" />
|
v-model:refresh="piyangoTeminatStore.refreshList"
|
||||||
|
isUseRoute/>
|
||||||
</section>
|
</section>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
wide
|
wide
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Piyango Detay" go="/piyangolar/piyango-listesi" />
|
<Breadcrumb currentPageText="Piyango Detay" go="/piyangolar/piyango-listesi" />
|
||||||
<tabs :tabList="tabList" v-if="loaded" route>
|
<tabs :tabList="tabList" v-if="loaded" isUseRoute>
|
||||||
<template #piyango-bilgileri>
|
<template #piyango-bilgileri>
|
||||||
<tab-piyango-bilgileri-display
|
<tab-piyango-bilgileri-display
|
||||||
v-if="
|
v-if="
|
||||||
|
|||||||
@ -17,7 +17,8 @@
|
|||||||
listText="Piyango"
|
listText="Piyango"
|
||||||
:addRoute="addApiControl"
|
:addRoute="addApiControl"
|
||||||
:apiList="apiList"
|
:apiList="apiList"
|
||||||
apiText="Piyango Listesi" />
|
apiText="Piyango Listesi"
|
||||||
|
isUseRoute/>
|
||||||
</section>
|
</section>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
title="Piyangolar"
|
title="Piyangolar"
|
||||||
listText="Piyango"
|
listText="Piyango"
|
||||||
:apiList="apiList"
|
:apiList="apiList"
|
||||||
apiText="Piyango Listesi" />
|
apiText="Piyango Listesi"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import kullaniciAyarlari from './kullanici-ayarlari'
|
|||||||
|
|
||||||
export default [
|
export default [
|
||||||
kullanciYeni,
|
kullanciYeni,
|
||||||
kullaniciDetay,
|
...kullaniciDetay,
|
||||||
kullaniciListesi,
|
kullaniciListesi,
|
||||||
kullaniciRolleri,
|
kullaniciRolleri,
|
||||||
kullaniciAyarlari
|
kullaniciAyarlari
|
||||||
|
|||||||
@ -1,10 +1,19 @@
|
|||||||
import KullaniciDetay from '@/module/kullanicilar/views/KullaniciDetay.vue'
|
import KullaniciDetay from '@/module/kullanicilar/views/KullaniciDetay.vue'
|
||||||
|
|
||||||
export default {
|
export default [
|
||||||
|
{
|
||||||
path: '/kullanicilar/detay/:kullaniciId',
|
path: '/kullanicilar/detay/:kullaniciId',
|
||||||
|
redirect: (to: Record<string, any>) => ({
|
||||||
|
name: 'PiyangoDetay',
|
||||||
|
params: { kullaniciId: to.params.kullaniciId, tabid: 'kullanici-bilgileri' }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/kullanicilar/detay/:kullaniciId/:tabid',
|
||||||
name: 'KullaniciDetay',
|
name: 'KullaniciDetay',
|
||||||
component: KullaniciDetay,
|
component: KullaniciDetay,
|
||||||
meta: {
|
meta: {
|
||||||
authRequired: true
|
authRequired: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Kullanıcı Detay" go="/kullanicilar/kullanici-liste"/>
|
<Breadcrumb currentPageText="Kullanıcı Detay" go="/kullanicilar/kullanici-liste"/>
|
||||||
<tabs :tabList="tabList">
|
<tabs :tabList="tabList" isUseRoute>
|
||||||
<template #kullanicibilgileri>
|
<template #kullanici-bilgileri>
|
||||||
<tab-kullanici-bilgileri />
|
<tab-kullanici-bilgileri />
|
||||||
</template>
|
</template>
|
||||||
<template #yetkilioldugupiyangolar>
|
<template #yetkili-oldugu-piyangolar>
|
||||||
<tab-kullanici-yetkili-piyangolar />
|
<tab-kullanici-yetkili-piyangolar />
|
||||||
</template>
|
</template>
|
||||||
<template #kullaniciloglari>
|
<template #kullanici-loglari>
|
||||||
<tab-kullanici-loglari />
|
<tab-kullanici-loglari />
|
||||||
</template>
|
</template>
|
||||||
</tabs>
|
</tabs>
|
||||||
@ -28,8 +28,8 @@
|
|||||||
if (globalStore.selUser === 0) globalStore.selUser = Number(route.params.kullaniciId)
|
if (globalStore.selUser === 0) globalStore.selUser = Number(route.params.kullaniciId)
|
||||||
|
|
||||||
const tabList = ref<Record<string, any>[]>([
|
const tabList = ref<Record<string, any>[]>([
|
||||||
{ text: 'Kullanıcı Bilgileri', id: 'kullanicibilgileri' },
|
{ text: 'Kullanıcı Bilgileri', id: 'kullanici-bilgileri' },
|
||||||
{ text: 'Yetkili Olduğu Piyangolar', id: 'yetkilioldugupiyangolar' },
|
{ text: 'Yetkili Olduğu Piyangolar', id: 'yetkili-oldugu-piyangolar' },
|
||||||
{ text: 'Kullanıcı Logları', id: 'kullaniciloglari' }
|
{ text: 'Kullanıcı Logları', id: 'kullanici-loglari' }
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -11,7 +11,8 @@
|
|||||||
listText="Kullanıcı"
|
listText="Kullanıcı"
|
||||||
addRoute="yeni-kullanici"
|
addRoute="yeni-kullanici"
|
||||||
apiList="Auth/kullaniciList"
|
apiList="Auth/kullaniciList"
|
||||||
apiText="Kullanıcı Listesi" />
|
apiText="Kullanıcı Listesi"
|
||||||
|
isUseRoute/>
|
||||||
</section>
|
</section>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
@ -88,7 +89,7 @@
|
|||||||
])
|
])
|
||||||
const rwAction = (row: any) => {
|
const rwAction = (row: any) => {
|
||||||
globalStore.selUser = row.id
|
globalStore.selUser = row.id
|
||||||
router.push('detay/' + row.id)
|
router.push('detay/' + row.id+'/kullanici-bilgileri')
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import izinBedelOrani from './izin-bedel-orani'
|
|||||||
|
|
||||||
export default [
|
export default [
|
||||||
muhasebePiyangoListesi,
|
muhasebePiyangoListesi,
|
||||||
muhasebePiyangoDetay,
|
...muhasebePiyangoDetay,
|
||||||
muhasebeAyarlar,
|
muhasebeAyarlar,
|
||||||
izinBedelOrani,
|
izinBedelOrani,
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,10 +1,19 @@
|
|||||||
import MuhasebePiyangoDetay from '../views/MuhasebePiyangoDetay.vue'
|
import MuhasebePiyangoDetay from '../views/MuhasebePiyangoDetay.vue'
|
||||||
|
|
||||||
export default {
|
export default [
|
||||||
|
{
|
||||||
path: '/muhasebe/piyango-detay/:piyangoId',
|
path: '/muhasebe/piyango-detay/:piyangoId',
|
||||||
|
redirect: (to:Record<string,any>) => ({
|
||||||
|
name: 'MuhasebePiyangoDetay',
|
||||||
|
params: { piyangoId: to.params.piyangoId, tabid: 'piyango-bilgileri' }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/muhasebe/piyango-detay/:piyangoId/:tabid',
|
||||||
name: 'MuhasebePiyangoDetay',
|
name: 'MuhasebePiyangoDetay',
|
||||||
component: MuhasebePiyangoDetay,
|
component: MuhasebePiyangoDetay,
|
||||||
meta: {
|
meta: {
|
||||||
authRequired: true
|
authRequired: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Muhasebe / Piyango Detay" go="/muhasebe/piyango-listesi"/>
|
<Breadcrumb currentPageText="Muhasebe / Piyango Detay" go="/muhasebe/piyango-listesi"/>
|
||||||
<tabs :tabList="tabList" v-if="loaded">
|
<tabs :tabList="tabList" v-if="loaded" isUseRoute>
|
||||||
<template #piyangobilgileri>
|
<template #piyango-bilgileri>
|
||||||
<tab-muhasebe-piyango-bilgileri-display />
|
<tab-muhasebe-piyango-bilgileri-display />
|
||||||
</template>
|
</template>
|
||||||
</tabs>
|
</tabs>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
const tabList = ref<Record<string, any>[]>([
|
const tabList = ref<Record<string, any>[]>([
|
||||||
{ text: 'Piyango Bilgileri', id: 'piyangobilgileri' }
|
{ text: 'Piyango Bilgileri', id: 'piyango-bilgileri' }
|
||||||
])
|
])
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Muhasebe / Piyango Listesi" go="/"/>
|
<Breadcrumb currentPageText="Muhasebe / Piyango Listesi" go="/" />
|
||||||
<section class="section-list">
|
<section class="section-list">
|
||||||
<list-table-content
|
<list-table-content
|
||||||
v-if="loaded"
|
v-if="loaded"
|
||||||
@ -10,7 +10,8 @@
|
|||||||
title="Piyangolar"
|
title="Piyangolar"
|
||||||
listText="Piyango"
|
listText="Piyango"
|
||||||
:apiList="'Cekilis/GetCekilislerListAtanan/' + usersStore.userId"
|
:apiList="'Cekilis/GetCekilislerListAtanan/' + usersStore.userId"
|
||||||
apiText="Piyango Listesi" />
|
apiText="Piyango Listesi"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
title="Sistem Günlüğü"
|
title="Sistem Günlüğü"
|
||||||
listText="Log"
|
listText="Log"
|
||||||
apiList="Auth/GetOperationLogs"
|
apiList="Auth/GetOperationLogs"
|
||||||
apiText="Sistem Günlüğü Listesi" />
|
apiText="Sistem Günlüğü Listesi"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
@ -26,19 +27,19 @@
|
|||||||
return dateStore.dateFormat({ date: v.timestamp })
|
return dateStore.dateFormat({ date: v.timestamp })
|
||||||
},
|
},
|
||||||
sort: true,
|
sort: true,
|
||||||
style:{width:'10%'}
|
style: { width: '10%' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'userName',
|
name: 'userName',
|
||||||
title: 'İşlemi yapan',
|
title: 'İşlemi yapan',
|
||||||
sort: true,
|
sort: true,
|
||||||
style:{width:'20%'}
|
style: { width: '20%' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'operationType',
|
name: 'operationType',
|
||||||
title: 'Bölüm',
|
title: 'Bölüm',
|
||||||
sort: true,
|
sort: true,
|
||||||
style:{width:'15%'}
|
style: { width: '15%' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'description',
|
name: 'description',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb current-page-text="Sayfa Listesi" go="/"/>
|
<Breadcrumb current-page-text="Sayfa Listesi" go="/" />
|
||||||
<section class="section-list">
|
<section class="section-list">
|
||||||
<list-table-content
|
<list-table-content
|
||||||
:tableHeader="tableHeader"
|
:tableHeader="tableHeader"
|
||||||
@ -13,7 +13,8 @@
|
|||||||
apiText="Sayfa Listesi"
|
apiText="Sayfa Listesi"
|
||||||
:refresh="refresh"
|
:refresh="refresh"
|
||||||
:rowActions="rowActions"
|
:rowActions="rowActions"
|
||||||
:rowActionStyle="'width:10%;'" />
|
:rowActionStyle="'width:10%;'"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -9,7 +9,8 @@
|
|||||||
listText="Piyango"
|
listText="Piyango"
|
||||||
:addRoute="PiyangoLink()"
|
:addRoute="PiyangoLink()"
|
||||||
:apiList="apiList"
|
:apiList="apiList"
|
||||||
apiText="Piyango Listesi" />
|
apiText="Piyango Listesi"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@ -8,14 +8,13 @@
|
|||||||
icon="draws"
|
icon="draws"
|
||||||
title="Yetkili Olduğu Kişi/Kurum"
|
title="Yetkili Olduğu Kişi/Kurum"
|
||||||
listText="Kayıt"
|
listText="Kayıt"
|
||||||
:apiList="'Auth/userbyuserChildList/' + usersStore.selectedUserId()" />
|
:apiList="'Auth/userbyuserChildList/' + usersStore.selectedUserId()"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onBeforeMount } from 'vue'
|
import { ref, computed, onBeforeMount } from 'vue'
|
||||||
|
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
|
||||||
const globalStore = useGlobalStore()
|
|
||||||
import { useGlobalDataStore } from '@/stores/globalDataStore'
|
import { useGlobalDataStore } from '@/stores/globalDataStore'
|
||||||
const globalDataStore = useGlobalDataStore()
|
const globalDataStore = useGlobalDataStore()
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
@ -82,7 +81,7 @@
|
|||||||
listText: 'baslik',
|
listText: 'baslik',
|
||||||
filterId: 'basvuruTipId'
|
filterId: 'basvuruTipId'
|
||||||
},
|
},
|
||||||
style:{width:'10%'}
|
style: { width: '10%' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'unvan',
|
name: 'unvan',
|
||||||
@ -125,7 +124,13 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
const rwAction = (row: any) => {
|
const rwAction = (row: any) => {
|
||||||
router.push('/uyeler/detay/' + UyeId() + '/yetkili-uye/detay/' + row.id)
|
router.push(
|
||||||
|
'/uyeler/detay/' +
|
||||||
|
UyeId() +
|
||||||
|
'/yetkili-uye/detay/' +
|
||||||
|
row.id +
|
||||||
|
'/kisi-kurum-bilgileri'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|||||||
@ -4,4 +4,4 @@ import UyeYetkiliYeni from '@/module/uyeler/routes/uye-yetkili-yeni'
|
|||||||
import UyeListe from '@/module/uyeler/routes/uye-liste'
|
import UyeListe from '@/module/uyeler/routes/uye-liste'
|
||||||
import UyeTipleri from '@/module/uyeler/routes/uye-tipleri'
|
import UyeTipleri from '@/module/uyeler/routes/uye-tipleri'
|
||||||
|
|
||||||
export default [UyeDetay,UyeYetkili,UyeYetkiliYeni, UyeListe, UyeTipleri]
|
export default [...UyeDetay,...UyeYetkili,UyeYetkiliYeni, UyeListe, UyeTipleri]
|
||||||
|
|||||||
@ -1,10 +1,18 @@
|
|||||||
import UyeDetay from '../views/UyeDetay.vue'
|
import UyeDetay from '../views/UyeDetay.vue'
|
||||||
|
|
||||||
export default {
|
export default [
|
||||||
path: '/uyeler/detay/:uyeId',
|
{
|
||||||
|
path: '/uyeler/detay/:uyeId',redirect: (to:Record<string,any>) => ({
|
||||||
|
name: 'UyeDetay',
|
||||||
|
params: { uyeId: to.params.uyeId, tabid: 'uye-bilgileri' }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/uyeler/detay/:uyeId/:tabid',
|
||||||
name: 'UyeDetay',
|
name: 'UyeDetay',
|
||||||
component: UyeDetay,
|
component: UyeDetay,
|
||||||
meta: {
|
meta: {
|
||||||
authRequired: true
|
authRequired: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|||||||
@ -1,10 +1,23 @@
|
|||||||
import UyeYetkili from '../views/UyeYetkili.vue'
|
import UyeYetkili from '../views/UyeYetkili.vue'
|
||||||
|
|
||||||
export default {
|
export default [
|
||||||
|
{
|
||||||
path: '/uyeler/detay/:uyeId/yetkili-uye/detay/:altUyeId',
|
path: '/uyeler/detay/:uyeId/yetkili-uye/detay/:altUyeId',
|
||||||
|
redirect: (to: Record<string, any>) => ({
|
||||||
|
name: 'UyeYetkiliDetay',
|
||||||
|
params: {
|
||||||
|
uyeId: to.params.uyeId,
|
||||||
|
altUyeId: to.params.altUyeId,
|
||||||
|
tabid: 'piyango-bilgileri'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/uyeler/detay/:uyeId/yetkili-uye/detay/:altUyeId/:tabid',
|
||||||
name: 'UyeYetkiliDetay',
|
name: 'UyeYetkiliDetay',
|
||||||
component: UyeYetkili,
|
component: UyeYetkili,
|
||||||
meta: {
|
meta: {
|
||||||
authRequired: true
|
authRequired: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|||||||
@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Üye Detay" go="/uyeler/uye-liste"/>
|
<Breadcrumb currentPageText="Üye Detay" go="/uyeler/uye-liste" />
|
||||||
<tabs :tabList="tabList">
|
<tabs :tabList="tabList" isUseRoute v-if="loaded">
|
||||||
<template #uyebilgileri>
|
<template #uye-bilgileri>
|
||||||
<tab-uye-bilgileri />
|
<tab-uye-bilgileri />
|
||||||
</template>
|
</template>
|
||||||
<template #yetkilikurum>
|
<template #yetkili-kurum>
|
||||||
<tab-uye-yetkili-oldugu-kisi-kurum />
|
<tab-uye-yetkili-oldugu-kisi-kurum />
|
||||||
</template>
|
</template>
|
||||||
<template #piyangolar>
|
<template #piyangolar>
|
||||||
<tab-uye-piyangolar />
|
<tab-uye-piyangolar />
|
||||||
</template>
|
</template>
|
||||||
<template #uyeloglari>
|
<template #uye-loglari>
|
||||||
<tab-uye-loglari />
|
<tab-uye-loglari />
|
||||||
</template>
|
</template>
|
||||||
<template #onaydurumu><tab-uye-onay-durumu /></template>
|
<template #onay-durumu><tab-uye-onay-durumu /></template>
|
||||||
</tabs>
|
</tabs>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
@ -36,10 +36,11 @@
|
|||||||
import TabUyeLoglari from '../components/TabUyeLoglari.vue'
|
import TabUyeLoglari from '../components/TabUyeLoglari.vue'
|
||||||
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
||||||
const tabList = ref<Record<string, any>[]>([])
|
const tabList = ref<Record<string, any>[]>([])
|
||||||
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
const CreateTabs = () => {
|
const CreateTabs = () => {
|
||||||
tabList.value = []
|
tabList.value = []
|
||||||
tabList.value.push({ text: 'Üye Bilgileri', id: 'uyebilgileri' })
|
tabList.value.push({ text: 'Üye Bilgileri', id: 'uye-bilgileri' })
|
||||||
if (
|
if (
|
||||||
usersStore.isPanelUser &&
|
usersStore.isPanelUser &&
|
||||||
route.name !== 'Profil' &&
|
route.name !== 'Profil' &&
|
||||||
@ -48,23 +49,26 @@
|
|||||||
let txt = usersStore.isPanelUser
|
let txt = usersStore.isPanelUser
|
||||||
? 'Yetkili Olduğu Kişi/Kurum'
|
? 'Yetkili Olduğu Kişi/Kurum'
|
||||||
: 'Yetkili Olduğum Kişi/Kurum'
|
: 'Yetkili Olduğum Kişi/Kurum'
|
||||||
tabList.value.push({ text: txt, id: 'yetkilikurum' })
|
tabList.value.push({ text: txt, id: 'yetkili-kurum' })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usersStore.isPanelUser && route.name !== 'Profil') {
|
if (usersStore.isPanelUser && route.name !== 'Profil') {
|
||||||
tabList.value.push(
|
tabList.value.push(
|
||||||
{ text: 'Piyangolar', id: 'piyangolar' },
|
{ text: 'Piyangolar', id: 'piyangolar' },
|
||||||
{ text: 'Üye Logları', id: 'uyeloglari' },
|
{ text: 'Üye Logları', id: 'uye-loglari' },
|
||||||
{ text: 'Onay Durumu', id: 'onaydurumu' }
|
{ text: 'Onay Durumu', id: 'onay-durumu' }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
usersStore.SetSelectedUser()
|
usersStore.SetSelectedUser()
|
||||||
let tip = await dataStore.dataGet('Auth/uyedurumkontrol/' + usersStore.selectedUserId())
|
let tip = await dataStore.dataGet(
|
||||||
|
'Auth/uyedurumkontrol/' + usersStore.selectedUserId()
|
||||||
|
)
|
||||||
usersStore.userApproveId = tip.userIslemtipi
|
usersStore.userApproveId = tip.userIslemtipi
|
||||||
|
|
||||||
CreateTabs()
|
CreateTabs()
|
||||||
|
loaded.value = true
|
||||||
})
|
})
|
||||||
onBeforeUpdate(() => {
|
onBeforeUpdate(() => {
|
||||||
CreateTabs()
|
CreateTabs()
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Yetkili Olunan Kişi/Kurum Detay" :go="'/uyeler/detay/'+route.params.uyeId"/>
|
<Breadcrumb
|
||||||
<tabs :tabList="tabList">
|
currentPageText="Yetkili Olunan Kişi/Kurum Detay"
|
||||||
<template #kisikurumbilgileri>
|
:go="'/uyeler/detay/' + route.params.uyeId + '/uye-bilgileri'" />
|
||||||
|
<tabs :tabList="tabList" isUseRoute v-if="loaded">
|
||||||
|
<template #kisi-kurum-bilgileri>
|
||||||
<tab-yetkili-uye-bilgileri />
|
<tab-yetkili-uye-bilgileri />
|
||||||
</template>
|
</template>
|
||||||
<template #onaydurumu>
|
<template #onay-durumu>
|
||||||
<tab-uye-onay-durumu v-if="usersStore.isPanelUser" />
|
<tab-uye-onay-durumu v-if="usersStore.isPanelUser" />
|
||||||
<tab-uye-onay-durumu-user v-else />
|
<tab-uye-onay-durumu-user v-else />
|
||||||
</template>
|
</template>
|
||||||
@ -26,10 +28,11 @@
|
|||||||
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
import TabUyeOnayDurumu from '../components/TabUyeOnayDurumu.vue'
|
||||||
import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue'
|
import TabUyeOnayDurumuUser from '../components/TabUyeOnayDurumuUser.vue'
|
||||||
|
|
||||||
|
const loaded = ref<boolean>(false)
|
||||||
const tabList = ref<Record<string, any>[]>([
|
const tabList = ref<Record<string, any>[]>([
|
||||||
{ text: 'Kişi/Kurum Bilgileri', id: 'kisikurumbilgileri' }
|
{ text: 'Kişi/Kurum Bilgileri', id: 'kisi-kurum-bilgileri' }
|
||||||
])
|
])
|
||||||
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' })
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
usersStore.SetSelectedUser()
|
usersStore.SetSelectedUser()
|
||||||
@ -38,5 +41,6 @@
|
|||||||
let tip = await dataStore.dataGet('Auth/uyedurumkontrol/' + route.params.altUyeId)
|
let tip = await dataStore.dataGet('Auth/uyedurumkontrol/' + route.params.altUyeId)
|
||||||
usersStore.userSubApproveId = tip.userIslemtipi
|
usersStore.userSubApproveId = tip.userIslemtipi
|
||||||
}
|
}
|
||||||
|
loaded.value = true
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb current-page-text="Üyeler Listesi" go="/"/>
|
<Breadcrumb current-page-text="Üyeler Listesi" go="/" />
|
||||||
<section class="section-list">
|
<section class="section-list">
|
||||||
<list-table-content
|
<list-table-content
|
||||||
v-if="loaded"
|
v-if="loaded"
|
||||||
@ -10,7 +10,8 @@
|
|||||||
title="Üyeler"
|
title="Üyeler"
|
||||||
listText="Üye"
|
listText="Üye"
|
||||||
apiList="Auth/UyelerList"
|
apiList="Auth/UyelerList"
|
||||||
apiText="Üye Listesi" />
|
apiText="Üye Listesi"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
@ -121,7 +122,7 @@
|
|||||||
])
|
])
|
||||||
const rwAction = (row: any) => {
|
const rwAction = (row: any) => {
|
||||||
if (usersStore.isPanelUser) globalStore.selCustomerType = row.basvuruTipId
|
if (usersStore.isPanelUser) globalStore.selCustomerType = row.basvuruTipId
|
||||||
router.push('detay/' + row.id)
|
router.push('detay/' + row.id+'/uye-bilgileri')
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export const useGlobalStore = defineStore('globalStore', () => {
|
|||||||
tablet: 992,
|
tablet: 992,
|
||||||
tabletp: 768
|
tabletp: 768
|
||||||
})
|
})
|
||||||
const perPage = ref<number>(25)
|
const perPage = ref<number>(10)
|
||||||
const selUser = ref<number>(0)
|
const selUser = ref<number>(0)
|
||||||
const selAuthUser = ref<number>(0)
|
const selAuthUser = ref<number>(0)
|
||||||
const selCustomer = ref<number>(0)
|
const selCustomer = ref<number>(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user