Zhouzhendong 4 лет назад
Родитель
Сommit
d2e146f626

+ 1 - 0
config/database.php

@@ -80,6 +80,7 @@ return [
             'engine' => null,
             'options' => extension_loaded('pdo_mysql') ? array_filter([
                 PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
+                PDO::ATTR_EMULATE_PREPARES => true,
             ]) : [],
         ],
 

+ 21 - 0
resources/views/equipment/_location.blade.php

@@ -0,0 +1,21 @@
+<div class="modal fade" id="locationModal" tabindex="1" role="dialog" aria-hidden="true">
+    <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h1 class="offset-5">A-1025-01</h1>
+                <button type="button" class="close" data-dismiss="modal">&times;</button>
+            </div>
+            <div class="modal-body">
+                <div class="text-center h1" v-if="isLoadLocation">
+                    <i class="fa fa-spinner fa-pulse"></i>
+                </div>
+                <table v-else class="table">
+
+                </table>
+            </div>
+            <div class="modal-footer">
+                <button class="pull-right btn btn-danger">解除该设备库位绑定</button>
+            </div>
+        </div>
+    </div>
+</div>

+ 12 - 0
resources/views/equipment/index.blade.php

@@ -8,6 +8,7 @@
     <meta name="csrf-token" content="{{ csrf_token() }}">
     <title>设备平面</title>
     <link href="{{ mix('css/app.css') }}" rel="stylesheet">
+    <link href="{{ mix('css/animation.css') }}" rel="stylesheet">
     <style>
         html{
             width: 100%;
@@ -198,6 +199,7 @@
         </div>
     </div>
     @include("equipment._detailInfo")
+    @include("equipment._location")
 </div>
 </body>
 <script src="{{ mix('js/app.js') }}"></script>
@@ -251,6 +253,7 @@
             equipmentElements:[                                         //设备元素池
             ],
             grid:true,                                                  //设备拖拽是否开启网格
+            isLoadLocation:false,                                       //开启加载库位
         },
         mounted() {
             $("#detailInfo").modal("show");
@@ -366,6 +369,15 @@
             },
             //子设备选定时的库位加载
             nextDetail(layer){
+                let parentDom = document.getElementById("detailInfo").firstChild.firstChild;
+                let childDom = document.getElementById("locationModal").firstChild.firstChild;
+                childDom.style.minWidth = parentDom.offsetWidth+'px';
+                childDom.style.minHeight = parentDom.offsetHeight+'px';
+                $("#locationModal").modal("show");
+                this.isLoadLocation = true;
+                setTimeout(()=>{
+                    this.isLoadLocation = false;
+                },2000);
                 //开启隐去现DIV动画,加载新DIV,加载数据
                 //请求加载
                 //关闭动画