This commit is contained in:
2026-04-07 14:50:23 +09:00
commit b4e485502b
4778 changed files with 2017091 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
<template>
<div class="bg-gray-50">
<div class="max-w-7xl mx-auto py-6 space-y-6 sm:px-6 lg:px-8">
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
<div class="bg-white">
<div
class="max-w-7xl mx-auto py-16 px-4 sm:px-6 lg:py-20 lg:px-8"
>
<div class="lg:grid lg:grid-cols-3 lg:gap-8">
<div>
<h2
class="text-3xl font-extrabold text-gray-900"
>
자주 묻는 질문과 답변
</h2>
<p class="mt-4 text-base text-gray-500">
궁금하신 내용이 이곳에 없다면
<a
href="javascript:void(0)"
class="font-medium text-indigo-600 hover:text-indigo-500"
@click="
$router.push('/support/inquiry')
"
>일대일 문의</a
>
메뉴를 통해 질문을 남기실 있습니다.
</p>
</div>
<div class="mt-12 lg:mt-0 lg:col-span-2">
<dl class="space-y-12">
<div v-if="listData.length == 0">
<dt
class="text-lg leading-6 font-medium text-gray-900"
>
아직 등록된 자주 묻는 질문과 답변이
없나요?
</dt>
<dd
class="mt-2 text-base text-gray-500"
>
. 아직은 등록된 내용이 없습니다.
</dd>
</div>
<div
v-for="item in listData"
v-else
:key="item.serial"
>
<BaseFaqItem1 :item="item" />
</div>
</dl>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
/*
definePageMeta({
middleware: 'check-auth-user',
});
*/
const listData = ref();
const inLoadingFlag = ref(false);
const statusMessage = ref('데이터를 읽어 오는 중...');
inLoadingFlag.value = true;
const responseJson = await _crossCtl.doComm('list', 'faq:active', {});
inLoadingFlag.value = false;
if (responseJson['responseCode'] == 200) {
listData.value = responseJson['data'];
} else {
statusMessage.value = responseJson['responseMessage'];
}
</script>
<style lang="css" scoped></style>

View File

@@ -0,0 +1,185 @@
<template>
<div class="pb-8 px-4 sm:px-6 lg:px-8">
<br />
<div class="sm:flex sm:items-center">
<div class="sm:flex-auto">
<h1 class="text-xl font-semibold text-gray-900">
{{ pageTitle }}
</h1>
<p class="mt-2 text-sm text-gray-700">
{{ pageDescription }}
</p>
</div>
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
<button
type="button"
class="inline-flex items-center justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 sm:w-auto"
@click="makeNewOne"
>
문의 작성
</button>
</div>
</div>
<BaseList1
:headings="listHeadings"
:actions="listActions"
:keys="listKeys"
:data="listData"
:action-key="actionKey"
:column-filter="columnFilter"
:do-action="doAction"
/>
<BasePagination1
:total-page-count="totalPageCount"
:current-page-number="currentPageNumber"
:page-size="pageSize"
:records-total="recordsTotal"
:page-move="pageMove"
/>
</div>
</template>
<script setup lang="ts">
const route = useRoute();
definePageMeta({
middleware: 'check-auth-user',
});
const inquiryListOptionTags = ['대기중', '검토중', '답변완료', '삭제'];
const inquiryListOption = ref(0);
const pageTitle = '1:1 문의';
const pageDescription =
'나의 1:1 문의 내역을 확인하고 새로운 문의를 작성할 수 있습니다.';
const listSource = 'list';
const listTarget = 'inquiry:all';
const deletedListName = 'support-inquiry-deleted';
const makeNewTargetName = 'support-inquiry-new';
const listActions = ['상세보기'];
const actionKey = 'serial';
const listKeys = ['serial', 'name', 'title', 'status', 'updated'];
const listHeadings = [
{
title: '제목',
widthRatio: '',
class: 'hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell',
key: 'title',
hiddenInfo: {
headClass: '',
dts: [],
dds: [],
},
subClass: 'hidden px-3 py-4 text-sm text-gray-500 lg:table-cell',
},
{
title: '상태',
widthRatio: '10',
class: 'px-3 py-3.5 text-left text-sm font-semibold text-gray-900',
key: 'status',
hiddenInfo: {
headClass: '',
dts: [],
dds: [],
},
subClass: 'px-3 py-4 text-sm text-gray-500',
},
{
title: '수정일',
widthRatio: '15',
class: 'hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell',
key: 'updated',
hiddenInfo: {
headClass: '',
dts: [],
dds: [],
},
subClass: 'hidden px-3 py-4 text-sm text-gray-500 sm:table-cell',
},
{
title: '작성일',
widthRatio: '15',
class: 'hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell',
key: 'created',
hiddenInfo: {
headClass: '',
dts: [],
dds: [],
},
subClass: 'hidden px-3 py-4 text-sm text-gray-500 sm:table-cell',
},
];
const doActionTargetName = 'support-inquiry-view';
const listData = ref([]);
const totalPageCount = ref(0);
const currentPageNumber = ref(1);
const pageSize = ref(10);
const recordsTotal = ref(0);
// const order = [{ column: 'serial', dir: 'desc' }];
// const columns = { serial: { data: 'serial' } };
const { $dayjs } = useNuxtApp();
function columnFilter(key, val) {
// console.log("columnFilter(), key = ", key, ", val = ", val);
if (key == 'updated' || key == 'created') {
// return $dayjs(val).format('YY/MM/DD A h:mm:ss');
return $dayjs(val).format('YY/MM/DD');
} else if (key == 'status') {
return inquiryListOptionTags[val];
} else {
return val;
}
}
const router = useRouter();
function doAction(tag, target) {
console.log('on doAction(), tag=', tag, ', target=', target);
navigateTo('/support/inquiry/view/' + target);
}
function makeNewOne() {
router.push({
name: makeNewTargetName,
params: {},
});
}
function pageMove(targetPageIdex) {
console.log('on pageMove(), targetPageIdex=', targetPageIdex);
currentPageNumber.value = targetPageIdex;
refresh();
}
async function refresh() {
const responseJson = await _crossCtl.doComm(listSource, listTarget, {
hero: inquiryListOption.value,
start: (currentPageNumber.value - 1) * pageSize.value,
length: pageSize.value,
});
if (responseJson['responseCode'] != 200) {
alert(responseJson['responseMessage']);
} else {
currentPageNumber.value = responseJson['currentPageNumber'];
totalPageCount.value = responseJson['totalPageCount'];
pageSize.value = parseInt(responseJson['pageSize']);
recordsTotal.value = responseJson['recordsTotal'];
listData.value = responseJson['data'];
}
}
refresh();
</script>

View File

@@ -0,0 +1,244 @@
<template>
<form @submit.prevent="doCreate">
<div class="sm:flex sm:items-center">
<div class="sm:flex-auto">
<h1 class="text-xl font-semibold text-gray-900">
{{ newTitle }}
</h1>
<p class="mt-2 text-sm text-gray-700">
{{ newDescription }}
</p>
</div>
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
<img
v-if="inPregressFlag"
width="32"
src="/loading-load-2.gif"
/>
</div>
</div>
<div class="mt-2"></div>
<form action="#" class="relative">
<div
class="border border-gray-300 rounded-lg shadow-sm overflow-hidden focus-within:border-indigo-500 focus-within:ring-1 focus-within:ring-indigo-500"
>
<label for="title" class="sr-only">Title</label>
<input
id="title"
v-model="targetTitle"
type="text"
name="title"
class="block w-full border-0 pt-2.5 text-lg font-medium placeholder-gray-500 focus:ring-0"
placeholder="제목"
/>
<label for="description" class="sr-only">Description</label>
<textarea
id="description"
v-model="targetContent"
rows="12"
name="description"
class="block w-full border-0 py-0 resize-none placeholder-gray-500 focus:ring-0 sm:text-sm"
placeholder="내용..."
/>
<!-- Spacer element to match the height of the toolbar -->
<div aria-hidden="true">
<div class="py-2">
<div class="h-9" />
</div>
<div class="h-px" />
<div class="py-2">
<div class="py-px">
<div class="h-9" />
</div>
</div>
</div>
</div>
<div class="absolute bottom-0 inset-x-px">
<!-- Actions: These are just examples to demonstrate the concept, replace/wire these up however makes sense for your project. -->
<div
class="flex flex-nowrap justify-end py-2 px-2 space-x-2 sm:px-3"
>
<Listbox v-model="labelled" as="div" class="flex-shrink-0">
<ListboxLabel class="sr-only">
Add a label
</ListboxLabel>
<div class="relative">
<ListboxButton
class="relative inline-flex items-center rounded-full py-2 px-2 bg-gray-50 text-sm font-medium text-gray-500 whitespace-nowrap hover:bg-gray-100 sm:px-3"
>
<TagIcon
:class="[
labelled.value === null
? 'text-gray-300'
: 'text-gray-500',
'flex-shrink-0 h-5 w-5 sm:-ml-1',
]"
aria-hidden="true"
/>
<span
:class="[
labelled.value === null
? ''
: 'text-gray-900',
'hidden truncate sm:ml-2 sm:block',
]"
>{{
labelled.value === null
? 'Label'
: labelled.name
}}</span
>
</ListboxButton>
<transition
leave-active-class="transition ease-in duration-100"
leave-from-class="opacity-100"
leave-to-class="opacity-0"
>
<ListboxOptions
class="absolute right-0 z-10 mt-1 w-52 bg-white shadow max-h-56 rounded-lg py-3 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm"
>
<ListboxOption
v-for="label in labels"
:key="label.value"
v-slot="{ active }"
as="template"
:value="label"
>
<li
:class="[
active
? 'bg-gray-100'
: 'bg-white',
'cursor-default select-none relative py-2 px-3',
]"
>
<div class="flex items-center">
<span
class="block font-medium truncate"
>
{{ label.name }}
</span>
</div>
</li>
</ListboxOption>
</ListboxOptions>
</transition>
</div>
</Listbox>
</div>
<base-attachment-ctl1
:attachments="attachments"
:read-only-flag="false"
:update-attachments="updateAttachments"
:secure-enabled="true"
/>
</div>
</form>
<div class="mt-2 flex justify-end">
<button
type="button"
class="bg-white py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
@click="doCancel"
>
취소
</button>
<button
type="submit"
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
>
저장
</button>
</div>
</form>
</template>
<script setup>
import {
Listbox,
ListboxButton,
ListboxLabel,
ListboxOption,
ListboxOptions,
} from '@headlessui/vue';
import { PaperClipIcon, TagIcon } from '@heroicons/vue/24/solid';
const route = useRoute();
definePageMeta({
middleware: 'check-auth-user',
});
const labels = [
{ name: '라벨 없음', value: null },
{ name: '사이트 이용', value: 'site' },
{ name: 'API 문의', value: 'api' },
{ name: '기타', value: 'etc' },
// More items...
];
const labelled = ref(labels[0]);
const newTitle = '1:1 문의 작성';
const newDescription =
'문의 사항을 적어 주시고 필요한 경우 파일도 첨부하실 수 있습니다.';
const inPregressFlag = ref(false);
const targetTitle = ref('');
const targetContent = ref('');
const attachments = ref([]);
const targetStatus = ref(0);
const actionTarget = 'inquiry';
const router = useRouter();
function updateAttachments(newAttachments) {
console.log('newAttachments=', newAttachments);
attachments.value = newAttachments;
}
async function doCancel() {
if (inPregressFlag.value == true) {
alert('이전 동작이 아직 진행중입니다.');
return;
}
router.back();
}
async function doCreate() {
if (inPregressFlag.value == true) {
alert('이전 동작이 아직 진행중입니다.');
return;
}
if (targetTitle.value == '' || targetContent.value == '') {
alert('내용을 입력하셔야 합니다. ');
return;
}
inPregressFlag.value = true;
const responseJson = await _crossCtl.doComm('insert', actionTarget, {
title: targetTitle.value,
question: targetContent.value,
attachmentFrom: attachments.value,
flags: labelled.value['value']
? JSON.stringify([labelled.value['value']])
: JSON.stringify([]),
});
inPregressFlag.value = false;
if (responseJson['responseMessage'] == 'ok') {
alert('ok');
router.back();
} else {
alert('오류 : ' + responseJson['responseMessage']);
}
}
</script>

