Browse Source

低压测试功能流程添加

lloyd 4 months ago
parent
commit
19b80dedae

BIN
src/assets/image/logo11.png


+ 22 - 4
src/components/NewWorkPage/DvhCardTimePicker.vue

@@ -8,7 +8,7 @@ import {getAction} from "@/api/manage";
8 8
 
9 9
 export default {
10 10
   name: "DvhCardTimePicker",
11
-  props: ["wellId", "time"],
11
+  props: ["wellId", "time", "defaultDate"],
12 12
   emits: ['update:time', 'change'],
13 13
   data() {
14 14
     return {
@@ -32,7 +32,6 @@ export default {
32 32
         }, {
33 33
           text: '昨天',
34 34
           onClick(picker) {
35
-            console.log(picker)
36 35
             picker.$emit('pick', Util.nowDateMinusDays(1));
37 36
           }
38 37
         }, {
@@ -892,6 +891,11 @@ export default {
892 891
   },
893 892
   mounted() {
894 893
     // console.log(this.timePicker);
894
+    if (this.defaultDate) {
895
+      let t = new Date(this.defaultDate + " 00:00:00")
896
+      this.timePicker.min = Util.dateMinus(t, 7, 'd').getTime()
897
+      this.timePicker.current = t.getTime()
898
+    }
895 899
     this.queryCard()
896 900
   },
897 901
   watch: {
@@ -914,6 +918,21 @@ export default {
914 918
     },
915 919
     wellId: {
916 920
       handler(val) {
921
+        if (this.defaultDate) {
922
+          let t = new Date(this.defaultDate + " 00:00:00")
923
+          this.timePicker.min = Util.dateMinus(t, 7, 'd').getTime()
924
+          this.timePicker.current = t.getTime()
925
+        }
926
+        this.queryCard()
927
+      }
928
+    },
929
+    defaultDate:{
930
+      handler(val){
931
+        if (this.defaultDate) {
932
+          let t = new Date(this.defaultDate + " 00:00:00")
933
+          this.timePicker.min = Util.dateMinus(t, 7, 'd').getTime()
934
+          this.timePicker.current = t.getTime()
935
+        }
917 936
         this.queryCard()
918 937
       }
919 938
     }
@@ -994,7 +1013,6 @@ export default {
994 1013
         wellId: this.wellId,
995 1014
         limitSize: this.timePicker.pageMaxSize
996 1015
       }
997
-      console.log(param);
998 1016
       let _this = this
999 1017
       getAction(publicUrl.cardTimePicker, param).then(res => {
1000 1018
         if (res.data.status !== 1) {
@@ -1260,7 +1278,7 @@ export default {
1260 1278
 
1261 1279
 
1262 1280
     </div>
1263
-    <el-input v-model="timePicker.selected" slot="reference"
1281
+    <el-input v-model="timePicker.selected" slot="reference" placeholder="选择一个功图"
1264 1282
               :readonly="true"
1265 1283
     ></el-input>
1266 1284
   </el-popover>

+ 41 - 6
src/components/NewWorkPage/DvhCompareDialog.vue

@@ -10,7 +10,13 @@ import WellSelector from "@/components/NewWorkPage/WellSelector.vue";
10 10
 export default {
11 11
   name: "DvhCompareDialog",
12 12
   components: {WellSelector, DvhCardTimePicker},
13
-  props: ["visible", "dvhCardId", "wellId"],
13
+  props: [
14
+    //是否显示
15
+    "visible",
16
+    "dvhCardId",
17
+    "wellId",
18
+    //默认开始日期
19
+    "time"],
14 20
   emits: ["update:visible"],
15 21
   data() {
16 22
     return {
@@ -21,6 +27,7 @@ export default {
21 27
         cardId: '',
22 28
         wellId: '',
23 29
         cardTime: '',
30
+        defaultSearchTime: '',
24 31
         leftChartOption: {
25 32
           title: {
26 33
             text: '',
@@ -246,15 +253,18 @@ export default {
246 253
     }
247 254
   },
248 255
   mounted() {
249
-    this.dvhCardCheck.visible = this.visible
250
-    this.dvhCardCheck.cardId = this.dvhCardId
251
-    this.dvhCardCheck.wellId = this.wellId
252
-    this.initView()
256
+    // this.initView()
253 257
   },
254 258
   watch: {
255 259
     visible: {
256 260
       handler(val) {
257 261
         this.dvhCardCheck.visible = val
262
+        if (val) this.initView()
263
+      }
264
+    },
265
+    wellId: {
266
+      handler(val) {
267
+        this.initView()
258 268
       }
259 269
     }
260 270
   },
@@ -263,11 +273,31 @@ export default {
263 273
       this.$emit("update:visible", false);
264 274
     },
265 275
     initView() {
276
+
277
+      this.dvhCardCheck.visible = this.visible
278
+      this.dvhCardCheck.cardId = ''
279
+      this.dvhCardCheck.wellId = ''
280
+      this.dvhCardCheck.defaultSearchTime = ''
281
+
282
+      this.dvhCardCheck.visible = this.visible
283
+      this.dvhCardCheck.cardId = this.dvhCardId
284
+      this.dvhCardCheck.wellId = this.wellId
285
+      this.dvhCardCheck.defaultSearchTime = this.time
266 286
       this.setLeftCard()
267 287
     },
268 288
     //根据数据id查询对应功图显示
269 289
     setLeftCard() {
270 290
       let params = {}
291
+      this.setLeftCardData({
292
+        sgt: [],
293
+        wellId: '',
294
+        prodDate: '',
295
+        minL: 65,
296
+        maxL: 95,
297
+        s: 8,
298
+        n: 7,
299
+        zhc: 26
300
+      })
271 301
       if (this.dvhCardCheck.cardId) params = {
272 302
         wellId: this.dvhCardCheck.cardId.split(' ')[0],
273 303
         prodDate: this.dvhCardCheck.cardId.split(' ')[1] + ' ' + this.dvhCardCheck.cardId.split(' ')[2]
@@ -285,6 +315,7 @@ export default {
285 315
       })
286 316
     },
287 317
     setLeftCardData(baseData) {
318
+      this.dvhCardCheck.leftChartOption.title.text = baseData.wellId + '\n' + baseData.prodDate.replace('T', ' ')
288 319
       this.dvhCardCheck.leftChartOption.series[0].data = baseData.sgt
289 320
       this.dvhCardCheck.leftChartOption.series[1].data = [[0, baseData.minL], [baseData.s, baseData.minL]]
290 321
       this.dvhCardCheck.leftChartOption.series[2].data = [[0, baseData.maxL], [baseData.s, baseData.maxL]]
@@ -383,13 +414,17 @@ export default {
383 414
 </script>
384 415
 
385 416
 <template>
386
-  <el-dialog title="功图校核" :visible.sync="dvhCardCheck.visible" v-on:close="closeDialog" width="1200px">
417
+  <el-dialog title="功图校核"
418
+             :modal="false"
419
+
420
+             :visible.sync="dvhCardCheck.visible" v-on:close="closeDialog" width="1200px">
387 421
     <div class="flex-row min200">
388 422
       <div class="col-in-row flex-col dvh-original">
389 423
         <div class="f-height-30">
390 424
           <well-selector :selected.sync="dvhCardCheck.wellId"></well-selector>
391 425
           <dvh-card-time-picker :well-id="dvhCardCheck.wellId"
392 426
                                 :time.sync="dvhCardCheck.cardTime"
427
+                                :default-date="dvhCardCheck.defaultSearchTime"
393 428
                                 v-on:change="setLeftCard"></dvh-card-time-picker>
394 429
         </div>
395 430
         <div class="row-in-col">

+ 3 - 3
src/components/NewWorkPage/WellSelector.vue

@@ -18,7 +18,6 @@ export default {
18 18
   },
19 19
   methods: {
20 20
     changeSelected(node) {
21
-      console.log(node);
22 21
       this.$emit("update:selected", node[node.length - 1]);
23 22
     },
24 23
     transSelectorOptions(d, node) {
@@ -74,7 +73,8 @@ export default {
74 73
   },
75 74
   async mounted() {
76 75
     await this.getWellsTree()
77
-    this.manualSelectWell('WELLTL100000864')
76
+    if (this.selected)
77
+      this.manualSelectWell(this.selected)
78 78
   },
79 79
   watch: {
80 80
     selected: {
@@ -82,7 +82,7 @@ export default {
82 82
         let cur = ''
83 83
         if (this.wellSelector.selected.length > 0) cur = this.wellSelector.selected[this.wellSelector.selected.length - 1]
84 84
         if (newVal !== cur)
85
-          this.wellSelector.selected = this.searchCheckNode(newVal, this.wellSelector.options, [])
85
+          this.manualSelectWell(newVal)
86 86
       }
87 87
     }
88 88
   }

File diff suppressed because it is too large
+ 291 - 243
src/components/workSolution/workSolution.vue