refactor(backend): 统一返回的数据格式

This commit is contained in:
zhengxinonly
2025-07-08 22:16:12 +08:00
parent 65e41ac9f1
commit fa69175e65
18 changed files with 212 additions and 113 deletions
+2 -2
View File
@@ -84,7 +84,7 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">上级部门ID</label>
<label class="layui-form-label">上级部门 ID</label>
<div class="layui-input-block">
<input
type="text"
@@ -145,7 +145,7 @@
elem: "#department-table",
id: "department-table",
url: "/api/v1/department?type=tree", // 此处为静态模拟数据,实际使用时需换成真实接口
height: "full-35", // 最大高度减去其他容器已占有的高度差
height: "full", // 最大高度减去其他容器已占有的高度差
toolbar: "#department-toolbar",
page: true,
cols: [
+2 -2
View File
@@ -214,7 +214,7 @@
elem: "#rights-table",
id: "rights-table",
url: "/api/v1/rights?type=treetable", // 此处为静态模拟数据,实际使用时需换成真实接口
height: "full-35", // 最大高度减去其他容器已占有的高度差
height: "full", // 最大高度减去其他容器已占有的高度差
toolbar: "#rights-toolbar",
cols: [
[
@@ -260,7 +260,7 @@
templet: (d) => {
return `<input type="checkbox" name="status" value="${
d.id
}" title="启用|禁用" lay-skin="switch" ${
}" title="启用 | 禁用" lay-skin="switch" ${
d.status ? "checked" : ""
} lay-filter="rights-table-switch-status"/>`;
},
+1 -1
View File
@@ -180,7 +180,7 @@
elem: "#role-table",
id: "role-table",
url: "/api/v1/role", // 此处为静态模拟数据,实际使用时需换成真实接口
height: "full-35", // 最大高度减去其他容器已占有的高度差
height: "full", // 最大高度减去其他容器已占有的高度差
toolbar: "#role-toolbar",
page: true,
cols: [
+2 -1
View File
@@ -157,6 +157,7 @@
action=""
id="user-role-form"
lay-filter="user-role-form"
style="display: none"
>
<div class="row" style="margin: 10px 5px">
<ul id="user_role" class="dtree" data-id="0"></ul>
@@ -193,7 +194,7 @@
elem: "#user-table",
id: "user-table",
url: "/api/v1/user", // 此处为静态模拟数据,实际使用时需换成真实接口
height: "full-35", // 最大高度减去其他容器已占有的高度差
height: "full", // 最大高度减去其他容器已占有的高度差
toolbar: "#user-toolbar",
page: true,
cols: [