<template>
  <!-- 报告精选添加/编辑 -->
  <div class="add-choiceness">
    <el-card>
      <!-- 更新方式继承第几期 -->
      <el-row :gutter="24">
        <el-col :span="12">
          <el-select v-model="updateMode" placeholder="请选择更新方式" clearable @change="updateModeChange">
            <el-option label="重新编辑" value="重新编辑"></el-option>
            <el-option label="继承往期" value="继承往期"></el-option>
          </el-select>
        </el-col>
        <el-col :span="12">
          <el-select v-if="updateMode == '继承往期'" v-model="inheritNum" placeholder="选择继承第几期" clearable @change="getDetail">
            <el-option v-for="item in updateModeList" :key="item.Periods" :label="item.InheritPeriodsName" :value="item.Periods"></el-option>
          </el-select>
        </el-col>
      </el-row>
      <div v-show="updateMode">
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
          <!-- 标题 / 作者 /发布时间 -->
          <el-row :gutter="24" style="margin-top: 30px">
            <el-col :span="12">
              <el-form-item prop="title">
                <el-input v-model="ruleForm.title" placeholder="请输入标题"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item prop="author">
                <el-input v-model="ruleForm.author" placeholder="请输入作者"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item prop="time">
                <el-date-picker type="date" placeholder="选择发布时间" value-format="yyyy-MM-dd" v-model="ruleForm.time"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- 产品说明 -->
          <el-form-item prop="explain" style="margin-top: 10px">
            <el-input v-model="ruleForm.explain" placeholder="请输入产品说明"></el-input>
          </el-form-item>
          <!-- 变更说明 -->
          <!-- 富文本 -->
          <rich-text ref="oneRich" v-model="marketStrategy" :spareId="contentValue" :isText="contentText" />
          <el-form-item prop="reportLink">
            <div style="display: flex; align-items: center; margin-top: 10px">
              <span style="flex-shrink: 0">详细报告链接：</span>
              <el-input style="margin: 10px 0" v-model="ruleForm.reportLink" placeholder="请输入报告链接（弘则研报管理栏目下）"></el-input>
            </div>
          </el-form-item>
        </el-form>
        <!-- 产业/标的 模块 -->
        <div class="content-module">
          <draggable v-model="industryList" animation="300" @update="sortChange">
            <div class="content-industry" v-for="(item, index) in industryList" :key="item.ChartPermissionId">
              <div class="content-name" :class="industryIndex == index ? 'active' : ''" @click="industryBtn(item, index)">{{ item.ChartPermissionName }}</div>
            </div>
          </draggable>
          <div v-for="(item, index) in industryList" :key="item.ChartPermissionId">
            <div v-show="industryIndex == index">
              <RichText v-model="item.BodyChartSummary" :ref="'logic' + index" :spareId="'logictest' + index" :isText="contentTextLogic" />
              <draggable :list="item.List" animation="300" class="classification" filter=".addIndustrial" :move="onMove" @update="ificationSortChange">
                <div v-for="(val, num) in item.List" :key="val.ShowName" class="industrial" @click="ificationIndustrialBtn(val, num)" :class="num == ificationIndustrial ? 'pitch' : ''">
                  <span style="margin-right: 19px">{{ val.ShowName }}</span>
                  <span v-if="num == ificationIndustrial">
                    <img src="~@/assets/img/icons/edit1.png" style="width: 12px; height: 12px; marginright: 10px" @click="editText(val, num)" />
                    <i class="el-icon-close" @click="deleteClassify(val, num)"></i>
                  </span>
                </div>
                <div class="addIndustrial" @click="addMulti" v-if="industryIndex == index">
                  <i class="el-icon-plus"></i>
                  <span>添加标的/赛道</span>
                </div>
              </draggable>
              <template v-for="(val, num) in item.List">
                <div :key="val.IndustrialSubjectId" v-show="industryIndex == index">
                  <div class="industrial-is-new" v-show="num == ificationIndustrial">
                    <el-checkbox v-model="val.IsNew" :true-label="1" :false-label="0">显示new标签</el-checkbox>
                  </div>
                  <div style="margin-bottom: 20px; display: flex; align-items: center" v-show="num == ificationIndustrial">
                    <div style="display: flex; align-items: center" v-for="(son, num) in val.CompanyLabel" :key="num">
                      <el-input style="width: 260px; margin-right: 15px" v-model="son.name" placeholder="请输入公司标签"></el-input>
                      <img class="delete-item-icon" v-if="num > 0" @click="deleteLabelItem(val, num)" src="~@/assets/img/icons/delete-Item.png" alt="" />
                    </div>
                    <el-tooltip class="item" effect="dark" content="添加标签" placement="top-start">
                      <img @click="addLabelClick(val)" class="editsty" src="~@/assets/img/set_m/add_ico.png" />
                    </el-tooltip>
                  </div>
                  <rich-text :ref="'twoRich' + num" v-model="val.Body" :spareId="contentValueTwo" :isText="contentTextTwo" v-show="num == ificationIndustrial" />
                </div>
              </template>
            </div>
          </div>
        </div>

        <div>
          <div class="content-resource">
            <span class="resource">产业资源包：</span>
            <span class="show">{{ industrialSubjectName }}</span>
          </div>
          <div class="content-resource">
            <span class="resource">综述报告：</span>
            <span class="show">{{ overviewList.Title }}</span>
            <div style="margin-left: 20px">
              <el-switch @change="switchChangeHandler" v-model="overviewList.IsShowOverviewArticle" :active-value="1" :inactive-value="0" active-text="显示链接" inactive-text="不显示链接">
              </el-switch>
            </div>
          </div>
        </div>
        <div class="content-bottom">
          <el-button type="primary" @click="confirm('预览')">预览</el-button>
          <el-button type="primary" @click="confirm('保存')">保存</el-button>
          <el-button v-if="isShowStatus" type="primary" @click="confirm('发布')">发布</el-button>
          <el-button type="" @click="cancel">取消</el-button>
        </div>
      </div>
    </el-card>
    <!-- 弹框部分 -->
    <el-dialog v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center :visible.sync="addDialogVisible" width="560px" :before-close="handleClose">
      <div slot="title" style="display: flex; align-items: center">
        <img :src="dialogText == '编辑' ? $icons.editicon : $icons.add" style="color: #fff; width: 16px; height: 16px; margin-right: 5px" />
        <span style="font-size: 16px">{{ dialogText }}</span>
      </div>
      <div class="dlg-content">
        <el-autocomplete class="inline-input" v-model="stateValue" :trigger-on-focus="false" :fetch-suggestions="handleSearchResult" placeholder="请输入标的或赛道名称" clearable></el-autocomplete>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button v-if="dialogText == '编辑'" type="primary" @click="editconfirmPerson">确定</el-button>
        <el-button v-else type="primary" @click="confirmPerson">确定</el-button>
        <el-button @click="handleClose">取消</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import RichText from "./richText.vue";
