xsr 2 månader sedan
förälder
incheckning
65f9e8bcf6

+ 3 - 0
src/api/publicUrl.js

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

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

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

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

@@ -107,9 +107,14 @@
107 107
       </div>
108 108
       <div style="width: 40%;float:left">
109 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 118
           <el-button type="success" size="mini" @click="toPrev()">上一个</el-button>
114 119
           <el-button type="success" size="mini" @click="toNext()">下一个</el-button>
115 120
         </div>
@@ -149,6 +154,18 @@
149 154
             align="center"
150 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 169
         </el-table-column>
153 170
         <el-table-column prop="stroke" label="冲程" align="center">
154 171
         </el-table-column>
@@ -338,7 +355,7 @@
338 355
         <tr>
339 356
           <td class="tabletitle tabletitle2">计产数据</td>
340 357
           <td>{{ tableInfo.prodDate }}</td>
341
-          <td>{{ tableInfo.liqProdDaily }}</td>
358
+          <td>{{fels.status?'':tableInfo.liqProdDaily}}</td>
342 359
           <td>{{ tableInfo.oilProdDaily }}</td>
343 360
           <td>{{ tableInfo.waterCut }}</td>
344 361
           <td>{{ tableInfo.prodTime }}</td>
@@ -516,6 +533,11 @@ export default {
516 533
           dym: '',
517 534
         }
518 535
       },
536
+      fels:{
537
+        status: false,
538
+        message: '',
539
+        recordId: '' //update use
540
+      },
519 541
       chartsTableHeight: '300px',
520 542
       scrollTop: '',
521 543
       isFirstEnter: false, //
@@ -525,7 +547,8 @@ export default {
525 547
         //给一个默认的检索时间
526 548
         time: '',
527 549
         status:{
528
-          message:'待校核'
550
+          message:'待校核',
551
+          cause: ''
529 552
         }
530 553
       },
531 554
       form: {
@@ -578,6 +601,49 @@ export default {
578 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 647
     getDate() {//获取当前日期
582 648
       let dateTime = ''
583 649
       let yy = new Date().getFullYear()
@@ -595,9 +661,14 @@ export default {
595 661
     },
596 662
     //获取低压测试状态
597 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 673
     async openDvhCheckView() {
603 674
       this.dvhCardCheck.wellId = await this.confirmWellExist()
@@ -704,12 +775,13 @@ export default {
704 775
           this.form.name3 = nowSearchArr[0].id
705 776
           this.form.name6.id = this.form.name3
706 777
           _this.getDayInfo()
707
-          _this.getDayInfoColumnar()
708 778
           _this.getwellBoreVolDaily()
709 779
           _this.getwellBoreStatusDaily()
710 780
           _this.getMechDaily()
711 781
           _this.getDayInfoTable()
712 782
           _this.getLastUpdateTime()
783
+          _this.getDycsStatus()
784
+          _this.getFELSStatus()
713 785
         } else {
714 786
           _this.$message({
715 787
             message: "该井不存在或无权限访问",
@@ -982,6 +1054,7 @@ export default {
982 1054
       _this.tableArr = []
983 1055
       postAction(publicUrl.workSolutionDayInfo, obj).then((res) => {
984 1056
         if (res.data.status != -1) {
1057
+
985 1058
           _this.tableArr = res.data.data
986 1059
           _this.jing = _this.form.name6.name
987 1060
           _this.jingtime = _this.form.name4
@@ -1224,7 +1297,7 @@ export default {
1224 1297
             },
1225 1298
             series: [{
1226 1299
               name: '系统日志产量',
1227
-              data: top1,
1300
+              data: this.fels.status?[]:top1,
1228 1301
               stack: '系统',
1229 1302
               tooltip: {
1230 1303
                 xDateFormat: '<a style="font:15">日期: %Y-%m-%d</a>',