|
@@ -40,8 +40,8 @@ const dragEnter = (e) => {
|
|
|
newItems.splice(state.dragIndex, 0, ...group);
|
|
|
//如果起始为块则需要减两列
|
|
|
//如果放下为块则要加两列
|
|
|
- if (!groupList.includes(dragKey)&&!groupList.includes(moveKey)){
|
|
|
- index = state.dragIndex+ 1;
|
|
|
+ if (!groupList.includes(dragKey) && !groupList.includes(moveKey)) {
|
|
|
+ index = state.dragIndex + 1;
|
|
|
}
|
|
|
if (groupList.includes(dragKey)) {
|
|
|
index = index - 2;
|
|
@@ -64,11 +64,11 @@ const dragEnter = (e) => {
|
|
|
filterColumns.value = newItems;
|
|
|
}
|
|
|
filterColumns.value = newItems;
|
|
|
- localStorage.setItem("userColumns",JSON.stringify(filterColumns.value));
|
|
|
+ localStorage.setItem("userColumns", JSON.stringify(filterColumns.value));
|
|
|
state.dragIndex = index;
|
|
|
}
|
|
|
};
|
|
|
-const onHeaderCell= () => {
|
|
|
+const onHeaderCell = () => {
|
|
|
return {
|
|
|
draggable: true,
|
|
|
onDragstart: dragStart,
|
|
@@ -80,8 +80,8 @@ const oilHeader = () => {
|
|
|
style: {'border-top': '2px solid red'},
|
|
|
}
|
|
|
}
|
|
|
-const oilDragHeader:GetComponentProps<any> = () => {
|
|
|
- return {...oilHeader(),...onHeaderCell()}
|
|
|
+const oilDragHeader: GetComponentProps<any> = () => {
|
|
|
+ return {...oilHeader(), ...onHeaderCell()}
|
|
|
}
|
|
|
|
|
|
const gasHeader = () => {
|
|
@@ -89,16 +89,16 @@ const gasHeader = () => {
|
|
|
style: {'border-top': '2px solid #009900'},
|
|
|
}
|
|
|
}
|
|
|
-const gasDragHeader:GetComponentProps<any> = () => {
|
|
|
- return {...gasHeader(),...onHeaderCell()}
|
|
|
+const gasDragHeader: GetComponentProps<any> = () => {
|
|
|
+ return {...gasHeader(), ...onHeaderCell()}
|
|
|
}
|
|
|
const waterHeader = () => {
|
|
|
return {
|
|
|
style: {'border-top': '2px solid #4472C4'},
|
|
|
}
|
|
|
}
|
|
|
-const waterDragHeader:GetComponentProps<any> = () => {
|
|
|
- return {...waterHeader(),...onHeaderCell()}
|
|
|
+const waterDragHeader: GetComponentProps<any> = () => {
|
|
|
+ return {...waterHeader(), ...onHeaderCell()}
|
|
|
}
|
|
|
export const getTdColor = (water_cut) => {
|
|
|
if (water_cut == null || water_cut <= 2) {
|
|
@@ -121,7 +121,7 @@ export const formState = reactive({
|
|
|
well_common_name: '',
|
|
|
well_id: '',
|
|
|
well_type: '',
|
|
|
- well_purpose:'',
|
|
|
+ well_purpose: '',
|
|
|
spud_date_begin: '',
|
|
|
spud_date_end: '',
|
|
|
completion_date_begin: '',
|
|
@@ -132,8 +132,8 @@ export const formState = reactive({
|
|
|
oil_prod_recent_date_end: '',
|
|
|
org_id_a1: '',
|
|
|
project_id: '',
|
|
|
- orgList:[],
|
|
|
- unitList:[],
|
|
|
+ orgList: [] as any[],
|
|
|
+ unitList: [] as any[],
|
|
|
});
|
|
|
export const columns: TableColumnsType = [
|
|
|
{
|
|
@@ -149,17 +149,34 @@ export const columns: TableColumnsType = [
|
|
|
dataIndex: 'well_common_name',
|
|
|
key: 'well_common_name',
|
|
|
width: 120,
|
|
|
+ resizable: true,
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
- {title: '组织机构', dataIndex: 'org_name_a1', key: 'org_name_a1', width: 150,ellipsis:true, customHeaderCell: onHeaderCell},
|
|
|
- {title: '地质单元', dataIndex: 'project_name', key: 'project_name', width: 120,ellipsis:true, customHeaderCell: onHeaderCell},
|
|
|
- {title: '井别', dataIndex: 'well_purpose', key: 'well_purpose', width: 100, customHeaderCell: onHeaderCell},
|
|
|
- {title: '井型', dataIndex: 'well_type', key: 'well_type', width: 80, customHeaderCell: onHeaderCell},
|
|
|
+ {
|
|
|
+ title: '组织机构',
|
|
|
+ dataIndex: 'org_name_a1',
|
|
|
+ key: 'org_name_a1',
|
|
|
+ width: 150,
|
|
|
+ ellipsis: true,
|
|
|
+ resizable: true,
|
|
|
+ customHeaderCell: onHeaderCell
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '地质单元',
|
|
|
+ dataIndex: 'project_name',
|
|
|
+ key: 'project_name',
|
|
|
+ width: 120,
|
|
|
+ ellipsis: true,
|
|
|
+ resizable: true,
|
|
|
+ customHeaderCell: onHeaderCell
|
|
|
+ },
|
|
|
+ {title: '井别', dataIndex: 'well_purpose', key: 'well_purpose', width: 100,resizable: true, customHeaderCell: onHeaderCell},
|
|
|
+ {title: '井型', dataIndex: 'well_type', key: 'well_type', width: 80,resizable: true, customHeaderCell: onHeaderCell},
|
|
|
{
|
|
|
title: '开钻日期',
|
|
|
dataIndex: 'spud_date',
|
|
|
key: 'spud_date',
|
|
|
- width: 120,
|
|
|
+ width: 120,resizable: true,
|
|
|
customHeaderCell: onHeaderCell,
|
|
|
customRender: ({record}) =>
|
|
|
record.spud_date == null ? "" : (dayjs(record.spud_date).format('YYYY-MM-DD'))
|
|
@@ -168,7 +185,7 @@ export const columns: TableColumnsType = [
|
|
|
title: '完钻日期',
|
|
|
dataIndex: 'end_drilling_date',
|
|
|
key: 'end_drilling_date',
|
|
|
- width: 120,
|
|
|
+ width: 120,resizable: true,
|
|
|
customHeaderCell: onHeaderCell,
|
|
|
customRender: ({record}) =>
|
|
|
record.end_drilling_date == null ? "" : (dayjs(record.end_drilling_date).format('YYYY-MM-DD'))
|
|
@@ -177,43 +194,45 @@ export const columns: TableColumnsType = [
|
|
|
title: '完井日期',
|
|
|
dataIndex: 'completion_date',
|
|
|
key: 'completion_date',
|
|
|
- width: 120,
|
|
|
+ width: 120,resizable: true,
|
|
|
customHeaderCell: onHeaderCell,
|
|
|
customRender: ({record}) =>
|
|
|
- record.end_drilling_date == null ? "" : (dayjs(record.completion_date).format('YYYY-MM-DD'))
|
|
|
+ record.completion_date == null ? "" : (dayjs(record.completion_date).format('YYYY-MM-DD'))
|
|
|
},
|
|
|
{
|
|
|
title: '投产日期',
|
|
|
- dataIndex: 'oil_prod_begin_date',
|
|
|
+ dataIndex: 'oil_prod_begin_date',resizable: true,
|
|
|
key: 'oil_prod_begin_date', width: 120, customHeaderCell: onHeaderCell,
|
|
|
customRender: ({record}) =>
|
|
|
record.oil_prod_begin_date == null ? "" : (dayjs(record.oil_prod_begin_date).format('YYYY-MM-DD'))
|
|
|
},
|
|
|
- {title: '状态', dataIndex: 'well_state', key: 'well_state', width: 120, customHeaderCell: onHeaderCell},
|
|
|
- {title: '设计井深(m)', dataIndex: 'budgeted_md', key: 'tempNo', width: 120, customHeaderCell: onHeaderCell},
|
|
|
+ {title: '状态', dataIndex: 'well_state', key: 'well_state',resizable: true, width: 120, customHeaderCell: onHeaderCell},
|
|
|
+ {title: '设计井深(m)', dataIndex: 'budgeted_md', key: 'tempNo', width: 120, resizable: true,customHeaderCell: onHeaderCell},
|
|
|
{
|
|
|
title: '含水率',
|
|
|
dataIndex: 'water_cut',
|
|
|
key: 'water_cut',
|
|
|
width: 60,
|
|
|
- align: 'center',
|
|
|
+ align: 'center',resizable: true,
|
|
|
customHeaderCell: onHeaderCell,
|
|
|
customCell: (record) => {
|
|
|
return {class: getTdColor(record.water_cut)};
|
|
|
- }
|
|
|
+ },
|
|
|
+ customRender: ({record}) =>
|
|
|
+ record.water_cut == null ? "" : record.water_cut + "%"
|
|
|
},
|
|
|
{
|
|
|
title: '最近月产油量(t)',
|
|
|
dataIndex: 'oil_prod_mon',
|
|
|
key: 'oil_prod_mon',
|
|
|
- width: 120,
|
|
|
+ width: 120,resizable: true,
|
|
|
customHeaderCell: oilDragHeader
|
|
|
},
|
|
|
{
|
|
|
title: '累产油量(10kt)',
|
|
|
dataIndex: 'oil_prod_year',
|
|
|
key: 'oil_prod_year',
|
|
|
- width: 120,
|
|
|
+ width: 120,resizable: true,
|
|
|
customHeaderCell: oilHeader
|
|
|
},
|
|
|
{title: '累产油量趋势', dataIndex: 'oil', key: 'oil', width: 100, customHeaderCell: oilHeader},
|
|
@@ -221,14 +240,14 @@ export const columns: TableColumnsType = [
|
|
|
title: '最近月产气量(10^4m³)',
|
|
|
dataIndex: 'gas_prod_mon',
|
|
|
key: 'gas_prod_mon',
|
|
|
- width: 170,
|
|
|
+ width: 170,resizable: true,
|
|
|
customHeaderCell: gasDragHeader
|
|
|
},
|
|
|
{
|
|
|
title: '累产气量(10^8m³)',
|
|
|
dataIndex: 'gas_prod_year',
|
|
|
key: 'gas_prod_year',
|
|
|
- width: 150,
|
|
|
+ width: 150,resizable: true,
|
|
|
customHeaderCell: gasHeader
|
|
|
},
|
|
|
{title: '累产气量趋势', dataIndex: 'gas', key: 'gas', width: 100, customHeaderCell: gasHeader},
|
|
@@ -236,14 +255,14 @@ export const columns: TableColumnsType = [
|
|
|
title: '最近注水量(t)',
|
|
|
dataIndex: 'water_prod_mon',
|
|
|
key: 'water_prod_mon',
|
|
|
- width: 110,
|
|
|
- customHeaderCell:waterDragHeader
|
|
|
+ width: 110,resizable: true,
|
|
|
+ customHeaderCell: waterDragHeader
|
|
|
},
|
|
|
{
|
|
|
title: '累注水量(10kt)',
|
|
|
dataIndex: 'water_prod_year',
|
|
|
key: 'water_prod_year',
|
|
|
- width: 150,
|
|
|
+ width: 150,resizable: true,
|
|
|
customHeaderCell: waterHeader
|
|
|
},
|
|
|
{title: '累注水量趋势', dataIndex: 'water', key: 'water', width: 100, customHeaderCell: waterHeader},
|