Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	vue/src/components/basic/chart/chart-prod-dynamics.vue
周壕 9 mesiacov pred
rodič
commit
95bd1f805e

+ 7 - 9
doc/待更新脚本

@@ -1,10 +1,8 @@
-create table wl_user_expend_setting
-(
-   expendID             varchar(50) not null,
-   userID               varchar(50) comment '用户ID',
-   well_id              varchar(50) comment '井ID',
-   setting_json         varchar(500) comment '配置信息setting_json',
-   primary key (expendID)
-);
+ INSERT INTO sys_function_code (FunctionCode, FunctionName, ParentFunctionCode, OrderNo) VALUES ('T0104', '领域检索', 'T01', 2);
 
-alter table wl_user_expend_setting comment '井筒全息信息页折叠配置';
+ INSERT INTO sys_menu (MenuNo, OrderNo, MenuName, Icon, ViewPath, Url, ParentMenuNo, Description, IsTopMenu, IsVisible, IsLeaf, FunctionCode, RecordStatus, ShortcutIcon)
+ VALUES ('T0104', 3, '领域检索', 'SearchOutlined', 'views/domain', '/domain', 'T01', null, 0, 1, 1, 'T0104', 1, null);
+ INSERT INTO sys_menu (MenuNo, OrderNo, MenuName, Icon, ViewPath, Url, ParentMenuNo, Description, IsTopMenu, IsVisible, IsLeaf, FunctionCode, RecordStatus, ShortcutIcon)
+ VALUES ('T010401', 1, '领域检索', null, 'views/domain', '/domain/index', 'T0104', null, 0, 0, 1, 'T0104', 1, null);
+ INSERT INTO sys_menu (MenuNo, OrderNo, MenuName, Icon, ViewPath, Url, ParentMenuNo, Description, IsTopMenu, IsVisible, IsLeaf, FunctionCode, RecordStatus, ShortcutIcon)
+ VALUES ('T010402', 2, '领域检索结果', null, 'views/domainResult', '/domain/result', 'T0104', null, 0, 0, 1, 'T0104', 1, null);

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

