<!--
 * @Descripttion: 当前组件信息-闯关奖励设置
 * @version: 1.0.0
 * @Author: 无尘
 * @Date: 2019-11-21 16:37:02
 * @LastEditors: 无尘
 * @LastEditTime: 2019-12-09 15:07:48
 -->
<!--
<competition-award></competition-award>

import competitionAward from '@/components/active-config/configs/competition-award.vue';
-->

<template>
  <div class="competition-award border-box">
    <el-form
      label-width="154px"
      :model="compitionAward"
      ref="rewardForm"
      :rules="rules"
    >
      <el-form-item
        label="闯关指标（多选）："
        prop=""
      >
        <ul class="flex ">
          <template v-for="(item, index) in modeData">
            <li
              v-if="index == 0"
              :class="['li-cell li-second-cell flex-1 ', compitionAward.dealNumberFlag == 1 ? 'li-second-active' : '']"
              :key="index + 'first'"
              @click="selectStore(item)"
            >
              <div class="li-cell-inner">
                <div class="li-cell-bottom border-box">
                  <div class="li-cell-scene">
                    <div class="li-cell-scene_title font-14 color-303133">{{ item.goalName }}</div>
                    <div class="li-cell-scene_text font-14 color-606266">{{ item.describe }}</div>
                  </div>
                </div>
              </div>
              <div class="common-cell-check">
                <div class="common-cell-triangle">
                  <div class="common-cell-outer">
                    <i class="el-icon-upload-success el-icon-check"></i>
                  </div>
                </div>
              </div>
            </li>
            <li
              v-if="index == 1  && basePath.map(ele => ele.transName).includes('消费') && compitionAward.stepType == 6"
              :class="['li-cell li-second-cell flex-1 ', compitionAward.dealAmountFlag == 1 ? 'li-second-active' : '']"
              :key="index + 'first'"
              @click="selectStore(item)"
            >
              <div class="li-cell-inner">
                <div class="li-cell-bottom border-box">
                  <div class="li-cell-scene">
                    <div class="li-cell-scene_title font-14 color-303133">{{ item.goalName }}</div>
                    <div class="li-cell-scene_text font-14 color-606266">{{ item.describe }}</div>
                  </div>
                </div>
              </div>
              <div class="common-cell-check">
                <div class="common-cell-triangle">
                  <div class="common-cell-outer">
                    <i class="el-icon-upload-success el-icon-check"></i>
                  </div>
                </div>
              </div>
            </li>
          </template>
        </ul>
      </el-form-item>
      <el-form-item
        v-if="compitionAward.dealNumberFlag == 1"
        class="m-t-20"
        label="成交人数竞赛奖项："
        prop=""
      >
        <div class="w-1019">
          <el-table
            :data="compitionAward.dealNumberSettingParam"
            style="width: 100%"
          >
            <el-table-column
              label="奖项名称"
              width="307"
            >
              <template slot-scope="scope">
                <div class="cell">
                  <limitInput
                    :inputWidth="275"
                    :disflag="$route.query.editFlag ? true : false"
                    :inputValue.sync="scope.row.awardName"
                    :holder="'请输入奖项名称'"
                    :getByType="'char'"
                    :maxLength="20"
                  > </limitInput>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              label="排名"
              width="405"
            >
              <template slot-scope="scope">
                <div class="cell">
                  <div v-if="scope.$index == 0">
                    <span class="font-14 color-606266 p-r-10">前</span>
                    <el-input-number
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.end"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <span class="font-14 color-606266 p-l-10">名</span>
                  </div>
                  <div v-if="scope.$index != 0 && scope.$index != compitionAward.dealNumberSettingParam.length - 1">
                    <span class="font-14 color-606266 p-r-10">第</span>
                    <el-input-number
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.start"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <span class="font-14 color-606266 p-l-10 p-r-10">名 至</span>
                    <el-input-number
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.end"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <span class="font-14 color-606266 p-l-10">名</span>
                  </div>
                  <div v-if="scope.$index != 0 && scope.$index == compitionAward.dealNumberSettingParam.length - 1">
                    <span class="font-14 color-606266 p-r-10">第</span>
                    <el-input-number
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.start"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <span
                      v-if="!scope.row.infinity"
                      class="font-14 color-606266 p-l-10 p-r-10"
                    >人 至</span>
                    <el-input-number
                      v-if="!scope.row.infinity"
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.end"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <el-checkbox
                      v-if="scope.$index == compitionAward.dealNumberSettingParam.length - 1"
                      class="m-l-10"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.infinity"
                      @change="changeEnd($event, scope.row)"
                    >无穷大</el-checkbox>
                  </div>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              label="奖品"
              width="300"
            >
              <template slot-scope="scope">
                <div class="cell flex flex-align-center">
                  <div>
                    <div>
                      <el-checkbox v-model="scope.row.pointCheck">积分</el-checkbox>
                      <el-input-number
                        class="w-146"
                        :disabled="$route.query.editFlag"
                        v-model="scope.row.point"
                        controls-position="right"
                        :min="1"
                        :max="999999"
                      > </el-input-number>
                    </div>
                    <div class="m-t-10">
                      <el-checkbox v-model="scope.row.cardCheck">卡券</el-checkbox>
                      <el-select
                        class="w-146"
                        :disabled="$route.query.editFlag"
                        v-model="scope.row.cardId"
                        placeholder="请选择"
                        @change="changeCard($event, scope.row)"
                      >
                        <el-option
                          v-for="item in cardList"
                          :key="item.coupCardId"
                          :label="item.cardName"
                          :value="item.coupCardId"
                        > </el-option>
                      </el-select>
                    </div>
                  </div>
                  <el-button
                    v-if="scope.$index != 0"
                    class="m-l-16"
                    :disabled="$route.query.editFlag"
                    @click.stop="deleteRow(scope.$index, compitionAward.dealNumberSettingParam)"
                    type="text"
                    size="small"
                  >
                    删除
                  </el-button>
                </div>
              </template>
            </el-table-column>
          </el-table>
          <div
            class="add-line text-center cursor-pointer"
            @click="addPeopleItem"
          ><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
        </div>
      </el-form-item>
      <el-form-item
        v-if="compitionAward.dealAmountFlag == 1"
        class="m-t-20"
        label="成交额竞赛奖项: "
        prop=""
      >
        <div class="w-1019">
          <el-table
            :data="compitionAward.dealAmountSettingParam"
            style="width: 100%"
          >
            <el-table-column
              label="奖项名称"
              width="307"
            >
              <template slot-scope="scope">
                <div class="cell">
                  <limitInput
                    :inputWidth="275"
                    :disflag="$route.query.editFlag ? true : false"
                    :inputValue.sync="scope.row.awardName"
                    :holder="'请输入奖项名称'"
                    :getByType="'char'"
                    :maxLength="20"
                  > </limitInput>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              label="排名"
              width="405"
            >
              <template slot-scope="scope">
                <div class="cell">
                  <div v-if="scope.$index == 0">
                    <span class="font-14 color-606266 p-r-10">前</span>
                    <el-input-number
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.end"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <span class="font-14 color-606266 p-l-10">名</span>
                  </div>
                  <div v-if="scope.$index != 0 && scope.$index != compitionAward.dealAmountSettingParam.length - 1">
                    <span class="font-14 color-606266 p-r-10">第</span>
                    <el-input-number
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.start"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <span class="font-14 color-606266 p-l-10 p-r-10">名 至</span>
                    <el-input-number
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.end"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <span class="font-14 color-606266 p-l-10">名</span>
                  </div>
                  <div v-if="scope.$index != 0 && scope.$index == compitionAward.dealAmountSettingParam.length - 1">
                    <span class="font-14 color-606266 p-r-10">第</span>
                    <el-input-number
                      class="w-90"
                      :disabled="$route.query.editFlag"
                      v-model="scope.row.start"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <span
                      v-if="!scope.row.infinity"
                      class="font-14 color-606266 p-l-10 p-r-10"
                    >人 至</span>
                    <el-input-number
                      :disabled="$route.query.editFlag"
                      v-if="!scope.row.infinity"
                      v-model="scope.row.end"
                      class="w-90"
                      controls-position="right"
                      :min="1"
                      :max="9999999999"
                    > </el-input-number>
                    <el-checkbox
                      :disabled="$route.query.editFlag"
                      v-if="scope.$index == compitionAward.dealAmountSettingParam.length - 1"
                      class="m-l-10"
                      v-model="scope.row.infinity"
                      @change="changeEnd($event, scope.row)"
                    >无穷大</el-checkbox>
                  </div>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              label="奖品"
              width="300"
            >
              <template slot-scope="scope">
                <div class="cell flex flex-align-center">
                  <div>
                    <div>
                      <el-checkbox v-model="scope.row.pointCheck">积分</el-checkbox>
                      <el-input-number
                        class="w-146"
                        :disabled="$route.query.editFlag"
                        v-model="scope.row.point"
                        controls-position="right"
                        :min="1"
                        :max="999999"
                      > </el-input-number>
                    </div>
                    <div class="m-t-10">
                      <el-checkbox v-model="scope.row.cardCheck">卡券</el-checkbox>
                      <el-select
                        class="w-146"
                        :disabled="$route.query.editFlag"
                        v-model="scope.row.cardId"
                        placeholder="请选择"
                        @change="changeCard($event, scope.row)"
                      >
                        <el-option
                          v-for="item in cardList"
                          :key="item.coupCardId"
                          :label="item.cardName"
                          :value="item.coupCardId"
                        > </el-option>
                      </el-select>
                    </div>
                  </div>
                  <el-button
                    v-if="scope.$index != 0"
                    class="m-l-16"
                    :disabled="$route.query.editFlag"
                    @click.stop="deleteRow(scope.$index, compitionAward.dealAmountSettingParam)"
                    type="text"
                    size="small"
                  >
                    删除
                  </el-button>
                </div>
              </template>
            </el-table-column>
          </el-table>
          <div
            class="add-line text-center cursor-pointer"
            @click="addMoneyItem"
          ><i class="el-icon-plus color-1890ff"></i><span class="color-1890ff font-14 p-l-10">添加奖项</span></div>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import limitInput from '@/components/limit-input.vue';
