mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-31 23:10:45 +00:00
调整字段展示
This commit is contained in:
parent
68851f311e
commit
94baa98534
@ -283,9 +283,26 @@ class SystemCrud extends AuthController
|
||||
}
|
||||
|
||||
if ($newColumn) {
|
||||
$info['field']['tableField'] = array_merge($info['field']['tableField'], $newColumn);
|
||||
$info['field']['tableField'] = array_merge($newColumn, $info['field']['tableField']);
|
||||
}
|
||||
$keyInfo = [];
|
||||
$deleteInfo = [];
|
||||
foreach ($info['field']['tableField'] as $key => $item) {
|
||||
if ($item['primaryKey']) {
|
||||
$keyInfo = $item;
|
||||
unset($info['field']['tableField'][$key]);
|
||||
}
|
||||
if ($item['field_type'] == 'addSoftDelete') {
|
||||
$deleteInfo = $info;
|
||||
unset($info['field']['tableField'][$key]);
|
||||
}
|
||||
}
|
||||
if ($keyInfo) {
|
||||
array_unshift($info['field']['tableField'][$key], $keyInfo);
|
||||
}
|
||||
if ($deleteInfo) {
|
||||
array_push($info['field']['tableField'][$key], $deleteInfo);
|
||||
}
|
||||
|
||||
return app('json')->success(['file' => $data, 'crudInfo' => $info]);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user