|
@@ -120,18 +120,24 @@ class Page extends Auth
|
|
|
{
|
|
|
$data['column'] = false;
|
|
|
if (isset($this->config['column'])) {
|
|
|
- $data['column'] = $this->config['column'];
|
|
|
- if (isset($this->config['column']['add'])) {
|
|
|
- $data['column']['add'] = array('name' => $this->config['column']['add'], 'func' => $this->getFunc('column_add', $name . '-' . $this->config['column']['add'], 101));
|
|
|
- }
|
|
|
- if (isset($this->config['column']['edit'])) {
|
|
|
- $data['column']['edit'] = array('name' => '编辑', 'func' => $this->getFunc('column_edit', $name . '-编辑', 102));
|
|
|
+ if (empty($this->config['column']['hidden'])) {
|
|
|
+ $data['column'] = $this->config['column'];
|
|
|
+ if (isset($this->config['column']['add'])) {
|
|
|
+ $data['column']['add'] = array('name' => $this->config['column']['add'], 'func' => $this->getFunc('column_add', $name . '-' . $this->config['column']['add'], 101));
|
|
|
+ }
|
|
|
+ if (isset($this->config['column']['edit'])) {
|
|
|
+ $data['column']['edit'] = array('name' => '编辑', 'func' => $this->getFunc('column_edit', $name . '-编辑', 102));
|
|
|
+ }
|
|
|
+ if (isset($this->config['column']['delete'])) {
|
|
|
+ $data['column']['delete'] = array('name' => '删除', 'func' => $this->getFunc('column_delete', $name . '-删除', 103));
|
|
|
+ }
|
|
|
+ $data['column']['data'] = Dever::call($this->config['column']['data']);
|
|
|
+ $data['height'] = '100%';
|
|
|
}
|
|
|
- if (isset($this->config['column']['delete'])) {
|
|
|
- $data['column']['delete'] = array('name' => '删除', 'func' => $this->getFunc('column_delete', $name . '-删除', 103));
|
|
|
+
|
|
|
+ if (isset($this->config['column']['active']) && $this->config['column']['where'] == 'id') {
|
|
|
+ return $this->config['column']['active'];
|
|
|
}
|
|
|
- $data['column']['data'] = Dever::call($this->config['column']['data']);
|
|
|
- $data['height'] = '100%';
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -391,6 +397,11 @@ class Page extends Auth
|
|
|
private function setForm(&$value)
|
|
|
{
|
|
|
$value['value'] = Dever::input('search')[$value['key']] ?? '';
|
|
|
+ if (is_array($value['value'])) {
|
|
|
+ foreach ($value['value'] as &$v) {
|
|
|
+ $v = (float) $v;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!$value['value']) {
|
|
|
if (isset($value['default']) && !strstr($value['default'], '{')) {
|
|
|
$value['value'] = $value['default'];
|