fixbug: 🐛 修改了很多bug和缺陷
This commit is contained in:
parent
462a1af951
commit
5f178556ed
|
@ -32,12 +32,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
// 整理子级内容信息
|
// 整理子级内容信息
|
||||||
const powerCode = key.replace('/admin', '').replace('/{page}/{limit}', '').replace('/{id}', '').replace('/', '');
|
const powerCode = key.replace('/admin/', '').replace(/\/\{.*?\}/g, '');
|
||||||
const item = {
|
const item = {
|
||||||
parentId: info.id,
|
parentId: info.id,
|
||||||
powerCode: powerCode.replaceAll('/', '::'),
|
powerCode: powerCode.replaceAll('/', '::'),
|
||||||
powerName: description,
|
powerName: description,
|
||||||
requestUrl: key.replace('{page}', '\\d+').replace('{limit}', '\\d+').replace('/{id}', '\\d+'),
|
requestUrl: key.replace(/\/{.*/, '/.*'),
|
||||||
};
|
};
|
||||||
|
|
||||||
// 向父级内容添加子级Children内容
|
// 向父级内容添加子级Children内容
|
||||||
|
@ -76,7 +76,7 @@ async function add(data) {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
token:
|
token:
|
||||||
'eyJhbGciOiJIUzI1NiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAA_yWLQQqDMBBF7zJrUzJ24iSuirtuvINxJtCCtlYDLdK7G3D3ee_9HdYcoYUuz_MPKtDvG1rkOjiPTU0V5FU_dynsnP0wacnxiiFYi45uy3IZX1O5PrdHMWNiFK9kUiQxpMwmKDrjZUiaohA3Fv4HKp13G3cAAAA.qDzOIts0Wckglwm3L-BcprzRiW06ARC6Q8jN9qbVjQ0',
|
'eyJhbGciOiJIUzI1NiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAA_yWLywrCMBAA_2XPjeSxZEtP4s2L_7DpbqBCorUGLMV_N-BtGGYO2FqCCS6t1h0G0M8TJkfBhtFbHwdom76u0t0fb1y05yxlqed1Pc2P0q_7e-lS3JwUkQxhDgZzFMPZkUmWhTX6EYnh-wMBQi1DcgAAAA.II3lcc1R1pX8G6eaEVkCxxDXkscN4c6p89zn7FzFhaU',
|
||||||
},
|
},
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,7 +23,7 @@ export const fetchGetAllMediaTypes = () => {
|
||||||
|
|
||||||
/** 系统文件管理---获取所有文件存储基础路径 */
|
/** 系统文件管理---获取所有文件存储基础路径 */
|
||||||
export const fetchGetAllFilesStoragePath = () => {
|
export const fetchGetAllFilesStoragePath = () => {
|
||||||
return http.request<BaseResult<any>>('get', `files/getAllFilesStoragePath`);
|
return http.request<BaseResult<any>>('get', `files/noManage/getAllFilesStoragePath`);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 系统文件管理---添加系统文件管理 */
|
/** 系统文件管理---添加系统文件管理 */
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { $t } from '@/plugins/i18n';
|
||||||
|
import { reactive, ref } from 'vue';
|
||||||
|
import { FormInstance } from 'element-plus';
|
||||||
|
|
||||||
|
interface FormProps {
|
||||||
|
formInline: {
|
||||||
|
confirmText: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<FormProps>(), {
|
||||||
|
formInline: () => ({
|
||||||
|
// 是否确认删除名称
|
||||||
|
confirmText: '',
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
const rules = reactive({
|
||||||
|
confirmText: [{ required: true, message: $t('deleteBatchPlaceholder'), trigger: 'blur' }],
|
||||||
|
});
|
||||||
|
|
||||||
|
const formDeletedBatchRef = ref<FormInstance>();
|
||||||
|
const form = ref(props.formInline);
|
||||||
|
|
||||||
|
defineExpose({ formDeletedBatchRef });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-form ref="formDeletedBatchRef" :model="form" :rules="rules" label-width="auto">
|
||||||
|
<el-form-item :label="$t('confirmText')" prop="confirmText">
|
||||||
|
<el-input v-model="form.confirmText" :placeholder="$t('deleteBatchPlaceholder')" autocomplete="off" type="text" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
|
@ -26,7 +26,7 @@ export const usePowerStore = defineStore('powerStore', {
|
||||||
// 分页查询结果
|
// 分页查询结果
|
||||||
pagination: {
|
pagination: {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 30,
|
pageSize: 150,
|
||||||
total: 1,
|
total: 1,
|
||||||
pageSizes,
|
pageSizes,
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,9 +2,10 @@ import { addDialog } from '@/components/BaseDialog/index';
|
||||||
import EmailTemplateDialog from '@/views/configuration/emailTemplate/email-template-dialog.vue';
|
import EmailTemplateDialog from '@/views/configuration/emailTemplate/email-template-dialog.vue';
|
||||||
import { useEmailTemplateStore } from '@/store/configuration/emailTemplate';
|
import { useEmailTemplateStore } from '@/store/configuration/emailTemplate';
|
||||||
import { h, ref } from 'vue';
|
import { h, ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { message, messageBox } from '@/utils/message';
|
||||||
import type { FormItemProps } from '@/views/configuration/emailTemplate/utils/types';
|
import type { FormItemProps } from '@/views/configuration/emailTemplate/utils/types';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
// 选择的row列表
|
// 选择的row列表
|
||||||
export const selectRows = ref([]);
|
export const selectRows = ref([]);
|
||||||
|
@ -89,9 +90,7 @@ export function onUpdate(row: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除邮件模板表 */
|
||||||
* * 删除邮件模板表
|
|
||||||
*/
|
|
||||||
export const onDelete = async (row: any) => {
|
export const onDelete = async (row: any) => {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
|
|
||||||
|
@ -112,17 +111,29 @@ export const onDelete = async (row: any) => {
|
||||||
/** 批量删除 */
|
/** 批量删除 */
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const ids = selectRows.value.map((row: any) => row.id);
|
const ids = selectRows.value.map((row: any) => row.id);
|
||||||
|
const formDeletedBatchRef = ref();
|
||||||
|
|
||||||
// 是否确认删除
|
addDialog({
|
||||||
const result = await messageBox({
|
title: $t('deleteBatchTip'),
|
||||||
title: $t('confirmDelete'),
|
width: '30%',
|
||||||
showMessage: false,
|
props: { formInline: { confirmText: '' } },
|
||||||
confirmMessage: undefined,
|
draggable: true,
|
||||||
cancelMessage: $t('confirmDelete'),
|
fullscreenIcon: true,
|
||||||
});
|
closeOnClickModal: false,
|
||||||
if (!result) return;
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await emailTemplateStore.deleteEmailTemplate(ids);
|
await emailTemplateStore.deleteEmailTemplate(ids);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
|
@ -2,9 +2,10 @@ import { addDialog } from '@/components/BaseDialog/index';
|
||||||
import EmailUsersDialog from '@/views/configuration/emailUsers/email-users-dialog.vue';
|
import EmailUsersDialog from '@/views/configuration/emailUsers/email-users-dialog.vue';
|
||||||
import { useEmailUsersStore } from '@/store/configuration/emailUsers';
|
import { useEmailUsersStore } from '@/store/configuration/emailUsers';
|
||||||
import { h, ref } from 'vue';
|
import { h, ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { message, messageBox } from '@/utils/message';
|
||||||
import type { FormItemProps } from '@/views/configuration/emailUsers/utils/types';
|
import type { FormItemProps } from '@/views/configuration/emailUsers/utils/types';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
// 用户是否停用加载集合
|
// 用户是否停用加载集合
|
||||||
|
@ -113,24 +114,34 @@ export const onDelete = async (row: any) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 批量删除 */
|
||||||
* 批量删除
|
|
||||||
*/
|
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const ids = deleteIds.value;
|
const ids = deleteIds.value;
|
||||||
|
const formDeletedBatchRef = ref();
|
||||||
|
|
||||||
// 是否确认删除
|
addDialog({
|
||||||
const result = await messageBox({
|
title: $t('deleteBatchTip'),
|
||||||
title: $t('confirmDelete'),
|
width: '30%',
|
||||||
showMessage: false,
|
props: { formInline: { confirmText: '' } },
|
||||||
confirmMessage: undefined,
|
draggable: true,
|
||||||
cancelMessage: $t('confirmDelete'),
|
fullscreenIcon: true,
|
||||||
});
|
closeOnClickModal: false,
|
||||||
if (!result) return;
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await emailUsersStore.deleteEmailUsers(ids);
|
await emailUsersStore.deleteEmailUsers(ids);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -27,6 +27,7 @@ defineExpose({ formRef });
|
||||||
<el-form-item :label="$t('menuIcon_iconCode')" prop="iconCode">
|
<el-form-item :label="$t('menuIcon_iconCode')" prop="iconCode">
|
||||||
<el-input v-model="form.iconCode" autocomplete="off" type="text" />
|
<el-input v-model="form.iconCode" autocomplete="off" type="text" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('menuIcon_iconName')" prop="iconName">
|
<el-form-item :label="$t('menuIcon_iconName')" prop="iconName">
|
||||||
<MenuIconSelectIconName :formInline="form" />
|
<MenuIconSelectIconName :formInline="form" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -2,28 +2,23 @@ import { addDialog } from '@/components/BaseDialog/index';
|
||||||
import MenuIconDialog from '@/views/configuration/menuIcon/menu-icon-dialog.vue';
|
import MenuIconDialog from '@/views/configuration/menuIcon/menu-icon-dialog.vue';
|
||||||
import { useMenuIconStore } from '@/store/configuration/menuIcon';
|
import { useMenuIconStore } from '@/store/configuration/menuIcon';
|
||||||
import { h, ref } from 'vue';
|
import { h, ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { message, messageBox } from '@/utils/message';
|
||||||
import type { FormItemProps } from '@/views/configuration/menuIcon/utils/types';
|
import type { FormItemProps } from '@/views/configuration/menuIcon/utils/types';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
const menuIconStore = useMenuIconStore();
|
const menuIconStore = useMenuIconStore();
|
||||||
export const deleteIds = ref([]);
|
export const deleteIds = ref([]);
|
||||||
|
|
||||||
/**
|
/** 搜索初始化系统菜单图标 */
|
||||||
* * 搜索初始化系统菜单图标
|
|
||||||
*/
|
|
||||||
export async function onSearch() {
|
export async function onSearch() {
|
||||||
menuIconStore.loading = true;
|
menuIconStore.loading = true;
|
||||||
|
|
||||||
await menuIconStore.getMenuIconList();
|
await menuIconStore.getMenuIconList();
|
||||||
|
|
||||||
menuIconStore.loading = false;
|
menuIconStore.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 添加系统菜单图标 */
|
||||||
* * 添加系统菜单图标
|
|
||||||
*/
|
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('addNew')} ${$t('menuIcon')}`,
|
title: `${$t('addNew')} ${$t('menuIcon')}`,
|
||||||
|
@ -84,9 +79,7 @@ export function onUpdate(row: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除系统菜单图标 */
|
||||||
* * 删除系统菜单图标
|
|
||||||
*/
|
|
||||||
export const onDelete = async (row: any) => {
|
export const onDelete = async (row: any) => {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
|
|
||||||
|
@ -104,22 +97,32 @@ export const onDelete = async (row: any) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 批量删除 */
|
||||||
* 批量删除
|
|
||||||
*/
|
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const ids = deleteIds.value;
|
const ids = deleteIds.value;
|
||||||
|
const formDeletedBatchRef = ref();
|
||||||
|
|
||||||
// 是否确认删除
|
addDialog({
|
||||||
const result = await messageBox({
|
title: $t('deleteBatchTip'),
|
||||||
title: $t('confirmDelete'),
|
width: '30%',
|
||||||
showMessage: false,
|
props: { formInline: { confirmText: '' } },
|
||||||
confirmMessage: undefined,
|
draggable: true,
|
||||||
cancelMessage: $t('confirmDelete'),
|
fullscreenIcon: true,
|
||||||
});
|
closeOnClickModal: false,
|
||||||
if (!result) return;
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await menuIconStore.deleteMenuIcon(ids);
|
await menuIconStore.deleteMenuIcon(ids);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
|
@ -2,30 +2,27 @@ import { addDialog } from '@/components/BaseDialog/index';
|
||||||
import FilesDialog from '@/views/monitor/files/files-dialog.vue';
|
import FilesDialog from '@/views/monitor/files/files-dialog.vue';
|
||||||
import { useFilesStore } from '@/store/monitor/files';
|
import { useFilesStore } from '@/store/monitor/files';
|
||||||
import { h, ref } from 'vue';
|
import { h, ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { message, messageBox } from '@/utils/message';
|
||||||
import type { FormItemProps } from '@/views/monitor/files/utils/types';
|
import type { FormItemProps } from '@/views/monitor/files/utils/types';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
import { downloadFilesByFileId, downloadFilesByFilepath } from '@/api/v1/files';
|
import { downloadFilesByFileId, downloadFilesByFilepath } from '@/api/v1/files';
|
||||||
import { download } from '@/utils/sso';
|
import { download } from '@/utils/sso';
|
||||||
import type { UploadFiles } from 'element-plus';
|
import type { UploadFiles } from 'element-plus';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
// 选择的row列表
|
// 选择的row列表
|
||||||
export const selectRows = ref([]);
|
export const selectRows = ref([]);
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
const filesStore = useFilesStore();
|
const filesStore = useFilesStore();
|
||||||
|
|
||||||
/**
|
/** 搜索初始化系统文件表 */
|
||||||
* * 搜索初始化系统文件表
|
|
||||||
*/
|
|
||||||
export async function onSearch() {
|
export async function onSearch() {
|
||||||
filesStore.loading = true;
|
filesStore.loading = true;
|
||||||
await filesStore.getFilesList();
|
await filesStore.getFilesList();
|
||||||
filesStore.loading = false;
|
filesStore.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 添加系统文件表 */
|
||||||
* * 添加系统文件表
|
|
||||||
*/
|
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('addNew')}${$t('files')}`,
|
title: `${$t('addNew')}${$t('files')}`,
|
||||||
|
@ -87,8 +84,12 @@ export function onUpdate(row: any) {
|
||||||
formRef.value.formRef.validate(async (valid: any) => {
|
formRef.value.formRef.validate(async (valid: any) => {
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
|
|
||||||
// 更新文件
|
// 判断是否更新了文件
|
||||||
|
if (form.files) {
|
||||||
form.files = (form.files as UploadFiles).map(file => file.raw);
|
form.files = (form.files as UploadFiles).map(file => file.raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新文件
|
||||||
const result = await filesStore.updateFiles({ ...form, id: row.id });
|
const result = await filesStore.updateFiles({ ...form, id: row.id });
|
||||||
|
|
||||||
// 更新完成
|
// 更新完成
|
||||||
|
@ -121,19 +122,31 @@ export const onDelete = async (row: any) => {
|
||||||
/** 批量删除 */
|
/** 批量删除 */
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const ids = selectRows.value.map(row => row.id);
|
const ids = selectRows.value.map(row => row.id);
|
||||||
|
const formDeletedBatchRef = ref();
|
||||||
|
|
||||||
// 是否确认删除
|
addDialog({
|
||||||
const result = await messageBox({
|
title: $t('deleteBatchTip'),
|
||||||
title: $t('confirmDelete'),
|
width: '30%',
|
||||||
showMessage: false,
|
props: { formInline: { confirmText: '' } },
|
||||||
confirmMessage: undefined,
|
draggable: true,
|
||||||
cancelMessage: $t('confirmDelete'),
|
fullscreenIcon: true,
|
||||||
});
|
closeOnClickModal: false,
|
||||||
if (!result) return;
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await filesStore.deleteFiles(ids);
|
await filesStore.deleteFiles(ids);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -2,17 +2,16 @@ import { addDialog } from '@/components/BaseDialog/index';
|
||||||
import UserLoginLogDialog from '@/views/monitor/userLoginLog/user-login-log-dialog.vue';
|
import UserLoginLogDialog from '@/views/monitor/userLoginLog/user-login-log-dialog.vue';
|
||||||
import { useUserLoginLogStore } from '@/store/monitor/userLoginLog';
|
import { useUserLoginLogStore } from '@/store/monitor/userLoginLog';
|
||||||
import { h, ref } from 'vue';
|
import { h, ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { message, messageBox } from '@/utils/message';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
// 删除ids
|
// 删除ids
|
||||||
export const deleteIds = ref([]);
|
export const deleteIds = ref([]);
|
||||||
const userLoginLogStore = useUserLoginLogStore();
|
const userLoginLogStore = useUserLoginLogStore();
|
||||||
|
|
||||||
/**
|
/** 搜索初始化用户登录日志 */
|
||||||
* * 搜索初始化用户登录日志
|
|
||||||
*/
|
|
||||||
export async function onSearch() {
|
export async function onSearch() {
|
||||||
userLoginLogStore.loading = true;
|
userLoginLogStore.loading = true;
|
||||||
await userLoginLogStore.getUserLoginLogList();
|
await userLoginLogStore.getUserLoginLogList();
|
||||||
|
@ -50,9 +49,7 @@ export function onView(row: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除用户登录日志 */
|
||||||
* * 删除用户登录日志
|
|
||||||
*/
|
|
||||||
export const onDelete = async (row: any) => {
|
export const onDelete = async (row: any) => {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
|
|
||||||
|
@ -70,22 +67,32 @@ export const onDelete = async (row: any) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 批量删除 */
|
||||||
* 批量删除
|
|
||||||
*/
|
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const ids = deleteIds.value;
|
const ids = deleteIds.value;
|
||||||
|
const formDeletedBatchRef = ref();
|
||||||
|
|
||||||
// 是否确认删除
|
addDialog({
|
||||||
const result = await messageBox({
|
title: $t('deleteBatchTip'),
|
||||||
title: $t('confirmDelete'),
|
width: '30%',
|
||||||
showMessage: false,
|
props: { formInline: { confirmText: '' } },
|
||||||
confirmMessage: undefined,
|
draggable: true,
|
||||||
cancelMessage: $t('confirmDelete'),
|
fullscreenIcon: true,
|
||||||
});
|
closeOnClickModal: false,
|
||||||
if (!result) return;
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await userLoginLogStore.deleteUserLoginLog(ids);
|
await userLoginLogStore.deleteUserLoginLog(ids);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,18 +9,14 @@ import { $t } from '@/plugins/i18n';
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
const schedulersStore = useSchedulersStore();
|
const schedulersStore = useSchedulersStore();
|
||||||
|
|
||||||
/**
|
/** 搜索初始化Schedulers视图 */
|
||||||
* * 搜索初始化Schedulers视图
|
|
||||||
*/
|
|
||||||
export async function onSearch() {
|
export async function onSearch() {
|
||||||
schedulersStore.loading = true;
|
schedulersStore.loading = true;
|
||||||
await schedulersStore.getSchedulersList();
|
await schedulersStore.getSchedulersList();
|
||||||
schedulersStore.loading = false;
|
schedulersStore.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 添加Schedulers视图 */
|
||||||
* * 添加Schedulers视图
|
|
||||||
*/
|
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('addNew')}${$t('schedulers')}`,
|
title: `${$t('addNew')}${$t('schedulers')}`,
|
||||||
|
|
|
@ -2,27 +2,24 @@ import { addDialog } from '@/components/BaseDialog/index';
|
||||||
import SchedulersGroupDialog from '@/views/scheduler/schedulersGroup/schedulers-group-dialog.vue';
|
import SchedulersGroupDialog from '@/views/scheduler/schedulersGroup/schedulers-group-dialog.vue';
|
||||||
import { useSchedulersGroupStore } from '@/store/scheduler/schedulersGroup';
|
import { useSchedulersGroupStore } from '@/store/scheduler/schedulersGroup';
|
||||||
import { h, ref } from 'vue';
|
import { h, ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { message, messageBox } from '@/utils/message';
|
||||||
import type { FormItemProps } from '@/views/scheduler/schedulersGroup/utils/types';
|
import type { FormItemProps } from '@/views/scheduler/schedulersGroup/utils/types';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
// 删除ids
|
// 删除ids
|
||||||
export const deleteIds = ref([]);
|
export const deleteIds = ref([]);
|
||||||
const schedulersGroupStore = useSchedulersGroupStore();
|
const schedulersGroupStore = useSchedulersGroupStore();
|
||||||
|
|
||||||
/**
|
/** 搜索初始化任务调度分组 */
|
||||||
* * 搜索初始化任务调度分组
|
|
||||||
*/
|
|
||||||
export async function onSearch() {
|
export async function onSearch() {
|
||||||
schedulersGroupStore.loading = true;
|
schedulersGroupStore.loading = true;
|
||||||
await schedulersGroupStore.getSchedulersGroupList();
|
await schedulersGroupStore.getSchedulersGroupList();
|
||||||
schedulersGroupStore.loading = false;
|
schedulersGroupStore.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 添加任务调度分组 */
|
||||||
* * 添加任务调度分组
|
|
||||||
*/
|
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('addNew')}${$t('schedulersGroup')}`,
|
title: `${$t('addNew')}${$t('schedulersGroup')}`,
|
||||||
|
@ -83,9 +80,7 @@ export function onUpdate(row: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除任务调度分组 */
|
||||||
* * 删除任务调度分组
|
|
||||||
*/
|
|
||||||
export const onDelete = async (row: any) => {
|
export const onDelete = async (row: any) => {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
|
|
||||||
|
@ -103,22 +98,32 @@ export const onDelete = async (row: any) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 批量删除 */
|
||||||
* 批量删除
|
|
||||||
*/
|
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const ids = deleteIds.value;
|
const ids = deleteIds.value;
|
||||||
|
const formDeletedBatchRef = ref();
|
||||||
|
|
||||||
// 是否确认删除
|
addDialog({
|
||||||
const result = await messageBox({
|
title: $t('deleteBatchTip'),
|
||||||
title: $t('confirmDelete'),
|
width: '30%',
|
||||||
showMessage: false,
|
props: { formInline: { confirmText: '' } },
|
||||||
confirmMessage: undefined,
|
draggable: true,
|
||||||
cancelMessage: $t('confirmDelete'),
|
fullscreenIcon: true,
|
||||||
});
|
closeOnClickModal: false,
|
||||||
if (!result) return;
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await schedulersGroupStore.deleteSchedulersGroup(ids);
|
await schedulersGroupStore.deleteSchedulersGroup(ids);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,6 +14,7 @@ import userAvatar from '@/assets/user.jpg';
|
||||||
import { fetchForcedOffline, fetchUploadAvatarByAdmin } from '@/api/v1/adminUser';
|
import { fetchForcedOffline, fetchUploadAvatarByAdmin } from '@/api/v1/adminUser';
|
||||||
import { useUserStore } from '@/store/system/user';
|
import { useUserStore } from '@/store/system/user';
|
||||||
import { useDeptStore } from '@/store/system/dept';
|
import { useDeptStore } from '@/store/system/dept';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
const adminUserStore = useAdminUserStore();
|
const adminUserStore = useAdminUserStore();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
@ -49,9 +50,7 @@ export async function onSearch() {
|
||||||
adminUserStore.loading = false;
|
adminUserStore.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 添加用户信息 */
|
||||||
* * 添加用户信息
|
|
||||||
*/
|
|
||||||
export function onAdd() {
|
export function onAdd() {
|
||||||
isAddUserinfo.value = true;
|
isAddUserinfo.value = true;
|
||||||
addDialog({
|
addDialog({
|
||||||
|
@ -130,9 +129,7 @@ export function onUpdate(row: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除用户信息 */
|
||||||
* * 删除用户信息
|
|
||||||
*/
|
|
||||||
export const onDelete = async (row: any) => {
|
export const onDelete = async (row: any) => {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
|
|
||||||
|
@ -150,22 +147,33 @@ export const onDelete = async (row: any) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 批量删除用户 */
|
||||||
* * 批量删除用户
|
|
||||||
*/
|
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
// 是否确认删除
|
const formDeletedBatchRef = ref();
|
||||||
const result = await messageBox({
|
|
||||||
title: $t('confirmDelete'),
|
|
||||||
showMessage: false,
|
|
||||||
confirmMessage: undefined,
|
|
||||||
cancelMessage: $t('confirmDelete'),
|
|
||||||
});
|
|
||||||
if (!result) return;
|
|
||||||
|
|
||||||
|
addDialog({
|
||||||
|
title: $t('deleteBatchTip'),
|
||||||
|
width: '30%',
|
||||||
|
props: { formInline: { confirmText: '' } },
|
||||||
|
draggable: true,
|
||||||
|
fullscreenIcon: true,
|
||||||
|
closeOnClickModal: false,
|
||||||
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await adminUserStore.deleteAdminUser(deleteIds.value);
|
await adminUserStore.deleteAdminUser(deleteIds.value);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,26 +2,23 @@ import { addDialog } from '@/components/BaseDialog/index';
|
||||||
import DeptDialog from '@/views/system/dept/dept-dialog.vue';
|
import DeptDialog from '@/views/system/dept/dept-dialog.vue';
|
||||||
import { useDeptStore } from '@/store/system/dept';
|
import { useDeptStore } from '@/store/system/dept';
|
||||||
import { h, ref } from 'vue';
|
import { h, ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { message, messageBox } from '@/utils/message';
|
||||||
import type { FormItemProps } from '@/views/system/dept/utils/types';
|
import type { FormItemProps } from '@/views/system/dept/utils/types';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
export const deleteIds = ref([]);
|
export const deleteIds = ref([]);
|
||||||
const deptStore = useDeptStore();
|
const deptStore = useDeptStore();
|
||||||
|
|
||||||
/**
|
/** 搜索初始化部门 */
|
||||||
* * 搜索初始化部门
|
|
||||||
*/
|
|
||||||
export async function onSearch() {
|
export async function onSearch() {
|
||||||
deptStore.loading = true;
|
deptStore.loading = true;
|
||||||
await deptStore.getDeptList();
|
await deptStore.getDeptList();
|
||||||
deptStore.loading = false;
|
deptStore.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 添加部门 */
|
||||||
* * 添加部门
|
|
||||||
*/
|
|
||||||
export function onAdd(parentId: number = 0) {
|
export function onAdd(parentId: number = 0) {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('addNew')}${$t('dept')}`,
|
title: `${$t('addNew')}${$t('dept')}`,
|
||||||
|
@ -86,9 +83,7 @@ export function onUpdate(row: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除部门 */
|
||||||
* * 删除部门
|
|
||||||
*/
|
|
||||||
export const onDelete = async (row: any) => {
|
export const onDelete = async (row: any) => {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
|
|
||||||
|
@ -106,22 +101,32 @@ export const onDelete = async (row: any) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 批量删除 */
|
||||||
* 批量删除
|
|
||||||
*/
|
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const ids = deleteIds.value;
|
const ids = deleteIds.value;
|
||||||
|
const formDeletedBatchRef = ref();
|
||||||
|
|
||||||
// 是否确认删除
|
addDialog({
|
||||||
const result = await messageBox({
|
title: $t('deleteBatchTip'),
|
||||||
title: $t('confirmDelete'),
|
width: '30%',
|
||||||
showMessage: false,
|
props: { formInline: { confirmText: '' } },
|
||||||
confirmMessage: undefined,
|
draggable: true,
|
||||||
cancelMessage: $t('confirmDelete'),
|
fullscreenIcon: true,
|
||||||
});
|
closeOnClickModal: false,
|
||||||
if (!result) return;
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await deptStore.deleteDept(ids);
|
await deptStore.deleteDept(ids);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -104,7 +104,7 @@ onMounted(() => {
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-button v-show="row.menuType !== 3" :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)"> {{ $t('addNew') }} </el-button>
|
<el-button v-show="row.menuType !== 3" :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd(row.id)"> {{ $t('addNew') }} </el-button>
|
||||||
<el-popconfirm :title="`${$t('delete')} ${row.title}?`" @confirm="handleDelete(row)">
|
<el-popconfirm :title="`${$t('delete')} ${$t(row.title)}?`" @confirm="handleDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
|
|
|
@ -31,9 +31,7 @@ export const getMenuType = (type: number, text: boolean = false): any => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 获取菜单数据 */
|
||||||
* * 获取菜单数据
|
|
||||||
*/
|
|
||||||
export const onSearch = async () => {
|
export const onSearch = async () => {
|
||||||
menuStore.loading = true;
|
menuStore.loading = true;
|
||||||
await menuStore.getMenuList();
|
await menuStore.getMenuList();
|
||||||
|
@ -51,9 +49,7 @@ export const formatHigherMenuOptions = (treeList: any) => {
|
||||||
return newTreeList;
|
return newTreeList;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 添加菜单 */
|
||||||
* * 添加菜单
|
|
||||||
*/
|
|
||||||
export function onAdd(parentId: any = 0) {
|
export function onAdd(parentId: any = 0) {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `新增菜单`,
|
title: `新增菜单`,
|
||||||
|
|
|
@ -2,30 +2,27 @@ import { addDialog } from '@/components/BaseDialog/index';
|
||||||
import PowerDialog from '@/views/system/power/power-dialog.vue';
|
import PowerDialog from '@/views/system/power/power-dialog.vue';
|
||||||
import { usePowerStore } from '@/store/system/power';
|
import { usePowerStore } from '@/store/system/power';
|
||||||
import { h, reactive, ref } from 'vue';
|
import { h, reactive, ref } from 'vue';
|
||||||
import { messageBox } from '@/utils/message';
|
import { message, messageBox } from '@/utils/message';
|
||||||
import type { FormItemProps } from '@/views/system/power/utils/types';
|
import type { FormItemProps } from '@/views/system/power/utils/types';
|
||||||
import { $t } from '@/plugins/i18n';
|
import { $t } from '@/plugins/i18n';
|
||||||
import { handleTree } from '@pureadmin/utils';
|
import { handleTree } from '@pureadmin/utils';
|
||||||
import { powerCascadeProps } from '@/views/system/power/utils/columns';
|
import { powerCascadeProps } from '@/views/system/power/utils/columns';
|
||||||
import { ElCascader, ElForm, ElFormItem } from 'element-plus';
|
import { ElCascader, ElForm, ElFormItem } from 'element-plus';
|
||||||
|
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
|
||||||
|
|
||||||
export const formRef = ref();
|
export const formRef = ref();
|
||||||
// 批量点击id列表
|
// 批量点击id列表
|
||||||
export const powerIds = ref([]);
|
export const powerIds = ref([]);
|
||||||
const powerStore = usePowerStore();
|
const powerStore = usePowerStore();
|
||||||
|
|
||||||
/**
|
/** 搜索初始化权限 */
|
||||||
* * 搜索初始化权限
|
|
||||||
*/
|
|
||||||
export async function onSearch() {
|
export async function onSearch() {
|
||||||
powerStore.loading = true;
|
powerStore.loading = true;
|
||||||
await powerStore.getPowerList();
|
await powerStore.getPowerList();
|
||||||
powerStore.loading = false;
|
powerStore.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 添加权限 */
|
||||||
* * 添加权限
|
|
||||||
*/
|
|
||||||
export function onAdd(parentId = 0) {
|
export function onAdd(parentId = 0) {
|
||||||
addDialog({
|
addDialog({
|
||||||
title: `${$t('addNew')}${$t('power')}`,
|
title: `${$t('addNew')}${$t('power')}`,
|
||||||
|
@ -90,9 +87,7 @@ export function onUpdate(row: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 删除权限 */
|
||||||
* * 删除权限
|
|
||||||
*/
|
|
||||||
export const onDelete = async (row: any) => {
|
export const onDelete = async (row: any) => {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
|
|
||||||
|
@ -110,29 +105,37 @@ export const onDelete = async (row: any) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 批量删除 */
|
||||||
* 批量删除
|
|
||||||
*/
|
|
||||||
export const onDeleteBatch = async () => {
|
export const onDeleteBatch = async () => {
|
||||||
const ids = powerIds.value;
|
const ids = powerIds.value;
|
||||||
|
const formDeletedBatchRef = ref();
|
||||||
|
|
||||||
// 是否确认删除
|
addDialog({
|
||||||
const result = await messageBox({
|
title: $t('deleteBatchTip'),
|
||||||
title: $t('confirmDelete'),
|
width: '30%',
|
||||||
showMessage: false,
|
props: { formInline: { confirmText: '' } },
|
||||||
confirmMessage: undefined,
|
draggable: true,
|
||||||
cancelMessage: $t('confirmDelete'),
|
fullscreenIcon: true,
|
||||||
});
|
closeOnClickModal: false,
|
||||||
if (!result) return;
|
contentRenderer: () => h(DeleteBatchDialog, { ref: formDeletedBatchRef }),
|
||||||
|
beforeSure: (done, { options }) => {
|
||||||
|
formDeletedBatchRef.value.formDeletedBatchRef.validate(async (valid: any) => {
|
||||||
|
if (!valid) return;
|
||||||
|
|
||||||
|
const text = options.props.formInline.confirmText.toLowerCase();
|
||||||
|
if (text === 'yes' || text === 'y') {
|
||||||
// 删除数据
|
// 删除数据
|
||||||
await powerStore.deletePower(ids);
|
await powerStore.deletePower(ids);
|
||||||
await onSearch();
|
await onSearch();
|
||||||
|
|
||||||
|
done();
|
||||||
|
} else message($t('deleteBatchTip'), { type: 'warning' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 批量更新父级id */
|
||||||
* * 批量更新父级id
|
|
||||||
*/
|
|
||||||
export const onUpdateBatchParent = async () => {
|
export const onUpdateBatchParent = async () => {
|
||||||
const formUpdateParentRef = ref();
|
const formUpdateParentRef = ref();
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
|
|
|
@ -25,17 +25,13 @@ const treeIds = ref([]);
|
||||||
// 树形结构权限列表
|
// 树形结构权限列表
|
||||||
const datalist = computed(() => handleTree(powerStore.allPowerList));
|
const datalist = computed(() => handleTree(powerStore.allPowerList));
|
||||||
|
|
||||||
/**
|
/** 获取所有权限 */
|
||||||
* 获取所有权限
|
|
||||||
*/
|
|
||||||
const getAllPowers = async () => {
|
const getAllPowers = async () => {
|
||||||
await powerStore.getAllPowers();
|
await powerStore.getAllPowers();
|
||||||
treeIds.value = getKeyList(powerStore.allPowerList, 'id');
|
treeIds.value = getKeyList(powerStore.allPowerList, 'id');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 保存 */
|
||||||
* 菜单权限-保存
|
|
||||||
*/
|
|
||||||
const onSave = async () => {
|
const onSave = async () => {
|
||||||
// 构建保存参数
|
// 构建保存参数
|
||||||
const { id, description } = currentRow.value;
|
const { id, description } = currentRow.value;
|
||||||
|
|
|
@ -137,7 +137,7 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
|
|
||||||
<el-button :icon="useRenderIcon(Menu)" :size="size" class="reset-margin" link type="primary" @click="onMenuPowerClick(row)"> {{ $t('power_setting') }}} </el-button>
|
<el-button :icon="useRenderIcon(Menu)" :size="size" class="reset-margin" link type="primary" @click="onMenuPowerClick(row)"> {{ $t('power_setting') }} </el-button>
|
||||||
</template>
|
</template>
|
||||||
</pure-table>
|
</pure-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const columns: TableColumnList = [
|
||||||
{ label: $t('table.createTime'), prop: 'createTime', sortable: true },
|
{ label: $t('table.createTime'), prop: 'createTime', sortable: true },
|
||||||
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 90 },
|
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 90 },
|
||||||
{ label: $t('table.updateUser'), prop: 'updateUser', slot: 'updateUser', width: 90 },
|
{ label: $t('table.updateUser'), prop: 'updateUser', slot: 'updateUser', width: 90 },
|
||||||
{ label: $t('table.operation'), fixed: 'right', width: 210, slot: 'operation' },
|
{ label: $t('table.operation'), fixed: 'right', width: 240, slot: 'operation' },
|
||||||
];
|
];
|
||||||
|
|
||||||
// 添加规则
|
// 添加规则
|
||||||
|
|
Loading…
Reference in New Issue