View File

@@ -0,0 +1,384 @@
<template>
<form @submit.prevent="doUpdate">
<div class="sm:flex sm:items-center">
<div class="sm:flex-auto">
<h1 class="text-xl font-semibold text-gray-900">
{{ newTitle }}
</h1>
<p class="mt-2 text-sm text-gray-700">
{{ newDescription }}
</p>
</div>
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
<img
v-if="inPregressFlag"
width="32"
src="/loading-load-2.gif"
/>
</div>
</div>
<div class="mt-2"></div>
<div>
<form action="#" class="relative">
<div
class="border border-gray-300 rounded-lg shadow-sm overflow-hidden focus-within:border-indigo-500 focus-within:ring-1 focus-within:ring-indigo-500"
>
<label for="title" class="sr-only">Title</label>
<input
id="title"
v-model="targetTitle"
:disabled="targetStatus != 0"
type="text"
name="title"
class="block w-full border-0 pt-2.5 text-lg font-medium placeholder-gray-500 focus:ring-0"
placeholder="Title"
/>
<label for="description" class="sr-only">Description</label>
<textarea
id="description"
v-model="targetContent"
rows="8"
:disabled="targetStatus != 0"
name="description"
class="block w-full border-0 py-0 resize-none placeholder-gray-500 focus:ring-0 sm:text-sm"
placeholder="Write a description..."
/>
<!-- Spacer element to match the height of the toolbar -->
<div aria-hidden="true">
<div class="py-2">
<div class="h-9" />
</div>
<div class="h-px" />
<div class="py-2">
<div class="py-px">
<div class="h-9" />
</div>
</div>
</div>
</div>
<div class="absolute bottom-0 inset-x-px">
<!-- Actions: These are just examples to demonstrate the concept, replace/wire these up however makes sense for your project. -->
<div
class="flex flex-nowrap justify-end py-2 px-2 space-x-2 sm:px-3"
>
<Listbox
v-model="labelled"
as="div"
class="flex-shrink-0"
>
<ListboxLabel class="sr-only">
Add a label
</ListboxLabel>
<div class="relative">
<ListboxButton
:disabled="targetStatus != 0"
class="relative inline-flex items-center rounded-full py-2 px-2 bg-gray-50 text-sm font-medium text-gray-500 whitespace-nowrap hover:bg-gray-100 sm:px-3"
>
<TagIcon
:class="[
labelled.value === null
? 'text-gray-300'
: 'text-gray-500',
'flex-shrink-0 h-5 w-5 sm:-ml-1',
]"
aria-hidden="true"
/>
<span
:class="[
labelled.value === null
? ''
: 'text-gray-900',
'hidden truncate sm:ml-2 sm:block',
]"
>{{
labelled.value === null
? 'Label'
: labelled.name
}}</span
>
</ListboxButton>
<transition
leave-active-class="transition ease-in duration-100"
leave-from-class="opacity-100"
leave-to-class="opacity-0"
>
<ListboxOptions
class="absolute right-0 z-10 mt-1 w-52 bg-white shadow max-h-56 rounded-lg py-3 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm"
>
<ListboxOption
v-for="label in labels"
:key="label.value"
v-slot="{ active }"
as="template"
:value="label"
>
<li
:class="[
active
? 'bg-gray-100'
: 'bg-white',
'cursor-default select-none relative py-2 px-3',
]"
>
<div class="flex items-center">
<span
class="block font-medium truncate"
>
{{ label.name }}
</span>
</div>
</li>
</ListboxOption>
</ListboxOptions>
</transition>
</div>
</Listbox>
</div>
<base-attachment-ctl1
:attachments="targetAttachmentFrom"
:read-only-flag="targetStatus != 0"
:update-attachments="updateAttachments"
/>
</div>
</form>
<div v-if="targetStatus == 2">
<p class="mt-5 text-sm text-gray-700">답변</p>
<div
class="border border-gray-300 rounded-lg shadow-sm overflow-hidden focus-within:border-indigo-500 focus-within:ring-1 focus-within:ring-indigo-500"
>
<label for="answer" class="sr-only">answer</label>
<textarea
id="answer"
v-model="targetAnswer"
disabled
rows="8"
name="answer"
class="block w-full border-0 py-0 resize-none placeholder-gray-500 focus:ring-0 sm:text-sm"
placeholder=""
/>
</div>
<base-attachment-ctl1
:attachments="targetAttachmentTo"
:read-only-flag="true"
/>
</div>
</div>
<div class="mt-2 flex justify-between">
<div>
<button
v-if="currentTarget != 'inquiry'"
type="button"
:class="
targetStatus == 0
? 'inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500'
: 'inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500'
"
@click="doToggle"
>
{{ targetStatus == 0 ? '삭제' : '복구' }}
</button>
</div>
<div>
<button
v-if="targetStatus == 0"
type="button"
class="bg-white py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
@click="doCancel"
>
취소
</button>
<button
type="submit"
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
>
{{ targetStatus == 0 ? '수정' : '확인' }}
</button>
</div>
</div>
</form>
</template>
<script setup>
import {
Listbox,
ListboxButton,
ListboxLabel,
ListboxOption,
ListboxOptions,
} from '@headlessui/vue';
import { TagIcon } from '@heroicons/vue/24/solid';
const route = useRoute();
definePageMeta({
middleware: 'check-auth-user',
});
let labels = [
{ name: '라벨 없음', value: null },
{ name: '공지', value: 'notice' },
{ name: '이벤트', value: 'event' },
// More items...
];
const labelled = ref(labels[0]);
const newTitle = ref('');
const newDescription = ref('');
const contentTitle = ref('');
const contentMessageGuide = ref('');
const currentTarget = ref('inquiry');
const actionTarget = 'inquiry';
const inPregressFlag = ref(false);
const targetTitle = ref('');
const targetContent = ref('');
const targetAttachmentFrom = ref([]);
const targetAnswer = ref('');
const targetAttachmentTo = ref([]);
const targetStatus = ref(0);
const inquiryListOptionTags = ['대기중', '검토중', '답변완료', '삭제'];
let targetCreated = '';
async function doToggle() {
if (targetStatus.value == 0) {
const responseJson = await _crossCtl.doComm('delete', actionTarget, {
hero: route.params.hero,
});
console.log('responseJson=', responseJson);
if (responseJson['responseMessage'] == 'ok') {
targetStatus.value = 4;
alert('ok');
router.back();
} else {
alert(responseJson['responseMessage']);
}
} else {
router.back();
}
}
newTitle.value = '1:1 문의 처리';
newDescription.value =
'1:1 문의에 답을 입력하면 상태가 즉시 답변 완료로 변하지만, 내용은 추가 수정할 수 있습니다.';
contentTitle.value = '질문';
contentMessageGuide.value = '답변';
labels = [
{ name: '라벨 없음', value: null },
{ name: '사이트 이용', value: 'site' },
{ name: 'API 문의', value: 'api' },
{ name: '기타', value: 'etc' },
// More items...
];
console.log('route.params.hero=', route.params.hero);
const responseJson = await _crossCtl.doComm('select', currentTarget.value, {
hero: route.params.hero,
});
if (responseJson['responseCode'] == 200) {
console.log(responseJson['data']);
targetTitle.value = responseJson['data'][0]['title'];
targetContent.value = responseJson['data'][0]['question'];
targetAttachmentFrom.value = JSON.parse(
responseJson['data'][0]['attachment_from']
);
console.log('huk targetAttachmentFrom.value = ', targetAttachmentFrom);
targetAnswer.value = responseJson['data'][0]['answer'];
targetAttachmentTo.value = JSON.parse(
responseJson['data'][0]['attachment_to']
);
const tmpFlags =
responseJson['data'][0]['flags'] != null
? responseJson['data'][0]['flags']
: '[]';
const flags = JSON.parse(tmpFlags);
for (let i = 0; i < flags.length; i++) {
const flag = flags[i];
for (let j = 0; j < labels.length; j++) {
if (flag == labels[j]['value']) {
labelled.value = labels[j];
}
}
}
targetCreated = responseJson['data'][0]['created'];
targetStatus.value = responseJson['data'][0]['status'];
} else {
alert(responseJson['responseMessage']);
}
// console.log('huk route.params.target=', route.params.target);
const router = useRouter();
async function doCancel() {
if (inPregressFlag.value == true) {
alert('이전 동작이 아직 진행중입니다.');
return;
}
router.back();
}
function updateAttachments(newAttachments) {
console.log('newAttachments=', newAttachments);
targetAttachmentFrom.value = newAttachments;
}
async function doUpdate() {
if (inPregressFlag.value == true) {
alert('이전 동작이 아직 진행중입니다.');
return;
}
if (targetTitle.value == '' || targetContent.value == '') {
alert('내용을 입력하셔야 합니다. ');
return;
}
if (targetStatus.value != 0) {
router.back();
return;
}
inPregressFlag.value = true;
const responseJson = await _crossCtl.doComm('update', actionTarget, {
hero: route.params.hero,
title: targetTitle.value,
question: targetContent.value,
attachmentFrom: targetAttachmentFrom.value,
flags: labelled.value['value']
? JSON.stringify([labelled.value['value']])
: JSON.stringify([]),
status: targetStatus.value,
});
inPregressFlag.value = false;
if (responseJson['responseMessage'] == 'ok') {
alert('ok');
router.back();
} else {
alert('오류 : ' + responseJson['responseMessage']);
}
}
</script>

