You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.9 KiB

<template>
<w-grid
ref="announcementGridRef"
:title="$t('system.announcementManager.grid.title')"
:config-button="true"
db-click-operation="edit"
selection="multiple"
:checkbox-selection="true"
:data-url="Environment.apiContextPath('/api/system/announcement')"
:sort-by="['-lastModifyDate']"
:query-form-cols-num="2"
:query-form-fields="[{ name: 'title', label: $t('title'), type: 'w-text' }]"
:toolbar-configure="{ noIcon: false }"
:toolbar-actions="['query', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']"
:columns="[
{ width: 300, name: 'title', label: $t('title') },
{ width: '100%', name: 'content', label: $t('content'), sortable: false },
]"
:editor="{
dialog: {
width: '800px',
},
form: {
colsNum: 1,
fields: [
{ name: 'title', label: $t('title'), type: 'w-text', requiredIf: true },
{ name: 'content', label: $t('content'), type: 'q-editor', requiredIf: true, minHeight: '10rem', defaultValue: '' },
],
},
}"
:viewer="{
panel: {
columnNum: 1,
fields: [
{ name: 'id', label: $t('id') },
{ name: 'title', label: $t('title') },
{ name: 'content', label: $t('content') },
{ name: 'dataComeFrom', label: $t('dataComeFrom') },
{ name: 'creator', label: $t('creator') },
{ name: 'createDate', label: $t('createDate') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
{ name: 'corporationCode', label: $t('corporationCode') },
],
},
}"
></w-grid>
</template>
<script setup lang="ts">
import 'tailwindcss/utilities.css';
import { Environment, Formater } from 'platform-core';
</script>