From 843db73d125c9f2e0e4f2d62ffa83ac47adfa531 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=8C=E1=85=B5=E1=86=AB=E1=84=80?=
=?UTF-8?q?=E1=85=B5?= <>
Date: Tue, 19 Nov 2024 16:01:42 +0900
Subject: [PATCH] =?UTF-8?q?=EC=8B=9C=EC=8A=A4=ED=85=9C=EA=B4=80=EB=A6=AC?=
=?UTF-8?q?=20>=20=EA=B6=8C=ED=95=9C=EA=B4=80=EB=A6=AC=20>=20=EC=82=AC?=
=?UTF-8?q?=EC=9D=B4=ED=8A=B8=EA=B4=80=EB=A6=AC=20=ED=99=94=EB=A9=B4?=
=?UTF-8?q?=EA=B3=BC=20API=20=EC=B6=94=EA=B0=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
nuxt/components/common/PermitButton.vue | 28 ++++
nuxt/components/data/Pagenation.vue | 41 +++++
nuxt/components/data/editor.vue | 32 ++++
nuxt/components/data/grid.vue | 136 +++++++++++++++++
nuxt/pages/admin/sys/site/index.vue | 192 ++++++++++++++++++++++++
nuxt/stores/login/index.ts | 7 +-
nuxt/stores/sys/site/index.ts | 34 +++++
nuxt/types/data/grid.ts | 50 ++++++
nuxt/types/data/pagination.ts | 6 +
nuxt/types/sys/site/index.ts | 13 ++
10 files changed, 538 insertions(+), 1 deletion(-)
create mode 100644 nuxt/components/common/PermitButton.vue
create mode 100644 nuxt/components/data/Pagenation.vue
create mode 100644 nuxt/components/data/editor.vue
create mode 100644 nuxt/components/data/grid.vue
create mode 100644 nuxt/pages/admin/sys/site/index.vue
create mode 100644 nuxt/stores/sys/site/index.ts
create mode 100644 nuxt/types/data/grid.ts
create mode 100644 nuxt/types/data/pagination.ts
create mode 100644 nuxt/types/sys/site/index.ts
diff --git a/nuxt/components/common/PermitButton.vue b/nuxt/components/common/PermitButton.vue
new file mode 100644
index 0000000..223470e
--- /dev/null
+++ b/nuxt/components/common/PermitButton.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
diff --git a/nuxt/components/data/Pagenation.vue b/nuxt/components/data/Pagenation.vue
new file mode 100644
index 0000000..ac467ee
--- /dev/null
+++ b/nuxt/components/data/Pagenation.vue
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
diff --git a/nuxt/components/data/editor.vue b/nuxt/components/data/editor.vue
new file mode 100644
index 0000000..e035c0f
--- /dev/null
+++ b/nuxt/components/data/editor.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
diff --git a/nuxt/components/data/grid.vue b/nuxt/components/data/grid.vue
new file mode 100644
index 0000000..dc11911
--- /dev/null
+++ b/nuxt/components/data/grid.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
diff --git a/nuxt/pages/admin/sys/site/index.vue b/nuxt/pages/admin/sys/site/index.vue
new file mode 100644
index 0000000..6b2f13e
--- /dev/null
+++ b/nuxt/pages/admin/sys/site/index.vue
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+
+
+
+ 삭제
+
+
+
+ 추가
+ 저장
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nuxt/stores/login/index.ts b/nuxt/stores/login/index.ts
index aa57ea3..6c17076 100644
--- a/nuxt/stores/login/index.ts
+++ b/nuxt/stores/login/index.ts
@@ -19,9 +19,14 @@ export const useAuthStore = defineStore('authStore', () => {
return await useAxios().post(`/api/admin/login`, loginRequest.value);
};
+ const permitApiList = computed(() => {
+ return loginResponse.value.permitApiList;
+ });
+
return {
loginRequest,
loginResponse,
- LoginAPI
+ LoginAPI,
+ permitApiList
};
});
\ No newline at end of file
diff --git a/nuxt/stores/sys/site/index.ts b/nuxt/stores/sys/site/index.ts
new file mode 100644
index 0000000..583d19f
--- /dev/null
+++ b/nuxt/stores/sys/site/index.ts
@@ -0,0 +1,34 @@
+import type { SiteType } from '~/types/sys/site';
+
+export const useSiteStore = defineStore('useSiteStore', () => {
+ const siteList = ref([]);
+
+ const resetSiteList = () => {
+ siteList.value = [];
+ };
+
+ const searchSiteList = async () => {
+ try {
+ const { data } = await useAxios().get('/api/admin/sys/site/siteList');
+ siteList.value = data;
+ } catch (e) {
+ message.error('사이트 리스트를 불러오는데 실패하였습니다.');
+ }
+ };
+
+ const updateSiteList = async (data: SiteType[]) => {
+ try {
+ await useAxios().post('/api/admin/sys/site/updateSiteList', data);
+ message.success('사이트 정보가 저장이 되었습니다.');
+ } catch (e) {
+ message.error('사이트 저장에 실패하였습니다.');
+ }
+ };
+
+ return {
+ siteList,
+ resetSiteList,
+ searchSiteList,
+ updateSiteList
+ };
+});
diff --git a/nuxt/types/data/grid.ts b/nuxt/types/data/grid.ts
new file mode 100644
index 0000000..8451818
--- /dev/null
+++ b/nuxt/types/data/grid.ts
@@ -0,0 +1,50 @@
+import type {
+ GridEventListener,
+ OptColumn,
+ OptHeader,
+ OptRow,
+ OptRowHeader,
+ OptSummaryData,
+ OptTree
+} from 'tui-grid/types/options';
+import type { EditingEvent, TabMode } from 'tui-grid/types/store/focus';
+import type { SelectionUnit } from 'tui-grid/types/store/selection';
+import type {
+ ClipboardCopyOptions,
+ ColumnOptions
+} from 'tui-grid/types/store/column';
+import type { PageOptions } from 'tui-grid/types/store/data';
+import type { CreateMenuGroups } from 'tui-grid/types/store/contextMenu';
+
+export type DataGridType = {
+ data: OptRow[];
+ columns: OptColumn[];
+ bodyHeight?: number | 'fitToParent' | 'auto';
+ columnOptions?: ColumnOptions;
+ keyColumnName?: String;
+ width?: number | 'auto';
+ heightResizable?: Boolean;
+ minBodyHeight?: Number;
+ rowHeight?: number | 'auto';
+ minRowHeight?: Number;
+ scrollX?: Boolean;
+ scrollY?: Boolean;
+ editingEvent?: EditingEvent;
+ tabMode?: TabMode;
+ rowHeaders?: OptRowHeader[];
+ summary?: OptSummaryData;
+ useClientSort?: Boolean;
+ selectionUnit?: SelectionUnit;
+ showDummyRows?: Boolean;
+ copyOptions?: ClipboardCopyOptions;
+ pageOptions?: PageOptions;
+ treeColumnOptions?: OptTree;
+ header?: OptHeader;
+ usageStatistics?: Boolean;
+ disabled?: Boolean;
+ onGridMounted?: GridEventListener;
+ onGridUpdated?: GridEventListener;
+ onGridBeforeDestroy?: GridEventListener;
+ draggable?: Boolean;
+ contextMenu?: CreateMenuGroups;
+};
diff --git a/nuxt/types/data/pagination.ts b/nuxt/types/data/pagination.ts
new file mode 100644
index 0000000..8f146f6
--- /dev/null
+++ b/nuxt/types/data/pagination.ts
@@ -0,0 +1,6 @@
+export type PaginationType = {
+ totalItems: number;
+ itemsPerPage: number;
+ visiblePages: number;
+ centerAlign?: boolean;
+};
diff --git a/nuxt/types/sys/site/index.ts b/nuxt/types/sys/site/index.ts
new file mode 100644
index 0000000..08bd3b8
--- /dev/null
+++ b/nuxt/types/sys/site/index.ts
@@ -0,0 +1,13 @@
+export type SiteType = {
+ siteId: string;
+ siteName: string;
+ siteDescription: string;
+ siteDomain: string;
+ siteType: '' | 'ADMIN' | 'USER';
+ sitePrefix: string;
+ siteLocale: string;
+ siteLogo: string;
+ bscUrl: string;
+ lgnUrl: string;
+ siteRegdate: string;
+};