| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- import type { ReadingNoteVO } from '#/api/outcome';
- import { defineEditShell } from '#/adapter/shell/edit';
- import {
- editReadingNoteMethod,
- getReadingNoteMethod,
- ReadingNoteVOSchema,
- } from '#/api/outcome';
- export const readingNoteForm = defineEditShell<ReadingNoteVO>({
- scope: 'outcome.readingNote',
- title: '读书心得',
- submit: editReadingNoteMethod,
- load: getReadingNoteMethod,
- shell: {
- type: 'modal',
- class: '!w-[640px]',
- confirmText: '确定',
- },
- form: {
- layout: 'vertical',
- wrapperClass: 'grid-cols-1',
- },
- schema: [
- {
- component: 'Input',
- fieldName: 'title',
- label: '心得标题',
- componentProps: {
- placeholder: '请输入',
- },
- rules: ReadingNoteVOSchema.shape.title,
- },
- {
- component: 'Input',
- fieldName: 'bookName',
- label: '书名',
- componentProps: {
- placeholder: '请输入',
- },
- rules: ReadingNoteVOSchema.shape.bookName,
- },
- {
- component: 'Input',
- fieldName: 'author',
- label: '心得作者',
- componentProps: {
- placeholder: '请输入',
- },
- rules: ReadingNoteVOSchema.shape.author,
- },
- {
- component: 'Textarea',
- fieldName: 'content',
- label: '心得',
- componentProps: {
- placeholder: '请输入',
- rows: 6,
- showCount: false,
- },
- rules: ReadingNoteVOSchema.shape.content,
- },
- {
- component: 'Input',
- fieldName: 'workroomId',
- dependencies: {
- show: false,
- triggerFields: ['workroomId'],
- },
- rules: ReadingNoteVOSchema.shape.workroomId,
- },
- ],
- });
|