generated from liutk/owl-admin-base
admin agreement.images
parent
94b686f477
commit
3c5569ab09
|
|
@ -87,6 +87,7 @@ class AgreementController extends AdminController
|
|||
->searchable()
|
||||
->required(),
|
||||
amisMake()->ImageControl()->name('images')->label(__('agreement.images'))
|
||||
->receiver(admin_url('upload_image') . '?full-url=1')
|
||||
->multiple()
|
||||
->draggable()
|
||||
->joinValues(false),
|
||||
|
|
@ -104,7 +105,7 @@ class AgreementController extends AdminController
|
|||
['label' => __('agreement.employee_id'), 'content' => '${employee.name}'],
|
||||
['label' => __('agreement.created_at'), 'content' => '${created_at}'],
|
||||
['label' => __('agreement.remarks'), 'content' => '${remarks}', 'span' => 3],
|
||||
['label' => __('agreement.images'), 'content' => amisMake()->Images()->name('images')->src('${preview}')->enlargeAble(), 'span' => 3],
|
||||
['label' => __('agreement.images'), 'content' => amisMake()->Images()->name('images')->enlargeAble(), 'span' => 3],
|
||||
['label' => __('workflow_log.check_status'), 'content' => amisMake()->Mapping()->name('workflow.check_status')->map(CheckStatus::options())],
|
||||
['label' => __('workflow_log.checked_at'), 'content' => '${workflow.checked_at}'],
|
||||
['label' => __('workflow_log.remarks'), 'content' => '${workflow_log.check_remarks}'],
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class AdminUserController extends AdminController
|
|||
public function form(): Form
|
||||
{
|
||||
return $this->baseForm()->body([
|
||||
amis()->ImageControl('avatar', __('admin.admin_user.avatar'))->receiver($this->uploadImagePath()),
|
||||
amis()->ImageControl('avatar', __('admin.admin_user.avatar'))->receiver(admin_url('upload_image') . '?full-url=1'),
|
||||
amis()->TextControl('name', __('admin.admin_user.name'))->required(),
|
||||
amis()->TextControl('username', __('admin.username'))->required(),
|
||||
amis()->TextControl('password', __('admin.password'))->type('input-password')->required()->validations(['minLength' => 6])->hiddenOn('${id > 0}'),
|
||||
|
|
|
|||
|
|
@ -73,17 +73,9 @@ class AgreementService extends BaseService
|
|||
$images = [];
|
||||
foreach ($data['images'] as $value) {
|
||||
if (is_array($value)) {
|
||||
$image = data_get($value, 'value');
|
||||
$url = Str::startsWith($image, ['http://', 'https://']) ? $image : Storage::url($image);
|
||||
array_push($images, [
|
||||
'value' => $image,
|
||||
'preview' => $url,
|
||||
]);
|
||||
array_push($images, data_get($value, 'value'));
|
||||
} else {
|
||||
array_push($images, [
|
||||
'value' => $value,
|
||||
'preview' => $value,
|
||||
]);
|
||||
array_push($images, $value);
|
||||
}
|
||||
}
|
||||
$data['images'] = $images;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ class SettingSeeder extends Seeder
|
|||
$list = [
|
||||
['key' => 'upload_disk', 'values' => 'public'],
|
||||
['key' => 'sign', 'values' => json_encode(['distance' => '10'])],
|
||||
['key' => 'baidu', 'values' => json_encode(['js_key' => '62038330xDTLJ15QG6zt3f6VQcaNBfN8q3MsWBsE'])]
|
||||
];
|
||||
// 清空缓存
|
||||
foreach ($list as &$item) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue