seimin 1 gadu atpakaļ
vecāks
revīzija
a51120e695

+ 1 - 1
assets/js/config.router.js

@@ -543,7 +543,7 @@ app.config(['$authProvider', '$httpProvider', '$stateProvider', '$urlRouterProvi
543
                 }
543
                 }
544
             }).state('app.incident.incidentDetail', {
544
             }).state('app.incident.incidentDetail', {
545
                 // 事件详情
545
                 // 事件详情
546
-                url: '/incidentDetail/:id',
546
+                url: '/incidentDetail/:id/:type',
547
                 templateUrl: "assets/views/incident/incidentDetail.html",
547
                 templateUrl: "assets/views/incident/incidentDetail.html",
548
                 resolve: loadSequence('jquery-sparkline', 'api-check', 'formly', 'angularFormly', 'angularFileUpload', 'multi.select.tree', 'customformCtrl', 'sanitize', 'incidentDetailCtrl'),
548
                 resolve: loadSequence('jquery-sparkline', 'api-check', 'formly', 'angularFormly', 'angularFileUpload', 'multi.select.tree', 'customformCtrl', 'sanitize', 'incidentDetailCtrl'),
549
                 title: 'form detail',
549
                 title: 'form detail',

+ 20 - 9
assets/js/controllers/incident/incidentCtrl.js

@@ -2382,6 +2382,25 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2382
         });
2382
         });
2383
     };
2383
     };
2384
 
2384
 
2385
+    //事件详情
2386
+    $scope.toDetail = function (data) {
2387
+        console.log(data,$rootScope.isFuwutai);
2388
+        sessionStorage.incidentParameter = JSON.stringify({
2389
+            searchkeys: $scope.searchkeys,
2390
+            searchstate: $scope.searchstate,
2391
+            othcode: $scope.othcode,
2392
+            postData: $scope.postData,
2393
+        });
2394
+        if($rootScope.isFuwutai){
2395
+            //角色是服务台人员
2396
+            $state.go('app.incident.incidentDetail', {
2397
+                id: data.id,
2398
+            });
2399
+        }else{
2400
+            window.open(location.origin+'/#/app/incident/incidentDetail/'+data.id);
2401
+        }
2402
+    };
2403
+
2385
     if ($stateParams.model) {
2404
     if ($stateParams.model) {
2386
         if (JSON.parse($stateParams.model).searchType && JSON.parse($stateParams.model).searchType != null) {
2405
         if (JSON.parse($stateParams.model).searchType && JSON.parse($stateParams.model).searchType != null) {
2387
             $scope.searchstate = JSON.parse($stateParams.model).searchType;
2406
             $scope.searchstate = JSON.parse($stateParams.model).searchType;
@@ -2734,15 +2753,7 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$scope', '$state', function (
2734
     }
2753
     }
2735
     //查看
2754
     //查看
2736
     $scope.toDetail = function (data) {
2755
     $scope.toDetail = function (data) {
2737
-        console.log(data,$rootScope.isFuwutai);
2738
-        if($rootScope.isFuwutai){
2739
-            //角色是服务台人员
2740
-            $state.go('app.incident.incidentDetail', {
2741
-                id: data.id,
2742
-            });
2743
-        }else{
2744
-            window.open(location.origin+'/#/app/incident/incidentDetail/'+data.id);
2745
-        }
2756
+        $scope.colobject.grid.appScope.toDetail($scope.item);
2746
     };
2757
     };
2747
 }]);
2758
 }]);
2748
 //操作按钮
2759
 //操作按钮

+ 14 - 8
assets/js/controllers/incident/incidentDetailCtrl.js

@@ -56,6 +56,12 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
56
         })
56
         })
57
     }
57
     }
58
 
58
 
59
+    $scope.type = $stateParams.type || 'incident.list';
60
+    //返回列表
61
+    $scope.goToList = function(type){
62
+        $state.go("app." + type);
63
+    }
64
+
59
     // 预览图片
65
     // 预览图片
60
     $scope.preview = function (type, url, idx) {
66
     $scope.preview = function (type, url, idx) {
61
         let title = $scope[type][idx].title;
67
         let title = $scope[type][idx].title;
@@ -139,7 +145,7 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
139
         });
145
         });
140
       }
146
       }
141
     };
147
     };
142
-		
148
+
143
 		// 回访
149
 		// 回访
144
 		$scope.payReturn = function () {
150
 		$scope.payReturn = function () {
145
 			let model = $scope.model
151
 			let model = $scope.model
@@ -149,27 +155,27 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
149
 		      controller: function ($scope,$rootScope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data,api_category) {
155
 		      controller: function ($scope,$rootScope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data,api_category) {
150
 		          console.log(model,loginUser);
156
 		          console.log(model,loginUser);
151
 		          $scope.model = model;
157
 		          $scope.model = model;
152
-		  
158
+
153
 		          $scope.postData = {
159
 		          $scope.postData = {
154
 		              degree: undefined,
160
 		              degree: undefined,
155
 		              visitRemarks: '',
161
 		              visitRemarks: '',
156
 		          }
162
 		          }
157
 		          $scope.degreeList = [];
163
 		          $scope.degreeList = [];
158
-		  
164
+
159
 		          // 获取满意度评价
165
 		          // 获取满意度评价
160
 		          $scope.getDegree = function(){
166
 		          $scope.getDegree = function(){
161
 		              api_wechatfile.getDictionary({"key":"incident_degree","type":"list"}).then(function (data) {
167
 		              api_wechatfile.getDictionary({"key":"incident_degree","type":"list"}).then(function (data) {
162
 		                  $scope.degreeList = data || [];
168
 		                  $scope.degreeList = data || [];
163
 		              })
169
 		              })
164
 		          }
170
 		          }
165
-		  
171
+
166
 		          // 获取结果类型
172
 		          // 获取结果类型
167
 		          $scope.getHandleResult = function(){
173
 		          $scope.getHandleResult = function(){
168
 		              api_wechatfile.getDictionary({"key":"incident_handleresult","type":"list"}).then(function (data) {
174
 		              api_wechatfile.getDictionary({"key":"incident_handleresult","type":"list"}).then(function (data) {
169
 		                  $scope.handleResultList = data || [];
175
 		                  $scope.handleResultList = data || [];
170
 		              })
176
 		              })
171
 		          }
177
 		          }
172
-		  
178
+
173
 		          // 初始化
179
 		          // 初始化
174
 		          $scope.getDegree();
180
 		          $scope.getDegree();
175
 		          $scope.getHandleResult();
181
 		          $scope.getHandleResult();
@@ -195,7 +201,7 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
195
 		                  handleResult: $scope.postData.handleResult,
201
 		                  handleResult: $scope.postData.handleResult,
196
 		                  visitRemarks: $scope.postData.visitRemarks,
202
 		                  visitRemarks: $scope.postData.visitRemarks,
197
 		              }}};
203
 		              }}};
198
-		  
204
+
199
 		              $rootScope.isMask = true;
205
 		              $rootScope.isMask = true;
200
 		              api_flow.accept("callback", postData).then(function (response) {
206
 		              api_flow.accept("callback", postData).then(function (response) {
201
 		                  console.log(response)
207
 		                  console.log(response)
@@ -220,7 +226,7 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
220
 		                  }
226
 		                  }
221
 		              });
227
 		              });
222
 		          }
228
 		          }
223
-		  
229
+
224
 		          $scope.cancel = function () {
230
 		          $scope.cancel = function () {
225
 		              $modalInstance.dismiss('cancel');
231
 		              $modalInstance.dismiss('cancel');
226
 		          }
232
 		          }
@@ -250,7 +256,7 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
250
 		      }
256
 		      }
251
 		  });
257
 		  });
252
 		};
258
 		};
253
-		
259
+
254
     // 关闭
260
     // 关闭
255
     $scope.closeModel = function () {
261
     $scope.closeModel = function () {
256
       $state.go('app.incident.list', {});
262
       $state.go('app.incident.list', {});

+ 15 - 4
assets/js/controllers/inspect/summaryCtrl.js

@@ -194,16 +194,16 @@ app.controller("summaryCtrl", [
194
       {
194
       {
195
         name: "description",
195
         name: "description",
196
         displayName: "故障描述|区域地点",
196
         displayName: "故障描述|区域地点",
197
-        width: "400",
197
+        width: "20%",
198
         enableFiltering: false,
198
         enableFiltering: false,
199
         cellTemplate: '<div class="ui-grid-cell-contents">{{row.entity.description}}<br>{{row.entity.incidentDTO.area ? row.entity.incidentDTO.area.area : ""}} {{row.entity.incidentDTO.place ? row.entity.incidentDTO.place.place : ""}}</div>'
199
         cellTemplate: '<div class="ui-grid-cell-contents">{{row.entity.description}}<br>{{row.entity.incidentDTO.area ? row.entity.incidentDTO.area.area : ""}} {{row.entity.incidentDTO.place ? row.entity.incidentDTO.place.place : ""}}</div>'
200
       },
200
       },
201
       {
201
       {
202
-        name: "maintainer",
202
+        name: "consumableList",
203
         displayName: "耗材名称",
203
         displayName: "耗材名称",
204
-        width: "10%",
204
+        width: "20%",
205
         enableFiltering: false,
205
         enableFiltering: false,
206
-        cellTemplate: '<div class="ui-grid-cell-contents">{{row.entity.maintainer ? row.entity.maintainer.name : ""}}</div>'
206
+        cellTemplate: '<div class="ui-grid-cell-contents">{{grid.appScope.transferConsumableList(row.entity.consumableList)}}</div>'
207
       },
207
       },
208
       {
208
       {
209
         name: "totalMaintenancePrice",
209
         name: "totalMaintenancePrice",
@@ -250,6 +250,10 @@ app.controller("summaryCtrl", [
250
         return '';
250
         return '';
251
       }
251
       }
252
     };
252
     };
253
+    $scope.transferConsumableList = function (consumableList) {
254
+      console.log(consumableList)
255
+      return consumableList ? consumableList.map(v => v.name).toString() : ""
256
+    };
253
     $scope.inspectdata = {};
257
     $scope.inspectdata = {};
254
     //跳转到查看列表
258
     //跳转到查看列表
255
     $scope.seeFunction = function (data) {
259
     $scope.seeFunction = function (data) {
@@ -384,7 +388,14 @@ app.controller("summaryCtrl", [
384
 
388
 
385
     // 查看事件
389
     // 查看事件
386
     $scope.toIncident = function(data){
390
     $scope.toIncident = function(data){
391
+      sessionStorage.summaryParameter = JSON.stringify(
392
+        {
393
+          searchkeys: $scope.searchkeys,
394
+          postData: $scope.postData,
395
+        }
396
+      );
387
       $state.go('app.incident.incidentDetail', {
397
       $state.go('app.incident.incidentDetail', {
398
+        type: 'incident.summary',
388
         id: data.incidentId,
399
         id: data.incidentId,
389
       });
400
       });
390
     }
401
     }

+ 4 - 3
assets/js/controllers/mainCtrl.js

@@ -163,13 +163,14 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
163
         //     $scope.isShowTj = false;
163
         //     $scope.isShowTj = false;
164
         // }
164
         // }
165
       }
165
       }
166
-      // 汇总单详情=>返回事件列表|返回汇总单列表
167
-      if(fromState.name !== 'app.incident.summaryDetail' && toState.name === 'app.incident.summary'){
166
+      // 汇总单/事件详情=>返回事件列表|返回汇总单列表
167
+      if(fromState.name !== 'app.incident.summaryDetail' && fromState.name !== 'app.incident.incidentDetail' && toState.name === 'app.incident.summary'){
168
         sessionStorage.removeItem('summaryParameter');
168
         sessionStorage.removeItem('summaryParameter');
169
       }
169
       }
170
-      if(fromState.name !== 'app.incident.summaryDetail' && toState.name === 'app.incident.list'){
170
+      if(fromState.name !== 'app.incident.summaryDetail' && fromState.name !== 'app.incident.incidentDetail' && toState.name === 'app.incident.list'){
171
         sessionStorage.removeItem('incidentParameter');
171
         sessionStorage.removeItem('incidentParameter');
172
       }
172
       }
173
+
173
       if($rootScope.isZncd || $rootScope.isXy){
174
       if($rootScope.isZncd || $rootScope.isXy){
174
         // 中南财大
175
         // 中南财大
175
         if ((toState.name == 'app.incident.chart' || toState.name == 'app.incident.editor') &&
176
         if ((toState.name == 'app.incident.chart' || toState.name == 'app.incident.editor') &&

+ 2 - 2
assets/views/incident/incidentDetail.html

@@ -562,8 +562,8 @@
562
                     ng-disabled="ldloading.expand_right ">{{vm.model.submit}}</button>
562
                     ng-disabled="ldloading.expand_right ">{{vm.model.submit}}</button>
563
 								<button type="close" ng-if="model.state.name=='已关闭'" class="btn btn_pay" ng-click="payReturn()"
563
 								<button type="close" ng-if="model.state.name=='已关闭'" class="btn btn_pay" ng-click="payReturn()"
564
 										>回访</button>
564
 										>回访</button>
565
-                <button type="close" class="btn btn-default default" ng-click="closeModel()"
566
-                    translate="form.button.CLOSE">CLOSE</button>
565
+                    <div class="btn btn_search" style="margin-left: 8px;" ng-click="goToList(type)" ng-if="type === 'incident.summary'"><span>返回汇总单列表</span></div>
566
+                    <div class="btn btn_search" style="margin-left: 8px;" ng-click="goToList(type)" ng-if="type === 'incident.list'"><span>返回事件列表</span></div>
567
             </div>
567
             </div>
568
         </div>
568
         </div>
569
     </form>
569
     </form>