Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/yichang' into yichang

xsr 1 anno fa
parent
commit
91ca98efd3
2 ha cambiato i file con 52 aggiunte e 10 eliminazioni
  1. 50 9
      src/components/workSolution/workSolution.vue
  2. 2 1
      src/router/index.js

+ 50 - 9
src/components/workSolution/workSolution.vue

@@ -101,6 +101,10 @@
101 101
         </el-dropdown>
102 102
       </div>
103 103
       <div style="width: 40%;float:left">
104
+        <div style="width: 100%;">
105
+          <el-button type="success"  size="mini"  @click="toPrev()" style="margin-left: 65%">上一个</el-button>
106
+          <el-button type="success"  size="mini" @click="toNext()">下一个</el-button>
107
+        </div>
104 108
         <p class="solutionTopTitle solutionTopTitle2_1">
105 109
           {{ jing }} {{ jingtime }}
106 110
         </p>
@@ -511,6 +515,8 @@ export default {
511 515
       jing: '',
512 516
       jingtime: '',
513 517
       workDiagramFullscreen:false,
518
+      dataIndex:0,
519
+      dataList:[]
514 520
     }
515 521
   },
516 522
   methods: {
@@ -610,6 +616,38 @@ export default {
610 616
         }
611 617
       })
612 618
     },
619
+    toPrev(){
620
+      if (this.dataIndex -1 <0){
621
+        this.dataIndex = 0
622
+        this.$message.success("前面已经没有了")
623
+        return
624
+      }
625
+      else this.dataIndex = this.dataIndex-1
626
+      this.form.name6 ={
627
+        name:this.dataList[this.dataIndex].wellCommonName,//井号,
628
+        id:this.dataList[this.dataIndex].wellId//井号
629
+      }
630
+      this.form.name4 = this.dataList[this.dataIndex].prodDate//单日期
631
+
632
+      this.getData()
633
+    },
634
+    toNext(){
635
+      if (this.dataIndex +1 >this.dataList.length) {
636
+        this.dataIndex = this.dataList.length
637
+        this.$message.success("前面已经没有了")
638
+        return
639
+      }
640
+      else this.dataIndex = this.dataIndex+1
641
+      this.form.name6 ={
642
+        name:this.dataList[this.dataIndex].wellCommonName,//井号,
643
+        id:this.dataList[this.dataIndex].wellId//井号
644
+      }
645
+      this.form.name4 = this.dataList[this.dataIndex].prodDate//单日期
646
+      console.log(this.form)
647
+
648
+      this.getData()
649
+    },
650
+
613 651
     changeWorkDiagramFullscreen(num) {
614 652
       //改变油井功图全屏状态
615 653
       let publicModal = document
@@ -1721,21 +1759,24 @@ export default {
1721 1759
       // this.getDate()
1722 1760
       // this.getPage()
1723 1761
       getAction(publicUrl.getDefaultData).then((res) => {
1762
+        this.dataIndex = 0
1763
+        this.dataList = res.data.data
1764
+        let data = res.data.data[0]
1724 1765
         _this.form.name6 ={
1725
-          name:res.data.data.wellCommonName,//井号,
1726
-          id:res.data.data.wellId//井号
1766
+          name:data.wellCommonName,//井号,
1767
+          id:data.wellId//井号
1727 1768
         }
1728 1769
          //_this.form.name3 = res.data.data.wellId//井号
1729 1770
 
1730
-        _this.form.name4 = res.data.data.prodDate//单日期
1771
+        _this.form.name4 = data.prodDate//单日期
1731 1772
 
1732 1773
         _this.getData()
1733
-        _this.zuoyequChange(res.data.data.zyq)
1734
-        _this.form.name = res.data.data.zyq//单日期
1735
-        _this.jingquChange(res.data.data.jq)
1736
-        _this.form.name1 = res.data.data.jq//单日期
1737
-        _this.zhandianChange(res.data.data.zd)
1738
-        _this.form.name2 = res.data.data.zd//单日期
1774
+        _this.zuoyequChange(data.zyq)
1775
+        _this.form.name = data.zyq//单日期
1776
+        _this.jingquChange(data.jq)
1777
+        _this.form.name1 = data.jq//单日期
1778
+        _this.zhandianChange(data.zd)
1779
+        _this.form.name2 = data.zd//单日期
1739 1780
       })
1740 1781
     }
1741 1782
   },

+ 2 - 1
src/router/index.js

@@ -261,7 +261,8 @@ const routes = [
261 261
 			{
262 262
 				path: '/manualMeter',
263 263
 				name: '人工计量录入',
264
-				component: manualMeter
264
+				component: manualMeter,
265
+				meta:{keepAlive: true}
265 266
 			},
266 267
 			{
267 268
 				path: '/runningJob',