Browse Source

[智价云] 为空数据展示更新

public 1 day ago
parent
commit
2933b05ef0

+ 1 - 1
app/Http/Controllers/Manager/Personnel/Department.php

@@ -45,7 +45,7 @@ class Department extends Controller
             ->orderByDesc('id')
             ->paginate($limit);
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         // 加载模板
         return        json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
     }

+ 1 - 1
app/Http/Controllers/Manager/Personnel/Employee.php

@@ -87,7 +87,7 @@ class Employee extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if(isset($result['data']) && count($result['data']) > 0){
             foreach ($result['data'] as $key => $value) {
                 //查询部门信息

+ 1 - 1
app/Http/Controllers/Manager/Personnel/Roles.php

@@ -44,7 +44,7 @@ class Roles extends Controller
             ->orderByDesc('id')
             ->paginate($limit);
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         // 加载模板
         return        json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
     }

+ 1 - 1
app/Http/Controllers/Manager/Process/ControlGoods.php

@@ -65,7 +65,7 @@ class ControlGoods extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if (isset($result['data']) && count($result['data']) > 0) {
             foreach ($result['data'] as $key => $value) {
                 //查询第一责任人名称

+ 1 - 1
app/Http/Controllers/Manager/Process/LowPriceGoods.php

@@ -67,7 +67,7 @@ class LowPriceGoods extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if (isset($result['data']) && count($result['data']) > 0) {
             foreach ($result['data'] as $key => $value) {
                 //查询第一责任人名称

+ 1 - 1
app/Http/Controllers/Manager/Process/ViolationProduct.php

@@ -67,7 +67,7 @@ class ViolationProduct extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if (isset($result['data']) && count($result['data']) > 0) {
             foreach ($result['data'] as $key => $value) {
                 //查询第一责任人名称

+ 1 - 1
app/Http/Controllers/Manager/Process/ViolationStore.php

@@ -58,7 +58,7 @@ class ViolationStore extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if (isset($result['data']) && count($result['data']) > 0) {
             foreach ($result['data'] as $key => $value) {
                 //查询第一责任人名称

+ 1 - 1
app/Http/Controllers/Manager/WashConfig/ControlGoods.php

@@ -51,7 +51,7 @@ class ControlGoods extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if (isset($result['data']) && count($result['data']) > 0) {
             foreach ($result['data'] as $key => $value) {
                 $result['data'][$key]['platform'] = isset($value['platform']) ? explode(',', $value['platform']) : '';

+ 1 - 1
app/Http/Controllers/Manager/WashConfig/LowPriceGoods.php

@@ -52,7 +52,7 @@ class LowPriceGoods extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if (isset($result['data']) && count($result['data']) > 0) {
             foreach ($result['data'] as $key => $value) {
                 $result['data'][$key]['platform'] = isset($value['platform']) ? explode(',', $value['platform']) : '';

+ 1 - 1
app/Http/Controllers/Manager/WashConfig/ViolationProduct.php

@@ -52,7 +52,7 @@ class ViolationProduct extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if(isset($result['data']) && count($result['data']) > 0){
             foreach ($result['data'] as $key => $value) {
                  $result['data'][$key]['platform'] = isset($value['platform']) ? explode(',',$value['platform']) : '';

+ 1 - 1
app/Http/Controllers/Manager/WashConfig/ViolationStore.php

@@ -52,7 +52,7 @@ class ViolationStore extends Controller
             ->orderByDesc('id')
             ->paginate($limit)->toarray();
         // 分配数据
-        if (!$result)  return json_send(['code' => 'error', 'msg' => '暂无数据']);
+        if (!$result)  return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => []]);
         if (isset($result['data']) && count($result['data']) > 0) {
             foreach ($result['data'] as $key => $value) {
                 $employee_ids = $value['employee_ids'] !='' ? explode(',', $value['employee_ids']) : '';