作者 郭文星

123

正在显示 36 个修改的文件 包含 2354 行增加50 行删除
{"files":["public\\assets\\addons\\summernote\\css\\summernote.css","public\\assets\\addons\\summernote\\css\\summernote.min.css","public\\assets\\addons\\summernote\\font\\summernote.eot","public\\assets\\addons\\summernote\\font\\summernote.ttf","public\\assets\\addons\\summernote\\font\\summernote.woff","public\\assets\\addons\\summernote\\font\\summernote.woff2","public\\assets\\addons\\summernote\\js\\summernote.js","public\\assets\\addons\\summernote\\js\\summernote.min.js","public\\assets\\addons\\summernote\\lang\\summernote-zh-CN.js","public\\assets\\addons\\summernote\\lang\\summernote-zh-CN.min.js","public\\assets\\addons\\summernote\\lang\\summernote-zh-TW.js","public\\assets\\addons\\summernote\\lang\\summernote-zh-TW.min.js"],"license":"regular","licenseto":"15629","licensekey":"NLIO6tYrKG5hiusp kghh0S6zlU76Hs9rIMiuQd3tjV8bSiqblDYiCf\/c5Bc=","domains":["netcar.com"],"licensecodes":[],"validations":["9c3b042fdd8c2e4e21e4da30dcc79ba1"]}
\ No newline at end of file
... ...
<?php
namespace addons\summernote;
use think\Addons;
/**
* Summernote富文本编辑器
*/
class Summernote extends Addons
{
/**
* 插件安装方法
* @return bool
*/
public function install()
{
return true;
}
/**
* 插件卸载方法
* @return bool
*/
public function uninstall()
{
return true;
}
/**
* @param $params
*/
public function configInit(&$params)
{
$config = $this->getConfig();
$params['summernote'] = ['classname' => $config['classname'] ?? '.editor'];
}
}
... ...
require.config({
paths: {
'summernote': '../addons/summernote/lang/summernote-zh-CN.min'
},
shim: {
'summernote': ['../addons/summernote/js/summernote.min', 'css!../addons/summernote/css/summernote.min.css'],
}
});
require(['form', 'upload'], function (Form, Upload) {
var _bindevent = Form.events.bindevent;
Form.events.bindevent = function (form) {
_bindevent.apply(this, [form]);
try {
//绑定summernote事件
if ($(Config.summernote.classname || '.editor', form).length > 0) {
var selectUrl = typeof Config !== 'undefined' && Config.modulename === 'index' ? 'user/attachment' : 'general/attachment/select';
require(['summernote'], function () {
var imageButton = function (context) {
var ui = $.summernote.ui;
var button = ui.button({
contents: '<i class="fa fa-file-image-o"/>',
tooltip: __('Choose'),
click: function () {
parent.Fast.api.open(selectUrl + "?element_id=&multiple=true&mimetype=image/", __('Choose'), {
callback: function (data) {
var urlArr = data.url.split(/\,/);
$.each(urlArr, function () {
var url = Fast.api.cdnurl(this, true);
context.invoke('editor.insertImage', url);
});
}
});
return false;
}
});
return button.render();
};
var attachmentButton = function (context) {
var ui = $.summernote.ui;
var button = ui.button({
contents: '<i class="fa fa-file"/>',
tooltip: __('Choose'),
click: function () {
parent.Fast.api.open(selectUrl + "?element_id=&multiple=true&mimetype=*", __('Choose'), {
callback: function (data) {
var urlArr = data.url.split(/\,/);
$.each(urlArr, function () {
var url = Fast.api.cdnurl(this, true);
var node = $("<a href='" + url + "'>" + url + "</a>");
context.invoke('insertNode', node[0]);
});
}
});
return false;
}
});
return button.render();
};
$(Config.summernote.classname || '.editor', form).each(function () {
$(this).summernote($.extend(true, {}, {
// height: 250,
minHeight: 250,
lang: 'zh-CN',
fontNames: [
'Arial', 'Arial Black', 'Serif', 'Sans', 'Courier',
'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande',
"Open Sans", "Hiragino Sans GB", "Microsoft YaHei",
'微软雅黑', '宋体', '黑体', '仿宋', '楷体', '幼圆',
],
fontNamesIgnoreCheck: [
"Open Sans", "Microsoft YaHei",
'微软雅黑', '宋体', '黑体', '仿宋', '楷体', '幼圆'
],
toolbar: [
['style', ['style', 'undo', 'redo']],
['font', ['bold', 'underline', 'strikethrough', 'clear']],
['fontname', ['color', 'fontname', 'fontsize']],
['para', ['ul', 'ol', 'paragraph', 'height']],
['table', ['table', 'hr']],
['insert', ['link', 'picture', 'video']],
['select', ['image', 'attachment']],
['view', ['fullscreen', 'codeview', 'help']],
],
buttons: {
image: imageButton,
attachment: attachmentButton,
},
dialogsInBody: true,
followingToolbar: false,
callbacks: {
onChange: function (contents) {
$(this).val(contents);
$(this).trigger('change');
},
onInit: function () {
},
onImageUpload: function (files) {
var that = this;
//依次上传图片
for (var i = 0; i < files.length; i++) {
Upload.api.send(files[i], function (data) {
var url = Fast.api.cdnurl(data.url, true);
$(that).summernote("insertImage", url, 'filename');
});
}
}
}
}, $(this).data("summernote-options") || {}));
});
});
}
} catch (e) {
}
};
});
... ...
<?php
return [
[
'name' => 'classname',
'title' => '渲染文本框元素',
'type' => 'string',
'content' => [],
'value' => '.editor',
'rule' => 'required',
'msg' => '',
'tip' => '用于对指定的元素渲染,一般情况下无需修改',
'ok' => '',
'extend' => '',
],
];
... ...
<?php
namespace addons\summernote\controller;
use think\addons\Controller;
class Index extends Controller
{
public function index()
{
$this->error("当前插件暂无前台页面");
}
}
... ...
name = summernote
title = Summernote富文本编辑器
intro = 一款简单的富文本编辑器
author = FastAdmin
website = http://www.fastadmin.net
version = 1.1.1
url = /addons/summernote
state = 1
license = regular
licenseto = 15629
... ...
... ... @@ -51,17 +51,19 @@ class Car extends Backend
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$list = $this->model
->with(['driver','route'])
->with(['route','driver','seat'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->visible(['id','car_model','license_plate','seat','colour','driver_license_img','driving_license_img','reservation_time','start_time','create_time']);
$row->visible(['driver']);
$row->getRelation('driver')->visible(['name']);
$row->visible(['route']);
$row->visible(['id','car_model','license_plate','colour','reservation_time','start_time','create_time']);
$row->visible(['route']);
$row->getRelation('route')->visible(['name']);
$row->visible(['driver']);
$row->getRelation('driver')->visible(['name']);
$row->visible(['seat']);
$row->getRelation('seat')->visible(['name']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
use think\Db;
use think\exception\DbException;
use think\exception\PDOException;
use think\exception\ValidateException;
/**
* 座位管理
*
* @icon fa fa-circle-o
*/
class Seat extends Backend
{
/**
* Seat模型对象
* @var \app\admin\model\Seat
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Seat;
$this->view->assign("seatNumberList", $this->model->getSeatNumberList());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 添加
*
* @return string
* @throws \think\Exception
*/
public function add()
{
if (false === $this->request->isPost()) {
return $this->view->fetch();
}
$params = $this->request->post('row/a');
$params['seat_name'] = array_filter($params['seat_name'], function($value) {
return !is_null($value) && $value !== '';
});
$params['seat_price'] = array_filter($params['seat_price'], function($value) {
return !is_null($value) && $value !== '';
});
if(count($params['seat_name'])!=count($params['seat_price'])){
$this->error("请填写完成");
}
$params['seat']=[];
foreach ($params['seat_name'] as $k=>$v){
$params['seat'][$k]=["seat_no"=>$params['seat_no'][$k],"seat_name"=>$params['seat_name'][$k],"seat_price"=>$params['seat_price'][$k]];
}
unset($params['seat_no']);
unset($params['seat_price']);
unset($params['seat_name']);
$params["seat"]=json_encode($params["seat"]);
if (empty($params)) {
$this->error(__('Parameter %s can not be empty', ''));
}
$params = $this->preExcludeFields($params);
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
$params[$this->dataLimitField] = $this->auth->id;
}
$result = false;
Db::startTrans();
try {
//是否采用模型验证
if ($this->modelValidate) {
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
$this->model->validateFailException()->validate($validate);
}
$result = $this->model->allowField(true)->save($params);
Db::commit();
} catch (ValidateException|PDOException|Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if ($result === false) {
$this->error(__('No rows were inserted'));
}
$this->success();
}
/**
* 编辑
*
* @param $ids
* @return string
* @throws DbException
* @throws \think\Exception
*/
public function edit($ids = null)
{
$row = $this->model->get($ids);
if (!$row) {
$this->error(__('No Results were found'));
}
$adminIds = $this->getDataLimitAdminIds();
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
$this->error(__('You have no permission'));
}
if (false === $this->request->isPost()) {
$res=$row->toArray();
$seat=$res['seat'];
$seat=json_decode($seat,true);
$this->view->assign('row', $row);
$this->view->assign('seat', $seat);
return $this->view->fetch();
}
$params = $this->request->post('row/a');
print_r($params);return;
if (empty($params)) {
$this->error(__('Parameter %s can not be empty', ''));
}
$params = $this->preExcludeFields($params);
$result = false;
Db::startTrans();
try {
//是否采用模型验证
if ($this->modelValidate) {
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
$row->validateFailException()->validate($validate);
}
$result = $row->allowField(true)->save($params);
Db::commit();
} catch (ValidateException|PDOException|Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if (false === $result) {
$this->error(__('No rows were updated'));
}
$this->success();
}
}
... ...
<?php
return [
'Id' => 'ID',
'Car_model' => '车辆型号',
'License_plate' => '车牌号',
'Route_id' => '运行线路',
'Driver_id' => '司机',
'Seat' => '座位数',
'Colour' => '车辆颜色',
'Driver_license_img' => '驾照',
'Driving_license_img' => '行驶证',
'Reservation_time' => '预约时间',
'Start_time' => '发车时间',
'Create_time' => '创建时间',
'Driver.name' => '司机名称',
'Route.name' => '线路名称'
'Id' => 'ID',
'Car_model' => '车辆型号',
'License_plate' => '车牌号',
'Route_id' => '运行线路',
'Driver_id' => '司机',
'Seat' => '座位数',
'Colour' => '车辆颜色',
'Seat_id' => '座位价格',
'Reservation_time' => '预约时间',
'Start_time' => '发车时间',
'Create_time' => '创建时间',
'Route.name' => '线路名称',
'Driver.name' => '司机名称',
'Seat.name' => '座位名称'
];
... ...
<?php
return [
'Id' => 'ID',
'Name' => '座位名称',
'Seat_number' => '座位数量',
'Seat_number 0' => '五座',
'Seat_number 1' => '七座',
'Seat' => '座位详情'
];
... ...
... ... @@ -71,14 +71,20 @@ class Car extends Model
}
public function route()
{
return $this->belongsTo('Route', 'route_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function driver()
{
return $this->belongsTo('Driver', 'driver_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function route()
public function seat()
{
return $this->belongsTo('Route', 'route_id', 'id', [], 'LEFT')->setEagerlyType(0);
return $this->belongsTo('Seat', 'seat_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Seat extends Model
{
// 表名
protected $name = 'seat';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'seat_number_text'
];
public function getSeatNumberList()
{
return ['0' => __('Seat_number 0'), '1' => __('Seat_number 1')];
}
public function getSeatNumberTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['seat_number']) ? $data['seat_number'] : '');
$list = $this->getSeatNumberList();
return isset($list[$value]) ? $list[$value] : '';
}
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Seat extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
... ... @@ -37,27 +37,21 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Driver_license_img')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Seat_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-driver_license_img" class="form-control" name="row[driver_license_img]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Driving_license_img')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-driving_license_img" class="form-control" name="row[driving_license_img]" type="text">
<input id="c-seat_id" data-rule="required" data-source="seat/index" class="form-control selectpage" name="row[seat_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reservation_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reservation_time" class="form-control datetimepicker" data-date-format=" HH:mm" data-use-current="true" name="row[reservation_time]" type="text" value="{:date('H:i')}">
<input id="c-reservation_time" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[reservation_time]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-start_time" class="form-control datetimepicker" data-date-format=" HH:mm" data-use-current="true" name="row[start_time]" type="text" value="{:date('H:i')}">
<input id="c-start_time" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
... ...
... ... @@ -37,27 +37,21 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Driver_license_img')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Seat_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-driver_license_img" class="form-control" name="row[driver_license_img]" type="text" value="{$row.driver_license_img|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Driving_license_img')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-driving_license_img" class="form-control" name="row[driving_license_img]" type="text" value="{$row.driving_license_img|htmlentities}">
<input id="c-seat_id" data-rule="required" data-source="seat/index" class="form-control selectpage" name="row[seat_id]" type="text" value="{$row.seat_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reservation_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reservation_time" class="form-control datetimepicker" data-date-format=" HH:mm" data-use-current="true" name="row[reservation_time]" type="text" value="{:$row.reservation_time?datetime($row.reservation_time):''}">
<input id="c-reservation_time" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[reservation_time]" type="text" value="{:$row.reservation_time?datetime($row.reservation_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-start_time" class="form-control datetimepicker" data-date-format=" HH:mm" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
<input id="c-start_time" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
</div>
</div>
<div class="form-group">
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" class="form-control" name="row[name]" type="text">
</div>
</div>
<div class="form-group" id="seat_number">
<label class="control-label col-xs-12 col-sm-2">{:__('Seat_number')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios("row[seat_number]",["0"=>"五座","1"=>"七座"])}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Seat')}:</label>
</div>
<div class="form-group">
<div class="col-xs-3 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">座位名称:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_name" class="form-control" name="row[seat_name][]" type="text">
<input id="c-seat_no" style="display: none;" class="form-control" value="1" name="row[seat_no][]" type="text">
</div>
<label class="control-label col-xs-4 col-sm-1">价格:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_price" class="form-control" name="row[seat_price][]" type="text">
</div>
</div>
<div class="col-xs-3 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">座位名称:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_name" class="form-control" name="row[seat_name][]" type="text">
<input id="c-seat_no" style="display: none;" class="form-control" value="2" name="row[seat_no][]" type="text">
</div>
<label class="control-label col-xs-4 col-sm-1">价格:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_price" class="form-control" name="row[seat_price][]" type="text">
</div>
</div>
<div class="col-xs-3 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">座位名称:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_name" class="form-control" name="row[seat_name][]" type="text">
<input id="c-seat_no" style="display: none;" class="form-control" value="3" name="row[seat_no][]" type="text">
</div>
<label class="control-label col-xs-4 col-sm-1">价格:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_price" class="form-control" name="row[seat_price][]" type="text">
</div>
</div>
<div class="col-xs-3 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">座位名称:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_name" class="form-control" name="row[seat_name][]" type="text">
<input id="c-seat_no" style="display: none;" class="form-control" value="4" name="row[seat_no][]" type="text">
</div>
<label class="control-label col-xs-4 col-sm-1">价格:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_price" class="form-control" name="row[seat_price][]" type="text">
</div>
</div>
<div class="col-xs-3 col-sm-12" hidden id="seat5">
<label class="control-label col-xs-4 col-sm-2">座位名称:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_name5" class="form-control" name="row[seat_name][]" type="text">
<input id="c-seat_no" style="display: none;" class="form-control" value="5" name="row[seat_no][]" type="text">
</div>
<label class="control-label col-xs-4 col-sm-1">价格:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_price5" class="form-control" name="row[seat_price][]" type="text">
</div>
</div>
<div class="col-xs-3 col-sm-12" hidden id="seat6">
<label class="control-label col-xs-4 col-sm-2">座位名称:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_name6" class="form-control" name="row[seat_name][]" type="text">
<input id="c-seat_no" style="display: none;" class="form-control" value="6" name="row[seat_no][]" type="text">
</div>
<label class="control-label col-xs-4 col-sm-1">价格:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_price6" class="form-control" name="row[seat_price][]" type="text">
</div>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
</div>
</div>
<div class="form-group" id="seat_number">
<label class="control-label col-xs-12 col-sm-2">{:__('Seat_number')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_radios("row[seat_number]",["0"=>"五座","1"=>"七座"],$row['seat_number'])}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Seat')}:</label>
</div>
<div class="form-group">
{volist name="seat" id="vo" }
<div class="col-xs-3 col-sm-12" id="seat{$vo.seat_no}">
<label class="control-label col-xs-4 col-sm-2">座位名称:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_name" class="form-control" value="{$vo.seat_name}" name="row[seat_name][]" type="text">
<input id="c-seat_no" style="display: none;" class="form-control" value="6" name="row[seat_no][]" type="text">
</div>
<label class="control-label col-xs-4 col-sm-1">价格:</label>
<div class="col-xs-3 col-sm-4">
<input id="c-seat_price" class="form-control" value="{$vo.seat_price}" name="row[seat_price][]" type="text">
</div>
</div>
{/volist}
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('seat/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('seat/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('seat/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('seat/edit')}"
data-operate-del="{:$auth->check('seat/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -576,4 +576,39 @@ class Car extends Base
}
return $this->success("请求成功",$res);
}
/**
* 获取座位详情
* @return void
*/
public function car_seat(){
$car_id=$this->request->param("car_id");
//查询车辆信息
$car=Db::name("car")->where("id",$car_id)->find();
$seat=Db::name("seat")->where("id",$car['seat_id'])->find();
$seat['seat']=json_decode($seat['seat'],true);
//查询当日订单
$statr_time=strtotime(date("Y-m-d",time()));
$end_time=$statr_time+86400;
$order=Db::name("order")
->where("create_time",">",$statr_time)
->where("create_time","<",$end_time)
->where('car_id',$car_id)
->field("seat_no")
->select();
foreach ($order as $k=>$v){
$seat_no[$k]=$order[$k]["seat_no"];
}
foreach ($seat['seat'] as $k=>$v){
if(in_array($seat['seat'][$k]['seat_no'],$seat_no)){
$seat['seat'][$k]['is_sale']=1;
}else{
$seat['seat'][$k]['is_sale']=0;
}
}
return $this->success("请求成功",$seat);
}
}
\ No newline at end of file
... ...
... ... @@ -12,6 +12,21 @@ return [
'action_begin' => [
'epay',
],
'upload_config_init' => [
'qiniu',
],
'upload_delete' => [
'qiniu',
],
'upload_token' => [
'qiniu',
],
'app_init' => [
'qiniu',
],
'config_init' => [
'summernote',
],
],
'route' => [],
'priority' => [],
... ...
... ... @@ -28,7 +28,6 @@ return array (
'user' => '会员配置',
'example' => '示例分组',
'wxxcx' => '小程序配置',
'authentication_statement' => '车主认证声明',
),
'mail_type' => '1',
'mail_smtp_host' => 'smtp.qq.com',
... ... @@ -47,4 +46,5 @@ return array (
'wxxcx_AppSecret' => 'baf744d21875280a5e98611f66adaf91',
'content' => '111111111111111111111222222222',
'alarm_phone' => '13528348347',
'riding_instructions' => '',
);
... ...
/*!
*
* Super simple WYSIWYG editor v0.8.20
* https://summernote.org
*
*
* Copyright 2013- Alan Hong and contributors
* Summernote may be freely distributed under the MIT license.
*
* Date: 2021-10-14T21:15Z
*
*/
@font-face {
font-family: "summernote";
font-style: normal;
font-weight: 400;
font-display: auto;
src: url("../font/summernote.eot?#iefix") format("embedded-opentype"), url("../font/summernote.woff2") format("woff2"), url("../font/summernote.woff") format("woff"), url("../font/summernote.ttf") format("truetype");
}
[class^=note-icon]:before,
[class*=" note-icon"]:before {
display: inline-block;
font-family: "summernote";
font-style: normal;
font-size: inherit;
text-decoration: inherit;
text-rendering: auto;
text-transform: none;
vertical-align: middle;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
speak: none;
}
.note-icon-fw {
text-align: center;
width: 1.25em;
}
.note-icon-border {
border: solid 0.08em #eee;
border-radius: 0.1em;
padding: 0.2em 0.25em 0.15em;
}
.note-icon-pull-left {
float: left;
}
.note-icon-pull-right {
float: right;
}
.note-icon.note-icon-pull-left {
margin-right: 0.3em;
}
.note-icon.note-icon-pull-right {
margin-left: 0.3em;
}
.note-icon-align::before {
content: "\ea01";
}
.note-icon-align-center::before {
content: "\ea02";
}
.note-icon-align-indent::before {
content: "\ea03";
}
.note-icon-align-justify::before {
content: "\ea04";
}
.note-icon-align-left::before {
content: "\ea05";
}
.note-icon-align-outdent::before {
content: "\ea06";
}
.note-icon-align-right::before {
content: "\ea07";
}
.note-icon-arrow-circle-down::before {
content: "\ea08";
}
.note-icon-arrow-circle-left::before {
content: "\ea09";
}
.note-icon-arrow-circle-right::before {
content: "\ea0a";
}
.note-icon-arrow-circle-up::before {
content: "\ea0b";
}
.note-icon-arrows-alt::before {
content: "\ea0c";
}
.note-icon-arrows-h::before {
content: "\ea0d";
}
.note-icon-arrows-v::before {
content: "\ea0e";
}
.note-icon-bold::before {
content: "\ea0f";
}
.note-icon-caret::before {
content: "\ea10";
}
.note-icon-chain-broken::before {
content: "\ea11";
}
.note-icon-circle::before {
content: "\ea12";
}
.note-icon-close::before {
content: "\ea13";
}
.note-icon-code::before {
content: "\ea14";
}
.note-icon-col-after::before {
content: "\ea15";
}
.note-icon-col-before::before {
content: "\ea16";
}
.note-icon-col-remove::before {
content: "\ea17";
}
.note-icon-eraser::before {
content: "\ea18";
}
.note-icon-float-left::before {
content: "\ea19";
}
.note-icon-float-none::before {
content: "\ea1a";
}
.note-icon-float-right::before {
content: "\ea1b";
}
.note-icon-font::before {
content: "\ea1c";
}
.note-icon-frame::before {
content: "\ea1d";
}
.note-icon-italic::before {
content: "\ea1e";
}
.note-icon-link::before {
content: "\ea1f";
}
.note-icon-magic::before {
content: "\ea20";
}
.note-icon-menu-check::before {
content: "\ea21";
}
.note-icon-minus::before {
content: "\ea22";
}
.note-icon-orderedlist::before {
content: "\ea23";
}
.note-icon-pencil::before {
content: "\ea24";
}
.note-icon-picture::before {
content: "\ea25";
}
.note-icon-question::before {
content: "\ea26";
}
.note-icon-redo::before {
content: "\ea27";
}
.note-icon-rollback::before {
content: "\ea28";
}
.note-icon-row-above::before {
content: "\ea29";
}
.note-icon-row-below::before {
content: "\ea2a";
}
.note-icon-row-remove::before {
content: "\ea2b";
}
.note-icon-special-character::before {
content: "\ea2c";
}
.note-icon-square::before {
content: "\ea2d";
}
.note-icon-strikethrough::before {
content: "\ea2e";
}
.note-icon-subscript::before {
content: "\ea2f";
}
.note-icon-summernote::before {
content: "\ea30";
}
.note-icon-superscript::before {
content: "\ea31";
}
.note-icon-table::before {
content: "\ea32";
}
.note-icon-text-height::before {
content: "\ea33";
}
.note-icon-trash::before {
content: "\ea34";
}
.note-icon-underline::before {
content: "\ea35";
}
.note-icon-undo::before {
content: "\ea36";
}
.note-icon-unorderedlist::before {
content: "\ea37";
}
.note-icon-video::before {
content: "\ea38";
}
/* Theme Variables
------------------------------------------ */
/* Layout
------------------------------------------ */
.note-editor {
position: relative;
}
.note-editor .note-dropzone {
position: absolute;
display: none;
z-index: 100;
color: lightskyblue;
background-color: #fff;
opacity: 0.95;
}
.note-editor .note-dropzone .note-dropzone-message {
display: table-cell;
vertical-align: middle;
text-align: center;
font-size: 28px;
font-weight: 700;
}
.note-editor .note-dropzone.hover {
color: #098ddf;
}
.note-editor.dragover .note-dropzone {
display: table;
}
.note-editor .note-editing-area {
position: relative;
}
.note-editor .note-editing-area .note-editable {
outline: none;
}
.note-editor .note-editing-area .note-editable sup {
vertical-align: super;
}
.note-editor .note-editing-area .note-editable sub {
vertical-align: sub;
}
.note-editor .note-editing-area .note-editable img.note-float-left {
margin-right: 10px;
}
.note-editor .note-editing-area .note-editable img.note-float-right {
margin-left: 10px;
}
/* Frame mode layout
------------------------------------------ */
.note-editor.note-frame,
.note-editor.note-airframe {
border: 1px solid #00000032;
}
.note-editor.note-frame.codeview .note-editing-area .note-editable,
.note-editor.note-airframe.codeview .note-editing-area .note-editable {
display: none;
}
.note-editor.note-frame.codeview .note-editing-area .note-codable,
.note-editor.note-airframe.codeview .note-editing-area .note-codable {
display: block;
}
.note-editor.note-frame .note-editing-area,
.note-editor.note-airframe .note-editing-area {
overflow: hidden;
}
.note-editor.note-frame .note-editing-area .note-editable,
.note-editor.note-airframe .note-editing-area .note-editable {
padding: 10px;
overflow: auto;
word-wrap: break-word;
}
.note-editor.note-frame .note-editing-area .note-editable[contenteditable=false],
.note-editor.note-airframe .note-editing-area .note-editable[contenteditable=false] {
background-color: #8080801d;
}
.note-editor.note-frame .note-editing-area .note-codable,
.note-editor.note-airframe .note-editing-area .note-codable {
display: none;
width: 100%;
padding: 10px;
border: none;
box-shadow: none;
font-family: Menlo, Monaco, monospace, sans-serif;
font-size: 14px;
color: #ccc;
background-color: #222;
resize: none;
outline: none;
-ms-box-sizing: border-box;
box-sizing: border-box;
border-radius: 0;
margin-bottom: 0;
}
.note-editor.note-frame.fullscreen,
.note-editor.note-airframe.fullscreen {
position: fixed;
top: 0;
left: 0;
width: 100% !important;
z-index: 1050;
}
.note-editor.note-frame.fullscreen .note-resizebar,
.note-editor.note-airframe.fullscreen .note-resizebar {
display: none;
}
.note-editor.note-frame .note-status-output,
.note-editor.note-airframe .note-status-output {
display: block;
width: 100%;
font-size: 14px;
line-height: 1.42857143;
height: 20px;
margin-bottom: 0;
color: #000;
border: 0;
border-top: 1px solid #e2e2e2;
}
.note-editor.note-frame .note-status-output:empty,
.note-editor.note-airframe .note-status-output:empty {
height: 0;
border-top: 0 solid transparent;
}
.note-editor.note-frame .note-status-output .pull-right,
.note-editor.note-airframe .note-status-output .pull-right {
float: right !important;
}
.note-editor.note-frame .note-status-output .text-muted,
.note-editor.note-airframe .note-status-output .text-muted {
color: #777;
}
.note-editor.note-frame .note-status-output .text-primary,
.note-editor.note-airframe .note-status-output .text-primary {
color: #286090;
}
.note-editor.note-frame .note-status-output .text-success,
.note-editor.note-airframe .note-status-output .text-success {
color: #3c763d;
}
.note-editor.note-frame .note-status-output .text-info,
.note-editor.note-airframe .note-status-output .text-info {
color: #31708f;
}
.note-editor.note-frame .note-status-output .text-warning,
.note-editor.note-airframe .note-status-output .text-warning {
color: #8a6d3b;
}
.note-editor.note-frame .note-status-output .text-danger,
.note-editor.note-airframe .note-status-output .text-danger {
color: #a94442;
}
.note-editor.note-frame .note-status-output .alert,
.note-editor.note-airframe .note-status-output .alert {
margin: -7px 0 0 0;
padding: 7px 10px 2px 10px;
border-radius: 0;
color: #000;
background-color: #f5f5f5;
}
.note-editor.note-frame .note-status-output .alert .note-icon,
.note-editor.note-airframe .note-status-output .alert .note-icon {
margin-right: 5px;
}
.note-editor.note-frame .note-status-output .alert-success,
.note-editor.note-airframe .note-status-output .alert-success {
color: #3c763d !important;
background-color: #dff0d8 !important;
}
.note-editor.note-frame .note-status-output .alert-info,
.note-editor.note-airframe .note-status-output .alert-info {
color: #31708f !important;
background-color: #d9edf7 !important;
}
.note-editor.note-frame .note-status-output .alert-warning,
.note-editor.note-airframe .note-status-output .alert-warning {
color: #8a6d3b !important;
background-color: #fcf8e3 !important;
}
.note-editor.note-frame .note-status-output .alert-danger,
.note-editor.note-airframe .note-status-output .alert-danger {
color: #a94442 !important;
background-color: #f2dede !important;
}
.note-editor.note-frame .note-statusbar,
.note-editor.note-airframe .note-statusbar {
background-color: #8080801d;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top: 1px solid #00000032;
}
.note-editor.note-frame .note-statusbar .note-resizebar,
.note-editor.note-airframe .note-statusbar .note-resizebar {
padding-top: 1px;
height: 9px;
width: 100%;
cursor: ns-resize;
}
.note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar,
.note-editor.note-airframe .note-statusbar .note-resizebar .note-icon-bar {
width: 20px;
margin: 1px auto;
border-top: 1px solid #00000032;
}
.note-editor.note-frame .note-statusbar.locked .note-resizebar,
.note-editor.note-airframe .note-statusbar.locked .note-resizebar {
cursor: default;
}
.note-editor.note-frame .note-statusbar.locked .note-resizebar .note-icon-bar,
.note-editor.note-airframe .note-statusbar.locked .note-resizebar .note-icon-bar {
display: none;
}
.note-editor.note-frame .note-placeholder,
.note-editor.note-airframe .note-placeholder {
padding: 10px;
}
.note-editor.note-airframe {
border: 0;
}
.note-editor.note-airframe .note-editing-area .note-editable {
padding: 0;
}
/* Popover
------------------------------------------ */
.note-popover.popover {
display: none;
max-width: none;
}
.note-popover.popover .popover-content a {
display: inline-block;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
}
.note-popover.popover .arrow {
left: 20px !important;
}
/* Popover and Toolbar (Button container)
------------------------------------------ */
.note-toolbar {
position: relative;
}
.note-popover .popover-content, .note-editor .note-toolbar {
margin: 0;
padding: 0 0 5px 5px;
}
.note-popover .popover-content > .note-btn-group, .note-editor .note-toolbar > .note-btn-group {
margin-top: 5px;
margin-left: 0;
margin-right: 5px;
}
.note-popover .popover-content > .note-btn-group, .note-editor .note-toolbar > .note-btn-group .note-btn {
background-color: #fff;
}
.note-popover .popover-content .note-btn-group .note-table, .note-editor .note-toolbar .note-btn-group .note-table {
min-width: 0;
padding: 5px;
}
.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker, .note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker {
font-size: 18px;
}
.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher, .note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher {
position: absolute !important;
z-index: 3;
width: 10em;
height: 10em;
cursor: pointer;
}
.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted, .note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted {
position: relative !important;
z-index: 1;
width: 5em;
height: 5em;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat;
}
.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted, .note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted {
position: absolute !important;
z-index: 2;
width: 1em;
height: 1em;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat;
}
.note-popover .popover-content .note-style .dropdown-style blockquote, .note-popover .popover-content .note-style .dropdown-style pre, .note-editor .note-toolbar .note-style .dropdown-style blockquote, .note-editor .note-toolbar .note-style .dropdown-style pre {
margin: 0;
padding: 5px 10px;
}
.note-popover .popover-content .note-style .dropdown-style h1, .note-popover .popover-content .note-style .dropdown-style h2, .note-popover .popover-content .note-style .dropdown-style h3, .note-popover .popover-content .note-style .dropdown-style h4, .note-popover .popover-content .note-style .dropdown-style h5, .note-popover .popover-content .note-style .dropdown-style h6, .note-popover .popover-content .note-style .dropdown-style p, .note-editor .note-toolbar .note-style .dropdown-style h1, .note-editor .note-toolbar .note-style .dropdown-style h2, .note-editor .note-toolbar .note-style .dropdown-style h3, .note-editor .note-toolbar .note-style .dropdown-style h4, .note-editor .note-toolbar .note-style .dropdown-style h5, .note-editor .note-toolbar .note-style .dropdown-style h6, .note-editor .note-toolbar .note-style .dropdown-style p {
margin: 0;
padding: 0;
}
.note-popover .popover-content .note-color-all .note-dropdown-menu, .note-editor .note-toolbar .note-color-all .note-dropdown-menu {
min-width: 337px;
}
.note-popover .popover-content .note-color .dropdown-toggle, .note-editor .note-toolbar .note-color .dropdown-toggle {
width: 20px;
padding-left: 5px;
}
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette {
display: inline-block;
margin: 0;
width: 160px;
}
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette:first-child, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette:first-child {
margin: 0 5px;
}
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-palette-title, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-palette-title {
font-size: 12px;
margin: 2px 7px;
text-align: center;
border-bottom: 1px solid #eee;
}
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-reset,
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-reset,
.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select {
font-size: 11px;
margin: 3px;
padding: 0 3px;
cursor: pointer;
width: 100%;
border-radius: 5px;
}
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-reset:hover,
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select:hover, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-reset:hover,
.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select:hover {
background: #eee;
}
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-row, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-row {
height: 20px;
}
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select-btn, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select-btn {
display: none;
}
.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-holder-custom .note-color-btn, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-holder-custom .note-color-btn {
border: 1px solid #eee;
}
.note-popover .popover-content .note-para .note-dropdown-menu, .note-editor .note-toolbar .note-para .note-dropdown-menu {
min-width: 228px;
padding: 5px;
}
.note-popover .popover-content .note-para .note-dropdown-menu > div + div, .note-editor .note-toolbar .note-para .note-dropdown-menu > div + div {
margin-left: 5px;
}
.note-popover .popover-content .note-dropdown-menu, .note-editor .note-toolbar .note-dropdown-menu {
min-width: 160px;
}
.note-popover .popover-content .note-dropdown-menu.right, .note-editor .note-toolbar .note-dropdown-menu.right {
right: 0;
left: auto;
}
.note-popover .popover-content .note-dropdown-menu.right::before, .note-editor .note-toolbar .note-dropdown-menu.right::before {
right: 9px;
left: auto !important;
}
.note-popover .popover-content .note-dropdown-menu.right::after, .note-editor .note-toolbar .note-dropdown-menu.right::after {
right: 10px;
left: auto !important;
}
.note-popover .popover-content .note-dropdown-menu.note-check a i, .note-editor .note-toolbar .note-dropdown-menu.note-check a i {
color: deepskyblue;
visibility: hidden;
}
.note-popover .popover-content .note-dropdown-menu.note-check a.checked i, .note-editor .note-toolbar .note-dropdown-menu.note-check a.checked i {
visibility: visible;
}
.note-popover .popover-content .note-fontsize-10, .note-editor .note-toolbar .note-fontsize-10 {
font-size: 10px;
}
.note-popover .popover-content .note-color-palette, .note-editor .note-toolbar .note-color-palette {
line-height: 1;
}
.note-popover .popover-content .note-color-palette div .note-color-btn, .note-editor .note-toolbar .note-color-palette div .note-color-btn {
width: 20px;
height: 20px;
padding: 0;
margin: 0;
border: 0;
border-radius: 0;
}
.note-popover .popover-content .note-color-palette div .note-color-btn:hover, .note-editor .note-toolbar .note-color-palette div .note-color-btn:hover {
transform: scale(1.2);
transition: all 0.2s;
}
/* Dialog
------------------------------------------ */
.note-modal .modal-dialog {
outline: 0;
border-radius: 5px;
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
}
.note-modal .form-group {
margin-left: 0;
margin-right: 0;
}
.note-modal .note-modal-form {
margin: 0;
}
.note-modal .note-image-dialog .note-dropzone {
min-height: 100px;
font-size: 30px;
line-height: 4;
color: lightgray;
text-align: center;
border: 4px dashed lightgray;
margin-bottom: 10px;
}
@-moz-document url-prefix() {
.note-modal .note-image-input {
height: auto;
}
}
/* Placeholder
------------------------------------------ */
.note-placeholder {
position: absolute;
display: none;
color: gray;
}
/* Handle
------------------------------------------ */
.note-handle .note-control-selection {
position: absolute;
display: none;
border: 1px solid #000;
}
.note-handle .note-control-selection > div {
position: absolute;
}
.note-handle .note-control-selection .note-control-selection-bg {
width: 100%;
height: 100%;
background-color: #000;
-webkit-opacity: 0.3;
-khtml-opacity: 0.3;
-moz-opacity: 0.3;
opacity: 0.3;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30);
filter: alpha(opacity=30);
}
.note-handle .note-control-selection .note-control-handle, .note-handle .note-control-selection .note-control-sizing, .note-handle .note-control-selection .note-control-holder {
width: 7px;
height: 7px;
border: 1px solid #000;
}
.note-handle .note-control-selection .note-control-sizing {
background-color: #000;
}
.note-handle .note-control-selection .note-control-nw {
top: -5px;
left: -5px;
border-right: none;
border-bottom: none;
}
.note-handle .note-control-selection .note-control-ne {
top: -5px;
right: -5px;
border-bottom: none;
border-left: none;
}
.note-handle .note-control-selection .note-control-sw {
bottom: -5px;
left: -5px;
border-top: none;
border-right: none;
}
.note-handle .note-control-selection .note-control-se {
right: -5px;
bottom: -5px;
cursor: se-resize;
}
.note-handle .note-control-selection .note-control-se.note-control-holder {
cursor: default;
border-top: none;
border-left: none;
}
.note-handle .note-control-selection .note-control-selection-info {
right: 0;
bottom: 0;
padding: 5px;
margin: 5px;
color: #fff;
background-color: #000;
font-size: 12px;
border-radius: 5px;
-webkit-opacity: 0.7;
-khtml-opacity: 0.7;
-moz-opacity: 0.7;
opacity: 0.7;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
filter: alpha(opacity=70);
}
.note-hint-popover {
min-width: 100px;
padding: 2px;
}
.note-hint-popover .popover-content {
padding: 3px;
max-height: 150px;
overflow: auto;
}
.note-hint-popover .popover-content .note-hint-group .note-hint-item {
display: block !important;
padding: 3px;
}
.note-hint-popover .popover-content .note-hint-group .note-hint-item.active, .note-hint-popover .popover-content .note-hint-group .note-hint-item:hover {
display: block;
clear: both;
font-weight: 400;
line-height: 1.4;
color: white;
white-space: nowrap;
text-decoration: none;
background-color: #428bca;
outline: 0;
cursor: pointer;
}
/* Handle
------------------------------------------ */
html .note-fullscreen-body, body .note-fullscreen-body {
overflow: hidden !important;
}
body.darktheme .note-popover .popover-content > .note-btn-group, body.darktheme .note-editor .note-toolbar > .note-btn-group .note-btn {
background: #262626;
color: #ccc;
}
\ No newline at end of file
... ...
/*!
*
* Super simple WYSIWYG editor v0.8.20
* https://summernote.org
*
*
* Copyright 2013- Alan Hong and contributors
* Summernote may be freely distributed under the MIT license.
*
* Date: 2021-10-14T21:15Z
*
*/@font-face{font-family:"summernote";font-style:normal;font-weight:400;font-display:auto;src:url("../font/summernote.eot?#iefix") format("embedded-opentype"),url("../font/summernote.woff2") format("woff2"),url("../font/summernote.woff") format("woff"),url("../font/summernote.ttf") format("truetype")}[class^=note-icon]:before,[class*=" note-icon"]:before{display:inline-block;font-family:"summernote";font-style:normal;font-size:inherit;text-decoration:inherit;text-rendering:auto;text-transform:none;vertical-align:middle;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;speak:none}.note-icon-fw{text-align:center;width:1.25em}.note-icon-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.note-icon-pull-left{float:left}.note-icon-pull-right{float:right}.note-icon.note-icon-pull-left{margin-right:.3em}.note-icon.note-icon-pull-right{margin-left:.3em}.note-icon-align::before{content:"\ea01"}.note-icon-align-center::before{content:"\ea02"}.note-icon-align-indent::before{content:"\ea03"}.note-icon-align-justify::before{content:"\ea04"}.note-icon-align-left::before{content:"\ea05"}.note-icon-align-outdent::before{content:"\ea06"}.note-icon-align-right::before{content:"\ea07"}.note-icon-arrow-circle-down::before{content:"\ea08"}.note-icon-arrow-circle-left::before{content:"\ea09"}.note-icon-arrow-circle-right::before{content:"\ea0a"}.note-icon-arrow-circle-up::before{content:"\ea0b"}.note-icon-arrows-alt::before{content:"\ea0c"}.note-icon-arrows-h::before{content:"\ea0d"}.note-icon-arrows-v::before{content:"\ea0e"}.note-icon-bold::before{content:"\ea0f"}.note-icon-caret::before{content:"\ea10"}.note-icon-chain-broken::before{content:"\ea11"}.note-icon-circle::before{content:"\ea12"}.note-icon-close::before{content:"\ea13"}.note-icon-code::before{content:"\ea14"}.note-icon-col-after::before{content:"\ea15"}.note-icon-col-before::before{content:"\ea16"}.note-icon-col-remove::before{content:"\ea17"}.note-icon-eraser::before{content:"\ea18"}.note-icon-float-left::before{content:"\ea19"}.note-icon-float-none::before{content:"\ea1a"}.note-icon-float-right::before{content:"\ea1b"}.note-icon-font::before{content:"\ea1c"}.note-icon-frame::before{content:"\ea1d"}.note-icon-italic::before{content:"\ea1e"}.note-icon-link::before{content:"\ea1f"}.note-icon-magic::before{content:"\ea20"}.note-icon-menu-check::before{content:"\ea21"}.note-icon-minus::before{content:"\ea22"}.note-icon-orderedlist::before{content:"\ea23"}.note-icon-pencil::before{content:"\ea24"}.note-icon-picture::before{content:"\ea25"}.note-icon-question::before{content:"\ea26"}.note-icon-redo::before{content:"\ea27"}.note-icon-rollback::before{content:"\ea28"}.note-icon-row-above::before{content:"\ea29"}.note-icon-row-below::before{content:"\ea2a"}.note-icon-row-remove::before{content:"\ea2b"}.note-icon-special-character::before{content:"\ea2c"}.note-icon-square::before{content:"\ea2d"}.note-icon-strikethrough::before{content:"\ea2e"}.note-icon-subscript::before{content:"\ea2f"}.note-icon-summernote::before{content:"\ea30"}.note-icon-superscript::before{content:"\ea31"}.note-icon-table::before{content:"\ea32"}.note-icon-text-height::before{content:"\ea33"}.note-icon-trash::before{content:"\ea34"}.note-icon-underline::before{content:"\ea35"}.note-icon-undo::before{content:"\ea36"}.note-icon-unorderedlist::before{content:"\ea37"}.note-icon-video::before{content:"\ea38"}.note-editor{position:relative}.note-editor .note-dropzone{position:absolute;display:none;z-index:100;color:lightskyblue;background-color:#fff;opacity:.95}.note-editor .note-dropzone .note-dropzone-message{display:table-cell;vertical-align:middle;text-align:center;font-size:28px;font-weight:700}.note-editor .note-dropzone.hover{color:#098ddf}.note-editor.dragover .note-dropzone{display:table}.note-editor .note-editing-area{position:relative}.note-editor .note-editing-area .note-editable{outline:0}.note-editor .note-editing-area .note-editable sup{vertical-align:super}.note-editor .note-editing-area .note-editable sub{vertical-align:sub}.note-editor .note-editing-area .note-editable img.note-float-left{margin-right:10px}.note-editor .note-editing-area .note-editable img.note-float-right{margin-left:10px}.note-editor.note-frame,.note-editor.note-airframe{border:1px solid #00000032}.note-editor.note-frame.codeview .note-editing-area .note-editable,.note-editor.note-airframe.codeview .note-editing-area .note-editable{display:none}.note-editor.note-frame.codeview .note-editing-area .note-codable,.note-editor.note-airframe.codeview .note-editing-area .note-codable{display:block}.note-editor.note-frame .note-editing-area,.note-editor.note-airframe .note-editing-area{overflow:hidden}.note-editor.note-frame .note-editing-area .note-editable,.note-editor.note-airframe .note-editing-area .note-editable{padding:10px;overflow:auto;word-wrap:break-word}.note-editor.note-frame .note-editing-area .note-editable[contenteditable=false],.note-editor.note-airframe .note-editing-area .note-editable[contenteditable=false]{background-color:#8080801d}.note-editor.note-frame .note-editing-area .note-codable,.note-editor.note-airframe .note-editing-area .note-codable{display:none;width:100%;padding:10px;border:0;box-shadow:none;font-family:Menlo,Monaco,monospace,sans-serif;font-size:14px;color:#ccc;background-color:#222;resize:none;outline:0;-ms-box-sizing:border-box;box-sizing:border-box;border-radius:0;margin-bottom:0}.note-editor.note-frame.fullscreen,.note-editor.note-airframe.fullscreen{position:fixed;top:0;left:0;width:100% !important;z-index:1050}.note-editor.note-frame.fullscreen .note-resizebar,.note-editor.note-airframe.fullscreen .note-resizebar{display:none}.note-editor.note-frame .note-status-output,.note-editor.note-airframe .note-status-output{display:block;width:100%;font-size:14px;line-height:1.42857143;height:20px;margin-bottom:0;color:#000;border:0;border-top:1px solid #e2e2e2}.note-editor.note-frame .note-status-output:empty,.note-editor.note-airframe .note-status-output:empty{height:0;border-top:0 solid transparent}.note-editor.note-frame .note-status-output .pull-right,.note-editor.note-airframe .note-status-output .pull-right{float:right !important}.note-editor.note-frame .note-status-output .text-muted,.note-editor.note-airframe .note-status-output .text-muted{color:#777}.note-editor.note-frame .note-status-output .text-primary,.note-editor.note-airframe .note-status-output .text-primary{color:#286090}.note-editor.note-frame .note-status-output .text-success,.note-editor.note-airframe .note-status-output .text-success{color:#3c763d}.note-editor.note-frame .note-status-output .text-info,.note-editor.note-airframe .note-status-output .text-info{color:#31708f}.note-editor.note-frame .note-status-output .text-warning,.note-editor.note-airframe .note-status-output .text-warning{color:#8a6d3b}.note-editor.note-frame .note-status-output .text-danger,.note-editor.note-airframe .note-status-output .text-danger{color:#a94442}.note-editor.note-frame .note-status-output .alert,.note-editor.note-airframe .note-status-output .alert{margin:-7px 0 0 0;padding:7px 10px 2px 10px;border-radius:0;color:#000;background-color:#f5f5f5}.note-editor.note-frame .note-status-output .alert .note-icon,.note-editor.note-airframe .note-status-output .alert .note-icon{margin-right:5px}.note-editor.note-frame .note-status-output .alert-success,.note-editor.note-airframe .note-status-output .alert-success{color:#3c763d !important;background-color:#dff0d8 !important}.note-editor.note-frame .note-status-output .alert-info,.note-editor.note-airframe .note-status-output .alert-info{color:#31708f !important;background-color:#d9edf7 !important}.note-editor.note-frame .note-status-output .alert-warning,.note-editor.note-airframe .note-status-output .alert-warning{color:#8a6d3b !important;background-color:#fcf8e3 !important}.note-editor.note-frame .note-status-output .alert-danger,.note-editor.note-airframe .note-status-output .alert-danger{color:#a94442 !important;background-color:#f2dede !important}.note-editor.note-frame .note-statusbar,.note-editor.note-airframe .note-statusbar{background-color:#8080801d;border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top:1px solid #00000032}.note-editor.note-frame .note-statusbar .note-resizebar,.note-editor.note-airframe .note-statusbar .note-resizebar{padding-top:1px;height:9px;width:100%;cursor:ns-resize}.note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar,.note-editor.note-airframe .note-statusbar .note-resizebar .note-icon-bar{width:20px;margin:1px auto;border-top:1px solid #00000032}.note-editor.note-frame .note-statusbar.locked .note-resizebar,.note-editor.note-airframe .note-statusbar.locked .note-resizebar{cursor:default}.note-editor.note-frame .note-statusbar.locked .note-resizebar .note-icon-bar,.note-editor.note-airframe .note-statusbar.locked .note-resizebar .note-icon-bar{display:none}.note-editor.note-frame .note-placeholder,.note-editor.note-airframe .note-placeholder{padding:10px}.note-editor.note-airframe{border:0}.note-editor.note-airframe .note-editing-area .note-editable{padding:0}.note-popover.popover{display:none;max-width:none}.note-popover.popover .popover-content a{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}.note-popover.popover .arrow{left:20px !important}.note-toolbar{position:relative}.note-popover .popover-content,.note-editor .note-toolbar{margin:0;padding:0 0 5px 5px}.note-popover .popover-content>.note-btn-group,.note-editor .note-toolbar>.note-btn-group{margin-top:5px;margin-left:0;margin-right:5px}.note-popover .popover-content>.note-btn-group,.note-editor .note-toolbar>.note-btn-group .note-btn{background-color:#fff}.note-popover .popover-content .note-btn-group .note-table,.note-editor .note-toolbar .note-btn-group .note-table{min-width:0;padding:5px}.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker,.note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker{font-size:18px}.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher,.note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher{position:absolute !important;z-index:3;width:10em;height:10em;cursor:pointer}.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted,.note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted{position:relative !important;z-index:1;width:5em;height:5em;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat}.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted,.note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted{position:absolute !important;z-index:2;width:1em;height:1em;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat}.note-popover .popover-content .note-style .dropdown-style blockquote,.note-popover .popover-content .note-style .dropdown-style pre,.note-editor .note-toolbar .note-style .dropdown-style blockquote,.note-editor .note-toolbar .note-style .dropdown-style pre{margin:0;padding:5px 10px}.note-popover .popover-content .note-style .dropdown-style h1,.note-popover .popover-content .note-style .dropdown-style h2,.note-popover .popover-content .note-style .dropdown-style h3,.note-popover .popover-content .note-style .dropdown-style h4,.note-popover .popover-content .note-style .dropdown-style h5,.note-popover .popover-content .note-style .dropdown-style h6,.note-popover .popover-content .note-style .dropdown-style p,.note-editor .note-toolbar .note-style .dropdown-style h1,.note-editor .note-toolbar .note-style .dropdown-style h2,.note-editor .note-toolbar .note-style .dropdown-style h3,.note-editor .note-toolbar .note-style .dropdown-style h4,.note-editor .note-toolbar .note-style .dropdown-style h5,.note-editor .note-toolbar .note-style .dropdown-style h6,.note-editor .note-toolbar .note-style .dropdown-style p{margin:0;padding:0}.note-popover .popover-content .note-color-all .note-dropdown-menu,.note-editor .note-toolbar .note-color-all .note-dropdown-menu{min-width:337px}.note-popover .popover-content .note-color .dropdown-toggle,.note-editor .note-toolbar .note-color .dropdown-toggle{width:20px;padding-left:5px}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette{display:inline-block;margin:0;width:160px}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette:first-child,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette:first-child{margin:0 5px}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-palette-title,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-palette-title{font-size:12px;margin:2px 7px;text-align:center;border-bottom:1px solid #eee}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-reset,.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-reset,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select{font-size:11px;margin:3px;padding:0 3px;cursor:pointer;width:100%;border-radius:5px}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-reset:hover,.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select:hover,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-reset:hover,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select:hover{background:#eee}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-row,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-row{height:20px}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select-btn,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select-btn{display:none}.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-holder-custom .note-color-btn,.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-holder-custom .note-color-btn{border:1px solid #eee}.note-popover .popover-content .note-para .note-dropdown-menu,.note-editor .note-toolbar .note-para .note-dropdown-menu{min-width:228px;padding:5px}.note-popover .popover-content .note-para .note-dropdown-menu>div+div,.note-editor .note-toolbar .note-para .note-dropdown-menu>div+div{margin-left:5px}.note-popover .popover-content .note-dropdown-menu,.note-editor .note-toolbar .note-dropdown-menu{min-width:160px}.note-popover .popover-content .note-dropdown-menu.right,.note-editor .note-toolbar .note-dropdown-menu.right{right:0;left:auto}.note-popover .popover-content .note-dropdown-menu.right::before,.note-editor .note-toolbar .note-dropdown-menu.right::before{right:9px;left:auto !important}.note-popover .popover-content .note-dropdown-menu.right::after,.note-editor .note-toolbar .note-dropdown-menu.right::after{right:10px;left:auto !important}.note-popover .popover-content .note-dropdown-menu.note-check a i,.note-editor .note-toolbar .note-dropdown-menu.note-check a i{color:deepskyblue;visibility:hidden}.note-popover .popover-content .note-dropdown-menu.note-check a.checked i,.note-editor .note-toolbar .note-dropdown-menu.note-check a.checked i{visibility:visible}.note-popover .popover-content .note-fontsize-10,.note-editor .note-toolbar .note-fontsize-10{font-size:10px}.note-popover .popover-content .note-color-palette,.note-editor .note-toolbar .note-color-palette{line-height:1}.note-popover .popover-content .note-color-palette div .note-color-btn,.note-editor .note-toolbar .note-color-palette div .note-color-btn{width:20px;height:20px;padding:0;margin:0;border:0;border-radius:0}.note-popover .popover-content .note-color-palette div .note-color-btn:hover,.note-editor .note-toolbar .note-color-palette div .note-color-btn:hover{transform:scale(1.2);transition:all .2s}.note-modal .modal-dialog{outline:0;border-radius:5px;box-shadow:0 3px 9px rgba(0,0,0,0.5)}.note-modal .form-group{margin-left:0;margin-right:0}.note-modal .note-modal-form{margin:0}.note-modal .note-image-dialog .note-dropzone{min-height:100px;font-size:30px;line-height:4;color:lightgray;text-align:center;border:4px dashed lightgray;margin-bottom:10px}@-moz-document url-prefix(){.note-modal .note-image-input{height:auto}}.note-placeholder{position:absolute;display:none;color:gray}.note-handle .note-control-selection{position:absolute;display:none;border:1px solid #000}.note-handle .note-control-selection>div{position:absolute}.note-handle .note-control-selection .note-control-selection-bg{width:100%;height:100%;background-color:#000;-webkit-opacity:.3;-khtml-opacity:.3;-moz-opacity:.3;opacity:.3;-ms-filter:alpha(opacity=30);filter:alpha(opacity=30)}.note-handle .note-control-selection .note-control-handle,.note-handle .note-control-selection .note-control-sizing,.note-handle .note-control-selection .note-control-holder{width:7px;height:7px;border:1px solid #000}.note-handle .note-control-selection .note-control-sizing{background-color:#000}.note-handle .note-control-selection .note-control-nw{top:-5px;left:-5px;border-right:0;border-bottom:0}.note-handle .note-control-selection .note-control-ne{top:-5px;right:-5px;border-bottom:0;border-left:0}.note-handle .note-control-selection .note-control-sw{bottom:-5px;left:-5px;border-top:0;border-right:0}.note-handle .note-control-selection .note-control-se{right:-5px;bottom:-5px;cursor:se-resize}.note-handle .note-control-selection .note-control-se.note-control-holder{cursor:default;border-top:0;border-left:0}.note-handle .note-control-selection .note-control-selection-info{right:0;bottom:0;padding:5px;margin:5px;color:#fff;background-color:#000;font-size:12px;border-radius:5px;-webkit-opacity:.7;-khtml-opacity:.7;-moz-opacity:.7;opacity:.7;-ms-filter:alpha(opacity=70);filter:alpha(opacity=70)}.note-hint-popover{min-width:100px;padding:2px}.note-hint-popover .popover-content{padding:3px;max-height:150px;overflow:auto}.note-hint-popover .popover-content .note-hint-group .note-hint-item{display:block !important;padding:3px}.note-hint-popover .popover-content .note-hint-group .note-hint-item.active,.note-hint-popover .popover-content .note-hint-group .note-hint-item:hover{display:block;clear:both;font-weight:400;line-height:1.4;color:white;white-space:nowrap;text-decoration:none;background-color:#428bca;outline:0;cursor:pointer}html .note-fullscreen-body,body .note-fullscreen-body{overflow:hidden !important}body.darktheme .note-popover .popover-content>.note-btn-group,body.darktheme .note-editor .note-toolbar>.note-btn-group .note-btn{background:#262626;color:#ccc}
\ No newline at end of file
... ...
/*!
*
* Super simple WYSIWYG editor v0.8.20
* https://summernote.org
*
*
* Copyright 2013- Alan Hong and contributors
* Summernote may be freely distributed under the MIT license.
*
* Date: 2021-10-14T21:15Z
*
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(self, function() {
return /******/ (() => { // webpackBootstrap
var __webpack_exports__ = {};
(function ($) {
$.extend($.summernote.lang, {
'zh-CN': {
font: {
bold: '粗体',
italic: '斜体',
underline: '下划线',
clear: '清除格式',
height: '行高',
name: '字体',
strikethrough: '删除线',
subscript: '下标',
superscript: '上标',
size: '字号'
},
image: {
image: '图片',
insert: '插入图片',
resizeFull: '缩放至 100%',
resizeHalf: '缩放至 50%',
resizeQuarter: '缩放至 25%',
floatLeft: '靠左浮动',
floatRight: '靠右浮动',
floatNone: '取消浮动',
shapeRounded: '形状: 圆角',
shapeCircle: '形状: 圆',
shapeThumbnail: '形状: 缩略图',
shapeNone: '形状: 无',
dragImageHere: '将图片拖拽至此处',
dropImage: '拖拽图片或文本',
selectFromFiles: '从本地上传',
maximumFileSize: '文件大小最大值',
maximumFileSizeError: '文件大小超出最大值。',
url: '图片地址',
remove: '移除图片',
original: '原始图片'
},
video: {
video: '视频',
videoLink: '视频链接',
insert: '插入视频',
url: '视频地址',
providers: '(视频地址)'
},
link: {
link: '链接',
insert: '插入链接',
unlink: '去除链接',
edit: '编辑链接',
textToDisplay: '显示文本',
url: '链接地址',
openInNewWindow: '在新窗口打开'
},
table: {
table: '表格',
addRowAbove: '在上方插入行',
addRowBelow: '在下方插入行',
addColLeft: '在左侧插入列',
addColRight: '在右侧插入列',
delRow: '删除行',
delCol: '删除列',
delTable: '删除表格'
},
hr: {
insert: '水平线'
},
style: {
style: '样式',
p: '普通',
blockquote: '引用',
pre: '代码',
h1: '标题 1',
h2: '标题 2',
h3: '标题 3',
h4: '标题 4',
h5: '标题 5',
h6: '标题 6'
},
lists: {
unordered: '无序列表',
ordered: '有序列表'
},
options: {
help: '帮助',
fullscreen: '全屏',
codeview: '源代码'
},
paragraph: {
paragraph: '段落',
outdent: '减少缩进',
indent: '增加缩进',
left: '左对齐',
center: '居中对齐',
right: '右对齐',
justify: '两端对齐'
},
color: {
recent: '最近使用',
more: '更多',
background: '背景',
foreground: '前景',
transparent: '透明',
setTransparent: '透明',
reset: '重置',
resetToDefault: '默认'
},
shortcut: {
shortcuts: '快捷键',
close: '关闭',
textFormatting: '文本格式',
action: '动作',
paragraphFormatting: '段落格式',
documentStyle: '文档样式',
extraKeys: '额外按键'
},
help: {
insertParagraph: '插入段落',
undo: '撤销',
redo: '重做',
tab: '增加缩进',
untab: '减少缩进',
bold: '粗体',
italic: '斜体',
underline: '下划线',
strikethrough: '删除线',
removeFormat: '清除格式',
justifyLeft: '左对齐',
justifyCenter: '居中对齐',
justifyRight: '右对齐',
justifyFull: '两端对齐',
insertUnorderedList: '无序列表',
insertOrderedList: '有序列表',
outdent: '减少缩进',
indent: '增加缩进',
formatPara: '设置选中内容样式为 普通',
formatH1: '设置选中内容样式为 标题1',
formatH2: '设置选中内容样式为 标题2',
formatH3: '设置选中内容样式为 标题3',
formatH4: '设置选中内容样式为 标题4',
formatH5: '设置选中内容样式为 标题5',
formatH6: '设置选中内容样式为 标题6',
insertHorizontalRule: '插入水平线',
'linkDialog.show': '显示链接对话框'
},
history: {
undo: '撤销',
redo: '重做'
},
specialChar: {
specialChar: '特殊字符',
select: '选取特殊字符'
}
}
});
})(jQuery);
/******/ return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=summernote-zh-CN.js.map
... ...
/*! Summernote v0.8.20 | (c) 2013- Alan Hong and contributors | MIT license */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(function(){return(e=jQuery).extend(e.summernote.lang,{"zh-CN":{font:{bold:"粗体",italic:"斜体",underline:"下划线",clear:"清除格式",height:"行高",name:"字体",strikethrough:"删除线",subscript:"下标",superscript:"上标",size:"字号"},image:{image:"图片",insert:"插入图片",resizeFull:"缩放至 100%",resizeHalf:"缩放至 50%",resizeQuarter:"缩放至 25%",floatLeft:"靠左浮动",floatRight:"靠右浮动",floatNone:"取消浮动",shapeRounded:"形状: 圆角",shapeCircle:"形状: 圆",shapeThumbnail:"形状: 缩略图",shapeNone:"形状: 无",dragImageHere:"将图片拖拽至此处",dropImage:"拖拽图片或文本",selectFromFiles:"从本地上传",maximumFileSize:"文件大小最大值",maximumFileSizeError:"文件大小超出最大值。",url:"图片地址",remove:"移除图片",original:"原始图片"},video:{video:"视频",videoLink:"视频链接",insert:"插入视频",url:"视频地址",providers:"(视频地址)"},link:{link:"链接",insert:"插入链接",unlink:"去除链接",edit:"编辑链接",textToDisplay:"显示文本",url:"链接地址",openInNewWindow:"在新窗口打开"},table:{table:"表格",addRowAbove:"在上方插入行",addRowBelow:"在下方插入行",addColLeft:"在左侧插入列",addColRight:"在右侧插入列",delRow:"删除行",delCol:"删除列",delTable:"删除表格"},hr:{insert:"水平线"},style:{style:"样式",p:"普通",blockquote:"引用",pre:"代码",h1:"标题 1",h2:"标题 2",h3:"标题 3",h4:"标题 4",h5:"标题 5",h6:"标题 6"},lists:{unordered:"无序列表",ordered:"有序列表"},options:{help:"帮助",fullscreen:"全屏",codeview:"源代码"},paragraph:{paragraph:"段落",outdent:"减少缩进",indent:"增加缩进",left:"左对齐",center:"居中对齐",right:"右对齐",justify:"两端对齐"},color:{recent:"最近使用",more:"更多",background:"背景",foreground:"前景",transparent:"透明",setTransparent:"透明",reset:"重置",resetToDefault:"默认"},shortcut:{shortcuts:"快捷键",close:"关闭",textFormatting:"文本格式",action:"动作",paragraphFormatting:"段落格式",documentStyle:"文档样式",extraKeys:"额外按键"},help:{insertParagraph:"插入段落",undo:"撤销",redo:"重做",tab:"增加缩进",untab:"减少缩进",bold:"粗体",italic:"斜体",underline:"下划线",strikethrough:"删除线",removeFormat:"清除格式",justifyLeft:"左对齐",justifyCenter:"居中对齐",justifyRight:"右对齐",justifyFull:"两端对齐",insertUnorderedList:"无序列表",insertOrderedList:"有序列表",outdent:"减少缩进",indent:"增加缩进",formatPara:"设置选中内容样式为 普通",formatH1:"设置选中内容样式为 标题1",formatH2:"设置选中内容样式为 标题2",formatH3:"设置选中内容样式为 标题3",formatH4:"设置选中内容样式为 标题4",formatH5:"设置选中内容样式为 标题5",formatH6:"设置选中内容样式为 标题6",insertHorizontalRule:"插入水平线","linkDialog.show":"显示链接对话框"},history:{undo:"撤销",redo:"重做"},specialChar:{specialChar:"特殊字符",select:"选取特殊字符"}}}),{};var e}));
... ...
/*!
*
* Super simple WYSIWYG editor v0.8.20
* https://summernote.org
*
*
* Copyright 2013- Alan Hong and contributors
* Summernote may be freely distributed under the MIT license.
*
* Date: 2021-10-14T21:15Z
*
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(self, function() {
return /******/ (() => { // webpackBootstrap
var __webpack_exports__ = {};
(function ($) {
$.extend($.summernote.lang, {
'zh-TW': {
font: {
bold: '粗體',
italic: '斜體',
underline: '底線',
clear: '清除格式',
height: '行高',
name: '字體',
strikethrough: '刪除線',
subscript: '下標',
superscript: '上標',
size: '字號'
},
image: {
image: '圖片',
insert: '插入圖片',
resizeFull: '縮放至100%',
resizeHalf: '縮放至 50%',
resizeQuarter: '縮放至 25%',
floatLeft: '靠左浮動',
floatRight: '靠右浮動',
floatNone: '取消浮動',
shapeRounded: '形狀: 圓角',
shapeCircle: '形狀: 圓',
shapeThumbnail: '形狀: 縮略圖',
shapeNone: '形狀: 無',
dragImageHere: '將圖片拖曳至此處',
dropImage: 'Drop image or Text',
selectFromFiles: '從本機上傳',
maximumFileSize: '文件大小最大值',
maximumFileSizeError: '文件大小超出最大值。',
url: '圖片網址',
remove: '移除圖片',
original: 'Original'
},
video: {
video: '影片',
videoLink: '影片連結',
insert: '插入影片',
url: '影片網址',
providers: '(影片網址)'
},
link: {
link: '連結',
insert: '插入連結',
unlink: '取消連結',
edit: '編輯連結',
textToDisplay: '顯示文字',
url: '連結網址',
openInNewWindow: '在新視窗開啟'
},
table: {
table: '表格',
addRowAbove: '上方插入列',
addRowBelow: '下方插入列',
addColLeft: '左方插入欄',
addColRight: '右方插入欄',
delRow: '刪除列',
delCol: '刪除欄',
delTable: '刪除表格'
},
hr: {
insert: '水平線'
},
style: {
style: '樣式',
p: '一般',
blockquote: '引用區塊',
pre: '程式碼區塊',
h1: '標題 1',
h2: '標題 2',
h3: '標題 3',
h4: '標題 4',
h5: '標題 5',
h6: '標題 6'
},
lists: {
unordered: '項目清單',
ordered: '編號清單'
},
options: {
help: '幫助',
fullscreen: '全螢幕',
codeview: '原始碼'
},
paragraph: {
paragraph: '段落',
outdent: '取消縮排',
indent: '增加縮排',
left: '靠右對齊',
center: '靠中對齊',
right: '靠右對齊',
justify: '左右對齊'
},
color: {
recent: '字型顏色',
more: '更多',
background: '背景',
foreground: '字體',
transparent: '透明',
setTransparent: '透明',
reset: '重設',
resetToDefault: '預設'
},
shortcut: {
shortcuts: '快捷鍵',
close: '關閉',
textFormatting: '文字格式',
action: '動作',
paragraphFormatting: '段落格式',
documentStyle: '文件格式',
extraKeys: '額外按鍵'
},
help: {
'insertParagraph': 'Insert Paragraph',
'undo': 'Undoes the last command',
'redo': 'Redoes the last command',
'tab': 'Tab',
'untab': 'Untab',
'bold': 'Set a bold style',
'italic': 'Set a italic style',
'underline': 'Set a underline style',
'strikethrough': 'Set a strikethrough style',
'removeFormat': 'Clean a style',
'justifyLeft': 'Set left align',
'justifyCenter': 'Set center align',
'justifyRight': 'Set right align',
'justifyFull': 'Set full align',
'insertUnorderedList': 'Toggle unordered list',
'insertOrderedList': 'Toggle ordered list',
'outdent': 'Outdent on current paragraph',
'indent': 'Indent on current paragraph',
'formatPara': 'Change current block\'s format as a paragraph(P tag)',
'formatH1': 'Change current block\'s format as H1',
'formatH2': 'Change current block\'s format as H2',
'formatH3': 'Change current block\'s format as H3',
'formatH4': 'Change current block\'s format as H4',
'formatH5': 'Change current block\'s format as H5',
'formatH6': 'Change current block\'s format as H6',
'insertHorizontalRule': 'Insert horizontal rule',
'linkDialog.show': 'Show Link Dialog'
},
history: {
undo: '復原',
redo: '取消復原'
},
specialChar: {
specialChar: 'SPECIAL CHARACTERS',
select: 'Select Special characters'
}
}
});
})(jQuery);
/******/ return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=summernote-zh-TW.js.map
... ...
/*! Summernote v0.8.20 | (c) 2013- Alan Hong and contributors | MIT license */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(self,(function(){return(e=jQuery).extend(e.summernote.lang,{"zh-TW":{font:{bold:"粗體",italic:"斜體",underline:"底線",clear:"清除格式",height:"行高",name:"字體",strikethrough:"刪除線",subscript:"下標",superscript:"上標",size:"字號"},image:{image:"圖片",insert:"插入圖片",resizeFull:"縮放至100%",resizeHalf:"縮放至 50%",resizeQuarter:"縮放至 25%",floatLeft:"靠左浮動",floatRight:"靠右浮動",floatNone:"取消浮動",shapeRounded:"形狀: 圓角",shapeCircle:"形狀: 圓",shapeThumbnail:"形狀: 縮略圖",shapeNone:"形狀: 無",dragImageHere:"將圖片拖曳至此處",dropImage:"Drop image or Text",selectFromFiles:"從本機上傳",maximumFileSize:"文件大小最大值",maximumFileSizeError:"文件大小超出最大值。",url:"圖片網址",remove:"移除圖片",original:"Original"},video:{video:"影片",videoLink:"影片連結",insert:"插入影片",url:"影片網址",providers:"(影片網址)"},link:{link:"連結",insert:"插入連結",unlink:"取消連結",edit:"編輯連結",textToDisplay:"顯示文字",url:"連結網址",openInNewWindow:"在新視窗開啟"},table:{table:"表格",addRowAbove:"上方插入列",addRowBelow:"下方插入列",addColLeft:"左方插入欄",addColRight:"右方插入欄",delRow:"刪除列",delCol:"刪除欄",delTable:"刪除表格"},hr:{insert:"水平線"},style:{style:"樣式",p:"一般",blockquote:"引用區塊",pre:"程式碼區塊",h1:"標題 1",h2:"標題 2",h3:"標題 3",h4:"標題 4",h5:"標題 5",h6:"標題 6"},lists:{unordered:"項目清單",ordered:"編號清單"},options:{help:"幫助",fullscreen:"全螢幕",codeview:"原始碼"},paragraph:{paragraph:"段落",outdent:"取消縮排",indent:"增加縮排",left:"靠右對齊",center:"靠中對齊",right:"靠右對齊",justify:"左右對齊"},color:{recent:"字型顏色",more:"更多",background:"背景",foreground:"字體",transparent:"透明",setTransparent:"透明",reset:"重設",resetToDefault:"預設"},shortcut:{shortcuts:"快捷鍵",close:"關閉",textFormatting:"文字格式",action:"動作",paragraphFormatting:"段落格式",documentStyle:"文件格式",extraKeys:"額外按鍵"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"復原",redo:"取消復原"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}}),{};var e}));
... ...
define([], function () {
//修改上传的接口调用
require(['upload'], function (Upload) {
//初始化中完成判断
Upload.events.onInit = function () {
//如果上传接口不是七牛云,则不处理
if (this.options.url !== Config.upload.uploadurl) {
return;
}
var _success = this.options.success;
$.extend(this.options, {
chunkSuccess: function (chunk, file, response) {
this.contexts = this.contexts ? this.contexts : [];
this.contexts.push(typeof response.ctx !== 'undefined' ? response.ctx : response.data.ctx);
},
chunksUploaded: function (file, done) {
var that = this;
var params = $(that.element).data("params") || {};
var category = typeof params.category !== 'undefined' ? params.category : ($(that.element).data("category") || '');
Fast.api.ajax({
url: "/addons/qiniu/index/upload",
data: {
action: 'merge',
filesize: file.size,
filename: file.name,
chunkid: file.upload.uuid,
chunkcount: file.upload.totalChunkCount,
width: file.width || 0,
height: file.height || 0,
type: file.type,
category: category,
qiniutoken: Config.upload.multipart.qiniutoken,
contexts: this.contexts
},
}, function (data, ret) {
done(JSON.stringify(ret));
return false;
}, function (data, ret) {
file.accepted = false;
that._errorProcessing([file], ret.msg);
return false;
});
},
});
//先移除已有的事件
this.off("success", _success).on("success", function (file, response) {
var that = this;
var ret = {code: 0, msg: response};
try {
ret = typeof response === 'string' ? JSON.parse(response) : response;
if (file.xhr.status === 200) {
if (typeof ret.key !== 'undefined') {
ret = {code: 1, msg: "", data: {url: '/' + ret.key, hash: ret.hash}};
}
console.log(ret);
var params = $(that.element).data("params") || {};
var category = typeof params.category !== 'undefined' ? params.category : ($(that.element).data("category") || '');
Fast.api.ajax({
url: "/addons/qiniu/index/notify",
data: {name: file.name, url: ret.data.url, hash: ret.data.hash, size: file.size, width: file.width || 0, height: file.height || 0, type: file.type, category: category, qiniutoken: Config.upload.multipart.qiniutoken}
}, function () {
return false;
}, function () {
return false;
});
}
} catch (e) {
console.error(e);
}
_success.call(this, file, ret);
});
//如果是直传模式
if (Config.upload.uploadmode === 'client') {
var _url = this.options.url;
//分片上传时URL链接不同
this.options.url = function (files) {
this.options.headers = {"Authorization": "UpToken " + Config.upload.multipart.qiniutoken};
if (files[0].upload.chunked) {
var chunk = null;
files[0].upload.chunks.forEach(function (item) {
if (item.status === 'uploading') {
chunk = item;
}
});
if (!chunk) {
return Config.upload.uploadurl + '/mkfile/' + files[0].size;
} else {
return Config.upload.uploadurl + '/mkblk/' + chunk.dataBlock.data.size;
}
}
return _url;
};
this.options.params = function (files, xhr, chunk) {
var params = Config.upload.multipart;
if (chunk) {
return $.extend({}, params, {
filesize: chunk.file.size,
filename: chunk.file.name,
chunkid: chunk.file.upload.uuid,
chunkindex: chunk.index,
chunkcount: chunk.file.upload.totalChunkCount,
chunkfilesize: chunk.dataBlock.data.size,
width: chunk.file.width || 0,
height: chunk.file.height || 0,
type: chunk.file.type,
});
} else {
var retParams = $.extend({}, params);
//七牛云直传使用的是token参数
retParams.token = retParams.qiniutoken;
delete retParams.qiniutoken;
return retParams;
}
};
//分片上传时需要变更提交的内容
this.on("sending", function (file, xhr, formData) {
if (file.upload.chunked) {
var _send = xhr.send;
xhr.send = function () {
var chunk = null;
file.upload.chunks.forEach(function (item) {
if (item.status == 'uploading') {
chunk = item;
}
});
if (chunk) {
_send.call(xhr, chunk.dataBlock.data);
}
};
}
});
}
};
});
require.config({
paths: {
'summernote': '../addons/summernote/lang/summernote-zh-CN.min'
},
shim: {
'summernote': ['../addons/summernote/js/summernote.min', 'css!../addons/summernote/css/summernote.min.css'],
}
});
require(['form', 'upload'], function (Form, Upload) {
var _bindevent = Form.events.bindevent;
Form.events.bindevent = function (form) {
_bindevent.apply(this, [form]);
try {
//绑定summernote事件
if ($(Config.summernote.classname || '.editor', form).length > 0) {
var selectUrl = typeof Config !== 'undefined' && Config.modulename === 'index' ? 'user/attachment' : 'general/attachment/select';
require(['summernote'], function () {
var imageButton = function (context) {
var ui = $.summernote.ui;
var button = ui.button({
contents: '<i class="fa fa-file-image-o"/>',
tooltip: __('Choose'),
click: function () {
parent.Fast.api.open(selectUrl + "?element_id=&multiple=true&mimetype=image/", __('Choose'), {
callback: function (data) {
var urlArr = data.url.split(/\,/);
$.each(urlArr, function () {
var url = Fast.api.cdnurl(this, true);
context.invoke('editor.insertImage', url);
});
}
});
return false;
}
});
return button.render();
};
var attachmentButton = function (context) {
var ui = $.summernote.ui;
var button = ui.button({
contents: '<i class="fa fa-file"/>',
tooltip: __('Choose'),
click: function () {
parent.Fast.api.open(selectUrl + "?element_id=&multiple=true&mimetype=*", __('Choose'), {
callback: function (data) {
var urlArr = data.url.split(/\,/);
$.each(urlArr, function () {
var url = Fast.api.cdnurl(this, true);
var node = $("<a href='" + url + "'>" + url + "</a>");
context.invoke('insertNode', node[0]);
});
}
});
return false;
}
});
return button.render();
};
$(Config.summernote.classname || '.editor', form).each(function () {
$(this).summernote($.extend(true, {}, {
// height: 250,
minHeight: 250,
lang: 'zh-CN',
fontNames: [
'Arial', 'Arial Black', 'Serif', 'Sans', 'Courier',
'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande',
"Open Sans", "Hiragino Sans GB", "Microsoft YaHei",
'微软雅黑', '宋体', '黑体', '仿宋', '楷体', '幼圆',
],
fontNamesIgnoreCheck: [
"Open Sans", "Microsoft YaHei",
'微软雅黑', '宋体', '黑体', '仿宋', '楷体', '幼圆'
],
toolbar: [
['style', ['style', 'undo', 'redo']],
['font', ['bold', 'underline', 'strikethrough', 'clear']],
['fontname', ['color', 'fontname', 'fontsize']],
['para', ['ul', 'ol', 'paragraph', 'height']],
['table', ['table', 'hr']],
['insert', ['link', 'picture', 'video']],
['select', ['image', 'attachment']],
['view', ['fullscreen', 'codeview', 'help']],
],
buttons: {
image: imageButton,
attachment: attachmentButton,
},
dialogsInBody: true,
followingToolbar: false,
callbacks: {
onChange: function (contents) {
$(this).val(contents);
$(this).trigger('change');
},
onInit: function () {
},
onImageUpload: function (files) {
var that = this;
//依次上传图片
for (var i = 0; i < files.length; i++) {
Upload.api.send(files[i], function (data) {
var url = Fast.api.cdnurl(data.url, true);
$(that).summernote("insertImage", url, 'filename');
});
}
}
}
}, $(this).data("summernote-options") || {}));
});
});
}
} catch (e) {
}
};
});
});
\ No newline at end of file
... ...
... ... @@ -30,16 +30,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'id', title: __('Id')},
{field: 'car_model', title: __('Car_model'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'license_plate', title: __('License_plate'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'seat', title: __('Seat')},
{field: 'colour', title: __('Colour'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'driver_license_img', title: __('Driver_license_img'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
{field: 'driving_license_img', title: __('Driving_license_img'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
{field: 'reservation_time', title: __('Reservation_time'),operate:'RANGE', addclass:'datetimerange',datetimeFormat:"HH:mm", autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'start_time', title: __('Start_time'),operate:'RANGE', addclass:'datetimerange',datetimeFormat:"HH:mm", autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'create_time', title: __('Create_time'),operate:'RANGE', addclass:'datetimerange',datetimeFormat:"HH:mm", autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'driver.name', title: __('Driver.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'route.name', title: __('Route.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'driver.name', title: __('Driver.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'seat.name', title: __('Seat.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'reservation_time', title: __('Reservation_time'), datetimeFormat:"HH:mm",operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'start_time', title: __('Start_time'), datetimeFormat:"HH:mm", operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'seat/index' + location.search,
add_url: 'seat/add',
edit_url: 'seat/edit',
del_url: 'seat/del',
multi_url: 'seat/multi',
import_url: 'seat/import',
table: 'seat',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'seat_number', title: __('Seat_number'), searchList: {"0":__('Seat_number 0'),"1":__('Seat_number 1')}, formatter: Table.api.formatter.normal},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
$(document).on("change", "#seat_number input", function(){
var seat_number = $("input[name='row[seat_number]']:checked").val();
console.log(seat_number);
if(seat_number==1){
//否则隐藏
$("#seat6").show();
$("#seat7").show();
}else if(seat_number==0){
//匠星隐藏千寻数据key
$('#c-seat_name7').val("");
$('#c-seat_price7').val("");
$("#seat7").hide();
$('#c-seat_name6').val("");
$('#c-seat_price6').val("");
$("#seat6").hide();
}
});
Controller.api.bindevent();
},
edit: function () {
$(document).on("change", "#seat_number input", function(){
var seat_number = $("input[name='row[seat_number]']:checked").val();
console.log(seat_number);
if(seat_number==1){
//否则隐藏
$("#seat6").show();
$("#seat5").show();
}else if(seat_number==0){
//匠星隐藏千寻数据key
$('#c-seat_name5').val("");
$('#c-seat_price5').val("");
$("#seat5").hide();
$('#c-seat_name6').val("");
$('#c-seat_price6').val("");
$("#seat6").hide();
}
});
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
... ...