浏览代码

更新控制器

zmw 4 月之前
父节点
当前提交
d06dbe876e
共有 2 个文件被更改,包括 18 次插入1 次删除
  1. 7 0
      app/Admin/Controllers/Company/JobsController.php
  2. 11 1
      public/themes/default/assets/mobile/js/rem.js

+ 7 - 0
app/Admin/Controllers/Company/JobsController.php

@@ -161,6 +161,13 @@ ETO;
                 $query->where('consultant_id', isset(Admin::user()->consultant->id) ? Admin::user()->consultant->id : -1);
             });
         })->orderByRaw('field(audit,0,2,1,3)')->orderBy('created_at', 'desc');
+
+        $grid->model()->when(get_subsite_id() > 0, function ($query) {
+            $query->where('subsite_id', get_subsite_id());
+        })->when(Admin::user()->isRole('health'), function ($query) {
+            $query->where('is_health',1);
+        })->orderByRaw("field(audit,2,1,3,0)")->orderBy('id', 'desc');
+
         $grid->id('id');
         $grid->jobs_name('职位名称')->display(function ($jobs_name) {
             return "<a href=".route(url_rewrite('AIX_jobsshow'), ['id'=>$this->id])." target='_blank' title='".$jobs_name."' style='display:inline-block;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;max-width:180px'>".$jobs_name."</a>";

+ 11 - 1
public/themes/default/assets/mobile/js/rem.js

@@ -1 +1,11 @@
-!new function(){var a=this;a.width=750,a.fontSize=100,a.widthProportion=function(){var b=(document.body&&document.body.clientWidth||document.getElementsByTagName("html")[0].offsetWidth)/a.width;return b>1?1:b},a.changePage=function(){document.getElementsByTagName("html")[0].setAttribute("style","font-size:"+a.widthProportion()*a.fontSize+"px !important")},a.changePage(),window.addEventListener("resize",function(){a.changePage()},!1)};
+!new function () {
+    var a = this;
+    a.width = 750, a.fontSize = 100, a.widthProportion = function () {
+        var b = (document.body && document.body.clientWidth || document.getElementsByTagName("html")[0].offsetWidth) / a.width;
+        return b > 1 ? 1 : b
+    }, a.changePage = function () {
+        document.getElementsByTagName("html")[0].setAttribute("style", "font-size:" + Math.floor(a.widthProportion() * a.fontSize) + "px !important")
+    }, a.changePage(), window.addEventListener("resize", function () {
+        a.changePage()
+    }, !1)
+};