linyanfei 3 anni fa
parent
commit
c26ceae923

+ 56 - 0
shanXiPlatform/src/api/facilitiesEquipment/facilitiesManagement.js

@@ -66,3 +66,59 @@ export function deleteFacilitiyInfo(id) {
66 66
     method: 'delete',
67 67
   })
68 68
 }
69
+//获取当前时间
70
+export function getDateTimeNow(){
71
+  var time = new Date();
72
+  var day = ("0" + time.getDate()).slice(-2)
73
+  var month = ("0" + (time.getMonth()+1)).slice(-2)
74
+
75
+  var hour = ("0" + time.getHours()).slice(-2)
76
+  var minute = ("0" + time.getMinutes()).slice(-2)
77
+  var second = ("0" + time.getSeconds()).slice(-2)
78
+
79
+  var today = time.getFullYear() + "-" + (month) + "-" + (day) + " " + (hour) + ":" + (minute) + ":" + (second)
80
+  return today
81
+}
82
+
83
+//时间格式化
84
+export function getNowFormatDateone() {
85
+  var date = new Date()
86
+  var seperator1 = "-"
87
+
88
+  var year = date.getFullYear()
89
+  var month = date.getMonth() + 1
90
+  var hour = date.getHours()
91
+  var minutes = date.getMinutes()
92
+  var seconds = date.getSeconds();
93
+  var strDate = date.getDate()
94
+
95
+  if (month >= 1 && month <= 9) {
96
+    month = "0" + month
97
+  }
98
+  if (strDate >= 0 && strDate <= 9) {
99
+    strDate = "0" + strDate
100
+  }
101
+  if (minutes >= 0 && minutes <= 9) {
102
+    minutes = "0" + minutes
103
+  }
104
+  if (seconds >= 0 && seconds <= 9) {
105
+    seconds = "0" + seconds
106
+  }
107
+  // var currentdate = year + seperator1 + month + seperator1 + strDate+"  "+hour+":" +minutes+":" +seconds;
108
+
109
+  var currentdate =
110
+    year +
111
+    seperator1 +
112
+    month+
113
+    seperator1 +
114
+    strDate
115
+    +
116
+    "  " +
117
+    hour +
118
+    ":" +
119
+    minutes
120
+    ":" +
121
+    seconds
122
+
123
+  return currentdate
124
+}

+ 76 - 75
shanXiPlatform/src/views/basicInformation/personnelStructure.vue

@@ -268,8 +268,78 @@ export default {
268 268
         limit: 10
269 269
       },
270 270
       xAxisdata: [],
271
-      seriesdata: []
271
+      seriesdata: [],
272 272
       // chart 数据设置
273
+      option : {
274
+          title: {
275
+            // text: "仓储、质检人员职业资格情况",
276
+            textStyle: {
277
+              color: "#7d7d7d",
278
+              fontStyle: "normal",
279
+              fontWeight: "900",
280
+              fontSize: "14"
281
+            },
282
+            left: "center"
283
+          },
284
+          tooltip: {
285
+            trigger: "axis",
286
+            axisPointer: {
287
+              // 坐标轴指示器,坐标轴触发有效
288
+              type: "shadow" // 默认设置为直线,可选为 'line' | 'shadow'
289
+            }
290
+          },
291
+          grid: {
292
+            y2: 60
293
+          },
294
+          /* legend:{
295
+          data:['初级','中级','高级','技师','高级技师']
296
+        }, */
297
+          /*         grid:{
298
+          left:'3%',
299
+          right:'4%',
300
+          bottom:'3%',
301
+          containLabel:true
302
+        }, */
303
+          xAxis: {
304
+            type: "category",
305
+            data: this.xAxisdata,
306
+            // data: ["初级", "中级", "高级", "技师", "高级技师"],
307
+            // data: this.xAxisdata,
308
+            axisTick: {
309
+              alignWithLabel: true
310
+            },
311
+            axisLabel: {
312
+              rotate: 60
313
+            }
314
+          },
315
+          yAxis: {
316
+            type: "value",
317
+            min: 3
318
+          },
319
+          series: [
320
+            {
321
+              name: "人数",
322
+              barWidth: "40%",
323
+              data: this.seriesdata,
324
+              // data: [1, 2, 1, 1, 1, 1, null, null],
325
+              type: "bar",
326
+              //修改第一组柱子的颜色
327
+              itemStyle: {
328
+                // barBorderRadius:20,
329
+                color: function(p) {
330
+                  var color = [
331
+                    "#F1DE34",
332
+                    "#58CEFF",
333
+                    "#8CCF23",
334
+                    "#FEBB46",
335
+                    "#4FC5BB"
336
+                  ]
337
+                  return color[p.dataIndex]
338
+                }
339
+              }
340
+            }
341
+          ]
342
+        }
273 343
     }
