<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
    <view slot="info" class="container main">
        <view class="one">
            <form catchsubmit="onSubmit">
                <view class="content">
                    <view class="label">比赛名称</view>
                    <view class="value">
                        <picker bindchange="matchChange" name="match_id" value="{{form.match_id}}" range-key='name' range="{{matchList}}">
                            <view class="input">{{form.match_name||'请选择赛事'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">赛事组别</view>
                    <view class="value">
                        <picker bindchange="grpupChange" name="grouping_id" value="{{form.grouping_id}}" range-key='name' range="{{groupingList}}">
                            <view class="input">{{form.grouping_name||'请选择赛事组别'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">组内项目</view>
                    <view class="value">
                        <picker bindchange="projectChange" name="project_id" value="{{form.project_id}}" range-key='name' range="{{projectList}}">
                            <view class="input">{{form.project_name||'请选择组内项目'}}</view>
                        </picker>
                    </view>
                </view>
                <view class="content">
                    <view class="label">分组数</view>
                    <view class="value">
                        <input type="number" name="team_number" value="{{form.team_number}}" placeholder="请输入分组数" />
                    </view>
                </view>
                <view class="btn">
                    <button type="primary" size="mini" formType="submit">提交组项信息条件</button>
                    <button type="primary" size="mini" bindtap="onekeySubmit" wx:if="{{list&&list.length>0}}">一键保存分组信息</button>
                </view>
            </form>
        </view>
        <view class="two">
            <view class="two_1">
                <view class="list" wx:for="{{list}}" wx:for-item="item" wx:key="index" wx:for-index="index">
                    <view class="name">
                        <view class="name_1">{{item.name}}</view>
                        <view class="name_2"><button type="warn" size="mini" bindtap="teamDel" data-item="{{item}}">删除组</button></view>
                    </view>
                    <view class="person">
                        <view class="personList" wx:for="{{item.person}}" wx:for-item="tag" wx:key="tagIndex">
                            <image class="icon" src="{{tag.icon[0].url||bg}}"></image>
                            <view class="name">{{tag.name||tag.names}}</view>
                            <view class="btn"><button type="warn" size="mini" bindtap="personDel" data-tag="{{tag}}" data-group="{{item}}">删除</button></view>
                        </view>
                    </view>
                </view>
            </view>

        </view>
    </view>
</mobile-main>