dever 6 years ago
parent
commit
43f0f74464

+ 5 - 5
assets/moltran/html/list.html

@@ -108,12 +108,12 @@
                                         <div id="search"></div>
                                     </div>
                                 </div> 
-                                <div class="panel-body table-rep-plugin"> 
-                                    <div class="table-responsive" data-pattern="priority-columns">
-
-                                        <div id="table_1" style="display:none;"></div>
+                                <div id="table_1" style="display:none;" class="panel-body table-rep-plugin"> 
+                                </div>
+                                <div id="table_2" class="panel-body table-rep-plugin"> 
 
-                                        <div id="table_2">
+                                    <div class="table-responsive" data-pattern="priority-columns">
+                                        <div>
                                             <table id="tech-companies-1" class="table table-small-font table-bordered table-striped table-tool">
                                                 <thead id="list-thead">
                                                     <tr>

File diff suppressed because it is too large
+ 0 - 0
assets/public/echarts/echarts.common.min.js


+ 1 - 1
database/role.php

@@ -357,7 +357,7 @@ $config = array
 		# 开启报表下载 
 		# 涉及到报表下载,如果想使用phpexcel,请用composer安装phpexcel:require中添加 ,"phpoffice/phpexcel": "1.8.1",
 		# 否则请使用框架自带的csv
-		'excel' => 'csv',//phpexcel
+		'excel' => true,
 		# 开启批量管理
 		'mul' => true,
 		# 开启主动统计,需要人工选择选项来确定统计的项,有别于被动统计,实现中

+ 38 - 3
src/Database.php

@@ -457,6 +457,8 @@ class Database
                         $config['manage']['search']['fulltext'][$k] = $v['name'];
 
                         isset($v['match']) && $config['request']['list']['option'][$k] = array('option', 'like');
+                    } elseif (strpos($v['search'], 'text') !== false) {
+                        $config['manage']['search']['text'][$k] = $v['name'];
                     }
 
                     if (isset($v['exist']) && strpos($v['search'], 'exist') !== false) {
@@ -790,7 +792,7 @@ class Database
             $value['value'] = Dever::maketime($search[$value['name']]);
             Dever::setInput($value['name'], $value['value'], 'search_');
         }
-        $result .= Html::$type($value) . '&nbsp;&nbsp;<br />';
+        $result .= Html::$type($value) . '&nbsp;&nbsp;';
     }
 
     /**
@@ -951,6 +953,7 @@ class Database
             }
 
             if (isset($config['manage']['search']['select'])) {
+                $this->list_search_br($result);
                 foreach ($config['manage']['search']['select'] as $k => $v) {
                     $bind = array();
                     $parent = '';
@@ -971,24 +974,28 @@ class Database
             }
 
             if (isset($config['manage']['search']['exist'])) {
+                $this->list_search_br($result);
                 foreach ($config['manage']['search']['exist'] as $k => $v) {
                     $this->list_search_select($result, $search, $prefix . 'exist_' . $k, $v['lang'], $this->option($v['option']), '');
                 }
             }
 
             if (isset($config['manage']['search']['group'])) {
+                $this->list_search_br($result);
                 foreach ($config['manage']['search']['group'] as $k => $v) {
                     $this->list_search_group($result, $search, $prefix . 'option_' . $k, $v['lang'], $this->option($v['option']), $v['default']);
                 }
             }
 
             if (isset($config['manage']['search']['mul'])) {
+                $this->list_search_br($result);
                 foreach ($config['manage']['search']['mul'] as $k => $v) {
                     $this->list_search_mul($result, $search, $prefix . 'option_' . $k, $v['lang'], $this->option($v['option']), $v['default']);
                 }
             }
 
             if (isset($config['manage']['search']['api'])) {
+                $this->list_search_br($result);
                 foreach ($config['manage']['search']['api'] as $k => $v) {
                     $value = array();
                     $value['name'] = $prefix . 'api_' . $k;
@@ -1005,8 +1012,26 @@ class Database
                 }
             }
 
-            if (isset($config['manage']['search']['fulltext'])) {
+            if (isset($config['manage']['search']['text'])) {
+                $this->list_search_br($result);
+                foreach ($config['manage']['search']['text'] as $k => $v) {
+                    $value = array();
+                    $value['name'] = $prefix . 'option_' . $k;
+                    $value['class'] = 'form-control';
+                    if (isset($search[$value['name']])) {
+                        $value['value'] = $search[$value['name']];
+                    }
+                    if (strpos($v, '-') !== false) {
+                        $t = explode('-', $v);
+                        $v = $t[0];
+                    }
+                    $value['placeholder'] = $v;
+                    $result .= Html::text($value, false) . '&nbsp;';
+                }
+            }
 
+            if (isset($config['manage']['search']['fulltext'])) {
+                $this->list_search_br($result);
                 foreach ($config['manage']['search']['fulltext'] as $k => $v) {
                     $value = array();
                     $value['name'] = $prefix . 'fulltext_' . $k;
@@ -1068,6 +1093,13 @@ class Database
         return $result;
     }
 
+    private function list_search_br(&$result)
+    {
+        if (strpos($result, '&nbsp;&nbsp;') && !strpos($result, '<br />')) {
+            $result .= '<br />';
+        }
+    }
+
     /**
      * 获取条数配置
      *
@@ -1078,7 +1110,10 @@ class Database
         if (isset($config['manage']['list_type'])) {
             return false;
         }
-        if (empty($config['manage']['num'])) {
+        if (isset($config['manage']['num']) && $config['manage']['num'] == false) {
+            return false;
+        }
+        if (!isset($config['manage']['num'])) {
             $config['manage']['num'] = array(20,50,100);
         }
         return $config['manage']['num'];

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