Commit d7e75ada by cat

zd

parent 49c08d8b
......@@ -659,3 +659,14 @@ export function addKcax(query) {
params: query,
});
}
//多井钻头曲线图
export function getDjztqxt(query) {
return request({
url: "/system/jsaa/djztqxt",
method: "get",
params: query,
});
}
\ No newline at end of file
import request from '@/utils/request'
// 查询多井钻头能效分析方案信息列表
export function listDjzt(query) {
return request({
url: '/system/djztnxfx/list',
method: 'get',
params: query
})
}
// 查询多井钻头能效分析方案信息详细
export function getDjzt(id) {
return request({
url: '/system/djztnxfx/' + id,
method: 'get'
})
}
// 新增多井钻头能效分析方案信息
export function addDjzt(data) {
return request({
url: '/system/djztnxfx',
method: 'post',
data: data
})
}
// 修改多井钻头能效分析方案信息
export function updateDjzt(data) {
return request({
url: '/system/djztnxfx',
method: 'put',
data: data
})
}
// 删除多井钻头能效分析方案信息
export function delDjzt(id) {
return request({
url: '/system/djztnxfx/' + id,
method: 'delete'
})
}
// 查询钻头尺寸下拉框
export function selectZtccList(query) {
return request({
url: "/system/jshaPdc/selectZtccList",
method: "get",
params: query,
});
}
......@@ -52,3 +52,11 @@ export function listTzsj(query) {
params: query,
});
}
// 查询多井钻头数据列表
export function listDjJsha(query) {
return request({
url: "/system/jshaPdc/getListByZtcc",
method: "get",
params: query,
});
}
\ No newline at end of file
......@@ -8,7 +8,7 @@
</el-tab-pane>
<el-tab-pane label="曲线图形" name="curveGraph">
<CurveGraph ref="curveGraphRef" :jh="queryParams.jh" :famc="queryParams.famc" :qk="queryParams.qk"
<CurveGraph ref="curveGraphRef" :jh="queryParams.jh" :zbid="queryParams.zbid" :famc="queryParams.famc" :qk="queryParams.qk"
:jhs="queryParams.jhs" />
</el-tab-pane>
......@@ -47,7 +47,8 @@ export default {
jh: '',
famc: '',
qk: '',
jhs: ''
jhs: '',
zbid:''
},
// 标记是否是第一次进入页面
isFirstLoad: true
......@@ -56,8 +57,8 @@ export default {
created() {
// 获取路由参数
console.log('详情页面created,完整路由对象:', this.$route);
const { jh, famc, qk, jhs } = this.$route.params;
console.log('路由参数:', { jh, famc, qk, jhs });
const { jh, famc, qk, jhs,zbid} = this.$route.params;
console.log('路由参数:', { jh, famc, qk, jhs ,zbid});
// 检查参数是否为空或undefined
if (jh && jh !== 'undefined' && jh !== 'null') {
......@@ -65,9 +66,10 @@ export default {
this.queryParams.famc = famc || '';
this.queryParams.qk = qk || '';
this.queryParams.jhs = jhs || '';
this.queryParams.zbid = zbid || '';
console.log('设置 queryParams:', this.queryParams);
} else {
console.warn('未获取到有效的路由参数 jh,当前参数:', { jh, famc, qk, jhs });
console.warn('未获取到有效的路由参数 jh,当前参数:', { jh, famc, qk, jhs,zbid });
}
// 确保第一次进入页面时不会自动初始化组件
console.log('页面初始化完成,等待用户点击tab');
......
......@@ -6,7 +6,7 @@
<script>
import * as echarts from 'echarts';
import { getdjqxt } from '@/api/optimization/initialization';
import { getDjztqxt } from '@/api/optimization/initialization';
export default {
props: {
......@@ -17,6 +17,18 @@ export default {
jhs: {
type: String,
required: true,
},
zbid: {
type: String,
required: true,
},
qk: {
type: String,
required: true,
},
ztcc: {
type: String,
required: true,
}
},
data() {
......@@ -41,9 +53,9 @@ export default {
},
getList() {
const params = { jhs: this.jhs };
const params = { zbid: this.zbid,ztccs:this.ztcc ,qk:this.qk};
this.loading = true;
getdjqxt(params)
getDjztqxt(params)
.then(res => {
console.log('接口返回数据:', res);
this.chartData = res;
......
......@@ -3,19 +3,15 @@
<div class="app-container">
<el-tabs v-model="activeTab" type="card" @tab-click="handleTabClick" style="margin-top: -10px;">
<el-tab-pane label="数据表格" name="dataTable">
<DataTable ref="dataTableRef" :jh="queryParams.jh" :famc="queryParams.famc" :qk="queryParams.qk"
<DataTable ref="dataTableRef" :jh="queryParams.jh" :famc="queryParams.famc" :qk="queryParams.qk" :ztcc="queryParams.ztcc"
:jhs="queryParams.jhs" />
</el-tab-pane>
<el-tab-pane label="曲线图形" name="curveGraph">
<CurveGraph ref="curveGraphRef" :jh="queryParams.jh" :famc="queryParams.famc" :qk="queryParams.qk"
:jhs="queryParams.jhs" />
<CurveGraph ref="curveGraphRef" :jh="queryParams.jh" :famc="queryParams.famc" :qk="queryParams.qk"
:jhs="queryParams.jhs" :zbid="queryParams.zbid" :ztcc="queryParams.ztcc" />
</el-tab-pane>
<el-tab-pane label="直方图形" name="histogramGraph">
<HistogramGraph ref="histogramGraphRef" :jh="queryParams.jh" :famc="queryParams.famc"
:qk="queryParams.qk" :jhs="queryParams.jhs" />
</el-tab-pane>
</el-tabs>
</div>
</template>
......@@ -23,14 +19,12 @@
<script>
import DataTable from './components/DataTable.vue';
import CurveGraph from './components/CurveGraph.vue';
import HistogramGraph from './components/HistogramGraph.vue';
export default {
name: "DjxxDetail",
components: {
DataTable,
CurveGraph,
HistogramGraph
},
data() {
return {
......@@ -47,7 +41,9 @@ export default {
jh: '',
famc: '',
qk: '',
jhs: ''
jhs: '',
ztcc:'',
zbid:''
},
// 标记是否是第一次进入页面
isFirstLoad: true
......@@ -56,22 +52,35 @@ export default {
created() {
// 获取路由参数
console.log('详情页面created,完整路由对象:', this.$route);
const { jh, famc, qk, jhs } = this.$route.params;
console.log('路由参数:', { jh, famc, qk, jhs });
const { jh, famc, qk, jhs ,ztcc,zbid} = this.$route.params;
console.log('路由参数:', { jh, famc, qk, jhs,ztcc ,zbid});
// 检查参数是否为空或undefined
if (jh && jh !== 'undefined' && jh !== 'null') {
// if (jh && jh !== 'undefined' && jh !== 'null') {
this.queryParams.jh = jh;
this.queryParams.famc = famc || '';
this.queryParams.qk = qk || '';
this.queryParams.jhs = jhs || '';
this.queryParams.ztcc= ztcc||''
this.queryParams.zbid= zbid||''
console.log('设置 queryParams:', this.queryParams);
} else {
console.warn('未获取到有效的路由参数 jh,当前参数:', { jh, famc, qk, jhs });
}
// } else {
// console.warn('未获取到有效的路由参数 jh,当前参数:', { jh, famc, qk, jhs,ztcc });
// }
// 确保第一次进入页面时不会自动初始化组件
console.log('页面初始化完成,等待用户点击tab');
},
mounted() {
// 页面挂载后,延迟加载第一个tab的数据,避免立即显示加载动画
this.$nextTick(() => {
// 延迟一小段时间再加载数据,让页面先渲染完成
setTimeout(() => {
if (this.activeTab === 'dataTable') {
this.$refs.dataTableRef && this.$refs.dataTableRef.loadData && this.$refs.dataTableRef.loadData();
}
}, 100);
});
},
methods: {
/** 搜索按钮操作 */
handleQuery() {
......@@ -104,6 +113,8 @@ export default {
console.log('切换到tab:', tab.name);
// 标记已经不是第一次加载
this.isFirstLoad = false;
// 只有在用户主动点击tab时才加载数据,避免初始化时的自动加载
if (tab.name === 'dataTable') {
this.$refs.dataTableRef && this.$refs.dataTableRef.loadData && this.$refs.dataTableRef.loadData();
} else if (tab.name === 'curveGraph') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment