/admin/content/list 페이징 처리와 검색 조건 기능 추가

This commit is contained in:
이진기
2024-11-27 16:23:07 +09:00
parent 40a1c2740d
commit f786df1d9b
19 changed files with 449 additions and 54 deletions

View File

@@ -69,7 +69,7 @@ const nonValid = computed(() => {
:colon="false"
:label-col="{ span: 2 }"
>
<!-- <common-inst-code-select v-model:value="contents.orgId" />-->
<common-inst-code-select v-model:value="contents.orgId" />
</a-form-item>
</a-col>

View File

@@ -2,13 +2,11 @@
import type { OptColumn, OptRowHeader } from 'tui-grid/types/options';
import { useContentStore } from '~/stores/contents';
import type { ContentType } from '~/types/contents';
import { BOOLEANS } from '~/constants/grid';
// import { useCommonCodeStore } from '~/stores';
import { useCommonCodeStore } from '~/stores';
const router = useRouter();
// const siteCodeList = await useCommonCodeStore().searchSiteCodeList();
// const instCodeList = await useCommonCodeStore().searchInstCodeList();
const instCodeList = await useCommonCodeStore().searchInstCodeList();
const contentStore = useContentStore();
const { contentsList, contentsQuery } = storeToRefs(contentStore);
const gridRef = ref();
@@ -28,6 +26,15 @@ const columns: OptColumn[] = [
name: 'orgId',
header: '관리기관',
width: 100,
disabled: true,
formatter: 'listItemText',
resizable: true,
editor: {
type: 'select',
options: {
listItems: instCodeList
}
}
},
{
name: 'useYn',
@@ -58,7 +65,7 @@ const columns: OptColumn[] = [
];
const contentType = [
{ label: '전체', value: '' },
{ label: '전체', value: 'TOTAL' },
{ label: '제목', value: 'TITLE' },
{ label: '내용', value: 'CONTENT' }
];
@@ -72,7 +79,7 @@ onBeforeUnmount(() => {
});
const search = () => {
// contentStore.searchContentList();
contentStore.searchContentList();
};
const list = computed(() => {
@@ -133,12 +140,12 @@ const editPage = (contentId: any) => {
<a-col>
<a-space>
<a-typography-text>관리기관</a-typography-text>
<!-- <lazy-common-inst-code-select-->
<!-- key="inst-code-select"-->
<!-- v-model="contentsQuery.orgId"-->
<!-- class-name="w-40"-->
<!-- select-type="ALL"-->
<!-- />-->
<lazy-common-inst-code-select
key="inst-code-select"
v-model="contentsQuery.orgId"
class-name="w-40"
select-type="ALL"
/>
</a-space>
</a-col>
@@ -151,7 +158,8 @@ const editPage = (contentId: any) => {
v-model:value="contentsQuery.type"
:options="contentType"
/>
<a-input title="검색어" placeholder="Search" class="w-60" />
<a-input title="검색어" placeholder="Search" class="w-60"
v-model:value="contentsQuery.keyword" allow-clear/>
</a-space>
</a-col>
<a-col>