|
@@ -47,16 +47,8 @@
|
|
function _classif(res=[]) {
|
|
function _classif(res=[]) {
|
|
// res 分类数据 先期模拟
|
|
// res 分类数据 先期模拟
|
|
let temps = '<option value="0">-| 顶级菜单</option>';
|
|
let temps = '<option value="0">-| 顶级菜单</option>';
|
|
- var data = [
|
|
|
|
- {id: 1, name: "办公管理", pid: 0},
|
|
|
|
- {id: 2, name: "请假申请", pid: 1},
|
|
|
|
- {id: 3, name: "出差申请", pid: 1},
|
|
|
|
- {id: 4, name: "请假记录", pid: 2},
|
|
|
|
- {id: 5, name: "系统设置", pid: 0},
|
|
|
|
- {id: 6, name: "权限管理", pid: 5},
|
|
|
|
- {id: 7, name: "用户角色", pid: 6},
|
|
|
|
- {id: 8, name: "菜单设置", pid: 6},
|
|
|
|
- ];
|
|
|
|
|
|
+
|
|
|
|
+ var data = {$categorys|raw}
|
|
|
|
|
|
let toTrees = toTree(data);
|
|
let toTrees = toTree(data);
|
|
for (let item of toTrees) {
|
|
for (let item of toTrees) {
|
|
@@ -98,7 +90,12 @@
|
|
success: (res) => {
|
|
success: (res) => {
|
|
// todo
|
|
// todo
|
|
if (res.status === 1) {
|
|
if (res.status === 1) {
|
|
-
|
|
|
|
|
|
+ layer.msg("新增成功",function () {
|
|
|
|
+ window.location = "{:url('index')}";
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ layer.msg(res.message);
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|