From 26b56d135ef0be0c3a3df782f54a68b8e1ee310c Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期四, 10 十月 2024 11:57:51 +0800
Subject: [PATCH] 1

---
 src/views/master/person/main/department.vue |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/views/master/person/main/department.vue b/src/views/master/person/main/department.vue
index aea0eec..26ae0a3 100644
--- a/src/views/master/person/main/department.vue
+++ b/src/views/master/person/main/department.vue
@@ -100,11 +100,16 @@
 			},
 			//琛ㄥ崟鎻愪氦鏂规硶
 			departmentSubmit(){
+				if(this.mode == "edit") {
+					var postMethods = "put";
+				}else {
+					var postMethods = "post";
+				}
 				var obj = Object.assign({},this.depatmentForm);
 				obj.status = obj.status ? 1 : 0;
 				this.$refs.dialogForm.validate(async (valid) => {
 					if (valid) {
-						this.$HTTP.post("/api/blade-cps/group",obj).then(res=> {
+						this.$HTTP[postMethods]("/api/blade-cps/group",obj).then(res=> {
 							if(res.code == 200) {
 								this.$emit('success', this.depatmentForm, this.mode);
 								this.visible = false;

--
Gitblit v1.9.3