import { raiInterface } from "@/api/api.js";
import draggable from "vuedraggable";
import TemplateMessage from "./apply/templateMessage.vue";

export default {
  name: "",
  components: { RichText, draggable, TemplateMessage },
  props: {},
  data() {
    return {
      contentValue: "one",
      contentText: "市场策略核心逻辑汇总",
      contentValueTwo: "two",
      contentTextTwo: "公司核心逻辑汇总",
      contentTextLogic: "行业核心逻辑汇总",
      updateMode: "", //更新方式
      inheritNum: "", //继承第几
      ruleForm: {
        title: "", //标题
        author: "", //作者
        time: "", //时间
        explain: "", //说明
        reportLink: "", //变更
      },
      rules: {
        title: [{ required: true, message: "请输入标题", trigger: "blur" }],
      },
      industryList: [], //行业
      industryIndex: 0, //
      ificationIndustrial: 0,
      addDialogVisible: false,
      dialogText: "",
      stateValue: "",
      companyList: [],
      timeout: null,
      isShowStatus: true,
      industrialSubjectName: "",
      chartPermissionId: "", //分类id
      subjectList: [],
      updateModeList: [], //期数的数组
      editNum: "",
      overviewList: {},
      marketStrategy: "",
      timeInterval: null, // 定时器
    };
  },
  computed: {},
  mounted() {
    if (this.$route.query.id) {
      this.isShowStatus = this.$route.query.status == 0;
      this.getDetail();
    } else {
      this.getNoTacticsfirst();
      this.dataInit();
    }
    this.getListPeriods();
  },
  methods: {
    // 报告的缓存处理数据
    dataInit() {
      if (sessionStorage.getItem("addChoicenessQY")) {
        let data = JSON.parse(sessionStorage.getItem("addChoicenessQY"));
        setTimeout(async () => {
          this.industryList = data.industryList;
          this.industryIndex = data.industryIndex;
          this.ificationIndustrial = data.ificationIndustrial;
          this.updateMode = data.updateMode;
          this.inheritNum = data.inheritNum;
          this.companyList = data.companyList;
          this.industrialSubjectName = data.industrialSubjectName;
          this.chartPermissionId = data.chartPermissionId;
          this.subjectList = data.subjectList;
          this.updateModeList = data.updateModeList;
          this.editNum = data.editNum;
          this.overviewList = data.overviewList;
          this.ruleForm = data.ruleForm;
          this.marketStrategy = data.MarketStrategy;
        }, 200);
      }
      this.timeInterval = setInterval(() => {
        let params = {
          industryList: this.industryList,
          industryIndex: this.industryIndex,
          ificationIndustrial: this.ificationIndustrial,
          updateMode: this.updateMode,
          inheritNum: this.inheritNum,
          companyList: this.companyList,
          industrialSubjectName: this.industrialSubjectName,
          chartPermissionId: this.chartPermissionId,
          subjectList: this.subjectList,
          updateModeList: this.updateModeList,
          editNum: this.editNum,
          overviewList: this.overviewList,
          ruleForm: this.ruleForm,
          MarketStrategy: this.marketStrategy,
        };
        sessionStorage.setItem("addChoicenessQY", JSON.stringify(params));
      }, 120000);
    },
    updateModeChange() {
      if (this.updateMode == "重新编辑") {
        this.init();
        this.industryList = [];
        this.getNoTacticsfirst();
      }
    },
    //获取编辑详情
    async getDetail() {
      const res = await raiInterface.reportSelectionDetail({ ArticleId: this.$route.query.id || "", Periods: this.inheritNum || "" });
      if (res.Ret === 200) {
        res.Data.List.forEach((item) => {
          if (!item.List || !item.List.length > 0) {
            item.List = [];
          }
        });
        this.updateMode = this.inheritNum ? this.updateMode : res.Data.AddType == "1" ? "重新编辑" : "继承往期";
        this.ruleForm = {
          title: res.Data.Title, //标题
          author: res.Data.Department, //作者
          time: res.Data.PublishDate, //时间
          explain: res.Data.ProductDescription, //说明
          reportLink: res.Data.ReportLink, //变更
        };
        this.marketStrategy = res.Data.MarketStrategy;
        this.inheritNum = this.inheritNum ? this.inheritNum : res.Data.InheritPeriods;
        this.industryList = res.Data.List;
        setTimeout(() => {
          res.Data.List.forEach((item, index) => {
            item.List.forEach((key, i) => {
              key.CompanyLabel = key.CompanyLabel
                ? key.CompanyLabel.map((val, i) => {
                    let obj = {
                      name: val,
                      value: i + 1,
                    };
                    return obj;
                  })
                : [
                    {
                      name: "",
                      value: 1,
                    },
                  ];
            });
          });
        }, 300);
        this.chartPermissionId = res.Data.List[0].ChartPermissionId;
        this.industrialSubjectName = res.Data.List[0].List ? res.Data.List[0].List[0].IndustrialManagementName : "";
        this.overviewList = {
          ArticleId: res.Data.List[0].List && res.Data.List[0].List[0].OverviewArticleId,
          Title: res.Data.List[0].List && res.Data.List[0].List[0].OverviewArticleTitle,
          IsShowOverviewArticle: res.Data.List[0].List && res.Data.List[0].List[0].IsShowOverviewArticle,
        };
      }
    },
    //获取模版
    async getNoTacticsfirst() {
      const res = await raiInterface.reportSereportSelectiondDetailTemplate();
      if (res.Ret === 200) {
        this.industryList = res.Data.List;
        this.chartPermissionId = res.Data.List[0].ChartPermissionId;
      }
    },
    //点击产业的事件
    industryBtn(item, index) {
      if (index !== this.industryIndex) {
        this.industryIndex = index;
        this.chartPermissionId = item.ChartPermissionId;
        this.ificationIndustrial = 0;
      }
    },
    //标的的点击事件 处理
    ificationIndustrialBtn(item, index) {
      if (index !== this.ificationIndustrial) {
        this.ificationIndustrial = index;
        this.industrialSubjectName = item.IndustrialManagementName || "";
        this.overviewList = {
          ArticleId: item.OverviewArticleId,
          Title: item.OverviewArticleTitle,
          IsShowOverviewArticle: item.IsShowOverviewArticle,
        };
      }
    },
    //编辑标的
    editText(item, index) {
      this.dialogText = "编辑";
      this.chartPermissionId = item.ChartPermissionId;
      this.stateValue = item.IndustrialSubjectName;
      this.addDialogVisible = true;
      this.editNum = index;
    },
    //删除标的
    deleteClassify(item, index) {
      this.$confirm("确定要删除该标的吗？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.industryList[this.industryIndex].List.splice(index, 1);
          this.ificationIndustrial = 0;
          let itemList = this.industryList[0].List[0];
          this.industrialSubjectName = itemList.IndustrialManagementName || "";
          this.overviewList = {
            ArticleId: itemList.OverviewArticleId,
            Title: itemList.OverviewArticleTitle,
            IsShowOverviewArticle: itemList.IsShowOverviewArticle,
          };
          this.$message({
            type: "success",
            message: "删除成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    //添加产业
    addMulti() {
      this.dialogText = "添加标的/赛道";
      this.addDialogVisible = true;
    },
    //弹框的取消事件
    handleClose() {
      this.stateValue = "";
      this.addDialogVisible = false;
    },
    //弹框的确认事件
    async confirmPerson() {
      if (this.stateValue) {
        const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
        if (!arr) {
          this.$message.error("输入正确的标的");
          return;
        }
        let overviewList = {};
        const res = await raiInterface.getReportSelectionArticle({
          IndustrialSubjectId: arr.IndustrialSubjectId,
        });
        if (res.Ret === 200) {
          overviewList = res.Data;
          this.industryList.forEach((item) => {
            if (item.ChartPermissionId == this.chartPermissionId) {
              if (item.List.length > 0) {
                var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.ShowName);
              }
              if (isNext) return this.$message.error("标的重复！");
              item.List.push({
                Body: "",
                ChartPermissionId: this.chartPermissionId,
                IndustrialManagementId: arr.IndustrialManagementId + "",
                IndustrialManagementName: arr.IndustryName,
                IndustrialSubjectId: arr.IndustrialSubjectId + "",
                IndustrialSubjectName: arr.SubjectName,
                ShowName: arr.ShowName,
                CompanyLabel: [{ name: "", value: item.List.length + 1 }],
                OverviewArticleId: overviewList && overviewList.ArticleId,
                OverviewArticleTitle: overviewList && overviewList.Title,
                IsShowOverviewArticle: overviewList && overviewList.IsShowOverviewArticle,
              });
            }
          });
        }
      }
      this.stateValue = "";
      this.addDialogVisible = false;
    },
    async editconfirmPerson() {
      if (this.stateValue) {
        const arr = this.subjectList.find((item) => item.ShowName === this.stateValue);
        if (!arr) {
          this.$message.error("输入正确的标的");
          return;
        }
        let overviewList = {};
        const res = await raiInterface.getReportSelectionArticle({
          IndustrialSubjectId: arr.IndustrialSubjectId,
        });
        if (res.Ret === 200) {
          overviewList = res.Data;
          this.overviewList = overviewList;
          this.industryList.forEach((item) => {
            if (item.ChartPermissionId == this.chartPermissionId) {
              if (item.List.length > 0) {
                var isNext = item.List.some((item) => item.IndustrialSubjectName == arr.SubjectName);
              }
              if (isNext) return this.$message.error("标的重复！");
              const obj = {
                Body: (this.$refs.twoRich && this.$refs.twoRich.value) || "",
                ChartPermissionId: this.chartPermissionId,
                IndustrialManagementId: arr.IndustrialManagementId + "",
                IndustrialManagementName: arr.IndustryName,
                IndustrialSubjectId: arr.IndustrialSubjectId + "",
                IndustrialSubjectName: arr.SubjectName,
                ShowName: arr.ShowName,
                CompanyLabel:
                  item.List[this.editNum].CompanyLabel && item.List[this.editNum].CompanyLabel.length > 0 ? item.List[this.editNum].CompanyLabel : [{ name: "", value: item.List.length + 1 }],
                OverviewArticleId: overviewList.ArticleId,
                OverviewArticleTitle: overviewList.Title,
                IsShowOverviewArticle: overviewList.IsShowOverviewArticle,
              };
              item.List.splice(this.editNum, 1, obj);
              this.industrialSubjectName = arr.IndustryName || "";
            }
          });
        }
      }
      this.stateValue = "";
      this.addDialogVisible = false;
    },
    // 申请内容搜索
    async handleSearchResult(data, cb) {
      if (data) {
        cb([]);
        let res = await raiInterface.industrialAndSubjectSearch({ KeyWord: data, ChartPermissionId: this.chartPermissionId });
        if (res.Ret === 200) {
          if (res.Data.List && res.Data.List.length > 0) {
            let arr = res.Data.List.map((item) => {
              return { value: item.ShowName, ...item };
            });
            this.subjectList = arr;
            cb(arr);
          }
        }
      }
    },
    //保存 发布
    confirm: _.debounce(function (type) {
      this.$refs.ruleForm.validate(async (val) => {
        if (val) {
          let isText = [];
          this.industryList.forEach((item) => {
            item.List.forEach((key) => {
              key.CompanyLabel && key.CompanyLabel.length > 0 && isText.push(key.CompanyLabel.some((val) => val.name));
            });
          });

          if (isText && isText.includes(false)) {
            return this.$message.error("请输入公司标签");
          }
          let params = this.dataHandle(type);
          if (type == "预览") {
            sessionStorage.setItem("choicenessPre", JSON.stringify(params));
            let { href } = this.$router.resolve({ name: "预览报告精选" });
            window.open(href, "_blank");
          } else {
            const res = await raiInterface.industrialSubjectPreserveAndPublish(params);
            if (res.Ret === 200) {
              clearInterval(this.timeInterval);
              sessionStorage.removeItem("addChoicenessQY");
              this.$message.success("操作成功!");
              this.init();
              this.$router.back();
            }
          }
        }
      });
    }, 500),
    //取消
    cancel() {
      clearInterval(this.timeInterval);
      sessionStorage.removeItem("addChoicenessQY");
      this.$refs["ruleForm"].resetFields();
      this.$router.back();
    },
    async getListPeriods() {
      const res = await raiInterface.industrialSubjectListPeriods();
      if (res.Ret === 200) {
        this.updateModeList = res.Data.List || [];
      }
    },
    init() {
      this.ruleForm = {
        title: "", //标题
        author: "", //作者
        time: "", //时间
        explain: "", //说明
        reportLink: "", //变更
      };
      this.$refs["ruleForm"].resetFields();
      this.marketStrategy = "";
    },
    // 标的下添加公司标签
    addLabelClick(item) {
      item.CompanyLabel.push({ name: "", value: item.CompanyLabel.length + 1 });
    },
    // 处理保存的数据
    dataHandle(type) {
      let industryList = _.cloneDeep(this.industryList);
      const arr = [];
      let ListChartSummary = [];
      industryList.forEach((item) => {
        item.List.forEach((key) => {
          key.CompanyLabel && (key.CompanyLabel = key.CompanyLabel.map((val) => val.name));
          arr.push(key);
        });
        ListChartSummary.push({
          ChartPermissionId: item.ChartPermissionId,
          BodyChartSummary: item.BodyChartSummary,
          ChartPermissionName: item.ChartPermissionName,
          ListSubject: [...item.List],
        });
      });
      if (this.marketStrategy == "") {
        this.$message.error("市场策略核心逻辑汇总不能为空");
      }
      let params = {
        AddType: this.updateMode == "重新编辑" ? "1" : "2",
        ArticleId: this.$route.query.id ? Number(this.$route.query.id) : 0,
        Department: this.ruleForm.author,
        Title: this.ruleForm.title,
        DoType: type == "发布" ? 1 : 0,
        MarketStrategy: this.marketStrategy,
        InheritPeriods: this.inheritNum,
        List: arr,
        ProductDescription: this.ruleForm.explain,
        PublishDate: this.ruleForm.time,
        ReportLink: this.ruleForm.reportLink,
        ListChartSummary,
      };
      return params;
    },
    deleteLabelItem(item, index) {
      item.CompanyLabel.splice(index, 1);
    },
    switchChangeHandler(e) {
      this.industryList.forEach((_) => {
        _.List.forEach((item) => {
          if (item.OverviewArticleId === this.overviewList.ArticleId) {
            item.IsShowOverviewArticle = e;
          }
        });
      });
    },
    // 拖拽排序更新
    sortChange({ oldIndex, newIndex }) {
      this.industryIndex = this.sortChangeFun(this.industryIndex, oldIndex, newIndex);
    },
    //标的拖拽排序更新
    ificationSortChange({ oldIndex, newIndex }) {
      this.ificationIndustrial = this.sortChangeFun(this.ificationIndustrial, oldIndex, newIndex);
    },
    // 排序更新后的逻辑
    sortChangeFun(currentIndex, oldIndex, newIndex) {
      let bigger, smaller;
      if (oldIndex > newIndex) {
        bigger = oldIndex;
        smaller = newIndex;
      } else {
        bigger = newIndex;
        smaller = oldIndex;
      }
      // 当前算中tab的排序 小于较小的 大于较大的 则不用做变动
      if (currentIndex < smaller || currentIndex > bigger) return currentIndex;
      // 移动的是当前选中的
      if (currentIndex == oldIndex) return newIndex;
      if (oldIndex > newIndex) {
        // 向左移 加加
        currentIndex++;
      } else if (oldIndex < newIndex) {
        // 向右移 减减
        currentIndex--;
      }
      return currentIndex;
    },
    onMove(e) {
      // 返回false表示不允许停靠
      return !!e.relatedContext.element;
    },
  },
  // 路由离开了 清除定时器
  beforeRouteLeave(to, from, next) {
    clearInterval(this.timeInterval);
    next();
  },
};
</script>
<style lang="scss">
.add-choiceness {
  .el-date-editor.el-input,
  .el-select {
    width: 100%;
  }
  .content-resource {
    margin: 30px 0 60px;
    display: flex;
    line-height: 40px;
    .resource {
      width: 105px;
    }
    .show {
      flex: 1;
      height: 40px;
      border: 1px solid #aab4cc;
      border-radius: 4px;
      padding-left: 20px;
    }
  }
  .content-bottom {
    width: 100%;
    display: flex;
    justify-content: center;
    .el-button {
      padding: 0 30px;
      height: 40px;
      margin-left: 30px;
    }
  }
  .dlg-content {
    width: 100%;
    margin: 40px 0 70px;
    .inline-input {
      width: 100% !important;
    }
    .el-input {
      width: 100% !important;
    }
  }

  .content-module {
    margin-top: 30px;
    .content-industry {
      display: inline-block;
      margin: 30px 0;
      .content-name {
        display: inline-block;
        box-sizing: border-box;
        padding: 0 24px;
        line-height: 38px;
        height: 40px;
        background: #ecf5ff;
        border: 1px solid #b3d8ff;
        opacity: 1;
        font-weight: 500;
        font-size: 16px;
        color: #409eff;
        border-radius: 4px;
        margin-right: 30px;
      }
      .active {
        background-color: #409eff;
        color: #fff;
      }
    }
    .addIndustrial {
      box-sizing: border-box;
      width: 96px;
      height: 60px;
      padding-top: 10px;
      text-align: center;
      background: #ecf5ff;
      border: 1px solid #b3d8ff;
      opacity: 1;
      border-radius: 4px;
      color: #409eff;
      i {
        color: #409eff;
        font-weight: 700;
        padding-bottom: 5px;
      }
      span {
        display: inline-block;
        width: 100%;
      }
    }
  }
  .classification {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    .industrial {
      position: relative;
      box-sizing: border-box;
      margin-bottom: 15px;
      width: 290px;
      height: 60px;
      line-height: 60px;
      text-align: center;
      background: #ecf5ff;
      font-size: 14px;
      margin-right: 30px;
      color: #409eff;
      border-radius: 4px;
      border: 1px solid #b3d8ff;
    }

    .pitch {
      display: flex;
      padding: 0 20px;
      justify-content: space-between;
      background-color: #409eff;
      border: none;
      color: #fff !important;
    }
    .addIndustrial {
      box-sizing: border-box;
      width: 96px;
      height: 60px;
      padding-top: 10px;
      text-align: center;
      background: #ecf5ff;
      border: 1px solid #b3d8ff;
      opacity: 1;
      border-radius: 4px;
      color: #409eff;
      margin-bottom: 15px;
      i {
        color: #409eff;
        font-weight: 700;
        padding-bottom: 5px;
      }
      span {
        display: inline-block;
        width: 100%;
      }
    }
  }
  .industrial-is-new {
    margin-bottom: 20px;
  }
  .delete-item-icon {
    width: 20px;
    height: 20px;
    margin-right: 20px;
  }
}
</style>
