<!--基础信息-->
<template>
  <div class="base-message-wrap">
    <el-form
      ref="formData"
      :model="formData"
      :rules="rules"
      label-width="150px"
      class="basic-form"
    >
      <el-form-item label="模板名称：" prop="openTemplateName">
        <el-col :span="13">
          <el-input
            size="small"
            v-model="formData.openTemplateName"
            placeholder="请输入模板名称"
            style="width:70%;"
            maxlength="24"
            :disabled="disabled"
          ></el-input>
          <span class="word-num">{{(formData.openTemplateName).replace(/\s+/g,"").length}}/24</span>
        </el-col>
      </el-form-item>

      <el-form-item label="发起机构名称：">
        <el-col :span="13" v-for="(item, index) in formData.organizationNameList" :key="index">
          <el-input
            size="small"
            v-model="formData.organizationNameList[index]"
            placeholder="请输入发起机构名称"
            style="width:70%;"
            maxlength=16
            @input="changeOrganizationName"
            @blur = "blurName"
            @focus = "focusName(index)"
            :disabled="disabled"
          ></el-input>
          <span class="word-num">{{(formData.organizationNameList[index]).replace(/\s+/g,"").length}}/16</span>
          <img @click="plusOrg(index)" class="edit-img" src="../../../assets/image/plus.png" />
          <img @click="deleteOrg(index)" v-if="index >= 1" class="edit-img" src="../../../assets/image/trash.png" />
        </el-col>
        <!-- <el-popover
          class="popover-content" :style="{'top': orgListIndex * 41 + 'px'}"
          placement="bottom"
          :content="organizationContent"
          v-model="visibleName"
          @click="checkDefault">
          <p @click="checkDefault"> 我的机构： {{ organizationContent }} </p>
        </el-popover> -->
      </el-form-item>

      <el-form-item label="有效期：" prop="expireDay">
        <el-col :span="13">
          <el-input
            size="small"
            v-model="formData.expireDay"
            placeholder="请填写1-1000之间的数字"
            style="width:70%;"
            oninput = "value=value.replace(/[^\d]|^[0]/g,'')"
            :disabled="disabled"
          ></el-input>
          <span class="day-btn">天</span>
        </el-col>
      </el-form-item>

      <el-form-item label="所属学科" prop="subjectId">
        <el-col :span="13">
          <!-- <el-cascader
            class="subject-slelct"
            v-model="formData.subjectLevelList"
            :options="options"
            :props="{ checkStrictly: true }"
            @change="handleChange"
            :disabled="disabled"
          ></el-cascader> -->
          <el-select v-model="formData.subjectId" placeholder="请选择" :disabled="disabled">
            <el-option
              v-for="item in options"
              :key="item.key"
              :label="item.value"
              :value="item.id"
            >
            </el-option>
          </el-select>
        </el-col>
      </el-form-item>

      <div class="basic-item-icon">
        <span class="require">*</span>
        <el-form-item label="列表图片：">
          <el-upload
            v-model="formData.attachmentUrl1"
            class="bg-uploader"
            action="#"
            :show-file-list="false"
            :before-upload="beforeUploadListPic"
            :disabled="disabled"
          >
            <img v-if="formData.attachmentUrl1" @mouseover.stop="imgMouseOver=true" :src="formData.attachmentUrl1" class="bg-img">
            <img
              v-if="!formData.attachmentUrl1"
              class="bg-img"
              src="../../../assets/image/small.png"
            >
            <div class="img-delete" v-show="imgMouseOver && !disabled" @click.stop="deleteImg(1)" @mouseout.stop="imgMouseOver=false"><i class="el-icon-delete"></i></div>
            <div class="limit-text">
              <p>尺寸:230*172</p>
              <p>限制大小: 500Kb</p>
              <p>支持.jpg,.png格式</p>
            </div>
          </el-upload>
        </el-form-item>
        <p class="upload-message" v-if="uploadImgMessage">请选择列表图片</p>
      </div>

      <el-form-item label="封面类型：">
        <el-radio-group
          size="small"
          v-model="formData.type"
          @change="changeCover"
          :disabled="disabled"
        >
          <el-radio :label="1">图片</el-radio>
          <el-radio :label="2">视频</el-radio>
        </el-radio-group>
      </el-form-item>

      <div class="basic-item-icon">
        <span class="require">*</span>
        <el-form-item label="封面文件：">
          <el-upload
            v-model="formData.attachmentUrl2"
            class="bg-uploader"
            action="#"
            :show-file-list="false"
            :before-upload="beforeUploadCoverPic"
            :disabled="disabled"
          >
            <img
              v-if="formData.type == 1 && formData.attachmentUrl2"
              :src="formData.attachmentUrl2"
              @mouseover.stop="imgMouseOver2=true"
              class="bg-img"
            >
            <video
              v-if="formData.type == 2 && formData.attachmentUrl2"
              width="100"
              controls
              class="bg-video"
              @mouseover.stop="imgMouseOver2=true"
            >
              <source :src="formData.attachmentUrl2" type="video/mp4">浏览器不支持mp4
            </video>
            <img
              v-if="!formData.attachmentUrl2"
              class="bg-img"
              src="../../../assets/image/small.png"
            >
            <div class="img-delete" v-show="imgMouseOver2 && !disabled" @click.stop="deleteImg(2)" @mouseout.stop="imgMouseOver2=false"><i class="el-icon-delete"></i></div>
            <div v-show="formData.type == 1" class="limit-text">
              <p>尺寸:750*420</p>
              <p>限制大小: 2.0 Mb</p>
              <p>支持.jpg,.png格式</p>
            </div>
            <div v-show="formData.type == 2" class="limit-text">
              <p></p>
              <p>限制大小: 500 Mb</p>
              <p>支持.mp4</p>
            </div>
          </el-upload>
        </el-form-item>
        <p class="upload-message" v-if="uploadImgMessage2">请选择封面</p>
      </div>

      <el-form-item label="项目简介：" prop="openTemplateIntro">
        <el-col :span="13">
          <el-input
            size="small"
            type="textarea"
            :autosize="{ minRows: 5}"
            placeholder="请输入项目简介"
            v-model="formData.openTemplateIntro"
            style="width:83%;"
            :disabled="disabled"
          ></el-input>
          <span class="word-num">{{(formData.openTemplateIntro).replace(/\s+/g,"").length}}/200</span>
        </el-col>
      </el-form-item>
  
      <el-form-item label="项目详情" required prop="openTemplateDetail" :class="{ueitem: disabled}">
        <vue-ueditor-wrap
          ref="ueditor"
          v-model="formData.openTemplateDetail"
          :destroy="false"
          :config="ueditorConfig"
        >
        </vue-ueditor-wrap>
        <div v-if="disabled" class="ue-warp"></div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { doUpload, getFilePath } from "../../../utils/qiniu-util";
