'可用', 2 => '不可用', ); $kj = array ( 1 => '否', 2 => '是', ); $yt = array ( 1 => '播放', 2 => '全云台', 3 => '焦距', ); # 当为本地的时候,所有按钮不可用 $status = array ( 1 => '远程', 2 => '本地', 3 => '混合', ); $type = array ( 1 => '大田', 2 => '喷灌机', 3 => '温室', 4 => '气象站', 5 => '远程阀门', ); $url = '&option_park_id={id}&search_option_park_id={id}&oper_parent=park&oper_key=project_box_company'; return array ( # 表名 'name' => 'park', # 显示给用户看的名称 'lang' => '园区管理', # 后台菜单排序 'order' => 9, //'menu' => false, 'end' => array ( //'insert' => 'company/device.upList', //'update' => 'company/device.upList', ), # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => '园区ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'order' => 'desc', //'list' => true, ), 'reorder' => array ( 'type' => 'int-11', 'name' => '排序-数值越大越靠前', 'default' => '1', 'desc' => '请输入排序', 'match' => 'option', 'update' => 'text', 'search' => 'order', 'list' => true, 'order' => 'desc', 'edit' => true, ), 'name' => array ( 'type' => 'varchar-80', 'name' => '园区名称', 'default' => '', 'desc' => '请输入园区名称', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'type' => array ( 'type' => 'tinyint-1', 'name' => '园区类型', 'default' => '1', 'desc' => '园区类型', 'match' => 'is_numeric', 'option' => $type, 'update' => 'radio', //'list' => true, ), 'baidu' => array ( 'type' => 'varchar-300', 'name' => '百度地图配置-请以逗号隔开,分别为:中心点x坐标,中心点y坐标,中心点地图大小级别[默认为15],横向经度,纵向纬度', 'default' => '116.4114029862,40.165531944737,15,0.3,0.3', 'desc' => '当前园区中心坐标', 'match' => 'option', 'update' => 'text', ), 'baidu_key' => array ( 'type' => 'varchar-300', 'name' => '百度地图的key-可以到百度地图api申请,因为每个key有限制显示次数,所以这里可以根据园区填写不同的key,默认请填写:bVe3y15p9lPq9lGbrPP71lUL', 'default' => '', 'desc' => '百度地图的key', 'match' => 'option', 'update' => 'text', ), 'video' => array ( 'type' => 'varchar-500', 'name' => '直播地址-请输入摄像头直播地址,多个用换行隔开', 'default' => '', 'desc' => '直播地址', 'match' => 'option', 'update' => 'textarea', ), 'video_kj' => array ( 'type' => 'tinyint-1', 'name' => '摄像头是否通过控件播放-选择是,则通过web控件来播放视频', 'default' => '1', 'desc' => '摄像头是否通过控件播放', 'match' => 'is_numeric', 'option' => $kj, 'update' => 'radio', //'list' => true, ), 'video_yt' => array ( 'type' => 'tinyint-1', 'name' => '摄像头是否通过控件的云台控制', 'default' => '1', 'desc' => '摄像头是否通过控件的云台控制', 'match' => 'is_numeric', 'option' => $yt, 'update' => 'radio', //'list' => true, ), 'gps' => array ( 'type' => 'text-255', 'name' => '当前gps信息', 'default' => '', 'desc' => 'gps信息', 'match' => 'option', 'list_name' => '挂载设备及操作', 'list' => 'Dever::load("company/device.manage", {id})', 'update' => 'textarea', //'search' => 'fulltext', //'list' => true, ), 'quan' => array ( 'type' => 'int-11', 'name' => '当前设备圈数', 'default' => '', 'desc' => '当前设备圈数', 'match' => 'option', //'search' => 'fulltext', //'list' => true, ), 'pic' => array ( 'type' => 'varchar-150', 'name' => '园区平面图', 'default' => '', 'desc' => '请选择园区平面图', 'match' => 'option', 'update' => 'image', 'key' => '1', 'place' => '120', ), 'status' => array ( 'type' => 'tinyint-1', 'name' => '按钮状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', 'option' => $status, 'update' => 'radio', //'list' => true, ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', 'option' => $option, //'update' => 'radio', //'list' => true, ), 'cdate' => array ( 'type' => 'int-11', 'name' => '录入时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, //'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), //'auth' => 'company', 'alter' => array ( 1 => array ( array('update', 'gps', 'gps', 'text-255 gps'),//更新字段 ), 'version' => 1, ), 'manage' => array ( 'list_button' => array ( 11 => array('通讯设置', '"park_server'.$url.'"'), 12 => array('设备列表', '"device'.$url.'"'), 13 => array('设备维护记录', '"device_log'.$url.'"'), 14 => array('设备当前数据', '"device_data'.$url.'"'), 15 => array('数据统计', '"stat&key=server'.$url.'"'), 16 => array('数据日志', '"content&key=server'.$url.'"'), 17 => array('操作日志', '"log&key=server'.$url.'"'), //6 => '删除' ), ), # request 请求接口定义 'request' => array ( 'getByIds' => array ( # 匹配的正则或函数 选填项 'where' => array ( 'id' => array('yes', 'in'), 'state' => 1, ), 'option' => array ( //'farm_id' => 'yes', ), //'order' => 'find_in_set(id, "1")', 'type' => 'all', 'col' => '*|id', ), ), );