|
@@ -61,6 +61,15 @@
|
|
</el-form>
|
|
</el-form>
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
|
|
|
|
|
|
+ <ContentWrap class="mb-15px">
|
|
|
|
+ <div class="color-legend">
|
|
|
|
+ <div class="legend-item">
|
|
|
|
+ <span class="color-indicator orange"></span>
|
|
|
|
+ <span>进尺工作时间+其它生产时间+非生产时间=24H 否则橙色预警</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </ContentWrap>
|
|
|
|
+
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<ContentWrap ref="tableContainerRef">
|
|
<ContentWrap ref="tableContainerRef">
|
|
<div class="table-container">
|
|
<div class="table-container">
|
|
@@ -140,6 +149,18 @@
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column label="进尺工作时间(H)" align="center" prop="drillingWorkingTime" :width="columnWidths.drillingWorkingTime"/>
|
|
|
|
+ <el-table-column label="其它生产时间(H)" align="center" prop="otherProductionTime" :width="columnWidths.otherProductionTime"/>
|
|
|
|
+ <el-table-column label="非生产时间" align="center">
|
|
|
|
+ <el-table-column label="事故(H)" align="center" prop="accidentTime" :width="columnWidths.nonProductionTime"/>
|
|
|
|
+ <el-table-column label="修理(H)" align="center" prop="repairTime" :width="columnWidths.nonProductionTime"/>
|
|
|
|
+ <el-table-column label="自停(H)" align="center" prop="selfStopTime" :width="columnWidths.nonProductionTime"/>
|
|
|
|
+ <el-table-column label="复杂(H)" align="center" prop="complexityTime" :width="columnWidths.nonProductionTime"/>
|
|
|
|
+ <el-table-column label="搬迁(H)" align="center" prop="relocationTime" :width="columnWidths.nonProductionTime"/>
|
|
|
|
+ <el-table-column label="整改(H)" align="center" prop="rectificationTime" :width="columnWidths.nonProductionTime"/>
|
|
|
|
+ <el-table-column label="等停(H)" align="center" prop="waitingStopTime" :width="columnWidths.nonProductionTime"/>
|
|
|
|
+ <el-table-column label="冬休(H)" align="center" prop="winterBreakTime" :width="columnWidths.nonProductionTime"/>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="操作" align="center" :width="columnWidths.operation" fixed="right">
|
|
<el-table-column label="操作" align="center" :width="columnWidths.operation" fixed="right">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
@@ -267,6 +288,8 @@ const columnWidths = ref({
|
|
productionStatus: '200px',
|
|
productionStatus: '200px',
|
|
azimuth: '150px',
|
|
azimuth: '150px',
|
|
designWellStruct: '200px',
|
|
designWellStruct: '200px',
|
|
|
|
+ drillingWorkingTime: '150px',
|
|
|
|
+ otherProductionTime: '150px',
|
|
createTime: '180px',
|
|
createTime: '180px',
|
|
operation: '120px'
|
|
operation: '120px'
|
|
})
|
|
})
|
|
@@ -278,6 +301,47 @@ const formatDesignWellStruct = (text: string | null | undefined) => {
|
|
return text.length > 30 ? text.substring(0, 30) + '...' : text;
|
|
return text.length > 30 ? text.substring(0, 30) + '...' : text;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+// 检查10个时间字段之和是否为24H
|
|
|
|
+const checkTimeSumEquals24 = (row: any) => {
|
|
|
|
+ // 获取三个字段的值,转换为数字,如果为空则视为0
|
|
|
|
+ const drillingWorkingTime = parseFloat(row.drillingWorkingTime) || 0;
|
|
|
|
+ const otherProductionTime = parseFloat(row.otherProductionTime) || 0;
|
|
|
|
+ const accidentTime = parseFloat(row.accidentTime) || 0;
|
|
|
|
+ const repairTime = parseFloat(row.repairTime) || 0;
|
|
|
|
+ const selfStopTime = parseFloat(row.selfStopTime) || 0;
|
|
|
|
+ const complexityTime = parseFloat(row.complexityTime) || 0;
|
|
|
|
+ const relocationTime = parseFloat(row.relocationTime) || 0;
|
|
|
|
+ const rectificationTime = parseFloat(row.rectificationTime) || 0;
|
|
|
|
+ const waitingStopTime = parseFloat(row.waitingStopTime) || 0;
|
|
|
|
+ const winterBreakTime = parseFloat(row.winterBreakTime) || 0;
|
|
|
|
+
|
|
|
|
+ // 计算总和
|
|
|
|
+ const sum = drillingWorkingTime + otherProductionTime + accidentTime + repairTime
|
|
|
|
+ + selfStopTime + complexityTime + relocationTime + rectificationTime + waitingStopTime + winterBreakTime;
|
|
|
|
+
|
|
|
|
+ // 返回是否等于24(允许一定的浮点数误差)
|
|
|
|
+ return Math.abs(sum - 24) < 0.01; // 使用0.01作为误差范围
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+// 单元格样式函数
|
|
|
|
+const cellStyle = ({ row, column, rowIndex, columnIndex }: { row: any; column: any; rowIndex: number; columnIndex: number }) => {
|
|
|
|
+ // 处理三个时间字段:当日注气时间、当日注水时间、非生产时间
|
|
|
|
+ const timeFields = ['drillingWorkingTime', 'otherProductionTime', 'accidentTime',
|
|
|
|
+ 'repairTime', 'selfStopTime', 'complexityTime',
|
|
|
|
+ 'relocationTime', 'rectificationTime', 'waitingStopTime', 'winterBreakTime'];
|
|
|
|
+ if (timeFields.includes(column.property)) {
|
|
|
|
+ // 检查10个时间字段之和是否不等于24
|
|
|
|
+ if (!checkTimeSumEquals24(row)) {
|
|
|
|
+ return {
|
|
|
|
+ color: 'orange',
|
|
|
|
+ fontWeight: 'bold'
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 默认返回空对象,不应用特殊样式
|
|
|
|
+ return {};
|
|
|
|
+};
|
|
|
|
+
|
|
// 计算文本宽度
|
|
// 计算文本宽度
|
|
const getTextWidth = (text: string, fontSize = 14) => {
|
|
const getTextWidth = (text: string, fontSize = 14) => {
|
|
const span = document.createElement('span');
|
|
const span = document.createElement('span');
|
|
@@ -300,7 +364,7 @@ const FLEXIBLE_COLUMNS = ['deptName', 'contractName', 'taskName', 'equipmentType
|
|
'currentDepth', 'dailyFootage', 'monthlyFootage', 'annualFootage', 'totalConstructionWells',
|
|
'currentDepth', 'dailyFootage', 'monthlyFootage', 'annualFootage', 'totalConstructionWells',
|
|
'completedWells', 'mudDensity', 'mudViscosity', 'constructionStartDate',
|
|
'completedWells', 'mudDensity', 'mudViscosity', 'constructionStartDate',
|
|
'constructionEndDate', 'lateralLength', 'wellInclination',
|
|
'constructionEndDate', 'lateralLength', 'wellInclination',
|
|
- 'azimuth', 'createTime'];
|
|
|
|
|
|
+ 'azimuth', 'drillingWorkingTime', 'otherProductionTime', 'createTime'];
|
|
|
|
|
|
/** 查询列表 */
|
|
/** 查询列表 */
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
@@ -389,6 +453,8 @@ const calculateColumnWidths = () => {
|
|
calculateColumnMinWidth('azimuth', '方位(°)', (row: any) => row.azimuth);
|
|
calculateColumnMinWidth('azimuth', '方位(°)', (row: any) => row.azimuth);
|
|
calculateColumnMinWidth('designWellStruct', '设计井身结构', (row: any) => row.designWellStruct);
|
|
calculateColumnMinWidth('designWellStruct', '设计井身结构', (row: any) => row.designWellStruct);
|
|
calculateColumnMinWidth('productionStatus', '生产动态', (row: any) => row.productionStatus);
|
|
calculateColumnMinWidth('productionStatus', '生产动态', (row: any) => row.productionStatus);
|
|
|
|
+ calculateColumnMinWidth('drillingWorkingTime', '进尺工作时间', (row: any) => row.drillingWorkingTime);
|
|
|
|
+ calculateColumnMinWidth('otherProductionTime', '其它生产时间', (row: any) => row.otherProductionTime);
|
|
calculateColumnMinWidth('createTime', '创建时间', (row: any) => dateFormatter(null, null, row.createTime));
|
|
calculateColumnMinWidth('createTime', '创建时间', (row: any) => dateFormatter(null, null, row.createTime));
|
|
|
|
|
|
// 设计井身结构 生产动态 列使用固定宽度,不参与自动计算
|
|
// 设计井身结构 生产动态 列使用固定宽度,不参与自动计算
|
|
@@ -583,6 +649,39 @@ watch(list, () => {
|
|
flex-grow: 0;
|
|
flex-grow: 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/* 颜色说明区域样式 */
|
|
|
|
+.color-legend {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ gap: 8px;
|
|
|
|
+ padding: 12px 16px;
|
|
|
|
+ background-color: #f8f9fa;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ border-left: 4px solid #e6f7ff;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.legend-item {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ gap: 8px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.color-indicator {
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 12px;
|
|
|
|
+ height: 12px;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.color-indicator.red {
|
|
|
|
+ background-color: red;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.color-indicator.orange {
|
|
|
|
+ background-color: orange;
|
|
|
|
+}
|
|
|
|
+
|
|
</style>
|
|
</style>
|
|
|
|
|
|
<style>
|
|
<style>
|