$this->user["type"]]); } public function list() { $res = TalentApi::getList($this->request, 3); return json($res); } public function export() { $setting = []; $params = $this->request->param(); $fields = $params["export"]; if (!$fields) return json(["msg" => "请选择要导出的数据"]); $names = DictApi::getTalentFields(4, in_array("isMatchZhiren", $fields)); $names["industryFieldNew"] = "产业领域"; $names["enterpriseName"] = "单位名称"; $names["enterpriseTag"] = "单位标签"; $names["street"] = "所属镇街"; $names["breakFaithName"] = "曾被相关主管部门列为失信个人"; $names["identifyMonth"] = "公布入选月份"; $names["certificateNo"] = "人才编号"; $names["activeName"] = "离职状态"; $names["cur_quit_time"] = "离职时间"; $names["first_submit_time"] = "首次确认提交时间"; $names["new_submit_time"] = "最新确认提交时间"; $list = VerifyApi::getExportDatas(7, $params); foreach ($fields as $field) { $columns[] = $names[$field]; } $datas = []; for ($i = 0; $i < count($list); $i++) { $data = []; for ($n = 0; $n < count($fields); $n++) { $cellValue = $list[$i][$fields[$n]]; $data[] = $cellValue; } $datas[] = $data; } $setting["freeze"] = "A2"; $setting["filter"] = sprintf("A1:%s1", getExcelColumnByIndex(count($columns) - 1)); if ($datas) { export($columns, $datas, "人才认定申报列表导出", $setting); exit(); } echo ""; } }