|
@@ -129,9 +129,10 @@ export default {
|
129
|
129
|
this.$emit('update:visible', false)
|
130
|
130
|
},
|
131
|
131
|
initView() {
|
|
132
|
+ if (this.dialog.wellId === this.selected.wellId && this.dialog.moduleId === this.selected.moduleId) return
|
132
|
133
|
this.dialog.wellId = this.selected.wellId
|
133
|
134
|
this.dialog.moduleId = this.selected.moduleId
|
134
|
|
- this.dialog.selectedTime = Util.dateFormat(new Date(), 'yyyy-MM-dd')
|
|
135
|
+ if (!this.dialog.selectedTime) this.dialog.selectedTime = Util.dateFormat(new Date(), 'yyyy-MM-dd')
|
135
|
136
|
if (this.dialog.visible)
|
136
|
137
|
this.queryData()
|
137
|
138
|
},
|
|
@@ -163,9 +164,8 @@ export default {
|
163
|
164
|
moduleKey: this.dialog.moduleId,
|
164
|
165
|
filterColumn: this.dialog.filterColumn,
|
165
|
166
|
}).then(res => {
|
166
|
|
- console.log(res.data.data);
|
167
|
|
- if (res.data.data === undefined || res.data.data.length === 0) {
|
168
|
|
- _this.$message.info('没有查到数据')
|
|
167
|
+ if (!res.data.data || res.data.data.length === 0) {
|
|
168
|
+ _this.$message.info('没有查到历史曲线数据')
|
169
|
169
|
return
|
170
|
170
|
}
|
171
|
171
|
|
|
@@ -192,7 +192,7 @@ export default {
|
192
|
192
|
}
|
193
|
193
|
},
|
194
|
194
|
mounted() {
|
195
|
|
- this.initView()
|
|
195
|
+ // this.initView()
|
196
|
196
|
|
197
|
197
|
// axios.get('/static/table.json').then(res => {
|
198
|
198
|
// console.log(res.data);
|
|
@@ -209,19 +209,20 @@ export default {
|
209
|
209
|
'dialog.filterColumn': {
|
210
|
210
|
handler() {
|
211
|
211
|
if (this.dialog.visible)
|
212
|
|
- this.initView()
|
|
212
|
+ this.setChart()
|
213
|
213
|
}
|
214
|
214
|
},
|
215
|
|
- selected: {
|
216
|
|
- handler(val) {
|
217
|
|
- if (val) {
|
218
|
|
- if (val.wellId !== undefined && val.moduleId !== undefined) {
|
219
|
|
- this.initView()
|
220
|
|
- }
|
221
|
|
- }
|
222
|
|
- },
|
223
|
|
- deep: true
|
224
|
|
- }
|
|
215
|
+ // selected: {
|
|
216
|
+ // handler(val) {
|
|
217
|
+ // if (val) {
|
|
218
|
+ // if (val.wellId !== undefined && val.moduleId !== undefined) {
|
|
219
|
+ // this.dialog.wellId = this.selected.wellId
|
|
220
|
+ // this.dialog.moduleId = this.selected.moduleId
|
|
221
|
+ // }
|
|
222
|
+ // }
|
|
223
|
+ // },
|
|
224
|
+ // deep: true
|
|
225
|
+ // }
|
225
|
226
|
}
|
226
|
227
|
}
|
227
|
228
|
</script>
|