import { openLoading, closeLoading } from "../../../utils/utils";
import {getCmsUrl} from '../../../utils'
import VueUeditorWrap from 'vue-ueditor-wrap'
let vm = null;
export default {
  props: {
    messageObj: {
      type: Object,
      default:() => {
        return null
      }
    },
    isEditor: {
      type: Boolean,
      default: true
    },
    newBuild: {
      type: Boolean,
      default: true
    }
  },
  data() {
    let checkProjectStr = (rule, value, callback) => {
      if (value.indexOf("\\") != -1) {
        //存在
        callback(new Error("请勿输入字符“ \\ ”"));
      } else if (value.indexOf(".") != -1) {
        callback(new Error("请勿输入字符“ . ”"));
      } else {
        callback();
      }
    };
    let checkUserTime= (rule, value, callback) => {
      if (value> 1000 || value < 1) {
        callback(new Error("输入长度为1-1000的有效期"));
      } else {
        callback();
      }
    };
    return {
      visibleName: false, //是否显示机构提示
      orgListIndex: 1,
      organizationContent: 'hcd',//机构名称
      options: [],
      formData: {
        id: "", //开放模板id    26
        openTemplateName: "",    //开放模板名称
        openTemplateIntro: "",   //开放模板简介
        type: 1,               //封面类型 1图片2视频 
        expireDay: "",         // 开放有效期
        subjectLevelList: "",          //开放模板所属学科lsit
        subjectId: '', //开放模板所属学科id
        subjectName: "",       //开放模板所属学科名称
        attachmentUrl1: "",
        attachmentUrl2: "",
        attachmentUrl3: "",
        attachmentMore1: {
          attachmentExt: "",
          attachmentName: "",
          attachmentSize: 0
        },
        attachmentMore2: {
          attachmentExt: "",
          attachmentName: "",
          attachmentSize: 0
        },
        organizationName: "",       // 发起机构名称（多个机构拼接
        organizationNameList: [''],  //发起机构列表
        openTemplateDetail: ''      //开放模板详情
      },
      attachmentModel:[    //基础信息的图片视频
        {
          attachmentExt: '',// 附件格式
          attachmentName: '',//附件名称
          attachmentSize:'',//附件大小,
          attachmentType: 1,//1：图片 2：视频 3：pdf
          attachmentUrl: '',//附件链接
          id: '', //关联唯一ID
          kind: 1, //1：列表图片 2：封面配置 3：附件配置
          openTemplateId: ''//开放模板id
        },
         {
          attachmentExt: '',// 附件格式
          attachmentName: '',//附件名称
          attachmentSize:'',//附件大小,
          attachmentType: 1,//1：图片 2：视频 3：pdf
          attachmentUrl: '',//附件链接
          id: '', //关联唯一ID
          kind: 1, //1：列表图片 2：封面配置 3：附件配置
          openTemplateId: ''//开放模板id
        }
      ],
      baseobj: {},
      imgMouseOver: false,
      imgMouseOver2: false,
      uploadImgMessage: false,
      uploadImgMessage2: false,
      id: 1,
      openTemplateDetail: '',
      ueditorConfig: {
        // 编辑器不自动被内容撑高
        autoFloatEnabled: false,
        // 初始容器高度
        initialFrameHeight: 400,
        elementPathEnabled : false,
        // 初始容器宽度
        initialFrameWidth: '80%',
        // 上传文件接口
        // serverUrl: 'http://35.201.165.105:8000/controller.php',
        serverUrl: getCmsUrl('api/PICAuEditorServiceImpl/initQuery'),
        // 是否自动抓取远程图片的地址(默认为true)
        catchRemoteImageEnable: false,
        // UEditor 资源文件的存放路径，如果你使用的是 vue-cli 生成的项目，通常不需要设置该选项，vue-ueditor-wrap 会自动处理常见的情况，如果需要特殊配置，参考下方的常见问题2
        UEDITOR_HOME_URL: window.location.host.indexOf("localhost") > -1 || window.location.host.indexOf("127.0.0.1") > -1 ? '/static/UEditor/':'/static/UEditor/',
        toolbars: [[ //insertvideo 表示视频，已经去掉
            'fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
            'directionalityltr', 'directionalityrtl', 'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
             'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'simpleupload', 'insertimage', 'link', 'emotion', 'insertcode', 'pagebreak', 'template', 'background', '|',
            'horizontal', 'date', 'time', 'spechars', 'wordimage', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
            'print', 'searchreplace', 'drafts', 'help'
        ]]
        // 配合最新编译的资源文件，你可以实现添加自定义Request Headers,详情https://github.com/HaoChuan9421/ueditor/commits/dev-1.4.3.3
        // headers: {
        //   access_token: '37e7c9e3fda54cca94b8c88a4b5ddbf3'
        // }
      },
      rules: {
        openTemplateName: [
          { required: true, message: "请输入项目名称" },
          {
            min: 2,
            max: 24,
            message: "输入长度为2-24的内容，可包含中英文、数字及特殊符号",
            trigger: "blur"
          },
          { validator: checkProjectStr, trigger: "blur" }
        ],
        expireDay: [
          { required: true, message: "请输入有效期", trigger: "blur" },
          { validator: checkUserTime, trigger: "blur" }
        ],
        subjectId: { required: true, message: "请选择学科", trigger: "change" },
        openTemplateIntro: [
          { required: true, message: "请填写项目简介", trigger: "blur" },
          { min: 1, max: 200, message: "超出可输入的最大长度", trigger: "blur" }
        ],
        openTemplateDetail: [
          { required: true, message: '请填写项目详情', trigger: 'blur' }
        ]
      },
      disabled: false
    }
  },
  components:{
    VueUeditorWrap
  },
  created() {
    vm = this;
    // 新建
    if (vm.newBuild) {
      vm.getSubjectList();
    } else {
      // 非新建但可编辑
      if (vm.isEditor) {
        vm.getSubjectList();
        vm.setBaseMessage();
      } else {
         // 非新建不可编辑
        vm.disabled = true;
        vm.getSubjectList();
        vm.setBaseMessage();
      }
    }
  },
  methods: {
    // 设置已有的基本信息
    setBaseMessage() {
      vm.formData = Object.assign(vm.formData, vm.messageObj.portalOpenTemplateModel);
      vm.formData.attachmentUrl1 = vm.messageObj.attachmentData[0].attachmentUrl;
      vm.formData.attachmentMore1 = Object.assign(vm.formData.attachmentMore1, vm.messageObj.attachmentData[0]);
      // vm.formData.attachmentUrl2 = vm.messageObj.attachmentData[1].attachmentType == 1 ? vm.messageObj.attachmentData[1].attachmentUrl : '';
      // vm.formData.attachmentUrl3 = vm.messageObj.attachmentData[1].attachmentType == 2 ? vm.messageObj.attachmentData[1].attachmentUrl : '';
      vm.formData.attachmentUrl2 =  vm.messageObj.attachmentData[1].attachmentUrl;
      vm.formData.attachmentMore2 = Object.assign(vm.formData.attachmentMore2, vm.messageObj.attachmentData[1]);
      vm.formData.type = vm.messageObj.attachmentData[1].attachmentType;
    },
    // 增加发起机构
    plusOrg(index) {
      vm.formData.organizationNameList.splice(index + 1, 0, '');
    },
    // 删除发起机构
    deleteOrg(index) {
      vm.formData.organizationNameList.splice(index, 1);
    },
    // 机构名称输入
    changeOrganizationName() {
      let textLength = vm.formData.organizationName.length;
      // 机构输入提示显示与否
      vm.visibleName = textLength == 0;
    },
    // 离开机构名称焦点
    blurName() {
      vm.visibleName = false;
      setTimeout(() => {
        vm.submitForm("formData");
      }, 200);
    },
    // 机构名称聚焦
    focusName(index) {
      let textLength = vm.formData.organizationNameList[index].length;
      if (textLength == 0) {
        vm.orgListIndex = index + 1;
        vm.visibleName = true;
      } else {
        vm.visibleName = false;
      }
    },
    // 机构选择默认值
    checkDefault() {
      vm.formData.organizationNameList.splice(vm.orgListIndex-1, 1, vm.organizationContent);
      vm.visibleName = false;
    },
     //上传列表图片
    beforeUploadListPic(file) {
      let fileLimit = {
        width: 230,
        height: 172,
        size: 0.5,
        sizeText: "500K",
        key: "attachmentUrl1",
        more: "attachmentMore1",
        show: "uploadImgMessage"
      };

      vm.beforeAvatarUpload(file, fileLimit);
    },
     //上传图片校验
    beforeAvatarUpload(file, fileLimit) {
      const isJPG = file.type === "image/jpeg";
      const isPNG = file.type === "image/png";
      const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
      if (file.width != fileLimit.width || file.height != fileLimit.height) {
        vm.$message.error("图片不符合规范，请根据规范上传图片");
        return;
      }
      if (!isJPG && !isPNG) {
        vm.$message.error("图片不符合规范，请根据规范上传图片");
        return;
      }
      if (!isLt2M) {
        vm.$message.error("图片不符合规范，请根据规范上传图片 ");
        return;
      }
      let _img = new FileReader();
      _img.readAsDataURL(file);
      _img.onload = function(theFile) {
        let image = new Image();
        image.src = theFile.target.result;
        image.onload = function() {
          let _vm = vm;
          if ( false
            // _vm.width != fileLimit.width ||
            // _vm.height != fileLimit.height
          ) {
            vm.$message.error("图片不符合规范，请根据规范上传图片");
          } else {
            openLoading(vm);
            doUpload(
              vm,
              file,
              getFilePath(file, null),
              "preview4",
              "progress1",
              1
            ).then(function(path) {
              closeLoading(vm);
              console.log(path);
              if (fileLimit.show == "uploadImgMessage") {
                vm.uploadImgMessage = false;
              } else if (fileLimit.show == "uploadImgMessage2") {
                vm.uploadImgMessage2 = false;
              }
              vm.formData[fileLimit.key] = path.fullPath;
              vm.formData[fileLimit.more] = {
                attachmentName: path.name,
                attachmentExt: path.ext,
                attachmentSize: path.size
              };
              vm.$message.success("上传成功");
            });
          }
        };
      };
      return isJPG && isLt2M;
    },
    //  删除图片
    deleteImg(type) {
      if (type == 1) {
        vm.formData.attachmentUrl1 = "";
        vm.imgMouseOver = false;
      } else {
        vm.formData.attachmentUrl2 = "";
        vm.imgMouseOver2 = false;
      }
    },
     //改变封面类型
    changeCover(radio) {
      vm.formData.attachmentUrl2 = "";
    },
     //上传封面图片
    beforeUploadCoverPic(file) {
      let fileLimit = {
        width: 750,
        height: 420,
        size: 2,
        sizeText: "2.0M",
        key: "attachmentUrl2",
        more: "attachmentMore2",
        show: "uploadImgMessage2"
      };
      if (vm.formData.type == 1) {
        vm.beforeAvatarUpload(file, fileLimit);
      } else {
        vm.beforeUploadMp4(file);
      }
    },
     //上传mp4
    beforeUploadMp4(file) {
      console.log(file);
      const isMP4 = file.type === "video/mp4";
      const isLt = file.size / 1024 / 1024 < 500;
      if (!isLt) {
        vm.$message.error("视频不符合规范，请根据规范上传视频");
        return;
      }
      if (!isMP4) {
        vm.$message.error("视频不符合规范，请根据规范上传视频");
      } else {
        openLoading(vm);
        doUpload(
          vm,
          file,
          getFilePath(file, null),
          "preview4",
          "progress1",
          ""
        ).then(function(path) {
          closeLoading(vm);
          console.log(path);
          vm.uploadImgMessage2 = false;
          vm.formData.attachmentUrl2 = path.fullPath;
          vm.$message.success("上传成功");
        });
      }
    },
    // 点击下一步
    nextStep() {
      let flag = true;
      if (!vm.formData.attachmentUrl1) {
          vm.uploadImgMessage = true;
          flag = false;
      } else {
        vm.uploadImgMessage = false;
      }
      if (!vm.formData.attachmentUrl2) {
        vm.uploadImgMessage2 = true;
        flag = false;
      } else {
        vm.uploadImgMessage2 = false;
      }
      if (vm.submitForm('formData') && flag) {
        vm.insertOrupdate();
      }
      // vm.insertOrupdate();
    },
    // 新增或者更新基本信息
    insertOrupdate() {
      vm.setSubjectLevelList();
      vm.setSubjectName();
      // 图片或者视频地址
      vm.formData.attachmentMore1.attachmentUrl = vm.formData.attachmentUrl1;
      // vm.formData.attachmentMore2.attachmentUrl = vm.formData.type == 1 ? vm.formData.attachmentUrl2 : vm.formData.attachmentUrl3;
      vm.formData.attachmentMore2.attachmentUrl = vm.formData.attachmentUrl2;
      // 封面类型
      vm.formData.attachmentMore2.attachmentType =  vm.formData.type;
      vm.formData.attachmentMore2.kind =  2;
      //整合图片视频
      vm.attachmentModel[0] = Object.assign(vm.attachmentModel[0],vm.formData.attachmentMore1);
      vm.attachmentModel[1] = Object.assign(vm.attachmentModel[1],vm.formData.attachmentMore2);
      vm.baseobj.openTemplateModel = vm.formData;
      vm.baseobj.attachmentModel = vm.attachmentModel;
      openLoading(vm);
      vm.POST("portal/openTemplate/insertOrUpdate", vm.baseobj).then(res => {
        closeLoading(vm);
        if (res.code == "000000") {
          // 将产生的模板id：openTemplateId传给下一步
          vm.$emit('next',res.data.openTemplateModel.id);
        } else {
          vm.$message.info(res.message);
        }
      });
    },
     //表单校验
    submitForm(formName) {
      let flag = null;
      vm.$refs[formName].validate(valid => {
        if (valid) {
          flag = true;
        } else {
          flag = false;
        }
      });
      return flag;
    },
    // 获取学科列表
    getSubjectList() {
      let req = {};
      vm.GET("aggregate/cme/labelList", req).then(res => {
        if (res.code == '000000') {
          vm.options = res.data;
          console.log('====================================');
          console.log(vm.options);
          console.log('====================================');
        }
      });
    },
    // 优化学科数据的属性名
    changeName(obj) {
      for (const item of obj) {
        item.children = item.subList;
        item.label = item.name;
        item.value = item.id ? item.id : 10;
        if (item.children && Array.isArray(item.children)) {
          vm.changeName(item.children);
        }
      }
    },
    // 获取学科对应的label
    setSubjectName() {
      for (const item of vm.options) {
        if (item.id == vm.formData.subjectId) {
          // if (!vm.formData.subjectLevelList[1] || vm.formData.subjectLevelList[1] == 0) {
          //    return item.label;
          // } else {
          //   for (const j of item.children){
          //     if (j.value == vm.formData.subjectLevelList[1]) {
          //       return j.label;
          //     }
          //   }
          // }
          vm.formData.subjectName = item.value;
        }
      }
    },
    // 设置学科id
    setSubjectLevelList() {
      // vm.formData.subjectId =  (vm.formData.subjectLevelList.length > 1)&& vm.formData.subjectLevelList[1] != 0 ? vm.formData.subjectLevelList[1] : vm.formData.subjectLevelList[0]
      vm.formData.subjectLevelList = [vm.formData.subjectId];
    }
  }
}
</script>
<style >
  .base-message-wrap .el-input__inner {
    height: 32px;
    line-height: 32px;
  }
