reactor:优化批量删除的代码,从 as number 变成 !
parent
67da079606
commit
c25ea731fd
|
|
@ -34,6 +34,7 @@ function onRefresh() {
|
||||||
gridApi.query();
|
gridApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @Xuzhiqiang:批量删除待实现
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
|
|
||||||
/** 详情 */
|
/** 详情 */
|
||||||
|
|
|
||||||
|
|
@ -35,16 +35,6 @@ function onRefresh() {
|
||||||
gridApi.query();
|
gridApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @nehc handleRowCheckboxChange 放的位置;
|
|
||||||
const checkedIds = ref<number[]>([]);
|
|
||||||
function handleRowCheckboxChange({
|
|
||||||
records,
|
|
||||||
}: {
|
|
||||||
records: ErpPurchaseOrderApi.PurchaseOrder[];
|
|
||||||
}) {
|
|
||||||
checkedIds.value = records.map((item) => item.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 详情 */
|
/** 详情 */
|
||||||
function handleDetail(row: ErpPurchaseOrderApi.PurchaseOrder) {
|
function handleDetail(row: ErpPurchaseOrderApi.PurchaseOrder) {
|
||||||
formModalApi.setData({ type: 'detail', id: row.id }).open();
|
formModalApi.setData({ type: 'detail', id: row.id }).open();
|
||||||
|
|
@ -104,6 +94,16 @@ async function handleBatchDelete() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @Xuzhiqiang:批量删除待实现
|
||||||
|
const checkedIds = ref<number[]>([]);
|
||||||
|
function handleRowCheckboxChange({
|
||||||
|
records,
|
||||||
|
}: {
|
||||||
|
records: ErpPurchaseOrderApi.PurchaseOrder[];
|
||||||
|
}) {
|
||||||
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
|
}
|
||||||
|
|
||||||
/** 审批/反审批操作 */
|
/** 审批/反审批操作 */
|
||||||
function handleUpdateStatus(
|
function handleUpdateStatus(
|
||||||
row: ErpPurchaseOrderApi.PurchaseOrder,
|
row: ErpPurchaseOrderApi.PurchaseOrder,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ function onRefresh() {
|
||||||
gridApi.query();
|
gridApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @Xuzhiqiang:批量删除待实现
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
|
|
||||||
/** 详情 */
|
/** 详情 */
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ function onRefresh() {
|
||||||
gridApi.query();
|
gridApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @Xuzhiqiang:批量删除待实现
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
function handleRowCheckboxChange({
|
function handleRowCheckboxChange({
|
||||||
records,
|
records,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ function onRefresh() {
|
||||||
gridApi.query();
|
gridApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @Xuzhiqiang:批量删除待实现
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
function handleRowCheckboxChange({
|
function handleRowCheckboxChange({
|
||||||
records,
|
records,
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: InfraCodegenApi.CodegenTable[];
|
records: InfraCodegenApi.CodegenTable[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除代码生成配置 */
|
/** 批量删除代码生成配置 */
|
||||||
|
|
|
||||||
|
|
@ -66,15 +66,6 @@ async function handleDelete(row: InfraConfigApi.Config) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkedIds = ref<number[]>([]);
|
|
||||||
function handleRowCheckboxChange({
|
|
||||||
records,
|
|
||||||
}: {
|
|
||||||
records: InfraConfigApi.Config[];
|
|
||||||
}) {
|
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 批量删除参数 */
|
/** 批量删除参数 */
|
||||||
async function handleDeleteBatch() {
|
async function handleDeleteBatch() {
|
||||||
const hideLoading = message.loading({
|
const hideLoading = message.loading({
|
||||||
|
|
@ -92,6 +83,15 @@ async function handleDeleteBatch() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const checkedIds = ref<number[]>([]);
|
||||||
|
function handleRowCheckboxChange({
|
||||||
|
records,
|
||||||
|
}: {
|
||||||
|
records: InfraConfigApi.Config[];
|
||||||
|
}) {
|
||||||
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: useGridFormSchema(),
|
schema: useGridFormSchema(),
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo01ContactApi.Demo01Contact[];
|
records: Demo01ContactApi.Demo01Contact[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Grade[];
|
records: Demo03StudentApi.Demo03Grade[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Course[];
|
records: Demo03StudentApi.Demo03Course[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ async function onDeleteBatch() {
|
||||||
await deleteDemo03GradeList(checkedIds.value);
|
await deleteDemo03GradeList(checkedIds.value);
|
||||||
checkedIds.value = [];
|
checkedIds.value = [];
|
||||||
message.success($t('ui.actionMessage.deleteSuccess'));
|
message.success($t('ui.actionMessage.deleteSuccess'));
|
||||||
onRefresh();
|
await onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +89,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Grade[];
|
records: Demo03StudentApi.Demo03Grade[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
/** 批量删除学生 */
|
/** 批量删除学生 */
|
||||||
async function onDeleteBatch() {
|
async function onDeleteBatch() {
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo01ContactApi.Demo01Contact[];
|
records: Demo01ContactApi.Demo01Contact[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id)!;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Course[];
|
records: Demo03StudentApi.Demo03Course[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
const loading = ref(true); // 列表的加载中
|
const loading = ref(true); // 列表的加载中
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Grade[];
|
records: Demo03StudentApi.Demo03Grade[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
const loading = ref(true); // 列表的加载中
|
const loading = ref(true); // 列表的加载中
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: InfraFileApi.File[];
|
records: InfraFileApi.File[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除文件 */
|
/** 批量删除文件 */
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: InfraFileConfigApi.FileConfig[];
|
records: InfraFileConfigApi.FileConfig[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除文件配置 */
|
/** 批量删除文件配置 */
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ async function handleDelete(row: InfraJobApi.Job) {
|
||||||
|
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
function handleRowCheckboxChange({ records }: { records: InfraJobApi.Job[] }) {
|
function handleRowCheckboxChange({ records }: { records: InfraJobApi.Job[] }) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除任务 */
|
/** 批量删除任务 */
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: MallCouponTemplateApi.CouponTemplate[];
|
records: MallCouponTemplateApi.CouponTemplate[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 优惠券模板状态修改 */
|
/** 优惠券模板状态修改 */
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ function onRefresh() {
|
||||||
/** 设置选中 ID */
|
/** 设置选中 ID */
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
function setCheckedIds({ records }: { records: MemberUserApi.User[] }) {
|
function setCheckedIds({ records }: { records: MemberUserApi.User[] }) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 发送优惠券 */
|
/** 发送优惠券 */
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemDeptApi.Dept[];
|
records: SystemDeptApi.Dept[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除部门 */
|
/** 批量删除部门 */
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemDictDataApi.DictData[];
|
records: SystemDictDataApi.DictData[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除字典数据 */
|
/** 批量删除字典数据 */
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemDictTypeApi.DictType[];
|
records: SystemDictTypeApi.DictType[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除字典类型 */
|
/** 批量删除字典类型 */
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemMailAccountApi.MailAccount[];
|
records: SystemMailAccountApi.MailAccount[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除邮箱账号 */
|
/** 批量删除邮箱账号 */
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemMailTemplateApi.MailTemplate[];
|
records: SystemMailTemplateApi.MailTemplate[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除邮件模板 */
|
/** 批量删除邮件模板 */
|
||||||
|
|
|
||||||
|
|
@ -59,15 +59,6 @@ async function handleDelete(row: SystemNoticeApi.Notice) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkedIds = ref<number[]>([]);
|
|
||||||
function handleRowCheckboxChange({
|
|
||||||
records,
|
|
||||||
}: {
|
|
||||||
records: SystemNoticeApi.Notice[];
|
|
||||||
}) {
|
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 批量删除公告 */
|
/** 批量删除公告 */
|
||||||
async function handleDeleteBatch() {
|
async function handleDeleteBatch() {
|
||||||
const hideLoading = message.loading({
|
const hideLoading = message.loading({
|
||||||
|
|
@ -85,6 +76,15 @@ async function handleDeleteBatch() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const checkedIds = ref<number[]>([]);
|
||||||
|
function handleRowCheckboxChange({
|
||||||
|
records,
|
||||||
|
}: {
|
||||||
|
records: SystemNoticeApi.Notice[];
|
||||||
|
}) {
|
||||||
|
checkedIds.value = records.map((item) => item.id as number);
|
||||||
|
}
|
||||||
|
|
||||||
/** 推送公告 */
|
/** 推送公告 */
|
||||||
async function handlePush(row: SystemNoticeApi.Notice) {
|
async function handlePush(row: SystemNoticeApi.Notice) {
|
||||||
const hideLoading = message.loading({
|
const hideLoading = message.loading({
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemNotifyTemplateApi.NotifyTemplate[];
|
records: SystemNotifyTemplateApi.NotifyTemplate[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除站内信模板 */
|
/** 批量删除站内信模板 */
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemPostApi.Post[];
|
records: SystemPostApi.Post[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除岗位 */
|
/** 批量删除岗位 */
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemRoleApi.Role[];
|
records: SystemRoleApi.Role[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除角色 */
|
/** 批量删除角色 */
|
||||||
|
|
|
||||||
|
|
@ -65,14 +65,13 @@ async function handleDelete(row: SystemSmsChannelApi.SmsChannel) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选中的短信渠道ID
|
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
function handleRowCheckboxChange({
|
function handleRowCheckboxChange({
|
||||||
records,
|
records,
|
||||||
}: {
|
}: {
|
||||||
records: SystemSmsChannelApi.SmsChannel[];
|
records: SystemSmsChannelApi.SmsChannel[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除处理 */
|
/** 批量删除处理 */
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemSmsTemplateApi.SmsTemplate[];
|
records: SystemSmsTemplateApi.SmsTemplate[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除短信模板 */
|
/** 批量删除短信模板 */
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemTenantApi.Tenant[];
|
records: SystemTenantApi.Tenant[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除租户 */
|
/** 批量删除租户 */
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemTenantPackageApi.TenantPackage[];
|
records: SystemTenantPackageApi.TenantPackage[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除租户套餐 */
|
/** 批量删除租户套餐 */
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemUserApi.User[];
|
records: SystemUserApi.User[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 批量删除用户 */
|
/** 批量删除用户 */
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: InfraCodegenApi.CodegenTable[];
|
records: InfraCodegenApi.CodegenTable[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: InfraConfigApi.Config[];
|
records: InfraConfigApi.Config[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ async function onDeleteBatch() {
|
||||||
await deleteDataSourceConfigList(checkedIds.value);
|
await deleteDataSourceConfigList(checkedIds.value);
|
||||||
checkedIds.value = [];
|
checkedIds.value = [];
|
||||||
ElMessage.success($t('ui.actionMessage.deleteSuccess'));
|
ElMessage.success($t('ui.actionMessage.deleteSuccess'));
|
||||||
onRefresh();
|
await onRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
|
|
@ -68,7 +68,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: InfraDataSourceConfigApi.DataSourceConfig[];
|
records: InfraDataSourceConfigApi.DataSourceConfig[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo01ContactApi.Demo01Contact[];
|
records: Demo01ContactApi.Demo01Contact[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Course[];
|
records: Demo03StudentApi.Demo03Course[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Grade[];
|
records: Demo03StudentApi.Demo03Grade[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo01ContactApi.Demo01Contact[];
|
records: Demo01ContactApi.Demo01Contact[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Course[];
|
records: Demo03StudentApi.Demo03Course[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
const loading = ref(true); // 列表的加载中
|
const loading = ref(true); // 列表的加载中
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Grade[];
|
records: Demo03StudentApi.Demo03Grade[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
const loading = ref(true); // 列表的加载中
|
const loading = ref(true); // 列表的加载中
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: Demo03StudentApi.Demo03Student[];
|
records: Demo03StudentApi.Demo03Student[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: InfraFileApi.File[];
|
records: InfraFileApi.File[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: InfraFileConfigApi.FileConfig[];
|
records: InfraFileConfigApi.FileConfig[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ async function onDeleteBatch() {
|
||||||
|
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
function handleRowCheckboxChange({ records }: { records: InfraJobApi.Job[] }) {
|
function handleRowCheckboxChange({ records }: { records: InfraJobApi.Job[] }) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: MallCouponTemplateApi.CouponTemplate[];
|
records: MallCouponTemplateApi.CouponTemplate[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 优惠券模板状态修改 */
|
/** 优惠券模板状态修改 */
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ function onRefresh() {
|
||||||
/** 设置选中 ID */
|
/** 设置选中 ID */
|
||||||
const checkedIds = ref<number[]>([]);
|
const checkedIds = ref<number[]>([]);
|
||||||
function setCheckedIds({ records }: { records: MemberUserApi.User[] }) {
|
function setCheckedIds({ records }: { records: MemberUserApi.User[] }) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 发送优惠券 */
|
/** 发送优惠券 */
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemDictDataApi.DictData[];
|
records: SystemDictDataApi.DictData[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮回调 */
|
/** 表格操作按钮回调 */
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemDictTypeApi.DictType[];
|
records: SystemDictTypeApi.DictType[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮回调 */
|
/** 表格操作按钮回调 */
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemMailAccountApi.MailAccount[];
|
records: SystemMailAccountApi.MailAccount[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemMailTemplateApi.MailTemplate[];
|
records: SystemMailTemplateApi.MailTemplate[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ function onRefresh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 创建公告 */
|
/** 创建公告 */
|
||||||
|
// TODO @霖:【规范讨论】方法名,要不要都换成 handleXXX 开头,和 ep 保持一致;
|
||||||
function onCreate() {
|
function onCreate() {
|
||||||
formModalApi.setData(null).open();
|
formModalApi.setData(null).open();
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +75,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemNoticeApi.Notice[];
|
records: SystemNoticeApi.Notice[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 推送公告 */
|
/** 推送公告 */
|
||||||
|
|
@ -173,6 +174,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- TODO @霖:【规范讨论】要不要类似 antd 一样,改成 TableAction;可见 /apps/web-ele/src/views/system/notice/index.vue 的 167 到 195 -->
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemNotifyTemplateApi.NotifyTemplate[];
|
records: SystemNotifyTemplateApi.NotifyTemplate[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemOAuth2ClientApi.OAuth2Client[];
|
records: SystemOAuth2ClientApi.OAuth2Client[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemPostApi.Post[];
|
records: SystemPostApi.Post[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemRoleApi.Role[];
|
records: SystemRoleApi.Role[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 分配角色的数据权限 */
|
/** 分配角色的数据权限 */
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemSmsChannelApi.SmsChannel[];
|
records: SystemSmsChannelApi.SmsChannel[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemSmsTemplateApi.SmsTemplate[];
|
records: SystemSmsTemplateApi.SmsTemplate[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemSocialClientApi.SocialClient[];
|
records: SystemSocialClientApi.SocialClient[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemTenantApi.Tenant[];
|
records: SystemTenantApi.Tenant[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemTenantPackageApi.TenantPackage[];
|
records: SystemTenantPackageApi.TenantPackage[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ function handleRowCheckboxChange({
|
||||||
}: {
|
}: {
|
||||||
records: SystemUserApi.User[];
|
records: SystemUserApi.User[];
|
||||||
}) {
|
}) {
|
||||||
checkedIds.value = records.map((item) => item.id as number);
|
checkedIds.value = records.map((item) => item.id!);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置密码 */
|
/** 重置密码 */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue