Compare commits

..

6 Commits

873 changed files with 322525 additions and 12 deletions

View File

@ -0,0 +1,9 @@
<?php
namespace App\Admin\Controllers;
use Dcat\Admin\Http\Controllers\AuthController as BaseAuthController;
class AuthController extends BaseAuthController
{
}

View File

@ -0,0 +1,70 @@
<?php
namespace App\Admin\Controllers;
use App\Models\CostAdvice;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController;
class CostAdviceController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new CostAdvice(), function (Grid $grid) {
// $grid->column('id')->sortable();
$grid->column('nape_id');
$grid->column('nurse_lv');
$grid->column('money');
$grid->column('created_at')->sortable();
$grid->filter(function (Grid\Filter $filter) {
$filter->equal('nape_id')->select()->width(3);
$filter->equal('nurse_lv')->select()->width(3);
});
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new CostAdvice(), function (Show $show) {
$show->field('id');
$show->field('nape_id');
$show->field('nurse_lv');
$show->field('money');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new CostAdvice(), function (Form $form) {
$form->display('id');
$form->select('nape_id');
$form->select('nurse_lv');
$form->currency('money')->symbol('¥');
$form->display('created_at');
$form->display('updated_at');
});
}
}

View File

@ -0,0 +1,36 @@
<?php
namespace App\Admin\Controllers;
use App\Admin\Metrics\Examples;
use App\Http\Controllers\Controller;
use Dcat\Admin\Http\Controllers\Dashboard;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;
class HomeController extends Controller
{
public function index(Content $content)
{
return $content
->header('Dashboard')
->description('Description...')
->body(function (Row $row) {
$row->column(6, function (Column $column) {
$column->row(Dashboard::title());
$column->row(new Examples\Tickets());
});
$row->column(6, function (Column $column) {
$column->row(function (Row $row) {
$row->column(6, new Examples\NewUsers());
$row->column(6, new Examples\NewDevices());
});
$column->row(new Examples\Sessions());
$column->row(new Examples\ProductOrders());
});
});
}
}

View File

@ -0,0 +1,62 @@
<?php
namespace App\Admin\Controllers;
use App\Models\Oldman;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Http\Controllers\AdminController;
use App\Admin\Pages\LiveContinue;
use Illuminate\Http\Request;
class LiveContinueController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
// $builder = Oldman::where();
return Grid::make(new Oldman(), function (Grid $grid) {
$grid->column('name');
$grid->column('card_no');
$grid->column('client_name');
$grid->column('nurse_lv')->sortable();
$grid->column('live_in_at')->sortable();
$grid->column('avliable_at')->sortable();
// $grid->column('created_at')->sortable();
$grid->disableCreateButton();
$grid->tools("
<div class='pull-right' data-responsive-table-toolbar='grid-table'>
<a href='".admin_route('live_continue.create')."' class='btn btn-primary dialog-create btn-outline' target='_blank'>
<i class='feather icon-plus'></i><span class='d-none d-sm-inline'>&nbsp; 续住</span>
</a>
</div>");
$grid->filter(function (Grid\Filter $filter) {
$filter->equal('name')->width(3);
$filter->equal('card_no')->width(3);
$filter->equal('nurse_lv')->select()->width(3);
});
});
}
/**
* 续住
*/
public function create(Content $content){
return $content->header('客人续住')
->description('表单')
->body(new LiveContinue());
}
public function toStore(Request $request){
}
}

View File

@ -0,0 +1,94 @@
<?php
namespace App\Admin\Controllers;
use App\Models\Oldman;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Http\Controllers\AdminController;
use App\Admin\Pages\LiveIn;
use Illuminate\Http\Request;
class LiveInController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
// $builder = Oldman::where();
return Grid::make(new Oldman(), function (Grid $grid) {
$grid->column('name');
$grid->column('card_no');
$grid->column('client_name');
$grid->column('nurse_lv')->sortable();
$grid->column('live_in_at')->sortable();
$grid->column('avliable_at')->sortable();
// $grid->column('created_at')->sortable();
$grid->disableCreateButton();
$grid->tools("
<div class='pull-right' data-responsive-table-toolbar='grid-table'>
<a href='".admin_route('live_in.create')."' class='btn btn-primary dialog-create btn-outline' target='_blank'>
<i class='feather icon-plus'></i><span class='d-none d-sm-inline'>&nbsp; 入住</span>
</a>
</div>");
$grid->filter(function (Grid\Filter $filter) {
$filter->equal('name')->width(3);
$filter->equal('card_no')->width(3);
$filter->equal('nurse_lv')->select()->width(3);
});
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new Oldman(), function (Show $show) {
$show->field('id');
$show->field('floor_name');
$show->field('agreement_no');
$show->field('name');
$show->field('sex');
$show->field('birthday');
$show->field('card_no');
$show->field('card_province_id');
$show->field('card_city_id');
$show->field('card_area_id');
$show->field('card_address');
$show->field('client_name');
$show->field('client_province_id');
$show->field('client_city_id');
$show->field('client_area_id');
$show->field('client_address');
$show->field('client_phone');
$show->field('nurse_lv');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* 入住
*/
public function create(Content $content){
return $content->header('客人入住')
->description('表单')
->body(new LiveIn());
}
public function toStore(Request $request){
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Admin\Controllers;
use App\Models\Oldman;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Http\Controllers\AdminController;
use App\Admin\Pages\LiveOut;
use Illuminate\Http\Request;
class LiveOutController extends AdminController
{
/**
* 结算
*/
public function create(Content $content){
return $content->header('客人结算')
->description('表单')
->body(new LiveOut());
}
public function toStore(Request $request){
}
}

View File

@ -0,0 +1,133 @@
<?php
namespace App\Admin\Controllers;
use App\Models\Oldman;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController;
class OldmanController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new Oldman(), function (Grid $grid) {
$grid->column('id')->sortable();
$grid->column('floor_name');
$grid->column('agreement_no');
$grid->column('name');
$grid->column('card_no');
$grid->column('sex');
$grid->column('age');
$grid->column('client_name');
$grid->column('client_phone');
$grid->column('nurse_lv');
$grid->column('created_at')->sortable();
// $grid->column('updated_at')
$grid->filter(function (Grid\Filter $filter) {
$filter->equal('name')->width(3);
$filter->equal('card_no')->width(3);
$filter->equal('nurse_lv')->select()->width(3);
});
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new Oldman(), function (Show $show) {
$show->field('id');
$show->field('floor_name');
$show->field('agreement_no');
$show->field('name');
$show->field('sex');
$show->field('birthday');
$show->field('card_no');
$show->field('card_province_id');
$show->field('card_city_id');
$show->field('card_area_id');
$show->field('card_address');
$show->field('client_name');
$show->field('client_province_id');
$show->field('client_city_id');
$show->field('client_area_id');
$show->field('client_address');
$show->field('client_phone');
$show->field('nurse_lv');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new Oldman(), function (Form $form) {
$form->display('id');
$form->row(function (Form\Row $form) {
$form->divider('居住人');
});
$form->row(function (Form\Row $form) {
$form->width(6)->text('floor_name');
$form->width(6)->text('agreement_no');
});
$form->row(function (Form\Row $form) {
$form->width(6)->text('name')->required();
$form->width(3)->radio('sex')->options(['1'=>'男', '2'=>'女'])->required();
});
$form->row(function (Form\Row $form) {
$form->width(6)->text('card_no')->required();
$form->width(6)->date('birthday')->required();
});
$form->row(function (Form\Row $form) {
$form->width(3)->select('card_province_id')->required();
$form->width(3)->select('card_city_id')->required();
$form->width(3)->select('card_area_id')->required();
});
$form->row(function (Form\Row $form) {
$form->text('card_address')->required();
});
$form->row(function (Form\Row $form) {
$form->select('nurse_lv')->required();
});
$form->row(function (Form\Row $form) {
$form->divider('委托人');
});
$form->row(function (Form\Row $form) {
$form->width(6)->text('client_name')->required();
$form->width(6)->text('client_phone')->required();
});
$form->row(function (Form\Row $form) {
$form->width(3)->select('client_province_id')->required();
$form->width(3)->select('client_city_id')->required();
$form->width(3)->select('client_area_id')->required();
});
$form->row(function (Form\Row $form) {
$form->text('client_address')->required();
});
$form->display('created_at');
$form->display('updated_at');
});
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace App\Admin\Controllers;
use App\Models\Zone;
use Dcat\Admin\Http\Controllers\AdminController;
use Illuminate\Http\Request;
class ZoneController extends AdminController
{
public function list(Request $request)
{
$query = Zone::query()->filter($request->all());
if ($request->filled('q')) {
if ($request->filled('_type')) {
$query->where('parent_id', $request->input('q'));
} else {
$search = '%'.$request->input('q').'%';
$query->where('name', 'like', $search);
}
}
$query->select(['id', 'name as text']);
if ($request->filled('_paginate')) {
$list = $query->paginate();
} else {
$list = $query->get();
}
return $list;
}
}

View File

@ -0,0 +1,100 @@
<?php
namespace App\Admin\Metrics\Examples;
use Dcat\Admin\Admin;
use Dcat\Admin\Widgets\Metrics\Donut;
class NewDevices extends Donut
{
protected $labels = ['Desktop', 'Mobile'];
/**
* 初始化卡片内容
*/
protected function init()
{
parent::init();
$color = Admin::color();
$colors = [$color->primary(), $color->alpha('blue2', 0.5)];
$this->title('New Devices');
$this->subTitle('Last 30 days');
$this->chartLabels($this->labels);
// 设置图表颜色
$this->chartColors($colors);
}
/**
* 渲染模板
*
* @return string
*/
public function render()
{
$this->fill();
return parent::render();
}
/**
* 写入数据.
*
* @return void
*/
public function fill()
{
$this->withContent(44.9, 28.6);
// 图表数据
$this->withChart([44.9, 28.6]);
}
/**
* 设置图表数据.
*
* @param array $data
*
* @return $this
*/
public function withChart(array $data)
{
return $this->chart([
'series' => $data
]);
}
/**
* 设置卡片头部内容.
*
* @param mixed $desktop
* @param mixed $mobile
*
* @return $this
*/
protected function withContent($desktop, $mobile)
{
$blue = Admin::color()->alpha('blue2', 0.5);
$style = 'margin-bottom: 8px';
$labelWidth = 120;
return $this->content(
<<<HTML
<div class="d-flex pl-1 pr-1 pt-1" style="{$style}">
<div style="width: {$labelWidth}px">
<i class="fa fa-circle text-primary"></i> {$this->labels[0]}
</div>
<div>{$desktop}</div>
</div>
<div class="d-flex pl-1 pr-1" style="{$style}">
<div style="width: {$labelWidth}px">
<i class="fa fa-circle" style="color: $blue"></i> {$this->labels[1]}
</div>
<div>{$mobile}</div>
</div>
HTML
);
}
}

View File

@ -0,0 +1,108 @@
<?php
namespace App\Admin\Metrics\Examples;
use Dcat\Admin\Widgets\Metrics\Line;
use Illuminate\Http\Request;
class NewUsers extends Line
{
/**
* 初始化卡片内容
*
* @return void
*/
protected function init()
{
parent::init();
$this->title('New Users');
$this->dropdown([
'7' => 'Last 7 Days',
'28' => 'Last 28 Days',
'30' => 'Last Month',
'365' => 'Last Year',
]);
}
/**
* 处理请求
*
* @param Request $request
*
* @return mixed|void
*/
public function handle(Request $request)
{
$generator = function ($len, $min = 10, $max = 300) {
for ($i = 0; $i <= $len; $i++) {
yield mt_rand($min, $max);
}
};
switch ($request->get('option')) {
case '365':
// 卡片内容
$this->withContent(mt_rand(1000, 5000).'k');
// 图表数据
$this->withChart(collect($generator(30))->toArray());
break;
case '30':
// 卡片内容
$this->withContent(mt_rand(400, 1000).'k');
// 图表数据
$this->withChart(collect($generator(30))->toArray());
break;
case '28':
// 卡片内容
$this->withContent(mt_rand(400, 1000).'k');
// 图表数据
$this->withChart(collect($generator(28))->toArray());
break;
case '7':
default:
// 卡片内容
$this->withContent('89.2k');
// 图表数据
$this->withChart([28, 40, 36, 52, 38, 60, 55,]);
}
}
/**
* 设置图表数据.
*
* @param array $data
*
* @return $this
*/
public function withChart(array $data)
{
return $this->chart([
'series' => [
[
'name' => $this->title,
'data' => $data,
],
],
]);
}
/**
* 设置卡片内容.
*
* @param string $content
*
* @return $this
*/
public function withContent($content)
{
return $this->content(
<<<HTML
<div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
<h2 class="ml-1 font-lg-1">{$content}</h2>
<span class="mb-0 mr-1 text-80">{$this->title}</span>
</div>
HTML
);
}
}

View File

@ -0,0 +1,114 @@
<?php
namespace App\Admin\Metrics\Examples;
use Dcat\Admin\Widgets\Metrics\Round;
use Illuminate\Http\Request;
class ProductOrders extends Round
{
/**
* 初始化卡片内容
*/
protected function init()
{
parent::init();
$this->title('Product Orders');
$this->chartLabels(['Finished', 'Pending', 'Rejected']);
$this->dropdown([
'7' => 'Last 7 Days',
'28' => 'Last 28 Days',
'30' => 'Last Month',
'365' => 'Last Year',
]);
}
/**
* 处理请求
*
* @param Request $request
*
* @return mixed|void
*/
public function handle(Request $request)
{
switch ($request->get('option')) {
case '365':
case '30':
case '28':
case '7':
default:
// 卡片内容
$this->withContent(23043, 14658, 4758);
// 图表数据
$this->withChart([70, 52, 26]);
// 总数
$this->chartTotal('Total', 344);
}
}
/**
* 设置图表数据.
*
* @param array $data
*
* @return $this
*/
public function withChart(array $data)
{
return $this->chart([
'series' => $data,
]);
}
/**
* 卡片内容.
*
* @param int $finished
* @param int $pending
* @param int $rejected
*
* @return $this
*/
public function withContent($finished, $pending, $rejected)
{
return $this->content(
<<<HTML
<div class="col-12 d-flex flex-column flex-wrap text-center" style="max-width: 220px">
<div class="chart-info d-flex justify-content-between mb-1 mt-2" >
<div class="series-info d-flex align-items-center">
<i class="fa fa-circle-o text-bold-700 text-primary"></i>
<span class="text-bold-600 ml-50">Finished</span>
</div>
<div class="product-result">
<span>{$finished}</span>
</div>
</div>
<div class="chart-info d-flex justify-content-between mb-1">
<div class="series-info d-flex align-items-center">
<i class="fa fa-circle-o text-bold-700 text-warning"></i>
<span class="text-bold-600 ml-50">Pending</span>
</div>
<div class="product-result">
<span>{$pending}</span>
</div>
</div>
<div class="chart-info d-flex justify-content-between mb-1">
<div class="series-info d-flex align-items-center">
<i class="fa fa-circle-o text-bold-700 text-danger"></i>
<span class="text-bold-600 ml-50">Rejected</span>
</div>
<div class="product-result">
<span>{$rejected}</span>
</div>
</div>
</div>
HTML
);
}
}

View File

@ -0,0 +1,117 @@
<?php
namespace App\Admin\Metrics\Examples;
use Dcat\Admin\Admin;
use Dcat\Admin\Widgets\Metrics\Bar;
use Illuminate\Http\Request;
class Sessions extends Bar
{
/**
* 初始化卡片内容
*/
protected function init()
{
parent::init();
$color = Admin::color();
$dark35 = $color->dark35();
// 卡片内容宽度
$this->contentWidth(5, 7);
// 标题
$this->title('Avg Sessions');
// 设置下拉选项
$this->dropdown([
'7' => 'Last 7 Days',
'28' => 'Last 28 Days',
'30' => 'Last Month',
'365' => 'Last Year',
]);
// 设置图表颜色
$this->chartColors([
$dark35,
$dark35,
$color->primary(),
$dark35,
$dark35,
$dark35
]);
}
/**
* 处理请求
*
* @param Request $request
*
* @return mixed|void
*/
public function handle(Request $request)
{
switch ($request->get('option')) {
case '7':
default:
// 卡片内容
$this->withContent('2.7k', '+5.2%');
// 图表数据
$this->withChart([
[
'name' => 'Sessions',
'data' => [75, 125, 225, 175, 125, 75, 25],
],
]);
}
}
/**
* 设置图表数据.
*
* @param array $data
*
* @return $this
*/
public function withChart(array $data)
{
return $this->chart([
'series' => $data,
]);
}
/**
* 设置卡片内容.
*
* @param string $title
* @param string $value
* @param string $style
*
* @return $this
*/
public function withContent($title, $value, $style = 'success')
{
// 根据选项显示
$label = strtolower(
$this->dropdown[request()->option] ?? 'last 7 days'
);
$minHeight = '183px';
return $this->content(
<<<HTML
<div class="d-flex p-1 flex-column justify-content-between" style="padding-top: 0;width: 100%;height: 100%;min-height: {$minHeight}">
<div class="text-left">
<h1 class="font-lg-2 mt-2 mb-0">{$title}</h1>
<h5 class="font-medium-2" style="margin-top: 10px;">
<span class="text-{$style}">{$value} </span>
<span>vs {$label}</span>
</h5>
</div>
<a href="#" class="btn btn-primary shadow waves-effect waves-light">View Details <i class="feather icon-chevrons-right"></i></a>
</div>
HTML
);
}
}

View File

@ -0,0 +1,116 @@
<?php
namespace App\Admin\Metrics\Examples;
use Dcat\Admin\Widgets\Metrics\RadialBar;
use Illuminate\Http\Request;
class Tickets extends RadialBar
{
/**
* 初始化卡片内容
*/
protected function init()
{
parent::init();
$this->title('Tickets');
$this->height(400);
$this->chartHeight(300);
$this->chartLabels('Completed Tickets');
$this->dropdown([
'7' => 'Last 7 Days',
'28' => 'Last 28 Days',
'30' => 'Last Month',
'365' => 'Last Year',
]);
}
/**
* 处理请求
*
* @param Request $request
*
* @return mixed|void
*/
public function handle(Request $request)
{
switch ($request->get('option')) {
case '365':
case '30':
case '28':
case '7':
default:
// 卡片内容
$this->withContent(162);
// 卡片底部
$this->withFooter(29, 63, '1d');
// 图表数据
$this->withChart(83);
}
}
/**
* 设置图表数据.
*
* @param int $data
*
* @return $this
*/
public function withChart(int $data)
{
return $this->chart([
'series' => [$data],
]);
}
/**
* 卡片内容
*
* @param string $content
*
* @return $this
*/
public function withContent($content)
{
return $this->content(
<<<HTML
<div class="d-flex flex-column flex-wrap text-center">
<h1 class="font-lg-2 mt-2 mb-0">{$content}</h1>
<small>Tickets</small>
</div>
HTML
);
}
/**
* 卡片底部内容.
*
* @param string $new
* @param string $open
* @param string $response
*
* @return $this
*/
public function withFooter($new, $open, $response)
{
return $this->footer(
<<<HTML
<div class="d-flex justify-content-between p-1" style="padding-top: 0!important;">
<div class="text-center">
<p>New Tickets</p>
<span class="font-lg-1">{$new}</span>
</div>
<div class="text-center">
<p>Open Tickets</p>
<span class="font-lg-1">{$open}</span>
</div>
<div class="text-center">
<p>Response Time</p>
<span class="font-lg-1">{$response}</span>
</div>
</div>
HTML
);
}
}

View File

@ -0,0 +1,129 @@
<?php
namespace App\Admin\Metrics\Examples;
use Dcat\Admin\Widgets\Metrics\Card;
use Illuminate\Contracts\Support\Renderable;
use Illuminate\Http\Request;
class TotalUsers extends Card
{
/**
* 卡片底部内容.
*
* @var string|Renderable|\Closure
*/
protected $footer;
/**
* 初始化卡片.
*/
protected function init()
{
parent::init();
$this->title('Total Users');
$this->dropdown([
'7' => 'Last 7 Days',
'28' => 'Last 28 Days',
'30' => 'Last Month',
'365' => 'Last Year',
]);
}
/**
* 处理请求.
*
* @param Request $request
*
* @return void
*/
public function handle(Request $request)
{
switch ($request->get('option')) {
case '365':
$this->content(mt_rand(600, 1500));
$this->down(mt_rand(1, 30));
break;
case '30':
$this->content(mt_rand(170, 250));
$this->up(mt_rand(12, 50));
break;
case '28':
$this->content(mt_rand(155, 200));
$this->up(mt_rand(5, 50));
break;
case '7':
default:
$this->content(143);
$this->up(15);
}
}
/**
* @param int $percent
*
* @return $this
*/
public function up($percent)
{
return $this->footer(
"<i class=\"feather icon-trending-up text-success\"></i> {$percent}% Increase"
);
}
/**
* @param int $percent
*
* @return $this
*/
public function down($percent)
{
return $this->footer(
"<i class=\"feather icon-trending-down text-danger\"></i> {$percent}% Decrease"
);
}
/**
* 设置卡片底部内容.
*
* @param string|Renderable|\Closure $footer
*
* @return $this
*/
public function footer($footer)
{
$this->footer = $footer;
return $this;
}
/**
* 渲染卡片内容.
*
* @return string
*/
public function renderContent()
{
$content = parent::renderContent();
return <<<HTML
<div class="d-flex justify-content-between align-items-center mt-1" style="margin-bottom: 2px">
<h2 class="ml-1 font-lg-1">{$content}</h2>
</div>
<div class="ml-1 mt-1 font-weight-bold text-80">
{$this->renderFooter()}
</div>
HTML;
}
/**
* 渲染卡片底部内容.
*
* @return string
*/
public function renderFooter()
{
return $this->toString($this->footer);
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace App\Admin\Pages;
use Illuminate\Contracts\Support\Renderable;
class LiveContinue implements Renderable
{
public function render()
{
// dd(123456);
return admin_view('admin.do.live-continue', ['goods'=>'{}']);
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace App\Admin\Pages;
use Illuminate\Contracts\Support\Renderable;
class LiveIn implements Renderable
{
public function render()
{
// dd(123456);
return admin_view('admin.do.live-in', ['goods'=>'{}']);
}
}

View File

@ -0,0 +1,14 @@
<?php
namespace App\Admin\Pages;
use Illuminate\Contracts\Support\Renderable;
class LiveOut implements Renderable
{
public function render()
{
// dd(123456);
return admin_view('admin.do.live-out', ['goods'=>'{}']);
}
}

View File

@ -0,0 +1,75 @@
<?php
use App\Models\Admin\Menu;
use Dcat\Admin\Admin;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\Column;
use Dcat\Admin\Layout\Navbar;
use Dcat\Admin\Show;
use Dcat\Admin\Support\Helper;
/**
* Dcat-admin - admin builder based on Laravel.
* @author jqh <https://github.com/jqhph>
*
* Bootstraper for Admin.
*
* Here you can remove builtin form field:
*
* extend custom field:
* Dcat\Admin\Form::extend('php', PHPEditor::class);
* Dcat\Admin\Grid\Column::extend('php', PHPEditor::class);
* Dcat\Admin\Grid\Filter::extend('php', PHPEditor::class);
*
* Or require js and css assets:
* Admin::css('/packages/prettydocs/css/styles.css');
* Admin::js('/packages/prettydocs/js/main.js');
*
*/
Grid::resolving(function (Grid $grid) {
$grid->disableRowSelector();
// debug-todo
// $grid->disableCreateButton();
// $grid->disableViewButton();
// $grid->disableEditButton();
$grid->disableDeleteButton();
$grid->enableDialogCreate();
$grid->setDialogFormDimensions('50%', '70%');
$grid->filter(function (Grid\Filter $filter) {
$filter->panel();
$filter->expand();
});
});
Show::resolving(function (Show $show) {
$show->panel()->tools(function ($tools) {
$tools->disableEdit();
// $tools->disableList();
$tools->disableDelete();
});
});
Form::resolving(function (Form $form) {
$form->disableViewButton();
$form->disableViewCheck();
$form->disableResetButton();
});
Admin::style(
<<<'CSS'
.main-footer {
display: none;
}
.layui-layer-nobg{
max-width: 800px;
max-height: 1100px;
}
CSS
);

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;
Admin::routes();
Route::group([
'prefix' => config('admin.route.prefix'),
'namespace' => config('admin.route.namespace'),
'middleware' => config('admin.route.middleware'),
], function (Router $router) {
$router->get('/', 'HomeController@index');
$router->resource('oldmen', 'OldmanController')->names('oldmen');
$router->resource('cost-advices', 'CostAdviceController')->names('cost_advices');
$router->get('live-ins', 'LiveInController@index')->name('live_in.index');
$router->get('live-in-do', 'LiveInController@create')->name('live_in.create');
$router->post('live-in-do', 'LiveInController@toStore')->name('live_in.store');
$router->get('live-continues', 'LiveContinueController@index')->name('live_continue.index');
$router->get('live-continue-do', 'LiveContinueController@create')->name('live_continue.create');
$router->post('live-continue-do', 'LiveContinueController@toStore')->name('live_continue.store');
$router->get('live-out-do', 'LiveOutController@create')->name('live_out.create');
$router->post('live-out-do', 'LiveOutController@toStore')->name('live_out.store');
$router->group([
'prefix' => 'api',
], function (Router $router) {
$router->get('zones', 'ZoneController@list')->name('api.zones');
});
});

View File

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CostAdvice extends Model
{
use HasFactory;
protected $table = 'cost_advices';
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
class Oldman extends Model
{
use HasFactory;
use HasDateTimeFormatter;
}

View File

@ -0,0 +1,49 @@
<?php
namespace App\Models;
use Dcat\Admin\Traits\ModelTree;
use EloquentFilter\Filterable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Cache;
class Zone extends Model
{
use Filterable, ModelTree;
protected $fillable = ['name', 'parent_id', 'type', 'index'];
protected $titleColumn = 'name';
protected $orderColumn = 'id';
protected $parentColumn = 'parent_id';
public static function selectOptions(\Closure $closure = null, $cache = true)
{
if (!$cache) {
Cache::forget('admin_zone_select_options');
}
if (Cache::has('admin_zone_select_options')) {
return Cache::get('admin_zone_select_options');
}
$options = (new static())->withQuery($closure)->buildSelectOptions();
$data = collect($options)->all();
Cache::put('admin_zone_select_options', $data);
return $data;
}
public function parent()
{
return $this->belongsTo(self::class, 'parent_id');
}
public function children()
{
return $this->hasMany(self::class, 'parent_id');
}
}

View File

@ -3,6 +3,8 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
use Illuminate\Http\Resources\Json\JsonResource;
class AppServiceProvider extends ServiceProvider
{
@ -24,5 +26,7 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
//
Schema::defaultStringLength(191);
JsonResource::withoutWrapping();
}
}

View File

@ -9,7 +9,9 @@
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7"
"laravel/tinker": "^2.7",
"overtrue/laravel-lang": "^6.0",
"peidikeji/dcat-admin": "^1.2"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
@ -61,5 +63,11 @@
}
},
"minimum-stability": "stable",
"prefer-stable": true
"prefer-stable": true,
"repositories": {
"peidikeji/dcat-admin": {
"type": "git",
"url": "https://gitea.hmily.club/pdkj/dcat-admin.git"
}
}
}

629
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fe33f98a750b8c5a51b30c78bd3fab21",
"content-hash": "96fceb38d5bcac126f8bac5cb6b9a003",
"packages": [
{
"name": "brick/math",
@ -111,6 +111,263 @@
],
"time": "2022-10-27T11:44:00+00:00"
},
{
"name": "doctrine/cache",
"version": "2.2.0",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/doctrine/cache/2.2.0/doctrine-cache-2.2.0.zip",
"reference": "1ca8f21980e770095a31456042471a57bc4c68fb",
"shasum": ""
},
"require": {
"php": "~7.1 || ^8.0"
},
"conflict": {
"doctrine/common": ">2.2,<2.4"
},
"require-dev": {
"cache/integration-tests": "dev-master",
"doctrine/coding-standard": "^9",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"psr/cache": "^1.0 || ^2.0 || ^3.0",
"symfony/cache": "^4.4 || ^5.4 || ^6",
"symfony/var-exporter": "^4.4 || ^5.4 || ^6"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.",
"homepage": "https://www.doctrine-project.org/projects/cache.html",
"keywords": [
"abstraction",
"apcu",
"cache",
"caching",
"couchdb",
"memcached",
"php",
"redis",
"xcache"
],
"time": "2022-05-20T20:07:39+00:00"
},
{
"name": "doctrine/dbal",
"version": "3.6.0",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/doctrine/dbal/3.6.0/doctrine-dbal-3.6.0.zip",
"reference": "85b98cb23c8af471a67abfe14485da696bcabc2e",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2",
"doctrine/cache": "^1.11|^2.0",
"doctrine/deprecations": "^0.5.3|^1",
"doctrine/event-manager": "^1|^2",
"php": "^7.4 || ^8.0",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
},
"require-dev": {
"doctrine/coding-standard": "11.1.0",
"fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2022.3",
"phpstan/phpstan": "1.9.14",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "9.6.3",
"psalm/plugin-phpunit": "0.18.4",
"squizlabs/php_codesniffer": "3.7.1",
"symfony/cache": "^5.4|^6.0",
"symfony/console": "^4.4|^5.4|^6.0",
"vimeo/psalm": "4.30.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
},
"bin": [
"bin/doctrine-dbal"
],
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\DBAL\\": "src"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
}
],
"description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.",
"homepage": "https://www.doctrine-project.org/projects/dbal.html",
"keywords": [
"abstraction",
"database",
"db2",
"dbal",
"mariadb",
"mssql",
"mysql",
"oci8",
"oracle",
"pdo",
"pgsql",
"postgresql",
"queryobject",
"sasql",
"sql",
"sqlite",
"sqlserver",
"sqlsrv"
],
"time": "2023-02-07T22:52:03+00:00"
},
{
"name": "doctrine/deprecations",
"version": "v1.0.0",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/doctrine/deprecations/v1.0.0/doctrine-deprecations-v1.0.0.zip",
"reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de",
"shasum": ""
},
"require": {
"php": "^7.1|^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"phpunit/phpunit": "^7.5|^8.5|^9.5",
"psr/log": "^1|^2|^3"
},
"suggest": {
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations"
}
},
"license": [
"MIT"
],
"description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.",
"homepage": "https://www.doctrine-project.org/",
"time": "2022-05-02T15:47:09+00:00"
},
{
"name": "doctrine/event-manager",
"version": "2.0.0",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/doctrine/event-manager/2.0.0/doctrine-event-manager-2.0.0.zip",
"reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32",
"shasum": ""
},
"require": {
"php": "^8.1"
},
"conflict": {
"doctrine/common": "<2.9"
},
"require-dev": {
"doctrine/coding-standard": "^10",
"phpstan/phpstan": "^1.8.8",
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.28"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Common\\": "src"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
},
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
}
],
"description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.",
"homepage": "https://www.doctrine-project.org/projects/event-manager.html",
"keywords": [
"event",
"event dispatcher",
"event manager",
"event system",
"events"
],
"time": "2022-10-12T20:59:15+00:00"
},
{
"name": "doctrine/inflector",
"version": "2.0.6",
@ -739,6 +996,68 @@
],
"time": "2021-10-07T12:57:01+00:00"
},
{
"name": "laravel-lang/lang",
"version": "10.9.5",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/laravel-lang/lang/10.9.5/laravel-lang-lang-10.9.5.zip",
"reference": "e341421d40f2cd28feca24ab2cb84fa5cb5ddaf6",
"shasum": ""
},
"require": {
"ext-json": "*"
},
"conflict": {
"laravel-lang/publisher": "<12.0 >=14.0"
},
"require-dev": {
"dragon-code/pretty-array": "^4.0",
"dragon-code/simple-dto": "^2.3",
"dragon-code/support": "^6.1",
"ext-zip": "*",
"guzzlehttp/guzzle": "^7.3",
"laravel-lang/publisher": "^13.0",
"laravel/breeze": "^1.2",
"laravel/fortify": "^1.7",
"laravel/jetstream": "^2.3",
"laravel/ui": "^3.4",
"orchestra/testbench": "^7.0",
"php": "^8.1",
"phpunit/phpunit": "^9.5",
"symfony/finder": "^6.0",
"symfony/var-dumper": "^6.0",
"vlucas/phpdotenv": "^5.4.1"
},
"suggest": {
"arcanedev/laravel-lang": "Translations manager and checker for Laravel 5",
"laravel-lang/publisher": "Easy installation and update of translation files for your project",
"overtrue/laravel-lang": "Command to add languages in your project"
},
"type": "library",
"autoload": {
"psr-4": {
"LaravelLang\\Lang\\": "src"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Laravel-Lang Team",
"homepage": "https://github.com/Laravel-Lang"
}
],
"description": "Languages for Laravel",
"keywords": [
"lang",
"languages",
"laravel",
"lpm"
],
"time": "2022-06-27T01:57:27+00:00"
},
{
"name": "laravel/framework",
"version": "v9.52.4",
@ -1720,6 +2039,121 @@
],
"time": "2023-02-08T01:06:31+00:00"
},
{
"name": "overtrue/laravel-lang",
"version": "6.0.3",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/overtrue/laravel-lang/6.0.3/overtrue-laravel-lang-6.0.3.zip",
"reference": "9bdbc7cf422b2e93f8db1125f8f2b97f6e6eadad",
"shasum": ""
},
"require": {
"ext-json": "*",
"laravel-lang/lang": "^10.4",
"symfony/process": "^6.0"
},
"require-dev": {
"laravel/framework": "^9.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Overtrue\\LaravelLang\\TranslationServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Overtrue\\LaravelLang\\": "src/"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "overtrue",
"email": "anzhengchao@gmail.com"
}
],
"description": "List of 75 languages for Laravel.",
"keywords": [
"i18n",
"languages",
"laravel",
"locale",
"overtrue"
],
"time": "2022-06-18T12:46:29+00:00"
},
{
"name": "peidikeji/dcat-admin",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://gitea.hmily.club/pdkj/dcat-admin.git",
"reference": "a32043e86a73fe5502160e03d96e8b4a3902073c"
},
"require": {
"doctrine/dbal": "^2.6|^3.0",
"laravel/framework": "~5.5|~6.0|~7.0|~8.0|~9.0",
"php": ">=7.1.0",
"spatie/eloquent-sortable": "3.*|4.*",
"tucker-eric/eloquentfilter": "^3.1"
},
"require-dev": {
"fzaninotto/faker": "^1.4",
"laravel/dusk": "~5.9|~6",
"mockery/mockery": "^1.0",
"phpstan/phpstan": "^0.12.0",
"phpunit/phpunit": "^7.5|~9"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Dcat\\Admin\\AdminServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Dcat\\Admin\\": "src/"
},
"files": [
"src/Support/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Dcat\\Admin\\Tests\\": "tests/"
}
},
"scripts": {
"phpstan": [
"vendor/bin/phpstan analyse"
],
"test": [
"vendor/bin/phpunit"
]
},
"license": [
"MIT"
],
"description": "dcat admin",
"homepage": "https://github.com/jqhph/dcat-admin",
"keywords": [
"admin",
"dcat",
"form",
"grid",
"laravel",
"laravel admin"
],
"time": "2022-09-16T09:15:02+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.1",
@ -1775,6 +2209,46 @@
],
"time": "2023-02-25T19:38:58+00:00"
},
{
"name": "psr/cache",
"version": "3.0.0",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/psr/cache/3.0.0/psr-cache-3.0.0.zip",
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Cache\\": "src/"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for caching libraries",
"keywords": [
"cache",
"psr",
"psr-6"
],
"time": "2021-02-03T23:26:27+00:00"
},
{
"name": "psr/container",
"version": "2.0.2",
@ -2315,6 +2789,104 @@
],
"time": "2023-01-12T18:13:24+00:00"
},
{
"name": "spatie/eloquent-sortable",
"version": "4.0.2",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/spatie/eloquent-sortable/4.0.2/spatie-eloquent-sortable-4.0.2.zip",
"reference": "74994d10a17d15d2cdb319d6b2ad7cb6fa067c0a",
"shasum": ""
},
"require": {
"illuminate/database": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0",
"nesbot/carbon": "^2.63",
"php": "^8.1",
"spatie/laravel-package-tools": "^1.9"
},
"require-dev": {
"orchestra/testbench": "^7.0|^8.0",
"phpunit/phpunit": "^9.5"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\EloquentSortable\\EloquentSortableServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Spatie\\EloquentSortable\\": "src/"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be"
}
],
"description": "Sortable behaviour for eloquent models",
"homepage": "https://github.com/spatie/eloquent-sortable",
"keywords": [
"behaviour",
"eloquent",
"laravel",
"model",
"sort",
"sortable"
],
"time": "2023-01-23T08:34:14+00:00"
},
{
"name": "spatie/laravel-package-tools",
"version": "1.14.1",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/spatie/laravel-package-tools/1.14.1/spatie-laravel-package-tools-1.14.1.zip",
"reference": "b477dd2f89d0751f0e51ffb3a70181f0bc7ab8df",
"shasum": ""
},
"require": {
"illuminate/contracts": "^9.28|^10.0",
"php": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.5",
"orchestra/testbench": "^7.7|^8.0",
"pestphp/pest": "^1.22",
"phpunit/phpunit": "^9.5.24",
"spatie/pest-plugin-test-time": "^1.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\LaravelPackageTools\\": "src"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"role": "Developer"
}
],
"description": "Tools for creating Laravel packages",
"homepage": "https://github.com/spatie/laravel-package-tools",
"keywords": [
"laravel-package-tools",
"spatie"
],
"time": "2023-01-27T15:33:45+00:00"
},
{
"name": "symfony/console",
"version": "v6.2.5",
@ -3932,6 +4504,61 @@
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
"time": "2023-01-03T09:29:04+00:00"
},
{
"name": "tucker-eric/eloquentfilter",
"version": "3.2.0",
"dist": {
"type": "zip",
"url": "https://mirrors.cloud.tencent.com/repository/composer/tucker-eric/eloquentfilter/3.2.0/tucker-eric-eloquentfilter-3.2.0.zip",
"reference": "faaad783b7f23af7ba7e23baaa56d71af51504a9",
"shasum": ""
},
"require": {
"illuminate/config": "~6.0|~7.0|~8.0|~9.0|~10.0",
"illuminate/console": "~6.0|~7.0|~8.0|~9.0|~10.0",
"illuminate/database": "~6.0|~7.0|~8.0|~9.0|~10.0",
"illuminate/filesystem": "~6.0|~7.0|~8.0|~9.0|~10.0",
"illuminate/pagination": "~6.0|~7.0|~8.0|~9.0|~10.0",
"illuminate/support": "~6.0|~7.0|~8.0|~9.0|~10.0",
"php": ">=7.2"
},
"require-dev": {
"mockery/mockery": "^1.3",
"phpunit/phpunit": "^8"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"EloquentFilter\\ServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"EloquentFilter\\": "src/"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Eric Tucker",
"email": "tucker.ericm@gmail.com"
}
],
"description": "An Eloquent way to filter Eloquent Models",
"keywords": [
"eloquent",
"filter",
"laravel",
"model",
"query",
"search"
],
"time": "2023-02-07T18:34:53+00:00"
},
{
"name": "vlucas/phpdotenv",
"version": "v5.5.0",

368
config/admin.php 100644
View File

@ -0,0 +1,368 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| dcat-admin name
|--------------------------------------------------------------------------
|
| This value is the name of dcat-admin, This setting is displayed on the
| login page.
|
*/
'name' => '老年公寓收费系统',
/*
|--------------------------------------------------------------------------
| dcat-admin logo
|--------------------------------------------------------------------------
|
| The logo of all admin pages. You can also set it as an image by using a
| `img` tag, eg '<img src="http://logo-url" alt="Admin logo">'.
|
*/
'logo' => '老年公寓收费系统',
/*
|--------------------------------------------------------------------------
| dcat-admin mini logo
|--------------------------------------------------------------------------
|
| The logo of all admin pages when the sidebar menu is collapsed. You can
| also set it as an image by using a `img` tag, eg
| '<img src="http://logo-url" alt="Admin logo">'.
|
*/
'logo-mini' => '<img src="/vendor/dcat-admin/images/logo.png">',
/*
|--------------------------------------------------------------------------
| dcat-admin favicon
|--------------------------------------------------------------------------
|
*/
'favicon' => null,
/*
|--------------------------------------------------------------------------
| User default avatar
|--------------------------------------------------------------------------
|
| Set a default avatar for newly created users.
|
*/
'default_avatar' => '@admin/images/default-avatar.jpg',
/*
|--------------------------------------------------------------------------
| dcat-admin route settings
|--------------------------------------------------------------------------
|
| The routing configuration of the admin page, including the path prefix,
| the controller namespace, and the default middleware. If you want to
| access through the root path, just set the prefix to empty string.
|
*/
'route' => [
'domain' => env('ADMIN_ROUTE_DOMAIN'),
'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
'namespace' => 'App\\Admin\\Controllers',
'middleware' => ['web', 'admin'],
'enable_session_middleware' => false,
],
/*
|--------------------------------------------------------------------------
| dcat-admin install directory
|--------------------------------------------------------------------------
|
| The installation directory of the controller and routing configuration
| files of the administration page. The default is `app/Admin`, which must
| be set before running `artisan admin::install` to take effect.
|
*/
'directory' => app_path('Admin'),
/*
|--------------------------------------------------------------------------
| dcat-admin html title
|--------------------------------------------------------------------------
|
| Html title for all pages.
|
*/
'title' => 'Admin',
/*
|--------------------------------------------------------------------------
| Assets hostname
|--------------------------------------------------------------------------
|
*/
'assets_server' => env('ADMIN_ASSETS_SERVER'),
/*
|--------------------------------------------------------------------------
| Access via `https`
|--------------------------------------------------------------------------
|
| If your page is going to be accessed via https, set it to `true`.
|
*/
'https' => env('ADMIN_HTTPS', false),
/*
|--------------------------------------------------------------------------
| dcat-admin auth setting
|--------------------------------------------------------------------------
|
| Authentication settings for all admin pages. Include an authentication
| guard and a user provider setting of authentication driver.
|
| You can specify a controller for `login` `logout` and other auth routes.
|
*/
'auth' => [
'enable' => true,
'controller' => App\Admin\Controllers\AuthController::class,
'guard' => 'admin',
'guards' => [
'admin' => [
'driver' => 'session',
'provider' => 'admin',
],
],
'providers' => [
'admin' => [
'driver' => 'eloquent',
'model' => Dcat\Admin\Models\Administrator::class,
],
],
// Add "remember me" to login form
'remember' => true,
// All method to path like: auth/users/*/edit
// or specific method to path like: get:auth/users.
'except' => [
'auth/login',
'auth/logout',
],
'enable_session_middleware' => false,
],
/*
|--------------------------------------------------------------------------
| The global Grid setting
|--------------------------------------------------------------------------
*/
'grid' => [
// The global Grid action display class.
'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class,
// The global Grid batch action display class.
'batch_action_class' => Dcat\Admin\Grid\Tools\BatchActions::class,
// The global Grid pagination display class.
'paginator_class' => Dcat\Admin\Grid\Tools\Paginator::class,
'actions' => [
'view' => Dcat\Admin\Grid\Actions\Show::class,
'edit' => Dcat\Admin\Grid\Actions\Edit::class,
'quick_edit' => Dcat\Admin\Grid\Actions\QuickEdit::class,
'delete' => Dcat\Admin\Grid\Actions\Delete::class,
'batch_delete' => Dcat\Admin\Grid\Tools\BatchDelete::class,
],
// The global Grid column selector setting.
'column_selector' => [
'store' => Dcat\Admin\Grid\ColumnSelector\SessionStore::class,
'store_params' => [
'driver' => 'file',
],
],
],
/*
|--------------------------------------------------------------------------
| dcat-admin helpers setting.
|--------------------------------------------------------------------------
*/
'helpers' => [
'enable' => true,
],
/*
|--------------------------------------------------------------------------
| dcat-admin permission setting
|--------------------------------------------------------------------------
|
| Permission settings for all admin pages.
|
*/
'permission' => [
// Whether enable permission.
'enable' => true,
// All method to path like: auth/users/*/edit
// or specific method to path like: get:auth/users.
'except' => [
'/',
'auth/login',
'auth/logout',
'auth/setting',
],
],
/*
|--------------------------------------------------------------------------
| dcat-admin menu setting
|--------------------------------------------------------------------------
|
*/
'menu' => [
'cache' => [
// enable cache or not
'enable' => false,
'store' => 'file',
],
// Whether enable menu bind to a permission.
'bind_permission' => true,
// Whether enable role bind to menu.
'role_bind_menu' => true,
// Whether enable permission bind to menu.
'permission_bind_menu' => true,
'default_icon' => '',
],
/*
|--------------------------------------------------------------------------
| dcat-admin upload setting
|--------------------------------------------------------------------------
|
| File system configuration for form upload files and images, including
| disk and upload path.
|
*/
'upload' => [
// Disk in `config/filesystem.php`.
'disk' => 'public',
// Image and file upload path under the disk above.
'directory' => [
'image' => 'images',
'file' => 'files',
],
],
/*
|--------------------------------------------------------------------------
| dcat-admin database settings
|--------------------------------------------------------------------------
|
| Here are database settings for dcat-admin builtin model & tables.
|
*/
'database' => [
// Database connection for following tables.
'connection' => '',
// User tables and model.
'users_table' => 'admin_users',
'users_model' => Dcat\Admin\Models\Administrator::class,
// Role table and model.
'roles_table' => 'admin_roles',
'roles_model' => Dcat\Admin\Models\Role::class,
// Permission table and model.
'permissions_table' => 'admin_permissions',
'permissions_model' => Dcat\Admin\Models\Permission::class,
// Menu table and model.
'menu_table' => 'admin_menu',
'menu_model' => Dcat\Admin\Models\Menu::class,
// Pivot table for table above.
'role_users_table' => 'admin_role_users',
'role_permissions_table' => 'admin_role_permissions',
'role_menu_table' => 'admin_role_menu',
'permission_menu_table' => 'admin_permission_menu',
'settings_table' => 'admin_settings',
'extensions_table' => 'admin_extensions',
'extension_histories_table' => 'admin_extension_histories',
],
/*
|--------------------------------------------------------------------------
| Application layout
|--------------------------------------------------------------------------
|
| This value is the layout of admin pages.
*/
'layout' => [
// default, blue, blue-light, green
'color' => 'default',
// sidebar-separate
'body_class' => [],
'horizontal_menu' => false,
'sidebar_collapsed' => false,
// light, primary, dark
'sidebar_style' => 'light',
'dark_mode_switch' => false,
// bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
'navbar_color' => '',
],
/*
|--------------------------------------------------------------------------
| The exception handler class
|--------------------------------------------------------------------------
|
*/
'exception_handler' => Dcat\Admin\Exception\Handler::class,
/*
|--------------------------------------------------------------------------
| Enable default breadcrumb
|--------------------------------------------------------------------------
|
| Whether enable default breadcrumb for every page content.
*/
'enable_default_breadcrumb' => true,
/*
|--------------------------------------------------------------------------
| Extension
|--------------------------------------------------------------------------
*/
'extension' => [
// When you use command `php artisan admin:ext-make` to generate extensions,
// the extension files will be generated in this directory.
'dir' => base_path('vendor/peidikeji/dcat-admin/packages'),
],
];

View File

@ -69,7 +69,7 @@ return [
|
*/
'timezone' => 'UTC',
'timezone' => env('TIMEZONE', 'Asia/Chongqing'),
/*
|--------------------------------------------------------------------------
@ -82,7 +82,7 @@ return [
|
*/
'locale' => 'en',
'locale' => 'zh_CN',
/*
|--------------------------------------------------------------------------
@ -108,7 +108,7 @@ return [
|
*/
'faker_locale' => 'en_US',
'faker_locale' => 'zh_CN',
/*
|--------------------------------------------------------------------------

View File

@ -0,0 +1,110 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAdminTables extends Migration
{
public function getConnection()
{
return $this->config('database.connection') ?: config('database.default');
}
public function config($key)
{
return config('admin.'.$key);
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create($this->config('database.users_table'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('username', 120)->unique();
$table->string('password', 80);
$table->string('name');
$table->string('avatar')->nullable();
$table->string('remember_token', 100)->nullable();
$table->timestamps();
});
Schema::create($this->config('database.roles_table'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 50);
$table->string('slug', 50)->unique();
$table->timestamps();
});
Schema::create($this->config('database.permissions_table'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 50);
$table->string('slug', 50)->unique();
$table->string('http_method')->nullable();
$table->text('http_path')->nullable();
$table->integer('order')->default(0);
$table->bigInteger('parent_id')->default(0);
$table->timestamps();
});
Schema::create($this->config('database.menu_table'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('parent_id')->default(0);
$table->integer('order')->default(0);
$table->string('title', 50);
$table->string('icon', 50)->nullable();
$table->string('uri', 50)->nullable();
$table->timestamps();
});
Schema::create($this->config('database.role_users_table'), function (Blueprint $table) {
$table->bigInteger('role_id');
$table->bigInteger('user_id');
$table->unique(['role_id', 'user_id']);
$table->timestamps();
});
Schema::create($this->config('database.role_permissions_table'), function (Blueprint $table) {
$table->bigInteger('role_id');
$table->bigInteger('permission_id');
$table->unique(['role_id', 'permission_id']);
$table->timestamps();
});
Schema::create($this->config('database.role_menu_table'), function (Blueprint $table) {
$table->bigInteger('role_id');
$table->bigInteger('menu_id');
$table->unique(['role_id', 'menu_id']);
$table->timestamps();
});
Schema::create($this->config('database.permission_menu_table'), function (Blueprint $table) {
$table->bigInteger('permission_id');
$table->bigInteger('menu_id');
$table->unique(['permission_id', 'menu_id']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists($this->config('database.users_table'));
Schema::dropIfExists($this->config('database.roles_table'));
Schema::dropIfExists($this->config('database.permissions_table'));
Schema::dropIfExists($this->config('database.menu_table'));
Schema::dropIfExists($this->config('database.role_users_table'));
Schema::dropIfExists($this->config('database.role_permissions_table'));
Schema::dropIfExists($this->config('database.role_menu_table'));
Schema::dropIfExists($this->config('database.permission_menu_table'));
}
}

View File

@ -0,0 +1,61 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAdminExtensionsTable extends Migration
{
public function getConnection()
{
return $this->config('database.connection') ?: config('database.default');
}
public function config($key)
{
return config('admin.'.$key);
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create($this->config('database.extensions_table') ?: 'admin_extensions', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->string('name', 100)->unique();
$table->string('version', 20)->default('');
$table->tinyInteger('is_enabled')->default(0);
$table->text('options')->nullable();
$table->timestamps();
$table->engine = 'InnoDB';
});
Schema::create($this->config('database.extension_histories_table') ?: 'admin_extension_histories', function (Blueprint $table) {
$table->bigIncrements('id')->unsigned();
$table->string('name', 100);
$table->tinyInteger('type')->default(1);
$table->string('version', 20)->default(0);
$table->text('detail')->nullable();
$table->index('name');
$table->timestamps();
$table->engine = 'InnoDB';
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists($this->config('database.extensions_table') ?: 'admin_extensions');
Schema::dropIfExists($this->config('database.extension_histories_table') ?: 'admin_extension_histories');
}
}

View File

@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateAdminMenuTable extends Migration
{
public function getConnection()
{
return $this->config('database.connection') ?: config('database.default');
}
public function config($key)
{
return config('admin.'.$key);
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table($this->config('database.menu_table'), function (Blueprint $table) {
$table->tinyInteger('show')->default(1)->after('uri');
$table->string('extension', 50)->default('')->after('uri');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table($this->config('database.menu_table'), function (Blueprint $table) {
$table->dropColumn('show');
$table->dropColumn('extension');
});
}
}

View File

@ -0,0 +1,56 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('oldmen', function (Blueprint $table) {
$table->id();
$table->string('floor_name', 50)->default('')->comment('楼栋');
$table->string('agreement_no', 100)->default('')->comment('协议号码');
$table->string('name', 50)->default('')->comment('姓名');
$table->unsignedTinyInteger('sex')->default(0)->comment('性别1男2女');
$table->dateTime('birthday')->nullable()->comment('出生日期');
$table->string('card_no', 50)->unique();
$table->unsignedBigInteger('card_province_id')->default(0)->comment('户籍-省');
$table->unsignedBigInteger('card_city_id')->default(0)->comment('户籍-市');
$table->unsignedBigInteger('card_area_id')->default(0)->comment('户籍-区');
$table->string('card_address', 100)->default('')->comment('户籍-街道详细地址');
$table->string('client_name', 50)->default('')->comment('委托人名称');
$table->unsignedBigInteger('client_province_id')->default(0)->comment('委托人-省');
$table->unsignedBigInteger('client_city_id')->default(0)->comment('委托人-市');
$table->unsignedBigInteger('client_area_id')->default(0)->comment('委托人-区');
$table->string('client_address', 100)->default('')->comment('委托人-街道详细地址');
$table->string('client_phone', 20)->default('')->comment('委托人-手机号');
$table->unsignedBigInteger('nurse_lv')->default(0)->comment('护理级别');
$table->unsignedTinyInteger('live_in')->default(0)->comment('入住状态0未住1在住');
$table->unsignedBigInteger('need_pay')->default(0)->comment('缴费状态0未欠费1待续费');
$table->timestamp('live_in_at')->nullable()->comment('入住时间');
$table->timestamp('avliable_at')->nullable()->comment('截至时间');
$table->json('bonds')->nullable()->comment('保证金');
$table->timestamps();
$table->comment('客人信息');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('oldmen');
}
};

View File

@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cost_advices', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('nape_p_id')->default(0)->comment('费用父项');
$table->unsignedBigInteger('nape_id')->default(0)->comment('费用项');
$table->unsignedBigInteger('nurse_lv')->default(0)->comment('护理等级');
$table->decimal('money', 10, 2)->default(0)->comment('金额');
$table->timestamps();
$table->comment('费用配置');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cost_advices');
}
};

View File

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$zoneFile = database_path('sql/zone.sql');
DB::unprepared(file_get_contents($zoneFile));
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('zones');
}
};

View File

@ -0,0 +1,96 @@
<?php
namespace Database\Seeders;
use Dcat\Admin\Models\Menu;
use Dcat\Admin\Models\Permission;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Throwable;
class AdminMenuSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
$menus = [
['title' => '主页', 'icon' => 'feather icon-bar-chart-2', 'uri' => '/'],
['title' => '客人信息', 'icon' => 'feather icon-users', 'uri' => '/oldmen'],
['title' => '入住管理', 'icon' => 'feather icon-feather', 'uri' => '',
'children' =>[
['title' => '入住列表', 'icon' => '', 'uri' => '/live-ins', 'permission' => ''],
['title' => '续费列表', 'icon' => '', 'uri' => '/live-continues', 'permission' => ''],
]],
['title' => '快捷操作', 'icon' => 'feather icon-fast-forward', 'uri' => '/', 'children' =>[
['title' => '入住', 'icon' => '', 'uri' => '/live-in-do', 'permission' => ''],
['title' => '续费', 'icon' => '', 'uri' => '/live-continue-do', 'permission' => ''],
['title' => '结算', 'icon' => '', 'uri' => '/live-out-do', 'permission' => ''],
]],
['title' => '费用配置', 'icon' => 'feather icon-stop-circle', 'uri' => '/cost-advices'],
['title' => '系统管理', 'icon' => 'feather icon-settings', 'uri' => '',
'permission' => ['administrators', 'roles', 'keywords', 'settings'],
'children' => [
['title' => '用户管理', 'icon' => '', 'uri' => '/auth/users', 'permission' => 'administrators'],
['title' => '角色管理', 'icon' => '', 'uri' => '/auth/roles', 'permission' => 'roles'],
['title' => '字典管理', 'icon' => '', 'uri' => '/keywords', 'permission' => 'keywords'],
// ['title' => '配置管理', 'icon' => '', 'uri' => '/settings', 'permission' => 'settings'],
], ],
];
DB::table('admin_menu')->truncate();
DB::table('admin_permission_menu')->truncate();
try {
DB::begintransaction();
$this->createMenus($menus);
DB::commit();
} catch (Throwable $th) {
DB::rollBack();
report($th);
}
}
public function createMenus(array $menus, $pid = 0)
{
$prefix = 'dcat.admin.';
foreach ($menus as $menu) {
$mm = Menu::create([
'title' => $menu['title'],
'icon' => $menu['icon'],
'uri' => $menu['uri'],
'parent_id' => $pid,
]);
if (isset($menu['permission'])) {
if (! is_array($menu['permission'])) {
$permissions = [$menu['permission']];
} else {
$permissions = $menu['permission'];
}
foreach ($permissions as $item) {
if (Str::contains($item, '.')) {
$permission = Permission::where('slug', $prefix.$item)->first();
} else {
$permission = Permission::where('slug', $prefix.$item.'.index')->first();
}
if ($permission) {
DB::table('admin_permission_menu')->insert([
'permission_id' => $permission->id,
'menu_id' => $mm->id,
'created_at' => now(),
'updated_at' => now(),
]);
}
}
}
if (isset($menu['children'])) {
$this->createMenus($menu['children'], $mm->id);
}
}
}
}

View File

@ -0,0 +1,75 @@
<?php
namespace Database\Seeders;
use Dcat\Admin\Models\Permission;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class AdminPermissionSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$permissions = [
'base' => ['name' => '系统管理', 'curd' => false, 'children' => [
'administrators' => ['name' => '用户管理', 'curd' => ['index', 'create', 'edit', 'destroy']],
'roles' => ['name' => '角色管理', 'curd' => ['index', 'create', 'edit', 'destroy']],
'keywords' => ['name' => '字典管理', 'curd' => ['index', 'create', 'edit', 'destroy']],
// 'settings' => ['name' => '配置管理', 'curd' => ['index', 'create', 'edit', 'destroy']],
]],
];
DB::table('admin_permissions')->truncate();
$this->createPermissionData($permissions);
}
/**
* 插入权限
*
* @param array $permissions
* @param string $key
* @param int $pId
*/
public function createPermissionData(array $permissions, string $key = '', int $pId = 0)
{
$curdArr = [
'index' => '列表',
'create' => '新增',
'edit' => '修改',
'destroy' => '删除',
'show' => '详情',
];
foreach ($permissions as $slug => $permission) {
//是否已存在该权限
$slugKey = 'dcat.admin.'.($key ? $key.'.'.$slug : $slug);
$pper = Permission::updateOrCreate(['slug' => $slugKey], ['name' => is_string($permission) ? $permission : $permission['name'], 'parent_id' => $pId]);
if (! is_string($permission)) {
if (! isset($permission['children'])) {
$permission['children'] = [];
}
//判断是否默认插入curd权限
if (isset($permission['curd']) && $permission['curd']) {
if (is_array($permission['curd'])) {
$permission['curd'] = array_reverse($permission['curd']);
foreach ($permission['curd'] as $value) {
$permission['children'] = array_merge([$value => $curdArr[$value]], $permission['children']);
}
} else {
$permission['children'] = array_merge($curdArr, $permission['children']);
}
}
if (count($permission['children']) > 0) {
$_key = $permission['curd'] !== false ? ($key ? $key.'.'.$slug : $slug) : $key;
$this->createPermissionData($permission['children'], $_key ?? $slug, $pper->id);
}
}
}
}
}

View File

@ -0,0 +1,32 @@
<?php
namespace Database\Seeders;
use Dcat\Admin\Models\AdminTablesSeeder;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class AdminSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
DB::table('admin_menu')->truncate();
DB::table('admin_permissions')->truncate();
DB::table('admin_permission_menu')->truncate();
DB::table('admin_roles')->truncate();
DB::table('admin_role_menu')->truncate();
DB::table('admin_role_permissions')->truncate();
DB::table('admin_role_users')->truncate();
DB::table('admin_users')->truncate();
$this->call([
AdminTablesSeeder::class,
AdminPermissionSeeder::class,
AdminMenuSeeder::class,
]);
}
}

