Sfoglia il codice sorgente

粮情异常颜色调整

GaoYuPeng 3 anni fa
parent
commit
f742cc901b

+ 31 - 16
shanXiPlatform/src/views/reservesManagement/grainCheck/allGrain/index.vue

@@ -121,8 +121,15 @@
121 121
           width="100px"
122 122
         >
123 123
           <template slot-scope="scope">
124
-            <div class="yellow" v-if="scope.row.anomalousStatus === 1"></div>
125
-            <div class="green" v-if="scope.row.anomalousStatus !== 1"></div>
124
+
125
+            <div disable-transitions v-if="scope.row.anomalousStatus != '1'">
126
+              <!-- 无 -->
127
+              <span class="colorspano"></span>
128
+            </div>
129
+            <div disable-transitions v-if="scope.row.anomalousStatus == '1'">
130
+              <!-- 有 -->
131
+              <span class="colorspant"></span>
132
+            </div>
126 133
           </template>
127 134
         </el-table-column>
128 135
         <el-table-column prop="recordStatus" label="状态" align="center">
@@ -516,23 +523,31 @@ export default {
516 523
   font-size: 15px;
517 524
   font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
518 525
 }
519
-.yellow {
520
-  // width: 100px;
521
-  display: block;
522
-  height: 25px;
523
-  background-color: #e3a512;
524
-  color: azure;
526
+.colorspano {
527
+  width: 100px;
528
+  height: 30px;
529
+  background-color: #199856;
530
+  display: inline-block;
525 531
   border-radius: 5px;
526
-  // text-align: center;
527
-  font-size: 13px;
532
+  color: #fff;
533
+  line-height: 30px;
528 534
 }
529
-.green {
530
-  display: block;
531
-  // width: 80%;
532
-  height: 25px;
533
-  background-color: #037d41;
535
+.colorspant {
536
+  width: 100px;
537
+  height: 30px;
538
+  background-color: #ffff00;
539
+  display: inline-block;
540
+  border-radius: 5px;
534 541
   color: #fff;
542
+  line-height: 30px;
543
+}
544
+.colorspanr {
545
+  width: 100px;
546
+  height: 30px;
547
+  background-color: #ff9933;
548
+  display: inline-block;
535 549
   border-radius: 5px;
536
-  font-size: 13px;
537 550
 }
551
+
552
+
538 553
 </style>

+ 23 - 23
shanXiPlatform/src/views/reservesManagement/grainCheck/newGrain/index.vue

@@ -291,7 +291,7 @@ export default {
291 291
     // console.log(this.$route.query,'this.$route.query........')
292 292
     this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
293 293
 
294
-    console.log(this.userInfo.roleName, "this.userInfo.roleName00000000")
294
+    // console.log(this.userInfo.roleName, "this.userInfo.roleName00000000")
295 295
     this.data5.grainConditionRecord.checkPerson = this.userInfo.uid
296 296
     this.uid = this.userInfo.uid
297 297
     // 此处是从待办跳转到本页面时传递过来的参数,用data2收集保存
@@ -337,7 +337,7 @@ export default {
337 337
       const parentId = 18 //粮情检查类型parentId
338 338
       getGrainItems(parentId)
339 339
         .then(res => {
340
-          console.log(res, "res字典粮情检查类型")
340
+          // console.log(res, "res字典粮情检查类型")
341 341
           this.grainKind = res.data
342 342
         })
343 343
         .catch(err => {
@@ -347,9 +347,9 @@ export default {
347 347
        getGrainItems(19)
348 348
           .then(res => {
349 349
             if (res.code == 200) {
350
-              console.log(res, "保管员检查项字典")
350
+              // console.log(res, "保管员检查项字典")
351 351
               this.checkItems = res.data
352
-              console.log(this.checkItems, "checkItems.......")
352
+              // console.log(this.checkItems, "checkItems.......")
353 353
             }
354 354
           })
355 355
           .catch(err => {
@@ -381,10 +381,10 @@ export default {
381 381
             ? this.houseId
382 382
             : 94
383 383
       }
384
-      console.log(data, "data")
384
+      // console.log(data, "data")
385 385
       getNewGrainInfo(data)
386 386
         .then(res => {
387
-          console.log(res.data, "res000")
387
+          // console.log(res.data, "res000")
388 388
           this.data = res.data
389 389
           this.sort()
390 390
         })
@@ -398,28 +398,28 @@ export default {
398 398
       // 如果sortData是空的,使用splice进行排序,不准确
399 399
       // this.sortData = [0, 0, 0, 0]
400 400
 
401
-      console.log(this.sortData,'sortData.......')
401
+      // console.log(this.sortData,'sortData.......')
402 402
       if (sortdata.length !== 0) {
403 403
         for (let i = 0; i < sortdata.length; i++) {
404 404
           if (sortdata[i].enumId == 22) {
405
-            console.log(sortdata[i], "总经理 ")
405
+            // console.log(sortdata[i], "总经理 ")
406 406
             this.sortData.splice(0, 1, sortdata[i])
407 407
           }
408 408
           if (sortdata[i].enumId == 21) {
409
-            console.log(this.data[i], "分管副总")
409
+            // console.log(this.data[i], "分管副总")
410 410
             this.sortData.splice(1, 1, sortdata[i])
411 411
           }
412 412
           if (sortdata[i].enumId === 20) {
413
-            console.log(this.data[i], "主管科长")
413
+            // console.log(this.data[i], "主管科长")
414 414
             this.sortData.splice(2, 1, sortdata[i])
415 415
           }
416 416
           if (sortdata[i].enumId == 19) {
417
-            console.log(this.data[i], "保管员")
417
+            // console.log(this.data[i], "保管员")
418 418
             this.sortData.splice(3, 1, sortdata[i])
419 419
           }
420 420
         }
421 421
       }
422
-      console.log(this.sortData, "this.sortData.....")
422
+      // console.log(this.sortData, "this.sortData.....")
423 423
     },
424 424
     // 状态改成图标
425 425
     formatterColumn(row, column) {
@@ -435,16 +435,16 @@ export default {
435 435
     // 除保管员外弹窗
436 436
     open(val,index) {
437 437
       // console.log(this.$route.query, "保管员外的角色")
438
-      console.log(val, "val...")
439
-      console.log(index,'index')
438
+      // console.log(val, "val...")
439
+      // console.log(index,'index')
440 440
       this.data5.grainConditionRecord.depotId = this.depotId
441 441
       this.data5.grainConditionRecord.houseId = this.houseId
442 442
       this.data5.grainConditionRecord.enumId = val.enumId
443
-      console.log(val.enumId, "当前角色信息id")
444
-      console.log(this.grainKind, "角色类别字典")
443
+      // console.log(val.enumId, "当前角色信息id")
444
+      // console.log(this.grainKind, "角色类别字典")
445 445
       var item = this.grainKind.find(item => item.enumId == val.enumId)
446
-      console.log(item.enumName, "item")
447
-      console.log(item,'item数据')
446
+      // console.log(item.enumName, "item")
447
+      // console.log(item,'item数据')
448 448
 
449 449
       // console.log(this.data2,'this.data2..........')
450 450
       const h = this.$createElement
@@ -490,14 +490,14 @@ export default {
490 490
         console.log(this.data5, "this.data5...")
491 491
         addInfo(this.data5)
492 492
           .then(res => {
493
-            console.log(res, "res增")
493
+            // console.log(res, "res增")
494 494
             if (res.code == 200) {
495 495
               // this.sortData.operationTime = this.data5.grainConditionRecord.operationTime
496 496
 
497
-              console.log(this.houseId, "this.houseId")
498
-              console.log(this.data2.houseId, "this.data2.houseId")
497
+              // console.log(this.houseId, "this.houseId")
498
+              // console.log(this.data2.houseId, "this.data2.houseId")
499 499
               let auditState = 4 //4 是已完成
500
-              console.log(this.data2.houseId, "this.data2.houseId")
500
+              // console.log(this.data2.houseId, "this.data2.houseId")
501 501
               //判断是否切换仓房,或者仓房发生改变
502 502
               if (this.data2.houseId == this.houseId) {
503 503
                 haveDone(this.data2.id, auditState)
@@ -557,7 +557,7 @@ export default {
557 557
             query: { type: type, pid: row.id, data: row }
558 558
           })
559 559
         } else {
560
-          console.log(row, "科长,副总,总经理")
560
+          // console.log(row, "科长,副总,总经理")
561 561
           this.open(row,index)
562 562
         }
563 563
       } else if (Object.keys(this.data2).length !== 0) {