revert 6465aefc6f
revert Merge branch 'new-1.0' of http://62.234.217.137:3000/Big-Data-Lab/CEES-manage into new-1.0
This commit is contained in:
parent
6465aefc6f
commit
16ef241f4d
|
@ -2,11 +2,6 @@ import { BasicColumn } from '/@/components/Table';
|
|||
import { FormSchema } from '/@/components/Table';
|
||||
import { rules } from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
// 学科过滤方法
|
||||
const filterMajor = (value, row) => {
|
||||
console.log(value, row); // 打印过滤值和行数据
|
||||
return row === value;
|
||||
};
|
||||
import { ref, onMounted,reactive } from 'vue';
|
||||
// 学科过滤方法
|
||||
const filterMajor = (value, row) => {
|
||||
|
@ -57,15 +52,6 @@ export const columns: BasicColumn[] = [
|
|||
filterMultiple: false, // 是否支持多选过滤
|
||||
//value: 用户选择的过滤值(如 1)。
|
||||
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: '所属分组',
|
||||
|
@ -90,11 +76,13 @@ export const columns: BasicColumn[] = [
|
|||
// dataIndex: 'userMajorId',
|
||||
//},
|
||||
|
||||
|
||||
//{
|
||||
// title: '使用次数',
|
||||
// align: 'center',
|
||||
// dataIndex: 'numberuse',
|
||||
//},
|
||||
|
||||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
|
@ -117,13 +105,11 @@ export const formSchema: FormSchema[] = [
|
|||
//},
|
||||
},
|
||||
{
|
||||
label: '姓名',
|
||||
label: '姓名',
|
||||
field: 'userName',
|
||||
component: 'Input',
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
return [{ required: true, message: '请输入姓名!' }];
|
||||
return [{ required: true, message: '请输入姓名!' }];
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -133,9 +119,6 @@ export const formSchema: FormSchema[] = [
|
|||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入工号!' }];
|
||||
//},
|
||||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入工号!' }];
|
||||
//},
|
||||
},
|
||||
{
|
||||
label: '手机号',
|
||||
|
@ -145,33 +128,8 @@ export const formSchema: FormSchema[] = [
|
|||
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: '请选择学科!' }];
|
||||
// },
|
||||
//},
|
||||
//{
|
||||
// label: '用户专业id',
|
||||
// field: 'userMajorId',
|
||||
// component: 'Input',
|
||||
// dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入用户专业id!' }];
|
||||
// },
|
||||
//},
|
||||
|
||||
{
|
||||
label: '所属组',
|
||||
label: '所属分组',
|
||||
field: 'groupId',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
@ -189,14 +147,6 @@ export const formSchema: FormSchema[] = [
|
|||
// return [{ required: true, message: '请输入使用次数!' }];
|
||||
// },
|
||||
//},
|
||||
//{
|
||||
// label: '使用次数',
|
||||
// field: 'numberuse',
|
||||
// component: 'InputNumber',
|
||||
// dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入使用次数!' }];
|
||||
// },
|
||||
//},
|
||||
{
|
||||
label: '是否第一次阅卷',
|
||||
field: 'status',
|
||||
|
@ -210,17 +160,14 @@ export const formSchema: FormSchema[] = [
|
|||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
||||
//},
|
||||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
||||
//},
|
||||
},
|
||||
// TODO 主键隐藏字段,目前写死为ID
|
||||
//{
|
||||
// label: '',
|
||||
// field: 'id',
|
||||
// component: 'Input',
|
||||
// show: false,
|
||||
//},
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
|
|
|
@ -91,53 +91,6 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
import { ref, reactive, computed, unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import CeesLocalTeacherModal from './components/CeesLocalTeacherModal.vue';
|
||||
import { columns, searchFormSchema, superQuerySchema } from './CeesLocalTeacher.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './CeesLocalTeacher.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const queryParam = reactive<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const userStore = useUserStore();
|
||||
//注册model
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '本校教师表',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
formConfig: {
|
||||
//labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
showAdvancedButton: true,
|
||||
fieldMapToNumber: [],
|
||||
fieldMapToTime: [],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '本校教师表',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
|
||||
|
|
|
@ -99,16 +99,6 @@ export const columns: BasicColumn[] = [
|
|||
// align: 'center',
|
||||
// dataIndex: 'status',
|
||||
//},
|
||||
//{
|
||||
// title: '使用次数',
|
||||
// align: 'center',
|
||||
// dataIndex: 'numberuse',
|
||||
//},
|
||||
//{
|
||||
// title: '状态',
|
||||
// align: 'center',
|
||||
// dataIndex: 'status',
|
||||
//},
|
||||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
|
@ -121,14 +111,6 @@ export const searchFormSchema: FormSchema[] = [
|
|||
];
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
//{
|
||||
// label: '用户id',
|
||||
// field: 'userId',
|
||||
// component: 'Input',
|
||||
// dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入用户id!' }];
|
||||
// },
|
||||
//},
|
||||
//{
|
||||
// label: '用户id',
|
||||
// field: 'userId',
|
||||
|
@ -138,13 +120,11 @@ export const formSchema: FormSchema[] = [
|
|||
// },
|
||||
//},
|
||||
{
|
||||
label: '学生名',
|
||||
label: '学生名',
|
||||
field: 'userName',
|
||||
component: 'Input',
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
return [{ required: true, message: '请输入学生名!' }];
|
||||
return [{ required: true, message: '请输入学生名!' }];
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -169,10 +149,8 @@ export const formSchema: FormSchema[] = [
|
|||
component: 'Input',
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
return [{ required: true, message: '请输入学号!' }];
|
||||
return [{ required: true, message: '请输入学号!' }];
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
label: '手机号',
|
||||
field: 'phone',
|
||||
|
@ -181,39 +159,6 @@ export const formSchema: FormSchema[] = [
|
|||
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: '请选择学科!' }];
|
||||
// },
|
||||
//},
|
||||
//{
|
||||
// label: '用户专业id',
|
||||
// field: 'userMajorId',
|
||||
// component: 'Input',
|
||||
// dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入用户专业id!' }];
|
||||
// },
|
||||
//},
|
||||
|
||||
{
|
||||
label: '所属组',
|
||||
field: 'groupId',
|
||||
component: 'InputNumber',
|
||||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入组id!' }];
|
||||
//},
|
||||
},
|
||||
{
|
||||
label: '是否第一次阅卷',
|
||||
field: 'checked',
|
||||
|
@ -227,9 +172,6 @@ export const formSchema: FormSchema[] = [
|
|||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
||||
//},
|
||||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请选择是否第一次阅卷!' }];
|
||||
//},
|
||||
},
|
||||
{
|
||||
label: '所属分组',
|
||||
|
|
|
@ -2,12 +2,6 @@ import { BasicColumn } from '/@/components/Table';
|
|||
import { FormSchema } from '/@/components/Table';
|
||||
import { rules } from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
|
||||
// 学科过滤方法
|
||||
const filterMajor = (value, row) => {
|
||||
console.log(value, row); // 打印过滤值和行数据
|
||||
return row === value;
|
||||
};
|
||||
import { ref, onMounted,reactive } from 'vue';
|
||||
|
||||
// 学科过滤方法
|
||||
|
@ -60,15 +54,6 @@ export const columns: BasicColumn[] = [
|
|||
filterMultiple: false, // 是否支持多选过滤
|
||||
//value: 用户选择的过滤值(如 1)。
|
||||
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: '手机号',
|
||||
|
@ -172,12 +157,6 @@ export const columns: BasicColumn[] = [
|
|||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
//{
|
||||
// label: '学科',
|
||||
// field: 'majorId',
|
||||
// component: 'JRangeNumber',
|
||||
// //colProps: {span: 6},
|
||||
//},
|
||||
//{
|
||||
// label: '学科',
|
||||
// field: 'majorId',
|
||||
|
@ -221,9 +200,6 @@ export const formSchema: FormSchema[] = [
|
|||
label: '年龄',
|
||||
field: 'age',
|
||||
component: 'InputNumber',
|
||||
label: '年龄',
|
||||
field: 'age',
|
||||
component: 'InputNumber',
|
||||
},
|
||||
{
|
||||
label: '性别',
|
||||
|
@ -237,9 +213,6 @@ export const formSchema: FormSchema[] = [
|
|||
},
|
||||
},
|
||||
{
|
||||
label: '学科',
|
||||
field: 'majorId',
|
||||
component: 'Select',
|
||||
label: '学科',
|
||||
field: 'majorId',
|
||||
component: 'Select',
|
||||
|
@ -249,10 +222,6 @@ export const formSchema: FormSchema[] = [
|
|||
{ label: '地理', value: 4 },
|
||||
{ label: '历史', value: 7 },
|
||||
{ label: '政治', value: 8 },
|
||||
{ label: '语文', value: 1 },
|
||||
{ label: '地理', value: 4 },
|
||||
{ label: '历史', value: 7 },
|
||||
{ label: '政治', value: 8 },
|
||||
],
|
||||
},
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
|
@ -268,25 +237,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: '手机号',
|
||||
field: 'phone',
|
||||
|
@ -354,77 +304,8 @@ export const formSchema: FormSchema[] = [
|
|||
{
|
||||
label: '车牌号',
|
||||
field: 'carNumber',
|
||||
label: '职称',
|
||||
field: 'jobTitle',
|
||||
component: 'Input',
|
||||
//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: '请输入车牌号!' }];
|
||||
//},
|
||||
},
|
||||
|
@ -449,9 +330,6 @@ export const formSchema: FormSchema[] = [
|
|||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入是否住宿!' }];
|
||||
//},
|
||||
//dynamicRules: ({ model, schema }) => {
|
||||
// return [{ required: true, message: '请输入是否住宿!' }];
|
||||
//},
|
||||
},
|
||||
{
|
||||
label: '所属分组',
|
||||
|
@ -530,7 +408,7 @@ export const formSchema: FormSchema[] = [
|
|||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
userId: { title: '用户ID', order: 0, view: 'text', type: 'string' },
|
||||
majorId: { title: '学科', order: 1, view: 'text', type: 'number' },
|
||||
majorId: { title: '学科', order: 1, view: 'number', type: 'number' },
|
||||
userMajorId: { title: '用户专业id', order: 2, view: 'text', type: 'string' },
|
||||
userName: { title: '姓名', order: 3, view: 'text', type: 'string' },
|
||||
phone: { title: '手机号', order: 4, view: 'text', type: 'string' },
|
||||
|
|
|
@ -3,80 +3,67 @@
|
|||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" ref="tableRef" :expandedRowKeys="expandedKeys"
|
||||
rowKey="id" :expandedRowRender="renderExpandedRow" @expand="handleExpand">
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" ref="tableRef" :expandedRowKeys="expandedKeys"
|
||||
rowKey="id" :expandedRowRender="renderExpandedRow" @expand="handleExpand">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined" />
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button>批量操作
|
||||
<Icon icon="mdi:chevron-down" />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template #bodyCell="{ column, record, index, text }">
|
||||
<span v-if="column.dataIndex === 'sex'">
|
||||
<a-tag v-if="record.sex === 0" color="green">男</a-tag>
|
||||
<a-tag v-else-if="record.sex !== 0" color="red">女</a-tag>
|
||||
<a-tag v-if="record.sex === 0" color="green">男</a-tag>
|
||||
<a-tag v-else-if="record.sex !== 0" color="red">女</a-tag>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'status'">
|
||||
<a-tag v-if="record.status === 0" color="green">已报到</a-tag>
|
||||
<a-tag v-else-if="record.status !== 0" color="red">未报到</a-tag>
|
||||
<a-tag v-if="record.status === 0" color="green">已报到</a-tag>
|
||||
<a-tag v-else-if="record.status !== 0" color="red">未报到</a-tag>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'carStatus'">
|
||||
<a-tag v-if="record.carStatus === 0" color="green">是</a-tag>
|
||||
<a-tag v-else-if="record.carStatus !== 0" color="red">否</a-tag>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'dormitoryStatus'">
|
||||
<a-tag v-if="record.dormitoryStatus === 0" color="green">是</a-tag>
|
||||
<a-tag v-else-if="record.dormitoryStatus !== 0" color="red">否</a-tag>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'majorId'">
|
||||
<span>{{ record.majorIdDescription }}</span>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'majorId'">
|
||||
<span>{{ record.majorIdDescription }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<CeesWaiTeacherModal @register="registerModal" @success="handleSuccess" />
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined" />
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button>批量操作
|
||||
<Icon icon="mdi:chevron-down" />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template #bodyCell="{ column, record, index, text }">
|
||||
<span v-if="column.dataIndex === 'sex'">
|
||||
<a-tag v-if="record.sex === 0" color="green">男</a-tag>
|
||||
<a-tag v-else-if="record.sex !== 0" color="red">女</a-tag>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'status'">
|
||||
<a-tag v-if="record.status === 0" color="green">已报到</a-tag>
|
||||
<a-tag v-else-if="record.status !== 0" color="red">未报到</a-tag>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'carStatus'">
|
||||
<a-tag v-if="record.carStatus === 0" color="green">是</a-tag>
|
||||
<a-tag v-else-if="record.carStatus !== 0" color="red">否</a-tag>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'dormitoryStatus'">
|
||||
<a-tag v-if="record.dormitoryStatus === 0" color="green">是</a-tag>
|
||||
<a-tag v-else-if="record.dormitoryStatus !== 0" color="red">否</a-tag>
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'majorId'">
|
||||
<span>{{ record.majorIdDescription }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<CeesWaiTeacherModal @register="registerModal" @success="handleSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="tsx" name="cees-ceesWaiTeacher" setup>
|
||||
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 { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import CeesWaiTeacherModal from './components/CeesWaiTeacherModal.vue';
|
||||
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './CeesWaiTeacher.data';
|
||||
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 { useUserStore } from '/@/store/modules/user';
|
||||
const queryParam = reactive<any>({});
|
||||
|
@ -141,12 +128,8 @@ const handleExpand = (expanded: boolean, record: Record<string, any>) => {
|
|||
if (!expandedKeys.value.includes(record.id)) {
|
||||
expandedKeys.value.push(record.id);
|
||||
}
|
||||
if (!expandedKeys.value.includes(record.id)) {
|
||||
expandedKeys.value.push(record.id);
|
||||
}
|
||||
} else {
|
||||
expandedKeys.value = expandedKeys.value.filter((key) => key !== record.id);
|
||||
expandedKeys.value = expandedKeys.value.filter((key) => key !== record.id);
|
||||
}
|
||||
};
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
|
|
Loading…
Reference in New Issue