数据列表新增圆点,文本颜色,文本微章+细节优化

feat/task1-c-wallet
gongfuxiang 2022-09-14 19:10:54 +08:00
parent fa5da47f46
commit 816f5b288d
10 changed files with 346 additions and 174 deletions

View File

@ -54,54 +54,77 @@
{{/if}}
<dl class="dl-content">
{{foreach $form_table.form as $t}}
{{if isset($t['label']) and isset($t['view_type']) and in_array($t['view_type'], ['field', 'module', 'status']) and (!isset($t['is_detail']) or $t['is_detail'] eq 1)}}
{{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)}}
<dt><strong>{{$t.label}}</strong></dt>
<dd>
{{switch $t.view_type}}
{{case field}}
<!-- 前后固定拼接的值 前面 -->
{{if isset($t['view_join_first'])}}
<span>{{$t.view_join_first}}</span>
{{case images}}
{{if !empty($form_table_data_detail[$t['view_key']])}}
<img src="{{$form_table_data_detail[$t['view_key']]}}" class="am-img-thumbnail {{if !empty($t['images_shape'])}}am-{{$t.images_shape}}{{/if}}" style="{{if !empty($t['images_width'])}}width:{{$t.images_width}}px;{{/if}}{{if !empty($t['images_height'])}}height:{{$t.images_width}}px;{{/if}}" />
{{/if}}
{{/case}}
{{case field}}
<p class="
{{if isset($t['is_badge']) and $t['is_badge'] eq 1}}
am-badge {{if !empty($t['badge_key']) and !empty($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) neq '#'}}am-badge-{{$t['badge_style'][$form_table_data_detail[$t['badge_key']]]}} {{/if}}
{{if !empty($t['badge_shape'])}}am-{{$t.badge_shape}} {{/if}}
{{/if}}
{{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($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) neq '#'}}am-text-{{$t['color_style'][$form_table_data_detail[$t['color_key']]]}}{{/if}}
{{if !empty($t['text_truncate'])}}am-text-truncate{{if $t['text_truncate'] eq 2}}-2{{/if}}{{/if}}"
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_round_point']) and $t['is_round_point'] eq 1}}
<i class="am-icon-circle am-margin-right-xs {{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_detail[$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]], 0, 1) neq '#'}}am-text-{{$t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]}}{{/if}}"
style="{{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_detail[$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]], 0, 1) eq '#'}}color: {{$t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]}};{{/if}}"></i>
{{/if}}
<!-- 如果字段为数组则处理多个字段拼接数据 -->
{{if is_array($t['view_key'])}}
{{foreach $t['view_key'] as $fk=>$fv}}
{{if isset($form_table_data_detail[$fv])}}
{{$form_table_data_detail[$fv]}}
<!-- 多个字段拼接数据的的拼接字符 -->
{{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
{{$t.view_key_join|raw}}
{{/if}}
{{/if}}
{{/foreach}}
{{else /}}
<!-- 是否存在数据 key -->
{{if isset($form_table_data_detail[$t['view_key']])}}
<!-- 是否指定数据转换 -->
{{if !empty($t['view_data']) and is_array($t['view_data'])}}
<!-- 不存在数组中则不显示 -->
{{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]])}}
<!-- 是否指定二维数组key取值 -->
{{if !empty($t['view_data_key'])}}
{{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']])}}
{{$t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']]}}
{{/if}}
{{else /}}
{{$t['view_data'][$form_table_data_detail[$t['view_key']]]}}
<!-- 前后固定拼接的值 前面 -->
{{if isset($t['view_join_first'])}}
<span>{{$t.view_join_first}}</span>
{{/if}}
<!-- 如果字段为数组则处理多个字段拼接数据 -->
{{if is_array($t['view_key'])}}
{{foreach $t['view_key'] as $fk=>$fv}}
{{if isset($form_table_data_detail[$fv])}}
{{$form_table_data_detail[$fv]}}
<!-- 多个字段拼接数据的的拼接字符 -->
{{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
{{$t.view_key_join|raw}}
{{/if}}
{{/if}}
{{/foreach}}
{{else /}}
<!-- 是否存在数据 key -->
{{if isset($form_table_data_detail[$t['view_key']])}}
<!-- 是否指定数据转换 -->
{{if !empty($t['view_data']) and is_array($t['view_data'])}}
<!-- 不存在数组中则不显示 -->
{{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]])}}
<!-- 是否指定二维数组key取值 -->
{{if !empty($t['view_data_key'])}}
{{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']])}}
{{$t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']]}}
{{/if}}
{{else /}}
{{$t['view_data'][$form_table_data_detail[$t['view_key']]]}}
{{/if}}
{{/if}}
<!-- 直接展示数据 -->
{{else /}}
{{$form_table_data_detail[$t['view_key']]|raw}}
<!-- 直接展示数据 -->
{{else /}}
{{$form_table_data_detail[$t['view_key']]|raw}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
<!-- 前后固定拼接的值 后面 -->
{{if isset($t['view_join_last'])}}
<span>{{$t.view_join_last}}</span>
{{/if}}
<!-- 前后固定拼接的值 后面 -->
{{if isset($t['view_join_last'])}}
<span>{{$t.view_join_last}}</span>
{{/if}}
</p>
{{/case}}
{{case module}}
<!-- 从模块加载自定义模块数据 -->

View File

@ -1,4 +1,5 @@
<div class="am-scrollable-horizontal am-table-scrollable-horizontal" data-md5-key="{{$form_md5_key}}">
<div class="am-scrollable-horizontal am-table-scrollable-horizontal am-radius" data-md5-key="{{$form_md5_key}}">
{{php}}$form_table_data_list = empty($form_table_data_list) ? (empty($data_list) ? [] : $data_list) : $form_table_data_list;{{/php}}
<table class="am-table am-table-striped am-table-hover am-table-bordered am-text-nowrap form-table-data-list">
<thead>
<tr>
@ -150,7 +151,6 @@
{{/if}}
</thead>
<tbody>
{{php}}$form_table_data_list = empty($form_table_data_list) ? (empty($data_list) ? [] : $data_list) : $form_table_data_list;{{/php}}
{{if !empty($form_table_data_list) and !empty($form_table['base']['key_field'])}}
<!-- 处理数据数量小于默认数量 -->
{{for start="0" end="count($form_table_data_list)"}}
@ -187,50 +187,73 @@
{{if isset($form_table_data_list[$i]) and !empty($t['view_type']) and !empty($t['view_key'])}}
<!-- 数据匹配 -->
{{switch $t.view_type}}
{{case field}}
<!-- 前后固定拼接的值 前面 -->
{{if isset($t['view_join_first'])}}
<span>{{$t.view_join_first}}</span>
{{case images}}
{{if !empty($form_table_data_list[$i][$t['view_key']])}}
<img src="{{$form_table_data_list[$i][$t['view_key']]}}" class="am-img-thumbnail {{if !empty($t['images_shape'])}}am-{{$t.images_shape}}{{/if}}" style="{{if !empty($t['images_width'])}}width:{{$t.images_width}}px;{{/if}}{{if !empty($t['images_height'])}}height:{{$t.images_width}}px;{{/if}}" />
{{/if}}
{{/case}}
{{case field}}
<p class="
{{if isset($t['is_badge']) and $t['is_badge'] eq 1}}
am-badge {{if !empty($t['badge_key']) and !empty($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) neq '#'}}am-badge-{{$t['badge_style'][$form_table_data_list[$i][$t['badge_key']]]}} {{/if}}
{{if !empty($t['badge_shape'])}}am-{{$t.badge_shape}} {{/if}}
{{/if}}
{{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($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) neq '#'}}am-text-{{$t['color_style'][$form_table_data_list[$i][$t['color_key']]]}}{{/if}}
{{if !empty($t['text_truncate'])}}am-text-truncate{{if $t['text_truncate'] eq 2}}-2{{/if}}{{/if}}"
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_round_point']) and $t['is_round_point'] eq 1}}
<i class="am-icon-circle am-margin-right-xs {{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_list[$i][$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]], 0, 1) neq '#'}}am-text-{{$t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]]}}{{/if}}"
style="{{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_list[$i][$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]], 0, 1) eq '#'}}color: {{$t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]]}};{{/if}}"></i>
{{/if}}
<!-- 如果字段为数组则处理多个字段拼接数据 -->
{{if is_array($t['view_key'])}}
{{foreach $t['view_key'] as $fk=>$fv}}
{{if isset($form_table_data_list[$i][$fv])}}
<span>{{$form_table_data_list[$i][$fv]}}</span>
<!-- 多个字段拼接数据的的拼接字符 -->
{{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
<span>{{$t.view_key_join|raw}}</span>
{{/if}}
{{/if}}
{{/foreach}}
{{else /}}
<!-- 是否存在数据 key -->
{{if isset($form_table_data_list[$i][$t['view_key']])}}
<!-- 是否指定数据转换 -->
{{if !empty($t['view_data']) and is_array($t['view_data'])}}
<!-- 不存在数组中则不显示 -->
{{if isset($t['view_data'][$form_table_data_list[$i][$t['view_key']]])}}
<!-- 是否指定二维数组key取值 -->
{{if !empty($t['view_data_key'])}}
{{if isset($t['view_data'][$form_table_data_list[$i][$t['view_key']]][$t['view_data_key']])}}
{{$t['view_data'][$form_table_data_list[$i][$t['view_key']]][$t['view_data_key']]}}
{{/if}}
{{else /}}
{{$t['view_data'][$form_table_data_list[$i][$t['view_key']]]}}
<!-- 前后固定拼接的值 前面 -->
{{if isset($t['view_join_first'])}}
<span>{{$t.view_join_first}}</span>
{{/if}}
<!-- 如果字段为数组则处理多个字段拼接数据 -->
{{if is_array($t['view_key'])}}
{{foreach $t['view_key'] as $fk=>$fv}}
{{if isset($form_table_data_list[$i][$fv])}}
<span>{{$form_table_data_list[$i][$fv]}}</span>
<!-- 多个字段拼接数据的的拼接字符 -->
{{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
<span>{{$t.view_key_join|raw}}</span>
{{/if}}
{{/if}}
{{/foreach}}
{{else /}}
<!-- 是否存在数据 key -->
{{if isset($form_table_data_list[$i][$t['view_key']])}}
<!-- 是否指定数据转换 -->
{{if !empty($t['view_data']) and is_array($t['view_data'])}}
<!-- 不存在数组中则不显示 -->
{{if isset($t['view_data'][$form_table_data_list[$i][$t['view_key']]])}}
<!-- 是否指定二维数组key取值 -->
{{if !empty($t['view_data_key'])}}
{{if isset($t['view_data'][$form_table_data_list[$i][$t['view_key']]][$t['view_data_key']])}}
{{$t['view_data'][$form_table_data_list[$i][$t['view_key']]][$t['view_data_key']]}}
{{/if}}
{{else /}}
{{$t['view_data'][$form_table_data_list[$i][$t['view_key']]]}}
{{/if}}
{{/if}}
<!-- 直接展示数据 -->
{{else /}}
{{$form_table_data_list[$i][$t['view_key']]|raw}}
<!-- 直接展示数据 -->
{{else /}}
{{$form_table_data_list[$i][$t['view_key']]|raw}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
<!-- 前后固定拼接的值 后面 -->
{{if isset($t['view_join_last'])}}
<span>{{$t.view_join_last}}</span>
{{/if}}
<!-- 前后固定拼接的值 后面 -->
{{if isset($t['view_join_last'])}}
<span>{{$t.view_join_last}}</span>
{{/if}}
</p>
{{/case}}
{{case module}}
<!-- 从模块加载自定义模块数据 -->

View File

@ -223,7 +223,7 @@ class Order extends Common
/**
* [Cancel 订单取消]
* 订单取消
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
@ -239,7 +239,7 @@ class Order extends Common
}
/**
* [Collect 订单收货]
* 订单收货
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0

View File

@ -54,54 +54,77 @@
{{/if}}
<dl class="dl-content">
{{foreach $form_table.form as $t}}
{{if isset($t['label']) and isset($t['view_type']) and in_array($t['view_type'], ['field', 'module', 'status']) and (!isset($t['is_detail']) or $t['is_detail'] eq 1)}}
{{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)}}
<dt><strong>{{$t.label}}</strong></dt>
<dd>
{{switch $t.view_type}}
{{case field}}
<!-- 前后固定拼接的值 前面 -->
{{if isset($t['view_join_first'])}}
<span>{{$t.view_join_first}}</span>
{{case images}}
{{if !empty($form_table_data_detail[$t['view_key']])}}
<img src="{{$form_table_data_detail[$t['view_key']]}}" class="am-img-thumbnail {{if !empty($t['images_shape'])}}am-{{$t.images_shape}}{{/if}}" style="{{if !empty($t['images_width'])}}width:{{$t.images_width}}px;{{/if}}{{if !empty($t['images_height'])}}height:{{$t.images_width}}px;{{/if}}" />
{{/if}}
{{/case}}
{{case field}}
<p class="
{{if isset($t['is_badge']) and $t['is_badge'] eq 1}}
am-badge {{if !empty($t['badge_key']) and !empty($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) neq '#'}}am-badge-{{$t['badge_style'][$form_table_data_detail[$t['badge_key']]]}} {{/if}}
{{if !empty($t['badge_shape'])}}am-{{$t.badge_shape}} {{/if}}
{{/if}}
{{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($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) neq '#'}}am-text-{{$t['color_style'][$form_table_data_detail[$t['color_key']]]}}{{/if}}
{{if !empty($t['text_truncate'])}}am-text-truncate{{if $t['text_truncate'] eq 2}}-2{{/if}}{{/if}}"
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_round_point']) and $t['is_round_point'] eq 1}}
<i class="am-icon-circle am-margin-right-xs {{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_detail[$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]], 0, 1) neq '#'}}am-text-{{$t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]}}{{/if}}"
style="{{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_detail[$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_detail[$t['round_point_key']]], 0, 1) eq '#'}}color: {{$t['round_point_style'][$form_table_data_detail[$t['round_point_key']]]}};{{/if}}"></i>
{{/if}}
<!-- 如果字段为数组则处理多个字段拼接数据 -->
{{if is_array($t['view_key'])}}
{{foreach $t['view_key'] as $fk=>$fv}}
{{if isset($form_table_data_detail[$fv])}}
{{$form_table_data_detail[$fv]}}
<!-- 多个字段拼接数据的的拼接字符 -->
{{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
{{$t.view_key_join|raw}}
{{/if}}
{{/if}}
{{/foreach}}
{{else /}}
<!-- 是否存在数据 key -->
{{if isset($form_table_data_detail[$t['view_key']])}}
<!-- 是否指定数据转换 -->
{{if !empty($t['view_data']) and is_array($t['view_data'])}}
<!-- 不存在数组中则不显示 -->
{{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]])}}
<!-- 是否指定二维数组key取值 -->
{{if !empty($t['view_data_key'])}}
{{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']])}}
{{$t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']]}}
{{/if}}
{{else /}}
{{$t['view_data'][$form_table_data_detail[$t['view_key']]]}}
<!-- 前后固定拼接的值 前面 -->
{{if isset($t['view_join_first'])}}
<span>{{$t.view_join_first}}</span>
{{/if}}
<!-- 如果字段为数组则处理多个字段拼接数据 -->
{{if is_array($t['view_key'])}}
{{foreach $t['view_key'] as $fk=>$fv}}
{{if isset($form_table_data_detail[$fv])}}
{{$form_table_data_detail[$fv]}}
<!-- 多个字段拼接数据的的拼接字符 -->
{{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
{{$t.view_key_join|raw}}
{{/if}}
{{/if}}
{{/foreach}}
{{else /}}
<!-- 是否存在数据 key -->
{{if isset($form_table_data_detail[$t['view_key']])}}
<!-- 是否指定数据转换 -->
{{if !empty($t['view_data']) and is_array($t['view_data'])}}
<!-- 不存在数组中则不显示 -->
{{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]])}}
<!-- 是否指定二维数组key取值 -->
{{if !empty($t['view_data_key'])}}
{{if isset($t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']])}}
{{$t['view_data'][$form_table_data_detail[$t['view_key']]][$t['view_data_key']]}}
{{/if}}
{{else /}}
{{$t['view_data'][$form_table_data_detail[$t['view_key']]]}}
{{/if}}
{{/if}}
<!-- 直接展示数据 -->
{{else /}}
{{$form_table_data_detail[$t['view_key']]|raw}}
<!-- 直接展示数据 -->
{{else /}}
{{$form_table_data_detail[$t['view_key']]|raw}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
<!-- 前后固定拼接的值 后面 -->
{{if isset($t['view_join_last'])}}
<span>{{$t.view_join_last}}</span>
{{/if}}
<!-- 前后固定拼接的值 后面 -->
{{if isset($t['view_join_last'])}}
<span>{{$t.view_join_last}}</span>
{{/if}}
</p>
{{/case}}
{{case module}}
<!-- 从模块加载自定义模块数据 -->

View File

@ -1,4 +1,5 @@
<div class="am-scrollable-horizontal am-table-scrollable-horizontal" data-md5-key="{{$form_md5_key}}">
<div class="am-scrollable-horizontal am-table-scrollable-horizontal am-radius" data-md5-key="{{$form_md5_key}}">
{{php}}$form_table_data_list = empty($form_table_data_list) ? (empty($data_list) ? [] : $data_list) : $form_table_data_list;{{/php}}
<table class="am-table am-table-striped am-table-hover am-table-bordered am-text-nowrap form-table-data-list">
<thead>
<tr>
@ -150,7 +151,6 @@
{{/if}}
</thead>
<tbody>
{{php}}$form_table_data_list = empty($form_table_data_list) ? (empty($data_list) ? [] : $data_list) : $form_table_data_list;{{/php}}
{{if !empty($form_table_data_list) and !empty($form_table['base']['key_field'])}}
<!-- 处理数据数量小于默认数量 -->
{{for start="0" end="count($form_table_data_list)"}}
@ -187,50 +187,73 @@
{{if isset($form_table_data_list[$i]) and !empty($t['view_type']) and !empty($t['view_key'])}}
<!-- 数据匹配 -->
{{switch $t.view_type}}
{{case field}}
<!-- 前后固定拼接的值 前面 -->
{{if isset($t['view_join_first'])}}
<span>{{$t.view_join_first}}</span>
{{case images}}
{{if !empty($form_table_data_list[$i][$t['view_key']])}}
<img src="{{$form_table_data_list[$i][$t['view_key']]}}" class="am-img-thumbnail {{if !empty($t['images_shape'])}}am-{{$t.images_shape}}{{/if}}" style="{{if !empty($t['images_width'])}}width:{{$t.images_width}}px;{{/if}}{{if !empty($t['images_height'])}}height:{{$t.images_width}}px;{{/if}}" />
{{/if}}
{{/case}}
{{case field}}
<p class="
{{if isset($t['is_badge']) and $t['is_badge'] eq 1}}
am-badge {{if !empty($t['badge_key']) and !empty($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) neq '#'}}am-badge-{{$t['badge_style'][$form_table_data_list[$i][$t['badge_key']]]}} {{/if}}
{{if !empty($t['badge_shape'])}}am-{{$t.badge_shape}} {{/if}}
{{/if}}
{{if isset($t['is_color']) and $t['is_color'] eq 1 and !empty($t['color_key']) and !empty($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) neq '#'}}am-text-{{$t['color_style'][$form_table_data_list[$i][$t['color_key']]]}}{{/if}}
{{if !empty($t['text_truncate'])}}am-text-truncate{{if $t['text_truncate'] eq 2}}-2{{/if}}{{/if}}"
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_round_point']) and $t['is_round_point'] eq 1}}
<i class="am-icon-circle am-margin-right-xs {{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_list[$i][$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]], 0, 1) neq '#'}}am-text-{{$t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]]}}{{/if}}"
style="{{if !empty($t['round_point_key']) and !empty($t['round_point_style']) and is_array($t['round_point_style']) and isset($form_table_data_list[$i][$t['round_point_key']]) and isset($t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]]) and substr($t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]], 0, 1) eq '#'}}color: {{$t['round_point_style'][$form_table_data_list[$i][$t['round_point_key']]]}};{{/if}}"></i>
{{/if}}
<!-- 如果字段为数组则处理多个字段拼接数据 -->
{{if is_array($t['view_key'])}}
{{foreach $t['view_key'] as $fk=>$fv}}
{{if isset($form_table_data_list[$i][$fv])}}
<span>{{$form_table_data_list[$i][$fv]}}</span>
<!-- 多个字段拼接数据的的拼接字符 -->
{{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
<span>{{$t.view_key_join|raw}}</span>
{{/if}}
{{/if}}
{{/foreach}}
{{else /}}
<!-- 是否存在数据 key -->
{{if isset($form_table_data_list[$i][$t['view_key']])}}
<!-- 是否指定数据转换 -->
{{if !empty($t['view_data']) and is_array($t['view_data'])}}
<!-- 不存在数组中则不显示 -->
{{if isset($t['view_data'][$form_table_data_list[$i][$t['view_key']]])}}
<!-- 是否指定二维数组key取值 -->
{{if !empty($t['view_data_key'])}}
{{if isset($t['view_data'][$form_table_data_list[$i][$t['view_key']]][$t['view_data_key']])}}
{{$t['view_data'][$form_table_data_list[$i][$t['view_key']]][$t['view_data_key']]}}
{{/if}}
{{else /}}
{{$t['view_data'][$form_table_data_list[$i][$t['view_key']]]}}
<!-- 前后固定拼接的值 前面 -->
{{if isset($t['view_join_first'])}}
<span>{{$t.view_join_first}}</span>
{{/if}}
<!-- 如果字段为数组则处理多个字段拼接数据 -->
{{if is_array($t['view_key'])}}
{{foreach $t['view_key'] as $fk=>$fv}}
{{if isset($form_table_data_list[$i][$fv])}}
<span>{{$form_table_data_list[$i][$fv]}}</span>
<!-- 多个字段拼接数据的的拼接字符 -->
{{if isset($t['view_key_join']) and $fk lt count($t['view_key'])-1}}
<span>{{$t.view_key_join|raw}}</span>
{{/if}}
{{/if}}
{{/foreach}}
{{else /}}
<!-- 是否存在数据 key -->
{{if isset($form_table_data_list[$i][$t['view_key']])}}
<!-- 是否指定数据转换 -->
{{if !empty($t['view_data']) and is_array($t['view_data'])}}
<!-- 不存在数组中则不显示 -->
{{if isset($t['view_data'][$form_table_data_list[$i][$t['view_key']]])}}
<!-- 是否指定二维数组key取值 -->
{{if !empty($t['view_data_key'])}}
{{if isset($t['view_data'][$form_table_data_list[$i][$t['view_key']]][$t['view_data_key']])}}
{{$t['view_data'][$form_table_data_list[$i][$t['view_key']]][$t['view_data_key']]}}
{{/if}}
{{else /}}
{{$t['view_data'][$form_table_data_list[$i][$t['view_key']]]}}
{{/if}}
{{/if}}
<!-- 直接展示数据 -->
{{else /}}
{{$form_table_data_list[$i][$t['view_key']]|raw}}
<!-- 直接展示数据 -->
{{else /}}
{{$form_table_data_list[$i][$t['view_key']]|raw}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
<!-- 前后固定拼接的值 后面 -->
{{if isset($t['view_join_last'])}}
<span>{{$t.view_join_last}}</span>
{{/if}}
<!-- 前后固定拼接的值 后面 -->
{{if isset($t['view_join_last'])}}
<span>{{$t.view_join_last}}</span>
{{/if}}
</p>
{{/case}}
{{case module}}
<!-- 从模块加载自定义模块数据 -->

View File

@ -703,6 +703,27 @@ class FormHandleModule
}
}
break;
// 字段
case 'field' :
// 是否开启弹出提示
if(isset($v['is_popover']) && $v['is_popover'] == 1)
{
// 是否指定弹出提示数据字段
if(empty($v['popover_field']) && !empty($v['view_key']) && !is_array($v['view_key']))
{
$v['popover_field'] = $v['view_key'];
}
}
break;
// 图片
case 'images' :
if(empty($v['images_shape']))
{
$v['images_shape'] = 'radius';
}
break;
}
}

View File

@ -36,7 +36,7 @@ html input[disabled] { cursor: default !important; color: #b1b1b1 !important; ba
padding-left: 120px;
}
.dl-content dd:not(:last-child) {
border-bottom: 1px solid #efefef;
border-bottom: 1px solid rgba(0,0,0,.06);
}
.dl-content dt, .dl-content dd {
font-weight: normal !important;
@ -472,6 +472,36 @@ ul.plug-file-upload-view-file li {
padding: 0.6em 1em;
}
/**
*
*/
.am-table-striped > tbody > tr:nth-child(odd) > td, .am-table-striped > tbody > tr:nth-child(odd) > th,
.am-list-striped > li:nth-of-type(even) {
background-color: #fafafa;
}
.am-table-bordered > thead > tr > th, .am-table-bordered > tbody > tr > th, .am-table-bordered > tfoot > tr > th, .am-table-bordered > thead > tr > td, .am-table-bordered > tbody > tr > td, .am-table-bordered > tfoot > tr > td {
border-left: 1px solid rgba(0,0,0,.06);
}
.am-table > thead > tr > th, .am-table > tbody > tr > th, .am-table > tfoot > tr > th, .am-table > thead > tr > td, .am-table > tbody > tr > td, .am-table > tfoot > tr > td {
border-top: 1px solid rgba(0,0,0,.06);
}
.am-table > thead > tr > th {
border-bottom: 1px solid rgba(0,0,0,.06);
}
.am-table-hover > tbody > tr:hover > td, .am-table-hover > tbody > tr:hover > th {
background-color: #f5f5f5;
}
.am-panel-default,
.am-list > li {
border-color: rgba(0,0,0,.06);
}
.am-panel-default > .am-panel-hd {
border-color: transparent;
}
.am-table > thead > tr > td.am-active, .am-table > tbody > tr > td.am-active, .am-table > tfoot > tr > td.am-active, .am-table > thead > tr > th.am-active, .am-table > tbody > tr > th.am-active, .am-table > tfoot > tr > th.am-active, .am-table > thead > tr.am-active > td, .am-table > tbody > tr.am-active > td, .am-table > tfoot > tr.am-active > td, .am-table > thead > tr.am-active > th, .am-table > tbody > tr.am-active > th, .am-table > tfoot > tr.am-active > th {
background-color: #ffffeb;
}
/**
*
*/
@ -645,7 +675,7 @@ button.colorpicker-submit img {
* -
*/
.am-table-scrollable-horizontal {
border: 1px solid #ddd;
border: 1px solid rgba(0,0,0,.06);
position: relative;
}
.am-table-scrollable-horizontal .table-no {
@ -677,7 +707,7 @@ button.colorpicker-submit img {
border-left: 0;
}
.am-table-scrollable-horizontal .am-table tr th {
background: #e8e6e6;
background: #fafafa;
min-width: 100px;
position: sticky;
top: 0;
@ -724,6 +754,10 @@ button.colorpicker-submit img {
background: #fff;
z-index: 4;
}
.am-table-scrollable-horizontal .am-table-striped > tbody > tr:nth-child(odd) > td.am-grid-fixed-left,
.am-table-scrollable-horizontal .am-table-striped > tbody > tr:nth-child(odd) > td.am-grid-fixed-right {
background-color: #fafafa;
}
.am-table-scrollable-horizontal .am-table tr th.am-grid-fixed-left,
.am-table-scrollable-horizontal .am-table tr th.am-grid-fixed-right {
z-index: 5;
@ -739,22 +773,41 @@ button.colorpicker-submit img {
box-shadow: 0px 0px 1px #ddd;
}
.am-table-scrollable-horizontal .am-table tr .am-grid-fixed-left-shadow {
-webkit-box-shadow: 5px 0px 10px rgba(136, 136, 136, 0.3);
-moz-box-shadow: 5px 0px 10px rgba(136, 136, 136, 0.3);
box-shadow: 5px 0px 10px rgba(136, 136, 136, 0.3);
-webkit-box-shadow: 5px 0px 10px rgba(136, 136, 136, 0.2);
-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 tr .am-grid-fixed-right-shadow {
-webkit-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3);
-moz-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3);
box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3);
-webkit-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.2);
-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 #e8e6e6;
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;
}
.am-table-scrollable-horizontal .am-table > tbody > tr > td .am-text-truncate-2 {
max-height: 34px;
height: auto;
}
/**
* -
*/
.am-table-scrollable-horizontal .am-table tr .am-operate-grid-more-list .am-dropdown-content {
padding: 10px;
width: 140px;
min-width: auto;
-webkit-box-shadow: 0px -2px 10px rgb(136 136 136 / 40%);
-moz-box-shadow: 0px -2px 10px rgb(136 136 136 / 0.4);
box-shadow: 0px -2px 10px rgb(136 136 136 / 40%);
}
.am-table-scrollable-horizontal .am-table tr .am-operate-grid-more-list .am-dropdown-content .am-badge:not(:last-child) {
margin-right: 5px;
}
/**
*
@ -779,7 +832,7 @@ button.colorpicker-submit img {
* -
*/
.form-table-search {
background: #eee;
background: #fafafa;
}
.form-table-search td {
padding: 8px !important;
@ -834,7 +887,7 @@ button.colorpicker-submit img {
border-top: 0;
}
.form-table-fields-button-container {
border-top: 1px solid #dedede;
border-top: 1px solid rgba(0,0,0,.06);
height: 50px;
}
.form-table-fields-button-container .form-table-field-confirm-submit {
@ -1076,4 +1129,12 @@ form .am-tab-panel .am-form-group:last-child {
#tree tr:hover .submit {
display: block !important;
}
}
/**
*
*/
.am-popover {
max-width: 260px;
border-radius: 2px;
}

View File

@ -1011,9 +1011,8 @@ function ModalLoad(url, title, class_tag, full, full_max)
* @param {[float]} value [金额]
* @param {[int]} pos [位数 默认2]
*/
function FomatFloat(value, pos)
function FomatFloat(value, pos = 2)
{
pos = pos || 2;
var f_x = Math.round(value*Math.pow(10, pos))/Math.pow(10, pos);
var s_x = f_x.toString();

View File

@ -8512,7 +8512,6 @@ img.am-thumbnail,
line-height: 1.6;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 0;
-webkit-background-clip: padding-box;
background-clip: padding-box;
-webkit-animation-duration: .15s;

View File

@ -581,9 +581,9 @@ ul.am-dropdown-content > .am-active > a:focus,
}
.am-btn-success {
color: #5eb95e !important;
background-color: #E4F3E4;
border-color: #d2e8d2;
color: #258f25 !important;
background-color: #a8e6a8;
border-color: #7fe27f;
}
.am-btn-success:hover, .am-btn-success:focus {
background-color: #5eb95e;