GaoYuPeng 3 years ago
parent
commit
bf3b4dccec

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

@@ -38,8 +38,8 @@
38
                     :index="indexMethod"
38
                     :index="indexMethod"
39
                   >
39
                   >
40
                   </el-table-column>
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
                   <el-table-column
43
                   <el-table-column
44
                     prop="usex"
44
                     prop="usex"
45
                     label="性别"
45
                     label="性别"

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

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

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

@@ -610,47 +610,10 @@ export default {
610
       if (this.type == 1) {
610
       if (this.type == 1) {
611
         //新增时
611
         //新增时
612
         row.createDate = getDateTimeNow()
612
         row.createDate = getDateTimeNow()
613
-        console.log(row.createDate, "createDate")
613
+
614
         // console.log(this.checkItems, "是否被选中")
614
         // console.log(this.checkItems, "是否被选中")
615
         var num = 0
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
         // console.log(this.checkItems[i].enumId, "this.checkItems[i].enumId")
617
         // console.log(this.checkItems[i].enumId, "this.checkItems[i].enumId")
655
         // var num =0;
618
         // var num =0;
656
         this.checkItems[i].checkEnumId = this.checkItems[i].enumId
619
         this.checkItems[i].checkEnumId = this.checkItems[i].enumId
@@ -679,51 +642,26 @@ export default {
679
           this.data1.equipFacilities.checkState = 0
642
           this.data1.equipFacilities.checkState = 0
680
           // console.log("此时暂存还是暂存,切状态改为 进行中")
643
           // console.log("此时暂存还是暂存,切状态改为 进行中")
681
         }
644
         }
682
-      } */
645
+      }
646
+
683
       } else if (this.type == 3) {
647
       } else if (this.type == 3) {
684
         //修改时
648
         //修改时
685
-        // row.operationTime = getNowFormatDateone()
686
         row.operationTime = getDateTimeNow()
649
         row.operationTime = getDateTimeNow()
687
-        // row.operationTime = getNowFormatDateone()
688
         var num = 0
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
         // console.log(this.checkItems[i].enumId, "this.checkItems[i].enumId")
654
         // console.log(this.checkItems[i].enumId, "this.checkItems[i].enumId")
718
         // var num =0;
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
         if (this.checkItems[i].isCheck === 0) {
657
         if (this.checkItems[i].isCheck === 0) {
722
           // 有一项点击否,结果就是1(黄)
658
           // 有一项点击否,结果就是1(黄)
723
           this.data1.equipFacilities.checkResult = 1
659
           this.data1.equipFacilities.checkResult = 1
660
+          console.log(this.data1.equipFacilities.checkResult,'this.data1.equipFacilities.checkResult')
724
         } else {
661
         } else {
725
           // 有一项点击否,结果就是0(绿)
662
           // 有一项点击否,结果就是0(绿)
726
           this.data1.equipFacilities.checkResult = 0
663
           this.data1.equipFacilities.checkResult = 0
664
+          console.log(this.data1.equipFacilities.checkResult,'this.data1.equipFacilities.checkResult')
727
         }
665
         }
728
 
666
 
729
         if (
667
         if (
@@ -731,23 +669,34 @@ export default {
731
           this.checkItems[i].isCheck === 0
669
           this.checkItems[i].isCheck === 0
732
         ) {
670
         ) {
733
           num += 1
671
           num += 1
734
-          // console.log(this.checkItems[i], num, "该项被选中了")
672
+          console.log(this.checkItems[i], num, "该项被选中了")
735
         }
673
         }
736
 
674
 
737
         if (num == this.checkItems.length) {
675
         if (num == this.checkItems.length) {
738
           this.data1.equipFacilities.checkState = 1
676
           this.data1.equipFacilities.checkState = 1
739
           this.flag = true
677
           this.flag = true
740
-          // console.log("此时暂存变保存,切状态改为已完成")
678
+          console.log("此时暂存变保存,切状态改为已完成")
741
         } else {
679
         } else {
742
           this.data1.equipFacilities.checkState = 0
680
           this.data1.equipFacilities.checkState = 0
743
-          // console.log("此时暂存还是暂存,切状态改为 进行中")
681
+          console.log("此时暂存还是暂存,切状态改为 进行中")
744
         }
682
         }
745
-      } */
683
+      }
746
       }
684
       }
747
     },
685
     },
748
     // 保存
686
     // 保存
749
     btnSave() {
687
     btnSave() {
750
       this.loading = true
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
       this.data1.equipFacilities.hname = this.houseDic[
700
       this.data1.equipFacilities.hname = this.houseDic[
752
         this.data1.equipFacilities.hid
701
         this.data1.equipFacilities.hid
753
       ]
702
       ]

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

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

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

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