diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 5037385a..567706f1 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -30,12 +30,4 @@ const fontColor = computed(() => {
return settingsStore.theme === ThemeMode.DARK ? "rgba(255, 255, 255, .15)" : "rgba(0, 0, 0, .15)";
});
-ElNotification({
- title: '提示',
- type: 'warning',
- duration: 0,
- dangerouslyUseHTMLString: true,
- message:
- '
遇事不决,请先查阅常见问题,说不定你能找到相关解答
链接地址
'
-})
diff --git a/frontend/src/views/monitor/job/index.vue b/frontend/src/views/monitor/job/index.vue
index 89a7067c..9ac35d94 100644
--- a/frontend/src/views/monitor/job/index.vue
+++ b/frontend/src/views/monitor/job/index.vue
@@ -107,7 +107,7 @@
/>
-
+
-
+
+
@@ -339,13 +340,24 @@ async function handleResetQuery() {
loadingData();
}
+// 定义初始表单数据常量
+const initialFormData: NoticeForm = {
+ id: undefined,
+ notice_title: '',
+ notice_type: '',
+ notice_content: '',
+ status: true,
+ description: undefined,
+}
+
// 重置表单
async function resetForm() {
if (dataFormRef.value) {
dataFormRef.value.resetFields();
dataFormRef.value.clearValidate();
}
- formData.id = undefined;
+ // 完全重置 formData 为初始状态
+ Object.assign(formData, initialFormData);
}
// 行复选框选中项变化
diff --git a/frontend/src/views/system/position/index.vue b/frontend/src/views/system/position/index.vue
index 1aef3401..41fabf45 100644
--- a/frontend/src/views/system/position/index.vue
+++ b/frontend/src/views/system/position/index.vue
@@ -293,13 +293,23 @@ async function handleResetQuery() {
loadingData();
}
+// 定义初始表单数据常量
+const initialFormData: PositionForm = {
+ id: undefined,
+ name: undefined,
+ order: 1,
+ status: true,
+ description: undefined,
+}
+
// 重置表单
async function resetForm() {
if (dataFormRef.value) {
dataFormRef.value.resetFields();
dataFormRef.value.clearValidate();
}
- formData.id = undefined;
+ // 完全重置 formData 为初始状态
+ Object.assign(formData, initialFormData);
}
// 行复选框选中项变化
diff --git a/frontend/src/views/system/role/index.vue b/frontend/src/views/system/role/index.vue
index 31b5527a..b9c2e771 100644
--- a/frontend/src/views/system/role/index.vue
+++ b/frontend/src/views/system/role/index.vue
@@ -325,13 +325,23 @@ async function handleResetQuery() {
loadingData();
}
+// 定义初始表单数据常量
+const initialFormData: RoleForm = {
+ id: undefined,
+ name: undefined,
+ order: 1,
+ status: true,
+ description: undefined,
+}
+
// 重置表单
async function resetForm() {
if (dataFormRef.value) {
dataFormRef.value.resetFields();
dataFormRef.value.clearValidate();
}
- formData.id = undefined;
+ // 完全重置 formData 为初始状态
+ Object.assign(formData, initialFormData);
}
// 关闭弹窗
diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue
index 2e78cedf..b1f74871 100644
--- a/frontend/src/views/system/user/index.vue
+++ b/frontend/src/views/system/user/index.vue
@@ -440,13 +440,34 @@ async function handleResetQuery() {
loadingData();
}
+// 定义初始表单数据常量
+const initialFormData: UserForm = {
+ id: undefined,
+ username: undefined,
+ name: undefined,
+ dept_id: undefined,
+ dept_name: undefined,
+ role_ids: undefined,
+ roleNames: undefined,
+ position_ids: undefined,
+ positionNames: undefined,
+ password: undefined,
+ gender: undefined,
+ email: undefined,
+ mobile: undefined,
+ is_superuser: false, //默认不是超管
+ status: true,
+ description: undefined,
+}
+
// 重置表单
async function resetForm() {
if (dataFormRef.value) {
dataFormRef.value.resetFields();
dataFormRef.value.clearValidate();
}
- formData.id = undefined;
+ // 完全重置 formData 为初始状态
+ Object.assign(formData, initialFormData);
}
// 选中项发生变化