@@ -80,10 +80,8 @@ public class WellInfoController {
 
         HashMap<String, Object> wellInfo = wellInfoService.getWellInfo(well_id);
         List<HashMap<String, Object>> boreholeInterList = wellInfoService.selectBoreholeInterList(well_id);
-        List<HashMap<String, Object>> testHistoryList = wellInfoService.selectTestHistoryList(well_id);
         List<HashMap<String, Object>> testHistorySummary = wellInfoService.selectTestHistorySummary(well_id);
         HashMap<String, Object> lastTestHistory = wellInfoService.getLastTestHistory(well_id);
-        List<HashMap<String, Object>> analyticalAssaysList = wellInfoService.selectAnalyticalAssaysList(well_id);
         List<HashMap<String, Object>> analyticalAssaysSummary = wellInfoService.selectAnalyticalAssaysSummary(well_id);
         List<HashMap<String, Object>> historyAssignmentList = wellInfoService.selectHistoryAssignmentList(well_id);
         List<HashMap<String, Object>> historyAssignmentSummary = wellInfoService.selectHistoryAssignmentSummary(well_id);
@@ -93,10 +91,10 @@ public class WellInfoController {
         HashMap<String, Object> result = new HashMap<>();
         result.put("dataModel", wellInfo);
         result.put("boreholeInterList", boreholeInterList);//业务解释列表
-        result.put("testHistoryList", testHistoryList);//测试历史列表
+        //result.put("testHistoryList", testHistoryList);//测试历史列表
         result.put("testHistorySummary", testHistorySummary);//测试历史汇总
         result.put("lastTestHistory", lastTestHistory);//最后一次测试历史
-        result.put("analyticalAssaysList", analyticalAssaysList);//分析化验列表
+        //result.put("analyticalAssaysList", analyticalAssaysList);//分析化验列表
         result.put("analyticalAssaysSummary", analyticalAssaysSummary);//分析化验汇总
         result.put("historyAssignmentList", historyAssignmentList);//作业简史列表
         result.put("historyAssignmentSummary", historyAssignmentSummary);//作业简史汇总
@@ -104,6 +102,24 @@ public class WellInfoController {
         result.put("dataIndexList", dataIndexList);
         return RespGenerstor.success(result);
     }
+    @ResponseBody
+    @GetMapping("/getTestHistoryList")
+    public BaseResponse<PageInfo<HashMap<String, Object>>> getTestHistoryList(@RequestParam("page") int page, @RequestParam("rows") int rows,
+                                                                             String well_id) throws Exception {
+
+        PageInfo<HashMap<String, Object>> result = wellInfoService.selectTestHistoryList(page, rows, well_id);
+
+        return RespGenerstor.success(result);
+    }
+    @ResponseBody
+    @GetMapping("/getAnalyticalAssaysList")
+    public BaseResponse<PageInfo<HashMap<String, Object>>> getAnalyticalAssaysList(@RequestParam("page") int page, @RequestParam("rows") int rows,
+                                                                              String well_id) throws Exception {
+
+        PageInfo<HashMap<String, Object>> result = wellInfoService.selectAnalyticalAssaysList(page, rows, well_id);
+
+        return RespGenerstor.success(result);
+    }
 
     @ResponseBody
     @PostMapping("/saveExpendSetting")
@@ -134,6 +150,15 @@ public class WellInfoController {
         return RespGenerstor.success(wellInfoService.getConstructUnitTree());
     }
 
+    @GetMapping("/getWellPurposeTree")
+    public BaseResponse getWellPurposeTree() {
+        return RespGenerstor.success(wellInfoService.getWellPurposeTree());
+    }
+    @GetMapping("/getWellTypeTree")
+    public BaseResponse getWellTypeTree() {
+        return RespGenerstor.success(wellInfoService.getWellTypeTree());
+    }
+
     @GetMapping("/downFile")
     public void downFile(HttpServletResponse response, Integer isShow, String filePath, String fileName) throws IOException {
         Map<String, String> getParams = new HashMap<>();

+ 12 - 0
src/main/java/com/bowintek/practice/mapper/cquery/WellInfoCQuery.java

@@ -118,4 +118,16 @@ public interface WellInfoCQuery {
      * @return
      */
     List<HashMap<String,Object>> selectOilgasUnitList();
+
+    /**
+     * 井别层级列表
+     * @return
+     */
+    List<HashMap<String,Object>> selectWellPurposeList();
+
+    /**
+     * 井型层级列表
+     * @return
+     */
+    List<HashMap<String,Object>> selectWellTypeList();
 }

+ 49 - 5
src/main/java/com/bowintek/practice/services/impl/WellInfoServiceImpl.java

@@ -76,8 +76,11 @@ public class WellInfoServiceImpl implements WellInfoService {
 
     @Override
     @SwitchDataSource(DBTypeEnum.POSTGRE)
-    public List<HashMap<String, Object>> selectTestHistoryList(String well_id) {
-        return wellInfoCQuery.selectTestHistoryList(well_id);
+    public  PageInfo<HashMap<String, Object>> selectTestHistoryList(Integer page, Integer rows,String well_id) {
+        PageHelper.startPage(page, rows);
+        List<HashMap<String, Object>> dataList =  wellInfoCQuery.selectTestHistoryList(well_id);
+        PageInfo<HashMap<String, Object>> result = new PageInfo(dataList);
+        return result;
     }
 
     @Override
@@ -92,10 +95,12 @@ public class WellInfoServiceImpl implements WellInfoService {
         return wellInfoCQuery.getLastTestHistory(well_id);
     }
 
-    @Override
     @SwitchDataSource(DBTypeEnum.POSTGRE)
-    public List<HashMap<String, Object>> selectAnalyticalAssaysList(String well_id) {
-        return wellInfoCQuery.selectAnalyticalAssaysList(well_id);
+    public  PageInfo<HashMap<String, Object>> selectAnalyticalAssaysList(Integer page, Integer rows,String well_id) {
+        PageHelper.startPage(page, rows);
+        List<HashMap<String, Object>> dataList =  wellInfoCQuery.selectAnalyticalAssaysList(well_id);
+        PageInfo<HashMap<String, Object>> result = new PageInfo(dataList);
+        return result;
     }
 
     @Override
@@ -191,4 +196,43 @@ public class WellInfoServiceImpl implements WellInfoService {
         });
         return constructUnitTree;
     }
+
+    @Override
+    @SwitchDataSource(DBTypeEnum.POSTGRE)
+    public List<HashMap<String, Object>> getWellPurposeTree() {
+        List<HashMap<String, Object>> wellPurposeList = wellInfoCQuery.selectWellPurposeList();
+        List<HashMap<String, Object>> wellPurposeTree = new ArrayList<>();
+        Map<Object, List<HashMap<String, Object>>> groupedMap = wellPurposeList.stream()
+                .collect(Collectors.groupingBy(s -> s.get("project_id_1")));
+
+        groupedMap.values().forEach(gm -> {
+            HashMap<String, Object> child = new HashMap<>();
+            child.put("value", gm.get(0).get("project_name_1"));
+            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);
+            }
+        });
+        return wellPurposeTree;
+    }
+    @Override
+    @SwitchDataSource(DBTypeEnum.POSTGRE)
+    public List<HashMap<String, Object>> getWellTypeTree() {
+        List<HashMap<String, Object>> wellTypeList = wellInfoCQuery.selectWellTypeList();
+        List<HashMap<String, Object>> wellTypeTree = new ArrayList<>();
+        Map<Object, List<HashMap<String, Object>>> groupedMap = wellTypeList.stream()
+                .collect(Collectors.groupingBy(s -> s.get("project_id_1")));
+
+        groupedMap.values().forEach(gm -> {
+            HashMap<String, Object> child = new HashMap<>();
+            child.put("value", gm.get(0).get("project_name_1"));
+            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);
+            }
+        });
+        return wellTypeTree;
+    }
 }

