index.axml 7.44 KB
<import src="../../template/loading/loading.axml"/>
<import src="../../template/fullScreen/fullScreen.axml"/>
<import src="../../template/refresh/index.axml"/>
<template is="refresh" a:if='{{refresh}}' ></template>
<block a:else>
  <view hidden="{{$data.tabBarIndex === '1'}}">
    <import src="../../template/affairBlank/index.axml"/>
    <view class="{{isStopBodyScroll ? 'scroll-lock' : ''}}" onTap="closeSwipe" onTouchStart="closeSwipe" onTouchMove="closeSwipe" onTouchEnd="closeSwipe">
      <block a:if="{{!listLoading}}">
        <scroll-view a:if="{{dynamicList.length > 0}}" scroll-y="{{true}}" lower-threshold="{{400}}" class="dynamicBox {{isIPX ? 'dynamicBox_add_padding' : ''}}" onScrollToLower="onScrollToLower">
          <view class="dynamicList">
            <swipe onSetBodyDisableScroll="setBodyDisableScroll" rightWidth="{{ 78 }}" leftWidth="{{ 0 }}" a:for="{{dynamicList}}" class="dynamicContent" key="{{item.scheduleId}}">
              <view class="dynamicDetails">
                <view class="meetingtitle" catchTap="nextDetail" data-item="{{item}}">
                  <view>
            {{item.title}}
                  </view>
                  <view>
                    <text a:if="{{item.traceTime !== traceTime}}" class="iconfont iconicon_top1 icon-color"></text>
                  </view>
                </view>
                <block a:for="{{item.meetingLogDataList.slice(0,2)}}" a:for-item="dynamicItem" key="{{item.id}}">
                  <view class="userDynamic">
                    <view class="dynamicTime" catchTap="nextDetail" data-item="{{dynamicItem}}">
                      <text>{{dynamicItem.content}}</text>
                      <text>{{dynamicItem.createTime}}</text>
                    </view>
                    <file-list a:if="{{dynamicItem.category === '2'}}" fileView="{{dynamicItem.meetingLogResource}}" isCanEdit="{{false}}"/>
                    <view class="dynamicFile" a:if="{{dynamicItem.category === '3'}}">
                      <task-list onChangeTaskStatusOnList="onChangeTaskStatusOnList" taskList="{{[dynamicItem.meetingLogResource]}}" isCanEdit="{{false}}"/>
                    </view>
                  </view>
                </block>
              </view>
              <view slot="right" class="placedTop" onTap="changeCollection" data-scheduleId="{{item.scheduleId}}" data-index="{{index}}" data-collection="{{item.traceTime === traceTime ? 'Y':'N'}}">
                <text class="iconfont iconicon_top1 {{item.traceTime === traceTime ? '': 'isTopIcon'}}"></text>
              </view>
            </swipe>
          </view>
        </scroll-view>
        <view class="noDate" a:else>
          <template is="affair-placeholder" data="{{title: '展示安排的所有动态', tip: '实时同步所有事件的最新动态,便于随时处理工作内容'}}"/>
        </view>
      </block>
      <template is="loading" a:else>
      </template>
    </view>
  </view>
  <view hidden="{{$data.tabBarIndex === '0'}}">
    <view a:if="{{!loading}}">
      <view class="scheduleHeader">
        <view>{{currentData.split('/')[0]}}年{{currentData.split('/')[1] || '1'}}月</view>
        <view onTap="changesidebar" class="headerIcon">
          <text class="iconfont iconicon_app1">
          </text>
          <view>
          </view>
        </view>
      </view>
      <scroll-view class="indexScrollView" scroll-y="{{true}}" onScroll="scroll" lower-threshold="{{400}}" onScrollToLower="lower" scroll-into-view="{{todayStr}}">
        <block a:for="{{scheduleList}}" key="{{item.dateStr}}">
          <!-- 年 -->
          <block a:if="{{item.type == 'year'}}">
            <view class="year li" id="{{item.dateStr}}">
          {{item.value}}年
            </view>
          </block>
          <!-- 月 -->
          <block a:elif="{{item.type == 'month'}}">
            <view class="month li" id="{{item.dateStr}}">
          {{item.value}}月
            </view>
          </block>
          <!-- 周 -->
          <block a:elif="{{item.type == 'week'}}">
            <view class="week li" id="{{item.dateStr}}">
            {{item.value}}
            </view>
          </block>
          <!-- 天 -->
          <block a:elif="{{item.type == 'day' || item.type == 'today'}}">
            <view class="date li" id="{{ item.dateStr}}">
              <view class="hasDateTitle  {{item.value.isBeOverdue ? 'overdueLabel':''}} {{item.type == 'today' && item.hasDateLabel ? 'today' : ''}}">
                <view>
                {{item.week}}
                </view>
                <view>{{item.hasDateLabel}}</view>
              </view>
              <view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance === 0 ? 'cancel' : ''}}" data-item="{{item.value}}" onTap="nextDetail">
                <view class="scheduleTitle">
                  <text>{{item.value.title}}{{item.value.isDaySpan ? `(第${item.value.isFewDays}天,共${item.value.duration}天)` : '' }}</text>
                </view>
                <view class="scheduleTime">
                  <text a:if="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '0'}}">{{item.value.thisDayStartTime}}</text>
                  <text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '1'}}">全天</text>
                  <text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '2'}}">{{ item.value.thisDayEndTime == '00:00' ? '全天' : '直到'+item.value.thisDayEndTime }}</text>
                  <text a:else>{{item.value.thisDayStartTime}} - {{item.value.thisDayEndTime}}</text>
                </view>
              </view>
            </view>
          </block>
          <!-- 今天有无会议 -->
          <block a:elif="{{item.type == 'thisday'}}">
            <view class="date li" id="{{item.dateStr}}">
              <view class="hasDateTitle today">
                <view>
                {{item.week}}
                </view>
                <view>{{item.hasDateLabel}}</view>
              </view>
              <view class="todayNoData">
                <text>暂无日程安排,</text>
                <text onTap="createMeeting">创建日程</text>
              </view>
            </view>
          </block>
        </block>
      </scroll-view>
      <popup show="{{show}}" onClose="closePop" position="left">
        <related-app/>
      </popup>
    </view>
    <template is="loading" a:else>
    </template>
  </view>
</block>
<view class="tabBarContent">
  <view class="tabBar">
    <view onTap="changeTabBar" data-tabbar='0' data-title='动态'>
      <view class="tabBarView tabBarView1 {{$data.tabBarIndex === '0' ? 'ischooseTabBar' : ''}}">
        <view class="iconfont iconicon_dynamic"></view>
        <view>动态</view>
      </view>
    </view>
    <view onTap="changeTabBar" data-tabbar='1' data-title='日程'>
      <view class="tabBarView tabBarView2 {{$data.tabBarIndex === '1' ? 'ischooseTabBar' : ''}}">
        <view class="iconfont iconicon_Calendarbox1">
          <text a:if="{{offset == 'before'}}" class="iconfont iconicon_days iconicon_open">
          </text>
          <text a:elif="{{offset == 'next'}}" class="iconfont iconicon_days iconicon_Packup">
          </text>
          <text a:else class="iconfont iconicon_days iconicon_days{{iconDay}}">
          </text>
        </view>
        <view>日程</view>
      </view>
    </view>
    <view class="createMeeting" onTap="createMeeting">
      <text class="iconfont iconicon_add1"></text>
    </view>
  </view>
  <template is="fullScreen" data="{{isIPX:isIPX}}" />
</view>