274 344
   },
275 345
 
@@ -449,8 +519,8 @@ export default {
449 519
         document.getElementById("chartProfession")
450 520
       )
451 521
       // 使用刚指定的配置项和数据显示图标
452
-      
453
-      if (this.seriesdata.length == 0) {
522
+
523
+      /* if (this.seriesdata.length == 0) {
454 524
         option = {
455 525
           title: {
456 526
             text: "暂无数据",
@@ -464,78 +534,9 @@ export default {
464 534
           }
465 535
         }
466 536
       } else {
467
-        option = {
468
-          title: {
469
-            // text: "仓储、质检人员职业资格情况",
470
-            textStyle: {
471
-              color: "#7d7d7d",
472
-              fontStyle: "normal",
473
-              fontWeight: "900",
474
-              fontSize: "14"
475
-            },
476
-            left: "center"
477
-          },
478
-          tooltip: {
479
-            trigger: "axis",
480
-            axisPointer: {
481
-              // 坐标轴指示器,坐标轴触发有效
482
-              type: "shadow" // 默认设置为直线,可选为 'line' | 'shadow'
483
-            }
484
-          },
485
-          grid: {
486
-            y2: 60
487
-          },
488
-          /* legend:{
489
-          data:['初级','中级','高级','技师','高级技师']
490
-        }, */
491
-          /*         grid:{
492
-          left:'3%',
493
-          right:'4%',
494
-          bottom:'3%',
495
-          containLabel:true
496
-        }, */
497
-          xAxis: {
498
-            type: "category",
499
-            data: this.xAxisdata,
500
-            // data: ["初级", "中级", "高级", "技师", "高级技师"],
501
-            // data: this.xAxisdata,
502
-            axisTick: {
503
-              alignWithLabel: true
504
-            },
505
-            axisLabel: {
506
-              rotate: 60
507
-            }
508
-          },
509
-          yAxis: {
510
-            type: "value",
511
-            min: 3
512
-          },
513
-          series: [
514
-            {
515
-              name: "人数",
516
-              barWidth: "40%",
517
-              data: this.seriesdata,
518
-              // data: [1, 2, 1, 1, 1, 1, null, null],
519
-              type: "bar",
520
-              //修改第一组柱子的颜色
521
-              itemStyle: {
522
-                // barBorderRadius:20,
523
-                color: function(p) {
524
-                  var color = [
525
-                    "#F1DE34",
526
-                    "#58CEFF",
527
-                    "#8CCF23",
528
-                    "#FEBB46",
529
-                    "#4FC5BB"
530
-                  ]
531
-                  return color[p.dataIndex]
532
-                }
533
-              }
534
-            }
535
-          ]
536
-        }
537
-      }
538
-      myChart.setOption(option)
537
+
538
+      } */
539
+      myChart.setOption(this.option)
539 540
     },
540 541
     // 筛选科室
541 542
     handleClick(tab, event) {

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

@@ -18,22 +18,11 @@
18 18
                 range-separator="至"
19 19
                 start-placeholder="开始日期"
20 20
                 end-placeholder="结束日期"
21
-                value-format="yyyy-MM-dd HH:mm"
21
+                value-format="yyyy-MM-dd"
22 22
               >
23 23
               </el-date-picker>
24 24
         </el-form-item>
25
-        <!--  <el-form-item label="-">
26
-          <el-date-picker
27
-            v-model="query.end"
28
-            type="date"
29
-            placeholder="选择日期"
30
-
31
-            :default-time="['00:00:00']"
32
-            value-format="yyyy-MM-dd HH:mm:ss"
33
-          >
34
-          </el-date-picker>
35 25
 
36
-        </el-form-item> -->
37 26
 
38 27
         <el-form-item label="设施种类:">
39 28
           <el-select v-model="kind" placeholder="请选择设施种类">
@@ -80,6 +69,9 @@
80 69
       <el-table-column type="index" align="center" label="序号" width="50px">
81 70
       </el-table-column>
82 71
       <el-table-column prop="checkTime" label="检查时间" align="center">
72
+          <template slot-scope="scope">
73
+         <span>{{ scope.row.checkTime.slice(0,16) }}</span>
74
+        </template>
83 75
       </el-table-column>
84 76
       <el-table-column prop="kind" label="设施种类" align="center">
85 77
         <template slot-scope="scope">
@@ -179,7 +171,8 @@ import {
179 171
   getFacility,
180 172
   getAllFacilitiyCheckRecord,
181 173
   checkFacilitiyInfo,
182
-  deleteFacilitiyInfo
174
+  deleteFacilitiyInfo,
175
+  getNowFormatDateone
183 176
 } from "@/api/facilitiesEquipment/facilitiesManagement"
184 177
 export default {
185 178
   // components: { Pagination },
@@ -206,7 +199,8 @@ export default {
206 199
         type: undefined,
207 200
         sort: "+id" */
208 201
       },
209
-      allData: []
202
+      allData: [],
203
+      time:''
210 204
     }
211 205
   },