View File

@ -14,11 +14,9 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
// \App\Models\User::factory(10)->create();
// \App\Models\User::factory()->create([
// 'name' => 'Test User',
// 'email' => 'test@example.com',
// ]);
$this->call([
AdminSeeder::class,
KeywordsTableSeeder::class,
]);
}
}

View File

@ -0,0 +1,73 @@
<?php
namespace Database\Seeders;
use Dcat\Admin\Admin;
use Illuminate\Database\Seeder;
use Illuminate\Support\Arr;
use Peidikeji\Keywords\Models\Keywords;
class KeywordsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Keywords::truncate();
$list = [
['key' => 'cost_nope', 'name' => '费用项', 'value' => '', 'list' => [
['key' => 'live_fee', 'name' => '入住费用项', 'type_key' => 'cost_nope', 'value' => '', 'list'=>[
['key' => 'live_base_fee', 'name' => '养老费', 'type_key' => 'live_fee', 'value' => ''],
['key' => 'physical', 'name' => '体检', 'type_key' => 'live_fee', 'value' => ''],
['key' => 'heating', 'name' => '暖气费', 'type_key' => 'live_fee', 'value' => ''],
['key' => 'bedding', 'name' => '床上用品', 'type_key' => 'live_fee', 'value' => ''],
]],
['key' => 'continue_fee', 'name' => '续住费用项', 'type_key' => 'cost_nope', 'value' => '', 'list'=>[
['key' => 'continue_base_fee', 'name' => '养老费', 'type_key' => 'continue_fee', 'value' => ''],
['key' => 'water_fee', 'name' => '水电费', 'type_key' => 'continue_fee', 'value' => ''],
['key' => 'nurse_items', 'name' => '护理用品', 'type_key' => 'continue_fee', 'value' => ''],
['key' => 'check_up', 'name' => '血糖检查', 'type_key' => 'continue_fee', 'value' => ''],
['key' => 'use_car', 'name' => '出车', 'type_key' => 'continue_fee', 'value' => ''],
]],
['key' => 'bonds_fee', 'name' => '保证金', 'type_key' => 'cost_nope', 'value' => '', 'list'=>[
['key' => 'live_in', 'name' => '入住', 'type_key' => 'bonds_fee', 'value' => ''],
['key' => 'room_items', 'name' => '房间物品', 'type_key' => 'bonds_fee', 'value' => ''],
['key' => 'health', 'name' => '医疗', 'type_key' => 'bonds_fee', 'value' => ''],
]],
]],
['key' => 'nurse_lv', 'name' => '护理等级', 'value' => '', 'list' => [
['key' => 'nurse_lv_1', 'name' => '一级护理', 'type_key' => 'nurse_lv', 'value' => ''],
['key' => 'nurse_lv_2', 'name' => '二级护理', 'type_key' => 'nurse_lv', 'value' => ''],
['key' => 'nurse_lv_3', 'name' => '三级护理', 'type_key' => 'nurse_lv', 'value' => ''],
]],
];
if ($list) {
$this->createKeywords($list);
}
}
private function createKeywords($keywords, $parentType = null)
{
foreach ($keywords as $item) {
if ($parentType) {
$type = Keywords::create([
'name' => $item['name'],
'key' => $item['key'] ?? $parentType->key.($parentType + 1),
'type_key' => $parentType->key,
'level' => ($parentType->level ?? 1) + 1,
'parent_id' => $parentType->id,
]);
} else {
$type = Keywords::create(Arr::except($item, 'list'));
}
$list = data_get($item, 'list');
if ($list) {
$this->createKeywords($list, $type);
}
}
}
}

3256
database/sql/zone.sql 100644

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,317 @@
<?php
/**
* A helper file for Dcat Admin, to provide autocomplete information to your IDE
*
* This file should not be included in your code, only analyzed by your IDE!
*
* @author jqh <841324345@qq.com>
*/
namespace Dcat\Admin {
use Illuminate\Support\Collection;
/**
* @property Grid\Column|Collection id
* @property Grid\Column|Collection name
* @property Grid\Column|Collection version
* @property Grid\Column|Collection is_enabled
* @property Grid\Column|Collection created_at
* @property Grid\Column|Collection updated_at
* @property Grid\Column|Collection type
* @property Grid\Column|Collection detail
* @property Grid\Column|Collection parent_id
* @property Grid\Column|Collection order
* @property Grid\Column|Collection icon
* @property Grid\Column|Collection uri
* @property Grid\Column|Collection extension
* @property Grid\Column|Collection slug
* @property Grid\Column|Collection http_method
* @property Grid\Column|Collection http_path
* @property Grid\Column|Collection permission_id
* @property Grid\Column|Collection menu_id
* @property Grid\Column|Collection role_id
* @property Grid\Column|Collection user_id
* @property Grid\Column|Collection username
* @property Grid\Column|Collection password
* @property Grid\Column|Collection avatar
* @property Grid\Column|Collection remember_token
* @property Grid\Column|Collection nape_id
* @property Grid\Column|Collection nurse_lv
* @property Grid\Column|Collection money
* @property Grid\Column|Collection uuid
* @property Grid\Column|Collection connection
* @property Grid\Column|Collection queue
* @property Grid\Column|Collection payload
* @property Grid\Column|Collection exception
* @property Grid\Column|Collection failed_at
* @property Grid\Column|Collection key
* @property Grid\Column|Collection value
* @property Grid\Column|Collection type_key
* @property Grid\Column|Collection sort
* @property Grid\Column|Collection level
* @property Grid\Column|Collection floor_name
* @property Grid\Column|Collection agreement_no
* @property Grid\Column|Collection sex
* @property Grid\Column|Collection birthday
* @property Grid\Column|Collection card_no
* @property Grid\Column|Collection card_province_id
* @property Grid\Column|Collection card_city_id
* @property Grid\Column|Collection card_area_id
* @property Grid\Column|Collection card_address
* @property Grid\Column|Collection client_name
* @property Grid\Column|Collection client_province_id
* @property Grid\Column|Collection client_city_id
* @property Grid\Column|Collection client_area_id
* @property Grid\Column|Collection client_address
* @property Grid\Column|Collection client_phone
* @property Grid\Column|Collection live_in
* @property Grid\Column|Collection need_pay
* @property Grid\Column|Collection live_in_at
* @property Grid\Column|Collection avliable_at
* @property Grid\Column|Collection bonds
* @property Grid\Column|Collection email
* @property Grid\Column|Collection token
* @property Grid\Column|Collection tokenable_type
* @property Grid\Column|Collection tokenable_id
* @property Grid\Column|Collection abilities
* @property Grid\Column|Collection last_used_at
* @property Grid\Column|Collection expires_at
* @property Grid\Column|Collection email_verified_at
* @property Grid\Column|Collection index
*
* @method Grid\Column|Collection id(string $label = null)
* @method Grid\Column|Collection name(string $label = null)
* @method Grid\Column|Collection version(string $label = null)
* @method Grid\Column|Collection is_enabled(string $label = null)
* @method Grid\Column|Collection created_at(string $label = null)
* @method Grid\Column|Collection updated_at(string $label = null)
* @method Grid\Column|Collection type(string $label = null)
* @method Grid\Column|Collection detail(string $label = null)
* @method Grid\Column|Collection parent_id(string $label = null)
* @method Grid\Column|Collection order(string $label = null)
* @method Grid\Column|Collection icon(string $label = null)
* @method Grid\Column|Collection uri(string $label = null)
* @method Grid\Column|Collection extension(string $label = null)
* @method Grid\Column|Collection slug(string $label = null)
* @method Grid\Column|Collection http_method(string $label = null)
* @method Grid\Column|Collection http_path(string $label = null)
* @method Grid\Column|Collection permission_id(string $label = null)
* @method Grid\Column|Collection menu_id(string $label = null)
* @method Grid\Column|Collection role_id(string $label = null)
* @method Grid\Column|Collection user_id(string $label = null)
* @method Grid\Column|Collection username(string $label = null)
* @method Grid\Column|Collection password(string $label = null)
* @method Grid\Column|Collection avatar(string $label = null)
* @method Grid\Column|Collection remember_token(string $label = null)
* @method Grid\Column|Collection nape_id(string $label = null)
* @method Grid\Column|Collection nurse_lv(string $label = null)
* @method Grid\Column|Collection money(string $label = null)
* @method Grid\Column|Collection uuid(string $label = null)
* @method Grid\Column|Collection connection(string $label = null)
* @method Grid\Column|Collection queue(string $label = null)
* @method Grid\Column|Collection payload(string $label = null)
* @method Grid\Column|Collection exception(string $label = null)
* @method Grid\Column|Collection failed_at(string $label = null)
* @method Grid\Column|Collection key(string $label = null)
* @method Grid\Column|Collection value(string $label = null)
* @method Grid\Column|Collection type_key(string $label = null)
* @method Grid\Column|Collection sort(string $label = null)
* @method Grid\Column|Collection level(string $label = null)
* @method Grid\Column|Collection floor_name(string $label = null)
* @method Grid\Column|Collection agreement_no(string $label = null)
* @method Grid\Column|Collection sex(string $label = null)
* @method Grid\Column|Collection birthday(string $label = null)
* @method Grid\Column|Collection card_no(string $label = null)
* @method Grid\Column|Collection card_province_id(string $label = null)
* @method Grid\Column|Collection card_city_id(string $label = null)
* @method Grid\Column|Collection card_area_id(string $label = null)
* @method Grid\Column|Collection card_address(string $label = null)
* @method Grid\Column|Collection client_name(string $label = null)
* @method Grid\Column|Collection client_province_id(string $label = null)
* @method Grid\Column|Collection client_city_id(string $label = null)
* @method Grid\Column|Collection client_area_id(string $label = null)
* @method Grid\Column|Collection client_address(string $label = null)
* @method Grid\Column|Collection client_phone(string $label = null)
* @method Grid\Column|Collection live_in(string $label = null)
* @method Grid\Column|Collection need_pay(string $label = null)
* @method Grid\Column|Collection live_in_at(string $label = null)
* @method Grid\Column|Collection avliable_at(string $label = null)
* @method Grid\Column|Collection bonds(string $label = null)
* @method Grid\Column|Collection email(string $label = null)
* @method Grid\Column|Collection token(string $label = null)
* @method Grid\Column|Collection tokenable_type(string $label = null)
* @method Grid\Column|Collection tokenable_id(string $label = null)
* @method Grid\Column|Collection abilities(string $label = null)
* @method Grid\Column|Collection last_used_at(string $label = null)
* @method Grid\Column|Collection expires_at(string $label = null)
* @method Grid\Column|Collection email_verified_at(string $label = null)
* @method Grid\Column|Collection index(string $label = null)
*/
class Grid {}
class MiniGrid extends Grid {}
/**
* @property Show\Field|Collection id
* @property Show\Field|Collection name
* @property Show\Field|Collection version
* @property Show\Field|Collection is_enabled
* @property Show\Field|Collection created_at
* @property Show\Field|Collection updated_at
* @property Show\Field|Collection type
* @property Show\Field|Collection detail
* @property Show\Field|Collection parent_id
* @property Show\Field|Collection order
* @property Show\Field|Collection icon
* @property Show\Field|Collection uri
* @property Show\Field|Collection extension
* @property Show\Field|Collection slug
* @property Show\Field|Collection http_method
* @property Show\Field|Collection http_path
* @property Show\Field|Collection permission_id
* @property Show\Field|Collection menu_id
* @property Show\Field|Collection role_id
* @property Show\Field|Collection user_id
* @property Show\Field|Collection username
* @property Show\Field|Collection password
* @property Show\Field|Collection avatar
* @property Show\Field|Collection remember_token
* @property Show\Field|Collection nape_id
* @property Show\Field|Collection nurse_lv
* @property Show\Field|Collection money
* @property Show\Field|Collection uuid
* @property Show\Field|Collection connection
* @property Show\Field|Collection queue
* @property Show\Field|Collection payload
* @property Show\Field|Collection exception
* @property Show\Field|Collection failed_at
* @property Show\Field|Collection key
* @property Show\Field|Collection value
* @property Show\Field|Collection type_key
* @property Show\Field|Collection sort
* @property Show\Field|Collection level
* @property Show\Field|Collection floor_name
* @property Show\Field|Collection agreement_no
* @property Show\Field|Collection sex
* @property Show\Field|Collection birthday
* @property Show\Field|Collection card_no
* @property Show\Field|Collection card_province_id
* @property Show\Field|Collection card_city_id
* @property Show\Field|Collection card_area_id
* @property Show\Field|Collection card_address
* @property Show\Field|Collection client_name
* @property Show\Field|Collection client_province_id
* @property Show\Field|Collection client_city_id
* @property Show\Field|Collection client_area_id
* @property Show\Field|Collection client_address
* @property Show\Field|Collection client_phone
* @property Show\Field|Collection live_in
* @property Show\Field|Collection need_pay
* @property Show\Field|Collection live_in_at
* @property Show\Field|Collection avliable_at
* @property Show\Field|Collection bonds
* @property Show\Field|Collection email
* @property Show\Field|Collection token
* @property Show\Field|Collection tokenable_type
* @property Show\Field|Collection tokenable_id
* @property Show\Field|Collection abilities
* @property Show\Field|Collection last_used_at
* @property Show\Field|Collection expires_at
* @property Show\Field|Collection email_verified_at
* @property Show\Field|Collection index
*
* @method Show\Field|Collection id(string $label = null)
* @method Show\Field|Collection name(string $label = null)
* @method Show\Field|Collection version(string $label = null)
* @method Show\Field|Collection is_enabled(string $label = null)
* @method Show\Field|Collection created_at(string $label = null)
* @method Show\Field|Collection updated_at(string $label = null)
* @method Show\Field|Collection type(string $label = null)
* @method Show\Field|Collection detail(string $label = null)
* @method Show\Field|Collection parent_id(string $label = null)
* @method Show\Field|Collection order(string $label = null)
* @method Show\Field|Collection icon(string $label = null)
* @method Show\Field|Collection uri(string $label = null)
* @method Show\Field|Collection extension(string $label = null)
* @method Show\Field|Collection slug(string $label = null)
* @method Show\Field|Collection http_method(string $label = null)
* @method Show\Field|Collection http_path(string $label = null)
* @method Show\Field|Collection permission_id(string $label = null)
* @method Show\Field|Collection menu_id(string $label = null)
* @method Show\Field|Collection role_id(string $label = null)
* @method Show\Field|Collection user_id(string $label = null)
* @method Show\Field|Collection username(string $label = null)
* @method Show\Field|Collection password(string $label = null)
* @method Show\Field|Collection avatar(string $label = null)
* @method Show\Field|Collection remember_token(string $label = null)
* @method Show\Field|Collection nape_id(string $label = null)
* @method Show\Field|Collection nurse_lv(string $label = null)
* @method Show\Field|Collection money(string $label = null)
* @method Show\Field|Collection uuid(string $label = null)
* @method Show\Field|Collection connection(string $label = null)
* @method Show\Field|Collection queue(string $label = null)
* @method Show\Field|Collection payload(string $label = null)
* @method Show\Field|Collection exception(string $label = null)
* @method Show\Field|Collection failed_at(string $label = null)
* @method Show\Field|Collection key(string $label = null)
* @method Show\Field|Collection value(string $label = null)
* @method Show\Field|Collection type_key(string $label = null)
* @method Show\Field|Collection sort(string $label = null)
* @method Show\Field|Collection level(string $label = null)
* @method Show\Field|Collection floor_name(string $label = null)
* @method Show\Field|Collection agreement_no(string $label = null)
* @method Show\Field|Collection sex(string $label = null)
* @method Show\Field|Collection birthday(string $label = null)
* @method Show\Field|Collection card_no(string $label = null)
* @method Show\Field|Collection card_province_id(string $label = null)
* @method Show\Field|Collection card_city_id(string $label = null)
* @method Show\Field|Collection card_area_id(string $label = null)
* @method Show\Field|Collection card_address(string $label = null)
* @method Show\Field|Collection client_name(string $label = null)
* @method Show\Field|Collection client_province_id(string $label = null)
* @method Show\Field|Collection client_city_id(string $label = null)
* @method Show\Field|Collection client_area_id(string $label = null)
* @method Show\Field|Collection client_address(string $label = null)
* @method Show\Field|Collection client_phone(string $label = null)
* @method Show\Field|Collection live_in(string $label = null)
* @method Show\Field|Collection need_pay(string $label = null)
* @method Show\Field|Collection live_in_at(string $label = null)
* @method Show\Field|Collection avliable_at(string $label = null)
* @method Show\Field|Collection bonds(string $label = null)
* @method Show\Field|Collection email(string $label = null)
* @method Show\Field|Collection token(string $label = null)
* @method Show\Field|Collection tokenable_type(string $label = null)
* @method Show\Field|Collection tokenable_id(string $label = null)
* @method Show\Field|Collection abilities(string $label = null)
* @method Show\Field|Collection last_used_at(string $label = null)
* @method Show\Field|Collection expires_at(string $label = null)
* @method Show\Field|Collection email_verified_at(string $label = null)
* @method Show\Field|Collection index(string $label = null)
*/
class Show {}
/**
*/
class Form {}
}
namespace Dcat\Admin\Grid {
/**
*/
class Column {}
/**
*/
class Filter {}
}
namespace Dcat\Admin\Show {
/**
*/
class Field {}
}

228
lang/en/admin.php 100644
View File

@ -0,0 +1,228 @@
<?php
return [
'scaffold' => [
'header' => 'Scaffold',
'choose' => 'choose',
'table' => 'Table',
'model' => 'Model',
'controller' => 'Controller',
'repository' => 'Repository',
'add_field' => 'Add field',
'pk' => 'Primary key',
'soft_delete' => 'Soft delete',
'create_migration' => 'Create migration',
'create_model' => 'Create model',
'create_repository' => 'Create repository',
'create_controller' => 'Create controller',
'run_migrate' => 'Run migrate',
'create_lang' => 'Create lang',
'field' => 'field',
'translation' => 'translation',
'comment' => 'comment',
'default' => 'default',
'field_name' => 'field name',
'type' => 'type',
'nullable' => 'nullable',
'key' => 'key',
'translate_title' => 'Translate Title',
'sync_translation_with_comment' => 'Sync translation and comment',
],
'client' => [
'delete_confirm' => 'Are you sure to delete this item ?',
'confirm' => 'Confirm',
'cancel' => 'Cancel',
'refresh_succeeded' => 'Refresh succeeded !',
'close' => 'Close',
'selected_options' => ':num options selected',
'exceed_max_item' => 'Maximum items exceeded.',
'no_preview' => 'No preview available.',
'500' => 'Internal server error !',
'403' => 'Permission deny !',
'401' => 'Unauthorized !',
'419' => 'Page expired !',
],
'online' => 'Online',
'login' => 'Login',
'logout' => 'Logout',
'setting' => 'Setting',
'name' => 'Name',
'username' => 'Username',
'user' => 'User',
'alias' => 'Alias',
'routes' => 'Routes',
'route_action' => 'Route Action',
'middleware' => 'Middleware',
'method' => 'Method',
'old_password' => 'Old password',
'password' => 'Password',
'password_confirmation' => 'Password confirmation',
'old_password_error' => 'Incorrect password',
'remember_me' => 'Remember me',
'user_setting' => 'User setting',
'avatar' => 'Avatar',
'list' => 'List',
'new' => 'New',
'create' => 'Create',
'delete' => 'Delete',
'remove' => 'Remove',
'edit' => 'Edit',
'quick_edit' => 'Quick Edit',
'view' => 'View',
'continue_editing' => 'Continue editing',
'continue_creating' => 'Continue creating',
'detail' => 'Detail',
'browse' => 'Browse',
'reset' => 'Reset',
'export' => 'Export',
'batch_delete' => 'Batch delete',
'save' => 'Save',
'refresh' => 'Refresh',
'order' => 'Order',
'expand' => 'Expand',
'collapse' => 'Collapse',
'filter' => 'Filter',
'search' => 'Search',
'close' => 'Close',
'show' => 'Show',
'entries' => 'entries',
'captcha' => 'Captcha',
'action' => 'Action',
'title' => 'Title',
'description' => 'Description',
'back' => 'Back',
'back_to_list' => 'Back to List',
'submit' => 'Submit',
'menu' => 'Menu',
'input' => 'Input',
'succeeded' => 'Succeeded',
'failed' => 'Failed',
'delete_confirm' => 'Are you sure to delete this item ?',
'delete_succeeded' => 'Delete succeeded !',
'delete_failed' => 'Delete failed !',
'update_succeeded' => 'Update succeeded !',
'update_failed' => 'Update failed !',
'save_succeeded' => 'Save succeeded !',
'save_failed' => 'Save failed !',
'refresh_succeeded' => 'Refresh succeeded !',
'login_successful' => 'Login successful',
'choose' => 'Choose',
'choose_file' => 'Select file',
'choose_image' => 'Select image',
'more' => 'More',
'deny' => 'Permission denied',
'administrator' => 'Administrator',
'no_data' => 'No data.',
'roles' => 'Roles',
'permissions' => 'Permissions',
'slug' => 'Slug',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'alert' => 'Alert',
'parent_id' => 'Parent',
'icon' => 'Icon',
'uri' => 'URI',
'operation_log' => 'Operation log',
'parent_select_error' => 'Parent select error',
'tree' => 'Tree',
'table' => 'Table',
'default' => 'Default',
'import' => 'Import',
'is_not_import' => 'No',
'selected_options' => ':num options selected',
'pagination' => [
'range' => 'Showing :first to :last of :total entries',
],
'role' => 'Role',
'permission' => 'Permission',
'route' => 'Route',
'confirm' => 'Confirm',
'cancel' => 'Cancel',
'selectall' => 'Select all',
'http' => [
'method' => 'HTTP method',
'path' => 'HTTP path',
],
'all_methods_if_empty' => 'All methods if empty',
'all' => 'All',
'current_page' => 'Current page',
'selected_rows' => 'Selected rows',
'upload' => 'Upload',
'new_folder' => 'New folder',
'time' => 'Time',
'size' => 'Size',
'between_start' => 'Start',
'between_end' => 'End',
'next_page' => 'Next',
'prev_page' => 'Previous',
'next_step' => 'Next',
'prev_step' => 'Previous',
'done' => 'Done',
'listbox' => [
'text_total' => 'Showing all {0}',
'text_empty' => 'Empty list',
'filtered' => '{0} / {1}',
'filter_clear' => 'Show all',
'filter_placeholder' => 'Filter',
],
'responsive' => [
'display_all' => 'Display all',
'display' => 'Display',
'focus' => 'Focus',
],
'uploader' => [
'add_new_media' => 'Browse',
'drag_file' => 'Or drag file here',
'max_file_limit' => 'The :attribute may not be greater than :max.',
'exceed_size' => 'Exceeds the maximum file-size',
'interrupt' => 'Interrupt',
'upload_failed' => 'Upload failed! Please try again.',
'selected_files' => ':num files selectedsize: :size。',
'selected_has_failed' => 'Uploaded: :success, failed: :fail, <a class="retry" href="javascript:"";">retry </a>or<a class="ignore" href="javascript:"";"> ignore</a>',
'selected_success' => ':num(:size) files selected, Uploaded: :success.',
'dot' => ', ',
'failed_num' => 'failed::fail.',
'pause_upload' => 'Pause',
'go_on_upload' => 'Go On',
'start_upload' => 'Upload',
'upload_success_message' => ':success files uploaded successfully',
'go_on_add' => 'New File',
'Q_TYPE_DENIED' => 'Sorry, the type of this file is not allowed!',
'Q_EXCEED_NUM_LIMIT' => 'Sorry, maximum number of allowable file uploads has been exceeded!',
'F_EXCEED_SIZE' => 'Sorrythe maximum file-size has been exceeded!',
'Q_EXCEED_SIZE_LIMIT' => 'Sorry, the maximum file-size has been exceeded!',
'F_DUPLICATE' => 'Duplicate file.',
'confirm_delete_file' => 'Are you sure delete this file from server?',
'dimensions' => 'The image dimensions is invalid.',
],
'import_extension_confirm' => 'Are you sure import the extension?',
'quick_create' => 'Quick create',
'grid_items_selected' => '{n} items selected',
'nothing_updated' => 'Nothing has been updated.',
'welcome_back' => 'Welcome back, please login to your account.',
'documentation' => 'Documentation',
'demo' => 'Demo',
'extensions' => 'Extensions',
'version' => 'Version',
'current_version' => 'Current version',
'latest_version' => 'Latest version',
'upgrade_to_version' => 'Upgrade to version :version',
'enable' => 'Enable',
'disable' => 'Disable',
'uninstall' => 'Uninstall',
'confirm_uninstall' => 'Please confirm that you wish to uninstall this extension. This may result in potential data loss.',
'marketplace' => 'Marketplace',
'theme' => 'Theme',
'application' => 'Application',
'install_from_local' => 'Install From Local',
'install_succeeded' => 'Install succeeded !',
'invalid_extension_package' => 'Invalid extension package !',
'copied' => 'Copied',
'auth_failed' => 'These credentials do not match our records.',
'validation' => [
'match' => 'The :attribute and :other must match.',
'minlength' => 'The :attribute must be at least :min characters.',
'maxlength' => 'The :attribute may not be greater than :max characters.',
],
];

View File

@ -0,0 +1,229 @@
<?php
return [
'scaffold' => [
'header' => '代码生成器',
'choose' => '选择已有数据表',
'table' => '表名',
'model' => '模型',
'controller' => '控制器',
'repository' => '数据仓库',
'add_field' => '添加字段',
'pk' => '主键',
'soft_delete' => '软删除',
'create_migration' => '创建表迁移文件',
'create_model' => '创建模型',
'create_repository' => '创建数据仓库',
'create_controller' => '创建控制器',
'run_migrate' => '执行迁移文件',
'create_lang' => '创建翻译文件',
'field' => '字段',
'translation' => '翻译',
'comment' => '注释',
'default' => '默认值',
'field_name' => '字段名',
'type' => '类型',
'nullable' => '允许空值',
'key' => '索引',
'translate_title' => '翻译标题',
'sync_translation_with_comment' => '同步翻译与注释',
],
'client' => [
'delete_confirm' => '确认删除?',
'confirm' => '确认',
'cancel' => '取消',
'refresh_succeeded' => '刷新成功 !',
'submit' => '提交',
'close' => '关闭',
'selected_options' => '已选中:num个选项',
'exceed_max_item' => '已超出最大可选数量',
'no_preview' => '预览失败',
'500' => '系统繁忙,请稍后再试!',
'403' => '对不起,您没有权限访问,请与管理员联系。',
'401' => '请登录!',
'419' => '对不起,当前页面已失效,请刷新浏览器。',
],
'home' => '主页',
'online' => '在线',
'login' => '登录',
'logout' => '登出',
'setting' => '设置',
'name' => '名称',
'username' => '用户名',
'old_password' => '旧密码',
'password' => '密码',
'password_confirmation' => '确认密码',
'old_password_error' => '请输入正确的旧密码',
'remember_me' => '记住我',
'user_setting' => '用户设置',
'avatar' => '头像',
'list' => '列表',
'new' => '新增',
'create' => '创建',
'delete' => '删除',
'remove' => '移除',
'edit' => '编辑',
'quick_edit' => '快捷编辑',
'continue_editing' => '继续编辑',
'continue_creating' => '继续创建',
'view' => '查看',
'detail' => '详细',
'browse' => '浏览',
'reset' => '重置',
'export' => '导出',
'batch_delete' => '批量删除',
'save' => '保存',
'refresh' => '刷新',
'order' => '排序',
'expand' => '展开',
'collapse' => '收起',
'filter' => '筛选',
'search' => '搜索',
'close' => '关闭',
'show' => '显示',
'entries' => '条',
'captcha' => '验证码',
'action' => '操作',
'title' => '标题',
'description' => '简介',
'back' => '返回',
'back_to_list' => '返回列表',
'submit' => '提交',
'menu' => '菜单',
'input' => '输入',
'succeeded' => '成功',
'failed' => '失败',
'delete_confirm' => '确认删除?',
'delete_succeeded' => '删除成功 !',
'delete_failed' => '删除失败 !',
'update_succeeded' => '更新成功 !',
'update_failed' => '更新失败 !',
'save_succeeded' => '保存成功 !',
'save_failed' => '保存失败 !',
'refresh_succeeded' => '刷新成功 !',
'login_successful' => '登录成功 !',
'choose' => '选择',
'choose_file' => '选择文件',
'choose_image' => '选择图片',
'more' => '更多',
'deny' => '无权访问',
'administrator' => '管理员',
'roles' => '角色',
'permissions' => '权限',
'slug' => '标识',
'created_at' => '创建时间',
'updated_at' => '更新时间',
'alert' => '注意',
'parent_id' => '父级',
'icon' => '图标',
'uri' => '路径',
'operation_log' => '操作日志',
'parent_select_error' => '父级选择错误',
'default' => '默认',
'table' => '表格',
'no_data' => '暂无数据',
'routes' => '路由',
'alias' => '别名',
'route_action' => '处理器',
'middleware' => '中间件',
'import' => '导入',
'is_not_import' => '未导入',
'selected_options' => '已选中:num个选项',
'method' => '方法',
'user' => '用户',
'pagination' => [
'range' => '从 :first 到 :last ,总共 :total 条',
],
'role' => '角色',
'permission' => '权限',
'route' => '路由',
'confirm' => '确认',
'cancel' => '取消',
'selectall' => '全选',
'http' => [
'method' => 'HTTP方法',
'path' => 'HTTP路径',
],
'all_methods_if_empty' => '为空默认为所有方法',
'all' => '全部',
'current_page' => '当前页',
'selected_rows' => '选择的行',
'upload' => '上传',
'new_folder' => '新建文件夹',
'time' => '时间',
'size' => '大小',
'between_start' => '起始',
'between_end' => '结束',
'next_page' => '下一页',
'prev_page' => '上一页',
'next_step' => '下一步',
'prev_step' => '上一步',
'done' => '完成',
'listbox' => [
'text_total' => '总共 {0} 项',
'text_empty' => '空列表',
'filtered' => '{0} / {1}',
'filter_clear' => '显示全部',
'filter_placeholder' => '过滤',
],
'responsive' => [
'display_all' => '显示全部',
'display' => '字段',
'focus' => '聚焦',
],
'uploader' => [
'add_new_media' => '添加文件',
'drag_file' => '或将文件拖到这里',
'max_file_limit' => 'The :attribute may not be greater than :max.',
'exceed_size' => '文件大小超出',
'interrupt' => '上传暂停',
'upload_failed' => '上传失败,请重试',
'selected_files' => '选中:num个文件共:size。',
'selected_has_failed' => '已成功上传:success个文件:fail个文件上传失败<a class="retry" href="javascript:"";">重新上传</a>失败文件或<a class="ignore" href="javascript:"";">忽略</a>',
'selected_success' => '共:num个(:size),已上传:success个。',
'dot' => '',
'failed_num' => '失败:fail个。',
'pause_upload' => '暂停上传',
'go_on_upload' => '继续上传',
'start_upload' => '开始上传',
'upload_success_message' => '已成功上传:success个文件',
'go_on_add' => '继续添加',
'Q_TYPE_DENIED' => '对不起,不允许上传此类型文件',
'Q_EXCEED_NUM_LIMIT' => '对不起,已超出文件上传数量限制,最多只能上传:num个文件',
'F_EXCEED_SIZE' => '对不起,当前选择的文件过大',
'Q_EXCEED_SIZE_LIMIT' => '对不起,已超出文件大小限制',
'F_DUPLICATE' => '文件重复',
'confirm_delete_file' => '您确定要删除这个文件吗?',
'dimensions' => '图片规格不正确',
],
'import_extension_confirm' => '确认导入拓展?',
'quick_create' => '快速创建',
'grid_items_selected' => '已选择 {n} 项',
'nothing_updated' => '没有任何数据被更改',
'welcome_back' => '欢迎回来,请登录您的账号。',
'documentation' => '文档',
'demo' => '示例',
'extensions' => '扩展',
'version' => '版本',
'current_version' => '当前版本',
'latest_version' => '最新版本',
'upgrade_to_version' => '更新至版本 :version',
'enable' => '启用',
'disable' => '禁用',
'uninstall' => '卸载',
'confirm_uninstall' => '您确定要卸载当前扩展吗?此操作将会移除扩展数据!',
'marketplace' => '应用市场',
'theme' => '主题',
'application' => '应用',
'install_from_local' => '本地安装',
'install_succeeded' => '安装成功',
'invalid_extension_package' => '安装包异常',
'copied' => '已复制',
'auth_failed' => '账号或密码错误',
'validation' => [
'match' => '与 :attribute 不匹配。',
'minlength' => ':attribute 字符长度不能少于 :min。',
'maxlength' => ':attribute 字符长度不能超出 :max。',
],
];

View File

@ -0,0 +1,14 @@
<?php
return [
'labels' => [
'CostAdvice' => '费用配置',
'cost-advices' => '费用配置',
],
'fields' => [
'nape_id' => '费用项',
'nurse_lv' => '护理等级',
'money' => '金额',
],
'options' => [
],
];

View File

@ -0,0 +1,22 @@
<?php
return [
'labels' => [
'Extensions' => '扩展',
],
'fields' => [
'alias' => '别名',
'description' => '描述',
'authors' => '开发者',
'homepage' => '主页',
'require' => '依赖',
'require_dev' => '开发环境依赖',
'name' => '包名',
'version' => '版本',
'enable' => '启用',
'config' => '配置',
'imported' => '导入',
],
'options' => [
],
];

View File

@ -0,0 +1,37 @@
<?php
return [
'fields' => [
'id' => 'ID',
'name' => '名称',
'username' => '用户名',
'email' => '邮箱',
'http_path' => 'HTTP路径',
'password' => '密码',
'password_confirmation' => '确认密码',
'created_at' => '创建时间',
'updated_at' => '更新时间',
'permissions' => '权限',
'slug' => '标识',
'user' => '用户',
'order' => '排序',
'ip' => 'IP',
'method' => '方法',
'uri' => 'URI',
'roles' => '角色',
'path' => '路径',
'input' => '输入',
'type' => '类型',
],
'labels' => [
'list' => '列表',
'edit' => '编辑',
'detail' => '详细',
'create' => '创建',
'root' => '顶级',
'scaffold' => '代码生成器',
],
'options' => [
//
],
];

View File

@ -0,0 +1,17 @@
<?php
return [
'labels' => [
'LiveContinue' => '续住列表',
'live-continues' => '续住列表',
],
'fields' => [
'name' => '姓名',
'card_no' => '身份证号',
'client_name' => '委托人',
'nurse_lv' => '护理等级',
'live_in_at' => '入住时间',
'avliable_at' => '截至时间',
],
'options' => [
],
];

View File

@ -0,0 +1,17 @@
<?php
return [
'labels' => [
'LiveIn' => '入住列表',
'live-ins' => '入住列表',
],
'fields' => [
'name' => '姓名',
'card_no' => '身份证号',
'client_name' => '委托人',
'nurse_lv' => '护理等级',
'live_in_at' => '入住时间',
'avliable_at' => '截至时间',
],
'options' => [
],
];

View File

@ -0,0 +1,17 @@
<?php
return [
'titles' => [
'index' => '主页',
'admin' => '系统',
'users' => '管理员',
'roles' => '角色',
'permission' => '权限',
'menu' => '菜单',
'operation_log' => '操作日志',
'helpers' => '开发工具',
'extensions' => '扩展',
'scaffold' => '代码生成器',
'icons' => '图标',
],
];

View File

@ -0,0 +1,30 @@
<?php
return [
'labels' => [
'Oldman' => '客人信息',
'oldmen' => '客人信息',
],
'fields' => [
'floor_name' => '楼栋',
'agreement_no' => '协议号码',
'name' => '姓名',
'sex' => '性别',
'age' => '年龄',
'birthday' => '出生日期',
'card_no' => '身份证号码',
'card_province_id' => '户籍-省',
'card_city_id' => '户籍-市',
'card_area_id' => '户籍-区',
'card_address' => '户籍-街道详细地址',
'client_name' => '委托人',
'client_province_id' => '委托人-省',
'client_city_id' => '委托人-市',
'client_area_id' => '委托人-区',
'client_address' => '委托人-街道详细地址',
'client_phone' => '委托人-手机号',
'nurse_lv' => '护理级别',
'created_at' => '添加时间'
],
'options' => [
],
];

View File

