加载层优化,动态数据列表优化,框架样式细节优化

feat/task1-c-wallet
gongfuxiang 2022-09-30 23:34:36 +08:00
parent b5bd929f21
commit daa7674d58
20 changed files with 293 additions and 64 deletions

View File

@ -40,6 +40,12 @@ class Common extends BaseController
protected $data_get;
protected $data_request;
// 页面操作表单
protected $form_back_params;
protected $form_back_control;
protected $form_back_action;
protected $form_back_url;
// 当前系统操作名称
protected $module_name;
protected $controller_name;
@ -173,6 +179,22 @@ class Common extends BaseController
$default_theme = 'default';
$assign['default_theme'] = $default_theme;
// 基础表单数据、去除数组和对象列
$form_back_params = $this->data_request;
if(!empty($form_back_params) && is_array($form_back_params))
{
foreach($form_back_params as $k=>$v)
{
if(is_array($v) || is_object($v))
{
unset($form_back_params[$k]);
}
}
unset($form_back_params['id'], $form_back_params['form_back_control'], $form_back_params['form_back_action']);
}
$this->form_back_params = $form_back_params;
$assign['form_back_params'] = $this->form_back_params;
// 当前系统操作名称
$this->module_name = RequestModule();
$this->controller_name = RequestController();
@ -186,13 +208,25 @@ class Common extends BaseController
// 当前插件操作名称, 兼容插件模块名称
if(empty($this->data_request['pluginsname']))
{
// 插件名称/控制器/方法
$this->plugins_module_name = '';
$this->plugins_controller_name = '';
$this->plugins_action_name = '';
// 页面表单操作指定返回、方法默认index
$this->form_back_control = empty($this->data_request['form_back_control']) ? $this->controller_name : $this->data_request['form_back_control'];
$this->form_back_action = empty($this->data_request['form_back_action']) ? 'index' : $this->data_request['form_back_action'];
$this->form_back_url = MyUrl($this->module_name.'/'.$this->form_back_control.'/'.$this->form_back_action, $this->form_back_params);
} else {
// 插件名称/控制器/方法
$this->plugins_module_name = $this->data_request['pluginsname'];
$this->plugins_controller_name = empty($this->data_request['pluginscontrol']) ? 'index' : $this->data_request['pluginscontrol'];
$this->plugins_action_name = empty($this->data_request['pluginsaction']) ? 'index' : $this->data_request['pluginsaction'];
// 页面表单操作指定返回、方法默认index
$this->form_back_control = empty($this->data_request['form_back_control']) ? $this->plugins_controller_name : $this->data_request['form_back_control'];
$this->form_back_action = empty($this->data_request['form_back_action']) ? 'index' : $this->data_request['form_back_action'];
$this->form_back_url = PluginsAdminUrl($this->plugins_module_name, $this->form_back_control, $this->form_back_action, $this->form_back_params);
}
// 当前插件操作名称
@ -200,6 +234,9 @@ class Common extends BaseController
$assign['plugins_controller_name'] = $this->plugins_controller_name;
$assign['plugins_action_name'] = $this->plugins_action_name;
// 基础表单返回url
$assign['form_back_url'] = $this->form_back_url;
// 管理员
$assign['admin'] = $this->admin;
@ -251,6 +288,10 @@ class Common extends BaseController
// 开发模式
$assign['shopxo_is_develop'] = MyConfig('shopxo.is_develop');
// 加载页面加载层、是否加载图片动画
$assign['is_page_loading'] = ($this->module_name.$this->controller_name.$this->action_name == 'adminindexindex') ? 0 : 1;
$assign['is_page_loading_images'] = 1;
// 是否加载视频播放器组件
$assign['is_load_ckplayer'] = 0;

View File

@ -135,7 +135,6 @@
<!-- 打印js -->
{{if isset($is_load_hiprint) and $is_load_hiprint eq 1}}
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/hiprint.bundle.js"></script>
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/plugins/socket.io.js"></script>
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/polyfill.min.js"></script>
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/plugins/jquery.hiwprint.js"></script>
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/plugins/JsBarcode.all.min.js"></script>

View File

@ -106,7 +106,8 @@
</script>
</head>
<body>
{{if $module_name.$controller_name.$action_name neq 'adminindexindex'}}
<!-- 页面加载层 -->
{{if isset($is_page_loading) and $is_page_loading eq 1}}
{{include file="public/page_loading" /}}
{{/if}}

View File

@ -1,4 +1,3 @@
<div class="am-margin-top-lg am-text-center">
<img src="{{$attachment_host}}/static/common/images/loading.gif" />
<p>处理中...</p>
</div>

View File

@ -57,7 +57,7 @@
{{if isset($t['label']) and isset($t['view_type']) and in_array($t['view_type'], ['images', 'field', 'module', 'status']) and (!isset($t['is_detail']) or $t['is_detail'] eq 1)}}
<li>
<div class="data-avg-text-list-title">{{$t.label}}</div>
<div class="data-avg-text-list-content">
<div class="data-avg-text-list-content am-text-truncate-2">
{{include file="public/module/detail_content" /}}
</div>
</li>

View File

@ -15,16 +15,16 @@
style="
{{if isset($t['is_badge']) and $t['is_badge'] eq 1 and !empty($t['badge_key']) and !empty($t['badge_style']) and is_array($t['badge_style']) and isset($form_table_data_detail[$t['badge_key']]) and isset($t['badge_style'][$form_table_data_detail[$t['badge_key']]]) and substr($t['badge_style'][$form_table_data_detail[$t['badge_key']]], 0, 1) eq '#'}}background: {{$t['badge_style'][$form_table_data_detail[$t['badge_key']]]}};{{/if}}
{{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($t['color_style']) and is_array($t['color_style']) and isset($form_table_data_detail[$t['color_key']]) and isset($t['color_style'][$form_table_data_detail[$t['color_key']]]) and substr($t['color_style'][$form_table_data_detail[$t['color_key']]], 0, 1) eq '#'}}color: {{$t['color_style'][$form_table_data_detail[$t['color_key']]]}};{{/if}}"
{{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_detail[$t['popover_field']])}}data-am-popover="{content: '{{$form_table_data_detail[$t['popover_field']]|raw}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
{{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_detail[$t['popover_field']])}}data-am-popover="{content: '{{:PopoverContentHandle($form_table_data_detail[$t['popover_field']])}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
>
<!-- 图标+提示 -->
{{if isset($t['is_first_tips']) and $t['is_first_tips'] eq 1 and ((!empty($t['first_tips_key']) and !empty($form_table_data_detail[$t['first_tips_key']])) or (!empty($t['first_tips_data'])))}}
<a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_detail[$t['first_tips_key']])}}{{$form_table_data_detail[$t['first_tips_key']]}}{{else /}}{{$t.first_tips_data}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
<a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_detail[$t['first_tips_key']])}}{{:PopoverContentHandle($form_table_data_detail[$t['first_tips_key']])}}{{else /}}{{:PopoverContentHandle($t.first_tips_data)}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
{{/if}}
<!-- 连接+提示 -->
{{if isset($t['is_first_link']) and $t['is_first_link'] eq 1 and ((!empty($t['first_link_key']) and !empty($form_table_data_detail[$t['first_link_key']])) or (!empty($t['first_link_data'])))}}
<a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_detail[$t['first_link_key']])}}{{$form_table_data_detail[$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{$t.first_link_popover}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
<a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_detail[$t['first_link_key']])}}{{$form_table_data_detail[$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{:PopoverContentHandle($t.first_link_popover)}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
{{/if}}
<!-- 圆点 -->

View File

@ -67,7 +67,7 @@
{{switch $t.search_config.form_type}}
{{case input}}
<!-- 输入 -->
<input type="text" class="am-form-field am-radius" autocomplete="off" name="{{$t.form_key}}" value="{{if !empty($form_params) and isset($form_params[$t['form_key']])}}{{$form_params[$t['form_key']]}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder'])}}{{$t.search_config.placeholder}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key']])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key']]}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" class="am-form-field am-radius" autocomplete="off" name="{{$t.form_key}}" value="{{if !empty($form_params) and isset($form_params[$t['form_key']])}}{{$form_params[$t['form_key']]}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder'])}}{{$t.search_config.placeholder}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key']])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key']])}}', trigger: 'hover focus'}"{{/if}} />
{{/case}}
{{case select}}
<!-- 选择 -->
@ -100,27 +100,27 @@
{{case section}}
<!-- 区间 -->
<div class="form-table-search-section">
<input type="number" class="am-form-field am-radius am-inline-block" autocomplete="off" name="{{$t.form_key}}_min" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_min'])}}{{$form_params[$t['form_key'].'_min']}}{{/if}}" {{if isset($t['search_config']['is_point']) and $t['search_config']['is_point'] eq 1}}step="0.01"{{/if}} min="0" placeholder="{{if isset($t['search_config']['placeholder_min'])}}{{$t.search_config.placeholder_min}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_min'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_min']}}', trigger: 'hover focus'}"{{/if}} />
<input type="number" class="am-form-field am-radius am-inline-block" autocomplete="off" name="{{$t.form_key}}_min" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_min'])}}{{$form_params[$t['form_key'].'_min']}}{{/if}}" {{if isset($t['search_config']['is_point']) and $t['search_config']['is_point'] eq 1}}step="0.01"{{/if}} min="0" placeholder="{{if isset($t['search_config']['placeholder_min'])}}{{$t.search_config.placeholder_min}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_min'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_min'])}}', trigger: 'hover focus'}"{{/if}} />
<span>-</span>
<input type="number" class="am-form-field am-radius am-inline-block" autocomplete="off" name="{{$t.form_key}}_max" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_max'])}}{{$form_params[$t['form_key'].'_max']}}{{/if}}" {{if isset($t['search_config']['is_point']) and $t['search_config']['is_point'] eq 1}}step="0.01"{{/if}} min="0" placeholder="{{if isset($t['search_config']['placeholder_max'])}}{{$t.search_config.placeholder_max}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_max'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_max']}}', trigger: 'hover focus'}"{{/if}} />
<input type="number" class="am-form-field am-radius am-inline-block" autocomplete="off" name="{{$t.form_key}}_max" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_max'])}}{{$form_params[$t['form_key'].'_max']}}{{/if}}" {{if isset($t['search_config']['is_point']) and $t['search_config']['is_point'] eq 1}}step="0.01"{{/if}} min="0" placeholder="{{if isset($t['search_config']['placeholder_max'])}}{{$t.search_config.placeholder_max}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_max'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_max'])}}', trigger: 'hover focus'}"{{/if}} />
</div>
{{/case}}
{{case datetime}}
<div class="form-table-search-section form-table-search-time">
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-start-{{$t.form_key}}" name="{{$t.form_key}}_start" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}}{{$form_params[$t['form_key'].'_start']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_start'])}}{{$t.search_config.placeholder_start}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd H:mm:ss',maxDate:'#F{$dp.$D(\'form-table-search-time-end-{{$t.form_key}}\');}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_start']}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-start-{{$t.form_key}}" name="{{$t.form_key}}_start" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}}{{$form_params[$t['form_key'].'_start']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_start'])}}{{$t.search_config.placeholder_start}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd H:mm:ss',maxDate:'#F{$dp.$D(\'form-table-search-time-end-{{$t.form_key}}\');}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_start'])}}', trigger: 'hover focus'}"{{/if}} />
<span>-</span>
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-end-{{$t.form_key}}" name="{{$t.form_key}}_end" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}}{{$form_params[$t['form_key'].'_end']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_end'])}}{{$t.search_config.placeholder_end}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd H:mm:ss',minDate:'#F{$dp.$D(\'form-table-search-time-start-{{$t.form_key}}\');}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_end']}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-end-{{$t.form_key}}" name="{{$t.form_key}}_end" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}}{{$form_params[$t['form_key'].'_end']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_end'])}}{{$t.search_config.placeholder_end}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd H:mm:ss',minDate:'#F{$dp.$D(\'form-table-search-time-start-{{$t.form_key}}\');}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_end'])}}', trigger: 'hover focus'}"{{/if}} />
</div>
{{/case}}
{{case date}}
<div class="form-table-search-section form-table-search-time">
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-start-{{$t.form_key}}" name="{{$t.form_key}}_start" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}}{{$form_params[$t['form_key'].'_start']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_start'])}}{{$t.search_config.placeholder_start}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'form-table-search-time-end-{{$t.form_key}}\',{d:-1});}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_start']}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-start-{{$t.form_key}}" name="{{$t.form_key}}_start" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}}{{$form_params[$t['form_key'].'_start']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_start'])}}{{$t.search_config.placeholder_start}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'form-table-search-time-end-{{$t.form_key}}\',{d:-1});}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_start'])}}', trigger: 'hover focus'}"{{/if}} />
<span>-</span>
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-end-{{$t.form_key}}" name="{{$t.form_key}}_end" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}}{{$form_params[$t['form_key'].'_end']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_end'])}}{{$t.search_config.placeholder_end}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'form-table-search-time-start-{{$t.form_key}}\',{d:+1});}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_end']}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-end-{{$t.form_key}}" name="{{$t.form_key}}_end" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}}{{$form_params[$t['form_key'].'_end']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_end'])}}{{$t.search_config.placeholder_end}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'form-table-search-time-start-{{$t.form_key}}\',{d:+1});}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_end'])}}', trigger: 'hover focus'}"{{/if}} />
</div>
{{/case}}
{{case ym}}
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius Wdate" name="{{$t.form_key}}" value="{{if !empty($form_params) and isset($form_params[$t['form_key']])}}{{$form_params[$t['form_key']]}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder'])}}{{$t.search_config.placeholder}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key']])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key']]}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius Wdate" name="{{$t.form_key}}" value="{{if !empty($form_params) and isset($form_params[$t['form_key']])}}{{$form_params[$t['form_key']]}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder'])}}{{$t.search_config.placeholder}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key']])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key']])}}', trigger: 'hover focus'}"{{/if}} />
{{/case}}
{{case module}}
<!-- 从模块加载自定义模块数据 -->
@ -203,16 +203,16 @@
style="
{{if isset($t['is_badge']) and $t['is_badge'] eq 1 and !empty($t['badge_key']) and !empty($t['badge_style']) and is_array($t['badge_style']) and isset($form_table_data_list[$i][$t['badge_key']]) and isset($t['badge_style'][$form_table_data_list[$i][$t['badge_key']]]) and substr($t['badge_style'][$form_table_data_list[$i][$t['badge_key']]], 0, 1) eq '#'}}background: {{$t['badge_style'][$form_table_data_list[$i][$t['badge_key']]]}};{{/if}}
{{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($t['color_style']) and is_array($t['color_style']) and isset($form_table_data_list[$i][$t['color_key']]) and isset($t['color_style'][$form_table_data_list[$i][$t['color_key']]]) and substr($t['color_style'][$form_table_data_list[$i][$t['color_key']]], 0, 1) eq '#'}}color: {{$t['color_style'][$form_table_data_list[$i][$t['color_key']]]}};{{/if}}"
{{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_list[$i][$t['popover_field']])}}data-am-popover="{content: '{{$form_table_data_list[$i][$t['popover_field']]|raw}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
{{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_list[$i][$t['popover_field']])}}data-am-popover="{content: '{{:PopoverContentHandle($form_table_data_list[$i][$t['popover_field']])}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
>
<!-- 图标+提示 -->
{{if isset($t['is_first_tips']) and $t['is_first_tips'] eq 1 and ((!empty($t['first_tips_key']) and !empty($form_table_data_list[$i][$t['first_tips_key']])) or (!empty($t['first_tips_data'])))}}
<a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_list[$i][$t['first_tips_key']])}}{{$form_table_data_list[$i][$t['first_tips_key']]}}{{else /}}{{$t.first_tips_data}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
<a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_list[$i][$t['first_tips_key']])}}{{:PopoverContentHandle($form_table_data_list[$i][$t['first_tips_key']])}}{{else /}}{{:PopoverContentHandle($t.first_tips_data)}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
{{/if}}
<!-- 连接+提示 -->
{{if isset($t['is_first_link']) and $t['is_first_link'] eq 1 and ((!empty($t['first_link_key']) and !empty($form_table_data_list[$i][$t['first_link_key']])) or (!empty($t['first_link_data'])))}}
<a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_list[$i][$t['first_link_key']])}}{{$form_table_data_list[$i][$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{$t.first_link_popover}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
<a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_list[$i][$t['first_link_key']])}}{{$form_table_data_list[$i][$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{:PopoverContentHandle($t.first_link_popover)}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
{{/if}}
<!-- 圆点 -->

View File

@ -1,3 +1,7 @@
<div class="am-modal am-page-loading">
<span class="am-icon-spinner am-icon-pulse am-icon-lg"></span>
{{if isset($is_page_loading_images) and $is_page_loading_images eq 1}}
<img src="{{$attachment_host}}/static/common/images/loading.gif" />
{{else /}}
<span class="am-icon-spinner am-icon-pulse am-icon-lg"></span>
{{/if}}
</div>

View File

@ -11,6 +11,20 @@
// 应用公共文件
/**
* 弹出内容处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2022-09-26
* @desc description
* @param [string] $content [展示的内容]
*/
function PopoverContentHandle($content)
{
return str_replace(["\n", "'", '"'], ['<br />', '', ''], $content);
}
/**
* 生成uuid
* @author Devil

View File

@ -49,6 +49,12 @@ class Common extends BaseController
protected $data_get;
protected $data_request;
// 页面操作表单
protected $form_back_params;
protected $form_back_control;
protected $form_back_action;
protected $form_back_url;
// 当前系统操作名称
protected $module_name;
protected $controller_name;
@ -231,6 +237,22 @@ class Common extends BaseController
$default_theme = strtolower(MyC('common_default_theme', 'default', true));
$assign['default_theme'] = $default_theme;
// 基础表单数据、去除数组和对象列
$form_back_params = $this->data_request;
if(!empty($form_back_params) && is_array($form_back_params))
{
foreach($form_back_params as $k=>$v)
{
if(is_array($v) || is_object($v))
{
unset($form_back_params[$k]);
}
}
unset($form_back_params['id'], $form_back_params['form_back_control'], $form_back_params['form_back_action']);
}
$this->form_back_params = $form_back_params;
$assign['form_back_params'] = $this->form_back_params;
// 当前系统操作名称
$this->module_name = RequestModule();
$this->controller_name = RequestController();
@ -244,13 +266,25 @@ class Common extends BaseController
// 当前插件操作名称, 兼容插件模块名称
if(empty($this->data_request['pluginsname']))
{
// 插件名称/控制器/方法
$this->plugins_module_name = '';
$this->plugins_controller_name = '';
$this->plugins_action_name = '';
// 页面表单操作指定返回、方法默认index
$this->form_back_control = empty($this->data_request['form_back_control']) ? $this->controller_name : $this->data_request['form_back_control'];
$this->form_back_action = empty($this->data_request['form_back_action']) ? 'index' : $this->data_request['form_back_action'];
$this->form_back_url = MyUrl($this->module_name.'/'.$this->form_back_control.'/'.$this->form_back_action, $this->form_back_params);
} else {
// 插件名称/控制器/方法
$this->plugins_module_name = $this->data_request['pluginsname'];
$this->plugins_controller_name = empty($this->data_request['pluginscontrol']) ? 'index' : $this->data_request['pluginscontrol'];
$this->plugins_action_name = empty($this->data_request['pluginsaction']) ? 'index' : $this->data_request['pluginsaction'];
// 页面表单操作指定返回、方法默认index
$this->form_back_control = empty($this->data_request['form_back_control']) ? $this->plugins_controller_name : $this->data_request['form_back_control'];
$this->form_back_action = empty($this->data_request['form_back_action']) ? 'index' : $this->data_request['form_back_action'];
$this->form_back_url = PluginsHomeUrl($this->plugins_module_name, $this->form_back_control, $this->form_back_action, $this->form_back_params);
}
// 当前插件操作名称
@ -258,6 +292,9 @@ class Common extends BaseController
$assign['plugins_controller_name'] = $this->plugins_controller_name;
$assign['plugins_action_name'] = $this->plugins_action_name;
// 基础表单返回url
$assign['form_back_url'] = $this->form_back_url;
// 分页信息
$this->page = max(1, isset($this->data_request['page']) ? intval($this->data_request['page']) : 1);
$this->page_size = min(empty($this->data_request['page_size']) ? MyC('common_page_size', 10, true) : intval($this->data_request['page_size']), 1000);
@ -333,6 +370,10 @@ class Common extends BaseController
// 开发模式
$assign['shopxo_is_develop'] = MyConfig('shopxo.is_develop');
// 默认不加载页面加载层、是否加载图片动画
$assign['is_page_loading'] = 0;
$assign['is_page_loading_images'] = 0;
// 顶部右侧导航
$assign['common_nav_top_right_list'] = NavigationService::HomeHavTopRight(['user'=>$this->user]);

View File

@ -114,7 +114,6 @@
<!-- 打印js -->
{{if isset($is_load_hiprint) and $is_load_hiprint eq 1}}
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/hiprint.bundle.js"></script>
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/plugins/socket.io.js"></script>
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/polyfill.min.js"></script>
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/plugins/jquery.hiwprint.js"></script>
<script type="text/javascript" src="{{$public_host}}static/common/lib/hiprint/plugins/JsBarcode.all.min.js"></script>

View File

@ -120,6 +120,11 @@
</script>
</head>
<body {{if in_array(MiniAppEnv(), MyConfig('shopxo.mini_app_type_list'))}}class="mini-app-env"{{/if}}>
<!-- 页面加载层 -->
{{if isset($is_page_loading) and $is_page_loading eq 1}}
{{include file="public/page_loading" /}}
{{/if}}
<!-- css钩子 -->
{{if (!isset($page_pure) or $page_pure neq 1) and (!isset($is_header) or $is_header eq 1)}}
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}

View File

@ -57,7 +57,7 @@
{{if isset($t['label']) and isset($t['view_type']) and in_array($t['view_type'], ['images', 'field', 'module', 'status']) and (!isset($t['is_detail']) or $t['is_detail'] eq 1)}}
<li>
<div class="data-avg-text-list-title">{{$t.label}}</div>
<div class="data-avg-text-list-content">
<div class="data-avg-text-list-content am-text-truncate-2">
{{include file="public/module/detail_content" /}}
</div>
</li>

View File

@ -15,16 +15,16 @@
style="
{{if isset($t['is_badge']) and $t['is_badge'] eq 1 and !empty($t['badge_key']) and !empty($t['badge_style']) and is_array($t['badge_style']) and isset($form_table_data_detail[$t['badge_key']]) and isset($t['badge_style'][$form_table_data_detail[$t['badge_key']]]) and substr($t['badge_style'][$form_table_data_detail[$t['badge_key']]], 0, 1) eq '#'}}background: {{$t['badge_style'][$form_table_data_detail[$t['badge_key']]]}};{{/if}}
{{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($t['color_style']) and is_array($t['color_style']) and isset($form_table_data_detail[$t['color_key']]) and isset($t['color_style'][$form_table_data_detail[$t['color_key']]]) and substr($t['color_style'][$form_table_data_detail[$t['color_key']]], 0, 1) eq '#'}}color: {{$t['color_style'][$form_table_data_detail[$t['color_key']]]}};{{/if}}"
{{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_detail[$t['popover_field']])}}data-am-popover="{content: '{{$form_table_data_detail[$t['popover_field']]|raw}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
{{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_detail[$t['popover_field']])}}data-am-popover="{content: '{{:PopoverContentHandle($form_table_data_detail[$t['popover_field']])}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
>
<!-- 图标+提示 -->
{{if isset($t['is_first_tips']) and $t['is_first_tips'] eq 1 and ((!empty($t['first_tips_key']) and !empty($form_table_data_detail[$t['first_tips_key']])) or (!empty($t['first_tips_data'])))}}
<a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_detail[$t['first_tips_key']])}}{{$form_table_data_detail[$t['first_tips_key']]}}{{else /}}{{$t.first_tips_data}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
<a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_detail[$t['first_tips_key']])}}{{:PopoverContentHandle($form_table_data_detail[$t['first_tips_key']])}}{{else /}}{{:PopoverContentHandle($t.first_tips_data)}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
{{/if}}
<!-- 连接+提示 -->
{{if isset($t['is_first_link']) and $t['is_first_link'] eq 1 and ((!empty($t['first_link_key']) and !empty($form_table_data_detail[$t['first_link_key']])) or (!empty($t['first_link_data'])))}}
<a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_detail[$t['first_link_key']])}}{{$form_table_data_detail[$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{$t.first_link_popover}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
<a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_detail[$t['first_link_key']])}}{{$form_table_data_detail[$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{:PopoverContentHandle($t.first_link_popover)}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
{{/if}}
<!-- 圆点 -->

View File

@ -67,7 +67,7 @@
{{switch $t.search_config.form_type}}
{{case input}}
<!-- 输入 -->
<input type="text" class="am-form-field am-radius" autocomplete="off" name="{{$t.form_key}}" value="{{if !empty($form_params) and isset($form_params[$t['form_key']])}}{{$form_params[$t['form_key']]}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder'])}}{{$t.search_config.placeholder}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key']])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key']]}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" class="am-form-field am-radius" autocomplete="off" name="{{$t.form_key}}" value="{{if !empty($form_params) and isset($form_params[$t['form_key']])}}{{$form_params[$t['form_key']]}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder'])}}{{$t.search_config.placeholder}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key']])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key']])}}', trigger: 'hover focus'}"{{/if}} />
{{/case}}
{{case select}}
<!-- 选择 -->
@ -100,27 +100,27 @@
{{case section}}
<!-- 区间 -->
<div class="form-table-search-section">
<input type="number" class="am-form-field am-radius am-inline-block" autocomplete="off" name="{{$t.form_key}}_min" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_min'])}}{{$form_params[$t['form_key'].'_min']}}{{/if}}" {{if isset($t['search_config']['is_point']) and $t['search_config']['is_point'] eq 1}}step="0.01"{{/if}} min="0" placeholder="{{if isset($t['search_config']['placeholder_min'])}}{{$t.search_config.placeholder_min}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_min'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_min']}}', trigger: 'hover focus'}"{{/if}} />
<input type="number" class="am-form-field am-radius am-inline-block" autocomplete="off" name="{{$t.form_key}}_min" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_min'])}}{{$form_params[$t['form_key'].'_min']}}{{/if}}" {{if isset($t['search_config']['is_point']) and $t['search_config']['is_point'] eq 1}}step="0.01"{{/if}} min="0" placeholder="{{if isset($t['search_config']['placeholder_min'])}}{{$t.search_config.placeholder_min}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_min'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_min'])}}', trigger: 'hover focus'}"{{/if}} />
<span>-</span>
<input type="number" class="am-form-field am-radius am-inline-block" autocomplete="off" name="{{$t.form_key}}_max" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_max'])}}{{$form_params[$t['form_key'].'_max']}}{{/if}}" {{if isset($t['search_config']['is_point']) and $t['search_config']['is_point'] eq 1}}step="0.01"{{/if}} min="0" placeholder="{{if isset($t['search_config']['placeholder_max'])}}{{$t.search_config.placeholder_max}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_max'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_max']}}', trigger: 'hover focus'}"{{/if}} />
<input type="number" class="am-form-field am-radius am-inline-block" autocomplete="off" name="{{$t.form_key}}_max" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_max'])}}{{$form_params[$t['form_key'].'_max']}}{{/if}}" {{if isset($t['search_config']['is_point']) and $t['search_config']['is_point'] eq 1}}step="0.01"{{/if}} min="0" placeholder="{{if isset($t['search_config']['placeholder_max'])}}{{$t.search_config.placeholder_max}}{{/if}}" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_max'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_max'])}}', trigger: 'hover focus'}"{{/if}} />
</div>
{{/case}}
{{case datetime}}
<div class="form-table-search-section form-table-search-time">
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-start-{{$t.form_key}}" name="{{$t.form_key}}_start" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}}{{$form_params[$t['form_key'].'_start']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_start'])}}{{$t.search_config.placeholder_start}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd H:mm:ss',maxDate:'#F{$dp.$D(\'form-table-search-time-end-{{$t.form_key}}\');}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_start']}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-start-{{$t.form_key}}" name="{{$t.form_key}}_start" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}}{{$form_params[$t['form_key'].'_start']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_start'])}}{{$t.search_config.placeholder_start}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd H:mm:ss',maxDate:'#F{$dp.$D(\'form-table-search-time-end-{{$t.form_key}}\');}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_start'])}}', trigger: 'hover focus'}"{{/if}} />
<span>-</span>
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-end-{{$t.form_key}}" name="{{$t.form_key}}_end" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}}{{$form_params[$t['form_key'].'_end']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_end'])}}{{$t.search_config.placeholder_end}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd H:mm:ss',minDate:'#F{$dp.$D(\'form-table-search-time-start-{{$t.form_key}}\');}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_end']}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-end-{{$t.form_key}}" name="{{$t.form_key}}_end" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}}{{$form_params[$t['form_key'].'_end']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_end'])}}{{$t.search_config.placeholder_end}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd H:mm:ss',minDate:'#F{$dp.$D(\'form-table-search-time-start-{{$t.form_key}}\');}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_end'])}}', trigger: 'hover focus'}"{{/if}} />
</div>
{{/case}}
{{case date}}
<div class="form-table-search-section form-table-search-time">
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-start-{{$t.form_key}}" name="{{$t.form_key}}_start" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}}{{$form_params[$t['form_key'].'_start']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_start'])}}{{$t.search_config.placeholder_start}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'form-table-search-time-end-{{$t.form_key}}\',{d:-1});}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_start']}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-start-{{$t.form_key}}" name="{{$t.form_key}}_start" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}}{{$form_params[$t['form_key'].'_start']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_start'])}}{{$t.search_config.placeholder_start}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'form-table-search-time-end-{{$t.form_key}}\',{d:-1});}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_start'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_start'])}}', trigger: 'hover focus'}"{{/if}} />
<span>-</span>
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-end-{{$t.form_key}}" name="{{$t.form_key}}_end" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}}{{$form_params[$t['form_key'].'_end']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_end'])}}{{$t.search_config.placeholder_end}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'form-table-search-time-start-{{$t.form_key}}\',{d:+1});}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key'].'_end']}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius am-inline-block Wdate" id="form-table-search-time-end-{{$t.form_key}}" name="{{$t.form_key}}_end" value="{{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}}{{$form_params[$t['form_key'].'_end']}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder_end'])}}{{$t.search_config.placeholder_end}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'form-table-search-time-start-{{$t.form_key}}\',{d:+1});}'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key'].'_end'])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key'].'_end'])}}', trigger: 'hover focus'}"{{/if}} />
</div>
{{/case}}
{{case ym}}
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius Wdate" name="{{$t.form_key}}" value="{{if !empty($form_params) and isset($form_params[$t['form_key']])}}{{$form_params[$t['form_key']]}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder'])}}{{$t.search_config.placeholder}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key']])}} data-am-popover="{theme: 'sm', content: '{{$form_params[$t['form_key']]}}', trigger: 'hover focus'}"{{/if}} />
<input type="text" autocomplete="off" class="am-form-field am-input-sm am-radius Wdate" name="{{$t.form_key}}" value="{{if !empty($form_params) and isset($form_params[$t['form_key']])}}{{$form_params[$t['form_key']]}}{{/if}}" placeholder="{{if isset($t['search_config']['placeholder'])}}{{$t.search_config.placeholder}}{{/if}}" value="" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM'})" autocomplete="off" {{if isset($t['search_config']['is_disabled']) and $t['search_config']['is_disabled'] eq 1}} disabled{{/if}} {{if !empty($form_params) and isset($form_params[$t['form_key']])}} data-am-popover="{theme: 'sm', content: '{{:PopoverContentHandle($form_params[$t['form_key']])}}', trigger: 'hover focus'}"{{/if}} />
{{/case}}
{{case module}}
<!-- 从模块加载自定义模块数据 -->
@ -203,16 +203,16 @@
style="
{{if isset($t['is_badge']) and $t['is_badge'] eq 1 and !empty($t['badge_key']) and !empty($t['badge_style']) and is_array($t['badge_style']) and isset($form_table_data_list[$i][$t['badge_key']]) and isset($t['badge_style'][$form_table_data_list[$i][$t['badge_key']]]) and substr($t['badge_style'][$form_table_data_list[$i][$t['badge_key']]], 0, 1) eq '#'}}background: {{$t['badge_style'][$form_table_data_list[$i][$t['badge_key']]]}};{{/if}}
{{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($t['color_style']) and is_array($t['color_style']) and isset($form_table_data_list[$i][$t['color_key']]) and isset($t['color_style'][$form_table_data_list[$i][$t['color_key']]]) and substr($t['color_style'][$form_table_data_list[$i][$t['color_key']]], 0, 1) eq '#'}}color: {{$t['color_style'][$form_table_data_list[$i][$t['color_key']]]}};{{/if}}"
{{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_list[$i][$t['popover_field']])}}data-am-popover="{content: '{{$form_table_data_list[$i][$t['popover_field']]|raw}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
{{if isset($t['is_popover']) and $t['is_popover'] eq 1 and !empty($t['popover_field']) and !empty($form_table_data_list[$i][$t['popover_field']])}}data-am-popover="{content: '{{:PopoverContentHandle($form_table_data_list[$i][$t['popover_field']])}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}
>
<!-- 图标+提示 -->
{{if isset($t['is_first_tips']) and $t['is_first_tips'] eq 1 and ((!empty($t['first_tips_key']) and !empty($form_table_data_list[$i][$t['first_tips_key']])) or (!empty($t['first_tips_data'])))}}
<a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_list[$i][$t['first_tips_key']])}}{{$form_table_data_list[$i][$t['first_tips_key']]}}{{else /}}{{$t.first_tips_data}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
<a href="javascript:;" class="am-margin-right-xs {{if !empty($t['first_tips_style'])}}am-text-{{$t.first_tips_style}}{{/if}} am-icon-{{if empty($t['first_tips_icon'])}}exclamation-circle{{else /}}{{$t.first_tips_icon}}{{/if}}" data-am-popover="{content: '{{if !empty($t['first_tips_key']) and !empty($form_table_data_list[$i][$t['first_tips_key']])}}{{:PopoverContentHandle($form_table_data_list[$i][$t['first_tips_key']])}}{{else /}}{{:PopoverContentHandle($t.first_tips_data)}}{{/if}}', trigger: 'hover focus', theme: '{{if !empty($t['first_tips_style'])}}{{$t.first_tips_style}}{{/if}} sm'}"></a>
{{/if}}
<!-- 连接+提示 -->
{{if isset($t['is_first_link']) and $t['is_first_link'] eq 1 and ((!empty($t['first_link_key']) and !empty($form_table_data_list[$i][$t['first_link_key']])) or (!empty($t['first_link_data'])))}}
<a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_list[$i][$t['first_link_key']])}}{{$form_table_data_list[$i][$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{$t.first_link_popover}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
<a href="{{if !empty($t['first_link_key']) and !empty($form_table_data_list[$i][$t['first_link_key']])}}{{$form_table_data_list[$i][$t['first_link_key']]}}{{else /}}{{$t.first_link_data}}{{/if}}" class="am-margin-right-xs {{if !empty($t['first_link_style'])}}am-text-{{$t.first_link_style}}{{/if}} am-icon-{{if empty($t['first_link_icon'])}}external-link{{else /}}{{$t.first_link_icon}}{{/if}}" target="_blank" {{if !empty($t['first_link_popover'])}}data-am-popover="{content: '{{:PopoverContentHandle($t.first_link_popover)}}', trigger: 'hover focus', theme: 'sm'}"{{/if}}></a>
{{/if}}
<!-- 圆点 -->

View File

@ -0,0 +1,7 @@
<div class="am-modal am-page-loading">
{{if isset($is_page_loading_images) and $is_page_loading_images eq 1}}
<img src="{{$attachment_host}}/static/common/images/loading.gif" />
{{else /}}
<span class="am-icon-spinner am-icon-pulse am-icon-lg"></span>
{{/if}}
</div>

View File

@ -672,7 +672,7 @@ button.colorpicker-submit img {
*/
.am-page-loading {
opacity: 1;
background: #f5f5f5;
background: #fafafa;
display: block;
}
@ -787,6 +787,9 @@ button.colorpicker-submit img {
-moz-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.2);
box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.2);
}
.am-table-scrollable-horizontal .am-table > thead > tr > td {
border-bottom: 1px solid rgba(0,0,0,.06);
}
.am-table-scrollable-horizontal .am-table > thead > tr > td,
.am-table-scrollable-horizontal .am-table > tbody > tr:first-child > td {
border-top: 0px !important;
@ -1173,4 +1176,20 @@ form .am-tab-panel .am-form-group:last-child {
}
.richtext p {
margin:5px 0;
}
/**
*
*/
.form-legend-fixed {
position: sticky;
top: 0;
background: #fff;
z-index: 10;
}
.form-legend-fixed-right button {
border: 0px;
}
.form-legend-fixed-right .am-badge:not(:first-child) {
margin-left: 10px;
}

View File

@ -2107,29 +2107,51 @@ function FormTableContainerInit()
$(this).find('.am-grid-fixed-right').first().addClass('am-grid-fixed-right-shadow');
});
// 右侧操作栏更多按钮显示容器宽度处理
// 右侧操作栏更多按钮显示容器宽度处理点击事件、鼠标进入和移除事件
$('.am-table-scrollable-horizontal .am-table tr .am-operate-grid-more-list button.am-dropdown-toggle').on('click', function()
{
var $parent = $(this).parent();
var length = $parent.find('.am-dropdown-content .am-badge').length;
if(length == 0)
{
Prompt(window['lang_not_operate_error'] || '没有相关操作', 'warning');
$parent.removeClass('am-active');
$parent.find('.am-dropdown-content').remove();
} else {
if(length > 1)
{
var width = ((length-1)*10)+30;
$parent.find('.am-dropdown-content .am-badge').each(function(k, v)
{
width += $(this).outerWidth();
});
$parent.find('.am-dropdown-content').css('width', width+'px');
}
$parent.addClass('am-dropdown-flip');
}
FormTableContainerOperateGridMoreListInit($(this));
});
$('.am-table-scrollable-horizontal .am-table tr .am-operate-grid-more-list button.am-dropdown-toggle').on('mouseenter', function()
{
FormTableContainerOperateGridMoreListInit($(this));
});
$('.am-table-scrollable-horizontal .am-table tr .am-operate-grid-more-list button.am-dropdown-toggle').on('mouseleave', function()
{
FormTableContainerOperateGridMoreListInit($(this));
});
}
}
/**
* 表格容器列表更多操作处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2022-09-27
* @desc description
* @param {[object]} e [当前对象]
*/
function FormTableContainerOperateGridMoreListInit(e)
{
var $parent = e.parent();
var length = $parent.find('.am-dropdown-content .am-badge').length;
if(length == 0)
{
Prompt(window['lang_not_operate_error'] || '没有相关操作', 'warning');
$parent.removeClass('am-active');
$parent.find('.am-dropdown-content').remove();
} else {
if(length > 1)
{
var width = ((length-1)*10)+30;
$parent.find('.am-dropdown-content .am-badge').each(function(k, v)
{
width += e.outerWidth();
});
$parent.find('.am-dropdown-content').css('width', width+'px');
}
$parent.addClass('am-dropdown-flip');
}
}
@ -2477,7 +2499,7 @@ function JsonStringToJsonObject(value)
{
if((value || null) != null && typeof(value) == 'string')
{
value = JSON.parse(print_data);
value = eval('(' + value + ')');
}
return value;
}
@ -2495,11 +2517,25 @@ function JsonObjectToJsonString(value)
{
if((value || null) != null && typeof(value) == 'object')
{
value = JSON.stringify(print_data);
value = JSON.stringify(value);
}
return value;
}
/**
* 弹出内容处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2022-09-26
* @desc description
* @param [string] content [展示的内容]
*/
function PopoverContentHandle(content)
{
return content.replace(new RegExp("\n", 'g'), '<br />').replace(new RegExp("'", 'g'), '').replace(new RegExp('"', 'g'), '');
}
// 公共数据操作
$(function()
@ -2799,12 +2835,10 @@ $(function()
}
});
/**
* 页面加载 loading
*/
// 页面加载loading
if($('.am-page-loading').length > 0)
{
$('.am-page-loading').fadeOut(500);
$('.am-page-loading').fadeOut(800);
}
// 全屏操作
@ -3698,4 +3732,69 @@ $(function()
window.close();
}
});
// dropdown组件hover显示
$(document).on('mouseenter', '.am-dropdown .am-dropdown-toggle', function()
{
$('body .am-dropdown').each(function(k, v)
{
var config = JsonStringToJsonObject($(this).attr('data-am-dropdown')) || null;
if(config != null && (config.trigger || null) == 'hover')
{
$(this).dropdown('close');
}
});
var $parent = $(this).parent();
var config = JsonStringToJsonObject($parent.attr('data-am-dropdown')) || null;
if(config != null && (config.trigger || null) == 'hover')
{
if($parent.find('.am-dropdown-content').css('display') != 'block')
{
$parent.find('.am-dropdown-content').attr('data-is-stay', 1);
$parent.dropdown('open');
}
}
});
$(document).on('mouseleave', '.am-dropdown .am-dropdown-toggle', function()
{
var $parent = $(this).parent();
var config = JsonStringToJsonObject($parent.attr('data-am-dropdown')) || null;
if(config != null && (config.trigger || null) == 'hover')
{
$parent.find('.am-dropdown-content').attr('data-is-stay', 0);
setTimeout(function()
{
if((parseInt($parent.find('.am-dropdown-content').attr('data-is-stay') || 0)) == 0)
{
$parent.dropdown('close');
}
}, 1000);
}
});
$(document).on('mouseenter', '.am-dropdown .am-dropdown-content', function()
{
var $parent = $(this).parent();
var config = JsonStringToJsonObject($parent.attr('data-am-dropdown')) || null;
if(config != null && (config.trigger || null) == 'hover')
{
$(this).attr('data-is-stay', 1);
}
});
$(document).on('mouseleave', '.am-dropdown .am-dropdown-content', function()
{
var $parent = $(this).parent();
var config = JsonStringToJsonObject($parent.attr('data-am-dropdown')) || null;
if(config != null && (config.trigger || null) == 'hover')
{
$(this).attr('data-is-stay', 0);
$parent.dropdown('close');
}
});
// 返回上一页、默认-1
$(document).on('click', '.back-submit-event', function()
{
var number = $(this).data('number') || '-1';
window.history.go(number);
});
});

View File

@ -154,8 +154,7 @@
background-clip: padding-box
}
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
position: absolute;
left: -9999px
display: none;
}
.chosen-container .chosen-results {
color: #444;

View File

@ -2088,6 +2088,8 @@ th {
/* Bordered version */
.am-table-bordered {
border: 1px solid rgba(0,0,0,.06);
}
table.am-table-bordered {
border-left: none;
}
.am-table-bordered > thead > tr > th,