Bläddra i källkod

井筒-优化

xiaoqiao 9 månader sedan
förälder
incheckning
2256e76521

+ 1 - 1
src/main/resources/mapping/cquery/FactWellCQuery.xml

@@ -60,7 +60,7 @@
                     COALESCE(wm.gas_prod_cum, 0)/100000000 gas_prod_mon,
                     COALESCE(wm.oil_prod_cum, 0)/10000 oil_prod_mon,
                     COALESCE(wm.water_prod_cum, 0)/10000 water_prod_mon,
-                    COALESCE(wm.fluid_prod_mon, 0)/10000 fluid_prod_mon,
+                    COALESCE(wm.liquid_prod_cum, 0)/10000 fluid_prod_mon,
                     COALESCE(wm.water_cut, 0) water_cut,
                     COALESCE(wm.inj_vol_cum, 0)/10000 inj_vol_cum
                 FROM by_dwr.fact_dwr_pc_pro_well_vol_d wm

+ 76 - 74
vue/src/views/wellinfo/columns.ts

@@ -1,84 +1,86 @@
-export const boreholeInterColumns = [
-  {title: '层号(序号)', dataIndex: 'zone_no', key: 'zone_no', width: 120},
-  {title: '裸眼井解释成果类型', dataIndex: 'borehole_inter_type_name', key: 'borehole_inter_type_name', width: 120},
-  {title: '起始深度', dataIndex: 'start_depth', key: 'start_depth', width: 120},
-  {title: '终止深度', dataIndex: 'end_depth', key: 'end_depth', width: 120},
-  {title: '厚度', dataIndex: 'thickness', key: 'thickness', width: 120},
-  {title: '岩性类型', dataIndex: 'lithology_class', key: 'lithology_class', width: 120},
-  {title: '自然电位', dataIndex: 'spontaneous_potential', key: 'spontaneous_potential', width: 120},
-  {title: '自然伽马', dataIndex: 'sp_gamma_radiant_intensity', key: 'sp_gamma_radiant_intensity', width: 120},
-  {title: '井径', dataIndex: 'well_diameter', key: 'well_diameter', width: 120},
-  {title: '体积密度', dataIndex: 'formation_volume_density', key: 'formation_volume_density', width: 120},
-  {title: '声波时差', dataIndex: 'sonic_differential_time', key: 'sonic_differential_time', width: 120},
-  {title: '中子', dataIndex: 'compensated_neutron', key: 'compensated_neutron', width: 120},
-  {title: '浅电阻率', dataIndex: 'laterolog_shallow', key: 'laterolog_shallow', width: 120},
-  {title: '深电阻率', dataIndex: 'laterolog_deep', key: 'laterolog_deep', width: 120},
-  {title: '冲洗带电阻率', dataIndex: 'laterolog_flushed_zone', key: 'laterolog_flushed_zone', width: 120},
-  {title: '密度孔隙度', dataIndex: 'density_porosity', key: 'density_porosity', width: 120},
-  {title: '声波孔隙度', dataIndex: 'sonic_porosity', key: 'sonic_porosity', width: 120},
-  {title: '中子孔隙度', dataIndex: 'neutron_porosity', key: 'neutron_porosity', width: 120},
-  {title: '有效孔隙度', dataIndex: 'effective_porosity', key: 'effective_porosity', width: 120},
-  {title: '总孔隙度', dataIndex: 'total_porosity', key: 'total_porosity', width: 120},
-  {title: '渗透率', dataIndex: 'permeability', key: 'permeability', width: 120},
-  {title: '含油气饱和度', dataIndex: 'oil_gas_saturation', key: 'oil_gas_saturation', width: 120},
-  {title: '束缚水饱和度', dataIndex: 'irreducible_water_saturation', key: 'irreducible_water_saturation', width: 120},
-  {title: '泥质含量', dataIndex: 'shale_content', key: 'shale_content', width: 120},
-  {title: '砂质含量', dataIndex: 'sandy_content', key: 'sandy_content', width: 120},
-  {title: '灰质含量', dataIndex: 'lime_content', key: 'lime_content', width: 120},
-  {title: '白云质含量', dataIndex: 'dolomitic_content', key: 'dolomitic_content', width: 120},
-  {title: '碳酸盐岩含量', dataIndex: 'carbonate_content', key: 'carbonate_content', width: 120},
-  {title: '指标类型', dataIndex: 'idx_type', key: 'idx_type', width: 120},
-  {title: '解释结论', dataIndex: 'interpretation_result', key: 'interpretation_result', width: 120},
-  {title: '垂深顶深', dataIndex: 'start_tvd', key: 'start_tvd', width: 120},
-  {title: '垂深底深', dataIndex: 'end_tvd', key: 'end_tvd', width: 120},
-  {title: '垂深层厚 ', dataIndex: 'tvd_thickness', key: 'tvd_thickness', width: 120},
-  {title: '备注', dataIndex: 'remarks', key: 'remarks', width: 120},
+import {ref} from 'vue';
+
+export const boreholeInterColumns = ref([
+  {title: '层号(序号)', dataIndex: 'zone_no', key: 'zone_no', resizable: true, width: 120},
+  {title: '裸眼井解释成果类型', dataIndex: 'borehole_inter_type_name', key: 'borehole_inter_type_name', resizable: true, width: 120},
+  {title: '起始深度', dataIndex: 'start_depth', key: 'start_depth', resizable: true, width: 120},
+  {title: '终止深度', dataIndex: 'end_depth', key: 'end_depth', resizable: true, width: 120},
+  {title: '厚度', dataIndex: 'thickness', key: 'thickness', resizable: true, width: 120},
+  {title: '岩性类型', dataIndex: 'lithology_class', key: 'lithology_class', resizable: true, width: 120},
+  {title: '自然电位', dataIndex: 'spontaneous_potential', key: 'spontaneous_potential', resizable: true, width: 120},
+  {title: '自然伽马', dataIndex: 'sp_gamma_radiant_intensity', key: 'sp_gamma_radiant_intensity', resizable: true, width: 120},
+  {title: '井径', dataIndex: 'well_diameter', key: 'well_diameter', resizable: true, width: 120},
+  {title: '体积密度', dataIndex: 'formation_volume_density', key: 'formation_volume_density', resizable: true, width: 120},
+  {title: '声波时差', dataIndex: 'sonic_differential_time', key: 'sonic_differential_time', resizable: true, width: 120},
+  {title: '中子', dataIndex: 'compensated_neutron', key: 'compensated_neutron', resizable: true, width: 120},
+  {title: '浅电阻率', dataIndex: 'laterolog_shallow', key: 'laterolog_shallow', resizable: true, width: 120},
+  {title: '深电阻率', dataIndex: 'laterolog_deep', key: 'laterolog_deep', resizable: true, width: 120},
+  {title: '冲洗带电阻率', dataIndex: 'laterolog_flushed_zone', key: 'laterolog_flushed_zone', resizable: true, width: 120},
+  {title: '密度孔隙度', dataIndex: 'density_porosity', key: 'density_porosity', resizable: true, width: 120},
+  {title: '声波孔隙度', dataIndex: 'sonic_porosity', key: 'sonic_porosity', resizable: true, width: 120},
+  {title: '中子孔隙度', dataIndex: 'neutron_porosity', key: 'neutron_porosity', resizable: true, width: 120},
+  {title: '有效孔隙度', dataIndex: 'effective_porosity', key: 'effective_porosity', resizable: true, width: 120},
+  {title: '总孔隙度', dataIndex: 'total_porosity', key: 'total_porosity', resizable: true, width: 120},
+  {title: '渗透率', dataIndex: 'permeability', key: 'permeability', resizable: true, width: 120},
+  {title: '含油气饱和度', dataIndex: 'oil_gas_saturation', key: 'oil_gas_saturation', resizable: true, width: 120},
+  {title: '束缚水饱和度', dataIndex: 'irreducible_water_saturation', key: 'irreducible_water_saturation', resizable: true, width: 120},
+  {title: '泥质含量', dataIndex: 'shale_content', key: 'shale_content', resizable: true, width: 120},
+  {title: '砂质含量', dataIndex: 'sandy_content', key: 'sandy_content', resizable: true, width: 120},
+  {title: '灰质含量', dataIndex: 'lime_content', key: 'lime_content', resizable: true, width: 120},
+  {title: '白云质含量', dataIndex: 'dolomitic_content', key: 'dolomitic_content', resizable: true, width: 120},
+  {title: '碳酸盐岩含量', dataIndex: 'carbonate_content', key: 'carbonate_content', resizable: true, width: 120},
+  {title: '指标类型', dataIndex: 'idx_type', key: 'idx_type', resizable: true, width: 120},
+  {title: '解释结论', dataIndex: 'interpretation_result', key: 'interpretation_result', resizable: true, width: 120},
+  {title: '垂深顶深', dataIndex: 'start_tvd', key: 'start_tvd', resizable: true, width: 120},
+  {title: '垂深底深', dataIndex: 'end_tvd', key: 'end_tvd', resizable: true, width: 120},
+  {title: '垂深层厚 ', dataIndex: 'tvd_thickness', key: 'tvd_thickness', resizable: true, width: 120},
+  {title: '备注', dataIndex: 'remarks', key: 'remarks', resizable: true, width: 120},
   {
-    title: '创建/更新日期', dataIndex: 'update_date', key: 'update_date', width: 120, customRender: ({record}) => {
+    title: '创建/更新日期', dataIndex: 'update_date', key: 'update_date', resizable: true, width: 120, customRender: ({record}) => {
       return record.update_date == null ? record.create_date : record.update_date;
     }
   }
-];
-export const testHistoryColumns = [
-  {title: '测试日期', dataIndex: 'testing_date', key: 'testing_date', width: 120},
-  {title: '测试名称', dataIndex: 'testing_name', key: 'testing_name', width: 120},
-  {title: '测试单位', dataIndex: 'anal_coy', key: 'anal_coy', width: 120},
-  {title: '内容描述', dataIndex: 'construction_description', key: 'construction_description', width: 120}
-]
+]);
+export const testHistoryColumns = ref([
+  {title: '测试日期', dataIndex: 'testing_date', key: 'testing_date', resizable: true, width: 120},
+  {title: '测试名称', dataIndex: 'testing_name', key: 'testing_name', resizable: true},
+  {title: '测试单位', dataIndex: 'anal_coy', key: 'anal_coy', resizable: true},
+  {title: '内容描述', dataIndex: 'construction_description', key: 'construction_description', resizable: true}
+])
 
-export const analyticalAssaysColumns = [
+export const analyticalAssaysColumns = ref([
   {
-    title: '分析类型', dataIndex: 'item_code', key: 'item_code', width: 220,
+    title: '分析类型', dataIndex: 'item_code', key: 'item_code', resizable: true, width: 220,
     customCell: (row) => {
       return {rowSpan: row.rowSpan};
     },
   },
-  {title: '分析指标', dataIndex: 'item_name', key: 'item_name'},
-  {title: '指标单位', dataIndex: 'meter_unit', key: 'meter_unit'},
-  {title: '指标值', dataIndex: 'idx_value', key: 'idx_value'},
-  {title: '描述', dataIndex: 'description', key: 'description'}
-]
-export const historyAssignmentColumns = [
-  {title: '开始时间', dataIndex: 'start_time', key: 'start_time', width: 120},
-  {title: '结束时间', dataIndex: 'end_time', key: 'end_time', width: 120},
-  {title: '施工简述', dataIndex: 'constr_description', key: 'constr_description', width: 120},
-  {title: '备注', dataIndex: 'remarks', key: 'remarks', width: 120},
-  {title: '生产井段', dataIndex: 'well_production_sections', key: 'well_production_sections', width: 120},
-  {title: '层位', dataIndex: 'formation_name', key: 'formation_name', width: 120},
-  {title: '井段顶深', dataIndex: 'top_md', key: 'top_md', width: 120},
-  {title: '井段底深', dataIndex: 'btm_md', key: 'btm_md', width: 120},
-  {title: '厚度', dataIndex: 'thickness', key: 'thickness', width: 120},
-  {title: '层序号', dataIndex: 'layer_no', key: 'layer_no', width: 120},
-  {title: '作业类型', dataIndex: 'working_type', key: 'working_type', width: 120},
-  {title: '作业工序名称', dataIndex: 'test_processes_name', key: 'test_processes_name', width: 120},
-  {title: '作业工作内容', dataIndex: 'worksummary', key: 'worksummary', width: 120},
-  {title: '施工次序', dataIndex: 'construct_no', key: 'construct_no', width: 120},
-  {title: '作业队伍', dataIndex: 'work_team', key: 'work_team', width: 120},
-  {title: '泵深', dataIndex: 'pump_depth', key: 'pump_depth', width: 120},
-]
-export const dataIndexColumns = [
-  {title: '日期', dataIndex: 'date', key: 'date', width: 120},
-  {title: '文档名', dataIndex: 'file_name', key: 'file_name', width: 120},
-  {title: '文档业务类型', dataIndex: 'file_business_type', key: 'file_business_type', width: 120},
-  {title: '存储类型', dataIndex: 'storage_type', key: 'storage_type', width: 120}
-]
+  {title: '分析指标', dataIndex: 'item_name', key: 'item_name', resizable: true},
+  {title: '指标单位', dataIndex: 'meter_unit', key: 'meter_unit', resizable: true},
+  {title: '指标值', dataIndex: 'idx_value', key: 'idx_value', resizable: true},
+  {title: '描述', dataIndex: 'description', key: 'description', resizable: true}
+])
+export const historyAssignmentColumns =ref( [
+  {title: '开始时间', dataIndex: 'start_time', key: 'start_time', resizable: true, width: 120},
+  {title: '结束时间', dataIndex: 'end_time', key: 'end_time', resizable: true, width: 120},
+  {title: '施工简述', dataIndex: 'constr_description', key: 'constr_description', resizable: true, width: 120},
+  {title: '备注', dataIndex: 'remarks', key: 'remarks', resizable: true, width: 120},
+  {title: '生产井段', dataIndex: 'well_production_sections', key: 'well_production_sections', resizable: true, width: 120},
+  {title: '层位', dataIndex: 'formation_name', key: 'formation_name', resizable: true, width: 120},
+  {title: '井段顶深', dataIndex: 'top_md', key: 'top_md', resizable: true, width: 120},
+  {title: '井段底深', dataIndex: 'btm_md', key: 'btm_md', resizable: true, width: 120},
+  {title: '厚度', dataIndex: 'thickness', key: 'thickness', resizable: true, width: 120},
+  {title: '层序号', dataIndex: 'layer_no', key: 'layer_no', resizable: true, width: 120},
+  {title: '作业类型', dataIndex: 'working_type', key: 'working_type', resizable: true, width: 120},
+  {title: '作业工序名称', dataIndex: 'test_processes_name', key: 'test_processes_name', resizable: true, width: 120},
+  {title: '作业工作内容', dataIndex: 'worksummary', key: 'worksummary', resizable: true, width: 120},
+  {title: '施工次序', dataIndex: 'construct_no', key: 'construct_no', resizable: true, width: 120},
+  {title: '作业队伍', dataIndex: 'work_team', key: 'work_team', resizable: true, width: 120},
+  {title: '泵深', dataIndex: 'pump_depth', key: 'pump_depth', resizable: true, width: 120},
+])
+export const dataIndexColumns = ref([
+  {title: '日期', dataIndex: 'date', key: 'date', resizable: true, width: 120},
+  {title: '文档名', dataIndex: 'file_name', key: 'file_name', resizable: true, width: 120},
+  {title: '文档业务类型', dataIndex: 'file_business_type', key: 'file_business_type', resizable: true, width: 120},
+  {title: '存储类型', dataIndex: 'storage_type', key: 'storage_type', resizable: true, width: 120}
+])

+ 10 - 7
vue/src/views/wellinfo/detail.vue

@@ -191,7 +191,7 @@
                 </a-checkable-tag>
               </template>
             </div>
-            <div style="max-height:990px;overflow-y:scroll;">
+            <div style="max-height:990px;overflow-y:scroll;padding:0px 10px;">
               <a-list item-layout="horizontal" :data-source="dataIndexList">
                 <template #renderItem="{ item }">
                   <a-list-item v-if="(item.file_name.indexOf(fileOptions.docKey)>-1||fileOptions.docKey=='')
@@ -239,7 +239,7 @@
         <br/>
         <a-table :columns="testHistoryColumns" :data-source="testHistoryList" :scroll="{ x:'100%', y: 500 }"
                  :pagination="testHistoryPage"
-                 @change="handleTestHistoryChange"
+                 @change="handleTestHistoryChange"  @resizeColumn="handleResizeColumn"
                  bordered>
         </a-table>
       </div>
@@ -265,7 +265,7 @@
         <br>
         <a-table :columns="analyticalAssaysColumns" :data-source="analyticalAssaysList" :scroll="{ x:'100%', y: 500 }"
                  :pagination="analyticalAssaysPage"
-                 @change="handleAnalyticalAssaysChange"
+                 @change="handleAnalyticalAssaysChange"  @resizeColumn="handleResizeColumn"
                  bordered>
         </a-table>
       </div>
@@ -294,7 +294,7 @@
             }}</span><span v-if="lastHistoryAssignment.well_production_sections">井段{{ lastHistoryAssignment.well_production_sections }}</span></p>
         <br/>
         <a-table :columns="historyAssignmentColumns" :data-source="historyAssignmentList" :scroll="{ x:'100%', y: 500 }"
