姜永辉 пре 1 година
родитељ
комит
3b170fa35a

+ 8 - 3
mixins/index.js

@@ -76,6 +76,8 @@ module.exports = {
     validFlag: true,
     // 导出excel
     exportCols: null,
+    // 初始加载查询
+    initSearchFlag: true,
   },
   /**
    * @desc : 获取路由信息,供data中的对象使用
@@ -531,7 +533,7 @@ module.exports = {
           })
         }, 2000)
       } else {
-        console.log('ffff',result);
+        console.log('ffff', result);
         setTimeout(() => {
           this.setData({
             loading: false
@@ -957,8 +959,11 @@ module.exports = {
     let noMore = false;
     // 列表
     if (formMode == Constants.formMode.index) {
-      // 默认查询
-      this.searchData();
+      if (this.data.initSearchFlag) {
+        // 默认查询
+        this.searchData();
+      }
+
       // 更新用户功能频率
       this.saveUserMenuFrequency();
       // 编辑

+ 21 - 0
package-base-select/pages/select-data/select-data.js

@@ -513,12 +513,33 @@ Page({
     // 查询
     this.searchData()
   },
+
+  /** 
+   * @desc : stickyView的高度
+   * @date : 2024年3月23日
+   * @author : 周兴
+   */
+  queryHeight() {
+    let _this = this
+    var query = wx.createSelectorQuery();
+    query.select('#stickyView').boundingClientRect(function (rect) {
+      var height = rect.height; // 获取元素的高度
+      console.log('元素的高度: ' + height + 'px');
+      _this.setData({
+        heightList: height + 20
+      })
+    }).exec();
+  },
+
   /** 
    * @desc : 生命周期函数(初始加载)
    * @date : 2024年3月23日
    * @author : 周兴
    */
   loadInit(e) {
+    // stickyView的高度
+    this.queryHeight()
+
     let route = this.data.chooseRoute;
     if (!route || !route.type) {
       return;

+ 3 - 3
package-base-select/pages/select-data/select-data.wxml

@@ -1,7 +1,7 @@
 <loading wx:if="{{loading}}"></loading>
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <van-sticky scroll-top="0">
-  <view id = "" style="height: {{(chooseFlag || (tagList && tagList.length > 0))?'190rpx': ((searchContent && searchContent.length > 0)?'200rpx':'90rpx')}}">
+  <view id="stickyView" style="height: {{(chooseFlag || (tagList && tagList.length > 0))?'190rpx': ((searchContent && searchContent.length > 0)?'200rpx':'90rpx')}}">
     <!-- 查询条件 -->
     <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,placeholder)}}">
     </dk-dropdown-menu>
@@ -24,7 +24,7 @@
 </view>
 
 <!-- 列表区 防止遮住 TODO-->
-<view style="{{chooseFlag?'margin-top:120rpx;':''}}">
+<view style="{{'margin-top:' +  heightList + 'rpx'}}">
   <dk-list wx:if="{{!simpleFlag && active == 0}}" id="list" list="{{tableData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" chooseFlag="{{chooseFlag}}" bind:toDetail="toDetail" bind:choose="chooseData"></dk-list>
 </view>
 
@@ -42,7 +42,7 @@
   <view bind:tap="toAdd" class="btn-add-class">
     <van-icon name="plus" color="#FFFFFF" size="60rpx" />
   </view>
-</view> 
+</view>
 
 <dk-popup id="popup" type="basic" validFlag="{{true}}" priceTitle="" title="{{popTitle}}" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjNamePop}}" contentObj="{{popContent}}" bind:commit="editItems">
 </dk-popup>

+ 2 - 0
package-business-analysis/pages/detail-report/detail-report.js

@@ -55,6 +55,8 @@ Page({
     contentCol: null,
     // 页面是否加载完毕,控制不要先走查询
     loadFlag: false,
+    // 初始不进行自动查询
+    initSearchFlag:false,
   },
   /**
    * @desc : 设置查询参数

+ 1 - 0
package-business-analysis/pages/detail-report/detail-report.wxml

@@ -6,6 +6,7 @@
 	</dk-dropdown-menu>
 </van-sticky>
 
+
 <!-- 暂无数据 -->
 <van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />