admin workflow

main
panliang 2024-04-27 15:34:15 +08:00
parent 5159d0008d
commit 1d9d4b561e
1 changed files with 10 additions and 3 deletions

View File

@ -100,10 +100,17 @@ class WorkflowController extends AdminController
amisMake()->TextControl()->name('name')->label(__('workflow.name'))->required(),
amisMake()->TableControl()->name('config')->label(__('workflow.config'))->showIndex()->addable()->removable()->needConfirm(false)->draggable()->columns([
amisMake()->SelectControl()->options(CheckType::options())->name('type')->label(__('workflow.type')),
amisMake()->SelectControl()
amisMake()->PickerControl()
->source(admin_url('api/workflow/value-options?type=${type}'))
->multiple(false)
->draggable(false)
->pickerSchema(amisMake()->ListRenderer()->set('mode', 'list')->listItem(amisMake()->ListItem()->title('${label}')->body('${phone}')))
->name('value')
->label(__('workflow.value')),
->label(__('workflow.value'))
// amisMake()->SelectControl()
// ->source(admin_url('api/workflow/value-options?type=${type}'))
// ->name('value')
// ->label(__('workflow.value')),
]),
]);
}
@ -261,7 +268,7 @@ class WorkflowController extends AdminController
public function getEmployeeOptions()
{
if (! $this->employeeOptions) {
$this->employeeOptions = Employee::enable()->select(['id as value', 'name as label'])->get();
$this->employeeOptions = Employee::enable()->select(['id as value', 'name as label', 'phone'])->get();
}
return $this->employeeOptions;