+ 4 - 2
src/main/java/com/bowintek/practice/services/service/WellInfoService.java

@@ -13,10 +13,10 @@ public interface WellInfoService {
     PageInfo< HashMap<String, Object>> getList(Integer page, Integer rows, WellInfoParams params);
     PageInfo<HashMap<String, Object>> getMapList(Integer page, Integer rows, WellInfoParams params);
     List<HashMap<String,Object>> selectBoreholeInterList(String well_id);
-    List<HashMap<String,Object>> selectTestHistoryList(String well_id);
+    PageInfo<HashMap<String, Object>> selectTestHistoryList(Integer page, Integer rows,String well_id);
     List<HashMap<String, Object>> selectTestHistorySummary(String well_id);
     HashMap<String, Object> getLastTestHistory(String well_id);
-    List<HashMap<String,Object>> selectAnalyticalAssaysList(String well_id);
+    PageInfo<HashMap<String, Object>> selectAnalyticalAssaysList(Integer page, Integer rows,String well_id);
     List<HashMap<String,Object>> selectAnalyticalAssaysSummary(String well_id);
     List<HashMap<String,Object>> selectHistoryAssignmentList(String well_id);
     List<HashMap<String,Object>> selectHistoryAssignmentSummary(String well_id);
@@ -25,4 +25,6 @@ public interface WellInfoService {
     int saveExpendSetting(WlUserExpendSetting model);
     WlUserExpendSetting getExpendSetting(String userId ,String wellId);
     List<HashMap<String, Object>> getConstructUnitTree();
+    List<HashMap<String, Object>> getWellPurposeTree();
+    List<HashMap<String, Object>> getWellTypeTree();
 }

+ 29 - 3
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -236,7 +236,7 @@
             bi.unify_task_id,
             bi.source
         from by_dwr.fact_dwr_wl_ach_borehole_inter bi
-        where bi.well_id = 'HBe6JDZ9rt'
+        where bi.well_id = #{well_id}
         order by zone_no asc
     </select>
     <select id="selectTestHistoryList" resultType="java.util.HashMap">
@@ -244,7 +244,6 @@
         from by_dm.dws_dm_test_history th
         where th.well_id = #{well_id}
         order by testing_date desc
-        limit 100
     </select>
     <select id="selectTestHistorySummary" resultType="java.util.HashMap">
         select testing_name, count(1) as testing_num
@@ -263,7 +262,6 @@
         from by_dm.dws_dm_analytical_assays_new aa
         where aa.well_id = #{well_id}
         order by item_code
-        limit 100
     </select>
     <select id="selectAnalyticalAssaysSummary" resultType="java.util.HashMap">
         SELECT item_code,
@@ -344,4 +342,32 @@
                  left join BY_DIM.dim_oilgas_unit_desc desc7 on lv.project_id_7 = desc7.id
         where lv.is_effect = 1
     </select>
+    <select id="selectWellPurposeList" resultType="java.util.HashMap">
+        select lv.well_purpose1_id as project_id_1,lv.well_purpose2_id as project_id_2,lv.well_purpose3_id as project_id_3,
+               lv.well_purpose4_id as project_id_4,
+               desc1.name as project_name_1,
+               desc2.name as project_name_2,
+               desc3.name as project_name_3,
+               desc4.name as project_name_4
+        from BY_DIM.dim_well_purpose_level lv
+                 left join BY_DIM.dim_well_purpose_desc desc1 on lv.well_purpose1_id = desc1.id
+                 left join BY_DIM.dim_well_purpose_desc desc2 on lv.well_purpose2_id = desc2.id
+                 left join BY_DIM.dim_well_purpose_desc desc3 on lv.well_purpose3_id = desc3.id
+                 left join BY_DIM.dim_well_purpose_desc desc4 on lv.well_purpose4_id = desc4.id
+        where lv.is_effect = 1
+    </select>
+    <select id="selectWellTypeList" resultType="java.util.HashMap">
+        select lv.well_type1_id as project_id_1,lv.well_type2_id as project_id_2,lv.well_type3_id as project_id_3,
+               lv.well_type4_id as project_id_4,
+               desc1.name as project_name_1,
+               desc2.name as project_name_2,
+               desc3.name as project_name_3,
+               desc4.name as project_name_4
+        from BY_DIM.dim_well_type_level lv
+                 left join BY_DIM.dim_well_type_desc desc1 on lv.well_type1_id = desc1.id
+                 left join BY_DIM.dim_well_type_desc desc2 on lv.well_type2_id = desc2.id
+                 left join BY_DIM.dim_well_type_desc desc3 on lv.well_type3_id = desc3.id
+                 left join BY_DIM.dim_well_type_desc desc4 on lv.well_type4_id = desc4.id
+        where lv.is_effect = 1
+    </select>
 </mapper>

BIN
vue/src/assets/images/add.png


BIN
vue/src/assets/images/sub.png


+ 10 - 12
vue/src/components/basic/chart/chart-prod-dynamics.vue

@@ -52,7 +52,7 @@
     </a-form>
     <div class="echarts-total">
       <template v-for="(it) in getTotals()">
-        <span style="color: #2f54eb; font-weight: bold;">{{it.name}}</span>&nbsp;:&nbsp;{{it.total.toFixed(3)}}{{it.unit}} &nbsp;&nbsp;&nbsp;&nbsp;
+        <span style="color: #2f54eb; font-weight: bold;">{{it.name}}</span>&nbsp;:&nbsp;{{it.total!=null? parseFloat( it.total).toFixed(3):0}}{{it.unit}} &nbsp;&nbsp;&nbsp;&nbsp;
       </template>
     </div>
     <div class="echart" :id="('chart-'+id)" :style="getChartStyle()"></div>
@@ -90,7 +90,6 @@
       const wellId = computed(() => {
         return props.wellId ? props.wellId : null
       });
-
       const formRef = ref<FormInstance>();
       const formState = reactive({
         days:[null, null],
@@ -163,12 +162,12 @@
           {label:'年', value:'year'}];
       },
       getTypeOptions:function (){
-        return [{label:'产油量', leiLabel:'累产油量', value:'oil', unit:'(万吨)'},
-          {label:'产水量', leiLabel:'累产水量', value:'water', unit:'(万吨)'},
-          {label:'产液量', leiLabel:'累产液量', value:'fluid', unit:'(万吨)'},
-          {label:'产气量', leiLabel:'累产气量', value:'gas', unit:'(立方米)'},
-          {label:'水率', leiLabel:'含水率', value:'watercut', unit:''},
-          {label:'注水量', leiLabel:'累注水量', value:'vol', unit:'(万吨)'}
+        return [{label:'累产油量', value:'oil', unit:'(万吨)'},
+          {label:'累产水量', value:'water', unit:'(万吨)'},
+          {label:'累产液量', value:'fluid', unit:'(万吨)'},
+          {label:'累产气量', value:'gas', unit:'(立方米)'},
+          {label:'含水率', value:'watercut', unit:''},
+          {label:'累注水量', value:'vol', unit:'(万吨)'}
         ];
       },
       getTypes:function (){
@@ -254,7 +253,7 @@
         return series;
       },
       getyAxisTitle:function (i, label){
-        return i<=1?"产油量/水量":label;
+        return i<=1?"产油量/水量":label;
       },
       getGridIndex:function (i){
         return i<=1?0:i-1;
@@ -266,10 +265,9 @@
         for(let i=0;i< showList.length;i++){
           let total = 0;
           yDatas[i].forEach(it=>{ total+=it*1; });
-          console.log("total", total);
           totals.push({
-            name:showList[i].leiLabel,
-            total : total,
+            name:showList[i].label,
+            total : total?.toFixed(2),
             unit : this.getTypeUnit(showList[i].label)
           });
         }

+ 2 - 0
vue/src/router/asyncModules/sale.ts

@@ -9,4 +9,6 @@ export default {
   'views/subjectdetail': () => import( '@/views/subject/detail.vue'),
   'views/wellinfo': () => import( '@/views/wellinfo/index.vue'),
   'views/wellinfoDetail': () => import( '@/views/wellinfo/detail.vue'),
+  'views/domain': () => import( '@/views/domainES/index.vue'),
+  'views/domainResult': () => import( '@/views/domainES/result.vue'),
 }

+ 16 - 0
vue/src/utils/common.ts

@@ -215,3 +215,19 @@ export const getPaginationTotalTitle = (total:number)=>{
   return `共 ${total} 条`;
 }
 
+export function numberToCurrencyNo(value) {
+  if (!value) return 0
+  // 获取整数部分
+  const intPart = Math.trunc(value)
+  // 整数部分处理,增加,
+  const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
+  // 预定义小数部分
+  let floatPart = ''
+  // 将数值截取为小数部分和整数部分
+  const valueArray = value.toString().split('.')
+  if (valueArray.length === 2) { // 有小数部分
+    floatPart = valueArray[1].toString() // 取得小数部分
+    return intPartFormat + '.' + floatPart
+  }
+  return intPartFormat + floatPart
+}

+ 137 - 0
vue/src/views/domainES/index.vue

@@ -0,0 +1,137 @@
+<template>
+  <div class="card-search">
+    <a-form
+      ref="formRef"
+      name="advanced_search"
+      class="ant-advanced-search-form"
+      :model="formState"
+      @finish="onQuery"
+    >
+      <a-divider orientation="left"><b style="color:#4E61D0">1.输入检索控制条件</b></a-divider>
+      <a-row :gutter="24">
+        <a-col :span="22">
+          <div class="col-title">组织单位:</div>
+          <a-input v-model:value="formState.subjectName" style="width: 200px"></a-input>
+        </a-col>
+        <a-col :span="24">
+          <div class="col-title">
+          作业区/项目部:
+           </div>
+          <a-input v-model:value="formState.tabCode" style="width: 200px"></a-input>
+        </a-col>
+        <a-col :span="24">
+          <div class="col-title">
+          井名:
+           </div>
+          <a-input v-model:value="formState.tabName" style="width: 200px"></a-input>
+        </a-col>
+        <a-col :span="24">
+          <div class="col-title">
+          地层名称:
+           </div>
+          <a-input v-model:value="formState.tabName" style="width: 200px"></a-input>
+        </a-col>
+      </a-row>
+      <a-divider orientation="left"><b style="color:#4E61D0">2.输入检索内容条件</b></a-divider>
+      <a-row :gutter="24">
+        <a-col :span="24" class="query-row">
+          <div class="operTexts">&nbsp;</div>
+          <a-select v-model:value="formState.tabName" :options="fieldList" class="operTexts"></a-select>
+          <a-input v-model:value="formState.subjectName" style="width: 200px"></a-input>
+          <img src="~@/assets/images/add.png" @click="addQuery"/>
+        </a-col>
+        <a-col :span="24" class="query-row" v-for="(it,index) in queryList">
+          <a-select v-model:value="it.oper" :options="operTexts" class="operTexts"></a-select>
+          <a-select v-model:value="it.field" :options="fieldList" class="operTexts"></a-select>
+          <a-input v-model:value="it.key" style="width: 200px"></a-input>
+          <img src="~@/assets/images/sub.png" @click="onDelete(index)"/>
+        </a-col>
+
+      </a-row>
+      <a-row>
+        <a-col :span="4" style="text-align: right">
+          <a-button type="primary" html-type="submit" @click="onQuery">查询</a-button>
+          <a-button style="margin: 0 8px" @click="() => {formRef.resetFields();}">重置</a-button>
+        </a-col>
+      </a-row>
+    </a-form>
+  </div>
+</template>
+
+
+<script lang="ts">
+import {reactive, defineComponent, ref} from 'vue';
+import {useRoute, useRouter} from "vue-router";
+import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
+import type {FormInstance, SelectProps} from "ant-design-vue";
+
+export default defineComponent({
+  name: 'domainESIndex',
+  components: {DownOutlined, UpOutlined},
+  setup() {
+
+    const route = useRoute();
+    const router = useRouter();
+    const formRef = ref<FormInstance>();
+    const formState = reactive({
+      page: 1, rows: 10, subjectName: '', tabName: '', tabCode: null, total: 0
+    });
+    const queryList= ref<any>([]);
+
+    const operTexts = [
+      {value: '=', label: '等于'},
+      {value: 'like', label: '包含'},
+      {value: 'null', label: '为空'},
+      {value: 'not null', label: '不为空'}
+    ] as SelectProps['options'];
+
+    const fieldList = [
+      {value: '', label: '不限'},
+      {value: 'wellId', label: '井号'},
+      {value: 'wellName', label: '井名'}
+    ] as SelectProps['options'];
+
+    const onQuery = () => {
+      console.log("");
+    }
+    function addQuery(){
+      queryList.value.push({});
+    }
+    function onDelete(index) {
+      queryList.value.splice(index, 1);
+    }
+    return {
+      router, route, formState, formRef, onQuery, operTexts, fieldList,addQuery,queryList,onDelete
+    };
+  },
+  created() {
+  },
+  activated() {
+  }
+});
+</script>
+
+<style lang="less">
+.ant-row {
+
+  .ant-col {
+    margin: 10px 0px;
+
+    .col-title {
+      width: 120px;
+      text-align: left;
+      float: left;
+    }
+  }
+  .query-row{
+    display: flex;
+
+    img{
+      margin-left:5px;
+    }
+  }
+}
+.operTexts{
+  width:80px;
+}
+</style>

+ 13 - 0
vue/src/views/domainES/result.vue

@@ -0,0 +1,13 @@
+<template>
+
+</template>
+
+<script>
+export default {
+  name: "result.vue"
+}
+</script>
+
+<style scoped>
+
+</style>

+ 74 - 13
vue/src/views/wellinfo/detail.vue

@@ -30,21 +30,21 @@
 
         <p>
           <template v-if="dataModel.prod_horizon">
-            投产于<span>{{ dataModel.start_prod_date }}</span>
+            投产于<span>{{ dataModel.start_prod_date }}</span>
           </template>
           <template v-if="dataModel.prod_horizon">
-            生产层位<span>{{ dataModel.prod_horizon }}</span>
+            生产层位<span>{{ dataModel.prod_horizon }}</span>层位。
           </template>
           <template v-if="dataModel.recent_testing_date">
-            层位 <span>{{ dataModel.recent_testing_date }}</span>
+            <span>{{ dataModel.recent_testing_date }}</span>
           </template>
           <template v-if="dataModel.recent_testing_name">
-            进行最近一次<span>{{ dataModel.recent_testing_name }}</span>测试
+            进行最近一次<span>{{ dataModel.recent_testing_name }}</span>测试
           </template>
           <template v-if="dataModel.recent_prod_date">
-            最近一次产油时间<span>{{ dataModel.recent_prod_date }}</span>
+            最近一次产油时间<span>{{ dataModel.recent_prod_date }}</span>
           </template>
-          油嘴<span>{{ dataModel.oil_nozzle ?? 0 }}</span>mm
+          油嘴<span>{{ dataModel.oil_nozzle ?? 0 }}</span>mm
           ,油压<span>{{ dataModel.tubing_pres ?? 0 }}</span>MPa
           ,套压<span>{{ dataModel.casing_pres ?? 0 }}</span>MPa
           ,日产液量<span>{{ dataModel.fluid_prod_daily ?? 0 }}</span>t/d
@@ -231,14 +231,15 @@
       <div v-if="cardSettings.cardTest.expand">
         <p class="info-body">本井共实施
           <template v-for="it in testHistorySummary">
-            <span>{{ it.testing_num }}</span>次{{ it.testing_name }}
+            <span>{{ it.testing_num }}</span>次{{ it.testing_name }},
           </template>
           <span>{{ lastTestHistory.testing_date }}</span>进行最近一次<span>{{ lastTestHistory.testing_name }}</span>,
           <span>{{ lastTestHistory.construction_description }}</span>
         </p>
         <br/>
         <a-table :columns="testHistoryColumns" :data-source="testHistoryList" :scroll="{ x:'100%', y: 500 }"
-                 :pagination="false"
+                 :pagination="testHistoryPage"
+                 @change="handleTestHistoryChange"
                  bordered>
         </a-table>
       </div>
@@ -263,7 +264,8 @@
         </p>
         <br>
         <a-table :columns="analyticalAssaysColumns" :data-source="analyticalAssaysList" :scroll="{ x:'100%', y: 500 }"
-                 :pagination="false"
+                 :pagination="analyticalAssaysPage"
+                 @change="handleAnalyticalAssaysChange"
                  bordered>
         </a-table>
       </div>
@@ -347,6 +349,8 @@ import ChartProdDynmics from '@/components/basic/chart/chart-prod-dynamics.vue'
 import ChartMap from '@/components/basic/chart/chart-map.vue'
 import filePreview from '@/components/basic/file-preview/index.vue'
 import {download} from "@/utils/downloadFile";
+import {getPaginationTotalTitle} from "@/utils/common";
+import type {TableProps} from "ant-design-vue";
 
 export default defineComponent({
   name: 'wellinfoDetail',
@@ -369,6 +373,62 @@ export default defineComponent({
     })
     const wellId = ref(history.state.params?.id);
 
+    const testHistoryPage = ref({
+      total: 0,
+      current: 1,
+      pageSize: 10,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    });
+
+    const handleTestHistoryChange: TableProps['onChange'] = (
+      pag: { pageSize: number; current: number },
+    ) => {
+      testHistoryPage.value.current = pag.current;
+      testHistoryPage.value.pageSize = pag.pageSize;
+      loadTestHistoryData();
+    };
+
+    function loadTestHistoryData() {
+      let id = history.state.params?.id ?? wellData.dataModel.well_id;
+      get('wellInfo/getTestHistoryList', {
+        page: testHistoryPage.value.current,
+        rows: testHistoryPage.value.pageSize,
+        well_id: id
+      }).then(result => {
+        wellData.testHistoryList = result.list;
+        testHistoryPage.value.total = result.total;
+      })
+    }
+
+    const analyticalAssaysPage = ref({
+      total: 0,
+      current: 1,
+      pageSize: 10,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    });
+
+    const handleAnalyticalAssaysChange: TableProps['onChange'] = (
+      pag: { pageSize: number; current: number },
+    ) => {
+      analyticalAssaysPage.value.current = pag.current;
+      analyticalAssaysPage.value.pageSize = pag.pageSize;
+      loadAnalyticalAssaysData();
+    };
+
+    function loadAnalyticalAssaysData() {
+      let id = history.state.params?.id ?? wellData.dataModel.well_id;
+      get('wellInfo/getAnalyticalAssaysList', {
+        page: analyticalAssaysPage.value.current,
+        rows: analyticalAssaysPage.value.pageSize,
+        well_id: id
+      }).then(result => {
+        wellData.analyticalAssaysList = rowSpan(result.list);
+        analyticalAssaysPage.value.total = result.total;
+      })
+    }
+
     const fileOptions = reactive({
       docKey: '',
       businessType: [] as any[],
@@ -411,13 +471,14 @@ export default defineComponent({
       if (id == undefined) {
         return;
       }
+      loadTestHistoryData();
+      loadAnalyticalAssaysData();
+
       get('wellInfo/getWellInfo', {well_id: id}).then(data => {
         wellData.dataModel = data.dataModel;
         wellData.boreholeInterList = data.boreholeInterList;
-        wellData.testHistoryList = data.testHistoryList;
         wellData.testHistorySummary = data.testHistorySummary;
         wellData.lastTestHistory = data.lastTestHistory ?? {};
-        wellData.analyticalAssaysList = rowSpan(data.analyticalAssaysList);
         wellData.analyticalAssaysSummary = data.analyticalAssaysSummary;
         wellData.historyAssignmentList = data.historyAssignmentList;
         wellData.historyAssignmentSummary = data.historyAssignmentSummary;
@@ -476,8 +537,8 @@ export default defineComponent({
     return {
       ...toRefs(wellData),
       loadData, cardSettings,
-      onClose, ...columns,
-      dayjs, wellId, fileOptions, downFile, onBusTypeChange
+      onClose, ...columns,analyticalAssaysPage,handleAnalyticalAssaysChange,
+      dayjs, wellId, fileOptions, downFile, onBusTypeChange, handleTestHistoryChange, testHistoryPage
     };
   },
   created() {

+ 33 - 13
vue/src/views/wellinfo/index.vue

@@ -58,16 +58,26 @@
             </a-col>
             <a-col :span="6">
               <a-form-item name="well_type" label="井型:">
-                <a-select ref="select" v-model:value="formState.well_type"
-                          :options="wellTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
-                </a-select>
+                <a-tree-select
+                  v-model:value="formState.well_type"
+                  show-search
+                  allow-clear
+                  tree-line
+                  :tree-data="wellTypeTree"
+                  tree-node-filter-prop="label">
+                </a-tree-select>
               </a-form-item>
             </a-col>
             <a-col :span="6">
               <a-form-item name="well_type" label="井别:">
-                <a-select ref="select" v-model:value="formState.well_purpose"
-                          :options="wellPurposeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
-                </a-select>
+                <a-tree-select
+                  v-model:value="formState.well_purpose"
+                  show-search
+                  allow-clear
+                  tree-line
+                  :tree-data="wellPurposeTree"
+                  tree-node-filter-prop="label">
+                </a-tree-select>
               </a-form-item>
             </a-col>
             <a-col :span="6" style="text-align: left">
@@ -224,7 +234,7 @@
                   <tr v-if="showColumnType.includes('oil')">
                     <th>最近月产油量:</th>
                     <td>
-                      {{ item.oil_prod_mon == null ? "" : (item.oil_prod_mon + "t") }}
+                      {{ item.oil_prod_mon == null ? "" : (numberToCurrencyNo(item.oil_prod_mon) + "t") }}
                     </td>
                     <td colspan="2" rowspan="2">
                       <div style="height:25px">
@@ -236,13 +246,13 @@
                   <tr v-if="showColumnType.includes('oil')">
                     <th>累产油量:</th>
                     <td>
-                      {{ item.oil_prod_year == null ? "" : (item.oil_prod_year + "t") }}
+                      {{ item.oil_prod_year == null ? "" : (numberToCurrencyNo(item.oil_prod_year) + "t") }}
                     </td>
                   </tr>
                   <tr v-if="showColumnType.includes('gas')">
                     <th>最近月产气量:</th>
                     <td>
-                      {{ item.gas_prod_mon == null ? "" : (item.gas_prod_mon + "m³") }}
+                      {{ item.gas_prod_mon == null ? "" : (numberToCurrencyNo(item.gas_prod_mon) + "m³") }}
                     </td>
                     <td colspan="2" rowspan="2">
                       <div style="height:25px">
@@ -253,13 +263,13 @@
                   <tr v-if="showColumnType.includes('gas')">
                     <th>累产气量:</th>
                     <td>
-                      {{ item.gas_prod_year == null ? "" : (item.gas_prod_year + "m³") }}
+                      {{ item.gas_prod_year == null ? "" : (numberToCurrencyNo(item.gas_prod_year) + "m³") }}
                     </td>
                   </tr>
                   <tr v-if="showColumnType.includes('water')">
                     <th>最近注水量:</th>
                     <td>
-                      {{ item.water_prod_mon == null ? "" : (item.water_prod_mon + "t") }}
+                      {{ item.water_prod_mon == null ? "" : (numberToCurrencyNo(item.water_prod_mon) + "t") }}
                     </td>
                     <td colspan="2" rowspan="2">
                       <div style="height:25px">
@@ -270,7 +280,7 @@
                   <tr v-if="showColumnType.includes('water')">
                     <th>累注水量:</th>
                     <td>
-                      {{ item.water_prod_year == null ? "" : (item.water_prod_year + "10kt") }}
+                      {{ item.water_prod_year == null ? "" : (numberToCurrencyNo(item.water_prod_year) + "10kt") }}
                     </td>
                   </tr>
                 </table>
@@ -346,6 +356,7 @@ import ChartMap from '@/components/basic/chart/chart-map.vue'
 import {download} from "@/utils/downloadFile";
 import {columns, filterColumns, formState, getTdColor} from './table'
 import filePreview from '@/components/basic/file-preview/index.vue'
+import {numberToCurrencyNo} from "@/utils/common";
 
 export default defineComponent({
   name: 'wellinfoindex',
@@ -380,6 +391,15 @@ export default defineComponent({
       businessType: [] as any[],
       selectBusinessType: [] as any[]
     })
+    const wellPurposeTree =ref([]);
+    get('wellInfo/getWellPurposeTree', {}).then(data => {
+      wellPurposeTree.value = data;
+    });
+
+    const wellTypeTree =ref([]);
+    get('wellInfo/getWellTypeTree', {}).then(data => {
+      wellTypeTree.value = data;
+    });
 
     function onBusTypeChange(checked, it) {
       if (checked) {
@@ -645,7 +665,7 @@ export default defineComponent({
       treeOnExpand,
       subjectTrees, fileOptions, onBusTypeChange,
       getSubjectTree, searchTree,
-      treeOnSelect, pagination, getSettingColoumns,
+      treeOnSelect, pagination, getSettingColoumns,wellPurposeTree,wellTypeTree,numberToCurrencyNo,
       handleResizeColumn: (w, col) => {
         col.width = w;
       }

+ 15 - 7
vue/src/views/wellinfo/table.ts

@@ -2,6 +2,7 @@ import type {TableColumnsType} from "ant-design-vue";
 import dayjs from "dayjs";
 import type {GetComponentProps} from "ant-design-vue/lib/vc-table/interface";
 import {reactive, ref} from "vue";
+import {numberToCurrencyNo} from "@/utils/common";
 
 
 const state = reactive({
@@ -207,7 +208,8 @@ export const columns: TableColumnsType = [
       record.oil_prod_begin_date == null ? "" : (dayjs(record.oil_prod_begin_date).format('YYYY-MM-DD'))
   },
   {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: '设计井深(m)', dataIndex: 'budgeted_md', key: 'budgeted_md', width: 120, resizable: true,customHeaderCell: onHeaderCell,
+    customRender: ({record}) =>numberToCurrencyNo(record.budgeted_md)},
   {
     title: '含水率',
     dataIndex: 'water_cut',
@@ -226,14 +228,16 @@ export const columns: TableColumnsType = [
     dataIndex: 'oil_prod_mon',
     key: 'oil_prod_mon',
     width: 120,resizable: true,
-    customHeaderCell: oilDragHeader
+    customHeaderCell: oilDragHeader,
+    customRender: ({record}) =>numberToCurrencyNo(record.oil_prod_mon)
   },
   {
     title: '累产油量(10kt)',
     dataIndex: 'oil_prod_year',
     key: 'oil_prod_year',
     width: 120,resizable: true,
-    customHeaderCell: oilHeader
+    customHeaderCell: oilHeader,
+    customRender: ({record}) =>numberToCurrencyNo(record.oil_prod_year)
   },
   {title: '累产油量趋势', dataIndex: 'oil', key: 'oil', width: 100, customHeaderCell: oilHeader},
   {
@@ -241,14 +245,16 @@ export const columns: TableColumnsType = [
     dataIndex: 'gas_prod_mon',
     key: 'gas_prod_mon',
     width: 170,resizable: true,
-    customHeaderCell: gasDragHeader
+    customHeaderCell: gasDragHeader,
+    customRender: ({record}) =>numberToCurrencyNo(record.gas_prod_mon)
   },
   {
     title: '累产气量(10^8m³)',
     dataIndex: 'gas_prod_year',
     key: 'gas_prod_year',
     width: 150,resizable: true,
-    customHeaderCell: gasHeader
+    customHeaderCell: gasHeader,
+    customRender: ({record}) =>numberToCurrencyNo(record.gas_prod_year)
   },
   {title: '累产气量趋势', dataIndex: 'gas', key: 'gas', width: 100, customHeaderCell: gasHeader},
   {
@@ -256,14 +262,16 @@ export const columns: TableColumnsType = [
     dataIndex: 'water_prod_mon',
     key: 'water_prod_mon',
     width: 110,resizable: true,
-    customHeaderCell: waterDragHeader
+    customHeaderCell: waterDragHeader,
+    customRender: ({record}) =>numberToCurrencyNo(record.water_prod_mon)
   },
   {
     title: '累注水量(10kt)',
     dataIndex: 'water_prod_year',
     key: 'water_prod_year',
     width: 150,resizable: true,
-    customHeaderCell: waterHeader
+    customHeaderCell: waterHeader,
+    customRender: ({record}) =>numberToCurrencyNo(record.water_prod_year)
   },
   {title: '累注水量趋势', dataIndex: 'water', key: 'water', width: 100, customHeaderCell: waterHeader},
   {title: '操作列', dataIndex: 'operation', key: 'operation', align: 'center', width: 120}