Browse Source

人才层次变更显示未激活的条件

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

+ 5 - 3
app/common/api/TalentConditionApi.php

@@ -11,15 +11,17 @@ use app\common\model\TalentCondition;
  */
 class TalentConditionApi {
 
-    public static function getList($lv, $type, $cat = "") {
+    public static function getList($lv, $type, $cat = "", $showAll = false) {
         if (is_array($lv)) {
             $where[] = ["talentLevel", "in", $lv];
         } else {
             $where[] = ["talentLevel", "=", $lv];
         }
         $where[] = ["type", "=", $type];
-        $where[] = ["delete", "=", 0];
-        $where[] = ["active", "=", 1];
+        if (!$showAll) {
+            $where[] = ["delete", "=", 0];
+            $where[] = ["active", "=", $active];
+        }
         if ($cat) {
             $where[] = ["talentLevelCat", "=", $cat];
         }

+ 2 - 1
app/common/controller/Api.php

@@ -41,12 +41,13 @@ class Api extends BaseController {
         $params = $this->request->param();
         $id = $params["id"];
         $type = $this->user["type"];
+        $showAll = $params["showAll"] == 1 ? true : false;
         if ($id) {
             $talentInfo = TalentApi::getOne($id);
             $enterprise = \app\common\model\Enterprise::findOrEmpty($talentInfo["enterprise_id"]);
             $type = $enterprise["type"];
         }
-        $list = TalentConditionApi::getList($params["level"], $type, $params["cat"]);
+        $list = TalentConditionApi::getList($params["level"], $type, $params["cat"], $showAll);
         return json($list, 200);
     }
 

+ 1 - 1
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange.js

@@ -275,7 +275,7 @@ TalentTypeChange.getIdentifyCondition = function (type) {
         "displayCode": "id",
         "displayName": "name",
         "type": "GET",
-        "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel?level=" + level
+        "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/showAll/1"
     });
     $("#" + type + "IdentifyCondition").trigger('chosen:updated');
 }

+ 5 - 5
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_info.js

@@ -137,7 +137,7 @@ TalentTypeChangeInfoDlg.addSubmit = function () {
         return;
     locked = true;
     if (this.talentTypeChangeInfoData.id != null && this.talentTypeChangeInfoData.id != '') {
-        TalentTypeChangeInfoDlg.editSubmit(1);        
+        TalentTypeChangeInfoDlg.editSubmit(1);
         $("#fileTable").bootstrapTable("destroy", {});
         TalentTypeChangeInfoDlg.initFileTable();
     } else {
@@ -279,7 +279,7 @@ TalentTypeChangeInfoDlg.talentArrangeChange = function (now, next, source) {
         "displayCode": "id",
         "displayName": "name",
         "type": "GET",
-        "url": "/common/api/findIdentifyConditionByLevel?level=" + level + "&type=" + type + "&source=" + source + "&talentType=" + talentType
+        "url": "/common/api/findIdentifyConditionByLevel?level=" + level + "&type=" + type + "&source=" + source + "&talentType=" + talentType + "&showAll=1"
     });
     $("#" + next).trigger('chosen:updated');
 }
@@ -395,7 +395,7 @@ TalentTypeChangeInfoDlg.getLayerCatdByLayer = function (isNew) {
             "displayCode": "id",
             "displayName": "name",
             "type": "GET",
-            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level
+            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/showAll/1"
         });
     }
     $("#" + conditionElem).trigger("chosen:updated");
@@ -429,7 +429,7 @@ TalentTypeChangeInfoDlg.getIdentifyCondition = function (isNew) {
             "displayCode": "id",
             "displayName": "name",
             "type": "GET",
-            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat
+            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat + "/showAll/1"
         });
         $("#newIdentifyCondition").trigger('chosen:updated');
     } else {
@@ -440,7 +440,7 @@ TalentTypeChangeInfoDlg.getIdentifyCondition = function (isNew) {
             "displayCode": "id",
             "displayName": "name",
             "type": "GET",
-            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat
+            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat + "/showAll/1"
         });
         $("#oldIdentifyCondition").trigger('chosen:updated');
     }

+ 3 - 3
public/static/modular/gate/talentLibrary/talentTypeChange/talentTypeChange_select.js

@@ -240,7 +240,7 @@ TalentTypeChangeInfoDlg.getLayerCatdByLayer = function (isNew) {
             "displayCode": "id",
             "displayName": "name",
             "type": "GET",
-            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level
+            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/showAll/1"
         });
     }
     $("#" + conditionElem).trigger("chosen:updated");
@@ -274,7 +274,7 @@ TalentTypeChangeInfoDlg.getIdentifyCondition = function (isNew) {
             "displayCode": "id",
             "displayName": "name",
             "type": "GET",
-            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat
+            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat + "/showAll/1"
         });
         $("#newIdentifyCondition").trigger('chosen:updated');
     } else {
@@ -285,7 +285,7 @@ TalentTypeChangeInfoDlg.getIdentifyCondition = function (isNew) {
             "displayCode": "id",
             "displayName": "name",
             "type": "GET",
-            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat
+            "url": Feng.ctxPath + "/common/api/findIdentifyConditionByLevel/level/" + level + "/cat/" + cat + "/showAll/1"
         });
         $("#oldIdentifyCondition").trigger('chosen:updated');
     }