xiaoqiao 10 månader sedan
förälder
incheckning
156739e5c6

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

@@ -61,7 +61,7 @@ public class WellInfoController {
 
     @GetMapping("/getOrganizationTree")
     public BaseResponse getOrganizationTree() {
-        return RespGenerstor.success(organizationService.getListTree());
+        return RespGenerstor.success(organizationService.getListTree("HBlQAIBGob"));
     }
 
     @GetMapping("/getWellInfo")

+ 5 - 0
src/main/java/com/bowintek/practice/services/impl/OrganizationServiceImpl.java

@@ -23,6 +23,11 @@ public class OrganizationServiceImpl implements OrganizationService {
         return recursionListTree(sources, null);
     }
 
+    @Override
+    public List<CdOrganizationTreeVo> getListTree(String parentValue){
+        List<CdOrganizationTreeVo> sources = cdOrganizationCQuery.getListToTree();
+        return recursionListTree(sources, parentValue);
+    }
     public List<CdOrganizationTreeVo> recursionListTree(List<CdOrganizationTreeVo> sources, String parentValue){
         List<CdOrganizationTreeVo> rtnList = findTreeByParent(sources, parentValue);
         for(int i=0;i<rtnList.size();i++){

+ 1 - 0
src/main/java/com/bowintek/practice/services/service/OrganizationService.java

@@ -6,6 +6,7 @@ import java.util.List;
 
 public interface OrganizationService {
     List<CdOrganizationTreeVo> getListTree();
+    List<CdOrganizationTreeVo> getListTree(String parentValue);
     List<String> convertIdToNameList(String ids);
     String convertIdToJoins(String ids);
 }

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

@@ -8,7 +8,7 @@
           <a-tab-pane key="2" tab="地质单元目录" forceRender="true">
           </a-tab-pane>
         </a-tabs>
-        <DoubleLeftOutlined @click="showTree=false"/>
+        <DoubleLeftOutlined @click="showTree=false;colspan=6;"/>
       </div>
       <div style="margin-top: -15px">
         <a-input-search
@@ -42,7 +42,7 @@
       </div>
     </div>
     <div class="query-index-close" v-else>
-      <DoubleRightOutlined @click="showTree=true"/>
+      <DoubleRightOutlined @click="showTree=true;colspan=8;"/>
     </div>
     <div class="query-index-content">
       <div class="query-index-form">
@@ -163,7 +163,7 @@
         </div>
         <div class="query-index-table" v-else>
           <a-row :gutter="[24,8]">
-            <a-col :span="8" v-for="item in data">
+            <a-col :span="colspan" v-for="item in data">
               <a-card :title="'井名:'+item.well_common_name" class="ant-card-index" bodyStyle="padding: 10px;">
                 <template #extra>
                   <a-button type="link" @click="detail(item.well_id)">查看详情</a-button>
@@ -287,6 +287,7 @@ export default defineComponent({
     const showQuery = ref(false);
     const selectedRowKeys = ref([]);
     const activeTab = ref("1");
+    const colspan =ref(8);
     const showTree = ref(true);
     const isShowDoc = ref(false);
     const showColumnType = ref(['oil', 'gas']);
@@ -445,9 +446,9 @@ export default defineComponent({
 
     const onCheckboxChange = () => {
       setTimeout(() => {
-        let v = document.getElementsByClassName("ant-table-body")[0];
-        if (v) {
-          v.scrollLeft = v.scrollWidth;
+        let tbody = document.getElementsByClassName("ant-table-body")[0];
+        if (tbody) {
+          tbody.scrollLeft = tbody.scrollWidth;
         }
       }, 300)
     }
@@ -487,6 +488,7 @@ export default defineComponent({
         }
         loadData();
       });
+
     const loadData = async function () {
       loading.value = true;
       const result: any = await get('wellInfo/getList', formState);
@@ -625,7 +627,7 @@ export default defineComponent({
       formRef, viewModel, handleTableChange, detail,
       formState, isShowDoc, showDoc, docList, resetFields, showColumnType, filterColumns,
       labelCol, getTdColor, downFile,
-      tabChange, onCheckboxChange, treeRef,
+      tabChange, onCheckboxChange, treeRef,colspan,
       treeOnExpand,
       subjectTrees,
       getSubjectTree, searchTree,
@@ -730,6 +732,7 @@ export default defineComponent({
 }
 
 .well-card-table {
+  width:100%;
   th {
     width: 25%;
     text-align: left;