212 206
   mounted() {
@@ -242,11 +236,15 @@ export default {
242 236
         pageSize: this.listQuery.limit,
243 237
         condition: JSON.stringify(condition)
244 238
       }
245
-      console.log(data, "查询数据")
239
+      console.log(this.value2, "查询数据value2")
246 240
       getAllFacilitiyCheckRecord(data)
247 241
         .then(res => {
248
-          console.log(res, "1111")
242
+          // console.log(res, "1111")
249 243
           this.allData = res.data.records
244
+          this.allData.forEach(element => {
245
+            element.time = element.checkTime.substring(0,this.allData[1].checkTime.length-3)
246
+            console.log( element.time,' element.time')
247
+          });
250 248
           this.listLoading = false
251 249
           this.listQuery.limit = res.data.size
252 250
           this.total = res.data.total
@@ -274,13 +272,16 @@ export default {
274 272
           if (res.code == 200) {
275 273
             console.log(res, "全部列表返回数据..........")
276 274
             this.allData = res.data.records
277
-
275
+            this.allData.forEach(element => {
276
+              element.time = element.checkTime.substring(0,this.allData[1].checkTime.length-3)
277
+              // console.log( element.time,' element.time')
278
+          });
278 279
             this.listLoading = false
279 280
             this.listQuery.limit = res.data.size
280 281
             this.total = res.data.total
281 282
           }
282 283
 
283
-          console.log(this.allData, "arrdata全部检查记录")
284
+          // console.log(this.allData, "arrdata全部检查记录")
284 285
         })
285 286
         .catch(err => {
286 287
           console.log(err, "获取全部记录失败信息")

+ 19 - 11
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/newFacilities/addType.vue

@@ -24,6 +24,7 @@
24 24
             width="50px"
25 25
           />
26 26
           <el-table-column label="记录时间" prop="createDate" align="center" />
27
+          <!-- <el-table-column label="记录时间" prop="time" align="center" /> -->
27 28
 
28 29
           <el-table-column label="检查项" prop="enumId" align="center">
29 30
             <template slot-scope="scope">
@@ -110,13 +111,14 @@
110 111
 </template>
111 112
 <script>
112 113
 //时间格式的转化
113
-import { getNowFormatDateone, formatTime } from "@/utils"
114 114
 import {
115 115
   getFacility,
116 116
   getFacilitiyById,
117 117
   addFacilitiy,
118 118
   editFacilitiy,
119
-  checkFacilitiyInfo
119
+  checkFacilitiyInfo,
120
+  getNowFormatDateone,
121
+  getDateTimeNow
120 122
 } from "@/api/facilitiesEquipment/facilitiesManagement"
121 123
 export default {
122 124
   name: "AddType",
@@ -528,7 +530,7 @@ export default {
528 530
             if (res.code == 200) {
529 531
               // console.log(res, "检查项数据")
530 532
               this.checkItems = res.data
531
-              // console.log(this.checkItems, "this.checkItems")
533
+              console.log(this.checkItems, "this.checkItems")
532 534
               for (let i = 0; i < this.checkItems.length; i++) {
533 535
                 this.checkItems[i].isCheck = ""
534 536
                 this.checkItems[i].checkEnumId = ""
@@ -548,7 +550,12 @@ export default {
548 550
           .then(res => {
549 551
             console.log(res, "查看数据222")
550 552
             this.checkItems = res
551
-            // console.log(this.checkItems, "this.checkItems222")
553
+            /* this.checkItems.forEach(element => {
554
+              element.createDate = element.createDate.substring(0,element.createDate.length-3)
555
+              // console.log( element.time,' element.time')
556
+              console.log( element.createDate,' element.time')
557
+          }); */
558
+            console.log(this.checkItems, "this.checkItems222")
552 559
             for (let i = 0; i < this.checkItems.length; i++) {
553 560
               this.checkItems[i].createDate = res[i].operationTime
554 561
               this.checkItems[i].enumId = res[i].checkEnumId
@@ -562,7 +569,7 @@ export default {
562 569
         checkFacilitiyInfo(this.id).then(res => {
563 570
           // console.log(res, "修改数据333")
564 571
           this.checkItems = res
565
-          // console.log(this.checkItems, "this.checkItems333")
572
+          console.log(this.checkItems, "this.checkItems333")
566 573
           /* for (let i = 0; i < this.checkItems.length; i++) {
567 574
             this.checkItems[i].createDate = res[i].operationTime
568 575
             this.checkItems[i].enumId = res[i].checkEnumId
@@ -602,8 +609,8 @@ export default {
602 609
       console.log(row, "row111", index, "index")
603 610
       if (this.type == 1) {
604 611
         //新增时
605
-        row.createDate = getNowFormatDateone()
606
-        // console.log(row.createDate, "createDate")
612
+        row.createDate = getDateTimeNow()
613
+        console.log(row.createDate, "createDate")
607 614
         // console.log(this.checkItems, "是否被选中")
608 615
         var num = 0
609 616
 
@@ -611,11 +618,11 @@ export default {
611 618
             // 有一项点击否,结果就是1(黄)
612 619
             this.data1.equipFacilities.checkResult = 1
613 620
             this.checkResult = 1
614
-          } else{
621
+          } /* else{
615 622
             // 有一项点击是,结果就是0(绿)
616 623
             this.data1.equipFacilities.checkResult = 0
617 624
             this.checkResult = 0
618
-          }
625
+          } */
619 626
         this.checkItems.forEach((item, index) => {
620 627
           Object.assign(
621 628
             item,
@@ -675,7 +682,8 @@ export default {
675 682
       } */
676 683
       } else if (this.type == 3) {
677 684
         //修改时
678
-        row.operationTime = getNowFormatDateone()
685
+        // row.operationTime = getNowFormatDateone()
686
+        row.operationTime = getDateTimeNow()
679 687
         // row.operationTime = getNowFormatDateone()
680 688
         var num = 0
681 689
 
@@ -743,7 +751,7 @@ export default {
743 751
       this.data1.equipFacilities.hname = this.houseDic[
744 752
         this.data1.equipFacilities.hid
745 753
       ]
746
-      this.data1.equipFacilities.checkTime = getNowFormatDateone()
754
+      this.data1.equipFacilities.checkTime = getDateTimeNow()
747 755
       console.log(
748 756
         this.data1.equipFacilities.checkTime,
749 757
         "this.data1.equipFacilities.ccheckTime"

+ 17 - 6
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="checkTime" label="最近记录时间" align="center">
18
+      <el-table-column prop="time" label="最近记录时间" align="center">
19 19
       </el-table-column>
20 20
       <el-table-column prop="checkState" label="状态" align="center">
21 21
         <template slot-scope="scope">
@@ -100,10 +100,12 @@
100 100
 <script>
101 101
 // 引入接口
102 102
 //时间格式的转化
103
-import { getNowFormatDateone, formatTime } from "@/utils"
103
+
104 104
 import {
105 105
   getFacility,
106
-  getNewFacilityCheckRecord
106
+  getNewFacilityCheckRecord,
107
+  getNowFormatDateone,
108
+  getDateTimeNow
107 109
 } from "@/api/facilitiesEquipment/facilitiesManagement"
108 110
 export default {
109 111
   data() {
@@ -131,7 +133,8 @@ export default {
131 133
       tableData: [],
132 134
       facilityKind: [],
133 135
       depotId: this.$store.state.depotId,
134
-      houseId: this.$store.state.houseId
136
+      houseId: this.$store.state.houseId,
137
+      datetime:''
135 138
     }
136 139
   },
137 140
   mounted() {
@@ -171,6 +174,11 @@ export default {
171 174
             console.log(res.data, "最新设施data") */
172 175
             // 把拿到的设施检查记录保存到data()中,并设为table数据源
173 176
             this.tableData = res.data
177
+            this.tableData.forEach(element => {
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
+          });
174 182
           }
175 183
         })
176 184
         .catch(err => {
@@ -181,8 +189,11 @@ export default {
181 189
     handleAdd(type, index, row) {
182 190
       console.log(index, "index", row, "row")
183 191
       console.log(row.checkTime, "改变时间...")
184
-      row.checkTime = getNowFormatDateone()
185
-      console.log(row.checkTime, "改变时间...")
192
+      row.checkTime = getDateTimeNow()
193
+      this.datetime = getDateTimeNow()
194
+
195
+      console.log(row.checkTime, "改变时间111...")
196
+      console.log( this.datetime, "改变时间...")
186 197
       if (row.depotId == null) {
187 198
         row.depotId = this.depotId
188 199
         console.log("库id为空时")

+ 2 - 2
shanXiPlatform/src/views/home/branchOffice.vue

@@ -1418,7 +1418,7 @@ export default {
1418 1418
                 .myChartdcru {
1419 1419
                     width: 100%;
1420 1420
                     height: 10%;
1421
-                    padding: 13px 3px 5px 0;
1421
+                    padding: 13px 3px 5px 10px;
1422 1422
                     color: #333;
1423 1423
                     font-weight: 400;
1424 1424
                     font-family: Source Han Sans CN;
@@ -1489,7 +1489,7 @@ export default {
1489 1489
                 .myChartdcru {
1490 1490
                     width: 100%;
1491 1491
                     height: 10%;
1492
-                    padding: 13px 3px 5px 0;
1492
+                    padding: 13px 3px 5px 10px;
1493 1493
                     color: #333;
1494 1494
                     font-weight: 400;
1495 1495
                     font-family: Source Han Sans CN;

+ 18 - 14
shanXiPlatform/src/views/reservesManagement/grainCheck/newGrain/addNewGrain.vue

@@ -83,7 +83,7 @@
83 83
           type="savebtn"
84 84
           :loading="loading"
85 85
           v-show="show"
86
-          v-else-if="flag"
86
+          v-if="flag"
87 87
           @click="saveInfo"
88 88
           >保存</el-button
89 89
         >
@@ -207,7 +207,7 @@ export default {
207 207
       loading: false,
208 208
       checkTime: "",
209 209
       //库id
210
-      depot_id: "",
210
+      depot_id: this.$store.state.depotId,
211 211
       //仓房id
212 212
       house_id: this.$store.state.houseId,
213 213
       houseId: "",
@@ -529,16 +529,24 @@ export default {
529 529
       if (this.type == "2") {
530 530
         this.data3.depotId = this.depot_id
531 531
         this.data3.houseId = this.house_id
532
-        // console.log(this.house_id, "house_id")
533
-        // console.log(this.data3.houseId, "this.data3.houseId...")
532
+        console.log(this.house_id, "house_id")
533
+        console.log(this.data3.houseId, "this.data3.houseId...")
534 534
         this.data3.checkDescribe = JSON.stringify(this.data3.checkDescribe)
535 535
 
536 536
         addInfo(this.data3)
537 537
           .then(res => {
538
-            // console.log(this.data3, "this.data3")
539
-            // console.log(res,'res222111...')
538
+            console.log(this.data3, "this.data3")
539
+            console.log(res,'res222111...')
540 540
             if (res.code == 200) {
541
+              console.log('新增成功........')
541 542
               this.loading = false
543
+              this.$message({
544
+              message: "新增成功!",
545
+              type: "success"
546
+            })
547
+            this.$router.push({
548
+              path: "/reservesManagement/grainCheck/newGrain"
549
+            })
542 550
               if (!(JSON.stringify(this.data2) == {})) {
543 551
                 if (
544 552
                   Object.getOwnPropertyNames(
@@ -548,10 +556,11 @@ export default {
548 556
                   //当选项全部被选中后调用接口
549 557
                   let auditState = 4 //4 是已完成
550 558
                   //判断是否切换仓房,或者仓房发生改变
559
+                  console.log(this.house_id,this.data2.houseId,'houseId')
551 560
                   if (this.house_id == this.data2.houseId) {
552 561
                     haveDone(this.data2.id, auditState)
553 562
                       .then(res => {
554
-                        // console.log(res, "res.......")
563
+                        console.log(res, "res.......")
555 564
                       })
556 565
                       .catch(err => {
557 566
                         console.log(err)
@@ -579,14 +588,9 @@ export default {
579 588
                   }
580 589
                 }
581 590
               }
591
+
582 592
             }
583
-            this.$message({
584
-              message: "新增成功!",
585
-              type: "success"
586
-            })
587
-            this.$router.push({
588
-              path: "/reservesManagement/grainCheck/newGrain"
589
-            })
593
+
590 594
           })
591 595
           .catch(err => {
592 596
             this.loading = false