Browse Source

巡检配置修改

seimin 1 year ago
parent
commit
8ae8b539b0

+ 24 - 23
assets/js/controllers/inspect/inspectionScopeCtrl.js

@@ -592,33 +592,34 @@ app.controller("inspectionScope", [
592 592
         delete $scope.selectedchangecategory.value.user;
593 593
       }
594 594
     });
595
-    // 保存设置 liaomingming
595
+    // 保存设置
596 596
     $scope.submit1change = function () {
597 597
       console.log($scope.everyDay);
598 598
       console.log($scope.notice);
599 599
       console.log($scope.copyInspection.tree);
600 600
       console.log($scope.stateModel);
601
-      // let trees = $scope.copyInspection.tree;
602
-      // for (let i = 0; i < trees.length; i++) {
603
-      //   let element = trees[i];
604
-      //   if(!element.group){
605
-      //     SweetAlert.swal({
606
-      //       title: "校验错误",
607
-      //       text: `【${element.name}】未选择线下巡检默认组`,
608
-      //       type: "error",
609
-      //       confirmButtonColor: "#DD6B55"
610
-      //     });
611
-      //     return;
612
-      //   }
613
-      //   if(!element.user){
614
-      //     SweetAlert.swal({
615
-      //       title: "校验错误",
616
-      //       text: `【${element.name}】未选择线上巡检默认人`,
617
-      //       type: "error",
618
-      //       confirmButtonColor: "#DD6B55"
619
-      //     });
620
-      //     return;
621
-      //   }
601
+
602
+      let trees = $scope.copyInspection.tree;
603
+      for (let i = 0; i < trees.length; i++) {
604
+        let element = trees[i];
605
+        if(($scope.stateModel.onlineType.value == 2 || $scope.stateModel.onlineType.value == 3) && !element.group){
606
+          SweetAlert.swal({
607
+            title: "校验错误",
608
+            text: `【${element.name}】未选择线下巡检默认组`,
609
+            type: "error",
610
+            confirmButtonColor: "#DD6B55"
611
+          });
612
+          return;
613
+        }
614
+        if(($scope.stateModel.onlineType.value == 1 || $scope.stateModel.onlineType.value == 3) && !element.user){
615
+          SweetAlert.swal({
616
+            title: "校验错误",
617
+            text: `【${element.name}】未选择线上巡检默认人`,
618
+            type: "error",
619
+            confirmButtonColor: "#DD6B55"
620
+          });
621
+          return;
622
+        }
622 623
 
623 624
       //   let children = trees[i].children || [];
624 625
       //   for (let i = 0; i < children.length; i++) {
@@ -642,7 +643,7 @@ app.controller("inspectionScope", [
642 643
       //       return;
643 644
       //     }
644 645
       //   }
645
-      // }
646
+      }
646 647
       if ($scope.stateModel.model === 0) {
647 648
         // 不设置为模块的时候需要弹窗提示
648 649
         var modalInstance = $modal.open({

+ 50 - 50
assets/views/inspect/inspectionScope.html

@@ -92,29 +92,29 @@
92 92
     }
93 93
    /* 事件分类开始 */
94 94
    /* 公共css,需要复用 */
95
-    
95
+
96 96
    .iconfont {
97 97
         font-size: 14px;
98 98
     }
99
-    
99
+
100 100
     .nav-pills>li>a {
101 101
         border-radius: 0px;
102 102
         color: #333;
103 103
     }
104
-    
104
+
105 105
     .nav-pills>li.active>a,
106 106
     .nav-pills>li.active>a:hover,
107 107
     .nav-pills>li.active>a:focus {
108 108
         background-color: #006bbf;
109 109
         color: white !important;
110 110
     }
111
-    
111
+
112 112
     .panel-tabs,
113 113
     .tabbable {
114 114
         /* padding: 14px; */
115 115
         background-color: white;
116 116
     }
117
-    
117
+
118 118
     .tab-content>.tab-pane,
119 119
     .pill-content>.pill-pane {
120 120
         padding: 14px;
@@ -123,14 +123,14 @@
123 123
         border-right: 1px solid #eeeeee;
124 124
         border-radius: 0px 0px 8px 8px;
125 125
     }
126
-    
126
+
127 127
     .nav-tabs>li.active a,
128 128
     .nav-tabs>li.active a:hover,
129 129
     .nav-tabs>li.active a:focus {
130 130
         background-color: #006bc0;
131 131
         color: white;
132 132
     }
133
-    
133
+
134 134
     .nav-tabs {
135 135
         border-top: 1px solid #eeeeee;
136 136
         border-bottom: 1px solid #eeeeee;
@@ -139,16 +139,16 @@
139 139
         border-radius: 8px 8px 0 0;
140 140
         height: 47px;
141 141
     }
142
-    
142
+
143 143
     .nav-tabs>li {
144 144
         border-right: 1px solid #eeeeee;
145 145
     }
146
-    
146
+
147 147
     .nav-tabs>li:last-child {
148 148
         border-right: none;
149 149
     }
150 150
     /* 独立css */
151
-    
151
+
152 152
     .mainDiv {
153 153
         /* background: red; */
154 154
         /* padding: 14px; */
@@ -156,7 +156,7 @@
156 156
         overflow: hidden;
157 157
         /* zoom: 1; */
158 158
     }
159
-    
159
+
160 160
     .mainDivLeft {
161 161
         border-radius: 8px;
162 162
         border: 1px solid #eeeeee;
@@ -164,14 +164,14 @@
164 164
         float: left;
165 165
         min-height: 541px;
166 166
     }
167
-    
167
+
168 168
     .mainDivRight {
169 169
         margin-left: 302px;
170 170
         border-radius: 8px;
171 171
         border: 1px solid #eeeeee;
172 172
         /* min-height: 541px; */
173 173
     }
174
-    
174
+
175 175
     .mainDiv-head {
176 176
         height: 30px;
177 177
         line-height: 30px;
@@ -182,7 +182,7 @@
182 182
         padding-left: 10px;
183 183
         padding-right: 4px;
184 184
     }
185
-    
185
+
186 186
     .mainDivLeft-span {
187 187
         border: 1px solid;
188 188
         /* padding: 15px 0px 15px 0px; */
@@ -196,35 +196,35 @@
196 196
         margin-right: 10px;
197 197
         font-size: 14px;
198 198
     }
199
-    
199
+
200 200
     .mainDiv-head-right {
201 201
         display: inline-block;
202 202
         float: right;
203 203
     }
204
-    
204
+
205 205
     .edit-left {
206 206
         display: inline-block;
207 207
         /* float: left; */
208 208
         margin-left: 10px;
209 209
     }
210
-    
210
+
211 211
     .span-1 {
212 212
         border-color: #006bc0;
213 213
         color: #006bc0;
214 214
     }
215
-    
215
+
216 216
     .span-2 {
217 217
         border: none;
218 218
         color: white;
219 219
         background-color: #006bc0;
220 220
     }
221
-    
221
+
222 222
     .span-3 {
223 223
         border: none;
224 224
         color: white;
225 225
         background-color: #fc4c58;
226 226
     }
227
-    
227
+
228 228
     .mainDiv-body {
229 229
         border-radius: 8px;
230 230
         border: 1px solid #eeeeee;
@@ -233,7 +233,7 @@
233 233
         /* height: 402px; */
234 234
         /* overflow: auto; */
235 235
     }
236
-    
236
+
237 237
     .mainDiv-body-1 {
238 238
         height: 50px;
239 239
         line-height: 50px;
@@ -242,7 +242,7 @@
242 242
         padding: 0px 14px;
243 243
         border-bottom: 1px solid #eeeeee;
244 244
     }
245
-    
245
+
246 246
     .mainDiv-body-2 {
247 247
         height: 70px;
248 248
         line-height: 70px;
@@ -251,16 +251,16 @@
251 251
         padding: 0px 30px;
252 252
         border-bottom: 1px solid #eeeeee;
253 253
     }
254
-    
254
+
255 255
     .mainDiv-body-2:last-child {
256 256
         border-bottom: none;
257 257
     }
258
-    
258
+
259 259
     /* .fixHeight {
260 260
         height: 450px;
261 261
         overflow: auto;
262 262
     } */
263
-    
263
+
264 264
     .mainDiv-body-3 {
265 265
         height: 50px;
266 266
         line-height: 50px;
@@ -269,7 +269,7 @@
269 269
         padding: 0px 30px;
270 270
         border-bottom: 1px solid #eeeeee;
271 271
     }
272
-    
272
+
273 273
     .mainDiv-body-3:last-child {
274 274
         border-bottom: none;
275 275
     }
@@ -283,7 +283,7 @@
283 283
         margin-bottom: 0px;
284 284
         overflow: hidden;
285 285
     }
286
-    
286
+
287 287
     .mainDiv-body-noList {
288 288
         height: 180px;
289 289
         display: flex;
@@ -291,11 +291,11 @@
291 291
         justify-content: center;
292 292
         align-items: center;
293 293
     }
294
-    
294
+
295 295
     .form-control {
296 296
         display: inline-block;
297 297
     }
298
-    
298
+
299 299
     .mainDivLeft-span-1 {
300 300
         border: 1px solid;
301 301
         padding-left: 15px;
@@ -309,7 +309,7 @@
309 309
         font-size: 14px;
310 310
         display: inline-block;
311 311
     }
312
-    
312
+
313 313
     .mainDivLeft-span-2 {
314 314
         border: 1px solid;
315 315
         padding-left: 15px;
@@ -323,7 +323,7 @@
323 323
         font-size: 14px;
324 324
         display: inline-block;
325 325
     }
326
-    
326
+
327 327
     .mainDivLeft-span-edit-1 {
328 328
         border: 1px solid;
329 329
         padding-left: 8px;
@@ -337,7 +337,7 @@
337 337
         font-size: 12px;
338 338
         display: inline-block;
339 339
     }
340
-    
340
+
341 341
     .mainDivLeft-span-edit-2 {
342 342
         border: 1px solid;
343 343
         padding-left: 8px;
@@ -352,13 +352,13 @@
352 352
         display: inline-block;
353 353
     }
354 354
     /* tab内容css */
355
-    
355
+
356 356
     .tab-mainDiv {
357 357
         border: 1px solid #eeeeee;
358 358
         border-radius: 8px;
359 359
         /* min-height: 360px; */
360 360
     }
361
-    
361
+
362 362
     .tab-mainDiv-head {
363 363
         text-align: center;
364 364
         border-bottom: 1px solid #eeeeee;
@@ -367,7 +367,7 @@
367 367
         font-size: 14px;
368 368
         color: #93989e;
369 369
     }
370
-    
370
+
371 371
     .tab-mainDiv-body {
372 372
         padding: 14px;
373 373
         min-height: 280px;
@@ -376,7 +376,7 @@
376 376
         /* padding-top: 14px; */
377 377
         /* padding-bottom: 14px; */
378 378
     }
379
-    
379
+
380 380
     .tab-mainDiv-body-lineDiv-50 {
381 381
         /* display: inline-block; */
382 382
         font-size: 14px;
@@ -385,7 +385,7 @@
385 385
         width: 47%;
386 386
         padding-left: 14px;
387 387
     }
388
-    
388
+
389 389
     .tab-mainDiv-body-lineDiv-100 {
390 390
         /* display: inline-block; */
391 391
         font-size: 14px;
@@ -394,29 +394,29 @@
394 394
         width: 96%;
395 395
         padding-left: 14px;
396 396
     }
397
-    
397
+
398 398
     .tab-mainDiv-body-lable {
399 399
         padding-bottom: 10px;
400 400
         /* width: 370px; */
401 401
     }
402
-    
402
+
403 403
     .tab-mainDiv-body-content {
404 404
         padding-bottom: 10px;
405 405
         /* width: 370px; */
406 406
     }
407
-    
407
+
408 408
     .tab-mainDiv-body-content>textarea {
409 409
         min-height: 68px;
410 410
         width: 100%;
411 411
     }
412
-    
412
+
413 413
     .tab-mainDiv-foot {
414 414
         /* margin: 14px auto; */
415 415
         border-top: 1px solid #eeeeee;
416 416
         text-align: center;
417 417
         padding: 7px;
418 418
     }
419
-    
419
+
420 420
     .tab-mainDiv-body-button-1 {
421 421
         display: inline-block;
422 422
         width: 80px;
@@ -429,7 +429,7 @@
429 429
         border-radius: 4px;
430 430
         margin-right: 14px;
431 431
     }
432
-    
432
+
433 433
     .tab-mainDiv-body-button-2 {
434 434
         display: inline-block;
435 435
         width: 80px;
@@ -443,7 +443,7 @@
443 443
         box-sizing: border-box;
444 444
         border: 1px solid #eeeeee;
445 445
     }
446
-    
446
+
447 447
     .tree-control .tree-view {
448 448
         width: inherit;
449 449
         z-index: 9999;
@@ -536,13 +536,13 @@
536 536
                                 </div>
537 537
                             </div>
538 538
                         </div>
539
-                
539
+
540 540
                         <div class="mainDivRight" ng-if="changecateObj.changecate && copyInspection.tree.length">
541 541
                             <div class="mainDiv-head">
542 542
                                 <span>默认组和默认人</span>
543 543
                             </div>
544 544
                             <div class="mainDiv-body" style="padding: 16px;height:182px;">
545
-                                <div class="tab-mainDiv-body-lineDiv-50">
545
+                                <div class="tab-mainDiv-body-lineDiv-50" ng-if="stateModel.onlineType.value == 2 || stateModel.onlineType.value == 3">
546 546
                                     <div class="tab-mainDiv-body-lable">线下巡检默认组:</div>
547 547
                                     <ui-select class="tab-mainDiv-body-content" ng-model="group_user.offlineGroup"
548 548
                                         theme="bootstrap">
@@ -554,7 +554,7 @@
554 554
                                         </ui-select-choices>
555 555
                                     </ui-select>
556 556
                                 </div>
557
-                                <div class="tab-mainDiv-body-lineDiv-50">
557
+                                <div class="tab-mainDiv-body-lineDiv-50" ng-if="stateModel.onlineType.value == 1 || stateModel.onlineType.value == 3">
558 558
                                     <div class="tab-mainDiv-body-lable">线上巡检默认人:</div>
559 559
                                     <ui-select class="tab-mainDiv-body-content" ng-model="group_user.onlineUser"
560 560
                                         theme="bootstrap">
@@ -573,7 +573,7 @@
573 573
                                 </div>
574 574
                             </div> -->
575 575
                         </div>
576
-                
576
+
577 577
                         <div class="mainDivRight" ng-if="!(changecateObj.changecate && copyInspection.tree.length)">
578 578
                             <div class="mainDiv-head">
579 579
                                 <span>默认组和默认人</span>
@@ -634,7 +634,7 @@
634 634
                                 </div>
635 635
                             </div>
636 636
                         </div>
637
-                    </div>   
637
+                    </div>
638 638
                 </div>
639 639
                 <!-- 巡检范围结束 -->
640 640
             </div>
@@ -665,6 +665,6 @@
665 665
                 </div>
666 666
             </div>
667 667
         </div>
668
-        
668
+
669 669
     </div>
670 670
 </div>