验证,组件优化,样式优化等

This commit is contained in:
吕金泽
2022-03-19 23:20:06 +08:00
parent 284823a671
commit d007875a43
24 changed files with 383 additions and 606 deletions
@@ -5,7 +5,7 @@
"groupId" : "8295fc13678d4144bf7363c465247a50",
"name" : "删除",
"createTime" : null,
"updateTime" : 1646553126039,
"updateTime" : 1647615807925,
"lock" : "0",
"createBy" : null,
"updateBy" : null,
@@ -118,5 +118,17 @@
}
}
================================
var pCount = db.selectInt("select count(1) from sys_office where is_del = 0 and pid = #{id}")
if(pCount > 0){
exit 500,'存在下级机构,不允许删除'
}
var userCount = db.selectInt("select count(1) from sys_user where is_del = 0 and office_id = #{id}")
if(userCount > 0){
exit 500, '机构存在用户,不允许删除'
}
var root = db.selectValue("select pid from sys_office where is_del = 0 and id = #{id}")
if(root == '0'){
exit 500, '不能删除根节点'
}
// db.table('sys_user_office').where().eq("office_id",id).delete();
return db.table("sys_office").logic().where().eq("id",id).delete();