import errMsg from '@/common/js/error';
import { getRequest } from '@/api/api';
export default {
  name: 'competition-award',
  props: {
    value: {
      type: [Object, Array],
      default() {
        return {
          dealNumberFlag: 1, //成交人数开关 1开启
          dealAmountFlag: 0, //成交额开关 1开启
          dealNumberSettingParam: [
            {
              awardName: '',
              start: 0,
              end: 5,
              infinity: false,
              point: 1,
              pointCheck: false,
              cardId: '',
              cardName: '',
              cardCheck: false
            }
          ], //成交人数奖项 成交人数奖项json
          dealAmountSettingParam: [
            {
              awardName: '',
              start: 0,
              end: 5,
              infinity: false,
              point: 1,
              pointCheck: false,
              cardId: '',
              cardName: '',
              cardCheck: false
            }
          ], //成交额奖项 成交额奖项json
          "stepType": 1 //步骤类型 类型：1服务号关注，2活动营销页访问奖励，3会员认证奖励，4游戏参与奖励，5卡券领取奖励6，消费奖励
        };
      }
    }
  },
  components: {
    limitInput
  },
  data() {
    return {
      basePath: [],
      compitionAward: {
        dealNumberFlag: 1, //成交人数开关 1开启
        dealAmountFlag: 0, //成交额开关 1开启
        dealNumberSettingParam: [], //成交人数奖项 成交人数奖项json
        dealAmountSettingParam: [], //成交额奖项 成交额奖项json
        stepType: 1 //步骤类型 类型：1服务号关注，2活动营销页访问奖励，3会员认证奖励，4游戏参与奖励，5卡券领取奖励6，消费奖励
      },
      modeData: [
        {
          goalId: 1,
          goalName: '成交人数（推荐）',
          describe: '以完成规定消费行为的受邀人数量作为计数指标',
          check: false
        },
        {
          goalId: 2,
          goalName: '成交额',
          describe: '以受邀人的总消费金额作为计数指标（单个受邀人多次消费作累计计数）',
          check: false
        }
      ],
      cardList: [] //卡券数据
    };
  },
  methods: {
    /**
     * 表单提交
     */
    submitForm() {
      const that = this;
      return new Promise(function(resolve, reject) {
        that.$refs['rewardForm'].validate(valid => {
          if (valid) {
            that.$emit('input', that.compitionAward);
            if (that.compitionAward.dealNumberFlag == 1 && !that.compitionAward.dealNumberSettingParam.length) {
              resolve(false);
            }
            if (that.compitionAward.dealNumberFlag == 1  && that.compitionAward.dealNumberSettingParam.length) {
              let flag = true;
              that.compitionAward.dealNumberSettingParam.forEach(ele => {
                if (!ele.awardName ||(ele.cardCheck && !ele.cardId) || (!ele.pointCheck && !ele.cardCheck)) {
                  flag = false;
                }
              });
              if (!flag) {
                resolve(false);
              }
            }
            // 阶梯奖励没有勾选无穷大判断
            if(that.compitionAward.dealNumberFlag == 1 && that.compitionAward.dealNumberSettingParam.length>1&&!that.compitionAward.dealNumberSettingParam[that.compitionAward.dealNumberSettingParam.length-1].infinity) {
              resolve(false);
            }
            // 阶梯奖励中顺序值判断
            if(that.compitionAward.dealNumberFlag == 1 && that.compitionAward.dealNumberSettingParam.length>1){
              const arr = [];
              that.compitionAward.dealNumberSettingParam.forEach(ele => {
                arr.push(ele.start);
                if(ele.end != -1) {
                  arr.push(ele.end);
                }
              });
              let flag = true
              for(let i = 0; i<arr.length-1; i++) {
                for(let j = i+1; j<arr.length; j++){
                  if(arr[i]>=arr[j]){
                    flag = false;
                    break;
                  }
                }
                if (!flag) {
                  break;
                }
              }
              if (!flag) {
                resolve(false);
              }
            }

            if (that.compitionAward.dealAmountFlag == 1 && !that.compitionAward.dealAmountSettingParam.length) {
              resolve(false);
            }
            if (that.compitionAward.dealAmountFlag == 1  && that.compitionAward.dealAmountSettingParam.length) {
              let flag = true;
              that.compitionAward.dealAmountSettingParam.forEach(ele => {
                if (!ele.awardName ||(ele.cardCheck && !ele.cardId) || (!ele.pointCheck && !ele.cardCheck)) {
                  flag = false;
                }
              });
              if (!flag) {
                resolve(false);
              }
            }
            // 阶梯奖励没有勾选无穷大判断
            if(that.compitionAward.dealAmountFlag == 1 && that.compitionAward.dealAmountSettingParam.length>1&&!that.compitionAward.dealAmountSettingParam[that.compitionAward.dealAmountSettingParam.length-1].infinity) {
              resolve(false);
            }
            // 阶梯奖励中顺序值判断
            if(that.compitionAward.dealAmountFlag == 1 && that.compitionAward.dealAmountSettingParam.length>1){
              const arr = [];
              that.compitionAward.dealAmountSettingParam.forEach(ele => {
                arr.push(ele.start);
                if(ele.end != -1) {
                  arr.push(ele.end);
                }
              });
              let flag = true
              for(let i = 0; i<arr.length-1; i++) {
                for(let j = i+1; j<arr.length; j++){
                  if(arr[i]>=arr[j]){
                    flag = false;
                    break;
                  }
                }
                if (!flag) {
                  break;
                }
              }
              if (!flag) {
                resolve(false);
              }
            }
            resolve(that.compitionAward);
          } else {
            resolve(false);
          }
        });
      });
    },
    /**
     * 选择即时奖励模式：
     */
    selectStore(item) {
      const that = this;
      if (that.$route.query.hasOwnProperty('editFlag')) {
        return false;
      }
      if (item.goalId == 1) {
        that.compitionAward.dealNumberFlag = that.compitionAward.dealNumberFlag == 0 ? 1 : 0;
      } else {
        that.compitionAward.dealAmountFlag = that.compitionAward.dealAmountFlag == 0 ? 1 : 0;
      }
    },
    /**
     * 删除：
     */
    deleteRow(index, arr) {
      // const that = this;
      arr.splice(index, 1);
    },
    /**
     * 阶梯奖励添加奖项：
     */
    changeEnd(e, row) {
      row.end = e ? -1 : '';
    },
    /**
     * 选择卡券
     */
    changeCard(e, row) {
      const that = this;
      that.cardList.forEach(ele => {
        if (ele.coupCardId == e) {
          row.cardName = ele.cardName;
        }
      });
    },
    /**
     * 成交人添加奖项：
     */
    addPeopleItem() {
      const that = this;
      if (that.$route.query.hasOwnProperty('editFlag')) {
        return false;
      }
      if(that.compitionAward.dealNumberSettingParam.length < 2 || !that.compitionAward.dealNumberSettingParam.map(ele=>ele.infinity).includes('true')) {
        that.compitionAward.dealNumberSettingParam.push({
          awardName: '',
          start: that.compitionAward.dealNumberSettingParam.length == 0? 0 : 2,
          end: 5,
          infinity: false,
          point: 1,
          pointCheck: false,
          cardId: '',
          cardName: '',
          cardCheck: false
        });
        return false;
      }
      if(that.compitionAward.dealNumberSettingParam.length >= 2 && that.compitionAward.dealNumberSettingParam.map(ele=>ele.infinity).includes('true')) {
        that.compitionAward.dealNumberSettingParam.splice(-1, 0,{
          awardName: '',
          start: 2,
          end: 5,
          infinity: false,
          point: 1,
          pointCheck: false,
          cardId: '',
          cardName: '',
          cardCheck: false
        });
      }
    },
    addMoneyItem() {
      const that = this; //成交额奖项 成交额奖项json
      if (that.$route.query.hasOwnProperty('editFlag')) {
        return false;
      }
      console.log(that.compitionAward.dealAmountSettingParam)
      if(that.compitionAward.dealAmountSettingParam.length < 2 || !that.compitionAward.dealAmountSettingParam.map(ele=>ele.infinity).includes('true')) {
        that.compitionAward.dealAmountSettingParam.push({
          awardName: '',
          start: that.compitionAward.dealAmountSettingParam.length == 0? 0 : 2,
          end: 5,
          infinity: false,
          point: 1,
          pointCheck: false,
          cardId: '',
          cardName: '',
          cardCheck: false
        });
        return false;
      }
      if(that.compitionAward.dealAmountSettingParam.length >= 2 && that.compitionAward.dealAmountSettingParam.map(ele=>ele.infinity).includes('true')) {
        that.compitionAward.dealAmountSettingParam.splice(-1, 0,{
          awardName: '',
          start: 2,
          end: 5,
          infinity: false,
          point: 1,
          pointCheck: false,
          cardId: '',
          cardName: '',
          cardCheck: false
        });
      }
    },
    /**
     * 获取卡券列表
     */
    getCardList() {
      const that = this;
      let para = {};
      getRequest('/sharing-core-web/list-card', para)
        .then(res => {
          let resData = res.data;
          if (resData.errorCode == 1) {
            that.cardList = resData.result || [];
            return false;
          }
          errMsg.errorMsg(resData);
        })
        .catch(function(error) {
          that.$message.error({
            duration: 1000,
            message: error.message
          });
        });
    }
  },
  watch: {
    value(newData) {
      const that = this;
      that.compitionAward = JSON.parse(JSON.stringify(newData));
    }
  },
  mounted() {
    const that = this;
    that.getCardList();
    that.compitionAward = JSON.parse(JSON.stringify(that.value));
    if (Object.keys(that.$store.state.baseInfo).length) {
      that.basePath = JSON.parse(JSON.stringify(that.$store.state.baseInfo)).router;
      console.log('basePath:',that.basePath)
    }
  }
};
</script>
<style lang="less" scoped>
.p-l-3 {
  padding-left: 3px;
}
.p-l-10 {
  padding-left: 10px;
}
.p-r-10 {
  padding-right: 10px;
}
.m-l-10 {
  margin-left: 10px;
}
.m-l-16 {
  margin-left: 16px;
}
.m-t-10 {
  margin-top: 10px;
}
.w-90 {
  width: 90px;
}
.w-146 {
  width: 146px;
}
.w-1019 {
  width: 1019px;
}
.competition-award {
  width: 100%;
  padding: 20px;
  background: #fff;
  .competition-award-title {
    margin: 0 auto;
    text-align: center;
    font-weight: 600;
    line-height: 30px;
    padding-top: 27px;
    margin-bottom: 48px;
  }
  .m-b-0 {
    margin-bottom: 0;
  }
  .m-t-48 {
    margin-top: 48px;
  }
  .m-t-50 {
    margin-top: 50px;
  }
  .competition-award-subtitle {
    width: 800px;
    margin: 14px auto;
    line-height: 20px;
    font-weight: 500;
    text-align: center;
  }
  ul {
    .li-cell {
      position: relative;
      width: 427px;
      // height: 131px;
      background: rgba(255, 255, 255, 1);
      border-radius: 4px;
      border: 1px solid rgba(220, 223, 230, 1);
      margin-left: 10px;
      cursor: pointer;
      max-width: 30%;
      &:first-child {
        margin-left: 0;
      }
      .li-cell-inner {
        border-radius: 4px;
        width: 100%;
        height: 100%;
        .li-cell-left {
          height: 100%;
          padding-left: 30px;
          img {
            max-width: 66px;
            max-height: 66px;
          }
        }
        .li-cell-right {
          height: 100%;
          padding: 16px 36px;
          .li-cell-active_name {
            font-weight: 600;
            line-height: 25px;
          }
          .li-cell-active_describe {
            margin-top: 13px;
            font-weight: 500;
            line-height: 20px;
          }
        }
      }
      .common-cell-check {
        display: none;
        position: absolute;
        right: 0;
        bottom: 0;
        width: 22px;
        height: 22px;
        z-index: 1;
        .common-cell-triangle {
          position: relative;
          width: 100%;
          height: 100%;
          overflow: hidden;
          .common-cell-outer {
            position: absolute;
            right: -16px;
            bottom: -6px;
            width: 32px;
            height: 20px;
            background: #1890ff;
            text-align: center;
            -webkit-transform: rotate(-45deg);
            -moz-transform: rotate(-45deg);
            transform: rotate(-45deg);

            i {
              position: absolute;
              top: 0px;
              left: 7px;
              font-size: 12px;
              color: #fff;
              -webkit-transform: rotate(45deg);
              -moz-transform: rotate(45deg);
              transform: rotate(45deg);
            }
          }
        }
      }
      /* 二级 */
      &.li-second-cell {
        max-width: 265px;
        // height: 141px;
        padding: 20px;
        .li-cell-inner {
          .li-cell-bottom {
            // height: 60px;
            background: #fff;
            border-radius: 0 0 4px 4px;
            .li-cell-scene {
              .li-cell-scene_title {
                font-weight: 600;
                line-height: 20px;
              }
              .li-cell-scene_text {
                margin-top: 10px;
                font-weight: 500;
                line-height: 20px;
                /* text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 3; //规定几行显示省略号
                -webkit-box-orient: vertical;
                overflow: hidden; */
              }
            }
          }
        }
        .common-cell-check {
          .common-cell-triangle {
            .common-cell-outer {
              background: #1890ff;
              i {
                color: #fff;
              }
            }
          }
        }
      }
      &.li-second-active {
        border-radius: 4px;
        border: 2px solid rgba(24, 144, 255, 1);
        box-shadow: 0px 6px 8px 0px rgba(166, 181, 199, 0.34);
        .common-cell-check {
          display: block;
          .common-cell-triangle {
            border-bottom-right-radius: 1px;
          }
        }
      }
    }
  }
  .add-line {
    height: 50px;
    line-height: 50px;
    background: #fff;
    border-bottom: 1px solid #ebeef5;
  }
  .store-select-wrap {
    width: 580px;
    // height: 470px;
    margin-top: 10px;
    padding: 20px;
    background: rgba(245, 247, 250, 1);
    &.w-845 {
      width: 845px;
    }
    .add-line {
      height: 50px;
      line-height: 50px;
      background: #fff;
    }
    .el-input-number {
      width: 123px;
    }
    .store-select-body {
      margin-top: 20px;
    }
    &.child-select-wrap {
      padding-left: 20px;
      .el-input-number {
        width: 123px;
      }
    }
  }
}
</style>
