CONTROL-BASE.template.ftl 5.6 KB
Newer Older
ibizdev's avatar
ibizdev committed
1 2 3 4 5 6 7 8
<template>
    <div class="app-mob-calendar <#if ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<#if ctrl.render??>
    ${ctrl.render.code}
<#else>
        <div v-if="show" :class="['calender_box' , activeItem]">
    <#--  日历样式----月  -->
    <#if ctrl.getCalendarStyle() == "MONTH" || ctrl.getCalendarStyle() == "MONTH_TIMELINE">
KK's avatar
KK committed
9
            <app-calendar
ibizdev's avatar
ibizdev committed
10 11 12 13 14 15
                ref="calendar"
                @prev="prev"
                @next="next"
                :value="value"
                :markDate="markDate"
                :responsive="true"
16
                :isChangeStyle ="true"
17
                :illustration="illustration"
ibizdev's avatar
ibizdev committed
18 19 20
                @select="clickDay"
                @selectYear="selectYear"
                @selectMonth="selectMonth"
KK's avatar
KK committed
21
                :sign="sign"
ibizdev's avatar
ibizdev committed
22
                :events="eventsDate"
KK's avatar
KK committed
23
                :tileContent="tileContent"></app-calendar>
ibizdev's avatar
ibizdev committed
24 25 26
    <#--  日历样式----天  -->  
    <#elseif ctrl.getCalendarStyle() == "DAY">
            <div class="calendar-tools">
KK's avatar
KK committed
27 28
                <div class="calendar-prev" @click="prevDate"><ion-icon name="chevron-back-outline"></ion-icon></div>
                <div class="calendar-next" @click="nextDate"><ion-icon name="chevron-forward-outline"></ion-icon></div>
ibizdev's avatar
ibizdev committed
29 30 31 32 33 34
                <div class="calendar-info">
                {{year}}年{{month+1}}月{{day}}日
                </div>
            </div>
    <#--  日历样式----周  -->
    <#elseif ctrl.getCalendarStyle() == "WEEK" || ctrl.getCalendarStyle() == "WEEK_TIMELINE">
KK's avatar
KK committed
35
            <app-calendar
ibizdev's avatar
ibizdev committed
36 37 38 39 40 41
                ref="calendar"
                :weekSwitch="true"
                :value="value"
                @prev="prev"
                @next="next"
                :markDate="markDate"
42
                :illustration="illustration"
ibizdev's avatar
ibizdev committed
43 44
                :responsive="true"
                @select="clickDay"
KK's avatar
KK committed
45
                :sign="sign"
ibizdev's avatar
ibizdev committed
46 47
                @selectYear="selectYear"
                @selectMonth="selectMonth"
KK's avatar
KK committed
48
                :tileContent="tileContent"></app-calendar>
ibizdev's avatar
ibizdev committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
    <#--  日历样式----时间轴  -->
    <#elseif ctrl.getCalendarStyle() == "TIMELINE">
           
    <#--  日历样式----空  -->
    <#else>
    </#if>
    <#--  BEGIN:输出分页头部  -->
    <#if ctrl.getPSSysCalendarItems()??>
        <#assign state=false>
        <#list ctrl.getPSSysCalendarItems() as calendarItem><#if calendarItem_index gt 0><#assign state=true><#break></#if></#list>
        <#if state>
            <ion-segment :value="activeItem" @ionChange="ionChange">
            <#list ctrl.getPSSysCalendarItems() as calendarItem>
                <ion-segment-button value="${calendarItem.getItemType()?lower_case}">
                    <ion-label>${calendarItem.getName()}</ion-label>
                </ion-segment-button>
            </#list>
            </ion-segment>
        </#if>
    </#if>
    <#--  END:输出分页头部  -->
    <#if ctrl.getCalendarStyle() == "TIMELINE">
            <div class="calendar-events">
72
                <van-steps active-icon="passed" inactive-icon="passed" direction="vertical">
ibizdev's avatar
ibizdev committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
                    <van-step v-for="i in count" :key="i">
                        <p>{{year}}-{{month+1}}-{{i}}</p>
                        <template v-for="(it,index) in evendata[activeItem]">
                        <div v-if="it.time == year+'-'+month+1+'-'+i || it.time == year+'-'+'0'+(month+1)+'-'+i "  :key="index"  class="even-box">
                        <template v-for="item in it.evens">
<#-- BENGIN: 事件内容项 -->                    
<#ibizinclude>./EVENTS_CONTENT.vue.ftl</#ibizinclude>
<#--  END: 事件内容项 -->
                        </template>
                        <ion-icon @click="remove([item])" class="event-delete" name="close-outline"></ion-icon>
                        </div>
                        </template>
                    </van-step>
                </van-steps>
            </div>

    <#elseif ctrl.getCalendarStyle() == "MONTH_TIMELINE" || ctrl.getCalendarStyle() == "WEEK_TIMELINE">
            <div class="calendar-events">
91
                <van-steps active-icon="passed" inactive-icon="passed" direction="vertical">
ibizdev's avatar
ibizdev committed
92 93
                    <van-step v-for="(i,index) in evendata[activeItem]" :key="index">
                        <p>{{i.time}}</p>
94
                        <div class="touch"  v-for="(item,index) in i.evens" :key="index" @touchstart="touchStart" @touchend="touchEnd">
KK's avatar
KK committed
95
                            <ion-checkbox  v-show="showCheack" class="touch-checkbox" @click.stop="checkboxSelect(item)"></ion-checkbox>
96 97 98 99
                            <div  :key="item.id" class="even-box">
    <#-- BENGIN: 事件内容项 -->                    
    <#ibizinclude>./EVENTS_CONTENT.vue.ftl</#ibizinclude>
    <#--  END: 事件内容项 -->
KK's avatar
KK committed
100
                            <ion-icon v-show="!showCheack" @click="remove([item])" class="event-delete" name="close-outline"></ion-icon>
101
                            </div>
ibizdev's avatar
ibizdev committed
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
                        </div>
                    </van-step>
                </van-steps>
            </div>
    <#else>
            <div class="calendar-events">
                <ion-list>
                    <ion-item v-for="item in calendarItems[activeItem]"  :key="item.id" @click="onEventClick(item)">
                    <ion-label>{{item.title}}</ion-label>
                    <div slot="end">
                        <div >
                            <span class="events-label">执行人 </span>
                            <span class="events-content">{{ item.createman }}</span>
                        </div>
                    </div>
                    </ion-item>
                </ion-list>
            </div>
    </#if>
        </div>
  </#if>
    </div>
</template>