<div class="modal fade" tabindex="-1" role="dialog" id="addFeatureModal">
    <div class="modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable">
        <div class="modal-content">
            <div class="modal-body">
                <div class="container-fluid">
                    <div class="row text-primary">
                        <label class="col-2">特征组起始标记</label>
                        <label class="col-1">运算规则</label>
                        <label class="col-2">特征类型</label>
                        <label class="col-1">特征逻辑</label>
                        <label class="col-4">特征内容</label>
                        <label class="col-2">特征组结束标记</label>
                    </div>
                    <div class="row" v-for="(feature,i) in features">
                        <div class="col-1">
                            <span class="fa fa-minus-square pull-right mt-1" v-if="features.length > 1" style="cursor: pointer" @click="delFeature(i)"></span>
                        </div>
                        <div class="col-1 text-center custom-control custom-checkbox" >
                            <input type="checkbox" class="custom-control-input" :id="'checkStart-'+i" v-model="feature.strategyGroupStartSign">
                            <label class="custom-control-label" :for="'checkStart-'+i"></label>
                        </div>
                        <label class="col-1">
                            <select class="form-control form-control-sm" v-if="i != 0" v-model="feature.calculation">
                                <option value="并且">并且</option>
                                <option value="或">或</option>
                            </select>
                        </label>
                        <label class="col-2">
                            <select class="form-control form-control-sm" v-model="feature.type">
                                <option v-for="t in type" :value="t" v-if="(thisIndex == '-1' && t != '商品名称') || (thisIndex != '-1' && t=='商品名称')">@{{ t }}</option>
                            </select>
                        </label>
                        <label class="col-1">
                            <select class="form-control form-control-sm" v-model="feature.logic">
                                <option v-for="l in logic" :value="l" v-if="thisIndex == '-1' || l != '不包含'">@{{ l }}</option>
                            </select>
                        </label>
                        <label class="col-4">
                            <input class="form-control form-control-sm" v-model="feature.describe">
                        </label>
                        <div class="col-1 text-center custom-control custom-checkbox">
                            <input type="checkbox" class="custom-control-input" :id="'checkEnd-'+i" v-model="feature.strategyGroupEndSign">
                            <label class="custom-control-label" :for="'checkEnd-'+i"></label>
                        </div>
                        <div class="col-1">
                            <span v-if="i == (features.length-1)" class="fa fa-plus-square pull-right mt-1" style="cursor: pointer" @click="addFeature()"></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" @click="submitFeature()">提交</button>
            </div>
        </div>
    </div>
</div>
