修改审批

This commit is contained in:
mzl
2025-09-18 06:46:15 +00:00
parent 8f8d07044b
commit e5441d51ae
40 changed files with 440 additions and 761 deletions
-47
View File
@@ -98,53 +98,6 @@ class IndexController
}
public function test2(Request $request)
{
$where[] = ['id', '>', 141];
$list = (new \app\common\utils\MigrationResources())->getFullResourceTreeOptimized('resources', $where);
$keys = ['system_id','name','desc','type','code','parent_id','url','icon','open_type','link',
'is_hide','is_hide_tab','no_auth','is_home','instance','keep_alive','sort','status'];
foreach ($list as $key=>$item) {
$temp = [];
foreach ($item as $k=>$v) {
if (isset($item['children']) && count($item['children']) > 0) {
$temp = $item['children'];
}
if (!in_array($k, $keys)) {
unset($item[$k]);
}
$id = Db::table('resources')->insertGetId($item);
if ($temp) {
foreach ($temp as $kc=>$vc) {
foreach ($vc as $kk => $vv) {
if (!in_array($kk, $keys)) {
unset($vc[$kk]);
}
}
$vc['parent_id'] = $id;
Db::table('resources')->insert($vc);
}
}
}
}
}
public function test(Request $request)
{
// 菜单迁移