* @version : HUOSDK 8.0 */ namespace cmf\view; class Filter { /** * @param array $data 数组 * @param string $name 名称 * @param string $current 当前默认值 * @param string $select2 * @param string $disable 是否不可更改 * * @return string */ public static function selectCommon($data, $name, $current, $select2 = 'select_2', $disable = '') { $txt = ""; return $txt; } /** * @param array $data 数组 * @param string $name 名称 * @param string $current 当前默认值 * @param $key * @param string $select2 * * @return string */ public static function selectCommon2($data, $name, $current, $key, $select2 = 'select_2') { $txt = ""; return $txt; } public static function timeChoose($start_time = '', $end_time = '', $format = 'yyyy-mm-dd hh:mm:ss') { $date = 'datetime'; if ($format == 'yyyy-mm-dd') { $date = 'date'; } if ($format == 'yyyy') { $date = 'year'; } if ($format == 'hh:mm:ss') { $date = 'time'; } if ($format == 'yyyy-mm') { $date = 'year-month'; } // if (empty($start_time)) { // $start_time = request()->param('start_time'); // } // if (empty($end_time)) { // $end_time = request()->param('end_time'); // } $txt = ''; if ($end_time) { $txt .= ' - '; $txt .= ''; } return $txt; } /** * 设置时间选择框(仅为单个时间选择框) * * @param string $time 当前时间值 * @param string $name 输入框name * @param string $placeholder 提示信息 * @param string $format 时间格式 * * @return string */ public static function timeChoose2($time = '', $name = '', $placeholder = '', $format = 'yyyy-mm-dd hh:mm:ss') { $date = 'datetime'; if ($format == 'yyyy-mm-dd') { $date = 'date'; } if ($format == 'yyyy') { $date = 'year'; } if ($format == 'hh:mm:ss') { $date = 'time'; } if ($format == 'yyyy-mm') { $date = 'year-month'; } $txt = ''; return $txt; } public static function checkCommon($data, $name, $current, $inline = 'inline') { if (empty($data)) { return ''; } $_current = $current; if (!is_array($current)) { $_current = explode(',', $current); } $_txt = "