array('id' => '-1', 'name' => '请选择'), ); $data = Dever::db('work/pcate')->state(); if($data) { $array += $data; } // print_R($array);die; return $array; }; return array ( # 表名 'name' => 'product', # 显示给用户看的名称 'lang' => '相关系统产品设置', # 后台菜单排序 'order' => 97, // 'menu' => false, // 'auto' => 100000, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'list' => true, 'order' => 'desc', ), 'company_id' => array ( 'type' => 'int-11', 'name' => '所属公司', 'default' => '1', 'desc' => '所属公司', 'match' => 'is_numeric', 'update' => 'hidden', //'search' => $company ? 'select' : false, //'list' => true, ), 'name' => array ( 'type' => 'varchar-200', 'name' => '名称', 'default' => '', 'desc' => '名称', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'cate_id' => array ( 'type' => 'int-11', 'name' => '产品类型', 'default' => '-1', 'desc' => '产品类型', 'match' => 'is_string', 'option' => $cate, 'update' => 'select', 'list' => true, ), 'admin_id' => array ( 'type' => 'varchar-500', 'name' => '关联产品负责人', 'default' => '', 'desc' => '关联产品负责人', 'match' => 'option', 'search' => 'linkage', 'update' => 'linkage', 'option' => Dever::url('lib/appoint.get?level_total=2', 'work'), 'list' => "Dever::load('work/lib/manage.admin',{id})", ), 'reorder' => array ( 'type' => 'int-11', 'name' => '排序-数值越大越靠前', 'default' => '1', 'desc' => '请输入排序', 'match' => 'option', 'update' => 'text', 'search' => 'order', 'list' => true, 'order' => 'desc', 'edit' => true, ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '创建时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, 'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( //'insert' => false, 'delete' => false, // 'edit' => false, 'button' => array ( '产品类型' => array('location', 'l=project/database/list&project=work&table=pcate&oper_table=product'), ), # 设置公司权限 'company' => 'company_id', ), 'request' => array ( 'getData' => array ( # 匹配的正则或函数 选填项 'option' => array ( //'id' => array('yes', '!='), 'state' => 1, ), 'type' => 'all', 'order' => array('id' => 'desc'), 'col' => '*|id', ), 'getAll' => array ( # 匹配的正则或函数 选填项 'option' => array ( // 'id' => array('yes','>'), 'state' => 1, ), 'type' => 'all', 'order' => array('reorder' => 'desc', 'id' => 'asc'), 'col' => '*', ), ), );