diff --git a/web/.gitignore b/web/.gitignore
index c6c57be..aa1baf2 100644
--- a/web/.gitignore
+++ b/web/.gitignore
@@ -1,7 +1,6 @@
.DS_Store
node_modules
/dist
-package-lock.json
yarn.lock
# local env files
diff --git a/web/src/views/system/dept/components/FormCom.vue b/web/src/views/system/dept/components/DeptFormCom.vue
similarity index 62%
rename from web/src/views/system/dept/components/FormCom.vue
rename to web/src/views/system/dept/components/DeptFormCom.vue
index 3f805db..2aff9a7 100644
--- a/web/src/views/system/dept/components/FormCom.vue
+++ b/web/src/views/system/dept/components/DeptFormCom.vue
@@ -26,17 +26,20 @@
- 保存
+
+ {{ deptFormData.id ? '保存' : '新增' }}
+
取消
-
diff --git a/web/src/views/system/dept/index.vue b/web/src/views/system/dept/index.vue
index 5bdb014..9cc0018 100644
--- a/web/src/views/system/dept/index.vue
+++ b/web/src/views/system/dept/index.vue
@@ -74,7 +74,7 @@
-
+
@@ -84,7 +84,7 @@ import { ref, onMounted, reactive } from 'vue';
import XEUtils from 'xe-utils';
import { ElForm, ElMessageBox, FormRules } from 'element-plus';
import TreeCom from './components/TreeCom.vue'
-import FormCom from './components/FormCom.vue'
+import DeptFormCom from './components/DeptFormCom.vue'
import { GetList, AddObj, UpdateObj, DelObj } from './api';
import { successMessage } from '../../../utils/message';
import { APIResponseData, DeptFormDataType, TreeItemType } from './types';
@@ -182,7 +182,10 @@ const handleUpdateMenu = (type: string, record?: TreeItemType) => {
}); */
};
-const handleDrawerClose = () => {
+const handleDrawerClose = (type?: string) => {
+ if (type === 'submit') {
+ getData()
+ }
drawerVisible.value = false
drawerFormData.value = {}
}
diff --git a/web/src/views/system/dept/types.ts b/web/src/views/system/dept/types.ts
index a1ef5c6..cf52653 100644
--- a/web/src/views/system/dept/types.ts
+++ b/web/src/views/system/dept/types.ts
@@ -40,9 +40,9 @@ export interface TreeItemType {
}
export interface DeptFormDataType {
- id: string;
+ id: string | number;
key: string;
- parent: string;
+ parent: string | number;
name: string;
owner: string;
phone: string;