21 changed files with 93 additions and 161 deletions
@ -1,70 +0,0 @@ |
|||||
<template> |
|
||||
<div> |
|
||||
<platform-grid |
|
||||
ref="announcementGridRef" |
|
||||
:table-props="{ borderded: false, flat: true }" |
|
||||
:query-form-cols-number="announcementConfigure.queryFormColsNumber" |
|
||||
:query-form-cols-auto="announcementConfigure.queryFormColsAuto" |
|
||||
:table-title="announcementConfigure.tableTitle" |
|
||||
:table-row-key="announcementConfigure.tableRowKey" |
|
||||
:table-init-load-data="announcementConfigure.tableInitLoadData" |
|
||||
:table-data-url="announcementConfigure.tableDataUrl" |
|
||||
:table-show-sort-no="false" |
|
||||
:table-columns="announcementConfigure.tableColumns" |
|
||||
:table-left-column-sticky-number="announcementConfigure.tableLeftColumnStickyNumber" |
|
||||
:table-buttons="announcementConfigure.tableButtons" |
|
||||
:query-form-fields="announcementConfigure.queryFormFields" |
|
||||
:table-pagination="announcementConfigure.tablePagination" |
|
||||
:add-form-props="announcementConfigure.addFormProps" |
|
||||
:table-dense="false" |
|
||||
@row-click="announcementConfigure.rowClickFun" |
|
||||
> |
|
||||
</platform-grid> |
|
||||
</div> |
|
||||
</template> |
|
||||
<script setup lang="ts"> |
|
||||
import { ref } from 'vue'; |
|
||||
import { useI18n } from 'vue-i18n'; |
|
||||
import { Environment, axios } from 'platform-core'; |
|
||||
|
|
||||
const { t } = useI18n(); |
|
||||
|
|
||||
const announcementConfigure = { |
|
||||
queryFormColsNumber: 4, |
|
||||
queryFormColsAuto: false, |
|
||||
hideBottom: false, |
|
||||
tableInitLoadData: true, |
|
||||
tableLeftColumnStickyNumber: 0, |
|
||||
tableTitle: t('system.announcement.gridTitle'), |
|
||||
tableRowKey: 'id', |
|
||||
tableDataUrl: Environment.apiContextPath('/api/system/announcement'), |
|
||||
tablePagination: { |
|
||||
sortBy: 'lastModifyDate', |
|
||||
descending: true, |
|
||||
reqPageStart: 0, |
|
||||
rowsPerPage: 10, |
|
||||
}, |
|
||||
queryFormFields: [ |
|
||||
{ width: 100, name: 'title', label: t('title') }, |
|
||||
{ width: 110, name: 'lastModifier', label: t('lastModifier') }, |
|
||||
{ width: 115, name: 'lastModifyDate', label: t('lastModifyDate') }, |
|
||||
], |
|
||||
tableButtons: ['add', 'edit', 'delete', 'separator', 'view', 'inFullscreen'], |
|
||||
tableColumns: [ |
|
||||
{ width: 100, name: 'title', label: t('title') }, |
|
||||
{ width: 100, name: 'content', label: t('content') }, |
|
||||
{ width: 110, name: 'lastModifier', label: t('lastModifier') }, |
|
||||
{ width: 115, name: 'lastModifyDate', label: t('lastModifyDate') }, |
|
||||
], |
|
||||
addFormProps: { |
|
||||
dialogInitWidth: '50%', |
|
||||
dialogInitHeight: '90%', |
|
||||
formColsNumber: 1, |
|
||||
formColsAuto: false, |
|
||||
formFields: [ |
|
||||
{ modelName: 'title', label: t('title'), type: 'text', required: true }, |
|
||||
{ modelName: 'content', label: t('content'), type: 'textarea', required: true }, |
|
||||
], |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
Loading…
Reference in new issue