Przeglądaj źródła

优化巡检记录

wuxw 6 lat temu
rodzic
commit
0c7e22bbb1

+ 7 - 3
WebService/src/main/resources/components/inspectionRoutePackage/inspectionRoute-manage/inspectionRouteManage.html

@@ -1,5 +1,5 @@
 <div id="component" class="wrapper wrapper-content animated fadeInRight ecommerce">
-    <div class="row">
+    <div class="row" v-if="inspectionRouteManageInfo.inspectionPoint == false">
         <div class="col-lg-12">
             <div class="ibox ">
                 <div class="ibox-title">
@@ -42,7 +42,7 @@
             </div>
         </div>
     </div>
-    <div class="row">
+    <div class="row" v-if="inspectionRouteManageInfo.inspectionPoint == false">
         <div class="col-lg-12">
             <div class="ibox">
                 <div class="ibox-title">
@@ -78,7 +78,7 @@
                             <td class="text-right">
                                 <div class="btn-group">
                                     <button class="btn-white btn btn-xs"
-                                            v-on:click="_openEditInspectionRouteModel(inspectionRoute)">巡检点
+                                            v-on:click="_openInspectionPointModel(inspectionRoute)">巡检点
                                     </button>
                                 </div>
                                 <div class="btn-group">
@@ -110,6 +110,10 @@
         </div>
     </div>
 
+    <div v-if="inspectionRouteManageInfo.inspectionPoint == true">
+        <vc:create name="inspectionRoutePointManage"></vc:create>
+    </div>
+
 
     <vc:create name="addInspectionRoute"
                callBackListener=""

+ 7 - 1
WebService/src/main/resources/components/inspectionRoutePackage/inspectionRoute-manage/inspectionRouteManage.js

@@ -11,6 +11,7 @@
                 total:0,
                 records:1,
                 moreCondition:false,
