fix: 🐛 统一主键为 string 类型
This commit is contained in:
@@ -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