-                 :pagination="false"
+                 :pagination="false"  @resizeColumn="handleResizeColumn"
                  bordered>
         </a-table>
       </div>
@@ -312,8 +312,8 @@
                             :style="cardSettings.buttonStyle"/>
       </template>
       <div v-if="cardSettings.cardExplain.expand">
-        <a-table :columns="boreholeInterColumns" :data-source="boreholeInterList" :scroll="{ x:'100%', y: 500 }"
-                 :pagination="false"
+        <a-table :columns="boreholeInterColumns" :data-source="boreholeInterList" :scroll="{ x:'1500', y: 500 }"
+                 :pagination="false"  @resizeColumn="handleResizeColumn"
                  bordered>
         </a-table>
       </div>
@@ -538,7 +538,10 @@ export default defineComponent({
       ...toRefs(wellData),
       loadData, cardSettings,
       onClose, ...columns,analyticalAssaysPage,handleAnalyticalAssaysChange,
-      dayjs, wellId, fileOptions, downFile, onBusTypeChange, handleTestHistoryChange, testHistoryPage
+      dayjs, wellId, fileOptions, downFile, onBusTypeChange, handleTestHistoryChange, testHistoryPage,
+      handleResizeColumn: (w, col) => {
+        col.width = w;
+      }
     };
   },
   created() {

+ 72 - 14
vue/src/views/wellinfo/index.vue

@@ -100,7 +100,7 @@
                   allow-clear
                   multiple
                   tree-line
-                  :tree-data="subjectTrees.organizationTree"
+                  :tree-data="filterOrgTree(subjectTrees.organizationTree)"
                   tree-node-filter-prop="label"
                   @change="onOrgTreeChange"
                 >
@@ -118,7 +118,7 @@
                   multiple
                   tree-line
                   :tree-data="filterUnitTree(subjectTrees.constructUnitTree)"
-                  tree-node-filter-prop="label">
+                  tree-node-filter-prop="label"  @change="onUnitTreeChange">
                 </a-tree-select>
               </a-form-item>
             </a-col>
@@ -454,10 +454,10 @@ export default defineComponent({
         return (indexA == -1 || indexB == -1) ? 1 : indexA - indexB;
       });
       filterColumns.value = [...sortedArray];
-      setSettingColoumns();
+      setSettingColumns();
     }
 
