seimin 1 vuosi sitten
vanhempi
commit
a51120e695

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

@@ -543,7 +543,7 @@ app.config(['$authProvider', '$httpProvider', '$stateProvider', '$urlRouterProvi
543 543
                 }
544 544
             }).state('app.incident.incidentDetail', {
545 545
                 // 事件详情
546
-                url: '/incidentDetail/:id',
546
+                url: '/incidentDetail/:id/:type',
547 547
                 templateUrl: "assets/views/incident/incidentDetail.html",
548 548
                 resolve: loadSequence('jquery-sparkline', 'api-check', 'formly', 'angularFormly', 'angularFileUpload', 'multi.select.tree', 'customformCtrl', 'sanitize', 'incidentDetailCtrl'),
549 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 2404
     if ($stateParams.model) {
2386 2405
         if (JSON.parse($stateParams.model).searchType && JSON.parse($stateParams.model).searchType != null) {
2387 2406
             $scope.searchstate = JSON.parse($stateParams.model).searchType;
@@ -2734,15 +2753,7 @@ app.controller('IncidentOperCtrl', ['$rootScope', '$scope', '$state', function (
2734 2753
     }
2735 2754
     //查看
2736 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 66
     $scope.preview = function (type, url, idx) {
61 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 150
 		$scope.payReturn = function () {
145 151
 			let model = $scope.model
@@ -149,27 +155,27 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
149 155
 		      controller: function ($scope,$rootScope, $modalInstance, api_bpm_domain, modelData, currentUserId, Alert, api_user_data,api_category) {
150 156
 		          console.log(model,loginUser);
151 157
 		          $scope.model = model;
152
-		  
158
+
153 159
 		          $scope.postData = {
154 160
 		              degree: undefined,
155 161
 		              visitRemarks: '',
156 162
 		          }
157 163
 		          $scope.degreeList = [];
158
-		  
164
+
159 165
 		          // 获取满意度评价
160 166
 		          $scope.getDegree = function(){
161 167
 		              api_wechatfile.getDictionary({"key":"incident_degree","type":"list"}).then(function (data) {
162 168
 		                  $scope.degreeList = data || [];
163 169
 		              })
164 170
 		          }
165
-		  
171
+
166 172
 		          // 获取结果类型
167 173
 		          $scope.getHandleResult = function(){
168 174
 		              api_wechatfile.getDictionary({"key":"incident_handleresult","type":"list"}).then(function (data) {
169 175
 		                  $scope.handleResultList = data || [];
170 176
 		              })
171 177
 		          }
172
-		  
178
+
173 179
 		          // 初始化
174 180
 		          $scope.getDegree();
175 181
 		          $scope.getHandleResult();
@@ -195,7 +201,7 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
195 201
 		                  handleResult: $scope.postData.handleResult,
196 202
 		                  visitRemarks: $scope.postData.visitRemarks,
197 203
 		              }}};
198
-		  
204
+
199 205
 		              $rootScope.isMask = true;
200 206
 		              api_flow.accept("callback", postData).then(function (response) {
201 207
 		                  console.log(response)
@@ -220,7 +226,7 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
220 226
 		                  }
221 227
 		              });
222 228
 		          }
223
-		  
229
+
224 230
 		          $scope.cancel = function () {
225 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 261
     $scope.closeModel = function () {
256 262
       $state.go('app.incident.list', {});

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

@@ -194,16 +194,16 @@ app.controller("summaryCtrl", [
194 194
       {
195 195
         name: "description",
196 196
         displayName: "故障描述|区域地点",
197
-        width: "400",
197
+        width: "20%",
198 198
         enableFiltering: false,
199 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 203
         displayName: "耗材名称",
204
-        width: "10%",
204
+        width: "20%",
205 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 209
         name: "totalMaintenancePrice",
@@ -250,6 +250,10 @@ app.controller("summaryCtrl", [
250 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 257
     $scope.inspectdata = {};
254 258
     //跳转到查看列表
255 259
     $scope.seeFunction = function (data) {
@@ -384,7 +388,14 @@ app.controller("summaryCtrl", [
384 388
 
385 389
     // 查看事件
386 390
     $scope.toIncident = function(data){
391
+      sessionStorage.summaryParameter = JSON.stringify(
392
+        {
393
+          searchkeys: $scope.searchkeys,
394
+          postData: $scope.postData,
395
+        }
396
+      );
387 397
       $state.go('app.incident.incidentDetail', {
398
+        type: 'incident.summary',
388 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 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 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 171
         sessionStorage.removeItem('incidentParameter');
172 172
       }
173
+
173 174
       if($rootScope.isZncd || $rootScope.isXy){
174 175
         // 中南财大
175 176
         if ((toState.name == 'app.incident.chart' || toState.name == 'app.incident.editor') &&

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

@@ -562,8 +562,8 @@
562 562
                     ng-disabled="ldloading.expand_right ">{{vm.model.submit}}</button>
563 563
 								<button type="close" ng-if="model.state.name=='已关闭'" class="btn btn_pay" ng-click="payReturn()"
564 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 567
             </div>
568 568
         </div>
569 569
     </form>