From 6a56e9a4d210a1fe5f2f395dbc7ae82518cf161e Mon Sep 17 00:00:00 2001 From: Dai Date: Sat, 10 Aug 2024 09:32:09 +0800 Subject: [PATCH] key policy --- app/api/controller/UserPolicyController.php | 32 ++++ app/common/model/UserPolicy.php | 12 ++ plugin/admin/app/model/UserPolicy.php | 32 ++++ .../app/view/teacher-schedule-time/index.html | 23 ++- plugin/admin/app/view/user-policy/index.html | 158 +++++++++++++++ plugin/admin/app/view/user-policy/insert.html | 142 ++++++++++++++ plugin/admin/app/view/user-policy/update.html | 180 ++++++++++++++++++ 7 files changed, 575 insertions(+), 4 deletions(-) create mode 100644 app/api/controller/UserPolicyController.php create mode 100644 app/common/model/UserPolicy.php create mode 100644 plugin/admin/app/model/UserPolicy.php create mode 100644 plugin/admin/app/view/user-policy/index.html create mode 100644 plugin/admin/app/view/user-policy/insert.html create mode 100644 plugin/admin/app/view/user-policy/update.html diff --git a/app/api/controller/UserPolicyController.php b/app/api/controller/UserPolicyController.php new file mode 100644 index 0000000..45e6000 --- /dev/null +++ b/app/api/controller/UserPolicyController.php @@ -0,0 +1,32 @@ +findOrEmpty(); + + return json([ + 'code' => ResponseCode::SUCCESS, + 'data' => $policy, + 'msg' => 'success', + ]); + } catch (Exception $e) { + return json([ + 'code' => ResponseCode::FAIL, + 'msg' => $e->getMessage() + ]); + } + } + +} diff --git a/app/common/model/UserPolicy.php b/app/common/model/UserPolicy.php new file mode 100644 index 0000000..58594f6 --- /dev/null +++ b/app/common/model/UserPolicy.php @@ -0,0 +1,12 @@ + @@ -289,6 +290,8 @@ add(); } else if (obj.event === "refresh") { refreshTable(); + } else if (obj.event === "export-schedule") { + exportSchedule(); } else if (obj.event === "batchRemove") { batchRemove(obj); } @@ -346,6 +349,18 @@ }); } + // 表格新增数据 + let exportSchedule = function () { + layer.open({ + type: 2, + title: "汇总导出", + shade: 0.1, + maxmin: true, + area: [common.isModile() ? "100%" : "500px", common.isModile() ? "100%" : "450px"], + content: INSERT_URL + }); + } + // 表格编辑数据 let edit = function (obj) { let value = obj.data[PRIMARY_KEY]; diff --git a/plugin/admin/app/view/user-policy/index.html b/plugin/admin/app/view/user-policy/index.html new file mode 100644 index 0000000..16b6115 --- /dev/null +++ b/plugin/admin/app/view/user-policy/index.html @@ -0,0 +1,158 @@ + + + + + 浏览页面 + + + + + +
+ +
+
+ +
+ +
+ + +
+
+ +
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + diff --git a/plugin/admin/app/view/user-policy/insert.html b/plugin/admin/app/view/user-policy/insert.html new file mode 100644 index 0000000..7efdac5 --- /dev/null +++ b/plugin/admin/app/view/user-policy/insert.html @@ -0,0 +1,142 @@ + + + + + 新增页面 + + + + + + +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + diff --git a/plugin/admin/app/view/user-policy/update.html b/plugin/admin/app/view/user-policy/update.html new file mode 100644 index 0000000..d827081 --- /dev/null +++ b/plugin/admin/app/view/user-policy/update.html @@ -0,0 +1,180 @@ + + + + + 更新页面 + + + + + + + +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+ + + + + + + + + + +