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:
commit
d3d5587c58
|
@ -1,22 +1,23 @@
|
|||
import {defHttp} from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/CEES/ceesLocalTeacher/list',
|
||||
save='/CEES/ceesLocalTeacher/add',
|
||||
edit='/CEES/ceesLocalTeacher/edit',
|
||||
save = '/CEES/ceesLocalTeacher/add',
|
||||
edit = '/CEES/ceesLocalTeacher/edit',
|
||||
deleteOne = '/CEES/ceesLocalTeacher/delete',
|
||||
deleteBatch = '/CEES/ceesLocalTeacher/deleteBatch',
|
||||
importExcel = '/CEES/ceesLocalTeacher/importExcel',
|
||||
exportXls = '/CEES/ceesLocalTeacher/exportXls',
|
||||
updateGroupUser = '/cees/ceesGroup/updateGroupUser',
|
||||
batchGroup = '/CEES/ceesLocalTeacher/batchGroup',
|
||||
}
|
||||
|
||||
//获取分组
|
||||
export const getGroup = () =>
|
||||
defHttp.get({url: '/cees/ceesGroup/list'}).then((res) => {
|
||||
defHttp.get({ url: '/cees/ceesGroup/list' }).then((res) => {
|
||||
return res.records;
|
||||
});
|
||||
/**
|
||||
|
@ -32,17 +33,16 @@ export const getImportUrl = Api.importExcel;
|
|||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) =>
|
||||
defHttp.get({url: Api.list, params});
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
export const deleteOne = (params, handleSuccess) => {
|
||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
|
@ -55,29 +55,48 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 批量分组
|
||||
* @param params
|
||||
*/
|
||||
export const batchGroup = (params, handleSuccess) => {
|
||||
console.log('params', params);
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认分组',
|
||||
content: '是否分组选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.post({ url: Api.batchGroup, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
//更新分组中间表
|
||||
export const updateGroupUser = (params) => {
|
||||
return defHttp.post({url: Api.updateGroupUser, params});
|
||||
}
|
||||
return defHttp.post({ url: Api.updateGroupUser, params });
|
||||
};
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
const url = isUpdate ? Api.edit : Api.save;
|
||||
// 更新分组中间表
|
||||
const groupUserParams = {
|
||||
userId: params.userId,
|
||||
groupId: params.groupId
|
||||
}
|
||||
groupId: params.groupId,
|
||||
};
|
||||
updateGroupUser(groupUserParams);
|
||||
return defHttp.post({url: url, params});
|
||||
}
|
||||
return defHttp.post({ url: url, params });
|
||||
};
|
||||
|
|
|
@ -14,9 +14,14 @@
|
|||
<Icon icon="ant-design:delete-outlined" />
|
||||
删除
|
||||
</a-menu-item>
|
||||
<a-menu-item key="1" @click="batchHandleGroup">
|
||||
<Icon icon="ant-design:usergroup-add-outlined" />
|
||||
分组
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button>批量操作
|
||||
<a-button
|
||||
>批量操作
|
||||
<Icon icon="mdi:chevron-down" />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
|
@ -40,168 +45,194 @@
|
|||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<CeesLocalTeacherModal @register="registerModal" @success="handleSuccess" />
|
||||
<GroupSelectModal ref="groupModalRef" @register="registerGroupModal" @success="handleGroupSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="CEES-ceesLocalTeacher" 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 CeesLocalTeacherModal from './components/CeesLocalTeacherModal.vue';
|
||||
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './CeesLocalTeacher.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getGroup } 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;
|
||||
|
||||
// 在组件加载时获取分组数据
|
||||
const groupOptions = ref<{ label: string; value: number }[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
console.log('组件已加载');
|
||||
try {
|
||||
const res = await getGroup();
|
||||
console.log('获取分组数据成功:', res);
|
||||
groupOptions.value = res.map((group) => ({
|
||||
label: group.name, // 假设分组名称字段为 name
|
||||
value: group.id, // 假设分组 ID 字段为 id
|
||||
}));
|
||||
console.log('分组数据:', groupOptions.value);
|
||||
updateGroupOptions.updateGroupOptions(groupOptions.value)
|
||||
} catch (error) {
|
||||
console.error('获取分组数据失败:', error);
|
||||
}
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
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 CeesLocalTeacherModal from './components/CeesLocalTeacherModal.vue';
|
||||
import GroupSelectModal from './components/GroupSelectModal.vue';
|
||||
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './CeesLocalTeacher.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getGroup, batchGroup } 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();
|
||||
const [registerGroupModal, { openModal: openGroupModal }] = useModal();
|
||||
const groupModalRef = ref<any>(null);
|
||||
//注册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;
|
||||
|
||||
// 在组件加载时获取分组数据
|
||||
const groupOptions = ref<{ label: string; value: number }[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
console.log('组件已加载');
|
||||
try {
|
||||
const res = await getGroup();
|
||||
console.log('获取分组数据成功:', res);
|
||||
groupOptions.value = res.map((group) => ({
|
||||
label: group.name, // 假设分组名称字段为 name
|
||||
value: group.id, // 假设分组 ID 字段为 id
|
||||
}));
|
||||
console.log('分组数据:', groupOptions.value);
|
||||
updateGroupOptions.updateGroupOptions(groupOptions.value);
|
||||
} catch (error) {
|
||||
console.error('获取分组数据失败:', error);
|
||||
}
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量分组事件
|
||||
*/
|
||||
async function batchHandleGroup() {
|
||||
//if (selectedRowKeys.value.length === 0) {
|
||||
// return;
|
||||
//}
|
||||
groupModalRef.value?.setGroupOptions(groupOptions.value);
|
||||
openGroupModal(true);
|
||||
}
|
||||
/**
|
||||
* 分组选好后的确认事件
|
||||
*/
|
||||
async function handleGroupSuccess(groupId) {
|
||||
console.log('asdfasd');
|
||||
try {
|
||||
console.log('111');
|
||||
await batchGroup({ ids: selectedRowKeys.value, groupId }, handleSuccess);
|
||||
} catch (error) {
|
||||
console.error('批量分组失败:', error);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" title="所属分组" @ok="handleOk" :canFullscreen="false">
|
||||
<div class="group-select-modal">
|
||||
<div class="form-wrapper">
|
||||
<div class="form-item">
|
||||
<span class="required-label">所属分组:</span>
|
||||
<a-select v-model:value="formState.groupId" placeholder="请选择所属分组" class="select-width">
|
||||
<a-select-option v-for="item in groupOptions" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const formState = ref({
|
||||
groupId: null,
|
||||
});
|
||||
|
||||
const groupOptions = ref<{ label: string; value: number }[]>([]);
|
||||
|
||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
||||
formState.value.groupId = null;
|
||||
if (data?.options) {
|
||||
groupOptions.value = data.options;
|
||||
}
|
||||
});
|
||||
|
||||
function setGroupOptions(options) {
|
||||
groupOptions.value = options;
|
||||
}
|
||||
|
||||
function handleOk() {
|
||||
if (!formState.value.groupId) {
|
||||
message.warning('请选择分组!');
|
||||
return;
|
||||
}
|
||||
emit('success', formState.value.groupId);
|
||||
closeModal();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
setGroupOptions,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.group-select-modal {
|
||||
padding: 20px 24px;
|
||||
|
||||
.form-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.required-label {
|
||||
white-space: nowrap;
|
||||
&::before {
|
||||
content: '*';
|
||||
color: #ff4d4f;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.select-width {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,22 +1,23 @@
|
|||
import {defHttp} from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/cees/student/list',
|
||||
save='/cees/student/add',
|
||||
edit='/cees/student/edit',
|
||||
save = '/cees/student/add',
|
||||
edit = '/cees/student/edit',
|
||||
deleteOne = '/cees/student/delete',
|
||||
deleteBatch = '/cees/student/deleteBatch',
|
||||
importExcel = '/cees/student/importExcel',
|
||||
exportXls = '/cees/student/exportXls',
|
||||
updateGroupUser = '/cees/ceesGroup/updateGroupUser',
|
||||
batchGroup = '/cees/student/batchGroup',
|
||||
}
|
||||
|
||||
//获取分组
|
||||
export const getGroup = () =>
|
||||
defHttp.get({url: '/cees/ceesGroup/list'}).then((res) => {
|
||||
defHttp.get({ url: '/cees/ceesGroup/list' }).then((res) => {
|
||||
return res.records;
|
||||
});
|
||||
/**
|
||||
|
@ -32,17 +33,16 @@ export const getImportUrl = Api.importExcel;
|
|||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) =>
|
||||
defHttp.get({url: Api.list, params});
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
export const deleteOne = (params, handleSuccess) => {
|
||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
|
@ -55,27 +55,46 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 批量分组
|
||||
* @param params
|
||||
*/
|
||||
export const batchGroup = (params, handleSuccess) => {
|
||||
console.log('params', params);
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认分组',
|
||||
content: '是否分组选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.post({ url: Api.batchGroup, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
//更新分组中间表
|
||||
export const updateGroupUser = (params) => {
|
||||
return defHttp.post({url: Api.updateGroupUser, params});
|
||||
}
|
||||
return defHttp.post({ url: Api.updateGroupUser, params });
|
||||
};
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
const url = isUpdate ? Api.edit : Api.save;
|
||||
// 更新分组中间表
|
||||
const groupUserParams = {
|
||||
userId: params.userId,
|
||||
groupId: params.groupId
|
||||
}
|
||||
groupId: params.groupId,
|
||||
};
|
||||
updateGroupUser(groupUserParams);
|
||||
return defHttp.post({url: url, params});
|
||||
}
|
||||
return defHttp.post({ url: url, params });
|
||||
};
|
||||
|
|
|
@ -14,9 +14,14 @@
|
|||
<Icon icon="ant-design:delete-outlined" />
|
||||
删除
|
||||
</a-menu-item>
|
||||
<a-menu-item key="1" @click="batchHandleGroup">
|
||||
<Icon icon="ant-design:usergroup-add-outlined" />
|
||||
分组
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button>批量操作
|
||||
<a-button
|
||||
>批量操作
|
||||
<Icon icon="mdi:chevron-down" />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
|
@ -44,165 +49,192 @@
|
|||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<StudentModal @register="registerModal" @success="handleSuccess" />
|
||||
<GroupSelectModal ref="groupModalRef" @register="registerGroupModal" @success="handleGroupSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="cees-student" 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 StudentModal from './components/StudentModal.vue';
|
||||
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './Student.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getGroup } from './Student.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
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;
|
||||
|
||||
// 在组件加载时获取分组数据
|
||||
const groupOptions = ref<{ label: string; value: number }[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const res = await getGroup();
|
||||
groupOptions.value = res.map((group) => ({
|
||||
label: group.name, // 假设分组名称字段为 name
|
||||
value: group.id, // 假设分组 ID 字段为 id
|
||||
}));
|
||||
updateGroupOptions.updateGroupOptions(groupOptions.value);
|
||||
} catch (error) {
|
||||
console.error('获取分组数据失败:', error);
|
||||
}
|
||||
});
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
import { ref, reactive, computed, unref, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import GroupSelectModal from './components/GroupSelectModal.vue';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import StudentModal from './components/StudentModal.vue';
|
||||
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './Student.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getGroup, batchGroup } from './Student.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
const queryParam = reactive<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const userStore = useUserStore();
|
||||
//注册model
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const [registerGroupModal, { openModal: openGroupModal }] = useModal();
|
||||
const groupModalRef = ref<any>(null);
|
||||
//注册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;
|
||||
|
||||
// 在组件加载时获取分组数据
|
||||
const groupOptions = ref<{ label: string; value: number }[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const res = await getGroup();
|
||||
groupOptions.value = res.map((group) => ({
|
||||
label: group.name, // 假设分组名称字段为 name
|
||||
value: group.id, // 假设分组 ID 字段为 id
|
||||
}));
|
||||
updateGroupOptions.updateGroupOptions(groupOptions.value);
|
||||
} catch (error) {
|
||||
console.error('获取分组数据失败:', error);
|
||||
}
|
||||
});
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量分组事件
|
||||
*/
|
||||
async function batchHandleGroup() {
|
||||
//if (selectedRowKeys.value.length === 0) {
|
||||
// return;
|
||||
//}
|
||||
groupModalRef.value?.setGroupOptions(groupOptions.value);
|
||||
openGroupModal(true);
|
||||
}
|
||||
/**
|
||||
* 分组选好后的确认事件
|
||||
*/
|
||||
async function handleGroupSuccess(groupId) {
|
||||
console.log('asdfasd');
|
||||
try {
|
||||
console.log('111');
|
||||
await batchGroup({ ids: selectedRowKeys.value, groupId }, handleSuccess);
|
||||
} catch (error) {
|
||||
console.error('批量分组失败:', error);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" title="所属分组" @ok="handleOk" :canFullscreen="false">
|
||||
<div class="group-select-modal">
|
||||
<div class="form-wrapper">
|
||||
<div class="form-item">
|
||||
<span class="required-label">所属分组:</span>
|
||||
<a-select v-model:value="formState.groupId" placeholder="请选择所属分组" class="select-width">
|
||||
<a-select-option v-for="item in groupOptions" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const formState = ref({
|
||||
groupId: null,
|
||||
});
|
||||
|
||||
const groupOptions = ref<{ label: string; value: number }[]>([]);
|
||||
|
||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
||||
formState.value.groupId = null;
|
||||
if (data?.options) {
|
||||
groupOptions.value = data.options;
|
||||
}
|
||||
});
|
||||
|
||||
function setGroupOptions(options) {
|
||||
groupOptions.value = options;
|
||||
}
|
||||
|
||||
function handleOk() {
|
||||
if (!formState.value.groupId) {
|
||||
message.warning('请选择分组!');
|
||||
return;
|
||||
}
|
||||
emit('success', formState.value.groupId);
|
||||
closeModal();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
setGroupOptions,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.group-select-modal {
|
||||
padding: 20px 24px;
|
||||
|
||||
.form-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.required-label {
|
||||
white-space: nowrap;
|
||||
&::before {
|
||||
content: '*';
|
||||
color: #ff4d4f;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.select-width {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -23,8 +23,7 @@
|
|||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
<!-- 新增生成账号按钮 -->
|
||||
<a-button type="primary" @click="showAutoGenerateForm = true" preIcon="ant-design:plus-outlined">
|
||||
生成账号
|
||||
<a-button type="primary" @click="showAutoGenerateForm = true" preIcon="ant-design:plus-outlined"> 生成账号
|
||||
</a-button>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
|
@ -92,7 +91,6 @@ import { downloadFile } from '/@/utils/common/renderUtils';
|
|||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
|
||||
// 表单相关状态
|
||||
const showAutoGenerateForm = ref(false); // 控制表单显示
|
||||
const isDisplay = ref(false);
|
||||
|
|
|
@ -14,15 +14,16 @@ enum Api {
|
|||
updateGroupUser = '/cees/ceesGroup/updateGroupUser',
|
||||
updateDormitory = 'cees/ceesWaiTeacher/updateDormitory',
|
||||
cancelCheckIn = 'cees/ceesWaiTeacher/cancelCheckIn',
|
||||
confirmCheckIn = 'cees/ceesWaiTeacher/confirmCheckIn'
|
||||
confirmCheckIn = 'cees/ceesWaiTeacher/confirmCheckIn',
|
||||
batchGroup = '/cees/ceesWaiTeacher/batchGroup',
|
||||
}
|
||||
|
||||
export const updateDormitory = (id, dormitory) => defHttp.get({ url: Api.updateDormitory, params: { id, dormitory } }); // ✅ 将参数包装为独立的对象 });
|
||||
|
||||
//取消确认报到
|
||||
export const cancelCheckIn = (params) => defHttp.get({url: Api.cancelCheckIn, params});
|
||||
export const cancelCheckIn = (params) => defHttp.get({ url: Api.cancelCheckIn, params });
|
||||
//确认报到
|
||||
export const confirmCheckIn = (params) => defHttp.get({url: Api.confirmCheckIn, params});
|
||||
export const confirmCheckIn = (params) => defHttp.get({ url: Api.confirmCheckIn, params });
|
||||
//获取分组
|
||||
export const getGroup = () =>
|
||||
defHttp.get({ url: '/cees/ceesGroup/list' }).then((res) => {
|
||||
|
@ -69,6 +70,25 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
},
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 批量分组
|
||||
* @param params
|
||||
*/
|
||||
export const batchGroup = (params, handleSuccess) => {
|
||||
console.log('params', params);
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认分组',
|
||||
content: '是否分组选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.post({ url: Api.batchGroup, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
//更新分组中间表
|
||||
export const updateGroupUser = (params) => {
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
<Icon icon="ant-design:delete-outlined" />
|
||||
删除
|
||||
</a-menu-item>
|
||||
<a-menu-item key="1" @click="batchHandleGroup">
|
||||
<Icon icon="ant-design:usergroup-add-outlined" />
|
||||
分组
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button
|
||||
|
@ -85,6 +89,7 @@
|
|||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<CeesWaiTeacherModal @register="registerModal" @success="handleSuccess" />
|
||||
<GroupSelectModal ref="groupModalRef" @register="registerGroupModal" @success="handleGroupSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -92,6 +97,7 @@
|
|||
import { ref, reactive, computed, unref, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import GroupSelectModal from './components/GroupSelectModal.vue';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import CeesWaiTeacherModal from './components/CeesWaiTeacherModal.vue';
|
||||
import { columns, searchFormSchema, superQuerySchema, updateGroupOptions } from './CeesWaiTeacher.data';
|
||||
|
@ -105,6 +111,7 @@
|
|||
updateDormitory,
|
||||
cancelCheckIn,
|
||||
confirmCheckIn,
|
||||
batchGroup,
|
||||
} from './CeesWaiTeacher.api';
|
||||
import { selectBySex } from '/@/views/cees/dormitory/CeesDormitoryInfo.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
|
@ -121,6 +128,8 @@
|
|||
|
||||
//注册model
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const [registerGroupModal, { openModal: openGroupModal }] = useModal();
|
||||
const groupModalRef = ref<any>(null);
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
|
@ -255,6 +264,29 @@
|
|||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量分组事件
|
||||
*/
|
||||
async function batchHandleGroup() {
|
||||
//if (selectedRowKeys.value.length === 0) {
|
||||
// return;
|
||||
//}
|
||||
groupModalRef.value?.setGroupOptions(groupOptions.value);
|
||||
openGroupModal(true);
|
||||
}
|
||||
/**
|
||||
* 分组选好后的确认事件
|
||||
*/
|
||||
async function handleGroupSuccess(groupId) {
|
||||
console.log('asdfasd');
|
||||
try {
|
||||
console.log('111');
|
||||
await batchGroup({ ids: selectedRowKeys.value, groupId }, handleSuccess);
|
||||
} catch (error) {
|
||||
console.error('批量分组失败:', error);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" title="所属分组" @ok="handleOk" :canFullscreen="false">
|
||||
<div class="group-select-modal">
|
||||
<div class="form-wrapper">
|
||||
<div class="form-item">
|
||||
<span class="required-label">所属分组:</span>
|
||||
<a-select v-model:value="formState.groupId" placeholder="请选择所属分组" class="select-width">
|
||||
<a-select-option v-for="item in groupOptions" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const formState = ref({
|
||||
groupId: null,
|
||||
});
|
||||
|
||||
const groupOptions = ref<{ label: string; value: number }[]>([]);
|
||||
|
||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
||||
formState.value.groupId = null;
|
||||
if (data?.options) {
|
||||
groupOptions.value = data.options;
|
||||
}
|
||||
});
|
||||
|
||||
function setGroupOptions(options) {
|
||||
groupOptions.value = options;
|
||||
}
|
||||
|
||||
function handleOk() {
|
||||
if (!formState.value.groupId) {
|
||||
message.warning('请选择分组!');
|
||||
return;
|
||||
}
|
||||
emit('success', formState.value.groupId);
|
||||
closeModal();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
setGroupOptions,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.group-select-modal {
|
||||
padding: 20px 24px;
|
||||
|
||||
.form-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.required-label {
|
||||
white-space: nowrap;
|
||||
&::before {
|
||||
content: '*';
|
||||
color: #ff4d4f;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.select-width {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue