Browse Source

井筒-文件预览

xiaoqiao 1 year ago
parent
commit
89110f9cab

+ 1 - 2
src/main/java/com/bowintek/practice/config/WebConfiguration.java

@@ -66,8 +66,7 @@ public class WebConfiguration implements WebMvcConfigurer {
         excludePath.add("/doc/**");  //静态资源
         excludePath.add("/a4gis/**");  //地图
         excludePath.add("/");  //首页跳转
-        excludePath.add("/api/account/testpost");//单点登录
-        excludePath.add("/api/wellInfo/downFile");  //文件下载
+        excludePath.add("/api/account/testpost");
         registry.addInterceptor(tokenInterceptor)
                 .addPathPatterns("/**")
                 .excludePathPatterns(excludePath);

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

@@ -40,11 +40,10 @@ public class WellInfoController {
     private AppConfig appConfig;
 
     @ResponseBody
-    @GetMapping("/getList")
-    public BaseResponse<PageInfo<HashMap<String, Object>>> getList(@RequestParam("page") int page, @RequestParam("rows") int rows,
-                                                                   WellInfoParams params) throws Exception {
+    @PostMapping("/getList")
+    public BaseResponse<PageInfo<HashMap<String, Object>>> getList(@RequestBody WellInfoParams params) throws Exception {
 
-        PageInfo<HashMap<String, Object>> result = wellInfoService.getList(page, rows, params);
+        PageInfo<HashMap<String, Object>> result = wellInfoService.getList(params.getPage(), params.getRows(), params);
 
         return RespGenerstor.success(result);
     }
@@ -127,9 +126,9 @@ public class WellInfoController {
     public void downFile(HttpServletResponse response, Integer isShow, String filePath, String fileName) throws IOException {
         Map<String, String> getParams = new HashMap<>();
         getParams.put("fileName", fileName);
-        getParams.put("filePath2", filePath);
+        getParams.put("filePath", filePath);
 
-        String reData = remoteHelper.getJson(getParams, appConfig.hdfshelperurl + "test", "UTF-8");
+        String reData = remoteHelper.getJson(getParams, appConfig.hdfshelperurl + "read", "UTF-8");
         byte[] bytes = Base64.getDecoder().decode(reData);
         OutputStream os = response.getOutputStream();
 

+ 4 - 2
src/main/java/com/bowintek/practice/controller/system/LogController.java

@@ -37,7 +37,7 @@ public class LogController {
             , @RequestParam(required = false) String userName, @RequestParam(required = false) Date startDate,
                                                     @RequestParam(required = false) Date endDate) {
 
-        return RespGenerstor.success(logService.getList(page, rows, loginID, userName,startDate,endDate));
+        return RespGenerstor.success(logService.getList(page, rows, loginID, userName,startDate,endDate,null));
     }
 
     @PostMapping("/save")
@@ -50,8 +50,10 @@ public class LogController {
     public void exportSubject(HttpServletResponse response,
                               @RequestParam(required = false) String loginID
             , @RequestParam(required = false) String userName, @RequestParam(required = false) Date startDate,
+                              String selectedRowKeys,
                               @RequestParam(required = false) Date endDate) throws Exception {
-        List<LogModel> dataList = logService.getList(1, 9999,  loginID, userName,startDate,endDate).getList();
+        List<String> idList= selectedRowKeys==null?new ArrayList<>(): Arrays.stream(selectedRowKeys.split(",")).toList();
+        List<LogModel> dataList = logService.getList(1, 9999,  loginID, userName,startDate,endDate,idList).getList();
 
         ExcelHelper excelHelper = new ExcelHelper();
         ExcelHelper.ExcelData data = excelHelper.new ExcelData();

+ 2 - 1
src/main/java/com/bowintek/practice/mapper/cquery/SysLogCQuery.java

@@ -7,5 +7,6 @@ import java.util.Date;
 import java.util.List;
 
 public interface SysLogCQuery {
-    List<LogModel> selectLogList(@Param("loginID") String loginID, @Param("userName") String userName, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
+    List<LogModel> selectLogList(@Param("loginID") String loginID, @Param("userName") String userName,
+                                 @Param("startDate") Date startDate, @Param("endDate") Date endDate,  @Param("idList")List<String> idList);
 }

+ 2 - 2
src/main/java/com/bowintek/practice/services/impl/system/LogServiceImpl.java

@@ -24,10 +24,10 @@ public class LogServiceImpl implements LogService {
     private SysLogCQuery sysLogCQuery;
 
     @Override
-    public PageInfo<LogModel> getList(Integer page, Integer rows, String loginID, String userName, Date startDate, Date endDate){
+    public PageInfo<LogModel> getList(Integer page, Integer rows, String loginID, String userName, Date startDate, Date endDate,List<String> idList){
         PageHelper.startPage(page, rows);
 
-        List<LogModel> dataList = sysLogCQuery.selectLogList(loginID, userName, startDate,endDate);
+        List<LogModel> dataList = sysLogCQuery.selectLogList(loginID, userName, startDate,endDate,idList);
 
         PageInfo<LogModel> result = new PageInfo(dataList);
         return result;

+ 2 - 1
src/main/java/com/bowintek/practice/services/service/system/LogService.java

@@ -4,10 +4,11 @@ import com.bowintek.practice.vo.system.LogModel;
 import com.github.pagehelper.PageInfo;
 
 import java.util.Date;
+import java.util.List;
 
 public interface LogService {
 
-    PageInfo<LogModel> getList(Integer page, Integer rows, String loginID, String userName, Date startDate, Date endDate);
+    PageInfo<LogModel> getList(Integer page, Integer rows, String loginID, String userName, Date startDate, Date endDate, List<String> idList);
 
     Integer save(String pageName,String pageUrl,String actionName, String userID);
 

+ 7 - 0
src/main/java/com/bowintek/practice/vo/query/WellInfoParams.java

@@ -2,11 +2,16 @@ package com.bowintek.practice.vo.query;
 
 import lombok.Data;
 
+import java.util.List;
+
 @Data
 public class WellInfoParams {
+    private  int page;
+    private  int rows;
     private String well_common_name;
     private String well_id;
     private String well_type;
+    private String well_purpose;
     private String spud_date_begin;
     private String spud_date_end;
     private String completion_date_begin;
@@ -17,4 +22,6 @@ public class WellInfoParams {
     private String oil_prod_recent_date_end;
     private String org_id_a1;
     private String project_id;
+    private List<String> orgList;
+    private List<String> unitList;
 }

+ 7 - 1
src/main/resources/mapping/cquery/SysLogCQuery.xml

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.bowintek.practice.mapper.cquery.SysLogCQuery">
     <select id="selectLogList" resultType="com.bowintek.practice.vo.system.LogModel">
-        select l.logID,l.logID,l.pageUrl,l.actionName,l.userID,l.logTime,us.name as userName,us.loginID,l.pageName
+        select l.logID,l.pageUrl,l.actionName,l.userID,l.logTime,us.name as userName,us.loginID,l.pageName
         from sys_log l
         inner join sys_user us on l.userID = us.userID
         where 1=1
@@ -18,6 +18,12 @@
         <if test="startDate != null ">
             and l.logTime <![CDATA[ < ]]> date_add(#{startDate}, interval 1 day)
         </if>
+        <if test="idList!=null and idList.size>0">
+            and l.logID in
+            <foreach collection="idList" item="id" index="index" open="(" close=")" separator=",">
+                #{id}
+            </foreach>
+        </if>
         order by l.logTime desc
     </select>
 </mapper>

+ 20 - 1
src/main/resources/mapping/cquery/WellInfoCQuery.xml

@@ -33,6 +33,7 @@
                      inner join(
                 select well_id, max(prod_date) prod_date from by_dwr.fact_dwr_pc_pro_well_vol_d group by well_id
             ) maxdaily on daily.well_id = maxdaily.well_id and daily.prod_date = maxdaily.prod_date
+            limit  1
         ) fact_daily on well.well_id = fact_daily.well_id
                  left join (
             select intr.*
@@ -42,6 +43,7 @@
                 from by_dwr.fact_dwr_well_history_introduction
                 group by well_id
             ) maxintr on intr.well_id = maxintr.well_id and intr.start_prod_date = maxintr.start_prod_date
+            limit  1
         ) fact_intr on well.well_id = fact_intr.well_id
         where well.well_id = #{well_id}
     </select>
@@ -51,7 +53,7 @@
         well.*,
         TO_CHAR(fact_daily.oil_prod_begin_date , 'YYYY-MM-dd') oil_prod_begin_date,
         TO_CHAR(fact_daily.oil_prod_recent_date , 'YYYY-MM-dd') oil_prod_recent_date,
-               fact_daily.current_state,fact_daily.water_cut,
+        fact_daily.current_state,fact_daily.water_cut,
         fact_mon.oil_prod_mon,fact_mon.gas_prod_mon,fact_mon.gas_prod_year,fact_mon.oil_prod_year
         ,fact_mon.water_prod_mon,fact_mon.water_prod_year,
         well_stt.well_coordinates_x x,
@@ -62,12 +64,14 @@
         inner join(
         select well_id, max(prod_date) prod_date from by_dwr.fact_dwr_pc_pro_well_vol_d group by well_id
         ) maxdaily on daily.well_id=maxdaily.well_id and daily.prod_date=maxdaily.prod_date
+        limit  1
         )fact_daily on well.well_id= fact_daily.well_id
         left join (
         select mon.* from by_dwr.fact_dwr_pc_pro_well_vol_m mon
         inner join(
         select well_id, max(prod_date) prod_date from by_dwr.fact_dwr_pc_pro_well_vol_m group by well_id
         ) maxmon on mon.well_id=maxmon.well_id and mon.prod_date=maxmon.prod_date
+        limit  1
         )fact_mon on well.well_id= fact_mon.well_id
         left join by_dwr.fact_dwr_well_structure well_stt on well.well_id = well_stt.well_id
         where 1=1
@@ -80,6 +84,9 @@
         <if test="well_type!='' and well_type!=null">
             and well.well_type like Concat('%',#{well_type},'%')
         </if>
+        <if test="well_purpose!='' and well_purpose!=null">
+            and well.well_purpose like Concat('%',#{well_purpose},'%')
+        </if>
         <if test="spud_date_begin!='' and spud_date_begin!=null">
             and well.spud_date <![CDATA[ >= ]]> CAST(#{spud_date_begin} AS DATE)
         </if>
@@ -112,6 +119,18 @@
         <if test="project_id!='' and project_id!=null">
             and well.project_id =#{project_id}
         </if>
+        <if test="orgList!=null and orgList.size>0">
+            and well.org_id_a1 in
+            <foreach collection="orgList" item="orgId" index="index" open="(" close=")" separator=",">
+                #{orgId}
+            </foreach>
+        </if>
+        <if test="unitList!=null and unitList.size>0">
+            and well.project_id in
+            <foreach collection="unitList" item="unitId" index="index" open="(" close=")" separator=",">
+                #{unitId}
+            </foreach>
+        </if>
         order by well.well_common_name
     </select>
 

BIN
target/classes/com/bowintek/practice/config/WebConfiguration.class


BIN
target/classes/com/bowintek/practice/controller/system/LogController.class


BIN
target/classes/com/bowintek/practice/services/impl/system/LogServiceImpl.class


+ 2 - 2
vue/public/appconfig.json

@@ -1,5 +1,5 @@
 {
   "isDev": true,
-  "SSOLoginUrl": "http://www.baidu.com",
-  "huabeiHost": "http://192.168.0.68:8077/"
+  "SSOLoginUrl": "",
+  "huabeiHost": "http://10.73.178.206:8077"
 }

+ 2 - 2
vue/src/components/basic/transfer/Transfer.vue

@@ -1,7 +1,7 @@
 <template>
-  <templat v-for="it in selectData">
+  <template v-for="it in selectData">
     <a-tag closable @close="removeItem(it)">{{ it.title }}</a-tag>
-  </templat>
+  </template>
   <a-button type="link" @click="visible=!visible">选择</a-button>
   <a-modal
     title="选择"

+ 7 - 6
vue/src/views/system/log/index.vue

@@ -30,7 +30,7 @@
       <a-row class="edit-operation">
         <a-col :span="24" style="text-align: right">
           <BExportExcel :title="'导出'" :filename="'日志信息'" :url="'system/log/exportLog'"
-                        :params="{...formState}"></BExportExcel>
+                        :params="{selectedRowKeys: selectedRowKeys.join(','),...formState}"></BExportExcel>
         </a-col>
       </a-row>
     </a-form>
@@ -38,7 +38,7 @@
       <a-table :columns="columns" :data-source="dataList" :scroll="{ x:'100%', y: 500 }" :pagination="pagination"
                :loading="formState.loading"
                @change="handleTableChange"
-               :row-selection="{ selectedRowKeys: formState.selectedRowKeys, onChange: onSelectChange}"
+               :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
                :row-key="record=>record.logID"
                bordered>
       </a-table>
@@ -67,9 +67,9 @@ export default defineComponent({
     const searchParamsState = reactive({page: 1, rows: 20, loginID: '', userName: '', startDate: '',endDate:''});
     const formState = reactive({
       total: 0,
-      selectedRowKeys: [],
       loading: false
     });
+    const selectedRowKeys=ref([]);
     const columns: TableColumnsType = [
       {
         title: '序号',
@@ -107,9 +107,9 @@ export default defineComponent({
       loadData();
     };
 
-    const onSelectChange = (selectedRowKeys: any) => {
-      console.log('selectedRowKeys changed: ', selectedRowKeys);
-      formState.selectedRowKeys = selectedRowKeys;
+    const onSelectChange = (keys: any) => {
+      console.log('selectedRowKeys changed: ', keys);
+      selectedRowKeys.value = keys;
     };
 
     const onRangeChange = (dateString: [string, string]) => {
@@ -145,6 +145,7 @@ export default defineComponent({
       onSelectChange,
       onFinish,
       loadData,
+      selectedRowKeys,
       onRangeChange
     };
   },

+ 188 - 128
vue/src/views/wellinfo/detail.vue

@@ -18,13 +18,13 @@
             dataModel.structure_pos
           }}</span>
           <template v-if="dataModel.spud_date">
-          ,于<span>{{ dataModel.spud_date }}</span>开钻
+            ,于<span>{{ dataModel.spud_date }}</span>开钻
           </template>
           <template v-if="dataModel.end_drilling_date">
-          ,<span>{{ dataModel.end_drilling_date }}</span>完钻
+            ,<span>{{ dataModel.end_drilling_date }}</span>完钻
           </template>
           <template v-if="dataModel.completion_method">
-            ,采取<span>{{dataModel.completion_method}}</span>方式完井。
+            ,采取<span>{{ dataModel.completion_method }}</span>方式完井。
           </template>
         </p>
 
@@ -44,14 +44,14 @@
           <template v-if="dataModel.recent_prod_date">
             ,最近一次产油时间<span>{{ dataModel.recent_prod_date }}</span>
           </template>
-            ,油嘴<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
-            ,日产油量<span>{{ dataModel.oil_prod_daily??0 }}</span>t/d
-            ,含水<span>{{ dataModel.water_cut??0 }}</span>%
-            ,动液面<span>{{ dataModel.start_pump_liq_level??0 }}</span>m
-            ,截止目前累产油<span>{{ dataModel.oil_prod_cum??0}}</span>吨。
+          ,油嘴<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
+          ,日产油量<span>{{ dataModel.oil_prod_daily ?? 0 }}</span>t/d
+          ,含水<span>{{ dataModel.water_cut ?? 0 }}</span>%
+          ,动液面<span>{{ dataModel.start_pump_liq_level ?? 0 }}</span>m
+          ,截止目前累产油<span>{{ dataModel.oil_prod_cum ?? 0 }}</span>吨。
         </p>
       </div>
     </a-card>
@@ -82,95 +82,138 @@
         <DownSquareOutlined v-else @click="cardSettings.cardBaseInfo.expand=true"
                             :style="cardSettings.buttonStyle"/>
       </template>
-      <div v-if="cardSettings.cardBaseInfo.expand">
-        <a-divider type="vertical" class="info-title" style="margin-top: 0px" dashed>井身结构</a-divider>
-        <a-descriptions bordered>
-          <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="井id:">
-            {{ dataModel.well_id }}
-          </a-descriptions-item>
-          <a-descriptions-item label="井名:">{{ dataModel.well_common_name }}</a-descriptions-item>
-          <a-descriptions-item label="井别:">{{ dataModel.well_purpose }}</a-descriptions-item>
-          <a-descriptions-item label="井型:">{{ dataModel.well_type }}</a-descriptions-item>
-          <a-descriptions-item label="开钻日期:">{{ dataModel.spud_date }}</a-descriptions-item>
-          <a-descriptions-item label="完钻日期:">{{ dataModel.end_drilling_date }}</a-descriptions-item>
-          <a-descriptions-item label="设计井深:">{{
-              dataModel.budgeted_md == null ? "" : (dataModel.budgeted_md + "m")
-            }}
-          </a-descriptions-item>
-          <a-descriptions-item label="完钻层位:">{{ dataModel.completion_formation }}</a-descriptions-item>
-          <a-descriptions-item label="完井方式:">{{ dataModel.completion_method }}</a-descriptions-item>
-          <a-descriptions-item label="生产井段:">{{ dataModel.well_production_sections }}</a-descriptions-item>
-          <a-descriptions-item label="T₇⁴顶深:">{{
-              dataModel.t74_top_depth == null ? "" : (dataModel.t74_top_depth + "m")
-            }}
-          </a-descriptions-item>
-          <a-descriptions-item label="造斜点:">{{
-              dataModel.ko_azimuth == null ? "" : (dataModel.ko_azimuth + "m")
-            }}
-          </a-descriptions-item>
-          <a-descriptions-item label="水平位移:">
-            {{ dataModel.ko_horizontal_dislocation == null ? "" : (dataModel.ko_horizontal_dislocation + "m") }}
-          </a-descriptions-item>
-          <a-descriptions-item label="方位角:">{{
-              dataModel.azimuth_angle == null ? "" : (dataModel.azimuth_angle + "°")
-            }}
-          </a-descriptions-item>
-          <a-descriptions-item label="井位坐标X:">{{ dataModel.well_coordinates_x }}</a-descriptions-item>
-          <a-descriptions-item label="井位坐标y:">{{ dataModel.well_coordinates_y }}</a-descriptions-item>
-        </a-descriptions>
-        <a-divider type="vertical" class="info-title" dashed>井A1信息</a-divider>
-        <a-descriptions bordered>
-          <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="采油厂机构:">
-            {{ dataModel.org_name_a1 }}
-          </a-descriptions-item>
-          <a-descriptions-item label="单位名称:">{{ dataModel.org_name_a2 }}</a-descriptions-item>
-          <a-descriptions-item label="标准井名:">{{ dataModel.well_legal_name }}</a-descriptions-item>
-          <a-descriptions-item label="地理位置描述:" :span="3">{{ dataModel.geo_description }}</a-descriptions-item>
-          <a-descriptions-item label="构造位置描述:" :span="3">{{ dataModel.structure_pos }}</a-descriptions-item>
-          <a-descriptions-item label="创建/更新日期:">
-            {{ dataModel.update_date == null ? dataModel.create_date : dataModel.update_date }}
-          </a-descriptions-item>
-          <a-descriptions-item label="井筒生命阶段:">{{ dataModel.phase }}</a-descriptions-item>
-          <a-descriptions-item label="通用井筒名:">{{ dataModel.wellbore_common_name }}</a-descriptions-item>
-          <a-descriptions-item label="目的层:">{{ dataModel.target_formation }}</a-descriptions-item>
-          <a-descriptions-item label="审定测量深度:">
-            {{ dataModel.authorized_md }}
-            <template v-if="dataModel.authorized_md">m</template>
-          </a-descriptions-item>
-          <a-descriptions-item label="审定真垂直深度:">{{ dataModel.authorized_tvd }}
-            <template v-if="dataModel.authorized_tvd">m</template>
-          </a-descriptions-item>
+      <div v-if="cardSettings.cardBaseInfo.expand" style="display: flex">
+        <div style="width:70%">
+          <a-divider type="vertical" class="info-title" style="margin-top: 0px" dashed>井身结构</a-divider>
+          <a-descriptions bordered>
+            <a-descriptions-item label="井名:" :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}">
+              {{ dataModel.well_common_name }}</a-descriptions-item>
+            <a-descriptions-item label="井别:">{{ dataModel.well_purpose }}</a-descriptions-item>
+            <a-descriptions-item label="井型:">{{ dataModel.well_type }}</a-descriptions-item>
+            <a-descriptions-item label="开钻日期:">{{ dataModel.spud_date }}</a-descriptions-item>
+            <a-descriptions-item label="完钻日期:">{{ dataModel.end_drilling_date }}</a-descriptions-item>
+            <a-descriptions-item label="设计井深:">{{
+                dataModel.budgeted_md == null ? "" : (dataModel.budgeted_md + "m")
+              }}
+            </a-descriptions-item>
+            <a-descriptions-item label="完钻层位:">{{ dataModel.completion_formation }}</a-descriptions-item>
+            <a-descriptions-item label="完井方式:">{{ dataModel.completion_method }}</a-descriptions-item>
+            <a-descriptions-item label="生产井段:">{{ dataModel.well_production_sections }}</a-descriptions-item>
+            <a-descriptions-item label="T₇⁴顶深:">{{
+                dataModel.t74_top_depth == null ? "" : (dataModel.t74_top_depth + "m")
+              }}
+            </a-descriptions-item>
+            <a-descriptions-item label="造斜点:">{{
+                dataModel.ko_azimuth == null ? "" : (dataModel.ko_azimuth + "m")
+              }}
+            </a-descriptions-item>
+            <a-descriptions-item label="水平位移:">
+              {{ dataModel.ko_horizontal_dislocation == null ? "" : (dataModel.ko_horizontal_dislocation + "m") }}
+            </a-descriptions-item>
+            <a-descriptions-item label="方位角:">{{
+                dataModel.azimuth_angle == null ? "" : (dataModel.azimuth_angle + "°")
+              }}
+            </a-descriptions-item>
+            <a-descriptions-item label="井位坐标X:">{{ dataModel.well_coordinates_x }}</a-descriptions-item>
+            <a-descriptions-item label="井位坐标y:">{{ dataModel.well_coordinates_y }}</a-descriptions-item>
+          </a-descriptions>
+          <a-divider type="vertical" class="info-title" dashed>井A1信息</a-divider>
+          <a-descriptions bordered>
+            <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="采油厂机构:">
+              {{ dataModel.org_name_a1 }}
+            </a-descriptions-item>
+            <a-descriptions-item label="单位名称:">{{ dataModel.org_name_a2 }}</a-descriptions-item>
+            <a-descriptions-item label="标准井名:">{{ dataModel.well_legal_name }}</a-descriptions-item>
+            <a-descriptions-item label="地理位置描述:" :span="3">{{ dataModel.geo_description }}</a-descriptions-item>
+            <a-descriptions-item label="构造位置描述:" :span="3">{{ dataModel.structure_pos }}</a-descriptions-item>
+            <a-descriptions-item label="创建/更新日期:">
+              {{ dataModel.update_date == null ? dataModel.create_date : dataModel.update_date }}
+            </a-descriptions-item>
+            <a-descriptions-item label="井筒生命阶段:">{{ dataModel.phase }}</a-descriptions-item>
+            <a-descriptions-item label="通用井筒名:">{{ dataModel.wellbore_common_name }}</a-descriptions-item>
+            <a-descriptions-item label="目的层:">{{ dataModel.target_formation }}</a-descriptions-item>
+            <a-descriptions-item label="审定测量深度:">
+              {{ dataModel.authorized_md }}
+              <template v-if="dataModel.authorized_md">m</template>
+            </a-descriptions-item>
+            <a-descriptions-item label="审定真垂直深度:">{{ dataModel.authorized_tvd }}
+              <template v-if="dataModel.authorized_tvd">m</template>
+            </a-descriptions-item>
 
-          <a-descriptions-item label="井底测量深度:">{{ dataModel.bh_md }}
-            <template v-if="dataModel.bh_md">m</template>
-          </a-descriptions-item>
-          <a-descriptions-item label="井底位置描述信息:" :span="2">{{ dataModel.geo_description_bh }}</a-descriptions-item>
-          <a-descriptions-item label="井底真垂直深度:">{{ dataModel.bh_tvd }}
-            <template v-if="dataModel.bh_tvd">m</template>
-          </a-descriptions-item>
-          <a-descriptions-item label="相对于参考面的造斜点深度:">{{ dataModel.ko_md }}
-            <template v-if="dataModel.ko_md">m</template>
-          </a-descriptions-item>
-          <a-descriptions-item label="实际造斜点真垂直深度:">{{ dataModel.ko_tvd }}
-            <template v-if="dataModel.ko_tvd">m</template>
-          </a-descriptions-item>
-          <a-descriptions-item label="地质单元:">{{ dataModel.project_name }}</a-descriptions-item>
-          <a-descriptions-item label="单元类型:">{{ dataModel.project_type }}</a-descriptions-item>
-          <a-descriptions-item label="单元等级:">{{ dataModel.project_level }}</a-descriptions-item>
-          <a-descriptions-item label="备注:" :span="3">{{ dataModel.remarks }}</a-descriptions-item>
-        </a-descriptions>
-        <a-divider type="vertical" class="info-title" dashed>井盆地凹陷信息</a-divider>
-        <a-descriptions bordered>
-          <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="标准盆地:">
-            {{ dataModel.bz_basin }}
-          </a-descriptions-item>
-          <a-descriptions-item label="标准地陷:">{{ dataModel.bz_depression }}</a-descriptions-item>
-          <a-descriptions-item label="标准凹陷:">{{ dataModel.bz_depressed }}</a-descriptions-item>
-          <a-descriptions-item label="标准构造带:">{{ dataModel.bz_structural_belt }}</a-descriptions-item>
-          <a-descriptions-item label="标准区块:">{{ dataModel.bz_qkdy }}</a-descriptions-item>
-          <a-descriptions-item label="标准组织机构:">{{ dataModel.bz_org_name }}</a-descriptions-item>
-          <a-descriptions-item label="标准作业区名:">{{ dataModel.bz_dwmc }}</a-descriptions-item>
-        </a-descriptions>
+            <a-descriptions-item label="井底测量深度:">{{ dataModel.bh_md }}
+              <template v-if="dataModel.bh_md">m</template>
+            </a-descriptions-item>
+            <a-descriptions-item label="井底位置描述信息:" :span="2">{{ dataModel.geo_description_bh }}</a-descriptions-item>
+            <a-descriptions-item label="井底真垂直深度:">{{ dataModel.bh_tvd }}
+              <template v-if="dataModel.bh_tvd">m</template>
+            </a-descriptions-item>
+            <a-descriptions-item label="相对于参考面的造斜点深度:">{{ dataModel.ko_md }}
+              <template v-if="dataModel.ko_md">m</template>
+            </a-descriptions-item>
+            <a-descriptions-item label="实际造斜点真垂直深度:">{{ dataModel.ko_tvd }}
+              <template v-if="dataModel.ko_tvd">m</template>
+            </a-descriptions-item>
+            <a-descriptions-item label="地质单元:">{{ dataModel.project_name }}</a-descriptions-item>
+            <a-descriptions-item label="单元类型:">{{ dataModel.project_type }}</a-descriptions-item>
+            <a-descriptions-item label="单元等级:">{{ dataModel.project_level }}</a-descriptions-item>
+            <a-descriptions-item label="备注:" :span="3">{{ dataModel.remarks }}</a-descriptions-item>
+          </a-descriptions>
+          <a-divider type="vertical" class="info-title" dashed>井盆地凹陷信息</a-divider>
+          <a-descriptions bordered>
+            <a-descriptions-item :labelStyle="{'width':'12%'}" :contentStyle="{'width':'21%'}" label="标准盆地:">
+              {{ dataModel.bz_basin }}
+            </a-descriptions-item>
+            <a-descriptions-item label="标准地陷:">{{ dataModel.bz_depression }}</a-descriptions-item>
+            <a-descriptions-item label="标准凹陷:">{{ dataModel.bz_depressed }}</a-descriptions-item>
+            <a-descriptions-item label="标准构造带:">{{ dataModel.bz_structural_belt }}</a-descriptions-item>
+            <a-descriptions-item label="标准区块:">{{ dataModel.bz_qkdy }}</a-descriptions-item>
+            <a-descriptions-item label="标准组织机构:">{{ dataModel.bz_org_name }}</a-descriptions-item>
+            <a-descriptions-item label="标准作业区名:">{{ dataModel.bz_dwmc }}</a-descriptions-item>
+          </a-descriptions>
+        </div>
+        <div style="flex:1;">
+          <a-divider type="vertical" class="info-title" style="margin-top: 0px" dashed>相关文档</a-divider>
+          <div style="margin-left:10px;border:1px solid #f0f0f0;padding:5px;">
+            <a-input-search
+              v-model:value="fileOptions.docKey"
+              placeholder="查找文档" allow-clear
+            />
+            <div class="files-type">
+              <a-checkable-tag color="processing"
+                               :checked="fileOptions.selectBusinessType.length==0||fileOptions.selectBusinessType.length==fileOptions.businessType.length"
+                               @change="() => fileOptions.selectBusinessType=[]">全部
+              </a-checkable-tag>
+              <template v-for="tag in fileOptions.businessType">
+                <a-checkable-tag color="processing"
+                                 :checked="fileOptions.selectBusinessType.includes(tag)"
+                                 @change="checked => onBusTypeChange(checked,tag)">{{ tag }}
+                </a-checkable-tag>
+              </template>
+            </div>
+            <div style="max-height:990px;overflow-y:scroll;">
+              <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=='')
+                  &&(fileOptions.selectBusinessType.length==0||fileOptions.selectBusinessType.includes(item.file_business_type))">
+                    <template #actions>
+                      <filePreview :fileName="item.file_name" :filePath="item.storage_path"></filePreview>
+                      <a-button type="link" @click="downFile(item)" functioncode="T010502" danger>下载</a-button>
+                    </template>
+                    <a-list-item-meta
+                      :description="item.file_business_type">
+                      <template #title>
+                        {{ item.file_name }}
+                      </template>
+                      <template #avatar>
+                        <img src="~@/assets/images/file.png"/>
+                      </template>
+                    </a-list-item-meta>
+                  </a-list-item>
+                </template>
+              </a-list>
+            </div>
+          </div>
+        </div>
       </div>
     </a-card>
     <a-card :bordered="false" :headStyle="cardSettings.cardHeadStyle" class="card-detail">
@@ -192,29 +235,6 @@
         </a-table>
       </div>
     </a-card>
-    <a-card :bordered="false" :headStyle="cardSettings.cardHeadStyle" class="card-detail">
-      <template #title>
-        <div slot="title" style="width:100%" @click="cardSettings.cardFile.expand=!cardSettings.cardFile.expand">相关文档
-        </div>
-      </template>
-      <template #extra>
-        <UpSquareOutlined v-if="cardSettings.cardFile.expand" @click="cardSettings.cardFile.expand=false"
-                          :style="cardSettings.buttonStyle"/>
-        <DownSquareOutlined v-else @click="cardSettings.cardFile.expand=true"
-                            :style="cardSettings.buttonStyle"/>
-      </template>
-      <div v-if="cardSettings.cardFile.expand">
-        <a-table :columns="dataIndexColumns" :data-source="dataIndexList" :scroll="{ x:'100%', y: 500 }"
-                 :pagination="false"
-                 bordered>
-          <template #bodyCell="{ column,record }">
-            <template v-if="column.key === 'file_name'">
-              <a>{{ record.file_name }}</a>
-            </template>
-          </template>
-        </a-table>
-      </div>
-    </a-card>
     <a-card :bordered="false" :headStyle="cardSettings.cardHeadStyle" class="card-detail">
       <template #title>
         <div slot="title" style="width:100%" @click="cardSettings.cardTest.expand=!cardSettings.cardTest.expand">测试历史
@@ -324,10 +344,12 @@ import router from "@/router";
 import * as columns from './columns';
 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";
 
 export default defineComponent({
   name: 'wellinfoDetail',
-  components: {ChartProdDynmics, ChartMap},
+  components: {ChartProdDynmics, ChartMap, filePreview},
   setup() {
     const tabsViewStore = useTabsViewStore();
     const route = useRoute();
@@ -346,6 +368,21 @@ export default defineComponent({
     })
     const wellId = ref(history.state.params?.id);
 
+    const fileOptions = reactive({
+      docKey: '',
+      businessType: [] as any[],
+      selectBusinessType: [] as any[]
+    })
+
+    function onBusTypeChange(checked, it) {
+      if (checked) {
+        fileOptions.selectBusinessType.push(it);
+      } else {
+        fileOptions.selectBusinessType.splice(fileOptions.selectBusinessType.indexOf(it), 1);
+      }
+      console.log(checked, it);
+    }
+
     watch(
       () => cardSettings,
       () => {
@@ -365,7 +402,7 @@ export default defineComponent({
       historyAssignmentSummary: [],
       lastHistoryAssignment: {},
       historyAssignmentCount: 0,
-      dataIndexList: []
+      dataIndexList: [] as any[]
     });
 
     const loadData = async (id) => {
@@ -385,6 +422,9 @@ export default defineComponent({
         wellData.lastHistoryAssignment = data.lastHistoryAssignment ?? {};
         wellData.dataIndexList = data.dataIndexList;
         wellData.historyAssignmentCount = wellData.historyAssignmentSummary.reduce((total, it: any) => total + it.testing_num, 0);
+
+        fileOptions.businessType = wellData.dataIndexList.map(x => x.file_business_type);
+        fileOptions.businessType = Array.from(new Set(fileOptions.businessType));
       })
       get('wellInfo/getExpendSetting', {wellId: id}).then(data => {
         if (data != null) {
@@ -392,6 +432,11 @@ export default defineComponent({
         }
       })
     }
+
+    const downFile = (record: any) => {
+      download(record.file_business_type, record.file_name);
+    };
+
     const onClose = () => {
       tabsViewStore.closeCurrentTab(route);
       router.back();
@@ -401,7 +446,7 @@ export default defineComponent({
       ...toRefs(wellData),
       loadData, cardSettings,
       onClose, ...columns,
-      dayjs, wellId
+      dayjs, wellId, fileOptions, downFile, onBusTypeChange
     };
   },
   created() {
@@ -422,14 +467,16 @@ export default defineComponent({
   a {
     color: #1890ff;
   }
-  .ant-card-head-title{
+
+  .ant-card-head-title {
     font-weight: bold;
-    color:#1f37dd;
+    color: #40a9ff;
   }
+
   .ant-card-head {
     padding: 0px 10px;
     height: 35px;
-    cursor:pointer;
+    cursor: pointer;
   }
 
   .ant-card-head-wrapper {
@@ -437,7 +484,20 @@ export default defineComponent({
     margin-top: 5px;
   }
 }
+.files-type{
+  margin-top: 10px;
 
+  span{
+    color:#8e9ae1;
+    border:1px solid #c6ccf0;
+    padding: 3px 5px;
+    margin-bottom: 5px;
+  }
+  .ant-tag-checkable-checked,.ant-tag-checkable-checked:active{
+    background-color: #8e9ae1;
+    color:#ffffff;
+  }
+}
 .info-body {
   line-height: 30px;
 

+ 51 - 22
vue/src/views/wellinfo/index.vue

@@ -51,11 +51,6 @@
                 :label-col="labelCol"
                 :model="formState">
           <a-row :gutter="24" class="query-index-row">
-            <a-col :span="6">
-              <a-form-item name="well_id" label="井号:">
-                <a-input v-model:value="formState.well_id"/>
-              </a-form-item>
-            </a-col>
             <a-col :span="6">
               <a-form-item name="well_common_name" label="井名:">
                 <a-input v-model:value="formState.well_common_name"/>
@@ -68,6 +63,13 @@
                 </a-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-form-item>
+            </a-col>
             <a-col :span="6" style="text-align: left">
               <MenuOutlined @click="showQuery=true" v-if="!showQuery"/>
               <LineOutlined @click="showQuery=false" v-else/>
@@ -80,12 +82,36 @@
             </a-col>
           </a-row>
           <a-row :gutter="24" class="query-index-row" v-if="showQuery">
-            <a-col :span="6">
-              <a-form-item name="spud_date_begin" label="开钻日期:">
-                <a-range-picker :key="formState.ref_date" format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
-                                @change="(d)=>{onRangeChange(d,'spud_date_begin','spud_date_end')}"/>
+            <a-col :span="18">
+              <a-form-item name="well_id" label="组织机构:">
+                <a-tree-select
+                  v-model:value="formState.orgList"
+                  show-search
+                  allow-clear
+                  multiple
+                  tree-line
+                  :tree-data="subjectTrees.organizationTree"
+                  tree-node-filter-prop="label" >
+                </a-tree-select>
               </a-form-item>
             </a-col>
+          </a-row>
+          <a-row :gutter="24" class="query-index-row" v-if="showQuery">
+            <a-col :span="18">
+              <a-form-item name="spud_date_begin" label="地址单元:">
+                <a-tree-select
+                  v-model:value="formState.unitList"
+                  show-search
+                  allow-clear
+                  multiple
+                  tree-line
+                  :tree-data="subjectTrees.constructUnitTree"
+                  tree-node-filter-prop="label" >
+                </a-tree-select>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24" class="query-index-row" v-if="showQuery">
             <a-col :span="6">
               <a-form-item name="completion_date_begin" label="完井日期:">
                 <a-range-picker :key="formState.ref_date" format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
@@ -93,17 +119,15 @@
               </a-form-item>
             </a-col>
             <a-col :span="6">
-              <a-form-item name="oil_prod_begin_date_begin" label="开始采油日期:">
+              <a-form-item name="oil_prod_begin_date_begin" label="投产日期:">
                 <a-range-picker :key="formState.ref_date" format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
                                 @change="(d)=>{onRangeChange(d,'oil_prod_begin_date_begin','oil_prod_begin_date_end')}"/>
               </a-form-item>
             </a-col>
-          </a-row>
-          <a-row :gutter="24" class="query-index-row" v-if="showQuery">
             <a-col :span="6">
-              <a-form-item label="最近采油日期:">
+              <a-form-item name="spud_date_begin" label="开钻日期:">
                 <a-range-picker :key="formState.ref_date" format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']"
-                                @change="(d)=>{onRangeChange(d,'oil_prod_recent_date_begin','oil_prod_recent_date_end')}"/>
+                                @change="(d)=>{onRangeChange(d,'spud_date_begin','spud_date_end')}"/>
               </a-form-item>
             </a-col>
           </a-row>
@@ -281,7 +305,7 @@
               <a-list-item-meta
                 :description="item.file_business_type">
                 <template #title>
-                  <a href="">{{ item.file_name }}</a>
+                  {{ item.file_name }}
                 </template>
                 <template #avatar>
                   <img src="~@/assets/images/file.png"/>
@@ -299,8 +323,9 @@
 import {ref, defineComponent, computed, watch} from 'vue';
 import type {FormInstance} from 'ant-design-vue';
 import {useRoute} from 'vue-router';
-import {get} from "@/api/common";
+import { get,postData} from "@/api/common";
 import {getPaginationTotalTitle} from "@/utils/common";
+import { message } from 'ant-design-vue';
 import type {TableProps} from "ant-design-vue";
 import {useTabsViewStore} from "@/store/modules/tabsView";
 import ChartCell from '@/components/basic/chart/chart-cell.vue'
@@ -330,10 +355,8 @@ export default defineComponent({
     const tabsViewStore = useTabsViewStore();
     const docKey = ref('');
     const docList = ref([]);
-    const wellTypeList = ref([{label: "直井", value: "直井"}, {label: "定向井", value: "定向井"}, {
-      label: "分支井",
-      value: "分支井"
-    }]);
+    const wellTypeList = ref([{label: "直井", value: "直井"}, {label: "定向井", value: "定向井"}, {label: "分支井",value: "分支井"}]);
+    const wellPurposeList = ref([{label: "探井", value: "探井"}, {label: "开发井", value: "开发井"}, {label: "水井",value: "水井"}]);
     const replaceFields = {
       children: 'children',
       title: 'label',
@@ -348,6 +371,8 @@ export default defineComponent({
       keys.forEach(key => {
         if (typeof (formState[key]) == "string") {
           formState[key] = '';
+        }else if(typeof (formState[key]) == "object"){
+          formState[key] = [];
         }
       })
     }
@@ -418,7 +443,7 @@ export default defineComponent({
 
     const loadData = async function () {
       loading.value = true;
-      const result: any = await get('wellInfo/getList', formState);
+      const result: any = await postData('wellInfo/getList',formState);
 
       data.value = result.list;
       formState.total = result.total;
@@ -495,6 +520,10 @@ export default defineComponent({
           return null;
         })
         .filter((item, i, self) => item && self.indexOf(item) === i);
+
+      if (expanded.length==0) {
+        message.warning('没有查询到相关目录');
+      }
       subjectTrees.value.expandedKeys = expanded as string[];
       subjectTrees.value.autoExpandParent = true;
       // (treeRef.value as any).scrollTo({key:expanded[0]});
@@ -551,7 +580,7 @@ export default defineComponent({
 
     return {
       route, selectedRowKeys, loading, activeTab, showTree, onSelectChange, data,
-      expand, onQuery, loadData, onRangeChange, showQuery, wellTypeList, replaceFields,
+      expand, onQuery, loadData, onRangeChange, showQuery, wellTypeList,wellPurposeList, replaceFields,
       formRef, viewModel, handleTableChange, detail,
       formState, isShowDoc, showDoc, docKey, docList, resetFields, showColumnType, filterColumns,
       labelCol, getTdColor, downFile,

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

@@ -119,6 +119,7 @@ export const formState = reactive({
   well_common_name: '',
   well_id: '',
   well_type: '',
+  well_purpose:'',
   spud_date_begin: '',
   spud_date_end: '',
   completion_date_begin: '',
@@ -128,7 +129,9 @@ export const formState = reactive({
   oil_prod_recent_date_begin: '',
   oil_prod_recent_date_end: '',
   org_id_a1: '',
-  project_id: ''
+  project_id: '',
+  orgList:[],
+  unitList:[],
 });
 export const columns: TableColumnsType = [
   {
@@ -146,8 +149,9 @@ export const columns: TableColumnsType = [
     width: 120,
     fixed: 'left'
   },
-  {title: '采油厂机构', dataIndex: 'org_name_a1', key: 'org_name_a1', width: 120, customHeaderCell: onHeaderCell},
+  {title: '组织机构', dataIndex: 'org_name_a1', key: 'org_name_a1', width: 120, customHeaderCell: onHeaderCell},
   {title: '地质单元', dataIndex: 'project_name', key: 'project_name', width: 120, customHeaderCell: onHeaderCell},
+  {title: '井别', dataIndex: 'well_purpose', key: 'well_purpose', width: 120, customHeaderCell: onHeaderCell},
   {title: '井型', dataIndex: 'well_type', key: 'well_type', width: 120, customHeaderCell: onHeaderCell},
   {
     title: '开钻日期',
@@ -177,7 +181,7 @@ export const columns: TableColumnsType = [
       record.end_drilling_date == null ? "" : (dayjs(record.completion_date).format('YYYY-MM-DD'))
   },
   {
-    title: '开始采油日期',
+    title: '投产日期',
     dataIndex: 'oil_prod_begin_date',
     key: 'oil_prod_begin_date', width: 120, customHeaderCell: onHeaderCell,
     customRender: ({record}) =>