From 9167025bb8fe2f1b2c9b3d446a372c7cba16ef63 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期五, 15 十二月 2023 17:39:01 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/deviceOperate/devpOperate.html |   53 +++++++++++++++++++++++++++++++----------------------
 1 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/src/main/webapp/views/deviceOperate/devpOperate.html b/src/main/webapp/views/deviceOperate/devpOperate.html
index 785df61..8dd7e98 100644
--- a/src/main/webapp/views/deviceOperate/devpOperate.html
+++ b/src/main/webapp/views/deviceOperate/devpOperate.html
@@ -54,7 +54,9 @@
 							</el-form-item>
 						</el-form>
 						<div>
-							<el-button @click="requestOperate('put')" type="primary">鏇存柊</el-button>
+							<el-button @click="requestOperate('update')" type="primary">鏇存柊</el-button>
+							<el-button @click="requestOperate('out')" type="warning">鍙栬揣瀹屾垚</el-button>
+							<el-button @click="requestOperate('in')" type="warning">鏀捐揣瀹屾垚</el-button>
 						</div>
 					</div>
 				</el-card>
@@ -158,29 +160,36 @@
 						}
 					});
 				},
-				requestOperate() {
+				requestOperate(method) {
 					let that = this
-					$.ajax({
-						url: baseUrl + "/site/detl/update",
-						headers: {
-							'token': localStorage.getItem('token')
-						},
-						data: this.formParam,
-						method: 'POST',
-						success: function (res) {
-							if (res.code == 200) {
-								that.$message({
-									message: res.msg,
-									type: 'success'
-								});
-							} else {
-								that.$message({
-									message: res.msg,
-									type: 'error'
-								});
+					that.$confirm('姝ゆ搷浣滃瓨鍦ㄩ闄╋紝鏄惁缁х画','鎻愮ず',{
+						confirmButtonText: '纭畾',
+						cancelButtonText: '鍙栨秷',
+						type: 'warning'
+					}).then(()=>{
+						$.ajax({
+							url: baseUrl + "/site/detl/"+method,
+							headers: {
+								'token': localStorage.getItem('token')
+							},
+							data: this.formParam,
+							method: 'POST',
+							success: function (res) {
+								if (res.code == 200) {
+									that.$message({
+										message: res.msg,
+										type: 'success'
+									});
+								} else {
+									that.$message({
+										message: res.msg,
+										type: 'error'
+									});
+								}
 							}
-						}
-					});
+						});
+					})
+
 				}
 			}
 		})

--
Gitblit v1.9.1