@ -0,0 +1,229 @@
<?php
return [
'scaffold' => [
'header' => '代碼生成器',
'choose' => '選擇已有數據表',
'table' => '表名',
'model' => '模型',
'controller' => '控制器',
'repository' => '數據倉庫',
'add_field' => '添加欄位',
'pk' => '主鍵',
'soft_delete' => '軟刪除',
'create_migration' => '創建表遷移文件',
'create_model' => '創建模型',
'create_repository' => '創建數據倉庫',
'create_controller' => '創建控制器',
'run_migrate' => '執行遷移文件',
'create_lang' => '創建翻譯文件',
'field' => '欄位',
'translation' => '翻譯',
'comment' => '註解',
'default' => '預設值',
'field_name' => '欄位名',
'type' => '類型',
'nullable' => '允許null',
'key' => '索引',
'translate_title' => '翻譯標題',
'sync_translation_with_comment' => '同步翻譯與註釋',
],
'client' => [
'delete_confirm' => '確認刪除?',
'confirm' => '確認',
'cancel' => '取消',
'refresh_succeeded' => '刷新成功!',
'close' => '關閉',
'submit' => '提交',
'selected_options' => '已選中:num個選項',
'exceed_max_item' => '已超出最大可選數量',
'no_preview' => '預覽失敗',
'500' => '系統繁忙,請稍後再試!',
'403' => '對不起,您無訪問權限,請聯繫管理員。',
'401' => '請先登入!',
'419' => '對不起,當前頁面已失效,請刷新瀏覽器。',
],
'home' => '首頁',
'online' => '在線',
'login' => '登入',
'logout' => '登出',
'setting' => '設置',
'name' => '名稱',
'username' => '用戶名',
'old_password' => '舊密碼',
'password' => '密碼',
'password_confirmation' => '確認密碼',
'old_password_error' => '舊密碼輸入錯誤',
'remember_me' => '記住我',
'user_setting' => '用戶設置',
'avatar' => '頭像',
'list' => '列表',
'new' => '新增',
'create' => '創建',
'delete' => '刪除',
'remove' => '移除',
'edit' => '編輯',
'quick_edit' => '快速編輯',
'continue_editing' => '繼續編輯',
'continue_creating' => '繼續新增',
'view' => '查看',
'detail' => '詳細',
'browse' => '瀏覽',
'reset' => '重置',
'export' => '匯出',
'batch_delete' => '批次刪除',
'save' => '儲存',
'refresh' => '重新整理',
'order' => '排序',
'expand' => '展開',
'collapse' => '收起',
'filter' => '篩選',
'search' => '搜索',
'close' => '關閉',
'show' => '詳情',
'entries' => '條',
'captcha' => '驗證碼',
'action' => '操作',
'title' => '標題',
'description' => '簡介',
'back' => '返回',
'back_to_list' => '返回列表',
'submit' => '送出',
'menu' => '目錄',
'input' => '輸入',
'succeeded' => '成功',
'failed' => '失敗',
'delete_confirm' => '確認刪除?',
'delete_succeeded' => '刪除成功!',
'delete_failed' => '刪除失敗!',
'update_succeeded' => '更新成功!',
'update_failed' => '更新失敗 !',
'save_succeeded' => '儲存成功!',
'save_failed' => '儲存失敗 !',
'refresh_succeeded' => '刷新成功!',
'login_successful' => '登入成功!',
'choose' => '選擇',
'choose_file' => '選擇檔案',
'choose_image' => '選擇圖片',
'more' => '更多',
'deny' => '權限不足',
'administrator' => '管理員',
'roles' => '角色',
'permissions' => '權限',
'slug' => '標誌',
'created_at' => '建立時間',
'updated_at' => '更新時間',
'alert' => '警告',
'parent_id' => '父級',
'icon' => '圖示',
'uri' => '路徑',
'operation_log' => '操作記錄',
'parent_select_error' => '父級選擇錯誤',
'default' => '預設',
'table' => '表格',
'no_data' => '暫無數據',
'routes' => '路由',
'alias' => '別名',
'route_action' => '處理器',
'middleware' => '中間件',
'import' => '導入',
'is_not_import' => '未導入',
'selected_options' => '已選中:num個選項',
'method' => '方法',
'user' => '用戶',
'pagination' => [
'range' => '從 :first 到 :last ,總共 :total 條',
],
'role' => '角色',
'permission' => '權限',
'route' => '路由',
'confirm' => '確認',
'cancel' => '取消',
'selectall' => '全選',
'http' => [
'method' => 'HTTP方法',
'path' => 'HTTP路徑',
],
'all_methods_if_empty' => '所有方法預設為空',
'all' => '全部',
'current_page' => '現在頁面',
'selected_rows' => '選擇的行',
'upload' => '上傳',
'new_folder' => '新建資料夾',
'time' => '時間',
'size' => '大小',
'between_start' => '起始',
'between_end' => '結束',
'next_page' => '下一頁',
'prev_page' => '上一頁',
'next_step' => '下一步',
'prev_step' => '上一步',
'done' => '完成',
'listbox' => [
'text_total' => '總共 {0} 項',
'text_empty' => '空列表',
'filtered' => '{0} / {1}',
'filter_clear' => '顯示全部',
'filter_placeholder' => '過濾',
],
'responsive' => [
'display_all' => '顯示全部',
'display' => '欄位',
'focus' => '聚焦',
],
'uploader' => [
'add_new_media' => '添加檔案',
'drag_file' => '或將檔案拖移到這裡',
'max_file_limit' => ':attribute不能超過:max.',
'exceed_size' => '檔案大小過大',
'interrupt' => '暫停上傳',
'upload_failed' => '上傳失敗,請再試一次',
'selected_files' => '選中:num個檔案共:size。',
'selected_has_failed' => '已成功上傳:success個檔案:fail個檔案上傳失敗<a class="retry" href="javascript:"";">重新上傳</a>失敗檔案或<a class="ignore" href="javascript:"";">忽略</a>',
'selected_success' => '共:num个(:size),已上傳:success個。',
'dot' => '',
'failed_num' => '失敗:fail個。',
'pause_upload' => '暫停上傳',
'go_on_upload' => '繼續上傳',
'start_upload' => '開始上傳',
'upload_success_message' => '已成功上傳:success個檔案',
'go_on_add' => '繼續添加',
'Q_TYPE_DENIED' => '對不起,無法上傳該類型檔案',
'Q_EXCEED_NUM_LIMIT' => '对不起,超出上傳數量限制,最多只能上傳:num個檔案',
'F_EXCEED_SIZE' => '对不起,當前選擇的檔案過大',
'Q_EXCEED_SIZE_LIMIT' => '对不起,檔案大小超出限制',
'F_DUPLICATE' => '檔案重複',
'confirm_delete_file' => '您確定要刪除該檔案嗎?',
'dimensions' => '圖片規格不正確',
],
'import_extension_confirm' => '確認導入擴展?',
'quick_create' => '快速新增',
'grid_items_selected' => '已選擇 {n} 項',
'nothing_updated' => '沒有任何資料被更改',
'welcome_back' => '歡迎回來,請登入帳號',
'documentation' => '文檔',
'demo' => '範例',
'extensions' => '擴展',
'version' => '版本',
'current_version' => '当前版本',
'latest_version' => '當前版本',
'upgrade_to_version' => '更新至版本 :version',
'enable' => '啟用',
'disable' => '禁用',
'uninstall' => '卸載',
'confirm_uninstall' => '您確定要卸載當前擴展嗎?此操作將會移除擴展數據!',
'marketplace' => '應用市場',
'theme' => '主題',
'application' => '應用',
'install_from_local' => '本地安装',
'install_succeeded' => '本地安裝',
'invalid_extension_package' => '安裝包異常',
'copied' => '已複製',
'auth_failed' => '帳號或密碼錯誤',
'validation' => [
'match' => '與 :attribute 不匹配。',
'minlength' => ':attribute 長度不能少於 :min。',
'maxlength' => ':attribute 長度不能超過 :max。',
],
];

View File

@ -0,0 +1,22 @@
<?php
return [
'labels' => [
'Extensions' => '擴展',
],
'fields' => [
'alias' => '別名',
'description' => '說明',
'authors' => '作者',
'homepage' => '首頁',
'require' => '依賴',
'require_dev' => '開發環境依賴',
'name' => '名稱',
'version' => '版本',
'enable' => '啟用',
'config' => '設定',
'imported' => '導入',
],
'options' => [
],
];

View File

@ -0,0 +1,41 @@
<?php
return [
'fields' => [
'id' => 'ID',
'name' => '名稱',
'username' => '用戶名',
'email' => '信箱',
'http_path' => 'HTTP路徑',
'password' => '密碼',
'password_confirmation' => '確認密碼',
'created_at' => '建立時間',
'updated_at' => '更新時間',
'permissions' => '權限',
'slug' => '標示',
'user' => '用戶',
'order' => '排序',
'ip' => 'IP',
'method' => '方法',
'uri' => 'URI',
'roles' => '角色',
'path' => '路徑',
'input' => '輸入',
'type' => '类型',
],
'labels' => [
'list' => '列表',
'edit' => '編輯',
'detail' => '詳細',
'create' => '創建',
'root' => 'root',
'scaffold' => '代碼生成器',
],
'options' => [
'permissions' => [
],
],
];

View File

@ -0,0 +1,17 @@
<?php
return [
'titles' => [
'index' => '首頁',
'admin' => '系統',
'users' => '管理員',
'roles' => '角色',
'permission' => '權限',
'menu' => '菜單',
'operation_log' => '操作日誌',
'helpers' => '開發工具',
'extensions' => '擴展',
'scaffold' => '代碼生成器',
'icons' => '圖示',
],
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=7)}({7:function(e,t,n){e.exports=n(8)},8:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}!function(e){var t=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=$.extend({selector:null,event:"click",method:"POST",key:null,url:null,data:{},confirm:null,calledClass:null,before:function(e,t){},html:function(e,t,n){e.html(t)},success:function(e,t){},error:function(e,t){}},e),this.init()}var r,i,u;return r=t,(i=[{key:"init",value:function(){var t=this,n=t.options;$(n.selector).off(n.event).on(n.event,(function(o){var r=$(this).data(),i=$(this);if(!(i.attr("loading")>0)&&!1!==n.before(r,i,t)){var u=n.confirm;u?e.confirm(u[0],u[1],c):c()}function c(){i.attr("loading",1),Object.assign(r,n.data),t.promise(i,r).then(t.resolve()).catch(t.reject())}}))}},{key:"resolve",value:function(){var t=this.options;return function(n){var o=n[0],r=n[1];!1!==t.success(r,o)&&e.handleJsonResponse(o,{html:t.html,target:r})}}},{key:"reject",value:function(){var t=this.options;return function(o){var r=o[0],i=o[1];!1!==t.success(i,r)&&(r&&"object"===n(r.responseJSON)&&e.error(r.responseJSON.message),console.error(o))}}},{key:"promise",value:function(t,n){var o=this.options;return new Promise((function(r,i){Object.assign(n,{_action:o.calledClass,_key:o.key,_token:e.token}),e.NP.start(),$.ajax({method:o.method,url:o.url,data:n,success:function(n){t.attr("loading",0),e.NP.done(),r([n,t])},error:function(n){t.attr("loading",0),e.NP.done(),i([n,t])}})}))}}])&&o(r.prototype,i),u&&o(r,u),t}();e.Action=function(e){return new t(e)}}(Dcat)}});
//# sourceMappingURL=action.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.editormd-html-preview code,.editormd-preview-container code{font-size:13px!important;font-family:Inconsolata,Fira Mono,Consolas,Liberation Mono,Menlo,Courier,monospace!important;word-wrap:break-word!important}.markdown-body pre code{box-shadow:none}.com{color:#93939e!important}.tag,.typ{color:#da564a!important}.clo,.opn{color:#93a1a1!important}.atn,.lit{color:#007ee5!important}.atv{color:#fc8bb3!important}.dec,.var{color:teal!important}.fun{color:#dc322f!important}pre.prettyprint{padding:10px;border:1px solid #e1e1e8!important;-moz-tab-size:4!important;-o-tab-size:4!important;tab-size:4!important}pre.prettyprint.linenums{box-shadow:inset 40px 0 0 hsla(0,0%,93.3%,.35),inset 41px 0 0 hsla(0,0%,93.3%,.35)!important}pre.prettyprint.linenums ol.linenums{color:#1e347b!important;padding-left:30px!important;margin-top:0!important;margin-bottom:0}pre.prettyprint.linenums ol.linenums li{color:#bebec5!important;line-height:18px!important;padding-left:12px!important;background:#f7f7f9!important}pre.prettyprint.linenums ol.linenums li.L0,pre.prettyprint.linenums ol.linenums li.L1,pre.prettyprint.linenums ol.linenums li.L2,pre.prettyprint.linenums ol.linenums li.L3,pre.prettyprint.linenums ol.linenums li.L4,pre.prettyprint.linenums ol.linenums li.L5,pre.prettyprint.linenums ol.linenums li.L6,pre.prettyprint.linenums ol.linenums li.L7,pre.prettyprint.linenums ol.linenums li.L8,pre.prettyprint.linenums ol.linenums li.L9{list-style-type:decimal!important}pre.prettyprint{width:100%;border:0!important}.pln{color:#444!important}.kwd{color:#07a!important;font-weight:700}.pun{color:#999!important}.str{color:#2e7d32!important}pre.prettyprint{background-color:#f7f7f9!important;border:0 solid #333}.editormd-html-preview,.editormd-preview-container{padding:0}

View File

@ -0,0 +1,2 @@
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var l=t[i]={i:i,l:!1,exports:{}};return e[i].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(i,l,function(t){return e[t]}.bind(null,l));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=10)}({10:function(e,t,n){e.exports=n(11)},11:function(e,t){!function(e){function t(e){e=$.extend({dialog:null,container:null,input:null,button:".submit-btn",cancel:".cancel-btn",table:".async-table",multiple:!1,max:0,values:[],lang:{exceed_max_item:Dcat.lang.exceed_max_item||"已超出最大可选择的数量"}},e);this.options=e,this.$input=$(e.input),this.selected={},this.init()}t.prototype={init:function(){var e=this,t=e.options,n=t.values;for(var i in e.labels={},n)e.labels[n[i].id]=n[i].label;e.resetSelected(),$(document).on("dialog:shown",t.dialog,(function(){e.$dialog=$(t.dialog),e.$button=e.$dialog.find(t.button),e.$cancel=e.$dialog.find(t.cancel),e.$button.on("click",(function(){var t=e.getSelectedRows();e.setKeys(t[1]),e.render(t[0]),e.$dialog.trigger("dialog:close"),e.resetSelected()})),e.$cancel.on("click",(function(){e.$dialog.trigger("dialog:close")})),e.bind(),e.resetSelected()})),e.render(n)},bind:function(){var e=this,t=e.options;e.$dialog.find(t.table).on("table:loaded",(function(){var n=e.getCheckbox();t.multiple||$(this).find(".checkbox-grid-header").remove(),n.on("change",(function(){var i=$(this),l=i.data("id"),o=i.data("label");if(this.checked){if(t.multiple||(e.selected={}),e.selected[l]={id:l,label:o},t.max&&e.getSelectedRows()[0].length>t.max)return i.prop("checked",!1),delete e.selected[l],Dcat.warning(e.options.lang.exceed_max_item)}else delete e.selected[l];t.multiple||this.checked&&n.each((function(){var e=$(this);e.data("id")!=l&&(e.prop("checked",!1),e.parents("tr").css("background-color",""))}))})),n.each((function(){var t=$(this),n=t.data("id");for(var i in e.labels[n]=t.data("label"),e.selected)n!=i||t.prop("checked",!0).trigger("change");t.trigger("change")}))}))},resetSelected:function(){var e=this.getKeys();for(var t in this.selected={},e)this.selected[e[t]]={id:e[t],label:this.labels[e[t]]}},getCheckbox:function(){return this.$dialog.find('.checkbox-grid-column input[type="checkbox"]')},getSelectedRows:function(){var e=[],t=[];for(var n in this.selected)this.selected[n]&&(t.push(n),e.push(this.selected[n]));return[e,t]},render:function(e){var t=this.options,n=$(t.container),i=n.find(".default-text"),l=n.find(".option");return e&&e.length?(i.addClass("d-none"),l.removeClass("d-none"),t.multiple?function(e,t,n){var i=[],l=$(n.container),o=l.find(".default-text"),a=l.find(".option");l.hasClass("select2")||l.addClass("select2 select2-container select2-container--default select2-container--below");for(var c in l.removeClass("form-control"),e)i.push('<li class="select2-selection__choice" >\n '.concat(e[c].label,' <span data-id="').concat(e[c].id,'" class="select2-selection__choice__remove remove " role="presentation"> ×</span>\n</li>'));i.unshift('<span class="select2-selection__clear remove-all">×</span>'),i='<span class="select2-selection select2-selection--multiple">\n <ul class="select2-selection__rendered">'.concat(i.join(""),"</ul>\n </span>");var s=$(i);function r(){a.html(""),o.removeClass("d-none"),a.addClass("d-none"),l.addClass("form-control"),t.setKeys([])}a.html(s),s.find(".remove").on("click",(function(){var e=$(this);t.deleteKey(e.data("id")),e.parent().remove(),t.getKeys().length||r()})),s.find(".remove-all").on("click",r)}(e,this,t):function(e,t,n){var i=$(n.container),l=i.find(".default-text"),o=i.find(".option"),a=$("<div class='pull-right ' style='font-weight:bold;cursor:pointer'>×</div>");o.text(e[0].label),o.append(a),a.on("click",(function(){t.setKeys([]),l.removeClass("d-none"),o.addClass("d-none")}))}(e,this,t)):(i.removeClass("d-none"),l.addClass("d-none"),void(t.multiple&&n.addClass("form-control")))},setKeys:function(e){this.$input.val(e.length?e.join(","):"").trigger("change")},deleteKey:function(e){var t=this.getKeys(),n=[];for(var i in t)t[i]!=e&&n.push(t[i]);this.setKeys(n)},getKeys:function(){var e=this.$input.val();return e?String(e).split(","):[]}},Dcat.grid.SelectTable=function(e){return new t(e)}}(window)}});
//# sourceMappingURL=select-table.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,399 @@
/*!
* Bootstrap Colorpicker - Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4.
* @package bootstrap-colorpicker
* @version v3.2.0
* @license MIT
* @link https://itsjavi.com/bootstrap-colorpicker/
* @link https://github.com/itsjavi/bootstrap-colorpicker.git
*/
.colorpicker {
position: relative;
display: none;
font-size: inherit;
color: inherit;
text-align: left;
list-style: none;
background-color: #ffffff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.2);
padding: .75rem .75rem;
width: 148px;
border-radius: 4px;
-webkit-box-sizing: content-box;
box-sizing: content-box; }
.colorpicker.colorpicker-disabled,
.colorpicker.colorpicker-disabled * {
cursor: default !important; }
.colorpicker div {
position: relative; }
.colorpicker-popup {
position: absolute;
top: 100%;
left: 0;
float: left;
margin-top: 1px;
z-index: 1060; }
.colorpicker-popup.colorpicker-bs-popover-content {
position: relative;
top: auto;
left: auto;
float: none;
margin: 0;
z-index: initial;
border: none;
padding: 0.25rem 0;
border-radius: 0;
background: none;
-webkit-box-shadow: none;
box-shadow: none; }
.colorpicker:before,
.colorpicker:after {
content: "";
display: table;
clear: both;
line-height: 0; }
.colorpicker-clear {
clear: both;
display: block; }
.colorpicker:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: auto;
right: 6px; }
.colorpicker:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: auto;
right: 7px; }
.colorpicker.colorpicker-with-alpha {
width: 170px; }
.colorpicker.colorpicker-with-alpha .colorpicker-alpha {
display: block; }
.colorpicker-saturation {
position: relative;
width: 126px;
height: 126px;
/* FF3.6+ */
/* Chrome,Safari4+ */
/* Chrome10+,Safari5.1+ */
/* Opera 11.10+ */
/* IE10+ */
background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(black)), -webkit-gradient(linear, left top, right top, from(white), to(rgba(255, 255, 255, 0)));
background: linear-gradient(to bottom, transparent 0%, black 100%), linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);
/* W3C */
cursor: crosshair;
float: left;
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
margin-bottom: 6px; }
.colorpicker-saturation .colorpicker-guide {
display: block;
height: 6px;
width: 6px;
border-radius: 6px;
border: 1px solid #000;
-webkit-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
position: absolute;
top: 0;
left: 0;
margin: -3px 0 0 -3px; }
.colorpicker-hue,
.colorpicker-alpha {
position: relative;
width: 16px;
height: 126px;
float: left;
cursor: row-resize;
margin-left: 6px;
margin-bottom: 6px; }
.colorpicker-alpha-color {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%; }
.colorpicker-hue,
.colorpicker-alpha-color {
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }
.colorpicker-hue .colorpicker-guide,
.colorpicker-alpha .colorpicker-guide {
display: block;
height: 4px;
background: rgba(255, 255, 255, 0.8);
border: 1px solid rgba(0, 0, 0, 0.4);
position: absolute;
top: 0;
left: 0;
margin-left: -2px;
margin-top: -2px;
right: -2px;
z-index: 1; }
.colorpicker-hue {
/* FF3.6+ */
/* Chrome,Safari4+ */
/* Chrome10+,Safari5.1+ */
/* Opera 11.10+ */
/* IE10+ */
background: -webkit-gradient(linear, left bottom, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));
background: linear-gradient(to top, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);
/* W3C */ }
.colorpicker-alpha {
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px;
display: none; }
.colorpicker-bar {
min-height: 16px;
margin: 6px 0 0 0;
clear: both;
text-align: center;
font-size: 10px;
line-height: normal;
max-width: 100%;
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }
.colorpicker-bar:before {
content: "";
display: table;
clear: both; }
.colorpicker-bar.colorpicker-bar-horizontal {
height: 126px;
width: 16px;
margin: 0 0 6px 0;
float: left; }
.colorpicker-input-addon {
position: relative; }
.colorpicker-input-addon i {
display: inline-block;
cursor: pointer;
vertical-align: text-top;
height: 16px;
width: 16px;
position: relative; }
.colorpicker-input-addon:before {
content: "";
position: absolute;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: text-top;
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px; }
.colorpicker.colorpicker-inline {
position: relative;
display: inline-block;
float: none;
z-index: auto;
vertical-align: text-bottom; }
.colorpicker.colorpicker-horizontal {
width: 126px;
height: auto; }
.colorpicker.colorpicker-horizontal .colorpicker-bar {
width: 126px; }
.colorpicker.colorpicker-horizontal .colorpicker-saturation {
float: none;
margin-bottom: 0; }
.colorpicker.colorpicker-horizontal .colorpicker-hue,
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
float: none;
width: 126px;
height: 16px;
cursor: col-resize;
margin-left: 0;
margin-top: 6px;
margin-bottom: 0; }
.colorpicker.colorpicker-horizontal .colorpicker-hue .colorpicker-guide,
.colorpicker.colorpicker-horizontal .colorpicker-alpha .colorpicker-guide {
position: absolute;
display: block;
bottom: -2px;
left: 0;
right: auto;
height: auto;
width: 4px; }
.colorpicker.colorpicker-horizontal .colorpicker-hue {
/* FF3.6+ */
/* Chrome,Safari4+ */
/* Chrome10+,Safari5.1+ */
/* Opera 11.10+ */
/* IE10+ */
background: -webkit-gradient(linear, right top, left top, from(red), color-stop(8%, #ff8000), color-stop(17%, yellow), color-stop(25%, #80ff00), color-stop(33%, lime), color-stop(42%, #00ff80), color-stop(50%, cyan), color-stop(58%, #0080ff), color-stop(67%, blue), color-stop(75%, #8000ff), color-stop(83%, magenta), color-stop(92%, #ff0080), to(red));
background: linear-gradient(to left, red 0%, #ff8000 8%, yellow 17%, #80ff00 25%, lime 33%, #00ff80 42%, cyan 50%, #0080ff 58%, blue 67%, #8000ff 75%, magenta 83%, #ff0080 92%, red 100%);
/* W3C */ }
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px; }
.colorpicker-inline:before,
.colorpicker-no-arrow:before,
.colorpicker-popup.colorpicker-bs-popover-content:before {
content: none;
display: none; }
.colorpicker-inline:after,
.colorpicker-no-arrow:after,
.colorpicker-popup.colorpicker-bs-popover-content:after {
content: none;
display: none; }
.colorpicker-alpha,
.colorpicker-saturation,
.colorpicker-hue {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.colorpicker.colorpicker-visible,
.colorpicker-alpha.colorpicker-visible,
.colorpicker-saturation.colorpicker-visible,
.colorpicker-hue.colorpicker-visible,
.colorpicker-bar.colorpicker-visible {
display: block; }
.colorpicker.colorpicker-hidden,
.colorpicker-alpha.colorpicker-hidden,
.colorpicker-saturation.colorpicker-hidden,
.colorpicker-hue.colorpicker-hidden,
.colorpicker-bar.colorpicker-hidden {
display: none; }
.colorpicker-inline.colorpicker-visible {
display: inline-block; }
.colorpicker.colorpicker-disabled:after {
border: none;
content: '';
display: block;
width: 100%;
height: 100%;
background: rgba(233, 236, 239, 0.33);
top: 0;
left: 0;
right: auto;
z-index: 2;
position: absolute; }
.colorpicker.colorpicker-disabled .colorpicker-guide {
display: none; }
/** EXTENSIONS **/
.colorpicker-preview {
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px; }
.colorpicker-preview > div {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%; }
.colorpicker-bar.colorpicker-swatches {
-webkit-box-shadow: none;
box-shadow: none;
height: auto; }
.colorpicker-swatches--inner {
clear: both;
margin-top: -6px; }
.colorpicker-swatch {
position: relative;
cursor: pointer;
float: left;
height: 16px;
width: 16px;
margin-right: 6px;
margin-top: 6px;
margin-left: 0;
display: block;
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%, rgba(0, 0, 0, 0.1) 0), white;
background-size: 10px 10px;
background-position: 0 0, 5px 5px; }
.colorpicker-swatch--inner {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%; }
.colorpicker-swatch:nth-of-type(7n+0) {
margin-right: 0; }
.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(7n+0) {
margin-right: 6px; }
.colorpicker-with-alpha .colorpicker-swatch:nth-of-type(8n+0) {
margin-right: 0; }
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(6n+0) {
margin-right: 0; }
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(7n+0) {
margin-right: 6px; }
.colorpicker-horizontal .colorpicker-swatch:nth-of-type(8n+0) {
margin-right: 6px; }
.colorpicker-swatch:last-of-type:after {
content: "";
display: table;
clear: both; }
*[dir='rtl'] .colorpicker-element input,
.colorpicker-element[dir='rtl'] input,
.colorpicker-element input[dir='rtl'] {
direction: ltr;
text-align: right; }
/*# sourceMappingURL=bootstrap-colorpicker.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,382 @@
/*!
* Datetimepicker for Bootstrap 3
* version : 4.17.47
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget {
list-style: none;
}
.bootstrap-datetimepicker-widget.dropdown-menu {
display: block;
margin: 2px 0;
padding: 4px;
width: 19em;
}
@media (min-width: 576px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
@media (min-width: 768px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
@media (min-width: 992px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
.bootstrap-datetimepicker-widget.dropdown-menu:before,
.bootstrap-datetimepicker-widget.dropdown-menu:after {
content: '';
display: inline-block;
position: absolute;
}
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
top: -7px;
left: 7px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid white;
top: -6px;
left: 8px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.top:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #ccc;
border-top-color: rgba(0, 0, 0, 0.2);
bottom: -7px;
left: 6px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.top:after {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid white;
bottom: -6px;
left: 7px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before {
left: auto;
right: 6px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after {
left: auto;
right: 7px;
}
.bootstrap-datetimepicker-widget .list-unstyled {
margin: 0;
}
.bootstrap-datetimepicker-widget a[data-action] {
padding: 6px 0;
}
.bootstrap-datetimepicker-widget a[data-action]:active {
box-shadow: none;
}
.bootstrap-datetimepicker-widget .timepicker-hour,
.bootstrap-datetimepicker-widget .timepicker-minute,
.bootstrap-datetimepicker-widget .timepicker-second {
width: 54px;
font-weight: bold;
font-size: 1.2em;
margin: 0;
}
.bootstrap-datetimepicker-widget button[data-action] {
padding: 6px;
}
.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Increment Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Increment Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Decrement Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Decrement Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Show Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Show Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Toggle AM/PM";
}
.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Clear the picker";
}
.bootstrap-datetimepicker-widget .btn[data-action="today"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Set the date to today";
}
.bootstrap-datetimepicker-widget .picker-switch {
text-align: center;
}
.bootstrap-datetimepicker-widget .picker-switch::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Toggle Date and Time Screens";
}
.bootstrap-datetimepicker-widget .picker-switch td {
padding: 0;
margin: 0;
height: auto;
width: auto;
line-height: inherit;
}
.bootstrap-datetimepicker-widget .picker-switch td span,
.bootstrap-datetimepicker-widget .picker-switch td i {
line-height: 2.5;
height: 2.5em;
width: 100%;
}
.bootstrap-datetimepicker-widget table {
width: 100%;
margin: 0;
}
.bootstrap-datetimepicker-widget table td,
.bootstrap-datetimepicker-widget table th {
text-align: center;
border-radius: 0.25rem;
padding: 0.5em;
}
.bootstrap-datetimepicker-widget table th {
height: 20px;
line-height: 20px;
width: 20px;
}
.bootstrap-datetimepicker-widget table th.picker-switch {
width: 145px;
}
.bootstrap-datetimepicker-widget table th.disabled,
.bootstrap-datetimepicker-widget table th.disabled:hover {
background: none;
color: #dee2e6;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table th.prev::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Previous Month";
}
.bootstrap-datetimepicker-widget table th.next::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Next Month";
}
.bootstrap-datetimepicker-widget table thead tr:first-child th {
cursor: pointer;
}
.bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
background: #f8f9fa;
}
.bootstrap-datetimepicker-widget table td {
height: 54px;
line-height: 54px;
width: 54px;
}
.bootstrap-datetimepicker-widget table td.cw {
font-size: .8em;
height: 20px;
line-height: 20px;
color: #dee2e6;
}
.bootstrap-datetimepicker-widget table td.day {
height: 20px;
line-height: 20px;
width: 20px;
}
.bootstrap-datetimepicker-widget table td.day:hover,
.bootstrap-datetimepicker-widget table td.hour:hover,
.bootstrap-datetimepicker-widget table td.minute:hover,
.bootstrap-datetimepicker-widget table td.second:hover {
background: #f8f9fa;
cursor: pointer;
}
.bootstrap-datetimepicker-widget table td.old,
.bootstrap-datetimepicker-widget table td.new {
color: #dee2e6;
}
.bootstrap-datetimepicker-widget table td.today {
position: relative;
}
.bootstrap-datetimepicker-widget table td.today:before {
content: '';
display: inline-block;
border: solid transparent;
border-width: 0 0 7px 7px;
border-bottom-color: #dee2e6;
border-top-color: rgba(0, 0, 0, 0.2);
position: absolute;
bottom: 4px;
right: 4px;
}
.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
background-color: #dee2e6;
color: #007bff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget table td.active.today:before {
border-bottom-color: #fff;
}
.bootstrap-datetimepicker-widget table td.disabled,
.bootstrap-datetimepicker-widget table td.disabled:hover {
background: none;
color: #dee2e6;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table td span,
.bootstrap-datetimepicker-widget table td i {
display: inline-block;
width: 54px;
height: 54px;
line-height: 54px;
margin: 2px 1.5px;
cursor: pointer;
border-radius: 0.25rem;
}
.bootstrap-datetimepicker-widget table td span:hover,
.bootstrap-datetimepicker-widget table td i:hover {
background: #f8f9fa;
}
.bootstrap-datetimepicker-widget table td span.active,
.bootstrap-datetimepicker-widget table td i.active {
background-color: #dee2e6;
color: #007bff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget table td span.old,
.bootstrap-datetimepicker-widget table td i.old {
color: #dee2e6;
}
.bootstrap-datetimepicker-widget table td span.disabled,
.bootstrap-datetimepicker-widget table td i.disabled,
.bootstrap-datetimepicker-widget table td span.disabled:hover,
.bootstrap-datetimepicker-widget table td i.disabled:hover {
background: none;
color: #dee2e6;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget.usetwentyfour td.hour {
height: 27px;
line-height: 27px;
}
.bootstrap-datetimepicker-widget.wider {
width: 21em;
}
.bootstrap-datetimepicker-widget .datepicker-decades .decade {
line-height: 1.8em !important;
}
.input-group.date .input-group-addon {
cursor: pointer;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

View File

@ -0,0 +1,19 @@
{
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"expr": true,
"immed": true,
"noarg": true,
"onevar": false,
"quotmark": "single",
"smarttabs": true,
"trailing": true,
"unused": true,
"node": true,
"globals": {
"$": true,
"jQuery": true
}
}

View File

@ -0,0 +1,3 @@
language: node_js
node_js:
- 0.10

View File

@ -0,0 +1,86 @@
/*
* Bootstrap Duallistbox - v3.0.7
* A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.
* https://www.virtuosoft.eu/code/bootstrap-duallistbox/
*
* Made by István Ujj-Mészáros
* Under Apache License v2.0 License
*/
.bootstrap-duallistbox-container .buttons {
width: 100%;
margin-bottom: -1px;
}
.bootstrap-duallistbox-container label {
display: block;
}
.bootstrap-duallistbox-container .info {
display: inline-block;
margin-bottom: 5px;
font-size: 11px;
}
.bootstrap-duallistbox-container .clear1,
.bootstrap-duallistbox-container .clear2 {
display: none;
font-size: 10px;
}
.bootstrap-duallistbox-container .box1.filtered .clear1,
.bootstrap-duallistbox-container .box2.filtered .clear2 {
display: inline-block;
}
.bootstrap-duallistbox-container .move,
.bootstrap-duallistbox-container .remove {
width: 60%;
}
.bootstrap-duallistbox-container .btn-group .btn {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.bootstrap-duallistbox-container select {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.bootstrap-duallistbox-container .moveall,
.bootstrap-duallistbox-container .removeall {
width: 40%;
}
.bootstrap-duallistbox-container.bs2compatible .btn-group > .btn + .btn {
margin-left: 0;
}
.bootstrap-duallistbox-container select {
width: 100%;
height: 300px;
padding: 0;
}
.bootstrap-duallistbox-container .filter {
display: inline-block;
width: 100%;
height: 31px;
margin: 0 0 5px 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.bootstrap-duallistbox-container .filter.placeholder {
color: #aaa;
}
.bootstrap-duallistbox-container.moveonselect .move,
.bootstrap-duallistbox-container.moveonselect .remove {
display:none;
}
.bootstrap-duallistbox-container.moveonselect .moveall,
.bootstrap-duallistbox-container.moveonselect .removeall {
width: 100%;
}

View File

@ -0,0 +1 @@
.bootstrap-duallistbox-container .buttons{width:100%;margin-bottom:-1px}.bootstrap-duallistbox-container label{display:block}.bootstrap-duallistbox-container .info{display:inline-block;margin-bottom:5px;font-size:11px}.bootstrap-duallistbox-container .clear1,.bootstrap-duallistbox-container .clear2{display:none;font-size:10px}.bootstrap-duallistbox-container .box1.filtered .clear1,.bootstrap-duallistbox-container .box2.filtered .clear2{display:inline-block}.bootstrap-duallistbox-container .move,.bootstrap-duallistbox-container .remove{width:60%}.bootstrap-duallistbox-container .btn-group .btn{border-bottom-left-radius:0;border-bottom-right-radius:0}.bootstrap-duallistbox-container select{border-top-left-radius:0;border-top-right-radius:0}.bootstrap-duallistbox-container .moveall,.bootstrap-duallistbox-container .removeall{width:40%}.bootstrap-duallistbox-container.bs2compatible .btn-group>.btn+.btn{margin-left:0}.bootstrap-duallistbox-container select{width:100%;height:300px;padding:0}.bootstrap-duallistbox-container .filter{display:inline-block;width:100%;height:31px;margin:0 0 5px 0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-duallistbox-container .filter.placeholder{color:#aaa}.bootstrap-duallistbox-container.moveonselect .move,.bootstrap-duallistbox-container.moveonselect .remove{display:none}.bootstrap-duallistbox-container.moveonselect .moveall,.bootstrap-duallistbox-container.moveonselect .removeall{width:100%}

View File

@ -0,0 +1,841 @@
/*
* Bootstrap Duallistbox - v3.0.7
* A responsive dual listbox widget optimized for Twitter Bootstrap. It works on all modern browsers and on touch devices.
* https://www.virtuosoft.eu/code/bootstrap-duallistbox/
*
* Made by István Ujj-Mészáros
* Under Apache License v2.0 License
*/
;(function ($, window, document, undefined) {
// Create the defaults once
var pluginName = 'bootstrapDualListbox',
defaults = {
bootstrap2Compatible: false,
filterTextClear: 'show all',
filterPlaceHolder: 'Filter',
moveSelectedLabel: 'Move selected',
moveAllLabel: 'Move all',
removeSelectedLabel: 'Remove selected',
removeAllLabel: 'Remove all',
moveOnSelect: true, // true/false (forced true on androids, see the comment later)
moveOnDoubleClick: true, // true/false (forced false on androids, cause moveOnSelect is forced to true)
preserveSelectionOnMove: false, // 'all' / 'moved' / false
selectedListLabel: false, // 'string', false
nonSelectedListLabel: false, // 'string', false
helperSelectNamePostfix: '_helper', // 'string_of_postfix' / false
selectorMinimalHeight: 100,
showFilterInputs: true, // whether to show filter inputs
nonSelectedFilter: '', // string, filter the non selected options
selectedFilter: '', // string, filter the selected options
infoText: 'Showing all {0}', // text when all options are visible / false for no info text
infoTextFiltered: '<span class="label label-warning">Filtered</span> {0} from {1}', // when not all of the options are visible due to the filter
infoTextEmpty: 'Empty list', // when there are no options present in the list
filterOnValues: false, // filter by selector's values, boolean
sortByInputOrder: false,
eventMoveOverride: false, // boolean, allows user to unbind default event behaviour and run their own instead
eventMoveAllOverride: false, // boolean, allows user to unbind default event behaviour and run their own instead
eventRemoveOverride: false, // boolean, allows user to unbind default event behaviour and run their own instead
eventRemoveAllOverride: false // boolean, allows user to unbind default event behaviour and run their own instead
},
// Selections are invisible on android if the containing select is styled with CSS
// http://code.google.com/p/android/issues/detail?id=16922
isBuggyAndroid = /android/i.test(navigator.userAgent.toLowerCase());
// The actual plugin constructor
function BootstrapDualListbox(element, options) {
this.element = $(element);
// jQuery has an extend method which merges the contents of two or
// more objects, storing the result in the first object. The first object
// is generally empty as we don't want to alter the default options for
// future instances of the plugin
this.settings = $.extend({}, defaults, options);
this._defaults = defaults;
this._name = pluginName;
this.init();
}
function triggerChangeEvent(dualListbox) {
dualListbox.element.trigger('change');
}
function updateSelectionStates(dualListbox) {
dualListbox.element.find('option').each(function(index, item) {
var $item = $(item);
if (typeof($item.data('original-index')) === 'undefined') {
$item.data('original-index', dualListbox.elementCount++);
}
if (typeof($item.data('_selected')) === 'undefined') {
$item.data('_selected', false);
}
});
}
function changeSelectionState(dualListbox, original_index, selected) {
dualListbox.element.find('option').each(function(index, item) {
var $item = $(item);
if ($item.data('original-index') === original_index) {
$item.prop('selected', selected);
if(selected){
$item.attr('data-sortindex', dualListbox.sortIndex);
dualListbox.sortIndex++;
} else {
$item.removeAttr('data-sortindex');
}
}
});
}
function formatString(s, args) {
return s.replace(/\{(\d+)\}/g, function(match, number) {
return typeof args[number] !== 'undefined' ? args[number] : match;
});
}
function refreshInfo(dualListbox) {
if (!dualListbox.settings.infoText) {
return;
}
var visible1 = dualListbox.elements.select1.find('option').length,
visible2 = dualListbox.elements.select2.find('option').length,
all1 = dualListbox.element.find('option').length - dualListbox.selectedElements,
all2 = dualListbox.selectedElements,
content = '';
if (all1 === 0) {
content = dualListbox.settings.infoTextEmpty;
} else if (visible1 === all1) {
content = formatString(dualListbox.settings.infoText, [visible1, all1]);
} else {
content = formatString(dualListbox.settings.infoTextFiltered, [visible1, all1]);
}
dualListbox.elements.info1.html(content);
dualListbox.elements.box1.toggleClass('filtered', !(visible1 === all1 || all1 === 0));
if (all2 === 0) {
content = dualListbox.settings.infoTextEmpty;
} else if (visible2 === all2) {
content = formatString(dualListbox.settings.infoText, [visible2, all2]);
} else {
content = formatString(dualListbox.settings.infoTextFiltered, [visible2, all2]);
}
dualListbox.elements.info2.html(content);
dualListbox.elements.box2.toggleClass('filtered', !(visible2 === all2 || all2 === 0));
}
function refreshSelects(dualListbox) {
dualListbox.selectedElements = 0;
dualListbox.elements.select1.empty();
dualListbox.elements.select2.empty();
dualListbox.element.find('option').each(function(index, item) {
var $item = $(item);
if ($item.prop('selected')) {
dualListbox.selectedElements++;
dualListbox.elements.select2.append($item.clone(true).prop('selected', $item.data('_selected')));
} else {
dualListbox.elements.select1.append($item.clone(true).prop('selected', $item.data('_selected')));
}
});
if (dualListbox.settings.showFilterInputs) {
filter(dualListbox, 1);
filter(dualListbox, 2);
}
refreshInfo(dualListbox);
}
function filter(dualListbox, selectIndex) {
if (!dualListbox.settings.showFilterInputs) {
return;
}
saveSelections(dualListbox, selectIndex);
dualListbox.elements['select'+selectIndex].empty().scrollTop(0);
var regex = new RegExp($.trim(dualListbox.elements['filterInput'+selectIndex].val()), 'gi'),
allOptions = dualListbox.element.find('option'),
options = dualListbox.element;
if (selectIndex === 1) {
options = allOptions.not(':selected');
} else {
options = options.find('option:selected');
}
options.each(function(index, item) {
var $item = $(item),
isFiltered = true;
if (item.text.match(regex) || (dualListbox.settings.filterOnValues && $item.attr('value').match(regex) ) ) {
isFiltered = false;
dualListbox.elements['select'+selectIndex].append($item.clone(true).prop('selected', $item.data('_selected')));
}
allOptions.eq($item.data('original-index')).data('filtered'+selectIndex, isFiltered);
});
refreshInfo(dualListbox);
}
function saveSelections(dualListbox, selectIndex) {
var options = dualListbox.element.find('option');
dualListbox.elements['select'+selectIndex].find('option').each(function(index, item) {
var $item = $(item);
options.eq($item.data('original-index')).data('_selected', $item.prop('selected'));
});
}
function sortOptionsByInputOrder(select){
var selectopt = select.children('option');
selectopt.sort(function(a,b){
var an = parseInt(a.getAttribute('data-sortindex')),
bn = parseInt(b.getAttribute('data-sortindex'));
if(an > bn) {
return 1;
}
if(an < bn) {
return -1;
}
return 0;
});
selectopt.detach().appendTo(select);
}
function sortOptions(select) {
select.find('option').sort(function(a, b) {
return ($(a).data('original-index') > $(b).data('original-index')) ? 1 : -1;
}).appendTo(select);
}
function clearSelections(dualListbox) {
dualListbox.elements.select1.find('option').each(function() {
dualListbox.element.find('option').data('_selected', false);
});
}
function move(dualListbox) {
if (dualListbox.settings.preserveSelectionOnMove === 'all' && !dualListbox.settings.moveOnSelect) {
saveSelections(dualListbox, 1);
saveSelections(dualListbox, 2);
} else if (dualListbox.settings.preserveSelectionOnMove === 'moved' && !dualListbox.settings.moveOnSelect) {
saveSelections(dualListbox, 1);
}
dualListbox.elements.select1.find('option:selected').each(function(index, item) {
var $item = $(item);
if (!$item.data('filtered1')) {
changeSelectionState(dualListbox, $item.data('original-index'), true);
}
});
refreshSelects(dualListbox);
triggerChangeEvent(dualListbox);
if(dualListbox.settings.sortByInputOrder){
sortOptionsByInputOrder(dualListbox.elements.select2);
} else {
sortOptions(dualListbox.elements.select2);
}
}
function remove(dualListbox) {
if (dualListbox.settings.preserveSelectionOnMove === 'all' && !dualListbox.settings.moveOnSelect) {
saveSelections(dualListbox, 1);
saveSelections(dualListbox, 2);
} else if (dualListbox.settings.preserveSelectionOnMove === 'moved' && !dualListbox.settings.moveOnSelect) {
saveSelections(dualListbox, 2);
}
dualListbox.elements.select2.find('option:selected').each(function(index, item) {
var $item = $(item);
if (!$item.data('filtered2')) {
changeSelectionState(dualListbox, $item.data('original-index'), false);
}
});
refreshSelects(dualListbox);
triggerChangeEvent(dualListbox);
sortOptions(dualListbox.elements.select1);
if(dualListbox.settings.sortByInputOrder){
sortOptionsByInputOrder(dualListbox.elements.select2);
}
}
function moveAll(dualListbox) {
if (dualListbox.settings.preserveSelectionOnMove === 'all' && !dualListbox.settings.moveOnSelect) {
saveSelections(dualListbox, 1);
saveSelections(dualListbox, 2);
} else if (dualListbox.settings.preserveSelectionOnMove === 'moved' && !dualListbox.settings.moveOnSelect) {
saveSelections(dualListbox, 1);
}
dualListbox.element.find('option').each(function(index, item) {
var $item = $(item);
if (!$item.data('filtered1')) {
$item.prop('selected', true);
$item.attr('data-sortindex', dualListbox.sortIndex);
dualListbox.sortIndex++;
}
});
refreshSelects(dualListbox);
triggerChangeEvent(dualListbox);
}
function removeAll(dualListbox) {
if (dualListbox.settings.preserveSelectionOnMove === 'all' && !dualListbox.settings.moveOnSelect) {
saveSelections(dualListbox, 1);
saveSelections(dualListbox, 2);
} else if (dualListbox.settings.preserveSelectionOnMove === 'moved' && !dualListbox.settings.moveOnSelect) {
saveSelections(dualListbox, 2);
}
dualListbox.element.find('option').each(function(index, item) {
var $item = $(item);
if (!$item.data('filtered2')) {
$item.prop('selected', false);
$item.removeAttr('data-sortindex');
}
});
refreshSelects(dualListbox);
triggerChangeEvent(dualListbox);
}
function bindEvents(dualListbox) {
dualListbox.elements.form.submit(function(e) {
if (dualListbox.elements.filterInput1.is(':focus')) {
e.preventDefault();
dualListbox.elements.filterInput1.focusout();
} else if (dualListbox.elements.filterInput2.is(':focus')) {
e.preventDefault();
dualListbox.elements.filterInput2.focusout();
}
});
dualListbox.element.on('bootstrapDualListbox.refresh', function(e, mustClearSelections){
dualListbox.refresh(mustClearSelections);
});
dualListbox.elements.filterClear1.on('click', function() {
dualListbox.setNonSelectedFilter('', true);
});
dualListbox.elements.filterClear2.on('click', function() {
dualListbox.setSelectedFilter('', true);
});
if (dualListbox.settings.eventMoveOverride === false) {
dualListbox.elements.moveButton.on('click', function() {
move(dualListbox);
});
}
if (dualListbox.settings.eventMoveAllOverride === false) {
dualListbox.elements.moveAllButton.on('click', function() {
moveAll(dualListbox);
});
}
if (dualListbox.settings.eventRemoveOverride === false) {
dualListbox.elements.removeButton.on('click', function() {
remove(dualListbox);
});
}
if (dualListbox.settings.eventRemoveAllOverride === false) {
dualListbox.elements.removeAllButton.on('click', function() {
removeAll(dualListbox);
});
}
dualListbox.elements.filterInput1.on('change keyup', function() {
filter(dualListbox, 1);
});
dualListbox.elements.filterInput2.on('change keyup', function() {
filter(dualListbox, 2);
});
}
BootstrapDualListbox.prototype = {
init: function () {
// Add the custom HTML template
this.container = $('' +
'<div class="bootstrap-duallistbox-container">' +
' <div class="box1">' +
' <label></label>' +
' <span class="info-container">' +
' <span class="info"></span>' +
' <button type="button" class="btn clear1 pull-right"></button>' +
' </span>' +
' <input class="filter" type="text">' +
' <div class="btn-group buttons">' +
' <button type="button" class="btn moveall">' +
' <i></i>' +
' <i></i>' +
' </button>' +
' <button type="button" class="btn move">' +
' <i></i>' +
' </button>' +
' </div>' +
' <select multiple="multiple"></select>' +
' </div>' +
' <div class="box2">' +
' <label></label>' +
' <span class="info-container">' +
' <span class="info"></span>' +
' <button type="button" class="btn clear2 pull-right"></button>' +
' </span>' +
' <input class="filter" type="text">' +
' <div class="btn-group buttons">' +
' <button type="button" class="btn remove">' +
' <i></i>' +
' </button>' +
' <button type="button" class="btn removeall">' +
' <i></i>' +
' <i></i>' +
' </button>' +
' </div>' +
' <select multiple="multiple"></select>' +
' </div>' +
'</div>')
.insertBefore(this.element);
// Cache the inner elements
this.elements = {
originalSelect: this.element,
box1: $('.box1', this.container),
box2: $('.box2', this.container),
filterInput1: $('.box1 .filter', this.container),
filterInput2: $('.box2 .filter', this.container),
filterClear1: $('.box1 .clear1', this.container),
filterClear2: $('.box2 .clear2', this.container),
label1: $('.box1 > label', this.container),
label2: $('.box2 > label', this.container),
info1: $('.box1 .info', this.container),
info2: $('.box2 .info', this.container),
select1: $('.box1 select', this.container),
select2: $('.box2 select', this.container),
moveButton: $('.box1 .move', this.container),
removeButton: $('.box2 .remove', this.container),
moveAllButton: $('.box1 .moveall', this.container),
removeAllButton: $('.box2 .removeall', this.container),
form: $($('.box1 .filter', this.container)[0].form)
};
// Set select IDs
this.originalSelectName = this.element.attr('name') || '';
var select1Id = 'bootstrap-duallistbox-nonselected-list_' + this.originalSelectName,
select2Id = 'bootstrap-duallistbox-selected-list_' + this.originalSelectName;
this.elements.select1.attr('id', select1Id);
this.elements.select2.attr('id', select2Id);
this.elements.label1.attr('for', select1Id);
this.elements.label2.attr('for', select2Id);
// Apply all settings
this.selectedElements = 0;
this.sortIndex = 0;
this.elementCount = 0;
this.setBootstrap2Compatible(this.settings.bootstrap2Compatible);
this.setFilterTextClear(this.settings.filterTextClear);
this.setFilterPlaceHolder(this.settings.filterPlaceHolder);
this.setMoveSelectedLabel(this.settings.moveSelectedLabel);
this.setMoveAllLabel(this.settings.moveAllLabel);
this.setRemoveSelectedLabel(this.settings.removeSelectedLabel);
this.setRemoveAllLabel(this.settings.removeAllLabel);
this.setMoveOnSelect(this.settings.moveOnSelect);
this.setMoveOnDoubleClick(this.settings.moveOnDoubleClick);
this.setPreserveSelectionOnMove(this.settings.preserveSelectionOnMove);
this.setSelectedListLabel(this.settings.selectedListLabel);
this.setNonSelectedListLabel(this.settings.nonSelectedListLabel);
this.setHelperSelectNamePostfix(this.settings.helperSelectNamePostfix);
this.setSelectOrMinimalHeight(this.settings.selectorMinimalHeight);
updateSelectionStates(this);
this.setShowFilterInputs(this.settings.showFilterInputs);
this.setNonSelectedFilter(this.settings.nonSelectedFilter);
this.setSelectedFilter(this.settings.selectedFilter);
this.setInfoText(this.settings.infoText);
this.setInfoTextFiltered(this.settings.infoTextFiltered);
this.setInfoTextEmpty(this.settings.infoTextEmpty);
this.setFilterOnValues(this.settings.filterOnValues);
this.setSortByInputOrder(this.settings.sortByInputOrder);
this.setEventMoveOverride(this.settings.eventMoveOverride);
this.setEventMoveAllOverride(this.settings.eventMoveAllOverride);
this.setEventRemoveOverride(this.settings.eventRemoveOverride);
this.setEventRemoveAllOverride(this.settings.eventRemoveAllOverride);
// Hide the original select
this.element.hide();
bindEvents(this);
refreshSelects(this);
return this.element;
},
setBootstrap2Compatible: function(value, refresh) {
this.settings.bootstrap2Compatible = value;
if (value) {
this.container.removeClass('row').addClass('row-fluid bs2compatible');
this.container.find('.box1, .box2').removeClass('col-md-6').addClass('span6');
this.container.find('.clear1, .clear2').removeClass('btn-default btn-xs').addClass('btn-mini');
this.container.find('input, select').removeClass('form-control');
this.container.find('.btn').removeClass('btn-default');
this.container.find('.moveall > i, .move > i').removeClass('glyphicon glyphicon-arrow-right').addClass('icon-arrow-right');
this.container.find('.removeall > i, .remove > i').removeClass('glyphicon glyphicon-arrow-left').addClass('icon-arrow-left');
} else {
this.container.removeClass('row-fluid bs2compatible').addClass('row');
this.container.find('.box1, .box2').removeClass('span6').addClass('col-md-6');
this.container.find('.clear1, .clear2').removeClass('btn-mini').addClass('btn-default btn-xs');
this.container.find('input, select').addClass('form-control');
this.container.find('.btn').addClass('btn-default');
this.container.find('.moveall > i, .move > i').removeClass('icon-arrow-right').addClass('glyphicon glyphicon-arrow-right');
this.container.find('.removeall > i, .remove > i').removeClass('icon-arrow-left').addClass('glyphicon glyphicon-arrow-left');
}
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setFilterTextClear: function(value, refresh) {
this.settings.filterTextClear = value;
this.elements.filterClear1.html(value);
this.elements.filterClear2.html(value);
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setFilterPlaceHolder: function(value, refresh) {
this.settings.filterPlaceHolder = value;
this.elements.filterInput1.attr('placeholder', value);
this.elements.filterInput2.attr('placeholder', value);
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setMoveSelectedLabel: function(value, refresh) {
this.settings.moveSelectedLabel = value;
this.elements.moveButton.attr('title', value);
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setMoveAllLabel: function(value, refresh) {
this.settings.moveAllLabel = value;
this.elements.moveAllButton.attr('title', value);
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setRemoveSelectedLabel: function(value, refresh) {
this.settings.removeSelectedLabel = value;
this.elements.removeButton.attr('title', value);
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setRemoveAllLabel: function(value, refresh) {
this.settings.removeAllLabel = value;
this.elements.removeAllButton.attr('title', value);
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setMoveOnSelect: function(value, refresh) {
if (isBuggyAndroid) {
value = true;
}
this.settings.moveOnSelect = value;
if (this.settings.moveOnSelect) {
this.container.addClass('moveonselect');
var self = this;
this.elements.select1.on('change', function() {
move(self);
});
this.elements.select2.on('change', function() {
remove(self);
});
} else {
this.container.removeClass('moveonselect');
this.elements.select1.off('change');
this.elements.select2.off('change');
}
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setMoveOnDoubleClick: function(value, refresh) {
if (isBuggyAndroid) {
value = false;
}
this.settings.moveOnDoubleClick = value;
if (this.settings.moveOnDoubleClick) {
this.container.addClass('moveondoubleclick');
var self = this;
this.elements.select1.on('dblclick', function() {
move(self);
});
this.elements.select2.on('dblclick', function() {
remove(self);
});
} else {
this.container.removeClass('moveondoubleclick');
this.elements.select1.off('dblclick');
this.elements.select2.off('dblclick');
}
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setPreserveSelectionOnMove: function(value, refresh) {
// We are forcing to move on select and disabling preserveSelectionOnMove on Android
if (isBuggyAndroid) {
value = false;
}
this.settings.preserveSelectionOnMove = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setSelectedListLabel: function(value, refresh) {
this.settings.selectedListLabel = value;
if (value) {
this.elements.label2.show().html(value);
} else {
this.elements.label2.hide().html(value);
}
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setNonSelectedListLabel: function(value, refresh) {
this.settings.nonSelectedListLabel = value;
if (value) {
this.elements.label1.show().html(value);
} else {
this.elements.label1.hide().html(value);
}
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setHelperSelectNamePostfix: function(value, refresh) {
this.settings.helperSelectNamePostfix = value;
if (value) {
this.elements.select1.attr('name', this.originalSelectName + value + '1');
this.elements.select2.attr('name', this.originalSelectName + value + '2');
} else {
this.elements.select1.removeAttr('name');
this.elements.select2.removeAttr('name');
}
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setSelectOrMinimalHeight: function(value, refresh) {
this.settings.selectorMinimalHeight = value;
var height = this.element.height();
if (this.element.height() < value) {
height = value;
}
this.elements.select1.height(height);
this.elements.select2.height(height);
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setShowFilterInputs: function(value, refresh) {
if (!value) {
this.setNonSelectedFilter('');
this.setSelectedFilter('');
refreshSelects(this);
this.elements.filterInput1.hide();
this.elements.filterInput2.hide();
} else {
this.elements.filterInput1.show();
this.elements.filterInput2.show();
}
this.settings.showFilterInputs = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setNonSelectedFilter: function(value, refresh) {
if (this.settings.showFilterInputs) {
this.settings.nonSelectedFilter = value;
this.elements.filterInput1.val(value);
if (refresh) {
refreshSelects(this);
}
return this.element;
}
},
setSelectedFilter: function(value, refresh) {
if (this.settings.showFilterInputs) {
this.settings.selectedFilter = value;
this.elements.filterInput2.val(value);
if (refresh) {
refreshSelects(this);
}
return this.element;
}
},
setInfoText: function(value, refresh) {
this.settings.infoText = value;
if (value) {
this.elements.info1.show();
this.elements.info2.show();
} else {
this.elements.info1.hide();
this.elements.info2.hide();
}
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setInfoTextFiltered: function(value, refresh) {
this.settings.infoTextFiltered = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setInfoTextEmpty: function(value, refresh) {
this.settings.infoTextEmpty = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setFilterOnValues: function(value, refresh) {
this.settings.filterOnValues = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setSortByInputOrder: function(value, refresh){
this.settings.sortByInputOrder = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setEventMoveOverride: function(value, refresh) {
this.settings.eventMoveOverride = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setEventMoveAllOverride: function(value, refresh) {
this.settings.eventMoveAllOverride = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setEventRemoveOverride: function(value, refresh) {
this.settings.eventRemoveOverride = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
setEventRemoveAllOverride: function(value, refresh) {
this.settings.eventRemoveAllOverride = value;
if (refresh) {
refreshSelects(this);
}
return this.element;
},
getContainer: function() {
return this.container;
},
refresh: function(mustClearSelections) {
updateSelectionStates(this);
if (!mustClearSelections) {
saveSelections(this, 1);
saveSelections(this, 2);
} else {
clearSelections(this);
}
refreshSelects(this);
},
destroy: function() {
this.container.remove();
this.element.show();
$.data(this, 'plugin_' + pluginName, null);
return this.element;
}
};
// A really lightweight plugin wrapper around the constructor,
// preventing against multiple instantiations
$.fn[ pluginName ] = function (options) {
var args = arguments;
// Is the first parameter an object (options), or was omitted, instantiate a new instance of the plugin.
if (options === undefined || typeof options === 'object') {
return this.each(function () {
// If this is not a select
if (!$(this).is('select')) {
$(this).find('select').each(function(index, item) {
// For each nested select, instantiate the Dual List Box
$(item).bootstrapDualListbox(options);
});
} else if (!$.data(this, 'plugin_' + pluginName)) {
// Only allow the plugin to be instantiated once so we check that the element has no plugin instantiation yet
// if it has no instance, create a new one, pass options to our plugin constructor,
// and store the plugin instance in the elements jQuery data object.
$.data(this, 'plugin_' + pluginName, new BootstrapDualListbox(this, options));
}
});
// If the first parameter is a string and it doesn't start with an underscore or "contains" the `init`-function,
// treat this as a call to a public method.
} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
// Cache the method call to make it possible to return a value
var returns;
this.each(function () {
var instance = $.data(this, 'plugin_' + pluginName);
// Tests that there's already a plugin-instance and checks that the requested public method exists
if (instance instanceof BootstrapDualListbox && typeof instance[options] === 'function') {
// Call the method of our plugin instance, and pass it the supplied arguments.
returns = instance[options].apply(instance, Array.prototype.slice.call(args, 1));
}
});
// If the earlier cached method gives a value back return the value,
// otherwise return this to preserve chainability.
return returns !== undefined ? returns : this;
}
};
})(jQuery, window, document);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,60 @@
/*!========================================================================
* File: bootstrap-iconpicker.css v1.10.0 by @victor-valencia
* https://victor-valencia.github.com/bootstrap-iconpicker
* ========================================================================
* Copyright 2013-2018 Victor Valencia Rico.
* Licensed under MIT license.
* https://github.com/victor-valencia/bootstrap-iconpicker/blob/master/LICENSE
* ========================================================================
*/
.iconpicker .caret {
margin-left: 10px !important;
}
.iconpicker {
min-width: 60px;
}
.iconpicker input.search-control {
margin-bottom: 6px;
margin-top: 6px;
}
div.iconpicker.left .table-icons {
margin-right: auto;
}
div.iconpicker.center .table-icons {
margin-left: auto;
margin-right: auto;
}
div.iconpicker.right .table-icons {
margin-left: auto;
}
.table-icons .btn {
min-height: 30px;
min-width: 35px;
text-align: center;
padding: 0;
margin: 2px;
}
.table-icons td {
min-width: 39px;
}
.popover {
max-width: inherit !important;
}
.iconpicker-popover {
z-index: 1050 !important;
}
.iconpicker-popover .search-control {
margin-bottom: 6px;
margin-top: 6px;
}

View File

@ -0,0 +1,11 @@
/*!========================================================================
* File: bootstrap-iconpicker.min.css v1.10.0 by @victor-valencia
* https://victor-valencia.github.com/bootstrap-iconpicker
* ========================================================================
* Copyright 2013-2017 Victor Valencia Rico.
* Licensed under MIT license.
* https://github.com/victor-valencia/bootstrap-iconpicker/blob/master/LICENSE
* ========================================================================
*/
.iconpicker .caret{margin-left:10px!important}.iconpicker{min-width:60px}.iconpicker input.search-control{margin-bottom:6px;margin-top:6px}div.iconpicker.left .table-icons{margin-right:auto}div.iconpicker.center .table-icons{margin-left:auto;margin-right:auto}div.iconpicker.right .table-icons{margin-left:auto}.table-icons .btn{min-height:30px;min-width:35px;text-align:center;padding:0;margin:2px}.table-icons td{min-width:39px}.popover{max-width:inherit!important}.iconpicker-popover{z-index:1050!important}.iconpicker-popover .search-control{margin-bottom:6px;margin-top:6px}

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More