Просмотр исходного кода

作业看板默认查询在职人员

xiaohaizhao 1 год назад
Родитель
Сommit
63228a7be5
2 измененных файлов с 12 добавлено и 3 удалено
  1. 10 1
      packageA/achievement/index.js
  2. 2 2
      packageA/achievement/index.wxml

+ 10 - 1
packageA/achievement/index.js

@@ -33,6 +33,7 @@ Page({
     active: {
       name: wx.getStorageSync('userMsg').name,
       userid: wx.getStorageSync('userMsg').userid,
+      isleave: 1
     }
   },
   onLoad(options) {
@@ -47,7 +48,12 @@ Page({
     detail
   }) {
     if (detail.name == 'reset') {
+      this.selectComponent("#organization").setData({
+        isleave: 1
+      })
       this.selectComponent("#organization").initDepAndUser().then(active => {
+        console.log("active", active)
+        active.isleave = 1;
         this.setData({
           active
         })
@@ -99,7 +105,7 @@ Page({
       let type = active.userid ? 0 : 1,
         dataid = type == 0 ? active.userid : active.departmentid,
         where = {
-          isleave: active.isleave || 0
+          isleave: active.isleave
         };
       return _Http.basic({
         "id": 20230616131404,
@@ -274,6 +280,9 @@ Page({
   },
   onReady() {
     this.selectComponent("#ListBox").setHeight(".head", this);
+    this.selectComponent("#organization").setData({
+      isleave: 1
+    })
     this.selectComponent("#organization").initDepAndUser().then(active => {
       this.setData({
         active

+ 2 - 2
packageA/achievement/index.wxml

@@ -15,7 +15,7 @@
           作业数据
         </view>
         <view class="tabs-box">
-          <view class="item {{zysj.tab.active==item.id?'active':''}}" wx:for="{{zysj.tab.list}}" wx:key="id" data-name="zysj" data-id="{{item.id}}" catchtap='changeId'>{{item.name}}</view>
+          <view class="item {{zysj.tab.active==item.id?'active':''}}" wx:for="{{zysj.tab.list}}" wx:key="id" data-name="zysj" data-id="{{item.id}}" catchtap='changeId'>{{item.name||'筛选'}}</view>
         </view>
       </view>
       <view class="spectaculars row-3">
@@ -170,5 +170,5 @@
 </view>
 
 <Yl_Filtrate1 show='{{showFiltrate}}' list="{{filtratelist}}" bindhandle="handleFilter">
-  <organization slot='head' dimissionF id='organization' />
+  <organization slot='head' defaultIsleave='1' dimissionF id='organization' />
 </Yl_Filtrate1>