Commit 08340864 by jiang'yun

修改

parent e42ebf4c
......@@ -4,7 +4,7 @@
"description": "系统",
"author": "若依",
"license": "MIT",
"sideEffects": false,
"sideEffects": true,
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
......
......@@ -113,108 +113,108 @@ export const constantRoutes = [
},
],
},
{
path: "/",
component: Layout,
hidden: true,
redirect: "noredirect",
children: [
{
path: "taleData",
component: () =>
import("@/views/scientificDrill/designScheme/tableData/index"),
name: "schemeOptimization",
meta: { title: "钻工设计", icon: "" },
},
],
},
{
path: "/",
component: Layout,
hidden: true,
redirect: "noredirect",
children: [
{
path: "tableDatatg",
component: () =>
import("@/views/scientificDrill/designScheme/tableDatatg/index"),
name: "schemeOptimization",
meta: { title: "钻具组合-套管", icon: "" },
},
],
},
{
path: "/",
component: Layout,
hidden: true,
redirect: "noredirect",
children: [
{
path: "designScheme",
component: () => import("@/views/scientificDrill/designScheme/index"),
name: "schemeOptimization",
meta: { title: "设计方案", icon: "" },
},
],
},
{
path: "/",
component: Layout,
hidden: true,
redirect: "noredirect",
children: [
{
path: "initialization",
component: () =>
import("@/views/optimization/components/initialization/index"),
name: "dataInitialization",
meta: { title: "钻井优化", icon: "" },
},
],
},
{
path: "/",
component: Layout,
hidden: true,
redirect: "noredirect",
children: [
{
path: "singleWellcon",
component: () => import("@/views/optimization/singleWellcon"),
name: "dataInitialization",
meta: { title: "现场作业", icon: "" },
},
],
},
{
path: "/",
component: Layout,
hidden: true,
redirect: "noredirect",
children: [
{
path: "workingConditions/tableData",
component: () =>
import("@/views/optimization/workingConditions/tableData"),
name: "dataInitialization",
meta: { title: "计算图版", icon: "" },
},
],
},
{
path: "/",
component: Layout,
hidden: true,
redirect: "noredirect",
children: [
{
path: "constantManagement/jtzj/jtzjZtou",
component: () => import("@/views/jtzj/jtzjZtou/index"),
name: "JtzjZtou",
meta: { title: "常量管理", icon: "" },
},
],
},
// {
// path: "/",
// component: Layout,
// hidden: true,
// redirect: "noredirect",
// children: [
// {
// path: "taleData",
// component: () =>
// import("@/views/scientificDrill/designScheme/tableData/index"),
// name: "schemeOptimization",
// meta: { title: "钻工设计", icon: "" },
// },
// ],
// },
// {
// path: "/",
// component: Layout,
// hidden: true,
// redirect: "noredirect",
// children: [
// {
// path: "tableDatatg",
// component: () =>
// import("@/views/scientificDrill/designScheme/tableDatatg/index"),
// name: "schemeOptimization",
// meta: { title: "钻具组合-套管", icon: "" },
// },
// ],
// },
// {
// path: "/",
// component: Layout,
// hidden: true,
// redirect: "noredirect",
// children: [
// {
// path: "designScheme",
// component: () => import("@/views/scientificDrill/designScheme/index"),
// name: "schemeOptimization",
// meta: { title: "设计方案", icon: "" },
// },
// ],
// },
// {
// path: "/",
// component: Layout,
// hidden: true,
// redirect: "noredirect",
// children: [
// {
// path: "initialization",
// component: () =>
// import("@/views/optimization/components/initialization/index"),
// name: "dataInitialization",
// meta: { title: "钻井优化", icon: "" },
// },
// ],
// },
// {
// path: "/",
// component: Layout,
// hidden: true,
// redirect: "noredirect",
// children: [
// {
// path: "singleWellcon",
// component: () => import("@/views/optimization/singleWellcon"),
// name: "dataInitialization",
// meta: { title: "现场作业", icon: "" },
// },
// ],
// },
// {
// path: "/",
// component: Layout,
// hidden: true,
// redirect: "noredirect",
// children: [
// {
// path: "workingConditions/tableData",
// component: () =>
// import("@/views/optimization/workingConditions/tableData"),
// name: "dataInitialization",
// meta: { title: "计算图版", icon: "" },
// },
// ],
// },
// {
// path: "/",
// component: Layout,
// hidden: true,
// redirect: "noredirect",
// children: [
// {
// path: "constantManagement/jtzj/jtzjZtou",
// component: () => import("@/views/jtzj/jtzjZtou/index"),
// name: "JtzjZtou",
// meta: { title: "常量管理", icon: "" },
// },
// ],
// },
{
path: "/",
component: Layout,
......@@ -421,20 +421,20 @@ export const dynamicRoutes = [
},
],
},
{
path: "/jtzb/jtzbGt",
component: Layout,
hidden: true,
permissions: ["jtzb:jtzbNjb:list"],
children: [
{
path: "index/:njbid(\\d+)",
component: () => import("@/views/jtzb/jtzbGt/index"),
name: "jtzbGt",
meta: { title: "缸套维护", activeMenu: "/views/jtzb" },
},
],
},
// {
// path: "/jtzb/jtzbGt",
// component: Layout,
// hidden: true,
// permissions: ["jtzb:jtzbNjb:list"],
// children: [
// {
// path: "index/:njbid(\\d+)",
// component: () => import("@/views/jtzb/jtzbGt/index"),
// name: "jtzbGt",
// meta: { title: "缸套维护", activeMenu: "/views/jtzb" },
// },
// ],
// },
{
path: "/monitor/job-log",
component: Layout,
......
<template>
<div class="app-container">
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px"> -->
<!-- <el-form-item label="主键" prop="id">
<el-input v-model="queryParams.id" placeholder="请输入主键" clearable @keyup.enter.native="handleQuery" />
</el-form-item> -->
<!-- <el-form-item label="泥浆泵ID" prop="njbid">
<el-input v-model="queryParams.njbid" placeholder="请输入泥浆泵ID" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="缸套尺寸mm" prop="gtcc">
<el-input v-model="queryParams.gtcc" placeholder="请输入缸套尺寸mm" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="最大排量L/s" prop="zdpl">
<el-input v-model="queryParams.zdpl" placeholder="请输入最大排量L/s" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="最大泵压 Mpa" prop="zdby">
<el-input v-model="queryParams.zdby" placeholder="请输入最大泵压 Mpa" clearable @keyup.enter.native="handleQuery" />
</el-form-item> -->
<!-- <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> -->
<!-- </el-form> -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['jtzb:jtzbGt:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['jtzb:jtzbGt:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['jtzb:jtzbGt:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['jtzb:jtzbGt:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jtzbGtList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="id" /> -->
<!-- <el-table-column label="泥浆泵ID" align="center" prop="njbid" /> -->
<el-table-column label="缸套尺寸mm" align="center" prop="gtcc" />
<el-table-column label="最大排量L/s" align="center" prop="zdpl" />
<el-table-column label="最大泵压 Mpa" align="center" prop="zdby" />
<el-table-column label="备注信息" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['jtzb:jtzbGt:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['jtzb:jtzbGt:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改装备泥浆泵缸套对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item prop="njbid">
<el-input v-model="form.njbid" placeholder="请输入泥浆泵" v-show="showInput" />
</el-form-item>
<el-form-item label="缸套尺寸mm" prop="gtcc">
<el-input v-model="form.gtcc" placeholder="请输入缸套尺寸" />
</el-form-item>
<el-form-item label="最大排量L/s" prop="zdpl">
<el-input v-model="form.zdpl" placeholder="请输入最大排量" />
</el-form-item>
<el-form-item label="最大泵压 Mpa" prop="zdby">
<el-input v-model="form.zdby" placeholder="请输入最大泵压" />
</el-form-item>
<el-form-item label="备注信息" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注信息" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listJtzbGt, getJtzbGt, delJtzbGt, addJtzbGt, updateJtzbGt } from "@/api/jtzb/jtzbGt";
export default {
name: "JtzbGt",
data() {
return {
showInput: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 装备泥浆泵缸套表格数据
jtzbGtList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
njbid: null,
gtcc: null,
zdpl: null,
zdby: null,
njbid: this.$route.query.njbid,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询装备泥浆泵缸套列表 */
getList() {
this.loading = true;
listJtzbGt(this.queryParams).then(response => {
this.jtzbGtList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
njbid: null,
gtcc: null,
zdpl: null,
zdby: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加装备泥浆泵缸套";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getJtzbGt(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改装备泥浆泵缸套";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateJtzbGt(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.njbid = this.$route.query.njbid;
addJtzbGt(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除装备泥浆泵缸套编号为"' + ids + '"的数据项?').then(function () {
return delJtzbGt(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('jtzb/jtzbGt/export', {
...this.queryParams
}, `jtzbGt_${new Date().getTime()}.xlsx`)
}
}
};
</script>
<template>
<div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="钻头选型优化器" name="first">
<!-- <img :src="indexImg1" style="width: 100%; height: 600px" />-->
</el-tab-pane>
<el-tab-pane label="泥浆性能分析图" name="second">
<!-- <img :src="indexImg2" style="width: 100%; height: 600px" />-->
</el-tab-pane>
<el-tab-pane label="多井提速六边雷达图" name="third">
<!-- <img :src="indexImg3" style="width: 100%; height: 600px" />-->
</el-tab-pane>
<el-tab-pane label="钻井参数优化" name="fourth">
<!-- <img :src="indexImg4" style="width: 100%; height:600px" />-->
</el-tab-pane>
<el-tab-pane label="多井钻井参数曲线图" name="fifth">
<!-- <img :src="indexImg5" style="width: 100%; height:600px" />-->
</el-tab-pane>
<el-tab-pane label="多井钻具组合优化" name="sixth">
<!-- <img :src="indexImg6" style="width: 100%; height:600px" />-->
</el-tab-pane>
<el-tab-pane label="多井选择过滤器" name="seventh">
<!-- <img :src="indexImg7" style="width: 100%; height:600px" />-->
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
data() {
return {
activeName: 'first',
// indexImg1: require('@/assets/images/1.png'),
// indexImg2: require('@/assets/images/2.png'),
// indexImg3: require('@/assets/images/3.png'),
// indexImg4: require('@/assets/images/4.png'),
// indexImg5: require('@/assets/images/5.png'),
// indexImg6: require('@/assets/images/6.png'),
// indexImg7: require('@/assets/images/7.png'),
}
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
}
}
}
</script>
<style lang="scss" scoped></style>
<!-- 按作业活动统计 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'assignmentActivity',
}
</script>
<style lang="scss" scoped></style>
<!-- 按钻机状态统计 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'drillingMachineStatus',
}
</script>
<style lang="scss" scoped></style>
<template>
<div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="开泵时" name="first">
<el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true">
<el-form-item>
<el-button type="primary" size="mini">配置</el-button>
</el-form-item>
<el-form-item>
<el-form-item label="开次">
<el-select v-model="queryParams.value" placeholder="请选择">
<el-option v-for="item in option1" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="queryParams.value" placeholder="请选择">
<el-option v-for="item in option2" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="时隔间隔">
<el-select v-model="queryParams.value" placeholder="请选择">
<el-option v-for="item in option3" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-col :span="24">
<!-- <img :src="indexCalendarImg1" style="width: 100%; height: 600px" />-->
</el-col>
</el-form>
</el-tab-pane>
<el-tab-pane label="坐卡时" name="second">
<el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true">
<el-form-item>
<el-button type="primary" size="mini">配置</el-button>
</el-form-item>
<el-form-item>
<el-form-item label="开次">
<el-select v-model="queryParams.value" placeholder="请选择">
<el-option v-for="item in option1" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="queryParams.value" placeholder="请选择">
<el-option v-for="item in option2" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="时隔间隔">
<el-select v-model="queryParams.value" placeholder="请选择">
<el-option v-for="item in option3" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-col :span="24">
<el-row>
<el-col :span="12">
<el-form-item>
<span>总池体积 波动特征曲线</span>
</el-form-item>
<!-- <img :src="indexCalendarImg2" style="width: 100%; object-fit: cover;" />-->
</el-col>
<el-col :span="12">
<el-form-item>
<span>灌浆罐 波动特征曲线</span>
</el-form-item>
<!-- <img :src="indexCalendarImg3" style="width: 100%;object-fit: cover;" />-->
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item>
<span>总池+灌浆罐 波动特征曲线</span>
</el-form-item>
<!-- <img :src="indexCalendarImg4" style="width: 100%; object-fit: cover;" />-->
</el-col>
</el-row>
</el-col>
</el-form>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
data() {
return {
option1: '', // 初始化 option1
option2: '', // 初始化 option2
activeName: 'first',
showSearch: true,
queryParams: {},
// indexCalendarImg1: require('@/assets/images/riskMonitoring1.jpg'),
// indexCalendarImg2: require('@/assets/images/riskMonitoring3.jpg'),
// indexCalendarImg3: require('@/assets/images/riskMonitoring4.jpg'),
// indexCalendarImg4: require('@/assets/images/riskMonitoring5.jpg'),
option3: [{
value: '选项1',
label: '30'
}, {
value: '选项2',
label: '60'
}, {
value: '选项3',
label: '90'
}, {
value: '选项4',
label: '120'
}],
}
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
}
}
}
</script>
<style lang="scss" scoped>
.app-container {
display: flex;
flex-direction: column;
}
.top-section {
margin-bottom: 20px;
}
</style>
/**
* 饼图组件
* 用于展示时间敏感性分析数据的饼图
* 支持自适应大小、数据更新、空数据处理等功能
*/
<template>
<div class="pie-chart" ref="chartContainer" :style="{ height: height + 'px', width: '100%', minWidth: '200px' }"></div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'PieChart',
// 组件属性定义
props: {
// 饼图数据,格式为 [{name: '名称', value: '数值'}]
data: {
type: Array,
required: true
},
// 是否为迷你模式,影响饼图大小和位置
mini: {
type: Boolean,
default: false
},
// 图表高度
height: {
type: Number,
default: 300
},
// 空数据时的背景色
emptyColor: {
type: String,
default: '#f5f5f5'
}
},
// 组件数据
data() {
return {
// ECharts实例
chart: null,
// 用于监听容器大小变化的观察器
resizeObserver: null
}
},
// 数据监听
watch: {
// 监听数据变化,更新图表
data: {
handler: 'updateChart',
deep: true
},
// 监听高度变化,调整图表大小
height: {
handler: 'handleResize'
}
},
// 计算属性
computed: {
// 图表配置项
chartOptions() {
// 定义饼图颜色方案
const colorPalette = [
'rgb(117, 251, 76)', 'rgb(55, 126, 34)', 'rgb(204, 204, 204)', 'rgb(42, 100, 246)', 'rgb(117, 251, 253)',
'rgb(253, 242, 208)', 'rgb(255, 255, 127)', 'rgb(150, 150, 150)', 'rgb(102, 102, 246)', 'rgb(51, 51, 196)',
'rgb(106, 119, 114)', 'rgb(0, 0, 196)', 'rgb(234, 51, 35)', 'rgb(188, 64, 30)', 'rgb(140, 26, 17)',
'rgb(202, 223, 184)', 'rgb(241, 158, 56)', 'rgb(221, 158, 62)', 'rgb(214, 254, 94)', 'rgb(113, 152, 248)',
]
return {
// 提示框配置
tooltip: {
trigger: 'item',
formatter: '{b}: {c}%'
},
// 饼图系列配置
series: [
{
type: 'pie',
// 根据是否为迷你模式设置不同的大小和位置
radius: this.mini ? '45%' : '55%',
center: this.mini ? ['30%', '50%'] : ['45%', '50%'],
// 防止标签重叠
avoidLabelOverlap: true,
// 饼图样式
itemStyle: {
borderRadius: 0,
borderColor: '#fff',
borderWidth: 2
},
// 标签配置
label: {
show: true,
formatter: '{b}: {c}%',
fontSize: 12,
color: '#666',
fontWeight: 'normal',
backgroundColor: 'rgba(255, 255, 255, 0.7)',
borderRadius: 2,
padding: [3, 4],
position: 'outside'
},
// 标签线配置
labelLine: {
show: true,
length: 12,
length2: 3,
smooth: false,
lineStyle: {
color: '#aaa',
width: 1
}
},
// 使用自定义颜色方案
color: colorPalette,
// 处理后的数据
data: this.processData(this.data)
}
]
}
}
},
// 组件方法
methods: {
/**
* 初始化图表
* 创建ECharts实例并设置监听器
*/
initChart() {
if (this.$refs.chartContainer) {
console.log('初始化饼图,容器尺寸:',
this.$refs.chartContainer.clientWidth,
this.$refs.chartContainer.clientHeight
)
try {
// 清理之前的实例如果存在
if (this.chart) {
this.chart.dispose()
}
this.chart = echarts.init(this.$refs.chartContainer)
this.updateChart()
// 监听图表事件
this.chart.on('rendered', () => {
console.log('饼图渲染完成')
})
// 监听容器尺寸变化
if (!this.resizeObserver) {
this.resizeObserver = new ResizeObserver(() => {
console.log('饼图容器尺寸变化')
this.handleResize()
})
this.resizeObserver.observe(this.$refs.chartContainer)
}
} catch (error) {
console.error('饼图初始化失败:', error)
}
} else {
console.warn('饼图容器不存在')
}
},
/**
* 更新图表数据
*/
updateChart() {
if (!this.chart) return
console.log('饼图数据处理前:', JSON.stringify(this.data))
const processedData = this.processData(this.data)
console.log('饼图数据处理后:', JSON.stringify(processedData))
const option = this.chartOptions
console.log('饼图配置:', JSON.stringify(option))
this.chart.setOption(option)
},
/**
* 处理容器大小变化
*/
handleResize() {
this.chart && this.chart.resize()
},
/**
* 处理数据
* @param {Array} data 原始数据
* @returns {Array} 处理后的数据
*/
processData(data) {
// 处理空数据情况
if (!data || data.length === 0) {
return [{ name: '暂无数据', value: 100, itemStyle: { color: this.emptyColor } }]
}
// 检查数据是否全部无效
const hasValidData = data.some(item => {
return item && item.name && (item.value !== undefined && item.value !== null && item.value !== '');
});
if (!hasValidData) {
return [{ name: '暂无有效数据', value: 100, itemStyle: { color: this.emptyColor } }]
}
// 处理正常数据,确保value为数字类型
return data.map(item => {
// 如果name或value不存在,提供默认值
const name = item.name || '未命名';
let value = item.value;
// 将字符串转换为数字
if (typeof value === 'string') {
value = parseFloat(value);
// 检查转换后是否为NaN
if (isNaN(value)) {
value = 0;
}
} else if (value === undefined || value === null) {
value = 0;
}
return {
name: name,
value: value
}
}).filter(item => item.value > 0) // 过滤掉值为0的项
}
},
// 组件挂载后
mounted() {
// 检查容器是否已渲染,确保图表正确初始化
const checkContainer = () => {
const width = this.$refs.chartContainer?.clientWidth
if (width && width > 0) {
this.initChart()
this.handleResize()
} else {
setTimeout(checkContainer, 100)
}
}
checkContainer()
// 监听窗口大小变化
window.addEventListener('resize', this.handleResize)
},
// 组件销毁前
beforeDestroy() {
// 清理资源
if (this.chart) {
this.chart.dispose()
this.chart = null
}
window.removeEventListener('resize', this.handleResize)
if (this.resizeObserver) {
this.resizeObserver.disconnect()
this.resizeObserver = null
}
}
}
</script>
<style scoped>
.pie-chart {
width: 100%;
min-width: 200px;
height: 100%;
min-height: 200px;
padding: 10px;
display: block;
position: relative;
}
</style>
<template>
<div class="pie-chart" ref="chartContainer"></div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'PieChart',
props: {
data: {
type: Array,
required: true
}
},
data() {
return {
chart: null
}
},
watch: {
data: {
handler: 'updateChart',
deep: true
}
},
methods: {
initChart() {
if (this.$refs.chartContainer) {
this.chart = echarts.init(this.$refs.chartContainer)
this.updateChart()
}
},
updateChart() {
if (!this.chart) return
const option = {
tooltip: {
trigger: 'item',
formatter: '{b}: {c}%'
},
series: [
{
type: 'pie',
radius: '70%',
data: this.data,
label: {
show: true,
formatter: '{b}: {c}%'
}
}
]
}
this.chart.setOption(option)
},
handleResize() {
this.chart && this.chart.resize()
}
},
mounted() {
this.initChart()
window.addEventListener('resize', this.handleResize)
},
beforeDestroy() {
if (this.chart) {
this.chart.dispose()
this.chart = null
}
window.removeEventListener('resize', this.handleResize)
}
}
</script>
<style scoped>
.pie-chart {
width: 100%;
height: 300px;
}
</style>
\ No newline at end of file
<template>
<div class="pie-chart" ref="chartContainer" :style="{ height: height + 'px' }"></div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'PieChart',
// 组件属性定义
props: {
// 饼图数据,格式为 [{name: '名称', value: '数值'}]
data: {
type: Array,
required: true
},
// 是否为迷你模式,影响饼图大小和位置
mini: {
type: Boolean,
default: false
},
// 图表高度
height: {
type: Number,
default: 300
},
// 空数据时的背景色
emptyColor: {
type: String,
default: '#f5f5f5'
}
},
// 组件数据
data() {
return {
// ECharts实例
chart: null,
// 用于监听容器大小变化的观察器
resizeObserver: null
}
},
// 数据监听
watch: {
// 监听数据变化,更新图表
data: {
handler: 'updateChart',
deep: true
},
// 监听高度变化,调整图表大小
height: {
handler: 'handleResize'
}
},
// 计算属性
computed: {
// 图表配置项
chartOptions() {
// 定义饼图颜色方案
const colorPalette = [
'rgb(117, 251, 76)', 'rgb(55, 126, 34)', 'rgb(204, 204, 204)', 'rgb(42, 100, 246)', 'rgb(117, 251, 253)',
'rgb(253, 242, 208)', 'rgb(255, 255, 127)', 'rgb(150, 150, 150)', 'rgb(102, 102, 246)', 'rgb(51, 51, 196)', 'rgb(0, 0, 147)',
'rgb(0, 0, 196)', 'rgb(234, 51, 35)', 'rgb(188, 64, 30)', 'rgb(140, 26, 17)', 'rgb(106, 119, 114)',
'rgb(202, 223, 184)', 'rgb(241, 158, 56)', 'rgb(221, 158, 62)', 'rgb(214, 254, 94)', 'rgb(113, 152, 248)', 'rgb(128, 202, 250)',
'rgb(247, 206, 160)', 'rgb(247, 206, 118)', 'rgb(92, 201, 156)', 'rgb(184, 146, 48)', 'rgb(146, 104, 60)', 'rgb(228, 239, 220)',
'rgb(180,232,141)', 'rgb(175,187,4)', 'rgb(116,165,226)', 'rgb(255,255,255)'
]
// const colorPalette = [
// '#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de',
// '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc', '#ff9a7a',
// '#67e0e3', '#f6c022', '#e06343', '#60c0dd', '#d7504b',
// '#c6cbe6', '#26c0c0', '#f69899', '#b5c334', '#8d98b3'
// ]
return {
// 提示框配置
tooltip: {
trigger: 'item',
formatter: '{b}: {c}%'
},
// 饼图系列配置
series: [
{
type: 'pie',
// 根据是否为迷你模式设置不同的大小和位置
radius: this.mini ? '45%' : '55%',
center: this.mini ? ['30%', '50%'] : ['45%', '50%'],
// 防止标签重叠
avoidLabelOverlap: true,
// 饼图样式
itemStyle: {
borderRadius: 0,
borderColor: '#fff',
borderWidth: 2
},
// 标签配置
label: {
show: true,
formatter: '{b}: {c}%',
fontSize: 12,
color: '#666',
fontWeight: 'normal',
backgroundColor: 'rgba(255, 255, 255, 0.7)',
borderRadius: 2,
padding: [3, 4],
position: 'outside'
},
// 标签线配置
labelLine: {
show: true,
length: 12,
length2: 3,
smooth: false,
lineStyle: {
color: '#aaa',
width: 1
}
},
// 使用自定义颜色方案
color: colorPalette,
// 处理后的数据
data: this.processData(this.data)
}
]
}
}
},
// 组件方法
methods: {
/**
* 初始化图表
* 创建ECharts实例并设置监听器
*/
initChart() {
if (this.$refs.chartContainer) {
this.chart = echarts.init(this.$refs.chartContainer)
this.updateChart()
// 监听容器尺寸变化
this.resizeObserver = new ResizeObserver(() => {
this.handleResize()
})
this.resizeObserver.observe(this.$refs.chartContainer)
}
},
/**
* 更新图表数据
*/
updateChart() {
if (!this.chart) return
const option = this.chartOptions
this.chart.setOption(option)
},
/**
* 处理容器大小变化
*/
handleResize() {
this.chart && this.chart.resize()
},
/**
* 处理数据
* @param {Array} data 原始数据
* @returns {Array} 处理后的数据
*/
processData(data) {
// 处理空数据情况
if (!data || data.length === 0 || (data.length === 1 && (!data[0].name || !data[0].value))) {
return [{ name: '', value: '', itemStyle: { color: this.emptyColor } }]
}
// 处理正常数据,确保value为数字类型
return data.map(item => {
const value = typeof item.value === 'string' ? parseFloat(item.value) : item.value
return {
name: item.name,
value: value
}
})
}
},
// 组件挂载后
mounted() {
// 检查容器是否已渲染,确保图表正确初始化
const checkContainer = () => {
const width = this.$refs.chartContainer?.clientWidth
if (width && width > 0) {
this.initChart()
this.handleResize()
} else {
setTimeout(checkContainer, 100)
}
}
checkContainer()
// 监听窗口大小变化
window.addEventListener('resize', this.handleResize)
},
// 组件销毁前
beforeDestroy() {
// 清理资源
if (this.chart) {
this.chart.dispose()
this.chart = null
}
window.removeEventListener('resize', this.handleResize)
if (this.resizeObserver) {
this.resizeObserver.disconnect()
this.resizeObserver = null
}
}
}
</script>
<style scoped>
.pie-chart {
width: 100%;
height: 100%;
padding: 10px;
}
</style>
<template>
<el-tabs :tab-position="tabPosition" @tab-click="handleClick">
<el-tab-pane label="录井数据展示">
<realtime ref="realtime"></realtime>
</el-tab-pane>
<el-tab-pane label="钻井状态自动识别">
<drillingState ref="drillingState"></drillingState>
</el-tab-pane>
<el-tab-pane label="井队作业时效分析">
<timeSensitivityAnalysis
ref="timeSensitivityAnalysis"
></timeSensitivityAnalysis>
</el-tab-pane>
<!-- <el-tab-pane label="作业时效分析">-->
<!-- <homeworkEfficiency></homeworkEfficiency>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="螺杆效率实时分析">-->
<!-- <screwEfficiency></screwEfficiency>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="定向井作业优化分析">-->
<!-- <operationOptimization></operationOptimization>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="漏失溢流风险监测">-->
<!-- <riskMonitoring></riskMonitoring>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="钻井参数实时优化">-->
<!-- <drillingParameters></drillingParameters>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="区块提速分析">-->
<!-- <accelerationAnalysis></accelerationAnalysis>-->
<!-- </el-tab-pane>-->
</el-tabs>
</template>
<script>
//区块提速分析
import accelerationAnalysis from '../components/accelerationAnalysis/index.vue'
import drillingParameters from '../components/drillingParameters/index.vue'
// 钻井状态自动识别
import drillingState from '../components/drillingState/index.vue'
//井队作业时效分析
import timeSensitivityAnalysis from '../components/timeSensitivityAnalysis/index.vue'
// 作业时效分析
import homeworkEfficiency from '../components/homeworkEfficiency/index.vue'
//定向井作业优化分
import operationOptimization from '../components/operationOptimization/index.vue'
// 录井实时数据展示
import realtime from '../components/realtime/index.vue'
// 漏失溢流风险监测
import riskMonitoring from '../components/riskMonitoring/index.vue'
// 螺杆效率实时
import screwEfficiency from '../components/screwEfficiency/index.vue'
export default {
name: 'schemeOptimization',
components: {
accelerationAnalysis,
drillingParameters,
drillingState,
timeSensitivityAnalysis,
homeworkEfficiency,
operationOptimization,
realtime,
riskMonitoring,
screwEfficiency,
},
data() {
return {
tabPosition: 'left',
activeName: '1',
}
},
methods: {
handleClick(tab, event) {
console.log('tab', tab.label)
if (tab.label == '录井数据展示') {
console.log('112233')
this.$refs.realtime.getTableHeight()
// this.$refs.realtime.onSearch();
this.$refs.realtime.onRealTime()
}
if (tab.label == '钻井状态自动识别') {
this.$refs.drillingState.getTableHeight()
this.$refs.drillingState.getZjztPic()
this.$refs.realtime.stopRealTime() // 确保这个方法停止定时器
}
if (tab.label == '井队作业时效分析') {
// this.$refs.timeSensitivityAnalysis.getTableHeight();
// this.$refs.timeSensitivityAnalysis.getZjztPic();
}
},
},
}
</script>
<style scoped>
::v-deep.app-container {
padding: 0;
/* margin-top: 15px; */
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<div class="app-container" style="padding-top: 0">
<div style="margin-bottom: 15px;">
<rigConfigurations ref="rigConfigurations"></rigConfigurations>
</div>
</div>
</template>
<script>
import * as d3 from "d3";
import rigConfigurations from './components/rigConfigurations.vue'
import wellTracks from './components/wellTracks.vue'
import wellConstructs from './components/wellConstructs.vue'
export default {
name: "engineeringProposal",
components: {
rigConfigurations,
wellTracks,
wellConstructs
},
data() {
return {
engineer: "1",
}
},
mounted() {
},
methods: {
hangdy() {
this.$refs.rigConfigurations.getListzjpz()
this.$refs.rigConfigurations.getListDmjw()
this.$refs.rigConfigurations.getListDQ()
this.$refs.rigConfigurations.getListNjbxx()
this.$refs.rigConfigurations.getListQtxx()
},
handleClick(tab, event) {
console.log(tab, event);
},
}
}
</script>
<style lang="scss" scoped></style>
<template>
<div>
<h2>地质力学</h2>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<div class="app-container">
<el-form style="background-color: #f4f8fe ;" :model="queryParams" ref="queryForm" size="small" :inline="true"
v-show="showSearch">
<el-form-item style="display: flex;flex-direction: row;justify-content: flex-end;" prop="status">
<el-button-group>
<el-button size="mini" type="primary" plain @click="workingCondition">单井配置</el-button>
<el-button size="mini" type="primary" plain @click="geologicalScheme">工况总览</el-button>
<el-button size="mini" type="primary" plain @click="engineeringProposal">实时监控</el-button>
</el-button-group>
<!-- <el-select style="width: 100px; margin-left: 10px;" v-model="queryParams.gz" clearable :disabled="true">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select> -->
</el-form-item>
</el-form>
<!--单井配置-->
<div class="bk">
<div v-if="working == true" style="margin: 0px 10px 0 0 ;background-color: #fff;">
<el-tabs v-model="activeName" :tab-position="tabPosition" style="width: 100%;" @tab-click="handleTabClick">
<el-tab-pane label="基本信息" name="first">
<basicInformation ref="basicInformation"></basicInformation>
</el-tab-pane>
<el-tab-pane label="钻机配置" name="second">
<drillingRigcon ref="drillingRigcon" :formHeight="formHeight"></drillingRigcon>
</el-tab-pane>
<el-tab-pane label="参数配置" name="third">
<parameterCon ref="parameterCon"></parameterCon>
</el-tab-pane>
<el-tab-pane label="井眼轨迹" name="fourth">
<wellboreTrajectory ref="wellboreTrajectory"> </wellboreTrajectory>
</el-tab-pane>
<!-- <el-tab-pane label="靶区设置" name="fifth">
<targetAreasetting></targetAreasetting>
</el-tab-pane> -->
<el-tab-pane label="井身结构" name="sixth">
<wellStructures ref="wellStructures"></wellStructures>
</el-tab-pane>
<el-tab-pane label="井身结构2" name="seventh">
<Wellstructuree ref="Wellstructuree"></Wellstructuree>
</el-tab-pane>
<el-tab-pane label="泥浆填报" name="eighth">
<MudFillings ref="MudFillings"> </MudFillings>
</el-tab-pane>
<el-tab-pane label="录井数据" name="ninth">
<realDatas ref="realDatas"> </realDatas>
</el-tab-pane>
<el-tab-pane label="录井整米" name="tenth">
<loggingMeter ref="loggingMeter">
</loggingMeter>
</el-tab-pane>
<!-- <el-tab-pane label="地质力学" name="tenth">
<geoMechanics></geoMechanics>
</el-tab-pane> -->
</el-tabs>
</div>
<!--工况总览-->
<div v-if="geology == true">
<workingCondition></workingCondition>
</div>
<!--实时监控-->
<div v-if="engineering == true">
<dataInitialization></dataInitialization>
</div>
</div>
</div>
</template>
<script>
//基本信息
import basicInformation from "./basicInformation.vue";
//钻机配置
import drillingRigcon from "./drillingRigcon.vue";
// 泥浆填报
import MudFillings from "./MudFillings.vue";
// 参数配置
import parameterCon from "./parameterCons.vue";
//井眼轨迹
import wellboreTrajectory from "./wellboreTrajectory.vue";
//靶区设置
import targetAreasetting from "./targetAreasetting.vue";
// 井身结构
import wellStructures from "./wellStructures.vue";
// 井身结构
import Wellstructuree from "./Wellstructuree.vue";
//地质力学
import geoMechanics from "./geoMechanics.vue";
//录井实时数据
import realDatas from "./realDatas.vue";
// 工况总览
import workingCondition from "../workingConditions/index.vue";
// 实时监控
import dataInitialization from "../dataInitialization/index.vue";
import data from "../singleWellcon/index.vue";
// 录井整米
import loggingMeter from "../singleWellcon/ljSssjSd/index.vue";
export default {
name: "singleWellcon",
components: {
dataInitialization,
workingCondition,
basicInformation,
drillingRigcon,
geoMechanics,
MudFillings,
parameterCon,
wellboreTrajectory,
targetAreasetting,
wellStructures,
Wellstructuree,
realDatas,
loggingMeter
},
data() {
return {
formHeight: 0,
CardHeight: 0,
options: [{
value: '公制',
label: '公制'
}],
tabTopPosition: "top",
tabPosition: "left",
activeName: "first",
activeTitleName: "first",
showSearch: true,
queryParams: {
gz: "公制",
},
working: false,
geology: true,
engineering: false
};
},
mounted() {
this.getTableHeight();
},
methods: {
handleTabClick(tab) {
// 获取当前激活的标签名称
const activeTab = tab.name;
// 根据激活的标签名称调用相应的组件方法
if (activeTab === 'first') {
this.$refs.basicInformation.getDeptTree();
this.$refs.basicInformation.getBasinSelect();
this.$refs.basicInformation.getListjbxx();
this.$refs.basicInformation.getTableHeight();
} else if (activeTab === 'second') {
this.$refs.drillingRigcon.hangdy();
} else if (activeTab === 'third') {
this.$refs.parameterCon.getFacs();
} else if (activeTab === 'fourth') {
this.$refs.wellboreTrajectory.handPage();
} else if (activeTab === 'sixth') {
this.$refs.wellStructures.getJsjgSvg();
this.$refs.wellStructures.getList();
this.$refs.wellStructures.getJsjgList();
this.$refs.wellStructures.listJj();
} else if (activeTab === 'seventh') {
this.$refs.Wellstructuree.getJsjgPic();
this.$refs.Wellstructuree.getList();
this.$refs.Wellstructuree.getJsjgList();
this.$refs.Wellstructuree.listJj();
} else if (activeTab === 'eighth') {
this.$refs.MudFillings.getList();
} else if (activeTab === 'ninth') {
this.$refs.realDatas.getList();
}
},
getTableHeight() {
this.$nextTick(() => {
let nowHeight = document.documentElement.clientHeight - 50 - 30;
//console.log(nowHeight, '浏览器当前视口高度');
// let topBlock = this.$refs.tabHeight.offsetHeight;
// //console.log(topBlock, '整个页面占的高度');
let queryForm = this.$refs["queryForm"].$el.clientHeight//el-form
//console.log(queryForm, 'el-form的高度');
this.formHeight = queryForm; // 存储 el-form 的高度
this.CardHeight = nowHeight - queryForm
//console.log(this.CardHeight, 'CardHeight的高度');
});
},
//单井配置
workingCondition() {
this.working = true;
this.geology = false;
this.engineering = false;
this.activeName = "first";
},
//工况总览
geologicalScheme() {
this.working = false;
this.geology = true;
this.engineering = false;
},
//实时监控
engineeringProposal() {
this.working = false;
this.geology = false;
this.engineering = true;
},
handleClick(tab, event) {
//console.log(tab, event);
},
//单井配置
djpz() {
this.$router.push({
path: "/basicInformation",
});
},
//实时监控
ssjk() {
this.$router.push({
path: "/dataInitialization",
});
},
//工况总览
kkzl() {
this.$router.push({
path: "/workingConditions",
});
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-table__cell>.cell {
/* padding: -22px !important; */
/* border: 1px solid red; */
font-size: 14px;
}
::v-deep .el-table--medium .el-table__cell {
padding: 5px 0 !important;
}
::v-deep.app-container {
padding: 5px;
background-color: #f4f8fe; // margin-top: 15px;
height: calc(100vh - 5rem);
}
.button-container {
position: absolute;
right: 0;
/* 使用 Flexbox 布局 */
}
.button-container .el-button {
margin-left: 0;
}
.select-container {
margin-left: 10px;
}
.space {
margin-top: 40px;
/* 设定间隔的高度 */
}
.custom-tabs-header {
display: flex;
justify-content: flex-end;
}
.custom-tabs-title {
margin-right: 20px;
/* Adjust the spacing as needed */
}
::v-deep.el-form-item--small.el-form-item {
margin-bottom: 3px;
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<div>
<h2>靶区设置</h2>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<div class="app-container" style="padding-top: 0">
<div style="margin-bottom: 15px;">
<wellTracks ref="wellTracks"> </wellTracks>
</div>
</div>
</template>
<script>
import wellTracks from './components/wellTracks.vue'
export default {
name: "engineeringProposal",
components: {
wellTracks,
},
data () {
return {
engineer: "1",
}
},
mounted () {
},
methods: {
handleClick (tab, event) {
console.log(tab, event);
},
handPage () {
this.$refs.wellTracks.getJygjEw();
this.$refs.wellTracks.getJygjSw();
this.$refs.wellTracks.getWellListsjgj();
this.$refs.wellTracks.getWellboreListsj();
this.$refs.wellTracks.getsjbgWellListgj();
this.$refs.wellTracks.getWellboreListsjbg();
this.$refs.wellTracks.getscWellListgj();
this.$refs.wellTracks.getOutputResult();
this.$refs.wellTracks.getWellPosition();
}
}
}
</script>
<style lang="scss" scoped></style>
<template>
<div class="app-container">
<el-table @row-click="clickRow" :data="tableData" :span-method="objectSpanMethod" border style="width: 100%;"
header-row-class-name="custom-header-class">
<el-table-column align="center" prop="kc" label="开次" width="180">
<template slot-scope="scope">
<span>{{ scope.row.kc }}-{{ scope.row.tgcx }}</span>
<!-- <i class="el-icon-menu" style="font-size: 20px;color: #1c84c6;margin-right: 15px" @click="handleMenu"></i>-->
</template>
</el-table-column>
<el-table-column align="center" width="180" prop="sgbzmc" label="施工步骤">
<template slot-scope="scope">
<span>{{ scope.row.sgbzmc }}</span>
<!-- <i class="el-icon-menu" style="font-size: 20px;color: #1c84c6;margin-right: 15px" @click="handleMenu"></i>-->
</template>
</el-table-column>
<el-table-column align="center" width="100" prop="xxgk" label="详细工况">
<template slot-scope="scope">
<span v-for="item in scope.row.xxgk" :key="item.jsjgid">{{ item }}</span>
</template>
</el-table-column>
<el-table-column prop="tripInformation" label="趟钻信息" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.jtZjzhsj">
<div v-if="scope.row.xxgk == '钻进、起下钻'">
<span style="font-weight: bold;">— 开始深度:</span>
<span style="margin-right: 30px">{{ scope.row.kssd }}</span>
<span style="font-weight: bold;">— 结束深度:</span>
<span style="margin-right: 30px">{{ scope.row.jssd }}</span>
<span style="font-weight: bold;">— 泥浆密度:</span>
<span style="margin-right: 30px"> {{ scope.row.njmd }}</span>
<span style="font-weight: bold;">— 泥浆类型:</span>
<span style="margin-right: 30px">{{ scope.row.njlx }}</span>
</div>
<div>
</div>
<div style="font-weight: bold; display: inline-block;">
<span v-if="scope.row.xxgk == '下套管' || scope.row.xxgk == '下尾管'">套管管柱明细:</span>
<span v-else>— 钻具组合:</span>
<div v-if="scope.row.jtZjzhsj" style="display: inline-block;">
<div v-for="(item, index) in scope.row.jtZjzhsj" :key="item.id" style="display: inline-block;">
<span :style="{ color: getColor(item.zjmc) }">{{ item.zjmc }}</span>
<span>{{ item.zjxsmc }}</span>
<!-- 如果不是最后一个 item,则显示加号 -->
<span v-if="index < scope.row.jtZjzhsj.length - 1"> + </span>
</div>
</div>
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { listFaxq } from "@/api/scientificDrill/designScheme/workingCondition";
export default {
name: "workingCondition",
data() {
return {
zjzhLists: [],
// tableData: [{
// kc: "1开 - 导管",
// id: '12987122',
// constructionProcedure: '',
// workingCondition: '',
// tripInformation: '',
// }, {
// kc: "2开 - 表层套管",
// id: '12987123',
// constructionProcedure: '444.5mm 裸眼钻进',
// workingCondition: [
// '钻进', '起下钻'
// ],
// tripInformation: {
// drill: {
// startDepth: '100.00m',
// endDepth: '701.00m',
// mudDensity: '1.10s.g.',
// mudType: 'WBM',
// drill: "17½\" MD517 Bit 0.30 m +",
// drillingTool: " Flexdrill P100XL 9.88 m +",
// drillCollar: " 203.2mm 223.22 kg/m DS-100 NC56 27.42 m + ",
// drillPipe: "139.7mm 36.76 kg/m S135 VX57 609.26 m",
// },
// drivepipe: ""
// }
// }, {
// kc: "2开 - 表层套管",
// id: '12987123',
// constructionProcedure: '339.7mm 套管',
// workingCondition: [
// '下套管'
// ],
// tripInformation: {
// drill: "",
// drivepipe: " 54.5 J-55 700.00 m",
// }
// },
// {
// kc: "3开 - 技术套管",
// id: '12987123',
// constructionProcedure: '311.2mm 裸眼钻进',
// workingCondition: [
// '钻进', '起下钻'
// ],
// tripInformation: {
// drill: {
// startDepth: '701.00m',
// endDepth: '3976.00m',
// mudDensity: '1.30s.g.',
// mudType: 'WBM',
// drill: "12¼\" MD517 Bit 0.30 m +",
// drillingTool: " AutoTrak G3.0 2.50 m + ",
// drillCollar: " 177.8mm 163.70 kg/m DS-100 NC50 9.14 m +",
// drillPipe: "139.7mm 36.76 kg/m S135 VX57 3640.09 m ",
// },
// drivepipe: ""
// }
// }, {
// kc: "3开 - 技术套管",
// id: '12987123',
// constructionProcedure: '244.5mm 套管',
// workingCondition: [
// '下套管'
// ],
// tripInformation: {
// drill: "",
// drivepipe: "47.0 P-110 3974.00 m "
// }
// }, {
// kc: "4开 - 技术套管2",
// id: '12987124',
// constructionProcedure: '215.9mm 裸眼钻进',
// workingCondition: [
// '钻进', '起下钻'
// ],
// tripInformation: {
// drill: {
// startDepth: '100.00m',
// endDepth: '701.00m',
// mudDensity: '1.10s.g.',
// mudType: 'WBM',
// drill: "17½\" MD517 Bit 0.30 m +",
// drillingTool: " Flexdrill P100XL 9.88 m +",
// drillCollar: " 203.2mm 223.22 kg/m DS-100 NC56 27.42 m + ",
// drillPipe: "139.7mm 36.76 kg/m S135 VX57 609.26 m",
// },
// drivepipe: ""
// }
// }, {
// kc: "4开 - 技术套管2",
// id: '12987124',
// constructionProcedure: '177.8mm尾管',
// workingCondition: [
// '下套管'
// ],
// tripInformation: {
// drill: "",
// drivepipe: " 54.5 J-55 700.00 m "
// }
// }, {
// kc: "5开 - 生产套管",
// id: '12987124',
// constructionProcedure: '149.2mm 裸眼钻进',
// workingCondition: [
// '钻进', '起下钻'
// ],
// tripInformation: {
// drill: {
// startDepth: '100.00m',
// endDepth: '701.00m',
// mudDensity: '1.10s.g.',
// mudType: 'WBM',
// drill: "17½\" MD517 Bit 0.30 m +",
// drillingTool: " Flexdrill P100XL 9.88 m +",
// drillCollar: " 203.2mm 223.22 kg/m DS-100 NC56 27.42 m + ",
// drillPipe: "139.7mm 36.76 kg/m S135 VX57 609.26 m",
// },
// drivepipe: ""
// }
// }, {
// kc: "5开 - 生产套管",
// id: '12987124',
// constructionProcedure: '114.3mm 尾管',
// workingCondition: [
// '下套管'
// ],
// tripInformation: {
// drill: "",
// drivepipe: " 54.5 J-55 700.00 m "
// }
// }],
tableData: [],
zjxx: [],
zjzh: [],
}
},
mounted() {
this.getList();
},
methods: {
getColor(zjmc) {
switch (zjmc) {
case '钻头':
return '#0b7bb1';
case '螺杆钻具':
return '#009eea';
case '钻铤':
return '#78529d';
case '加重钻杆':
return '#5eb8fb';
case '钻杆':
return '#5a6adc';
case 'MWD/LWD':
return '#139741';
case '旋转导向':
return '#e69132';
case '套管':
return '#135293';
}
},
getList() {
this.loading = true;
this.jhdm = this.$route.query.jhdm;
listFaxq({ jhdm: this.jhdm }).then(response => {
this.tableData = response.rows;
this.total = response.total;
this.loading = false;
});
},
clickRow(row) {
console.log('row',row)
this.$router.push("/taleData")
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
// 获取当前单元格的值
const currentValue = row[column.property];
// 获取上一行相同列的值
const preRow = this.tableData[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
// 如果当前值和上一行的值相同,则将当前单元格隐藏
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
// 否则计算当前单元格应该跨越多少行
let rowspan = 1;
for (let i = rowIndex + 1; i < this.tableData.length; i++) {
const nextRow = this.tableData[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
},
}
}
</script>
<style scoped lang="scss"></style>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
export const chartTitlesMixin = {
data() {
return {
// 存储图表显示状态的对象
chartVisibility: {},
// 默认选中扭矩与摩阻标签页
innerActiveTab: "0",
// 添加一个标志来跟踪是否已经初始化
isInitialized: false,
// 添加一个标志来跟踪DOM是否已经准备好
isDomReady: false,
// 添加一个计时器ID
checkTimer: null
};
},
methods: {
getChartTitles() {
console.log('getChartTitles called');
const titles = [];
const activeTabName = this.innerActiveTab;
const componentName = this.$options.name;
// 获取当前标签页的中文名称
const tabNameMap = {
0: "扭矩与摩阻",
1: "水力载荷",
2: "井筒清洁",
};
const currentTabLabel = tabNameMap[activeTabName] || activeTabName;
console.log("==================== 图表标题信息 ====================");
console.log("当前组件:", componentName);
console.log("当前标签页:", currentTabLabel);
let scrollContentRef = null;
if (activeTabName === "0") {
scrollContentRef = this.$refs.scrollContent1;
} else if (activeTabName === "1") {
scrollContentRef = this.$refs.scrollContent2;
} else if (activeTabName === "2") {
scrollContentRef = this.$refs.scrollContent3;
}
if (!scrollContentRef) {
console.warn("未找到对应的scroll-content容器");
// 即使没找到容器也发送数据
this.$emit("update-chart-titles", {
componentName: componentName,
tabName: currentTabLabel,
titles: [],
});
return titles;
}
// 查找所有图表标题
const titleElements = scrollContentRef.querySelectorAll(
'.svgContainer .svgTitle span[style*="flex-grow: 1"]'
);
console.log("找到的图表数量:", titleElements.length);
titleElements.forEach((span, index) => {
const text = span.textContent?.trim();
if (text) {
titles.push(text);
// 初始化图表显示状态,如果不存在则默认显示
if (this.chartVisibility[text] === undefined) {
this.$set(this.chartVisibility, text, true);
}
console.log(`图表${index + 1}:`, text);
}
});
// 发送数据到父组件
const data = {
componentName: componentName,
tabName: currentTabLabel,
titles: titles,
};
console.log("发送到父组件的数据:", data);
this.$emit("update-chart-titles", data);
console.log("==================== 图表标题信息结束 ====================");
return titles;
},
// 切换图表显示状态
toggleChartVisibility(title) {
this.$set(this.chartVisibility, title, !this.chartVisibility[title]);
},
// 检查图表是否可见
isChartVisible(title) {
return this.chartVisibility[title] !== false;
},
// 初始化组件时调用
initializeComponent() {
console.log('initializeComponent called');
// 默认选中扭矩与摩阻标签页
this.innerActiveTab = "0";
if (!this.isInitialized) {
this.isInitialized = true;
// 初始化后获取图表标题,使用递归检查直到找到图表
this.checkAndGetTitles();
}
},
// 递归检查并获取图表标题
checkAndGetTitles(attempts = 0) {
console.log('checkAndGetTitles called, attempt:', attempts);
// 清除之前的计时器
if (this.checkTimer) {
clearTimeout(this.checkTimer);
this.checkTimer = null;
}
if (attempts > 20) {
console.warn('Exceeded maximum attempts to get chart titles');
return;
}
this.$nextTick(() => {
const scrollContentRef = this.$refs.scrollContent1;
if (scrollContentRef) {
const titleElements = scrollContentRef.querySelectorAll(
'.svgContainer .svgTitle span[style*="flex-grow: 1"]'
);
if (titleElements.length > 0) {
console.log('Found chart titles, getting titles...');
this.isDomReady = true;
const titles = this.getChartTitles();
if (titles.length > 0) {
return;
}
}
}
// 如果没有找到图表标题,200ms后再次尝试
this.checkTimer = setTimeout(() => {
console.log('Retrying to get chart titles...');
this.checkAndGetTitles(attempts + 1);
}, 200);
});
},
// 处理标签页点击
handleTabClick() {
console.log('Tab clicked, getting chart titles...');
// 重置DOM准备状态
this.isDomReady = false;
// 重新开始检查图表标题
this.checkAndGetTitles();
}
},
created() {
console.log('Component created');
this.initializeComponent();
},
mounted() {
console.log('Component mounted');
// 在mounted时再次尝试获取图表标题
this.$nextTick(() => {
this.checkAndGetTitles();
});
},
// 当组件被激活时(如在keep-alive中)
activated() {
console.log('Component activated');
this.$nextTick(() => {
this.checkAndGetTitles();
});
},
// 组件销毁前清理
beforeDestroy() {
console.log('Component being destroyed');
if (this.checkTimer) {
clearTimeout(this.checkTimer);
this.checkTimer = null;
}
}
};
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!--工程方案-->
<template>
<!-- style="padding-top: 0" -->
<div class="gcBoxSty" :max-height="TableHeight()">
<div>
<el-tabs v-model="engineer" @tab-click="handleClick"
style="width: 99%;margin-top: -0.7%;z-index: 999;margin-left: 16px;">
<el-tab-pane label="钻机配置" name="1" ref="tab1">
<rigConfiguration></rigConfiguration>
</el-tab-pane>
<el-tab-pane label="井眼轨迹" name="2" ref="tab2">
<wellTrack></wellTrack>
</el-tab-pane>
<el-tab-pane label="井身结构" name="3" ref="tab3">
<wellConstruct></wellConstruct>
</el-tab-pane>
<!-- <el-tab-pane label="泥浆填报" name="4" ref="tab4">-->
<!-- <MudFilling></MudFilling>-->
<!-- </el-tab-pane>-->
</el-tabs>
</div>
</div>
</template>
<script>
import * as d3 from "d3";
import rigConfiguration from './components/rigConfiguration'
import wellTrack from './components/wellTrack'
import wellConstruct from './components/wellConstruct'
import MudFilling from './components/MudFilling.vue'
export default {
name: "engineeringProposal",
components: {
rigConfiguration,
wellTrack,
wellConstruct,
MudFilling
},
data() {
return {
engineer: "1",
tabHeight: 0,
}
},
mounted() {
this.TableHeight()
},
methods: {
TableHeight() {
const windowHeight = window.innerHeight;
const topBarHeight = 80;
const componentMargin = 67;
const tableHeight = windowHeight - topBarHeight - componentMargin;
return tableHeight;
},
handleClick(tab, event) {
this.TableHeight()
},
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-tabs__nav-wrap {
overflow: visible !important;
}
.gcBoxSty {
background-color: #f3f8ff !important;
// border: 1px solid red;
width: 100%;
// height: auto;
overflow: hidden;
height: 100%;
}
::v-deep.el-tabs .el-tabs__header {
margin: 0 0 5px;
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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