</style>
<style lang="scss" scoped>

  .base-message-wrap {
    padding-top: 80px;
    .p_label {
      margin-left: 56px;
      font-size: 12px;
      color: #606266;
    }
    .edit-img {
      width: 20px;
      height: 20px;
      vertical-align: middle;
      margin-left: 10px;
    }
    .day-btn {
      display: inline-block;
      width: 68px;
      height: 32px;
      line-height: 32px;
      background: #D5D3D3;
      text-align: center;
      margin-left: -3px;
      border-radius: 0 4px 4px 0;
      z-index: 100;
      font-size: 14px;
      color: #909399;
      vertical-align: middle;
    }
    .basic-item-icon {
      position: relative;
      .require {
        position: absolute;
        left: 67px;
        top: 11px;
        color: #f56c6c;
      }
      .upload-message {
        position: absolute;
        left: 160px;
        top: 105px;
        font-size: 12px;
        color: #f56c6c;
      }
      .img-delete {
        position: absolute;
        left: 0px;
        top: 0px;
        width: 84px;
        height: 100px;
        background: #000;
        opacity: 0.7;
        z-index: 999;
        i {
          color: #fff;
          margin-top: 39px;
          margin-left: 0px;
        }
      }
    }
    .word-num {
      font-size: 12px;
      color: #999;
      padding-top: 5px;
    }
    .line {
      margin-left: 10px;
      width: 20px;
    }
    .bg-uploader {
      img {
        float: left;
      }
      .bg-img {
        width: 84px;
        height: 100px;
      }
      .bg-video {
        float: left;
        width: 84px;
        height: 100px;
      }
      .limit-text {
        float: left;
        margin-left: 10px;
        margin-top: -10px;
        p {
          font-size: 12px;
          color: #999;
        }
      }
    }
    .el-upload__tip {
      position: absolute;
      top: -6px;
      left: 130px;
    }
    .choose-button {
      background: #fff;
      color: #409eff;
      border: 1px solid #409eff;
    }
    .el-popover--plain {
      padding: 18px 20px;
      top: 40px;
    }
    .ueitem {
      position: relative;
    }
   .ue-warp {
      position: absolute;
      width: 80%;
      height: 100%;
      background: #F5F7FA;
      opacity: 0.5;
      top: 0;
      z-index: 1000;
   }
  }
  .el-form-item__content {
    width: 100%;
    height: 100%;
    background: red;
  }
   .popover-content {
      position: relative;
      top: 0;
      left: 0;
    }
  .time-message {
    margin: -19px 0 20px 150px;
    font-size: 14px;
  }
</style>
