浏览代码

1、人才层次变更部门审核增加显示其它部门审核进度的字段
2、锁屏兼容其它浏览器的写法

sugangqiang 3 月之前
父节点
当前提交
19d15a0b19

+ 10 - 0
app/admin/controller/TalentTypeChange.php

@@ -168,6 +168,16 @@ class TalentTypeChange extends AdminController {
                     $list[$key]["newIdentifyConditionCH"] = $newCondition["name"];
                 }
             }
+            if ($process == 2) {
+                $whrOtherDept[] = ["main", "=", $item["id"]];
+                $whrOtherDept[] = ["type", "=", ProjectState::LEVELCHANGE];
+                $otherDeptState = Db::table("un_talent_depcheckstate")->field("companyId,state")->where($whrOtherDept)->select();
+                foreach ($otherDeptState as &$ds) {
+                    $companyInfo = getCacheById("Company", $ds["companyId"]);
+                    $ds["companyName"] = $companyInfo["name"];
+                }unset($otherDeptState);
+                $list[$key]["otherDeptState"] = $otherDeptState;
+            }
         }
         return json(["rows" => $list, "total" => $count]);
     }

+ 7 - 7
app/admin/view/layout/right.html

@@ -98,7 +98,7 @@
 </div>
 <link href="/static/css/lockScreen.css" rel="stylesheet">
 <script src="/static/js/jquery.min.js?v=2.1.4"></script>
-<script src="/static/js/common/Feng.js"></script>
+<script src="/static/js/common/Feng.js?v=20250103"></script>
 <style type="text/css">
     .dbsx{
         line-height: 12px;
@@ -232,12 +232,12 @@
                         }
                         function listenTime() {
                             var body = document.querySelector('html');
-                            body.addEventListener("click", restTime);
-                            body.addEventListener("keyup", restTime);
-                            body.addEventListener("keypress", restTime);
-                            body.addEventListener("keydown", restTime);
-                            body.addEventListener("mousemove", restTime);
-                            body.addEventListener("mousewheel", restTime);
+                            Feng.addEvent(body, "click", restTime);
+                            Feng.addEvent(body, "keyup", restTime);
+                            Feng.addEvent(body, "keypress", restTime);
+                            Feng.addEvent(body, "keydown", restTime);
+                            Feng.addEvent(body, "mousemove", restTime);
+                            Feng.addEvent(body, "mousewheel", restTime);
                         }
                         function restTime() {
                             if (task != null) {

+ 7 - 7
app/common/view/layout/right.html

@@ -79,7 +79,7 @@
 </div>
 <link href="/static/css/lockScreen.css" rel="stylesheet">
 <script src="/static/js/jquery.min.js?v=2.1.4"></script>
-<script src="/static/js/common/Feng.js"></script>
+<script src="/static/js/common/Feng.js?v=20250103"></script>
 <style type="text/css">
     .dbsx{
         line-height: 12px;
@@ -213,12 +213,12 @@
     }
     function listenTime() {
         var body = document.querySelector('html');
-        body.addEventListener("click",restTime);
-        body.addEventListener("keyup",restTime);
-        body.addEventListener("keypress",restTime);
-        body.addEventListener("keydown",restTime);
-        body.addEventListener("mousemove",restTime);
-        body.addEventListener("mousewheel",restTime);
+        Feng.addEvent(body, "click", restTime);
+        Feng.addEvent(body, "keyup", restTime);
+        Feng.addEvent(body, "keypress", restTime);
+        Feng.addEvent(body, "keydown", restTime);
+        Feng.addEvent(body, "mousemove", restTime);
+        Feng.addEvent(body, "mousewheel", restTime);
     }
     function restTime(){
         if (task!=null){

+ 8 - 8
app/enterprise/view/layout/right.html

@@ -79,7 +79,7 @@
 </div>
 <link href="/static/css/lockScreen.css" rel="stylesheet">
 <script src="/static/js/jquery.min.js?v=2.1.4"></script>
-<script src="/static/js/common/Feng.js"></script>
+<script src="/static/js/common/Feng.js?v=20250103"></script>
 <style type="text/css">
     .dbsx{
         line-height: 12px;
@@ -230,13 +230,13 @@
         listenTime();
     }
     function listenTime() {
-        var body = document.querySelector('html');
-        body.addEventListener("click",restTime);
-        body.addEventListener("keyup",restTime);
-        body.addEventListener("keypress",restTime);
-        body.addEventListener("keydown",restTime);
-        body.addEventListener("mousemove",restTime);
-        body.addEventListener("mousewheel",restTime);
+        var body = document.querySelector('html');        
+        Feng.addEvent(body, "click", restTime);
+        Feng.addEvent(body, "keyup", restTime);
+        Feng.addEvent(body, "keypress", restTime);
+        Feng.addEvent(body, "keydown", restTime);
+        Feng.addEvent(body, "mousemove", restTime);
+        Feng.addEvent(body, "mousewheel", restTime);
     }
     function restTime(){
         if (task!=null){

+ 7 - 7
app/person/view/layout/right.html

@@ -79,7 +79,7 @@
 </div>
 <link href="/static/css/lockScreen.css" rel="stylesheet">
 <script src="/static/js/jquery.min.js?v=2.1.4"></script>
-<script src="/static/js/common/Feng.js"></script>
+<script src="/static/js/common/Feng.js?v=20250103"></script>
 <style type="text/css">
     .dbsx{
         line-height: 12px;
@@ -212,12 +212,12 @@
     }
     function listenTime() {
         var body = document.querySelector('html');
-        body.addEventListener("click",restTime);
-        body.addEventListener("keyup",restTime);
-        body.addEventListener("keypress",restTime);
-        body.addEventListener("keydown",restTime);
-        body.addEventListener("mousemove",restTime);
-        body.addEventListener("mousewheel",restTime);
+        Feng.addEvent(body, "click", restTime);
+        Feng.addEvent(body, "keyup", restTime);
+        Feng.addEvent(body, "keypress", restTime);
+        Feng.addEvent(body, "keydown", restTime);
+        Feng.addEvent(body, "mousemove", restTime);
+        Feng.addEvent(body, "mousewheel", restTime);
     }
     function restTime(){
         if (task!=null){

+ 12 - 0
public/static/js/common/Feng.js

@@ -730,5 +730,17 @@ var Feng = {
             return true;
         }
         return false;
+    },
+    addEvent: function (element, event, handler) {
+        if (element.addEventListener) {
+            // 现代浏览器
+            element.addEventListener(event, handler, false);
+        } else if (element.attachEvent) {
+            // 兼容 IE8 及更早版本
+            element.attachEvent('on' + event, handler);
+        } else {
+            // 作为备选方案,直接设置事件处理器(不推荐,仅作为最后的保障)
+            element['on' + event] = handler;
+        }
     }
 };

+ 24 - 0
public/static/modular/talentLibrary/talentTypeChange/talentTypeChange_dep.js

@@ -52,6 +52,30 @@ TalentTypeChange.initColumn = function () {
                 }
             }
         },
+        {title: '部门审核情况', field: 'otherDeptState', visible: true, align: 'center', valign: 'middle', 'class': 'uitd_showTip', width: "100px",
+            formatter: function (value, row, index) {
+                var depRow = row.otherDeptState;
+                var html = "<ul>";
+                if (typeof depRow != "undefined" && depRow != null && depRow.length > 0) {
+                    for (var i = 0; i < count(depRow); i++) {
+                        switch (depRow[i].state) {
+                            case 1:
+                                var stateStr = "待审核";
+                                break;
+                            case 2:
+                                var stateStr = "已驳回";
+                                break;
+                            case 3:
+                                var stateStr = "已通过";
+                                break;
+                        }
+                        html += '<li>' + depRow[i].name + ":" + stateStr + '</li>';
+                    }
+                }
+                html += "</ul>";
+                return html;
+            }
+        },
         {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', width: "80px",
             formatter: function (value, row, index) {
                 return "<span class='label label-success' onclick=\"TalentTypeChange.showLog('" + value + "')\" >" +