This commit is contained in:
Ray.Hao
2025-04-02 20:50:13 +08:00
25 changed files with 104 additions and 108 deletions

View File

@@ -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: "取消",

View File

@@ -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 = [

View File

@@ -129,11 +129,6 @@
</template>
<script setup lang="ts">
defineOptions({
name: "DictItem",
inherititems: false,
});
import DictAPI, { DictItemPageQuery, DictItemPageVO, DictItemForm } from "@/api/system/dict.api";
const route = useRoute();
@@ -276,10 +271,4 @@ function handleDelete(id?: number) {
onMounted(() => {
handleQuery();
});
// 同一路由参数变化时更新数据
onBeforeRouteUpdate((to) => {
queryParams.dictCode = to.query.dictCode as string;
handleQuery();
});
</script>

View File

@@ -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) => {

View File

@@ -487,7 +487,7 @@ function handleSubmit() {
}
// 删除菜单
function handleDelete(menuId: number) {
function handleDelete(menuId: string) {
if (!menuId) {
ElMessage.warning("请勾选删除项");
return false;

View File

@@ -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();

View File

@@ -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 = "修改角色";

View File

@@ -24,7 +24,7 @@
import DeptAPI from "@/api/system/dept.api";
const props = defineProps({
modelValue: {
type: [Number],
type: [String, Number],
default: undefined,
},
});

View File

@@ -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");

View File

@@ -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();