<style>
  .tpEdit_header {
    padding: 18px;
    background: #fff;
    color: #606266;
    margin-bottom: 10px;
  }

  .tpEdit_Content {
    margin-bottom: 10px;
    min-width: 1280px;
    height: 725px;
  }

  .all-components {
    max-height: 725px;
    overflow-y: auto;
    background: #fff;
    padding: 20px;
  }

  .all-components .component-group {
    border: 1px solid #eeeeee;
    width: 300px;
    margin-bottom: 20px;
  }

  .all-components .component-group-name {
    height: 35px;
    line-height: 35px;
    background: #f7f7f7;
    padding: 0 20px;
    border-bottom: 1px solid #eeeeee;
  }

  .all-components .component-list {
    margin-right: -2px;
    margin-top: -2px;
    flex-wrap: wrap;
  }

  .all-components .component-list .component-item {
    width: 100px;
    height: 100px;
    border: 0 solid #eeeeee;
    border-width: 0 1px 1px 0;
    text-align: center;
    padding: 15px 0 0;
    cursor: pointer;
  }

  .component-item:nth-child(3n) {
    border-right: 0 !important;
  }

  .template_right {
    padding-left: 2px;
    position: relative;
    overflow-y: auto;
  }

  .template_Mobile {
    overflow-y: auto;
    padding: 0px 25px;
    width: 435px;
    height: 705px;
    margin-left: 6px;
  }
  .mobile-framework{
    width: 375px;
  }
  .mobile-framework-header {
    height: 60px;
    line-height: 60px;
    background: #333;
    color: #fff;
    text-align: center;
    background: url('../../assets/img/sallCenter/head.png') no-repeat;
  }

  .mobile-framework-body {
    background-color: rgb(245, 247, 249);
    min-height: 645px;
    border: 1px solid #e2e2e2;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: left center;
  }

</style>
<template>
  <div class="templateEdit">
    <div class="tpEdit_header">
      <span style="color:rgb(64, 158, 255);cursor:pointer;">模板管理</span><span
        style="margin:0 9px;color:#C0C4CC">/</span><span>新增</span>
    </div>
    <div flex="box:first" class="tpEdit_Content">
      <div class="all-components">
        <el-form label-width="80px">
          <el-form-item label="模板名称">
            <el-input type="text" size="small"></el-input>
          </el-form-item>
          <el-form-item label="背景设置">
            <el-button size="small">设置</el-button>
          </el-form-item>
        </el-form>
        <div class="component-group" v-for="(item,index) in allComponents" :key="index">
          <div class="component-group-name">{{item.GroupName}}</div>
          <div flex class="component-list">
            <div class="component-item" v-for="(subItem,subIndex) in item.SubList" :key="subIndex">
              <img :src="subItem.Icon" alt="" />
              <div>{{subItem.Name}}</div>
            </div>
          </div>
        </div>
      </div>
      <div class="template_right">
        <div class="template_Mobile">
          <div class="mobile-framework" style="height:705px;">
            <div class="mobile-framework-header"></div>
            <div class="mobile-framework-body">
              <div flex="main:center cross:center"
                style="height: 200px; color: rgb(173, 177, 184); text-align: center;">
                <div>
                  <i class="el-icon-folder-opened" style="font-size: 32px; margin-bottom: 10px;"></i>
                  <div>空空如也</div>
                  <div>请从左侧组件库添加组件</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        allComponents:[],
      };
    },
    created() {

    },
    methods: {
      GetPlugInList(){
        this.apipost("/api/Tenant/GetPlugInList", {}, res => {
          if (res.data.resultCode == 1) {
            console.log(res,'ressss');
            this.allComponents=res.data.data;
          } else {
            this.Info(res.data.message);
          }
        })

      }
    },
    mounted() {
      this.GetPlugInList();
    }
  };

</script>
