Initial commit: queue workspace

Made-with: Cursor
This commit is contained in:
apple
2026-03-21 02:55:24 +08:00
commit 78de918c37
12388 changed files with 1840126 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\controller\supplier\system\form;
use app\controller\supplier\AuthController;
use app\services\system\form\SystemFormServices;
use think\facade\App;
/**
*
* Class SystemForm
* @package app\controller\supplier\system\form
*/
class SystemForm extends AuthController
{
/**
* Diy constructor.
* @param App $app
* @param SystemFormServices $services
*/
public function __construct(App $app, SystemFormServices $services)
{
parent::__construct($app);
$this->services = $services;
}
/*
* 所有系统表单
*/
public function allSystemForm()
{
$data = $this->services->getFormList([], ['id', 'name']);
return $this->success($data['list'] ?? []);
}
/**
* 获取一条数据
* @param int $id
* @return mixed
*/
public function getInfo(int $id)
{
if (!$id) return $this->fail('数据不存在');
[$type] = $this->request->postMore([
['type', 0],
], true);
$info = $this->services->get($id);
if ($info) {
$info = $info->toArray();
} else {
return $this->fail('数据不存在');
}
$info['value'] = json_decode($info['value'], true);
if ($type == 1) {//处理表单数据
$value = $info['value'] ?? [];
$info = $this->services->handleForm($value);
}
return $this->success(compact('info'));
}
}