xsr 2 months ago
parent
commit
65f9e8bcf6

+ 3 - 0
src/api/publicUrl.js

@@ -234,12 +234,15 @@ let publicUrl = {
234
 	getLastUpdateTime: '/centralbase/cbPcProWellboreStatusDaily/getLastUpdateTime',
234
 	getLastUpdateTime: '/centralbase/cbPcProWellboreStatusDaily/getLastUpdateTime',
235
 
235
 
236
 	updateCompareResult: '/centralbase/lpt/history/result/save',
236
 	updateCompareResult: '/centralbase/lpt/history/result/save',
237
+	getLptStatus: '/centralbase/lpt/status/get',
237
 
238
 
238
 
239
 
239
 	//一次性获取所有井选择信息
240
 	//一次性获取所有井选择信息
240
 	wellsTree:'data-authorize/refactor/well/navigate/auth',
241
 	wellsTree:'data-authorize/refactor/well/navigate/auth',
241
 	//获取用于索引的功图 beginDate endDate  limitSize
242
 	//获取用于索引的功图 beginDate endDate  limitSize
242
 	cardTimePicker:"/centralbase/cbTempWellMechRuntime/getRuntimeDataLimit",
243
 	cardTimePicker:"/centralbase/cbTempWellMechRuntime/getRuntimeDataLimit",
244
+	getFELSStatus: '/production-calculation/aoidAllowControl/get',
245
+	updateFELSStatus: '/production-calculation/aoidAllowControl/allowAoid'
243
 
246
 
244
 }
247
 }
245
 export default publicUrl
248
 export default publicUrl

+ 18 - 7
src/components/NewWorkPage/DvhCompareDialog.vue

@@ -23,6 +23,7 @@ export default {
23
       //功图校核页面
23
       //功图校核页面
24
       dvhCardCheck: {
24
       dvhCardCheck: {
25
         visible: false,
25
         visible: false,
26
+        isChooseLeft: false,
26
         recordId: '',
27
         recordId: '',
27
         cardId: '',
28
         cardId: '',
28
         wellId: '',
29
         wellId: '',
@@ -293,11 +294,11 @@ export default {
293
         sgt: [],
294
         sgt: [],
294
         wellId: '',
295
         wellId: '',
295
         prodDate: '',
296
         prodDate: '',
296
-        minL: 65,
297
-        maxL: 95,
298
-        s: 8,
299
-        n: 7,
300
-        zhc: 26
297
+        minL: 0,
298
+        maxL: 0,
299
+        s: 0,
300
+        n: 0,
301
+        zhc: 0
301
       })
302
       })
302
       if (this.dvhCardCheck.cardId) params = {
303
       if (this.dvhCardCheck.cardId) params = {
303
         wellId: this.dvhCardCheck.cardId.split(' ')[0],
304
         wellId: this.dvhCardCheck.cardId.split(' ')[0],
@@ -312,6 +313,7 @@ export default {
312
 
313
 
313
       getAction(publicUrl.getCheckRTUCard, params).then(res => {
314
       getAction(publicUrl.getCheckRTUCard, params).then(res => {
314
         this.dvhCardCheck.cardId = ''//就是一次,后面可以自己选择
315
         this.dvhCardCheck.cardId = ''//就是一次,后面可以自己选择
316
+        this.dvhCardCheck.isChooseLeft = true
315
         this.setLeftCardData(res.data.data)
317
         this.setLeftCardData(res.data.data)
316
       })
318
       })
317
     },
319
     },
@@ -333,7 +335,6 @@ export default {
333
       let params = new FormData()
335
       let params = new FormData()
334
       params.append('file', item.file)
336
       params.append('file', item.file)
335
       uploadExcel(publicUrl.uploadCheckDvhCard, params).then((res) => {
337
       uploadExcel(publicUrl.uploadCheckDvhCard, params).then((res) => {
336
-        console.log(res.data.data.lowPressSgt)
337
         if (!(res.data.status === 1)) {
338
         if (!(res.data.status === 1)) {
338
           this.$message(res.data.data)
339
           this.$message(res.data.data)
339
           return
340
           return
@@ -378,10 +379,19 @@ export default {
378
       this.dvhCardCheck.compareResult.zhc = zhc1 === null || zhc2 == null ? null : (zhc2 - zhc1) / zhc1 * 100;
379
       this.dvhCardCheck.compareResult.zhc = zhc1 === null || zhc2 == null ? null : (zhc2 - zhc1) / zhc1 * 100;
379
     },
380
     },
380
     updateLptResult(isTestAccess) {
381
     updateLptResult(isTestAccess) {
382
+      console.log(this.dvhCardCheck)
381
       let compareResult = {
383
       let compareResult = {
382
         isTestAccess: isTestAccess,
384
         isTestAccess: isTestAccess,
383
         mistake: this.dvhCardCheck.compareResult,
385
         mistake: this.dvhCardCheck.compareResult,
384
-        compareSgtId: this.dvhCardCheck.cardId
386
+        compareSgtId: this.dvhCardCheck.wellId+' '+this.dvhCardCheck.cardTime
387
+      }
388
+      if (!this.dvhCardCheck.recordId){
389
+        this.$message('请先上传dat文件')
390
+        return
391
+      }
392
+      if (!this.dvhCardCheck.isChooseLeft){
393
+        this.$message('请先选择对比的功图')
394
+        return
385
       }
395
       }
386
       postAction(publicUrl.updateCompareResult, {
396
       postAction(publicUrl.updateCompareResult, {
387
         id: this.dvhCardCheck.recordId,
397
         id: this.dvhCardCheck.recordId,
@@ -391,6 +401,7 @@ export default {
391
           message: '低压测试结果已保存',
401
           message: '低压测试结果已保存',
392
           type: 'success'
402
           type: 'success'
393
         })
403
         })
404
+        this.dvhCardCheck.visible = false
394
       }).catch(() => {
405
       }).catch(() => {
395
         this.$message({
406
         this.$message({
396
           message: '未知错误',
407
           message: '未知错误',

+ 83 - 10
src/components/workSolution/workSolution.vue

@@ -107,9 +107,14 @@
107
       </div>
107
       </div>
108
       <div style="width: 40%;float:left">
108
       <div style="width: 40%;float:left">
109
         <div style="width: 100%;text-align: right">
109
         <div style="width: 100%;text-align: right">
110
-          <el-button :type="dvhCardCheck.status.message==='正常'?'success':'danger'" size="mini" @click="openDvhCheckView">
111
-            {{ dvhCardCheck.status.message }}
112
-          </el-button>
110
+
111
+          <el-tooltip effect="dark" :content="dvhCardCheck.status.cause" placement="top-start">
112
+            <el-button :type="dvhCardCheck.status.message==='正常'||dvhCardCheck.status.message==='通过测试'?'success':'danger'"
113
+                       size="mini" @click="openDvhCheckView">
114
+              {{ dvhCardCheck.status.message }}
115
+            </el-button>
116
+          </el-tooltip>
117
+
113
           <el-button type="success" size="mini" @click="toPrev()">上一个</el-button>
118
           <el-button type="success" size="mini" @click="toPrev()">上一个</el-button>
114
           <el-button type="success" size="mini" @click="toNext()">下一个</el-button>
119
           <el-button type="success" size="mini" @click="toNext()">下一个</el-button>
115
         </div>
120
         </div>
@@ -149,6 +154,18 @@
149
             align="center"
154
             align="center"
150
             width="100"
155
             width="100"
151
         >
156
         >
157
+          <template v-slot:header>
158
+            日产液量
159
+            <el-tooltip effect="dark" placement="top-start" :style="fels.status?'cursor: pointer':''" @click.native="dealFELS">
160
+              <div slot="content">
161
+                {{fels.message}}
162
+              </div>
163
+              <el-icon class="el-icon-question"></el-icon>
164
+            </el-tooltip>
165
+          </template>
166
+          <template slot-scope="scope">
167
+            {{fels.status?'':scope.row.liq_prod_daily}}
168
+          </template>
152
         </el-table-column>
169
         </el-table-column>
153
         <el-table-column prop="stroke" label="冲程" align="center">
170
         <el-table-column prop="stroke" label="冲程" align="center">
154
         </el-table-column>
171
         </el-table-column>
@@ -338,7 +355,7 @@
338
         <tr>
355
         <tr>
339
           <td class="tabletitle tabletitle2">计产数据</td>
356
           <td class="tabletitle tabletitle2">计产数据</td>
340
           <td>{{ tableInfo.prodDate }}</td>
357
           <td>{{ tableInfo.prodDate }}</td>
341
-          <td>{{ tableInfo.liqProdDaily }}</td>
358
+          <td>{{fels.status?'':tableInfo.liqProdDaily}}</td>
342
           <td>{{ tableInfo.oilProdDaily }}</td>
359
           <td>{{ tableInfo.oilProdDaily }}</td>
343
           <td>{{ tableInfo.waterCut }}</td>
360
           <td>{{ tableInfo.waterCut }}</td>
344
           <td>{{ tableInfo.prodTime }}</td>
361
           <td>{{ tableInfo.prodTime }}</td>
@@ -516,6 +533,11 @@ export default {
516
           dym: '',
533
           dym: '',
517
         }
534
         }
518
       },
535
       },
536
+      fels:{
537
+        status: false,
538
+        message: '',
539
+        recordId: '' //update use
540
+      },
519
       chartsTableHeight: '300px',
541
       chartsTableHeight: '300px',
520
       scrollTop: '',
542
       scrollTop: '',
521
       isFirstEnter: false, //
543
       isFirstEnter: false, //
@@ -525,7 +547,8 @@ export default {
525
         //给一个默认的检索时间
547
         //给一个默认的检索时间
526
         time: '',
548
         time: '',
527
         status:{
549
         status:{
528
-          message:'待校核'
550
+          message:'待校核',
551
+          cause: ''
529
         }
552
         }
530
       },
553
       },
531
       form: {
554
       form: {
@@ -578,6 +601,49 @@ export default {
578
         this.lptVersion.dataNearlyTime.bj = '最近更新时间: ' + this.lptVersion.dataNearlyTime.bj.substring(0, 10) + ' ' + this.lptVersion.dataNearlyTime.bj.substring(11)
601
         this.lptVersion.dataNearlyTime.bj = '最近更新时间: ' + this.lptVersion.dataNearlyTime.bj.substring(0, 10) + ' ' + this.lptVersion.dataNearlyTime.bj.substring(11)
579
       })
602
       })
580
     },
603
     },
604
+    dealFELS(){
605
+      if (!this.fels.status)return
606
+      this.$confirm('如果您确定该井没有发生漏失类工况,' +
607
+          '功图的剧烈变化源于措施影响且功图低压测试正常,' +
608
+          '井的生产状态正常,请点击确认按钮启用系统运算结果显示,' +
609
+          '标准功图将自动更新为最新功图', '提示', {
610
+        confirmButtonText: '确定',
611
+        cancelButtonText: '取消',
612
+        type: 'warning'
613
+      }).then(()=>{
614
+        let msg = ''
615
+          postAction(publicUrl.updateFELSStatus,{
616
+            id: this.fels.recordId
617
+          }).then(res=>{
618
+            if(res.data.status!==-1)msg+='启用成功,'
619
+            else msg+='启用失败,'
620
+            getAction(publicUrl.setStandardGt,{
621
+              wellId: this.tableArr[0].well_id,
622
+              prodDate: this.tableArr[0].prod_date,
623
+              rerunDiagnose: true,
624
+              resetResult: '泵工作正常'
625
+            }).then(res=>{
626
+              msg+= res.data.data?'标准功图已更新':'标准功图更新失败'
627
+              this.$message(msg)
628
+            })
629
+          })
630
+      })
631
+    },
632
+    getFELSStatus(){
633
+      let _this = this
634
+      getAction(publicUrl.getFELSStatus,{
635
+        wellId: this.form.name3,
636
+        prodDate: this.form.name4
637
+      }).then(res=>{
638
+        _this.getDayInfoColumnar()
639
+        if(res.data.data.isShow)this.fels.message = '近期未出现漏失工况'
640
+        else {
641
+          this.fels.message = res.data.data.detail.lastInterruptTime.substring(0,10) + res.data.data.detail.lastInterruptCause
642
+          this.fels.recordId = res.data.data.detail.id
643
+          this.fels.status = true
644
+        }
645
+      })
646
+    },
581
     getDate() {//获取当前日期
647
     getDate() {//获取当前日期
582
       let dateTime = ''
648
       let dateTime = ''
583
       let yy = new Date().getFullYear()
649
       let yy = new Date().getFullYear()
@@ -595,9 +661,14 @@ export default {
595
     },
661
     },
596
     //获取低压测试状态
662
     //获取低压测试状态
597
     getDycsStatus(){
663
     getDycsStatus(){
598
-      setTimeout(()=>{
599
-        this.dvhCardCheck.status.message='正常'
600
-      },2000)
664
+        getAction(publicUrl.getLptStatus,{
665
+          wellId: this.form.name3,
666
+          prodDate: this.form.name4
667
+        }).then(res=>{
668
+          this.dvhCardCheck.status.message = res.data.data.currentStatus
669
+          if (res.data.data.cause && !(this.dvhCardCheck.status.message==='正常'||this.dvhCardCheck.status.message==='通过测试'))
670
+            this.dvhCardCheck.status.cause = res.data.data.cause + ',需要低压测试'
671
+        })
601
     },
672
     },
602
     async openDvhCheckView() {
673
     async openDvhCheckView() {
603
       this.dvhCardCheck.wellId = await this.confirmWellExist()
674
       this.dvhCardCheck.wellId = await this.confirmWellExist()
@@ -704,12 +775,13 @@ export default {
704
           this.form.name3 = nowSearchArr[0].id
775
           this.form.name3 = nowSearchArr[0].id
705
           this.form.name6.id = this.form.name3
776
           this.form.name6.id = this.form.name3
706
           _this.getDayInfo()
777
           _this.getDayInfo()
707
-          _this.getDayInfoColumnar()
708
           _this.getwellBoreVolDaily()
778
           _this.getwellBoreVolDaily()
709
           _this.getwellBoreStatusDaily()
779
           _this.getwellBoreStatusDaily()
710
           _this.getMechDaily()
780
           _this.getMechDaily()
711
           _this.getDayInfoTable()
781
           _this.getDayInfoTable()
712
           _this.getLastUpdateTime()
782
           _this.getLastUpdateTime()
783
+          _this.getDycsStatus()
784
+          _this.getFELSStatus()
713
         } else {
785
         } else {
714
           _this.$message({
786
           _this.$message({
715
             message: "该井不存在或无权限访问",
787
             message: "该井不存在或无权限访问",
@@ -982,6 +1054,7 @@ export default {
982
       _this.tableArr = []
1054
       _this.tableArr = []
983
       postAction(publicUrl.workSolutionDayInfo, obj).then((res) => {
1055
       postAction(publicUrl.workSolutionDayInfo, obj).then((res) => {
984
         if (res.data.status != -1) {
1056
         if (res.data.status != -1) {
1057
+
985
           _this.tableArr = res.data.data
1058
           _this.tableArr = res.data.data
986
           _this.jing = _this.form.name6.name
1059
           _this.jing = _this.form.name6.name
987
           _this.jingtime = _this.form.name4
1060
           _this.jingtime = _this.form.name4
@@ -1224,7 +1297,7 @@ export default {
1224
             },
1297
             },
1225
             series: [{
1298
             series: [{
1226
               name: '系统日志产量',
1299
               name: '系统日志产量',
1227
-              data: top1,
1300
+              data: this.fels.status?[]:top1,
1228
               stack: '系统',
1301
               stack: '系统',
1229
               tooltip: {
1302
               tooltip: {
1230
                 xDateFormat: '<a style="font:15">日期: %Y-%m-%d</a>',
1303
                 xDateFormat: '<a style="font:15">日期: %Y-%m-%d</a>',