View File

@@ -0,0 +1,132 @@
<template>
<ul v-if="inLoadingFlag">
<li>
<!-- This example requires Tailwind CSS v2.0+ -->
<div class="rounded-md bg-green-50 p-4">
<div class="flex">
<div class="flex-shrink-0">
<!-- Heroicon name: check-circle -->
<svg
class="h-5 w-5 text-green-400"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-green-800">
{{ statusMessage }}
</p>
</div>
<div class="ml-auto pl-3">
<div class="-mx-1.5 -my-1.5"></div>
</div>
</div>
</div>
</li>
</ul>
<ul v-else-if="statusMessage != null">
<li>
<div class="rounded-md bg-red-50 p-4 m-5">
<div class="flex">
<div class="flex-shrink-0">
<!-- Heroicon name: x-circle -->
<svg
class="h-5 w-5 text-red-400"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
오류가 발생하였습니다.
</h3>
<div class="mt-2 text-sm text-red-700">
<ul class="list-disc pl-5 space-y-1">
<li>
{{ statusMessage }}
</li>
</ul>
</div>
</div>
</div>
</div>
</li>
</ul>
<div v-else>
<ul v-if="listData.length > 0">
<li v-for="noticeItem in listData" :key="noticeItem.serial">
<BaseNoticeItem1 :item="noticeItem" />
</li>
</ul>
<div v-else>
<div class="rounded-md bg-red-50 p-4 m-5">
<div class="flex">
<div class="flex-shrink-0">
<!-- Heroicon name: x-circle -->
<svg
class="h-5 w-5 text-red-400"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
fill="currentColor"
aria-hidden="true"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
등록된 공지가 없습니다.
</h3>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
definePageMeta({
middleware: 'check-auth-user',
});
const listData = ref();
const inLoadingFlag = ref(true);
const statusMessage = ref('데이터를 읽어 오는 중...');
inLoadingFlag.value = true;
const responseJson = await _crossCtl.doComm('local/list', 'notice', {});
inLoadingFlag.value = false;
if (responseJson['responseCode'] == 200) {
listData.value = responseJson['data'];
statusMessage.value = null;
} else {
statusMessage.value = responseJson['responseMessage'];
}
</script>
<style lang="css" scoped></style>