|
@@ -61,11 +61,29 @@
|
|
</el-form>
|
|
</el-form>
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
|
|
|
|
|
|
+ <ContentWrap class="mb-15px">
|
|
|
|
+ <div class="color-legend">
|
|
|
|
+ <div class="legend-item">
|
|
|
|
+ <span class="color-indicator red"></span>
|
|
|
|
+ <span>运行时效=当日注气量/产能 超过120%红色预警</span>
|
|
|
|
+ </div>
|
|
|
|
+ <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">
|
|
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true"
|
|
<el-table ref="tableRef" v-loading="loading" :data="list" :stripe="true"
|
|
- :show-overflow-tooltip="true" style="width: 100%" :cell-style="cellStyle">
|
|
|
|
|
|
+ style="width: 100%" :cell-style="cellStyle">
|
|
|
|
+ <el-table-column :label="t('iotDevice.serial')" width="70" align="center">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="日期"
|
|
label="日期"
|
|
align="center"
|
|
align="center"
|
|
@@ -111,6 +129,19 @@
|
|
:formatter="dateFormatter"
|
|
:formatter="dateFormatter"
|
|
:width="columnWidths.constructionEndDate"
|
|
:width="columnWidths.constructionEndDate"
|
|
/>
|
|
/>
|
|
|
|
+ <el-table-column label="生产动态" align="center" :width="columnWidths.productionStatus" fixed-width>
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-tooltip
|
|
|
|
+ effect="light"
|
|
|
|
+ :content="scope.row.productionStatus"
|
|
|
|
+ placement="top"
|
|
|
|
+ popper-class="design-well-struct-tooltip"
|
|
|
|
+ :disabled="!scope.row.productionStatus || scope.row.productionStatus.length <= 30"
|
|
|
|
+ >
|
|
|
|
+ <span class="design-well-struct-text">{{ formatDesignWellStruct(scope.row.productionStatus) }}</span>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="累计注气量(万方)" align="center" prop="totalGasInjection"
|
|
<el-table-column label="累计注气量(万方)" align="center" prop="totalGasInjection"
|
|
:width="columnWidths.totalGasInjection" :formatter="gasInjectionFormatter"/>
|
|
:width="columnWidths.totalGasInjection" :formatter="gasInjectionFormatter"/>
|
|
<el-table-column label="累计注水量(方)" align="center" prop="totalWaterInjection" :width="columnWidths.totalWaterInjection"/>
|
|
<el-table-column label="累计注水量(方)" align="center" prop="totalWaterInjection" :width="columnWidths.totalWaterInjection"/>
|
|
@@ -233,6 +264,7 @@ const columnWidths = ref({
|
|
nptReason: '150px',
|
|
nptReason: '150px',
|
|
constructionStartDate: '180px',
|
|
constructionStartDate: '180px',
|
|
constructionEndDate: '180px',
|
|
constructionEndDate: '180px',
|
|
|
|
+ productionStatus: '200px',
|
|
totalGasInjection: '150px',
|
|
totalGasInjection: '150px',
|
|
totalWaterInjection: '150px',
|
|
totalWaterInjection: '150px',
|
|
cumulativeCompletion: '150px',
|
|
cumulativeCompletion: '150px',
|
|
@@ -258,6 +290,13 @@ const getTextWidth = (text: string, fontSize = 14) => {
|
|
return width;
|
|
return width;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+// 格式化设计井身结构文本
|
|
|
|
+const formatDesignWellStruct = (text: string | null | undefined) => {
|
|
|
|
+ if (!text) return '-';
|
|
|
|
+ // 如果文本长度超过30个字符,显示前30个字符并添加省略号
|
|
|
|
+ return text.length > 30 ? text.substring(0, 30) + '...' : text;
|
|
|
|
+};
|
|
|
|
+
|
|
// 百分比格式化函数
|
|
// 百分比格式化函数
|
|
const percentageFormatter = (row: any, column: any, cellValue: any, index: number) => {
|
|
const percentageFormatter = (row: any, column: any, cellValue: any, index: number) => {
|
|
if (cellValue === null || cellValue === undefined) return '';
|
|
if (cellValue === null || cellValue === undefined) return '';
|
|
@@ -269,7 +308,7 @@ const percentageFormatter = (row: any, column: any, cellValue: any, index: numbe
|
|
const FLEXIBLE_COLUMNS = ['deptName', 'contractName', 'taskName', 'constructionStatus', 'relocationDays', 'designInjection',
|
|
const FLEXIBLE_COLUMNS = ['deptName', 'contractName', 'taskName', 'constructionStatus', 'relocationDays', 'designInjection',
|
|
'transitTime', 'dailyGasInjection', 'dailyWaterInjection', 'dailyPowerUsage', 'dailyInjectGasTime',
|
|
'transitTime', 'dailyGasInjection', 'dailyWaterInjection', 'dailyPowerUsage', 'dailyInjectGasTime',
|
|
'dailyInjectWaterTime', 'nonProductionTime', 'nptReason', 'constructionStartDate',
|
|
'dailyInjectWaterTime', 'nonProductionTime', 'nptReason', 'constructionStartDate',
|
|
- 'constructionEndDate', 'totalGasInjection', 'totalWaterInjection',
|
|
|
|
|
|
+ 'constructionEndDate', 'productionStatus', 'totalGasInjection', 'totalWaterInjection',
|
|
'cumulativeCompletion', 'createTime'];
|
|
'cumulativeCompletion', 'createTime'];
|
|
|
|
|
|
/** 查询列表 */
|
|
/** 查询列表 */
|
|
@@ -332,7 +371,7 @@ const cellStyle = ({ row, column, rowIndex, columnIndex }: { row: any; column: a
|
|
// 检查三个时间字段之和是否不等于24
|
|
// 检查三个时间字段之和是否不等于24
|
|
if (!checkTimeSumEquals24(row)) {
|
|
if (!checkTimeSumEquals24(row)) {
|
|
return {
|
|
return {
|
|
- color: 'red',
|
|
|
|
|
|
+ color: 'orange',
|
|
fontWeight: 'bold'
|
|
fontWeight: 'bold'
|
|
};
|
|
};
|
|
}
|
|
}
|
|
@@ -410,12 +449,17 @@ const calculateColumnWidths = () => {
|
|
calculateColumnMinWidth('nptReason', t('project.nptReason'), (row: any) => row.nptReason);
|
|
calculateColumnMinWidth('nptReason', t('project.nptReason'), (row: any) => row.nptReason);
|
|
calculateColumnMinWidth('constructionStartDate', '施工开始日期', (row: any) => dateFormatter(null, null, row.constructionStartDate));
|
|
calculateColumnMinWidth('constructionStartDate', '施工开始日期', (row: any) => dateFormatter(null, null, row.constructionStartDate));
|
|
calculateColumnMinWidth('constructionEndDate', '施工结束日期', (row: any) => dateFormatter(null, null, row.constructionEndDate));
|
|
calculateColumnMinWidth('constructionEndDate', '施工结束日期', (row: any) => dateFormatter(null, null, row.constructionEndDate));
|
|
|
|
+ calculateColumnMinWidth('productionStatus', '生产动态', (row: any) => row.productionStatus);
|
|
calculateColumnMinWidth('totalGasInjection', '累计注气量(万方)', (row: any) => row.totalGasInjection);
|
|
calculateColumnMinWidth('totalGasInjection', '累计注气量(万方)', (row: any) => row.totalGasInjection);
|
|
calculateColumnMinWidth('totalWaterInjection', '累计注水量(方)', (row: any) => row.totalWaterInjection);
|
|
calculateColumnMinWidth('totalWaterInjection', '累计注水量(方)', (row: any) => row.totalWaterInjection);
|
|
calculateColumnMinWidth('cumulativeCompletion', '累计完工井次', (row: any) => row.cumulativeCompletion);
|
|
calculateColumnMinWidth('cumulativeCompletion', '累计完工井次', (row: any) => row.cumulativeCompletion);
|
|
calculateColumnMinWidth('capacity', '产能(万方)', (row: any) => row.capacity);
|
|
calculateColumnMinWidth('capacity', '产能(万方)', (row: any) => row.capacity);
|
|
calculateColumnMinWidth('createTime', '创建时间', (row: any) => dateFormatter(null, null, row.createTime));
|
|
calculateColumnMinWidth('createTime', '创建时间', (row: any) => dateFormatter(null, null, row.createTime));
|
|
|
|
|
|
|
|
+ // 生产动态 列使用固定宽度,不参与自动计算
|
|
|
|
+ minWidths.productionStatus = 200; // 固定宽度200px
|
|
|
|
+ totalMinWidth += 200;
|
|
|
|
+
|
|
// 操作列固定宽度
|
|
// 操作列固定宽度
|
|
minWidths.operation = 120;
|
|
minWidths.operation = 120;
|
|
totalMinWidth += 120;
|
|
totalMinWidth += 120;
|
|
@@ -579,4 +623,46 @@ watch(list, () => {
|
|
overflow: visible !important;
|
|
overflow: visible !important;
|
|
text-overflow: clip !important;
|
|
text-overflow: clip !important;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/* 颜色说明区域样式 */
|
|
|
|
+.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>
|
|
|
|
+/* 设计井身结构 tooltip 样式 - 保留换行符 */
|
|
|
|
+.design-well-struct-tooltip {
|
|
|
|
+ white-space: pre-line;
|
|
|
|
+ max-width: 500px;
|
|
|
|
+ line-height: 1.5;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|