<template>
  <div>
    <div class="">
      <!--浏览器页签-->
      <div class="sub-title">
        浏览器页签
      </div>
      <div class="sub-body">
        <div class="config-line">
          <div class="config-title">
            页签Logo:
          </div>
          <div>
            <el-upload
              ref="upload"
              :before-upload="handleBeforeUpload"
              :on-preview="handlePictureCardPreview"
              :on-remove="handleRemove"
              :on-exceed="handleExceed"
              :on-change="handleChange"
              :http-request="uploadFile"
              :file-list="imageList"
              :limit="4"
              :class="{hide:hideUpload}"
              class="small-upload"
              multiple
              action="string"
              accept=".jpg,.jpeg,.png "
              list-type="picture-card"
            >
              <i class="el-icon-plus" />
            </el-upload>
            <el-dialog :visible.sync="dialogVisible" title="图片预览" append-to-body>
              <div class="imgBox">
                <img :src="dialogImageUrl" max-height="400px;" alt="" style="margin: 0 auto;">
              </div>
            </el-dialog>
          </div>
        </div>
      </div>
      <!--标题-->
      <div class="sub-title">
        标题
      </div>
      <div class="sub-body">
        <div class="config-line">
          <div class="config-title">
            系统Logo:
          </div>
          <div>
            <el-upload
              ref="upload"
              :before-upload="handleBeforeUpload"
              :on-preview="handlePictureCardPreview"
              :on-remove="handleRemove"
              :on-exceed="handleExceed"
              :on-change="handleChange"
              :http-request="uploadFile"
              :file-list="imageList"
              :limit="4"
              :class="{hide:hideUpload}"
              class="small-upload"
              multiple
              action="string"
              accept=".jpg,.jpeg,.png "
              list-type="picture-card"
            >
              <i class="el-icon-plus" />
            </el-upload>
            <el-dialog :visible.sync="dialogVisible" title="图片预览" append-to-body>
              <div class="imgBox">
                <img :src="dialogImageUrl" max-height="400px;" alt="" style="margin: 0 auto;">
              </div>
            </el-dialog>
          </div>
        </div>
        <div class="config-line">
          <div class="config-title">
            标题文字:
          </div>
          <div>
            <el-input v-model="titleValue" clearable :disabled="titleDisabled" size="small" />
          </div>
          <div class="other">
            <el-button size="small" @click="titleUpData">
              修改
            </el-button>
            <el-button size="small" @click="titleSure">
              保存
            </el-button>
            <el-button size="small" @click="titleDisabled = true">
              取消
            </el-button>
          </div>
        </div>
      </div>
      <!--登录页-->
      <div class="sub-title">
        登录页
      </div>
      <div class="sub-body">
        <div class="config-line">
          <div class="config-title">
            登录页Logo:
          </div>
          <div>
            <el-upload
              ref="upload"
              :before-upload="handleBeforeUpload"
              :on-preview="handlePictureCardPreview"
              :on-remove="handleRemove"
              :on-exceed="handleExceed"
              :on-change="handleChange"
              :http-request="uploadFile"
              :file-list="imageList"
              :limit="4"
              :class="{hide:hideUpload}"
              class="small-upload"
              multiple
              action="string"
              accept=".jpg,.jpeg,.png "
              list-type="picture-card"
            >
              <i class="el-icon-plus" />
            </el-upload>
            <el-dialog :visible.sync="dialogVisible" title="图片预览" append-to-body>
              <div class="imgBox">
                <img :src="dialogImageUrl" max-height="400px;" alt="" style="margin: 0 auto;">
              </div>
            </el-dialog>
          </div>
        </div>
        <div class="config-line">
          <div class="config-title">
            登录页文字:
          </div>
          <div>
            <el-input v-model="titleValue" clearable :disabled="titleDisabled" size="small" />
          </div>
          <div class="other">
            <el-button size="small" @click="titleUpData">
              修改
            </el-button>
            <el-button size="small" @click="titleSure">
              保存
            </el-button>
            <el-button size="small" @click="titleDisabled = true">
              取消
            </el-button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      titleValue: '',
      loginTitleValue: '',
      titleDisabled: true,
      loginDisabled: true,
      mapDisabled: true,
      otherMapShow: false,
      mapValue: '',
      otherMapValue: ''
    }
  }

}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .sub-title{
    line-height: 2;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 0px;
  }
  .sub-body +.sub-title{
    margin-top: 20px;
  }
  .sub-body{
    margin-left: 40px;
    .config-title{
      line-height: 2;
      margin-right: 20px;
      width: 120px;
    }
    .config-line{
      display: flex;
      margin: 10px;
    }
    .other{
      margin-left: 20px;
    }
  }

</style>
<style rel="stylesheet/scss" lang="scss">
.small-upload{
  .el-upload--picture-card{
    width: 80px !important;
    height: 80px !important;
    .el-icon-plus{
      line-height: 80px;
    }
  }
}
</style>
