From 5e89d1a5f6f5d746043f1c271540ffe7129d8cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E7=91=9E=E8=B6=85?= <281809423@qq.com> Date: Sun, 1 Nov 2020 15:19:10 +0800 Subject: [PATCH] =?UTF-8?q?=20=20=E5=85=B8=E5=9E=8B=E6=A1=88=E4=BE=8B?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/front/cases/add.html | 24 ++++++++++--------- .../templates/front/cases/cases.html | 14 ++++++++++- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ruoyi-front/src/main/resources/templates/front/cases/add.html b/ruoyi-front/src/main/resources/templates/front/cases/add.html index 8444799dc..fe53898ec 100644 --- a/ruoyi-front/src/main/resources/templates/front/cases/add.html +++ b/ruoyi-front/src/main/resources/templates/front/cases/add.html @@ -30,7 +30,7 @@
代码生成请选择字典属性
@@ -47,22 +47,21 @@ -
- +
+
-
- - -
- 代码生成请选择字典属性 +
-
+
@@ -75,7 +74,10 @@ function submitHandler() { if ($.validate.form()) { - $.operate.save(prefix + "/add", $('#form-cases-add').serialize()); + var data = $("#form-cases-add").serializeArray(); + var status = $("input[id='status']").is(':checked') == true ? 0 : 1; + data.push({"name": "status", "value": status}); + $.operate.save(prefix + "/add", data); } } diff --git a/ruoyi-front/src/main/resources/templates/front/cases/cases.html b/ruoyi-front/src/main/resources/templates/front/cases/cases.html index 0e7f09ec1..6d5a50f45 100644 --- a/ruoyi-front/src/main/resources/templates/front/cases/cases.html +++ b/ruoyi-front/src/main/resources/templates/front/cases/cases.html @@ -112,7 +112,10 @@ }, { field: 'status', - title: '状态' + title: '状态', + formatter: function (value, row, index) { + return statusTools(row); + } }, { title: '操作', @@ -127,6 +130,15 @@ }; $.table.init(options); }); + + /* 用户状态显示 */ + function statusTools(row) { + if (row.status == 1) { + return ' '; + } else { + return ' '; + } + } \ No newline at end of file