'单行输入框', 2 => '多行输入框', 3 => '单图片上传', 4 => '多图片上传', # 大于10需要选项 11 => '城市选择框', 12 => '单选框', 13 => '多选框', ); $must = array ( 1 => '必填', 2 => '选填', ); $content_type = array ( 1 => '需要用户选择', 2 => '需要用户输入', ); $match = array ( 1 => '所有字符', 2 => '中文', 3 => '中文+英文', 4 => '中文+英文+数字', 5 => '英文', 6 => '英文+数字', 7 => '手机', 8 => '邮箱', ); $id = Dever::input('search_option_product_id'); $name = ''; if ($id > 0) { $info = Dever::db('service/product')->one($id); $name = $info['name'] . '-'; } return array ( # 表名 'name' => 'info', # 显示给用户看的名称 'lang' => $name . '问卷管理', 'order' => 100, 'menu' => false, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', //'search' => 'order', //'list' => true, ), 'page_number' => array ( 'type' => 'int-11', 'name' => '页号', 'default' => '1', 'desc' => '请输入页号', 'match' => 'option', 'update' => 'text', 'list' => true, 'order' => 'asc', 'edit' => true, ), 'reorder' => array ( 'type' => 'int-11', 'name' => '序号', 'default' => '1', 'desc' => '请输入序号', 'match' => 'option', 'update' => 'text', 'list' => true, 'order' => 'asc', 'edit' => true, ), 'name' => array ( 'type' => 'varchar-200', 'name' => '标题', 'default' => '', 'desc' => '标题', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'info' => array ( 'type' => 'varchar-800', 'name' => '描述', 'default' => '', 'desc' => '描述', 'match' => 'option', 'update' => 'textarea', ), 'product_id' => array ( 'type' => 'int-11', 'name' => '产品', 'default' => '', 'desc' => '产品', 'match' => 'is_numeric', 'update' => 'hidden', 'value' => Dever::input('search_option_product_id') ), 'type' => array ( 'type' => 'int-11', 'name' => '问卷类型', 'default' => '1', 'desc' => '问卷类型', 'match' => 'is_numeric', 'option' => $type, 'search' => 'select', 'update' => 'radio', 'list' => true, 'control' => 'type', ), 'must' => array ( 'type' => 'tinyint-1', 'name' => '是否必填', 'default' => '1', 'desc' => '是否必填', 'match' => 'is_numeric', 'option' => $must, 'update' => 'select', 'list' => true, 'edit' => true, ), 'match' => array ( 'type' => 'tinyint-1', 'name' => '验证规则', 'default' => '1', 'desc' => '验证规则', 'match' => 'is_numeric', 'option' => $match, //'update' => 'select', 'show' => 'type=1,2', ), 'content' => array ( 'type' => 'text-255', 'name' => '选项设置', 'default' => '', 'desc' => '选项设置', 'match' => 'is_string', 'show' => 'type=12,13', 'update' => array ( array ( 'col' => 'score', 'name' => '选项分数-用于计算最终结果,暂时可以不填', 'default' => '0', 'desc' => '选项分数', 'match' => 'is_string', 'update' => 'text', ), array ( 'col' => 'ctype', 'name' => '选项类型', 'default' => '1', 'desc' => '选项类型', 'match' => 'is_numeric', 'option' => $content_type, 'update' => 'radio', 'control' => 'ctype', ), array ( 'col' => 'title', 'name' => '选项标题', 'default' => '', 'desc' => '请输入选项标题', 'match' => 'option', 'update' => 'text', ), array ( 'col' => 'pic', 'name' => '选项图片', 'default' => '', 'desc' => '选项图片', 'match' => 'option', 'update' => 'image', 'key' => '1', 'show' => 'ctype=1', ), array ( 'col' => 'desc', 'name' => '导出备注', 'default' => '', 'desc' => '导出备注', 'match' => 'option', 'update' => 'text', ), ), ), '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, 'search' => 'date', 'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'request' => array ( # 获取最新一条的用户信息 'getOne' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'product_id' => 'yes', 'state' => 1, ), 'type' => 'one', 'order' => array('page_number' => 'desc'), 'col' => 'page_number', ), 'getData' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'product_id' => 'yes', 'state' => 1, ), 'type' => 'all', 'order' => array('page_number' => 'asc', 'reorder' => 'asc', 'id' => 'desc'), 'col' => '*|id', ), ) );