Procházet zdrojové kódy

修改地图白屏问题,详情页面取消搜索框

周壕 před 10 měsíci
rodič
revize
98ade0f41d

+ 4 - 4
src/main/resources/static/a4gis/index.html

@@ -187,19 +187,19 @@
       right: 20px;
     }
   </style>
-  <!--测试环境使用
+  <!--测试环境使用-->
   <link href='https://js.arcgis.com/3.27/esri/css/esri.css' rel='stylesheet' />
   <script src='jquery.min.js'></script>
   <script src='https://js.arcgis.com/3.27/init.js' type='text/javascript'></script>
   <script src='init-gmap.js?v=1.15.9' type='text/javascript'></script>
-  <script src='init-gcontrols.js?v=1.0.5' type='text/javascript'></script>-->
+  <script src='init-gcontrols.js?v=1.0.5' type='text/javascript'></script>
 
-  <!--正式环境使用-->
+  <!--正式环境使用
   <link href='http://a4.petrochina/gisapi/esri/css/esri.css' rel='stylesheet' />
   <script src='http://a4.petrochina/gisapi/third/jquery/jquery-1.9.1.min.js'></script>
   <script src='http://a4.petrochina/gisapi/init.js' type='text/javascript'></script>
   <script src='http://a4.petrochina/gisapi/lib/init-gmap.js?v=1.15.9' type='text/javascript'></script>
-  <script src='http://a4.petrochina/gisapi/lib/init-gcontrols.js?v=1.0.5' type='text/javascript'></script>
+  <script src='http://a4.petrochina/gisapi/lib/init-gcontrols.js?v=1.0.5' type='text/javascript'></script>-->
 
   <script>
     var map = null, app = { token: "d4b2b740-9814-4d75-9cda-dac96fc2bc10" };

+ 10 - 3
vue/src/components/basic/chart/chart-map.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="chart-map">
-    <div class="chart-map-input" v-if="wellId==null">
+    <div class="chart-map-input" v-if="isSearch">
       <a-auto-complete
         :dropdown-match-select-width="252"
         style="width: 300px"
@@ -35,7 +35,8 @@
 
   export  default defineComponent ({
     props:{
-      datas: null as any
+      datas: null as any,
+      isSearch : Boolean
     },
     name : 'ChartMap',
     data() {
@@ -69,10 +70,16 @@
           };
         });
       });
+
+      const isSearch = computed(() => {
+        return props.isSearch == null || props.isSearch == undefined ? true : props.isSearch
+      });
+
       return{
         datas,
         iframeSrc,
-        iframeRef
+        iframeRef,
+        isSearch
       }
     },
     mounted(){

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

@@ -328,7 +328,7 @@
       </template>
       <div v-if="cardSettings.cardGIS.expand">
         <div style="width:100%;height: 500px;margin-top:15px;">
-          <ChartMap :wellId="wellId"></ChartMap>
+          <ChartMap :datas="mapDatas"></ChartMap>
         </div>
       </div>
     </a-card>
@@ -402,7 +402,8 @@ export default defineComponent({
       historyAssignmentSummary: [],
       lastHistoryAssignment: {},
       historyAssignmentCount: 0,
-      dataIndexList: [] as any[]
+      dataIndexList: [] as any[],
+      mapDatas : [] as any
     });
 
     const loadData = async (id) => {
@@ -422,6 +423,13 @@ export default defineComponent({
         wellData.lastHistoryAssignment = data.lastHistoryAssignment ?? {};
         wellData.dataIndexList = data.dataIndexList;
         wellData.historyAssignmentCount = wellData.historyAssignmentSummary.reduce((total, it: any) => total + it.testing_num, 0);
+        wellData.mapDatas = [{
+          well_id : wellData.dataModel.well_id,
+          well_common_name : data.dataModel.well_common_name,
+          geo_description : data.dataModel.geo_description,
+          x : data.dataModel.well_coordinates_x,
+          y : data.dataModel.well_coordinates_y
+        }];
 
         fileOptions.businessType = wellData.dataIndexList.map(x => x.file_business_type);
         fileOptions.businessType = Array.from(new Set(fileOptions.businessType));

+ 1 - 1
vue/src/views/wellinfo/index.vue

@@ -286,7 +286,7 @@
                       @showSizeChange="(current,pageSize)=>handleTableChange({ current: current,pageSize: pageSize })"/>
       </a-spin>
       <div style="width:100%;height: 500px;margin-top:15px">
-        <ChartMap :datas="data"></ChartMap>
+        <ChartMap :datas="data" :isSearch="(true)"></ChartMap>
       </div>
     </div>
     <a-modal v-model:visible="isShowDoc" title="相关文档" :footer="null" @onCancel="isShowDoc=false">