-    function getSettingColoumns() {
+    function getSettingColumns() {
       let userColumnsJson = localStorage.getItem('userColumns');
       let userShowColumnsType = localStorage.getItem('userShowColumnsType');
       if (userColumnsJson != undefined) {
@@ -473,7 +473,7 @@ export default defineComponent({
       }
     }
 
-    function setSettingColoumns() {
+    function setSettingColumns() {
       localStorage.setItem("userShowColumnsType", JSON.stringify(showColumnType.value));
       localStorage.setItem("userColumns", JSON.stringify(filterColumns.value));
     }
@@ -647,18 +647,76 @@ export default defineComponent({
         loadData();
       }
     }
-    const orgUnitList :any= ref([]);
+    const orgUnitList: any =ref([]);
+    const unitOrgList: any =ref([]);
+    let filterTreeData: any[] = [];
+
+    //组织机构和地质单元联动,选择组织机构只显示该组织机构的地质单元
+    function filterOrgTree(treeData: any[]) {
+      if(formState.unitList.length==0){
+        return treeData;
+      }
+      filterTreeData = [];
+      treeData.forEach(node => {
+        if (unitOrgList.value.indexOf(node.value) > -1) {
+          filterTreeData.push(node);
+          return;
+        }
+        eachOrgTreeNode(node.children);
+      })
+      return filterTreeData;
+    }
 
-    function filterUnitTree(treeData) {
-      return treeData;
+    function eachOrgTreeNode(treeData: any[]) {
+      if (treeData == undefined) {
+        return;
+      }
+      treeData.forEach(node => {
+        if (unitOrgList.value.indexOf(node.value) > -1) {
+          filterTreeData.push(node);
+          return;
+        }
+        eachOrgTreeNode(node.children);
+      })
     }
 
     function onOrgTreeChange() {
-      postData('wellInfo/getOrgProjectList', {orgList: formState.orgList}).then(data => {
-        orgUnitList.value = data;
+      postData('wellInfo/getOrgProjectList', {orgList: formState.orgList}).then((data: any[]) => {
+        orgUnitList.value = data.map(x => x.project_id);
+      })
+    }
+    function onUnitTreeChange() {
+      postData('wellInfo/getOrgProjectList', {unitList: formState.unitList}).then((data: any[]) => {
+        unitOrgList.value = data.map(x => x.org_id);
+      })
+    }
+    function filterUnitTree(treeData: any[]) {
+      if(formState.orgList.length==0){
+        return treeData;
+      }
+      filterTreeData = [];
+      treeData.forEach(node => {
+        if (orgUnitList.value.indexOf(node.value) > -1) {
+          filterTreeData.push(node);
+          return;
+        }
+        eachUnitTreeNode(node.children);
       })
+      return filterTreeData;
     }
 
+    function eachUnitTreeNode(treeData: any[]) {
+      if (treeData == undefined) {
+        return;
+      }
+      treeData.forEach(node => {
+        if (orgUnitList.value.indexOf(node.value) > -1) {
+          filterTreeData.push(node);
+          return;
+        }
+        eachUnitTreeNode(node.children);
+      })
+    }
     const showDoc = (id) => {
       get('wellInfo/getWellDocumentList', {wellId: id}).then(data => {
         docList.value = data;
@@ -673,20 +731,20 @@ export default defineComponent({
       route, selectedRowKeys, loading, activeTab, showTree, onSelectChange, data,
       expand, onQuery, loadData, onRangeChange, showQuery, wellTypeList, wellPurposeList, replaceFields,
       formRef, viewModel, handleTableChange, detail,
-      formState, isShowDoc, showDoc, docKey, docList, resetFields, showColumnType, filterColumns, filterUnitTree,
+      formState, isShowDoc, showDoc, docKey, docList, resetFields, showColumnType, filterColumns, filterUnitTree,filterOrgTree,
       labelCol, getTdColor, downFile,
       tabChange, onCheckboxChange, treeRef, colspan,
       treeOnExpand,
-      subjectTrees, fileOptions, onBusTypeChange, onOrgTreeChange,
+      subjectTrees, fileOptions, onBusTypeChange, onOrgTreeChange,onUnitTreeChange,
       getSubjectTree, searchTree,
-      treeOnSelect, pagination, getSettingColoumns, wellPurposeTree, wellTypeTree, numberToCurrencyNo,
+      treeOnSelect, pagination, getSettingColumns, wellPurposeTree, wellTypeTree, numberToCurrencyNo,
       handleResizeColumn: (w, col) => {
         col.width = w;
       }
     };
   },
   created() {
-    this.getSettingColoumns();
+    this.getSettingColumns();
     this.loadData();
   }
   ,