فهرست منبع

Merge remote-tracking branch 'origin/master'

周壕 9 ماه پیش
والد
کامیت
eea923f283

+ 2 - 2
src/main/java/com/bowintek/practice/controller/WellInfoController.java

@@ -160,8 +160,8 @@ public class WellInfoController {
     }
 
     @PostMapping("/getOrgProjectList")
-    public BaseResponse getOrgProjectList(List<String> orgList,List<String> unitList) {
-        return RespGenerstor.success(wellInfoService.selectOrgProjectList(orgList, unitList));
+    public BaseResponse getOrgProjectList(@RequestBody WellInfoParams params) {
+        return RespGenerstor.success(wellInfoService.selectOrgProjectList(params.getOrgList(), params.getUnitList()));
     }
 
     @GetMapping("/downFile")

+ 7 - 4
src/main/java/com/bowintek/practice/services/impl/WellInfoServiceImpl.java

@@ -161,13 +161,17 @@ public class WellInfoServiceImpl implements WellInfoService {
     }
 
     private void fillChildren(int level, int maxLevel, HashMap<String, Object> parent, List<HashMap<String, Object>> unitList) {
+        this.fillChildren(level, maxLevel, parent, unitList,"project_id_");
+    }
+
+    private void fillChildren(int level, int maxLevel, HashMap<String, Object> parent, List<HashMap<String, Object>> unitList,String key){
         Map<Object, List<HashMap<String, Object>>> groupedMap = unitList.stream()
                 .collect(Collectors.groupingBy(s -> s.get("project_id_" + level)));
         List<HashMap<String, Object>> children = new ArrayList<>();
         parent.put("children", children);
         groupedMap.values().forEach(gm -> {
             HashMap<String, Object> child = new HashMap<>();
-            child.put("value", gm.get(0).get("project_id_" + level));
+            child.put("value", gm.get(0).get(key + level));
             child.put("label", gm.get(0).get("project_name_" + level));
             children.add(child);
             if (level + 1 <= maxLevel && gm.get(0).keySet().contains("project_id_" + (level + 1))) {
@@ -175,7 +179,6 @@ public class WellInfoServiceImpl implements WellInfoService {
             }
         });
     }
-
     @Override
     @SwitchDataSource(DBTypeEnum.POSTGRE)
     public List<HashMap<String, Object>> getConstructUnitTree() {
@@ -211,7 +214,7 @@ public class WellInfoServiceImpl implements WellInfoService {
             child.put("label", gm.get(0).get("project_name_1"));
             wellPurposeTree.add(child);
             if (gm.get(0).keySet().contains("project_id_2")) {
-                this.fillChildren(2, 4, child, gm);
+                this.fillChildren(2, 4, child, gm,"project_name_");
             }
         });
         return wellPurposeTree;
@@ -230,7 +233,7 @@ public class WellInfoServiceImpl implements WellInfoService {
             child.put("label", gm.get(0).get("project_name_1"));
             wellTypeTree.add(child);
             if (gm.get(0).keySet().contains("project_id_2")) {
-                this.fillChildren(2, 4, child, gm);
+                this.fillChildren(2, 4, child, gm,"project_name_");
             }
         });
         return wellTypeTree;

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

@@ -114,7 +114,7 @@
                     COALESCE(wm.gas_prod_year, 0) gas_prod_year,
                     COALESCE(wm.oil_prod_year, 0)/10000 oil_prod_year,
                     COALESCE(wm.water_prod_year, 0)/10000 water_prod_year,
-                    COALESCE(wm.liquid_prod_year, 0)/10000 fluid_prod_year,
+                    COALESCE(wm.fluid_prod_year, 0)/10000 fluid_prod_year,
                     COALESCE(wm.water_cut_ratio_y, 0) water_cut_ratio_y,
                     COALESCE(wm.inj_vol_year, 0)/10000 inj_vol_year
                 FROM by_dwr.fact_dwr_pc_pro_well_vol_m wm

+ 2 - 2
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -373,9 +373,9 @@
     <select id="selectOrgProjectList" resultType="java.util.HashMap">
         select *from by_dim.dim_org_project dop where 1=1
 
-        <if test="projectList!=null and projectList.size>0">
+        <if test="unitList!=null and unitList.size>0">
             and dop.project_id in
-            <foreach collection="projectList" item="id" index="index" open="(" close=")" separator=",">
+            <foreach collection="unitList" item="id" index="index" open="(" close=")" separator=",">
                 #{id}
             </foreach>
         </if>

+ 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}
+])

+ 14 - 11
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=='')
@@ -229,7 +229,7 @@
                             :style="cardSettings.buttonStyle"/>
       </template>
       <div v-if="cardSettings.cardTest.expand">
-        <p class="info-body">本井共实施
+        <p v-if="testHistoryList.length>0" class="info-body">本井共实施
           <template v-for="it in testHistorySummary">
             <span>{{ it.testing_num }}</span>次{{ it.testing_name }},
           </template>
@@ -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>
@@ -283,18 +283,18 @@
                             :style="cardSettings.buttonStyle"/>
       </template>
       <div v-if="cardSettings.cardWork.expand">
-        <p class="info-body">
+        <p class="info-body" v-if="historyAssignmentList.length>0">
           井实施井下作业施工<span>{{ historyAssignmentCount }}</span>次,其中:
           <template v-for="it in historyAssignmentSummary">
             {{ it.test_processes_name }}<span>{{ it.testing_num }}</span>次、
           </template>
-          <span>{{ lastHistoryAssignment.start_time }}{{ lastHistoryAssignment.test_processes_name }}</span>
+          <span v-if="lastHistoryAssignment.test_processes_name">{{ lastHistoryAssignment.start_time }}{{ lastHistoryAssignment.test_processes_name }}</span>
           <span>{{
               lastHistoryAssignment.test_processes_name
-            }}</span>井段<span>{{ lastHistoryAssignment.well_production_sections }}</span></p>
+            }}</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() {

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

@@ -100,8 +100,10 @@
                   allow-clear
                   multiple
                   tree-line
-                  :tree-data="subjectTrees.organizationTree"
-                  tree-node-filter-prop="label">
+                  :tree-data="filterOrgTree(subjectTrees.organizationTree)"
+                  tree-node-filter-prop="label"
+                  @change="onOrgTreeChange"
+                >
                 </a-tree-select>
               </a-form-item>
             </a-col>
@@ -116,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>
@@ -391,12 +393,12 @@ export default defineComponent({
       businessType: [] as any[],
       selectBusinessType: [] as any[]
     })
-    const wellPurposeTree =ref([]);
+    const wellPurposeTree = ref([]);
     get('wellInfo/getWellPurposeTree', {}).then(data => {
       wellPurposeTree.value = data;
     });
 
-    const wellTypeTree =ref([]);
+    const wellTypeTree = ref([]);
     get('wellInfo/getWellTypeTree', {}).then(data => {
       wellTypeTree.value = data;
     });
@@ -452,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) {
@@ -471,7 +473,7 @@ export default defineComponent({
       }
     }
 
-    function setSettingColoumns() {
+    function setSettingColumns() {
       localStorage.setItem("userShowColumnsType", JSON.stringify(showColumnType.value));
       localStorage.setItem("userColumns", JSON.stringify(filterColumns.value));
     }
@@ -645,8 +647,75 @@ export default defineComponent({
         loadData();
       }
     }
-    function filterUnitTree(treeData){
-      return treeData;
+    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 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: 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 => {
@@ -662,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,
+      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();
   }
   ,