Browse Source

低压测试页面修正

lloyd 3 months ago
parent
commit
dfbf992b18

+ 3 - 1
src/components/NewWorkPage/DvhCardTimePicker.vue

@@ -9,7 +9,7 @@ import {getAction} from "@/api/manage";
9 9
 export default {
10 10
   name: "DvhCardTimePicker",
11 11
   props: ["wellId", "time"],
12
-  emits: ['update:time'],
12
+  emits: ['update:time', 'change'],
13 13
   data() {
14 14
     return {
15 15
       visible: false,
@@ -945,6 +945,7 @@ export default {
945 945
       this.timePicker.selected = card.replace('\n', ' ')
946 946
       this.visible = false
947 947
       this.$emit('update:time', this.timePicker.selected)
948
+      this.$emit('change', this.timePicker.selected)
948 949
     },
949 950
     nextPage() {
950 951
       this.skipPage(this.curPage + 1)
@@ -993,6 +994,7 @@ export default {
993 994
         wellId: this.wellId,
994 995
         limitSize: this.timePicker.pageMaxSize
995 996
       }
997
+      console.log(param);
996 998
       let _this = this
997 999
       getAction(publicUrl.cardTimePicker, param).then(res => {
998 1000
         if (res.data.status !== 1) {

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

@@ -4,9 +4,12 @@ import "./css/layout.css"
4 4
 import "./css/dvh-check.css"
5 5
 import {getAction, postAction, uploadExcel} from "@/api/manage";
6 6
 import publicUrl from "@/api/publicUrl";
7
+import DvhCardTimePicker from "@/components/NewWorkPage/DvhCardTimePicker.vue";
8
+import WellSelector from "@/components/NewWorkPage/WellSelector.vue";
7 9
 
8 10
 export default {
9 11
   name: "DvhCompareDialog",
12
+  components: {WellSelector, DvhCardTimePicker},
10 13
   props: ["visible", "dvhCardId", "wellId"],
11 14
   emits: ["update:visible"],
12 15
   data() {
@@ -17,6 +20,7 @@ export default {
17 20
         recordId: '',
18 21
         cardId: '',
19 22
         wellId: '',
23
+        cardTime: '',
20 24
         leftChartOption: {
21 25
           title: {
22 26
             text: '',
@@ -259,19 +263,24 @@ export default {
259 263
       this.$emit("update:visible", false);
260 264
     },
261 265
     initView() {
262
-      if (this.dvhCardCheck.cardId === '' || this.dvhCardCheck.cardId === undefined) {
263
-        return
264
-      }
265 266
       this.setLeftCard()
266 267
     },
267 268
     //根据数据id查询对应功图显示
268 269
     setLeftCard() {
269
-      let params = {
270
+      let params = {}
271
+      if (this.dvhCardCheck.cardId) params = {
270 272
         wellId: this.dvhCardCheck.cardId.split(' ')[0],
271 273
         prodDate: this.dvhCardCheck.cardId.split(' ')[1] + ' ' + this.dvhCardCheck.cardId.split(' ')[2]
272 274
       }
275
+      else if (this.dvhCardCheck.wellId && this.dvhCardCheck.cardTime) params = {
276
+        wellId: this.dvhCardCheck.wellId,
277
+        prodDate: this.dvhCardCheck.cardTime
278
+      }
279
+      else return
280
+
281
+
273 282
       getAction(publicUrl.getCheckRTUCard, params).then(res => {
274
-        console.log(res.data.data)
283
+        this.dvhCardCheck.cardId = ''//就是一次,后面可以自己选择
275 284
         this.setLeftCardData(res.data.data)
276 285
       })
277 286
     },
@@ -378,7 +387,10 @@ export default {
378 387
     <div class="flex-row min200">
379 388
       <div class="col-in-row flex-col dvh-original">
380 389
         <div class="f-height-30">
381
-<!--          <well-selector></well-selector>-->
390
+          <well-selector :selected.sync="dvhCardCheck.wellId"></well-selector>
391
+          <dvh-card-time-picker :well-id="dvhCardCheck.wellId"
392
+                                :time.sync="dvhCardCheck.cardTime"
393
+                                v-on:change="setLeftCard"></dvh-card-time-picker>
382 394
         </div>
383 395
         <div class="row-in-col">
384 396
           <v-chart :options="dvhCardCheck.leftChartOption"
@@ -450,7 +462,7 @@ export default {
450 462
               :show-file-list="false"
451 463
               :http-request="uploadDvhCard"
452 464
               :file-list="dvhCardCheck.upload.files">
453
-            <el-tooltip  effect="dark" content="上传低压测试功图dat文件" placement="top-start">
465
+            <el-tooltip effect="dark" content="上传低压测试功图dat文件" placement="top-start">
454 466
               <el-button size="small" icon="el-icon-upload" title="">上传功图</el-button>
455 467
             </el-tooltip>
456 468
 

+ 2 - 1
src/components/NewWorkPage/MainLayout.vue

@@ -35,7 +35,8 @@ export default {
35 35
 
36 36
     </div>
37 37
     <div class="main-body">
38
-      <dvh-compare-dialog  :visible.sync="dvhCardCheck.visible" dvh-card-id="WELLTL100001455 2023-12-22 10:26:34" well-id="WELLTL100001455"
38
+<!--      dvh-card-id="WELLTL100001455 2023-12-22 10:26:34"-->
39
+      <dvh-compare-dialog  :visible.sync="dvhCardCheck.visible"  well-id="WELLTL100001455"
39 40
                          ></dvh-compare-dialog>
40 41
       <el-card>
41 42
         <div slot="header">