fix: 🐛 统一主键为 string 类型
This commit is contained in:
@@ -198,7 +198,7 @@ function handleSelectionChange(selection: any) {
|
||||
}
|
||||
|
||||
// 打开系统配置弹窗
|
||||
function handleOpenDialog(id?: number) {
|
||||
function handleOpenDialog(id?: string) {
|
||||
dialog.visible = true;
|
||||
if (id) {
|
||||
dialog.title = "修改系统配置";
|
||||
@@ -259,7 +259,7 @@ function handleCloseDialog() {
|
||||
}
|
||||
|
||||
// 删除系统配置
|
||||
function handleDelete(id: number) {
|
||||
function handleDelete(id: string) {
|
||||
ElMessageBox.confirm("确认删除该项配置?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
|
||||
@@ -213,7 +213,7 @@ function handleSelectionChange(selection: any) {
|
||||
* @param parentId 父部门ID
|
||||
* @param deptId 部门ID
|
||||
*/
|
||||
async function handleOpenDialog(parentId?: string, deptId?: number) {
|
||||
async function handleOpenDialog(parentId?: string, deptId?: string) {
|
||||
// 加载部门下拉数据
|
||||
const data = await DeptAPI.getOptions();
|
||||
deptOptions.value = [
|
||||
|
||||
@@ -198,7 +198,7 @@ function handleAddClick() {
|
||||
*
|
||||
* @param id 字典ID
|
||||
*/
|
||||
function handleEditClick(id: number) {
|
||||
function handleEditClick(id: string) {
|
||||
dialog.visible = true;
|
||||
dialog.title = "修改字典";
|
||||
DictAPI.getFormData(id).then((data) => {
|
||||
|
||||
@@ -487,7 +487,7 @@ function handleSubmit() {
|
||||
}
|
||||
|
||||
// 删除菜单
|
||||
function handleDelete(menuId: number) {
|
||||
function handleDelete(menuId: string) {
|
||||
if (!menuId) {
|
||||
ElMessage.warning("请勾选删除项");
|
||||
return false;
|
||||
|
||||
@@ -341,7 +341,7 @@ function handleSelectionChange(selection: any) {
|
||||
}
|
||||
|
||||
// 打开通知公告弹窗
|
||||
function handleOpenDialog(id?: number) {
|
||||
function handleOpenDialog(id?: string) {
|
||||
UserAPI.getOptions().then((data) => {
|
||||
userOptions.value = data;
|
||||
});
|
||||
@@ -359,7 +359,7 @@ function handleOpenDialog(id?: number) {
|
||||
}
|
||||
|
||||
// 发布通知公告
|
||||
function handlePublish(id: number) {
|
||||
function handlePublish(id: string) {
|
||||
NoticeAPI.publish(id).then(() => {
|
||||
ElMessage.success("发布成功");
|
||||
handleQuery();
|
||||
@@ -367,7 +367,7 @@ function handlePublish(id: number) {
|
||||
}
|
||||
|
||||
// 撤回通知公告
|
||||
function handleRevoke(id: number) {
|
||||
function handleRevoke(id: string) {
|
||||
NoticeAPI.revoke(id).then(() => {
|
||||
ElMessage.success("撤回成功");
|
||||
handleQuery();
|
||||
|
||||
@@ -257,7 +257,7 @@ const rules = reactive({
|
||||
|
||||
// 选中的角色
|
||||
interface CheckedRole {
|
||||
id?: number;
|
||||
id?: string;
|
||||
name?: string;
|
||||
}
|
||||
const checkedRole = ref<CheckedRole>({});
|
||||
@@ -294,7 +294,7 @@ function handleSelectionChange(selection: any) {
|
||||
}
|
||||
|
||||
// 打开角色弹窗
|
||||
function handleOpenDialog(roleId?: number) {
|
||||
function handleOpenDialog(roleId?: string) {
|
||||
dialog.visible = true;
|
||||
if (roleId) {
|
||||
dialog.title = "修改角色";
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
import DeptAPI from "@/api/system/dept.api";
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: [Number],
|
||||
type: [String, Number],
|
||||
default: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -163,7 +163,7 @@ const handleUpload = async () => {
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await UserAPI.import(1, importFormData.files[0].raw as File);
|
||||
const result = await UserAPI.import("1", importFormData.files[0].raw as File);
|
||||
if (result.code === ResultEnum.SUCCESS && result.invalidCount === 0) {
|
||||
ElMessage.success("导入成功,导入数据:" + result.validCount + "条");
|
||||
emit("import-success");
|
||||
|
||||
@@ -360,7 +360,7 @@ function hancleResetPassword(row: UserPageVO) {
|
||||
*
|
||||
* @param id 用户ID
|
||||
*/
|
||||
async function handleOpenDialog(id?: number) {
|
||||
async function handleOpenDialog(id?: string) {
|
||||
dialog.visible = true;
|
||||
// 加载角色下拉数据源
|
||||
roleOptions.value = await RoleAPI.getOptions();
|
||||
|
||||
Reference in New Issue
Block a user