+                inspectionPoint:false,
                 routeName:'',
                 conditions:{
                     routeName:'',
@@ -26,6 +27,9 @@
             
             vc.on('inspectionRouteManage','listInspectionRoute',function(_param){
                   vc.component._listInspectionRoutes(DEFAULT_PAGE, DEFAULT_ROWS);
+            });
+            vc.on('inspectionRouteManage','goBack',function(_param){
+                vc.component.inspectionRouteManageInfo.inspectionPoint == false;
             });
              vc.on('pagination','page_event',function(_currentPage){
                 vc.component._listInspectionRoutes(_currentPage,DEFAULT_ROWS);
@@ -71,7 +75,9 @@
             },
             _queryInspectionRouteMethod:function(){
                 vc.component._listInspectionRoutes(DEFAULT_PAGE, DEFAULT_ROWS);
-
+            },
+            _openInspectionPointModel:function(){
+                vc.component.inspectionRouteManageInfo.inspectionPoint == true;
             },
             _moreCondition:function(){
                 if(vc.component.inspectionRouteManageInfo.moreCondition){

+ 64 - 0
WebService/src/main/resources/components/inspectionRoutePackage/inspectionRoutePoint-manage/inspectionRoutePointManage.html

@@ -0,0 +1,64 @@
+<div class="row">
+    <div class="col-lg-12">
+        <div class="ibox">
+            <div class="ibox-title">
+                <h5>巡检点信息</h5>
+                <div class="ibox-tools" style="top:10px;">
+                    <button type="button" class="btn btn-primary btn-sm"
+                            v-on:click="_goBack()">
+                        <i class="glyphicon glyphicon-plus"></i>
+                        返回
+                    </button>
+                    <button type="button" class="btn btn-primary btn-sm"
+                            v-on:click="_openAddInspectionRouteModal()">
+                        <i class="glyphicon glyphicon-plus"></i>
+                        添加
+                    </button>
+                </div>
+            </div>
+            <div class="ibox-content">
+
+                <table class="footable table table-stripped toggle-arrow-tiny"
+                       data-page-size="15"
+                >
+                    <thead>
+                    <tr>
+                        <th class="text-center">巡检点名称</th>
+                        <th class="text-center">巡检点ID</th>
+                        <th class="text-center">设备位置</th>
+                        <th class="text-center">设备编码</th>
+                        <th class="text-center">设备名称</th>
+                        <th class="text-right">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr v-for="inspectionPoint in inspectionRoutePointManageInfo.inspectionRoutes">
+                        <td class="text-center">{{inspectionPoint.inspectionName}}</td>
+                        <td class="text-center">{{inspectionPoint.inspectionId}}</td>
+                        <td class="text-center">{{inspectionPoint.locationObjName}}</td>
+                        <td class="text-center">{{inspectionPoint.machineCode}}</td>
+                        <td class="text-center">{{inspectionPoint.machineName}}</td>
+                        <td class="text-right">
+                            <div class="btn-group">
+                                <button class="btn-white btn btn-xs"
+                                        v-on:click="_openDeleteInspectionPointModel(inspectionPoint)">删除
+                                </button>
+                            </div>
+                        </td>
+
+                    </tr>
+                    </tbody>
+                    <tfoot>
+                    <tr>
+                        <td colspan="7">
+                            <ul class="pagination float-right"></ul>
+                        </td>
+                    </tr>
+                    </tfoot>
+                </table>
+                <!-- 分页 -->
+                <vc:create name="pagination"></vc:create>
+            </div>
+        </div>
+    </div>
+</div>

+ 68 - 0
WebService/src/main/resources/components/inspectionRoutePackage/inspectionRoutePoint-manage/inspectionRoutePointManage.js

@@ -0,0 +1,68 @@
+/**
+    入驻小区
+**/
+(function(vc){
+    var DEFAULT_PAGE = 1;
+    var DEFAULT_ROWS = 10;
+    vc.extends({
+        data:{
+            inspectionRoutePointManageInfo:{
+                inspectionRoutes:[],
+                total:0,
+                records:1,
+                routeName:'',
+            }
+        },
+        _initMethod:function(){
+            vc.component._listInspectionRoutePoints(DEFAULT_PAGE, DEFAULT_ROWS);
+        },
+        _initEvent:function(){
+            
+            vc.on('inspectionRoutePointManage','listInspectionPoint',function(_param){
+                  vc.component._listInspectionRoutePoints(DEFAULT_PAGE, DEFAULT_ROWS);
+            });
+             vc.on('pagination','page_event',function(_currentPage){
+                vc.component._listInspectionRoutes(_currentPage,DEFAULT_ROWS);
+            });
+        },
+        methods:{
+            _listInspectionRoutePoints:function(_page, _rows){
+
+                var param = {
+                    params:{
+                        page:_page,
+                        row:_rows,
+                        communityId:vc.getCurrentCommunity().communityId
+                    }
+               };
+
+               //发送get请求
+               vc.http.get('inspectionRoutePointManage',
+                            'list',
+                             param,
+                             function(json,res){
+                                var _inspectionRouteManageInfo=JSON.parse(json);
+                                vc.component.inspectionRoutePointManageInfo.total = _inspectionRouteManageInfo.total;
+                                vc.component.inspectionRoutePointManageInfo.records = _inspectionRouteManageInfo.records;
+                                vc.component.inspectionRoutePointManageInfo.inspectionPonits = _inspectionRouteManageInfo.inspectionPonits;
+                                vc.emit('pagination','init',{
+                                     total:vc.component.inspectionRoutePointManageInfo.records,
+                                     currentPage:_page
+                                 });
+                             },function(errInfo,error){
+                                console.log('请求失败处理');
+                             }
+                           );
+            },
+            _openAddInspectionRouteModal:function(){
+                vc.emit('addInspectionRoutePointRel','openAddInspectionPointModal',{});
+            },
+            _openDeleteInspectionRouteModel:function(_inspectionPoint){
+                vc.emit('deleteInspectionRoutePointRel','openDeleteInspectionPointModal',_inspectionPoint);
+            },
+            _goBack:function(){
+                vc.emit('inspectionRouteManage','goBack',{});
+            }
+        }
+    });
+})(window.vc);

+ 1 - 1
java110-db/src/main/resources/mapper/community/InspectionRouteServiceDaoImplMapper.xml

@@ -78,7 +78,7 @@
     <!-- 查询巡检路线信息 add by wuxw 2018-07-03 -->
     <select id="getInspectionRouteInfo" parameterType="Map" resultType="Map">
         select t.inspection_route_Id,t.inspection_route_Id inspectionRouteId,t.seq,t.remark,t.status_cd,t.status_cd
-        statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.Route_name,t.Route_name routeName
+        statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.Route_name,t.Route_name routeName,t.create_time createTime
         from inspection_route t
         where 1 =1
         <if test="inspectionRouteId !=null and inspectionRouteId != ''">