Compare commits
No commits in common. "6465aefc6f6d85c31357482e0f1ef145124c2f68" and "be44e6195a9b70cc82cc5f991a06344fb0da4c97" have entirely different histories.
6465aefc6f
...
be44e6195a
|
@ -8,11 +8,6 @@ const filterMajor = (value, row) => {
|
||||||
return row === value;
|
return row === value;
|
||||||
};
|
};
|
||||||
import { ref, onMounted,reactive } from 'vue';
|
import { ref, onMounted,reactive } from 'vue';
|
||||||
// 学科过滤方法
|
|
||||||
const filterMajor = (value, row) => {
|
|
||||||
console.log(value, row); // 打印过滤值和行数据
|
|
||||||
return row === value;
|
|
||||||
};
|
|
||||||
|
|
||||||
const groupOptions=ref()
|
const groupOptions=ref()
|
||||||
// 创建一个简单的事件总线
|
// 创建一个简单的事件总线
|
||||||
|
@ -57,15 +52,6 @@ export const columns: BasicColumn[] = [
|
||||||
filterMultiple: false, // 是否支持多选过滤
|
filterMultiple: false, // 是否支持多选过滤
|
||||||
//value: 用户选择的过滤值(如 1)。
|
//value: 用户选择的过滤值(如 1)。
|
||||||
onFilter: (value, record) => filterMajor(value, record.majorId), // 过滤方法
|
onFilter: (value, record) => filterMajor(value, record.majorId), // 过滤方法
|
||||||
filters: [
|
|
||||||
{ text: '语文', value: 1 },
|
|
||||||
{ text: '地理', value: 4 },
|
|
||||||
{ text: '历史', value: 7 },
|
|
||||||
{ text: '政治', value: 8 },
|
|
||||||
],
|
|
||||||
filterMultiple: false, // 是否支持多选过滤
|
|
||||||
//value: 用户选择的过滤值(如 1)。
|
|
||||||
onFilter: (value, record) => filterMajor(value, record.majorId), // 过滤方法
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '所属分组',
|
title: '所属分组',
|
||||||
|
@ -107,23 +93,20 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
];
|
];
|
||||||
//表单数据
|
//表单数据
|
||||||
export const formSchema: FormSchema[] = [
|
export const formSchema: FormSchema[] = [
|
||||||
|
//{
|
||||||
|
// label: '用户id',
|
||||||
|
// field: 'userId',
|
||||||
|
// component: 'Input',
|
||||||
|
// dynamicRules: ({ model, schema }) => {
|
||||||
|
// return [{ required: true, message: '请输入用户id!' }];
|
||||||
|
// },
|
||||||
|
//},
|
||||||
{
|
{
|
||||||
label: '用户id',
|
|
||||||
field: 'userId',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入用户id!' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
field: 'userName',
|
field: 'userName',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
return [{ required: true, message: '请输入姓名!' }];
|
return [{ required: true, message: '请输入姓名!' }];
|
||||||
return [{ required: true, message: '请输入姓名!' }];
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -133,9 +116,6 @@ export const formSchema: FormSchema[] = [
|
||||||
//dynamicRules: ({ model, schema }) => {
|
//dynamicRules: ({ model, schema }) => {
|
||||||
// return [{ required: true, message: '请输入工号!' }];
|
// return [{ required: true, message: '请输入工号!' }];
|
||||||
//},
|
//},
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入工号!' }];
|
|
||||||
//},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '手机号',
|
label: '手机号',
|
||||||
|
@ -177,9 +157,9 @@ export const formSchema: FormSchema[] = [
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: groupOptions, // 动态设置分组选项
|
options: groupOptions, // 动态设置分组选项
|
||||||
},
|
},
|
||||||
//dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
// return [{ required: true, message: '请选择分组!' }];
|
return [{ required: true, message: '请选择分组!' }];
|
||||||
//},
|
},
|
||||||
},
|
},
|
||||||
//{
|
//{
|
||||||
// label: '使用次数',
|
// label: '使用次数',
|
||||||
|
@ -189,14 +169,6 @@ export const formSchema: FormSchema[] = [
|
||||||
// return [{ required: true, message: '请输入使用次数!' }];
|
// return [{ required: true, message: '请输入使用次数!' }];
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
//{
|
|
||||||
// label: '使用次数',
|
|
||||||
// field: 'numberuse',
|
|
||||||
// component: 'InputNumber',
|
|
||||||
// dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入使用次数!' }];
|
|
||||||
// },
|
|
||||||
//},
|
|
||||||
{
|
{
|
||||||
label: '是否第一次阅卷',
|
label: '是否第一次阅卷',
|
||||||
field: 'status',
|
field: 'status',
|
||||||
|
@ -210,9 +182,6 @@ export const formSchema: FormSchema[] = [
|
||||||
//dynamicRules: ({ model, schema }) => {
|
//dynamicRules: ({ model, schema }) => {
|
||||||
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
||||||
//},
|
//},
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
|
||||||
//},
|
|
||||||
},
|
},
|
||||||
// TODO 主键隐藏字段,目前写死为ID
|
// TODO 主键隐藏字段,目前写死为ID
|
||||||
//{
|
//{
|
||||||
|
|
|
@ -99,16 +99,6 @@ export const columns: BasicColumn[] = [
|
||||||
// align: 'center',
|
// align: 'center',
|
||||||
// dataIndex: 'status',
|
// dataIndex: 'status',
|
||||||
//},
|
//},
|
||||||
//{
|
|
||||||
// title: '使用次数',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'numberuse',
|
|
||||||
//},
|
|
||||||
//{
|
|
||||||
// title: '状态',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'status',
|
|
||||||
//},
|
|
||||||
];
|
];
|
||||||
//查询数据
|
//查询数据
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
|
@ -121,14 +111,6 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
];
|
];
|
||||||
//表单数据
|
//表单数据
|
||||||
export const formSchema: FormSchema[] = [
|
export const formSchema: FormSchema[] = [
|
||||||
//{
|
|
||||||
// label: '用户id',
|
|
||||||
// field: 'userId',
|
|
||||||
// component: 'Input',
|
|
||||||
// dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入用户id!' }];
|
|
||||||
// },
|
|
||||||
//},
|
|
||||||
//{
|
//{
|
||||||
// label: '用户id',
|
// label: '用户id',
|
||||||
// field: 'userId',
|
// field: 'userId',
|
||||||
|
@ -138,29 +120,11 @@ export const formSchema: FormSchema[] = [
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
{
|
{
|
||||||
label: '学生名',
|
|
||||||
label: '学生名',
|
label: '学生名',
|
||||||
field: 'userName',
|
field: 'userName',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
return [{ required: true, message: '请输入学生名!' }];
|
return [{ required: true, message: '请输入学生名!' }];
|
||||||
return [{ required: true, message: '请输入学生名!' }];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '学科',
|
|
||||||
field: 'majorId',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '语文', value: 1 },
|
|
||||||
{ label: '地理', value: 4 },
|
|
||||||
{ label: '历史', value: 7 },
|
|
||||||
{ label: '政治', value: 8 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
dynamicRules: ({ model, schema }) => {
|
|
||||||
return [{ required: true, message: '请选择学科!' }];
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -169,7 +133,6 @@ export const formSchema: FormSchema[] = [
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
return [{ required: true, message: '请输入学号!' }];
|
return [{ required: true, message: '请输入学号!' }];
|
||||||
return [{ required: true, message: '请输入学号!' }];
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -227,9 +190,6 @@ export const formSchema: FormSchema[] = [
|
||||||
//dynamicRules: ({ model, schema }) => {
|
//dynamicRules: ({ model, schema }) => {
|
||||||
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
||||||
//},
|
//},
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
|
||||||
//},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属分组',
|
label: '所属分组',
|
||||||
|
@ -238,9 +198,9 @@ export const formSchema: FormSchema[] = [
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: groupOptions, // 动态设置分组选项
|
options: groupOptions, // 动态设置分组选项
|
||||||
},
|
},
|
||||||
//dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
// return [{ required: true, message: '请选择分组!' }];
|
return [{ required: true, message: '请选择分组!' }];
|
||||||
//},
|
},
|
||||||
},
|
},
|
||||||
//{
|
//{
|
||||||
// label: '使用次数',
|
// label: '使用次数',
|
||||||
|
@ -264,13 +224,13 @@ export const formSchema: FormSchema[] = [
|
||||||
// return [{ required: true, message: '请选择状态!' }];
|
// return [{ required: true, message: '请选择状态!' }];
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
// TODO 主键隐藏字段,目前写死为ID
|
//// TODO 主键隐藏字段,目前写死为ID
|
||||||
{
|
//{
|
||||||
label: '',
|
// label: '',
|
||||||
field: 'id',
|
// field: 'id',
|
||||||
component: 'Input',
|
// component: 'Input',
|
||||||
show: false,
|
// show: false,
|
||||||
},
|
//},
|
||||||
];
|
];
|
||||||
|
|
||||||
// 高级查询数据
|
// 高级查询数据
|
||||||
|
|
|
@ -10,12 +10,6 @@ const filterMajor = (value, row) => {
|
||||||
};
|
};
|
||||||
import { ref, onMounted,reactive } from 'vue';
|
import { ref, onMounted,reactive } from 'vue';
|
||||||
|
|
||||||
// 学科过滤方法
|
|
||||||
const filterMajor = (value, row) => {
|
|
||||||
console.log(value, row); // 打印过滤值和行数据
|
|
||||||
return row === value;
|
|
||||||
};
|
|
||||||
|
|
||||||
const groupOptions=ref()
|
const groupOptions=ref()
|
||||||
|
|
||||||
// 创建一个简单的事件总线
|
// 创建一个简单的事件总线
|
||||||
|
@ -60,15 +54,6 @@ export const columns: BasicColumn[] = [
|
||||||
filterMultiple: false, // 是否支持多选过滤
|
filterMultiple: false, // 是否支持多选过滤
|
||||||
//value: 用户选择的过滤值(如 1)。
|
//value: 用户选择的过滤值(如 1)。
|
||||||
onFilter: (value, record) => filterMajor(value, record.majorId), // 过滤方法
|
onFilter: (value, record) => filterMajor(value, record.majorId), // 过滤方法
|
||||||
filters: [
|
|
||||||
{ text: '语文', value: 1 },
|
|
||||||
{ text: '地理', value: 4 },
|
|
||||||
{ text: '历史', value: 7 },
|
|
||||||
{ text: '政治', value: 8 },
|
|
||||||
],
|
|
||||||
filterMultiple: false, // 是否支持多选过滤
|
|
||||||
//value: 用户选择的过滤值(如 1)。
|
|
||||||
onFilter: (value, record) => filterMajor(value, record.majorId), // 过滤方法
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '手机号',
|
title: '手机号',
|
||||||
|
@ -102,7 +87,6 @@ export const columns: BasicColumn[] = [
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'dormitory',
|
dataIndex: 'dormitory',
|
||||||
},
|
},
|
||||||
|
|
||||||
//{
|
//{
|
||||||
// title: '用户专业id',
|
// title: '用户专业id',
|
||||||
// align: 'center',
|
// align: 'center',
|
||||||
|
@ -118,7 +102,6 @@ export const columns: BasicColumn[] = [
|
||||||
// align: 'center',
|
// align: 'center',
|
||||||
// dataIndex: 'mealCard',
|
// dataIndex: 'mealCard',
|
||||||
//},
|
//},
|
||||||
|
|
||||||
//{
|
//{
|
||||||
// title: '工作名称',
|
// title: '工作名称',
|
||||||
// align: 'center',
|
// align: 'center',
|
||||||
|
@ -172,12 +155,6 @@ export const columns: BasicColumn[] = [
|
||||||
];
|
];
|
||||||
//查询数据
|
//查询数据
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
//{
|
|
||||||
// label: '学科',
|
|
||||||
// field: 'majorId',
|
|
||||||
// component: 'JRangeNumber',
|
|
||||||
// //colProps: {span: 6},
|
|
||||||
//},
|
|
||||||
//{
|
//{
|
||||||
// label: '学科',
|
// label: '学科',
|
||||||
// field: 'majorId',
|
// field: 'majorId',
|
||||||
|
@ -221,9 +198,6 @@ export const formSchema: FormSchema[] = [
|
||||||
label: '年龄',
|
label: '年龄',
|
||||||
field: 'age',
|
field: 'age',
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
label: '年龄',
|
|
||||||
field: 'age',
|
|
||||||
component: 'InputNumber',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '性别',
|
label: '性别',
|
||||||
|
@ -237,9 +211,6 @@ export const formSchema: FormSchema[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '学科',
|
|
||||||
field: 'majorId',
|
|
||||||
component: 'Select',
|
|
||||||
label: '学科',
|
label: '学科',
|
||||||
field: 'majorId',
|
field: 'majorId',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
|
@ -249,10 +220,6 @@ export const formSchema: FormSchema[] = [
|
||||||
{ label: '地理', value: 4 },
|
{ label: '地理', value: 4 },
|
||||||
{ label: '历史', value: 7 },
|
{ label: '历史', value: 7 },
|
||||||
{ label: '政治', value: 8 },
|
{ label: '政治', value: 8 },
|
||||||
{ label: '语文', value: 1 },
|
|
||||||
{ label: '地理', value: 4 },
|
|
||||||
{ label: '历史', value: 7 },
|
|
||||||
{ label: '政治', value: 8 },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
|
@ -268,25 +235,6 @@ export const formSchema: FormSchema[] = [
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
|
|
||||||
{
|
|
||||||
label: '手机号',
|
|
||||||
field: 'phone',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入手机号!' }];
|
|
||||||
//},
|
|
||||||
return [{ required: true, message: '请选择学科!' }];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
//{
|
|
||||||
// label: '用户专业id',
|
|
||||||
// field: 'userMajorId',
|
|
||||||
// component: 'Input',
|
|
||||||
// dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入用户专业id!' }];
|
|
||||||
// },
|
|
||||||
//},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
label: '手机号',
|
label: '手机号',
|
||||||
field: 'phone',
|
field: 'phone',
|
||||||
|
@ -354,77 +302,8 @@ export const formSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
label: '车牌号',
|
label: '车牌号',
|
||||||
field: 'carNumber',
|
field: 'carNumber',
|
||||||
label: '职称',
|
|
||||||
field: 'jobTitle',
|
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
//dynamicRules: ({ model, schema }) => {
|
//dynamicRules: ({ model, schema }) => {
|
||||||
// return [{ required: true, message: '请输入职称!' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '职务',
|
|
||||||
field: 'office',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入办公位!' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '单位名称',
|
|
||||||
field: 'workName',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入单位名称!' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '单位电话',
|
|
||||||
field: 'workPhone',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入单位电话!' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '银行卡号',
|
|
||||||
field: 'pyCard',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入银行卡号!' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '开户地区',
|
|
||||||
field: 'bankAddress',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入开户地区(北京,哈尔滨)' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '开户行',
|
|
||||||
field: 'bankName',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入开户行!' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '车牌号',
|
|
||||||
field: 'carNumber',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入车牌号!' }];
|
|
||||||
//},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '饭卡',
|
|
||||||
field: 'mealCard',
|
|
||||||
component: 'Input',
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入饭卡!' }];
|
|
||||||
//},
|
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入车牌号!' }];
|
// return [{ required: true, message: '请输入车牌号!' }];
|
||||||
//},
|
//},
|
||||||
},
|
},
|
||||||
|
@ -449,22 +328,18 @@ export const formSchema: FormSchema[] = [
|
||||||
//dynamicRules: ({ model, schema }) => {
|
//dynamicRules: ({ model, schema }) => {
|
||||||
// return [{ required: true, message: '请输入是否住宿!' }];
|
// return [{ required: true, message: '请输入是否住宿!' }];
|
||||||
//},
|
//},
|
||||||
//dynamicRules: ({ model, schema }) => {
|
|
||||||
// return [{ required: true, message: '请输入是否住宿!' }];
|
|
||||||
//},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属分组',
|
label: '所属分组',
|
||||||
field: 'groupId',
|
field: 'groupId',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: groupOptions, // 动态设置分组选项
|
options: groupOptions, // 动态设置分组选项
|
||||||
},
|
},
|
||||||
dynamicRules: ({ model, schema }) => {
|
dynamicRules: ({ model, schema }) => {
|
||||||
return [{ required: true, message: '请选择分组!' }];
|
return [{ required: true, message: '请选择分组!' }];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: '车辆是否入校',
|
label: '车辆是否入校',
|
||||||
field: 'carStatus',
|
field: 'carStatus',
|
||||||
|
@ -475,10 +350,11 @@ export const formSchema: FormSchema[] = [
|
||||||
{ label: '否', value: 1 },
|
{ label: '否', value: 1 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
}
|
||||||
//dynamicRules: ({ model, schema }) => {
|
//dynamicRules: ({ model, schema }) => {
|
||||||
// return [{ required: true, message: '请输入车辆是否入校!' }];
|
// return [{ required: true, message: '请输入车辆是否入校!' }];
|
||||||
//},
|
//},
|
||||||
},
|
|
||||||
//{
|
//{
|
||||||
// label: '住宿信息',
|
// label: '住宿信息',
|
||||||
// field: 'dormitory',
|
// field: 'dormitory',
|
||||||
|
@ -519,12 +395,12 @@ export const formSchema: FormSchema[] = [
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
//// TODO 主键隐藏字段,目前写死为ID
|
//// TODO 主键隐藏字段,目前写死为ID
|
||||||
{
|
//{
|
||||||
label: '',
|
// label: '',
|
||||||
field: 'id',
|
// field: 'id',
|
||||||
component: 'Input',
|
// component: 'Input',
|
||||||
show: false,
|
// show: false,
|
||||||
},
|
//},
|
||||||
];
|
];
|
||||||
|
|
||||||
// 高级查询数据
|
// 高级查询数据
|
||||||
|
|
|
@ -3,80 +3,67 @@
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" ref="tableRef" :expandedRowKeys="expandedKeys"
|
<BasicTable @register="registerTable" :rowSelection="rowSelection" ref="tableRef" :expandedRowKeys="expandedKeys"
|
||||||
rowKey="id" :expandedRowRender="renderExpandedRow" @expand="handleExpand">
|
rowKey="id" :expandedRowRender="renderExpandedRow" @expand="handleExpand">
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" ref="tableRef" :expandedRowKeys="expandedKeys"
|
<!--插槽:table标题-->
|
||||||
rowKey="id" :expandedRowRender="renderExpandedRow" @expand="handleExpand">
|
<template #tableTitle>
|
||||||
<!--插槽:table标题-->
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
<template #tableTitle>
|
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
<template #overlay>
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-menu>
|
||||||
<template #overlay>
|
<a-menu-item key="1" @click="batchHandleDelete">
|
||||||
<a-menu>
|
<Icon icon="ant-design:delete-outlined" />
|
||||||
<a-menu-item key="1" @click="batchHandleDelete">
|
删除
|
||||||
<Icon icon="ant-design:delete-outlined" />
|
</a-menu-item>
|
||||||
删除
|
</a-menu>
|
||||||
</a-menu-item>
|
</template>
|
||||||
</a-menu>
|
<a-button>批量操作
|
||||||
</template>
|
<Icon icon="mdi:chevron-down" />
|
||||||
<a-button>批量操作
|
</a-button>
|
||||||
<Icon icon="mdi:chevron-down" />
|
</a-dropdown>
|
||||||
</a-button>
|
<!-- 高级查询 -->
|
||||||
</a-dropdown>
|
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||||
<!-- 高级查询 -->
|
</template>
|
||||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
<!--操作栏-->
|
||||||
</template>
|
<template #action="{ record }">
|
||||||
<!--操作栏-->
|
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||||
<template #action="{ record }">
|
</template>
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
<!--字段回显插槽-->
|
||||||
</template>
|
<template #bodyCell="{ column, record, index, text }">
|
||||||
<!--字段回显插槽-->
|
<span v-if="column.dataIndex === 'sex'">
|
||||||
<template #bodyCell="{ column, record, index, text }">
|
<a-tag v-if="record.sex === 0" color="green">男</a-tag>
|
||||||
<span v-if="column.dataIndex === 'sex'">
|
<a-tag v-else-if="record.sex !== 0" color="red">女</a-tag>
|
||||||
<a-tag v-if="record.sex === 0" color="green">男</a-tag>
|
</span>
|
||||||
<a-tag v-else-if="record.sex !== 0" color="red">女</a-tag>
|
<span v-if="column.dataIndex === 'status'">
|
||||||
<a-tag v-if="record.sex === 0" color="green">男</a-tag>
|
<a-tag v-if="record.status === 0" color="green">已报到</a-tag>
|
||||||
<a-tag v-else-if="record.sex !== 0" color="red">女</a-tag>
|
<a-tag v-else-if="record.status !== 0" color="red">未报到</a-tag>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="column.dataIndex === 'status'">
|
<span v-if="column.dataIndex === 'carStatus'">
|
||||||
<a-tag v-if="record.status === 0" color="green">已报到</a-tag>
|
<a-tag v-if="record.carStatus === 0" color="green">是</a-tag>
|
||||||
<a-tag v-else-if="record.status !== 0" color="red">未报到</a-tag>
|
<a-tag v-else-if="record.carStatus !== 0" color="red">否</a-tag>
|
||||||
<a-tag v-if="record.status === 0" color="green">已报到</a-tag>
|
</span>
|
||||||
<a-tag v-else-if="record.status !== 0" color="red">未报到</a-tag>
|
<span v-if="column.dataIndex === 'dormitoryStatus'">
|
||||||
</span>
|
<a-tag v-if="record.dormitoryStatus === 0" color="green">是</a-tag>
|
||||||
<span v-if="column.dataIndex === 'carStatus'">
|
<a-tag v-else-if="record.dormitoryStatus !== 0" color="red">否</a-tag>
|
||||||
<a-tag v-if="record.carStatus === 0" color="green">是</a-tag>
|
</span>
|
||||||
<a-tag v-else-if="record.carStatus !== 0" color="red">否</a-tag>
|
<span v-if="column.dataIndex === 'majorId'">
|
||||||
</span>
|
<span>{{ record.majorIdDescription }}</span>
|
||||||
<span v-if="column.dataIndex === 'dormitoryStatus'">
|
</span>
|
||||||
<a-tag v-if="record.dormitoryStatus === 0" color="green">是</a-tag>
|
</template>
|
||||||
<a-tag v-else-if="record.dormitoryStatus !== 0" color="red">否</a-tag>
|
</BasicTable>
|
||||||
</span>
|
<!-- 表单区域 -->
|
||||||
<span v-if="column.dataIndex === 'majorId'">
|
<CeesWaiTeacherModal @register="registerModal" @success="handleSuccess" />
|
||||||
<span>{{ record.majorIdDescription }}</span>
|
|
||||||
</span>
|
|
||||||
<span v-if="column.dataIndex === 'majorId'">
|
|
||||||
<span>{{ record.majorIdDescription }}</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<CeesWaiTeacherModal @register="registerModal" @success="handleSuccess" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="tsx" name="cees-ceesWaiTeacher" setup>
|
<script lang="tsx" name="cees-ceesWaiTeacher" setup>
|
||||||
import { ref, reactive, computed, unref, onMounted } from 'vue';
|
import { ref, reactive, computed, unref, onMounted } from 'vue';
|
||||||
<script lang="tsx" name = "cees-ceesWaiTeacher" setup >
|
|
||||||
import { ref, reactive, computed, unref, onMounted } from 'vue';
|
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import CeesWaiTeacherModal from './components/CeesWaiTeacherModal.vue';
|
import CeesWaiTeacherModal from './components/CeesWaiTeacherModal.vue';
|
||||||
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './CeesWaiTeacher.data';
|
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './CeesWaiTeacher.data';
|
||||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getGroup } from './CeesWaiTeacher.api';
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getGroup } from './CeesWaiTeacher.api';
|
||||||
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './CeesWaiTeacher.data';
|
|
||||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getGroup } from './CeesWaiTeacher.api';
|
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
|
@ -117,6 +104,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
success: handleSuccess,
|
success: handleSuccess,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// 指定默认展开的行(根据 rowKey 属性传入行的 key 值)
|
// 指定默认展开的行(根据 rowKey 属性传入行的 key 值)
|
||||||
const expandedKeys = ref<string[]>(['1']); // 默认展开第一行
|
const expandedKeys = ref<string[]>(['1']); // 默认展开第一行
|
||||||
// 定义展开行内容的渲染函数
|
// 定义展开行内容的渲染函数
|
||||||
|
@ -141,12 +129,8 @@ const handleExpand = (expanded: boolean, record: Record<string, any>) => {
|
||||||
if (!expandedKeys.value.includes(record.id)) {
|
if (!expandedKeys.value.includes(record.id)) {
|
||||||
expandedKeys.value.push(record.id);
|
expandedKeys.value.push(record.id);
|
||||||
}
|
}
|
||||||
if (!expandedKeys.value.includes(record.id)) {
|
|
||||||
expandedKeys.value.push(record.id);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
expandedKeys.value = expandedKeys.value.filter((key) => key !== record.id);
|
expandedKeys.value = expandedKeys.value.filter((key) => key !== record.id);
|
||||||
expandedKeys.value = expandedKeys.value.filter((key) => key !== record.id);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||||
|
|
Loading…
Reference in New Issue