项目初始化
This commit is contained in:
@@ -15,8 +15,17 @@
|
||||
<template #title>
|
||||
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||
<span> {{ getTitle.value }} </span>
|
||||
</template>
|
||||
<BasicForm @register="registerForm" />
|
||||
</template>
|
||||
<BasicForm @register="registerForm" >
|
||||
<template #remarks="{ model, field }">
|
||||
<WangEditor
|
||||
v-model:value="model[field]"
|
||||
:bizKey="record.noteId"
|
||||
:bizType="field"
|
||||
:height="300"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicDrawer>
|
||||
</template>
|
||||
<script lang="ts" setup name="ViewsBizMyNotesForm">
|
||||
@@ -27,6 +36,7 @@
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicDrawer, useDrawerInner } from '@jeesite/core/components/Drawer';
|
||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||
import { MyNotes, myNotesSave, myNotesForm } from '@jeesite/biz/api/biz/myNotes';
|
||||
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
||||
import { useUserStore } from '@jeesite/core/store/modules/user';
|
||||
@@ -63,13 +73,6 @@
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('便签内容'),
|
||||
field: 'content',
|
||||
component: 'InputTextArea',
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('便签级别'),
|
||||
field: 'priority',
|
||||
@@ -128,6 +131,17 @@
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: t('便签内容'),
|
||||
field: 'content',
|
||||
component: 'InputTextArea',
|
||||
componentProps: {
|
||||
maxlength: 9000,
|
||||
},
|
||||
slot: 'remarks',
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
];
|
||||
|
||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<MyNotes>({
|
||||
|
||||
@@ -16,7 +16,16 @@
|
||||
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
|
||||
<span> {{ getTitle.value }} </span>
|
||||
</template>
|
||||
<BasicForm @register="registerForm" />
|
||||
<BasicForm @register="registerForm" >
|
||||
<template #remarks="{ model, field }">
|
||||
<WangEditor
|
||||
v-model:value="model[field]"
|
||||
:bizKey="record.id"
|
||||
:bizType="field"
|
||||
:height="300"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
</BasicDrawer>
|
||||
</template>
|
||||
<script lang="ts" setup name="ViewsBizMyNoticeTodoForm">
|
||||
@@ -27,6 +36,7 @@
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { BasicDrawer, useDrawerInner } from '@jeesite/core/components/Drawer';
|
||||
import { WangEditor } from '@jeesite/core/components/WangEditor';
|
||||
import { MyNoticeTodo, myNoticeTodoSave, myNoticeTodoForm } from '@jeesite/biz/api/biz/myNoticeTodo';
|
||||
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
|
||||
|
||||
@@ -35,6 +45,7 @@
|
||||
const { t } = useI18n('biz.myNoticeTodo');
|
||||
const { showMessage } = useMessage();
|
||||
const { meta } = unref(router.currentRoute);
|
||||
const types = ref<string>('');
|
||||
const record = ref<MyNoticeTodo>({} as MyNoticeTodo);
|
||||
|
||||
const getTitle = computed(() => ({
|
||||
@@ -50,79 +61,57 @@
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('通知标题'),
|
||||
label: t('消息标题'),
|
||||
field: 'title',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
maxlength: 512,
|
||||
},
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('消息类型'),
|
||||
field: 'type',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'msg_type',
|
||||
allowClear: true,
|
||||
onChange: (value: string) => {
|
||||
types.value = value
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('到期时间'),
|
||||
field: 'datetime',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
maxlength: 32,
|
||||
},
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD HH:mm',
|
||||
showTime: { format: 'HH:mm' },
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('消息类型'),
|
||||
field: 'type',
|
||||
component: 'Input',
|
||||
{
|
||||
label: t('接收用户'),
|
||||
field: 'loginUser',
|
||||
fieldLabel: 'userName',
|
||||
component: 'ListSelect',
|
||||
componentProps: {
|
||||
maxlength: 32,
|
||||
selectType: 'userSelect',
|
||||
},
|
||||
},
|
||||
ifShow: () => ['2', '3'].includes(types.value),
|
||||
required: true,
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('描述信息'),
|
||||
field: 'description',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('是否关闭'),
|
||||
field: 'clickClose',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
maxlength: 12,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('额外信息'),
|
||||
field: 'extra',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
maxlength: 64,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('待办意见'),
|
||||
field: 'extraDesc',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('颜色值'),
|
||||
field: 'color',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
maxlength: 32,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('发布状态'),
|
||||
field: 'ustatus',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
maxlength: 12,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('接收用户'),
|
||||
field: 'loginUser',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
maxlength: 52,
|
||||
},
|
||||
component: 'InputTextArea',
|
||||
componentProps: {
|
||||
maxlength: 9000,
|
||||
},
|
||||
slot: 'remarks',
|
||||
colProps: { md: 24, lg: 24 },
|
||||
},
|
||||
{
|
||||
label: t('附件上传'),
|
||||
@@ -150,6 +139,7 @@
|
||||
const res = await myNoticeTodoForm(data);
|
||||
record.value = (res.myNoticeTodo || {}) as MyNoticeTodo;
|
||||
record.value.__t = new Date().getTime();
|
||||
types.value = record.value.type || '';
|
||||
await setFieldsValue(record.value);
|
||||
setDrawerProps({ loading: false });
|
||||
});
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('通知标题'),
|
||||
label: t('消息标题'),
|
||||
field: 'title',
|
||||
component: 'Input',
|
||||
},
|
||||
@@ -115,29 +115,21 @@
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: t('通知标题'),
|
||||
title: t('消息标题'),
|
||||
dataIndex: 'title',
|
||||
key: 'a.title',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
width: 180,
|
||||
align: 'left',
|
||||
slot: 'bizScopeKey',
|
||||
},
|
||||
{
|
||||
title: t('到期时间'),
|
||||
dataIndex: 'datetime',
|
||||
key: 'a.datetime',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('消息类型'),
|
||||
dataIndex: 'type',
|
||||
key: 'a.type',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: t('是否已读'),
|
||||
@@ -145,7 +137,7 @@
|
||||
key: 'a.read_flag',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: t('是否关闭'),
|
||||
@@ -153,7 +145,7 @@
|
||||
key: 'a.click_close',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: t('额外信息'),
|
||||
@@ -163,30 +155,22 @@
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('待办意见'),
|
||||
dataIndex: 'extraDesc',
|
||||
key: 'a.extra_desc',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('颜色值'),
|
||||
dataIndex: 'color',
|
||||
key: 'a.color',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('发布状态'),
|
||||
dataIndex: 'ustatus',
|
||||
key: 'a.ustatus',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('到期时间'),
|
||||
dataIndex: 'datetime',
|
||||
key: 'a.datetime',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: t('处理意见'),
|
||||
dataIndex: 'extraDesc',
|
||||
key: 'a.extra_desc',
|
||||
sorter: true,
|
||||
width: 180,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
@@ -195,10 +179,19 @@
|
||||
width: 150,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: t('发布状态'),
|
||||
dataIndex: 'ustatus',
|
||||
key: 'a.ustatus',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
|
||||
const actionColumn: BasicColumn<MyNoticeTodo> = {
|
||||
width: 160,
|
||||
align: 'center',
|
||||
actions: (record: MyNoticeTodo) => [
|
||||
{
|
||||
icon: 'i-clarity:note-edit-line',
|
||||
|
||||
@@ -1,226 +0,0 @@
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
||||
import { myNoticeTodoListData } from '@jeesite/biz/api/biz/myNoticeTodo';
|
||||
|
||||
const { t } = useI18n('biz.myNoticeTodo');
|
||||
|
||||
const modalProps = {
|
||||
title: t('消息选择'),
|
||||
};
|
||||
|
||||
const searchForm: FormProps<MyNoticeTodo> = {
|
||||
baseColProps: { md: 8, lg: 6 },
|
||||
labelWidth: 90,
|
||||
schemas: [
|
||||
{
|
||||
label: t('记录时间起'),
|
||||
field: 'createTime_gte',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD HH:mm',
|
||||
showTime: { format: 'HH:mm' },
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('记录时间止'),
|
||||
field: 'createTime_lte',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD HH:mm',
|
||||
showTime: { format: 'HH:mm' },
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('通知标题'),
|
||||
field: 'title',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('消息类型'),
|
||||
field: 'type',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('是否已读'),
|
||||
field: 'readFlag',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('是否关闭'),
|
||||
field: 'clickClose',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('发布状态'),
|
||||
field: 'ustatus',
|
||||
component: 'Input',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const tableColumns: BasicColumn<MyNoticeTodo>[] = [
|
||||
{
|
||||
title: t('记录时间'),
|
||||
dataIndex: 'createTime',
|
||||
key: 'a.create_time',
|
||||
sorter: true,
|
||||
width: 230,
|
||||
align: 'left',
|
||||
slot: 'firstColumn',
|
||||
},
|
||||
{
|
||||
title: t('头像图标'),
|
||||
dataIndex: 'avatar',
|
||||
key: 'a.avatar',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('通知标题'),
|
||||
dataIndex: 'title',
|
||||
key: 'a.title',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('删除线'),
|
||||
dataIndex: 'titleDelete',
|
||||
key: 'a.title_delete',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('到期时间'),
|
||||
dataIndex: 'datetime',
|
||||
key: 'a.datetime',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('消息类型'),
|
||||
dataIndex: 'type',
|
||||
key: 'a.type',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('是否已读'),
|
||||
dataIndex: 'readFlag',
|
||||
key: 'a.read_flag',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('描述信息'),
|
||||
dataIndex: 'description',
|
||||
key: 'a.description',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('是否关闭'),
|
||||
dataIndex: 'clickClose',
|
||||
key: 'a.click_close',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('额外信息'),
|
||||
dataIndex: 'extra',
|
||||
key: 'a.extra',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('待办意见'),
|
||||
dataIndex: 'extraDesc',
|
||||
key: 'a.extra_desc',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('颜色值'),
|
||||
dataIndex: 'color',
|
||||
key: 'a.color',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('发布状态'),
|
||||
dataIndex: 'ustatus',
|
||||
key: 'a.ustatus',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
key: 'a.update_time',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: t('业务编号'),
|
||||
dataIndex: 'bizCode',
|
||||
key: 'a.biz_code',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('接收姓名'),
|
||||
dataIndex: 'userName',
|
||||
key: 'a.user_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('创建用户'),
|
||||
dataIndex: 'createUser',
|
||||
key: 'a.create_user',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('接收用户'),
|
||||
dataIndex: 'loginUser',
|
||||
key: 'a.login_user',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps: BasicTableProps = {
|
||||
api: myNoticeTodoListData,
|
||||
beforeFetch: (params) => {
|
||||
params['isAll'] = true;
|
||||
return params;
|
||||
},
|
||||
columns: tableColumns,
|
||||
formConfig: searchForm,
|
||||
rowKey: 'id',
|
||||
};
|
||||
|
||||
export default {
|
||||
modalProps,
|
||||
tableProps,
|
||||
itemCode: 'id',
|
||||
itemName: 'id',
|
||||
isShowCode: false,
|
||||
};
|
||||
Reference in New Issue
Block a user