<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
    <view slot="info" class="container main">
        <view class="zero one">
            <view class="one_1">
                <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入比赛名称" />
            </view>
            <view class="one_2">
                <button type="primary" size="mini" bindtap="toAdd">添加</button>
            </view>
        </view>
        <view class="zero two">
            <scroll-view scroll-y="true" class="scroll-view">
                <view class="list-scroll-view">
                    <view class="list" wx:for="{{list}}" wx:key="item">
                        <view class="info">
                            <view class="list_1">
                                <image class="image" src="{{item.logo&&item.logo.length>0?item.logo[0].url:''}}"></image>
                            </view>
                            <view class="list_2">
                                <view class="name">
                                    <text class="status">{{item.status=='0'?'报名中':item.status=='1'?'报名截止':item.status=='2'?'报名结束':item.status=='3'?'发布秩序册':item.status=='4'?'比赛中':item.status=='5'?'比赛结束':'暂无'}}</text>
                                    <text>{{item.name}}</text>
                                </view>
                                <view class="other">
                                    <view class="other_1">
                                        <text>报名时间：</text>
                                        <text>{{item.sign_end_time}}</text>
                                    </view>
                                    <view class="other_1">
                                        <text>比赛时间：</text>
                                        <text>{{item.start_time}}-{{item.end_time}}</text>
                                    </view>
                                    <view class="other_1">
                                        <text>比赛地点：</text>
                                        <text>{{item.address}}</text>
                                    </view>
                                </view>
                            </view>
                        </view>
                        <view class="btn">
                            <button type="primary" size="mini" bindtap="toEdit" data-item="{{item}}">信息维护</button>
                            <button type="primary" size="mini" bindtap="toGroup" data-item="{{item}}">赛事组别</button>
                            <button type="primary" size="mini" bindtap="toStatus" data-item="{{item}}">赛事状态</button>
                            <button type="default" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
                            <button type="warn" size="mini" bindtap="toDel" data-item="{{item}}">赛事删除</button>
                        </view>
                    </view>
                </view>
            </scroll-view>
        </view>
    </view>
</mobile-main>
<e-dialog dialog="{{dialog}}" bind:toClose="toClose">
    <view slot="info">
        <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
            <form catchsubmit="onSubmit">
                <view class="content" style="display: none;">
                    <view class="label">数据id</view>
                    <view class="value">
                        <input type="text" name="_id" value="{{form._id}}" placeholder="请输入数据id" />
                    </view>
                </view>
                <view class="content">
                    <view class="label">赛事状态</view>
                    <view class="value">
                        <picker mode="selector" bindchange="statusChange" value="{{form.status}}" name="status" range-key='value' range="{{statusList}}">
                            <view class="input">{{form.status=='0'?'报名中':form.status=='1'?'报名截止':form.status=='2'?'报名结束':form.status=='3'?'发布秩序册':form.status=='4'?'比赛中':form.status=='5'?'比赛结束':'请选择赛事状态'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="btn">
                    <button type="primary" size="mini" form-type="submit">提交保存</button>
                </view>
            </form>
        </view>
    </view>
</e-dialog>