数据管理初始化

This commit is contained in:
Qi 2025-06-11 13:31:35 +08:00
parent 0c1c795d68
commit 4f3365999b
6 changed files with 135 additions and 149 deletions

View File

@ -6,33 +6,32 @@ import { render } from '/@/utils/common/renderUtils';
export const columns: BasicColumn[] = [
{
title: '教师姓名',
align:"center",
dataIndex: 'graduatesName'
align: 'center',
dataIndex: 'graduatesName',
},
{
title: '年龄',
align:"center",
dataIndex: 'age'
align: 'center',
dataIndex: 'age',
},
{
title: '性别',
align:"center",
dataIndex: 'sex'
align: 'center',
dataIndex: 'sex',
},
{
title: '校区',
align:"center",
dataIndex: 'campus'
},
{
title: '照片地址',
align:"center",
dataIndex: 'photoAddress'
align: 'center',
dataIndex: 'campus',
},
// {
// title: '照片地址',
// align:"center",
// dataIndex: 'photoAddress'
// },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
export const searchFormSchema: FormSchema[] = [];
//表单数据
export const formSchema: FormSchema[] = [
{
@ -40,9 +39,7 @@ export const formSchema: FormSchema[] = [
field: 'graduatesName',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [
{ required: true, message: '请输入教师姓名!'},
];
return [{ required: true, message: '请输入教师姓名!' }];
},
},
{
@ -50,9 +47,7 @@ export const formSchema: FormSchema[] = [
field: 'age',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [
{ required: true, message: '请输入年龄!'},
];
return [{ required: true, message: '请输入年龄!' }];
},
},
{
@ -60,9 +55,7 @@ export const formSchema: FormSchema[] = [
field: 'sex',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [
{ required: true, message: '请输入性别!'},
];
return [{ required: true, message: '请输入性别!' }];
},
},
{
@ -70,27 +63,27 @@ export const formSchema: FormSchema[] = [
field: 'campus',
component: 'Input',
},
{
label: '照片地址',
field: 'photoAddress',
component: 'Input',
},
//{
// label: '照片地址',
// field: 'photoAddress',
// component: 'Input',
//},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
show: false,
},
];
// 高级查询数据
export const superQuerySchema = {
graduatesName: {title: '教师姓名',order: 0,view: 'text', type: 'string',},
age: {title: '年龄',order: 1,view: 'text', type: 'string',},
sex: {title: '性别',order: 2,view: 'text', type: 'string',},
campus: {title: '校区',order: 3,view: 'text', type: 'string',},
photoAddress: {title: '照片地址',order: 4,view: 'text', type: 'string',},
graduatesName: { title: '教师姓名', order: 0, view: 'text', type: 'string' },
age: { title: '年龄', order: 1, view: 'text', type: 'string' },
sex: { title: '性别', order: 2, view: 'text', type: 'string' },
campus: { title: '校区', order: 3, view: 'text', type: 'string' },
photoAddress: { title: '照片地址', order: 4, view: 'text', type: 'string' },
};
/**

View File

@ -24,11 +24,11 @@ export const columns: BasicColumn[] = [
align: 'center',
dataIndex: 'campus',
},
{
title: '照片地址',
align: 'center',
dataIndex: 'photoAddress',
},
//{
// title: '照片地址',
// align: 'center',
// dataIndex: 'photoAddress',
//},
];
//查询数据
export const searchFormSchema: FormSchema[] = [];
@ -63,11 +63,11 @@ export const formSchema: FormSchema[] = [
field: 'campus',
component: 'Input',
},
{
label: '照片地址',
field: 'photoAddress',
component: 'Input',
},
//{
// label: '照片地址',
// field: 'photoAddress',
// component: 'Input',
//},
// TODO 主键隐藏字段目前写死为ID
{
label: '',

View File

@ -6,33 +6,32 @@ import { render } from '/@/utils/common/renderUtils';
export const columns: BasicColumn[] = [
{
title: '教师姓名',
align:"center",
dataIndex: 'name'
align: 'center',
dataIndex: 'name',
},
{
title: '年龄',
align:"center",
dataIndex: 'age'
align: 'center',
dataIndex: 'age',
},
{
title: '性别',
align:"center",
dataIndex: 'sex'
align: 'center',
dataIndex: 'sex',
},
{
title: '校区',
align:"center",
dataIndex: 'campus'
},
{
title: '照片地址',
align:"center",
dataIndex: 'photoAddress'
align: 'center',
dataIndex: 'campus',
},
//{
// title: '照片地址',
// align: 'center',
// dataIndex: 'photoAddress',
//},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
export const searchFormSchema: FormSchema[] = [];
//表单数据
export const formSchema: FormSchema[] = [
{
@ -40,9 +39,7 @@ export const formSchema: FormSchema[] = [
field: 'name',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [
{ required: true, message: '请输入教师姓名!'},
];
return [{ required: true, message: '请输入教师姓名!' }];
},
},
{
@ -50,9 +47,7 @@ export const formSchema: FormSchema[] = [
field: 'age',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [
{ required: true, message: '请输入年龄!'},
];
return [{ required: true, message: '请输入年龄!' }];
},
},
{
@ -60,9 +55,7 @@ export const formSchema: FormSchema[] = [
field: 'sex',
component: 'Input',
dynamicRules: ({ model, schema }) => {
return [
{ required: true, message: '请输入性别!'},
];
return [{ required: true, message: '请输入性别!' }];
},
},
{
@ -70,27 +63,27 @@ export const formSchema: FormSchema[] = [
field: 'campus',
component: 'Input',
},
{
label: '照片地址',
field: 'photoAddress',
component: 'Input',
},
//{
// label: '照片地址',
// field: 'photoAddress',
// component: 'Input',
//},
// TODO 主键隐藏字段目前写死为ID
{
label: '',
field: 'id',
component: 'Input',
show: false
show: false,
},
];
// 高级查询数据
export const superQuerySchema = {
name: {title: '教师姓名',order: 0,view: 'text', type: 'string',},
age: {title: '年龄',order: 1,view: 'text', type: 'string',},
sex: {title: '性别',order: 2,view: 'text', type: 'string',},
campus: {title: '校区',order: 3,view: 'text', type: 'string',},
photoAddress: {title: '照片地址',order: 4,view: 'text', type: 'string',},
name: { title: '教师姓名', order: 0, view: 'text', type: 'string' },
age: { title: '年龄', order: 1, view: 'text', type: 'string' },
sex: { title: '性别', order: 2, view: 'text', type: 'string' },
campus: { title: '校区', order: 3, view: 'text', type: 'string' },
photoAddress: { title: '照片地址', order: 4, view: 'text', type: 'string' },
};
/**

View File

@ -4,13 +4,13 @@ import { useMessage } from '/@/hooks/web/useMessage';
const { createConfirm } = useMessage();
enum Api {
list = '/teachers/cetTeachers/list',
save = '/teachers/cetTeachers/add',
edit = '/teachers/cetTeachers/edit',
deleteOne = '/teachers/cetTeachers/delete',
deleteBatch = '/teachers/cetTeachers/deleteBatch',
importExcel = '/teachers/cetTeachers/importExcel',
exportXls = '/teachers/cetTeachers/exportXls',
list = '/cet/cetTeachers/list',
save = '/cet/cetTeachers/add',
edit = '/cet/cetTeachers/edit',
deleteOne = '/cet/cetTeachers/delete',
deleteBatch = '/cet/cetTeachers/deleteBatch',
importExcel = '/cet/cetTeachers/importExcel',
exportXls = '/cet/cetTeachers/exportXls',
}
/**
* api

View File

@ -24,11 +24,11 @@ export const columns: BasicColumn[] = [
align: 'center',
dataIndex: 'campus',
},
{
title: '照片地址',
align: 'center',
dataIndex: 'photoAddress',
},
//{
// title: '照片地址',
// align: 'center',
// dataIndex: 'photoAddress',
//},
];
//查询数据
export const searchFormSchema: FormSchema[] = [];
@ -63,11 +63,11 @@ export const formSchema: FormSchema[] = [
field: 'campus',
component: 'Input',
},
{
label: '照片地址',
field: 'photoAddress',
component: 'Input',
},
//{
// label: '照片地址',
// field: 'photoAddress',
// component: 'Input',
//},
// TODO 主键隐藏字段目前写死为ID
{
label: '',

View File

@ -8,8 +8,8 @@
import { ref, computed, unref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchema } from '../../../../../../../../../../CetTeachers.data';
import { saveOrUpdate } from '../../../../../../../../../../CetTeachers.api';
import { formSchema } from '../CetTeachers.data';
import { saveOrUpdate } from '../CetTeachers.api';
// Emits
const emit = defineEmits(['register', 'success']);
const isUpdate = ref(true);