GaoYuPeng 3 years ago
parent
commit
bf3b4dccec

+ 2 - 2
shanXiPlatform/src/views/basicInformation/personnelStructure.vue

@@ -38,8 +38,8 @@
38 38
                     :index="indexMethod"
39 39
                   >
40 40
                   </el-table-column>
41
-                  <!--  <el-table-column prop="uname" label="姓名" align="center">
42
-                  </el-table-column> -->
41
+                   <el-table-column prop="uname" label="姓名" align="center">
42
+                  </el-table-column>
43 43
                   <el-table-column
44 44
                     prop="usex"
45 45
                     label="性别"

+ 5 - 5
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/allFacilities/index.vue

@@ -68,7 +68,7 @@
68 68
     >
69 69
       <el-table-column type="index" align="center" label="序号" width="50px">
70 70
       </el-table-column>
71
-      <el-table-column prop="time" label="检查时间" align="center">
71
+      <el-table-column prop="checkTime" label="检查时间" align="center">
72 72
       </el-table-column>
73 73
       <el-table-column prop="kind" label="设施种类" align="center">
74 74
         <template slot-scope="scope">
@@ -238,10 +238,10 @@ export default {
238 238
         .then(res => {
239 239
           // console.log(res, "1111")
240 240
           this.allData = res.data.records
241
-          this.allData.forEach(element => {
241
+          /* this.allData.forEach(element => {
242 242
             element.time = element.checkTime.substring(0,this.allData[1].checkTime.length-3)
243 243
             console.log( element.time,' element.time')
244
-          });
244
+          }); */
245 245
           this.listLoading = false
246 246
           this.listQuery.limit = res.data.size
247 247
           this.total = res.data.total
@@ -269,10 +269,10 @@ export default {
269 269
           if (res.code == 200) {
270 270
             console.log(res, "全部列表返回数据..........")
271 271
             this.allData = res.data.records
272
-            this.allData.forEach(element => {
272
+            /* this.allData.forEach(element => {
273 273
               element.time = element.checkTime.substring(0,this.allData[1].checkTime.length-3)
274 274
               // console.log( element.time,' element.time')
275
-          });
275
+          }); */
276 276
             this.listLoading = false
277 277
             this.listQuery.limit = res.data.size
278 278
             this.total = res.data.total

+ 24 - 75
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/newFacilities/addType.vue

@@ -610,47 +610,10 @@ export default {
610 610
       if (this.type == 1) {
611 611
         //新增时
612 612
         row.createDate = getDateTimeNow()
613
-        console.log(row.createDate, "createDate")
613
+
614 614
         // console.log(this.checkItems, "是否被选中")
615 615
         var num = 0
616
-
617
-        if (row.isCheck == 0) {
618
-            // 有一项点击否,结果就是1(黄)
619
-            this.data1.equipFacilities.checkResult = 1
620
-            this.checkResult = 1
621
-          } /* else{
622
-            // 有一项点击是,结果就是0(绿)
623
-            this.data1.equipFacilities.checkResult = 0
624
-            this.checkResult = 0
625
-          } */
626
-        this.checkItems.forEach((item, index) => {
627
-          Object.assign(
628
-            item,
629
-            { operationTime: item.createDate },
630
-            { checkEnumId: item.enumId }
631
-          )
632
-
633
-
634
-          if (item.isCheck == 1 || item.isCheck == 0) {
635
-            num += 1
636
-            // console.log(this.checkItems[i], num, "该项被选中了")
637
-          }
638
-
639
-          console.log(this.checkItems, "this.checkItems111")
640
-          console.log(
641
-            this.data1.equipFacilities.checkResult,
642
-            "this.data1.equipFacilities.checkResult"
643
-          )
644
-          if (num == this.checkItems.length) {
645
-            this.data1.equipFacilities.checkState = 1
646
-            this.flag = true
647
-            // console.log("此时暂存变保存,切状态改为已完成")
648
-          } else {
649
-            this.data1.equipFacilities.checkState = 0
650
-            // console.log("此时暂存还是暂存,切状态改为 进行中")
651
-          }
652
-        })
653
-        /* for (let i = 0; i < this.checkItems.length; i++) {
616
+        for (let i = 0; i < this.checkItems.length; i++) {
654 617
         // console.log(this.checkItems[i].enumId, "this.checkItems[i].enumId")
655 618
         // var num =0;
656 619
         this.checkItems[i].checkEnumId = this.checkItems[i].enumId
@@ -679,51 +642,26 @@ export default {
679 642
           this.data1.equipFacilities.checkState = 0
680 643
           // console.log("此时暂存还是暂存,切状态改为 进行中")
681 644
         }
682
-      } */
645
+      }
646
+
683 647
       } else if (this.type == 3) {
684 648
         //修改时
685
-        // row.operationTime = getNowFormatDateone()
686 649
         row.operationTime = getDateTimeNow()
687
-        // row.operationTime = getNowFormatDateone()
688 650
         var num = 0
689 651
 
690
-        if (row.isCheck == 0) {
691
-            // 有一项点击否,结果就是1(黄)
692
-            this.data1.equipFacilities.checkResult = 1
693
-            this.checkResult = 1
694
-          } else{
695
-            // 有一项点击是,结果就是0(绿)
696
-            this.data1.equipFacilities.checkResult = 0
697
-            this.checkResult = 0
698
-          }
699
-        this.checkItems.forEach((item, index) => {
700
-          Object.assign(item, { checkEnumId: item.enumId })
701
-          if (item.isCheck == 1 || item.isCheck == 0) {
702
-            num += 1
703
-            // console.log(this.checkItems[i], num, "该项被选中了")
704
-          }
705
-          console.log(this.checkItems, "this.checkItems111")
706
-          console.log(this.checkItems.length, "this.checkItems222")
707
-          if (num == this.checkItems.length) {
708
-            this.data1.equipFacilities.checkState = 1
709
-            this.flag = true
710
-            // console.log("此时暂存变保存,切状态改为已完成")
711
-          } else {
712
-            this.data1.equipFacilities.checkState = 0
713
-            // console.log("此时暂存还是暂存,切状态改为 进行中")
714
-          }
715
-        })
716
-        /* for (let i = 0; i < this.checkItems.length; i++) {
652
+
653
+        for (var i = 0; i < this.checkItems.length; i++) {
717 654
         // console.log(this.checkItems[i].enumId, "this.checkItems[i].enumId")
718 655
         // var num =0;
719
-        this.checkItems[i].checkEnumId = this.checkItems[i].enumId
720
-        this.checkItems[i].operationTime = this.checkItems[i].createDate
656
+        Object.assign(this.checkItems[i], { checkEnumId: this.checkItems[i].enumId })
721 657
         if (this.checkItems[i].isCheck === 0) {
722 658
           // 有一项点击否,结果就是1(黄)
723 659
           this.data1.equipFacilities.checkResult = 1
660
+          console.log(this.data1.equipFacilities.checkResult,'this.data1.equipFacilities.checkResult')
724 661
         } else {
725 662
           // 有一项点击否,结果就是0(绿)
726 663
           this.data1.equipFacilities.checkResult = 0
664
+          console.log(this.data1.equipFacilities.checkResult,'this.data1.equipFacilities.checkResult')
727 665
         }
728 666
 
729 667
         if (
@@ -731,23 +669,34 @@ export default {
731 669
           this.checkItems[i].isCheck === 0
732 670
         ) {
733 671
           num += 1
734
-          // console.log(this.checkItems[i], num, "该项被选中了")
672
+          console.log(this.checkItems[i], num, "该项被选中了")
735 673
         }
736 674
 
737 675
         if (num == this.checkItems.length) {
738 676
           this.data1.equipFacilities.checkState = 1
739 677
           this.flag = true
740
-          // console.log("此时暂存变保存,切状态改为已完成")
678
+          console.log("此时暂存变保存,切状态改为已完成")
741 679
         } else {
742 680
           this.data1.equipFacilities.checkState = 0
743
-          // console.log("此时暂存还是暂存,切状态改为 进行中")
681
+          console.log("此时暂存还是暂存,切状态改为 进行中")
744 682
         }
745
-      } */
683
+      }
746 684
       }
747 685
     },
748 686
     // 保存
749 687
     btnSave() {
750 688
       this.loading = true
689
+      for(var i =0;i<this.checkItems.length;i++){
690
+        if (this.checkItems[i].isCheck === 0) {
691
+          // 有一项点击否,结果就是1(黄)
692
+          this.data1.equipFacilities.checkResult = 1
693
+          console.log(this.data1.equipFacilities.checkResult,'this.data1.equipFacilities.checkResult')
694
+        } /* else if(this.checkItems[i].isCheck === 1){
695
+          // 有一项点击否,结果就是0(绿)
696
+          this.data1.equipFacilities.checkResult = 0
697
+          console.log(this.data1.equipFacilities.checkResult,'this.data1.equipFacilities.checkResult')
698
+        } */
699
+      }
751 700
       this.data1.equipFacilities.hname = this.houseDic[
752 701
         this.data1.equipFacilities.hid
753 702
       ]

+ 5 - 5
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/newFacilities/index.vue

@@ -15,7 +15,7 @@
15 15
           <span v-if='scope.row.kind==45'>45</span> -->
16 16
         </template>
17 17
       </el-table-column>
18
-      <el-table-column prop="time" label="最近记录时间" align="center">
18
+      <el-table-column prop="checkTime" label="最近记录时间" align="center">
19 19
       </el-table-column>
20 20
       <el-table-column prop="checkState" label="状态" align="center">
21 21
         <template slot-scope="scope">
@@ -174,11 +174,11 @@ export default {
174 174
             console.log(res.data, "最新设施data") */
175 175
             // 把拿到的设施检查记录保存到data()中,并设为table数据源
176 176
             this.tableData = res.data
177
-            this.tableData.forEach(element => {
177
+           /*  this.tableData.forEach(element => {
178 178
               element.time = element.checkTime.substring(0,element.checkTime.length-3)
179
-              /* console.log( element.time,' element.time')
180
-              console.log( element.checkTime,' element.time') */
181
-          });
179
+              console.log( element.time,' element.time')
180
+              console.log( element.checkTime,' element.time')
181
+          }); */
182 182
           }
183 183
         })
184 184
         .catch(err => {

+ 3 - 2
shanXiPlatform/src/views/reservesManagement/grainCheck/allGrain/index.vue

@@ -17,7 +17,7 @@
17 17
                 start-placeholder="开始日期"
18 18
                 end-placeholder="结束日期"
19 19
                 :default-time="['00:00:00', '12:00:00']"
20
-                value-format="yyyy-MM-dd HH:mm"
20
+                value-format="yyyy-MM-dd HH:mm:ss"
21 21
               >
22 22
               </el-date-picker> -->
23 23
               <el-date-picker
@@ -26,7 +26,7 @@
26 26
                 range-separator="至"
27 27
                 start-placeholder="开始日期"
28 28
                 end-placeholder="结束日期"
29
-                value-format="yyyy-MM-dd HH:mm"
29
+                value-format="yyyy-MM-dd hh:mm:ss"
30 30
               >
31 31
               </el-date-picker>
32 32
             </div>
@@ -324,6 +324,7 @@ export default {
324 324
 
325 325
         condition: JSON.stringify(condition)
326 326
       }
327
+      console.log(data3,'data3')
327 328
       queryGrainInfo(data3)
328 329
         .then(res => {
329 330
           this.data2 = res.data.records