From e2be5c23dae2f82867543cc2d60cdd9147be3b6b Mon Sep 17 00:00:00 2001 From: wikiboss Date: Mon, 2 Nov 2026 14:59:10 +0800 Subject: [PATCH] =?UTF-8?q?feat(forecast):=20=E5=A2=9E=E5=BC=BA=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=BC=B9=E7=AA=97=E5=BA=95=E9=83=A8=E4=BE=BF=E6=8D=B7?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=B8=8E=E5=88=A0=E9=99=A4=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/view/forecast/index.html | 10 +++++++++- public/assets/js/backend/forecast.js | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/application/admin/view/forecast/index.html b/application/admin/view/forecast/index.html index 6344570..1ecf81f 100644 --- a/application/admin/view/forecast/index.html +++ b/application/admin/view/forecast/index.html @@ -37,7 +37,15 @@ -
关闭
+
+
+ 删除此记录 +
+
+ 编辑温湿度 + 关闭 +
+
diff --git a/public/assets/js/backend/forecast.js b/public/assets/js/backend/forecast.js index 99ee85f..7cde5ac 100644 --- a/public/assets/js/backend/forecast.js +++ b/public/assets/js/backend/forecast.js @@ -81,6 +81,20 @@ define(['jquery', 'bootstrap', 'backend', 'backend/forecast/components'], functi }); }).catch(function () {}); }, + deleteFromDetail: function () { + if (this.selected) { + this.deleteRecord(this.selected); + } + }, + editFromDetail: function () { + var self = this; + if (this.selected) { + var rec = this.selected; + this.closeDetail(function () { + self.editRecord(rec); + }); + } + }, write: function (action, data, callback) { if (this.saving) return; var self = this;