Browse Source

隐藏企业菜单

sugangqiang 2 năm trước cách đây
mục cha
commit
c6f77b189a

+ 26 - 5
app/admin/controller/Talent.php

@@ -599,11 +599,32 @@ class Talent extends AdminController {
         }
     }
 
-    public function talentInfoExport() {
-        $title = ["t1", "t2"];
-        $data[] = [1, 2];
-        $data[] = [3, 4];
-        export($title, $data);
+    public function commonExport() {
+        $params = $this->request->param();
+        $fields = $params["export"];
+        if (!$fields)
+            return json(["msg" => "请选择要导出的数据"]);
+        $names = DictApi::getTalentFields(3);
+        $names["industryFieldNew"] = "产业领域";
+        $names["enterpriseName"] = "单位名称";
+        $names["enterpriseTag"] = "单位标签";
+        $names["street"] = "所属镇街";
+        $names["checkState"] = "审核状态";
+        $list = VerifyApi::getExportDatas($fields);
+        foreach ($fields as $field) {
+            $columns[] = $names[$field];
+        }
+        $datas = [];
+        for ($i = 0; $i < count($list); $i++) {
+            $data = [];
+            for ($n = 0; $n < count($fields); $n++) {
+                $data[] = $list[$i][$fields[$n]];
+            }
+            $datas[] = $data;
+        }
+        if ($datas) {
+            export($columns, $datas);
+        }
     }
 
 }

+ 18 - 49
app/admin/view/talent/base_verify.html

@@ -230,58 +230,27 @@
                 <h4 class="modal-title" id="firstModalLabel">导出</h4>
             </div>
             <div class="modal-body">
-                <form id="exportForm" action="/talentInfoExport/publicExport" target="hiddenIframe" class="form-horizontal">
+                <form id="exportForm" action="/admin/talent/publicExport" target="hiddenIframe" class="form-horizontal">
                     <div class="form-group" id="field">
                         <div id="field_info">
                             <ul>
-                                <li style="width:24%"><input type="checkbox" value="year"><span>申报年度</span></li>
-                                <li style="width:24%"><input type="checkbox" value="name"><span>姓名</span></li>
-                                <li style="width:24%"><input type="checkbox" value="sexName"><span>性别</span></li>
-                                <li style="width:24%"><input type="checkbox" value="birthday"><span>出生日期</span></li>
-                                <li style="width:24%"><input type="checkbox" value="nationalityName"><span>国籍/地区</span></li>
-                                <li style="width:24%"><input type="checkbox" value="provinceName"><span>籍贯省</span></li>
-                                <li style="width:24%"><input type="checkbox" value="cityName"><span>籍贯市</span></li>
-                                <li style="width:24%"><input type="checkbox" value="countyName"><span>籍贯县</span></li>
-                                <li style="width:24%"><input type="checkbox" value="nationName"><span>民族</span></li>
-                                <li style="width:24%"><input type="checkbox" value="politicsName"><span>政治面貌</span></li>
-                                <li style="width:24%"><input type="checkbox" value="cardTypeName"><span>证件类型</span></li>
-                                <li style="width:24%"><input type="checkbox" value="idCard"><span>证件号码</span></li>
-                                <li style="width:24%"><input type="checkbox" value="firstInJJTime"><span>首次来晋工作时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="enterpriseName"><span>企业名称</span></li>
-                                <li style="width:24%"><input type="checkbox" value="industryFieldName"><span>产业领域</span></li>
-                                <li style="width:24%"><input type="checkbox" value="streetName"><span>所属镇街</span></li>
-                                <li style="width:24%"><input type="checkbox" value="sourceName"><span>申报来源</span></li>
-                                <li style="width:24%"><input type="checkbox" value="qzBatch"><span>入选名单批次</span></li>
-                                <li style="width:24%"><input type="checkbox" value="certificateStartTime"><span>泉州高层次人才证书发证日期</span></li>
-                                <li style="width:24%"><input type="checkbox" value="qzgccrcActiveTime"><span>泉州高层次人才证书的有效期</span></li>
-                                <li style="width:24%"><input type="checkbox" value="talentArrangeName"><span>人才层次</span></li>
-                                <li style="width:24%"><input type="checkbox" value="identifyConditionText"><span>认定条件</span></li>
-                                <li style="width:24%"><input type="checkbox" value="identifyConditionName"><span>认定条件名称</span></li>
-                                <li style="width:24%"><input type="checkbox" value="enterpriseTalentTypeName"><span>企业标签</span></li>
-                                <li style="width:24%"><input type="checkbox" value="letterTime"><span>首次来晋行政介绍信时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="introductionModeName"><span>引进方式</span></li>
-                                <li style="width:24%"><input type="checkbox" value="entryTime"><span>本单位入职时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="post"><span>职务</span></li>
-                                <li style="width:24%"><input type="checkbox" value="startTime"><span>工作合同开始时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="endTime"><span>工作合同结束时间</span></li>
-                                <li style="width:12%"><input type="checkbox" value="educationName"><span>最高学历</span></li>
-                                <li style="width:24%"><input type="checkbox" value="graduateSchool"><span>毕业院校)</span></li>
-                                <li style="width:24%"><input type="checkbox" value="major"><span>专业</span></li>
-                                <li style="width:24%"><input type="checkbox" value="title"><span>职称</span></li>
-                                <li style="width:24%"><input type="checkbox" value="studyAbroadName"><span>是否有留学经历</span></li>
-                                <li style="width:24%"><input type="checkbox" value="studyAbroadName"><span>留学毕业院校</span></li>
-                                <li style="width:24%"><input type="checkbox" value="studyAbroadName"><span>留学专业</span></li>
-                                <li style="width:24%"><input type="checkbox" value="phone"><span>手机号码</span></li>
-                                <li style="width:24%"><input type="checkbox" value="email"><span>电子邮箱</span></li>
-                                <li style="width:24%"><input type="checkbox" value="bank"><span>开户银行</span></li>
-                                <li style="width:24%"><input type="checkbox" value="bankNetwork"><span>开户银行网点</span></li>
-                                <li style="width:24%"><input type="checkbox" value="bankNumber"><span>银行行号</span></li>
-                                <li style="width:24%"><input type="checkbox" value="bankAccount"><span>银行账号</span></li>
-                                <li style="width:24%"><input type="checkbox" value="certificateNO"><span>人才编号</span></li>
-                                <li style="width:24%"><input type="checkbox" value="firstSubmitTime"><span>首次确认提交时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="newSubmitTime"><span>最新确认提交时间</span></li>
-                                <li style="width:24%"><input type="checkbox" value="checkStateName"><span>审核状态</span></li>
-                                <li style="width:24%"><input type="checkbox" value="checkMsg"><span>审核意见</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="name"><span>姓名</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="card_type"><span>证件类型</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="card_number"><span>证件号码</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="sex"><span>性别</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="birthday"><span>出生日期</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="nation"><span>民族</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="politics"><span>政治面貌</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="nationality"><span>国籍/地区</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="province"><span>籍贯省</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="city"><span>籍贯市</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="county"><span>籍贯县</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="enterpriseTag"><span>单位标签</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="enterpriseName"><span>单位名称</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="street"><span>所属镇街</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="industryFieldNew"><span>产业领域</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="talent_type"><span>人才类型</span></li>
+                                <li style="width:24%"><input type="checkbox" name="export[]" value="checkState"><span>审核状态</span></li>
                             </ul>
                         </div>
                         <div class="form-group" style="text-align: center">

+ 7 - 1
app/common.php

@@ -91,6 +91,7 @@ function getExcelDatas($filepath, $sheetIndex = 0) {
  * @param type $author 作者
  */
 function export($columns, $rows, $filename = "jjrcw", $sheetname = "sheet1", $saveurl = "php://output", $author = "晋江人才网") {
+    $datatype = new \PhpOffice\PhpSpreadsheet\Cell\DataType;
     $spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
     $spreadsheet->getProperties()->setCreator($author)
             ->setLastModifiedBy($author)
@@ -112,7 +113,12 @@ function export($columns, $rows, $filename = "jjrcw", $sheetname = "sheet1", $sa
     //设置正文内容
     for ($i = 0; $i < $rowCount; $i++) {
         for ($n = 0; $n < $colCount; $n++) {
-            $objPHPExcel->setCellValue(getExcelColumnByIndex($n) . ($rowStartLine + $i), $rows[$i][$n]);
+            if (is_numeric($rows[$i][$n]) && strlen($rows[$i][$n]) > 17) {
+                //超过17位的数字转成文本方以免被转化为科学数
+                $objPHPExcel->setCellValueExplicit(getExcelColumnByIndex($n) . ($rowStartLine + $i), $rows[$i][$n], $datatype::TYPE_STRING);
+            } else {
+                $objPHPExcel->setCellValue(getExcelColumnByIndex($n) . ($rowStartLine + $i), $rows[$i][$n]);
+            }
         }
     }
 

+ 33 - 33
app/common/api/MenuApi.php

@@ -79,40 +79,40 @@ class MenuApi {
 
     public static function getEnterpriseMenuByType($type) {
         $menus = [];
-        $menus[] = ["type" => [1, 2, 3], "code" => "qyzx", "pcode" => "0", "name" => "企业用户中心", "url" => "/enterprise/index/centerPage", "icon" => "fa-user"];
-        $menus[] = ["type" => [1, 2], "code" => "yhfk", "pcode" => "0", "name" => "用户反馈", "url" => "", "icon" => "fa-bug"];
-        $menus[] = ["type" => [1, 2], "code" => "rcrd", "pcode" => "0", "name" => "人才认定", "url" => "#", "icon" => "fa-thumbs-o-up"];
-        $menus[] = ["type" => [1, 2], "code" => "jctjsb", "pcode" => "rcrd", "name" => "基础条件申报", "url" => "/enterprise/base", "icon" => "fa-thumbs-o-up"];
-        $menus[] = ["type" => [1, 2], "code" => "rcrdsb", "pcode" => "rcrd", "name" => "人才认定申报", "url" => "/enterprise/talent", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [1, 2], "code" => "yxrck", "pcode" => "rcrd", "name" => "优秀人才库", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [1, 2], "code" => "lzsb", "pcode" => "rcrd", "name" => "离职申报", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [1, 2], "code" => "gzdwbg", "pcode" => "rcrd", "name" => "工作单位变更", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [1, 2], "code" => "yhzhbg", "pcode" => "rcrd", "name" => "银行账号变更", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [1, 2], "code" => "rcccbg", "pcode" => "rcrd", "name" => "人才层次变更", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [1, 2], "code" => "jcxxbg", "pcode" => "rcrd", "name" => "基础信息变更", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [1, 2], "code" => "jbtmanage", "pcode" => "0", "name" => "津补贴申报", "url" => "", "icon" => "fa-money"];
-        $menus[] = ["type" => [1, 2], "code" => "jbtsb", "pcode" => "jbtmanage", "name" => "津补贴申报", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [1, 2], "code" => "gfbt", "pcode" => "0", "name" => "购房补贴", "url" => "", "icon" => "fa-university"];
-        $menus[] = ["type" => [1, 2], "code" => "gfbtsb", "pcode" => "gfbt", "name" => "购房补贴申报", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [2], "code" => "pxbtmanage", "pcode" => "0", "name" => "培训补贴", "url" => "", "icon" => "fa-building"];
-        $menus[] = ["type" => [2], "code" => "pxbt", "pcode" => "pxbtmanage", "name" => "培训补贴", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [2], "code" => "zdzxmanage", "pcode" => "0", "name" => "重大专项", "url" => "", "icon" => "fa-life-ring"];
-        $menus[] = ["type" => [2], "code" => "zdzx", "pcode" => "zdzxmanage", "name" => "重大专项", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [2], "code" => "znjy", "pcode" => "0", "name" => "子女教育", "url" => "", "icon" => "fa-graduation-cap"];
-        $menus[] = ["type" => [2], "code" => "xzfbz", "pcode" => "znjy", "name" => "学杂费补助", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [2], "code" => "ylbzmanage", "pcode" => "0", "name" => "医疗补助", "url" => "", "icon" => "fa-hospital-o"];
-        $menus[] = ["type" => [2], "code" => "ylbz", "pcode" => "ylbzmanage", "name" => "医疗补助", "url" => "", "icon" => "fa-thumbs-up"];
-        $menus[] = ["type" => [2], "code" => "zfbz", "pcode" => "0", "name" => "住房保障", "url" => "", "icon" => "fa-home"];
-        $menus[] = ["type" => [2], "code" => "zfsq", "pcode" => "zfbz", "name" => "租房申请", "url" => "", "icon" => "fa-home"];
-        $menus[] = ["type" => [2], "code" => "fzbz", "pcode" => "zfbz", "name" => "房租补助", "url" => "", "icon" => "fa-money"];
-        $menus[] = ["type" => [2], "code" => "gfsq", "pcode" => "zfbz", "name" => "购房申请", "url" => "", "icon" => "fa-envira"];
-        $menus[] = ["type" => [2], "code" => "gfbz", "pcode" => "zfbz", "name" => "购房补助", "url" => "", "icon" => "fa-envira"];
-        $menus[] = ["type" => [1], "code" => "sbrc", "pcode" => "0", "name" => "硕博人才", "url" => "", "icon" => "fa-graduation-cap"];
-        $menus[] = ["type" => [1], "code" => "shbt", "pcode" => "sbrc", "name" => "生活补贴", "url" => "", "icon" => "fa-graduation-cap"];
-        $menus[] = ["type" => [3], "code" => "hxjh", "pcode" => "0", "name" => "海峡计划", "url" => "", "icon" => "fa-plane"];
-        $menus[] = ["type" => [3], "code" => "hxjhsb", "pcode" => "hxjh", "name" => "海峡计划申报", "url" => "", "icon" => "fa-pencil"];
+        $menus[] = ["type" => [1, 2, 3], "code" => "qyzx", "pcode" => "0", "name" => "企业用户中心", "url" => "/enterprise/index/centerPage", "icon" => "fa-user", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "yhfk", "pcode" => "0", "name" => "用户反馈", "url" => "", "icon" => "fa-bug", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "rcrd", "pcode" => "0", "name" => "人才认定", "url" => "#", "icon" => "fa-thumbs-o-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "jctjsb", "pcode" => "rcrd", "name" => "基础条件申报", "url" => "/enterprise/base", "icon" => "fa-thumbs-o-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "rcrdsb", "pcode" => "rcrd", "name" => "人才认定申报", "url" => "/enterprise/talent", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "yxrck", "pcode" => "rcrd", "name" => "优秀人才库", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "lzsb", "pcode" => "rcrd", "name" => "离职申报", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "gzdwbg", "pcode" => "rcrd", "name" => "工作单位变更", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "yhzhbg", "pcode" => "rcrd", "name" => "银行账号变更", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "rcccbg", "pcode" => "rcrd", "name" => "人才层次变更", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "jcxxbg", "pcode" => "rcrd", "name" => "基础信息变更", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "jbtmanage", "pcode" => "0", "name" => "津补贴申报", "url" => "", "icon" => "fa-money", "status" => 0];
+        $menus[] = ["type" => [1, 2], "code" => "jbtsb", "pcode" => "jbtmanage", "name" => "津补贴申报", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [1, 2], "code" => "gfbt", "pcode" => "0", "name" => "购房补贴", "url" => "", "icon" => "fa-university", "status" => 0];
+        $menus[] = ["type" => [1, 2], "code" => "gfbtsb", "pcode" => "gfbt", "name" => "购房补贴申报", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "pxbtmanage", "pcode" => "0", "name" => "培训补贴", "url" => "", "icon" => "fa-building", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "pxbt", "pcode" => "pxbtmanage", "name" => "培训补贴", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "zdzxmanage", "pcode" => "0", "name" => "重大专项", "url" => "", "icon" => "fa-life-ring", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "zdzx", "pcode" => "zdzxmanage", "name" => "重大专项", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "znjy", "pcode" => "0", "name" => "子女教育", "url" => "", "icon" => "fa-graduation-cap", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "xzfbz", "pcode" => "znjy", "name" => "学杂费补助", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "ylbzmanage", "pcode" => "0", "name" => "医疗补助", "url" => "", "icon" => "fa-hospital-o", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "ylbz", "pcode" => "ylbzmanage", "name" => "医疗补助", "url" => "", "icon" => "fa-thumbs-up", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "zfbz", "pcode" => "0", "name" => "住房保障", "url" => "", "icon" => "fa-home", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "zfsq", "pcode" => "zfbz", "name" => "租房申请", "url" => "", "icon" => "fa-home", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "fzbz", "pcode" => "zfbz", "name" => "房租补助", "url" => "", "icon" => "fa-money", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "gfsq", "pcode" => "zfbz", "name" => "购房申请", "url" => "", "icon" => "fa-envira", "status" => 1];
+        $menus[] = ["type" => [2], "code" => "gfbz", "pcode" => "zfbz", "name" => "购房补助", "url" => "", "icon" => "fa-envira", "status" => 1];
+        $menus[] = ["type" => [1], "code" => "sbrc", "pcode" => "0", "name" => "硕博人才", "url" => "", "icon" => "fa-graduation-cap", "status" => 0];
+        $menus[] = ["type" => [1], "code" => "shbt", "pcode" => "sbrc", "name" => "生活补贴", "url" => "", "icon" => "fa-graduation-cap", "status" => 1];
+        $menus[] = ["type" => [3], "code" => "hxjh", "pcode" => "0", "name" => "海峡计划", "url" => "", "icon" => "fa-plane", "status" => 1];
+        $menus[] = ["type" => [3], "code" => "hxjhsb", "pcode" => "hxjh", "name" => "海峡计划申报", "url" => "", "icon" => "fa-pencil", "status" => 1];
         foreach ($menus as $key => $menu) {
-            if (!in_array($type, $menu["type"]) || ($menu["pcode"]) != "0" && $menu["url"] == "")
+            if (!in_array($type, $menu["type"]) || ($menu["pcode"]) != "0" && $menu["url"] == "" || $menu["status"] == 0)
                 unset($menus[$key]);
         }
         return self::buildMenu($menus);

+ 62 - 0
app/common/api/VerifyApi.php

@@ -211,4 +211,66 @@ class VerifyApi {
         return ["total" => $count, "rows" => $list];
     }
 
+    public static function getExportDatas($params) {
+        $where[] = [];
+        //特殊字段处理
+        $fields = [];
+        foreach ($params as $param) {
+            if (!in_array($param, ["industryFieldNew", "enterpriseName", "enterpriseTag", "street"])) {
+                $fields[] = "ti." . $param;
+            }
+        }
+        $fields[] = "e.name as enterpriseName";
+        $fields[] = "e.industryFieldNew";
+        $fields[] = "e.enterpriseTag";
+        $fields[] = "e.street";
+        if (in_array("card_type", $params)) {
+            $cardTypes = DictApi::selectByParentCode("card_type");
+        }
+        if (in_array("industryFieldNew", $params)) {
+            $industry_fields = DictApi::selectByParentCode("industry_field");
+        }
+        if (in_array("enterpriseTag", $params)) {
+            $enterpriseTags = DictApi::selectByParentCode("enterprise_tag");
+        }
+        if (in_array("street", $params)) {
+            $streets = DictApi::selectByParentCode("street");
+        }
+        if (in_array("nation", $params)) {
+            $nations = DictApi::selectByParentCode("nation");
+        }
+        if (in_array("nationality", $params)) {
+            $nationalitys = DictApi::selectByParentCode("nationality");
+        }
+        if (in_array("politics", $params)) {
+            $politics = DictApi::selectByParentCode("politics");
+        }
+        if (in_array("talent_type", $params)) {
+            $talentTypes = DictApi::selectByParentCode("talent_type");
+        }
+        $sex = [1 => "男", 2 => "女"];
+        $list = Talent::alias("ti")->field($fields)->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->select()->toArray();
+        foreach ($list as &$item) {
+            $item["card_type"] = $cardTypes[$item["card_type"]];
+            $item["industryFieldNew"] = $industry_fields[$item["industryFieldNew"]];
+            $item["enterpriseTag"] = $enterpriseTags[$item["enterpriseTag"]];
+            $item["street"] = $streets[$item["street"]];
+            $item["nation"] = $nations[$item["nation"]];
+            $item["nationality"] = $nationalitys[$item["nationality"]];
+            $item["politics"] = $politics[$item["politics"]];
+            $item["talent_type"] = $talentTypes[$item["talent_type"]];
+            $item["sex"] = $sex[$item["sex"]];
+            if (in_array("province", $params)) {
+                $item["province"] = Db::table("un_common_location")->where("code", "=", $item["province"])->findOrEmpty()["name"];
+            }
+            if (in_array("city", $params)) {
+                $item["city"] = Db::table("un_common_location")->where("code", "=", $item["city"])->findOrEmpty()["name"];
+            }
+            if (in_array("county", $params)) {
+                $item["county"] = Db::table("un_common_location")->where("code", "=", $item["county"])->findOrEmpty()["name"];
+            }
+        }unset($item);
+        return $list;
+    }
+
 }

+ 44 - 72
public/static/modular/talentIdentify/talentInfo/talentInfo_common.js

@@ -1,16 +1,16 @@
 /**
  * 显示审核日志
  */
-TalentInfo.showLog = function (id){
+TalentInfo.showLog = function (id) {
     layer.open({
         type: 1,
-        title:"日志",
-        fixed:false,
-        content: '<table id="'+id+'"></table>',
+        title: "日志",
+        fixed: false,
+        content: '<table id="' + id + '"></table>',
         area: ['80%', '80%'],
         maxmin: true,
-        success :function (layero, index) {
-            Feng.getCheckLog(id,{"type":CONFIG.project_rcrd,"mainId":id,"typeFileId":"","active":1})
+        success: function (layero, index) {
+            Feng.getCheckLog(id, {"type": CONFIG.project_rcrd, "mainId": id, "typeFileId": "", "active": 1})
         }
     });
 }
@@ -20,7 +20,7 @@ TalentInfo.showLog = function (id){
  * 查询表单提交参数对象
  * @returns {{}}
  */
-TalentInfo.formParams = function() {
+TalentInfo.formParams = function () {
     var queryData = {};
     queryData['name'] = $("#name").val();
     queryData['idCard'] = $("#idCard").val();
@@ -44,9 +44,9 @@ TalentInfo.formParams = function() {
     queryData['talentType'] = $("#talentType").val();
     queryData['talentArrange'] = $("#talentArrange").val();
     queryData['address'] = $("#address").val();
-    if($("#identifyCondition").val() == null || $("#identifyCondition").val() == '' || $("#identifyCondition").val()=="null"){
+    if ($("#identifyCondition").val() == null || $("#identifyCondition").val() == '' || $("#identifyCondition").val() == "null") {
         queryData['identifyCondition'] = "";
-    }else{
+    } else {
         queryData['identifyCondition'] = $("#identifyCondition").val();
     }
     queryData['identifyMonth'] = $("#identifyMonth").val();
@@ -68,7 +68,7 @@ TalentInfo.search = function () {
 /**
  * 重置
  */
-TalentInfo.reset = function (){
+TalentInfo.reset = function () {
     $("#name").val("");
     $("#idCard").val("");
     $("#sex").val("");
@@ -91,7 +91,8 @@ TalentInfo.reset = function (){
     $("#talentType").val("");
     $("#talentArrange").val("");
     $("#address").val("");
-    $("#identifyCondition").val("").trigger("chosen:updated");;
+    $("#identifyCondition").val("").trigger("chosen:updated");
+    ;
     $("#checkState").val("");
     $("#identifyMonth").val("");
     $("#isPublic").val("");
@@ -105,7 +106,7 @@ TalentInfo.reset = function (){
 /**
  * 获取人才认定
  */
-TalentInfo.getIdentifyCondition = function() {
+TalentInfo.getIdentifyCondition = function () {
     // var level = $("#talentArrange").val();
     // if(level==null||level==''){
     //     $("#identifyCondition").empty();
@@ -125,7 +126,7 @@ TalentInfo.getIdentifyCondition = function() {
 /**
  * 显示导出模态框
  */
-TalentInfo.showExportModal = function(){
+TalentInfo.showExportModal = function () {
     $("#exportForm")[0].reset();
     $("#commonExportModal").modal("show");
 }
@@ -133,76 +134,47 @@ TalentInfo.showExportModal = function(){
 /**
  * 导出提交
  */
-TalentInfo.export = function(process){
+TalentInfo.export = function (process) {
     var names = '';
     var values = '';
-    $("#field_info li input").each(function(index){
-        if($(this).is(":checked")){
+    $("#field_info li input").each(function (index) {
+        if ($(this).is(":checked")) {
             values = values + $(this).val() + ",";
             names = names + $(this).next().text() + ",";
         }
     });
     var queryData = TalentInfo.formParams();
     $("#commonExportModal").modal('hide');
-    var url = Feng.ctxPath + "/talentInfoExport/commonExport?names="+names+"&values="+values +
-                    "&name=" + queryData.name +
-                    "&idCard=" + queryData.idCard +
-                    "&sex=" + queryData.sex +
-                    "&nation=" + queryData.nation +
-                    "&nationality=" + queryData.nationality +
-                    "&provinceCode=" + queryData.provinceCode +
-                    "&politics=" + queryData.politics +
-                    "&enterpriseId=" + queryData.enterpriseId +
-                    "&industryField=" + queryData.industryField +
-                    "&source=" + queryData.source +
-                    "&fromCity=" + queryData.fromCity +
-                    "&introductionMode=" + queryData.introductionMode +
-                    "&highEducation=" + queryData.highEducation +
-                    "&major=" + queryData.major +
-                    "&title=" + queryData.title +
-                    "&studyAbroad=" + queryData.studyAbroad +
-                    "&phone=" + queryData.phone +
-                    "&email=" + queryData.email +
-                    "&talentType=" + queryData.talentType +
-                    "&talentArrange=" + queryData.talentArrange +
-                    "&identifyCondition=" + queryData.identifyCondition +
-                    "&identifyMonth="+queryData.identifyMonth+
-                    "&address=" + queryData.address +
-                    "&checkState=" + queryData.checkState +
-                    "&breakFaith=" + queryData.breakFaith +
-                    "&isPublic=" + queryData.isPublic +
-                    "&active=" + queryData.active +
-                    "&year="+queryData.year +
-                    "&isEffect="+queryData.isEffect+
-                    "&process=" + process;
-    window.location.href = encodeURI(encodeURI(url));
+    var params = $("#exportForm").serialize();
+    var url = "/admin/talent/commonExport?" + params;
+    window.location.href = url;
 }
 
 /**
  * 页面初始化
  */
-TalentInfo.init = function(){
+TalentInfo.init = function () {
     //批量加载字典表数据
     var arr = [
-        {"name":"nation","code":"nation"},
-        {"name":"nationality","code":"nationality"},
-        {"name":"politics","code":"politics"},
-        {"name":"industryField","code":"industry_field"},
-        {"name":"introductionMode","code":"introduction_model"},
-        {"name":"highEducation","code":"highest_degree"},
-        {"name":"talentType","code":"talent_type"},
-        {"name":"talentArrange","code":"talent_arrange"},
-        {"name":"source","code":"source"},
-        {"name":"address","code":"street"}];
+        {"name": "nation", "code": "nation"},
+        {"name": "nationality", "code": "nationality"},
+        {"name": "politics", "code": "politics"},
+        {"name": "industryField", "code": "industry_field"},
+        {"name": "introductionMode", "code": "introduction_model"},
+        {"name": "highEducation", "code": "highest_degree"},
+        {"name": "talentType", "code": "talent_type"},
+        {"name": "talentArrange", "code": "talent_arrange"},
+        {"name": "source", "code": "source"},
+        {"name": "address", "code": "street"}];
     Feng.findChildDictBatch(JSON.stringify(arr));
     TalentInfo.getIdentifyCondition();
-    $("#identifyCondition,#enterpriseId").on('chosen:ready', function(e, params) {
-        $(".chosen-container-single .chosen-single").css("padding","4px 0px 0px 4px");
+    $("#identifyCondition,#enterpriseId").on('chosen:ready', function (e, params) {
+        $(".chosen-container-single .chosen-single").css("padding", "4px 0px 0px 4px");
     });
     $("#identifyCondition,#enterpriseId").chosen({
-        search_contains:true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        search_contains: true,       //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
         disable_search: false,
-        width:"100%",
+        width: "100%",
         enable_split_word_search: true
     });
 }
@@ -210,18 +182,18 @@ TalentInfo.init = function(){
 /**
  * 下载附件
  */
-TalentInfo.download = function(){
+TalentInfo.download = function () {
     if (this.check()) {
-        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=1&id="+TalentInfo.seItem.id));
+        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/common/api/downloadZip?type=1&id=" + TalentInfo.seItem.id));
     }
 }
 
 /**
  * 批量下载头像
  */
-TalentInfo.downloadPhoto = function (){
+TalentInfo.downloadPhoto = function () {
     var selected = $('#' + this.id).bootstrapTable('getSelections');
-    if(selected.length == 0){
+    if (selected.length == 0) {
         Feng.info("请先选中表格中的某一记录!");
         return false;
     }
@@ -229,13 +201,13 @@ TalentInfo.downloadPhoto = function (){
     for (let i = 0; i < selected.length; i++) {
         ids = ids + selected[i].id + ",";
     }
-    window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/api/commonDownload/downloadPhotos?type=1&ids="+ids));
+    window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/api/commonDownload/downloadPhotos?type=1&ids=" + ids));
 }
 
 /**
  * 全选
  */
-TalentInfo.checkAll = function(){
+TalentInfo.checkAll = function () {
     $("#field_info input").each(function () {
         this.checked = true;
     })
@@ -243,11 +215,11 @@ TalentInfo.checkAll = function(){
 /**
  * 反选
  */
-TalentInfo.unCheckAll = function(){
+TalentInfo.unCheckAll = function () {
     $("#field_info input").each(function () {
-        if(this.checked){
+        if (this.checked) {
             this.checked = false;
-        }else{
+        } else {
             this.checked = true;
         }
     })