<!--  -->
<template>
  <div class="template">
    <div class="top">
      <div class="location">数据管理 / 项目资料 / <span>新增</span></div>
    </div>
    <div class="conten">
      <div class="search">
        <div class="txt">项目数据新增</div>
        <ul>
          <li
            v-for="(item, index) in topTab"
            :key="index"
            :class="{ active: topTabInd === index }"
            @click="tabCut(index)"
          >
            <a :href="item.id">{{ item.name }}</a>
          </li>
        </ul>
      </div>
      <div class="tabAll">
        <!-- 项目详情 -->
        <div id="tab0" class="conten_box">
          <div class="title">项目详情</div>
          <div class="from">
            <el-form
              :model="ruleForm"
              :rules="rules"
              ref="ruleForm"
              label-width="100px"
              class="demo-ruleForm"
            >
              <el-form-item label="项目名称：" prop="name">
                <el-input
                  v-model="ruleForm.name"
                  placeholder="请输入项目名称"
                ></el-input>
              </el-form-item>
              <el-form-item label="项目时间：">
                <el-input
                  v-model="ruleForm.age"
                  placeholder="请输入项目时间"
                ></el-input>
              </el-form-item>
              <el-form-item label="项目分类：">
                <el-select v-model="ruleForm.typeId">
                  <el-option
                    v-for="item in projectType"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  ></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="展示形式：">
                <el-select v-model="ruleForm.application">
                  <el-option label="网页端" value="web"></el-option>
                  <el-option label="移动端" value="app"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="应用技术：">
                <el-select v-model="ruleForm.technology">
                  <el-option label="实景拍摄" value="live"></el-option>
                  <el-option label="虚拟建模" value="virtual"></el-option>
                  <el-option label="四维看看" value="4dkk"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="保密级别：">
                <el-select v-model="ruleForm.level">
                  <el-option label="一般--所有人可查阅" :value="1"></el-option>
                  <el-option
                    label="秘密--查阅人为公司内部所有员工，经过允许可对外分享"
                    :value="2"
                  ></el-option>
                  <el-option
                    label="机密--查阅人为管理员、项目负责人、获得允许的员工"
                    :value="3"
                  ></el-option>
                  <el-option
                    label="绝密--查阅人仅为管理员、项目负责人"
                    :value="4"
                  ></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="项目合作方：">
                <el-input
                  v-model="ruleForm.cooperation"
                  placeholder="请输入项目合作方"
                ></el-input>
              </el-form-item>
            </el-form>
          </div>
        </div>
        <div id="tab1" class="conten_box">
          <div class="title">项目网址</div>
          <div class="row" v-for="(item, index) in tab1Arr" :key="index">
            <el-input
              v-model="tab1Arr[index].name"
              placeholder="网址名称"
              style="width: 200px; margin-right: 20px"
            ></el-input>
            <el-input
              v-model="tab1Arr[index].href"
              placeholder="URL网址链接"
              style="width: 500px"
            ></el-input>
            <i
              class="el-icon-circle-close"
              @click="tab1Del(index)"
              v-if="index !== 0"
            ></i>
            <div class="tab_btn" @click="tab1Add" v-else>+ 添加网址</div>
          </div>
        </div>
        <div id="tab2" class="conten_box">
          <div class="title">三维场景</div>

          <div class="row" v-for="(item, index) in tab2Arr" :key="index">
            <el-input
              v-model="tab2Arr[index].name"
              placeholder="场景名称"
              style="width: 200px; margin-right: 20px"
            ></el-input>
            <el-input
              v-model="tab2Arr[index].href"
              placeholder="URL网址链接"
              style="width: 500px"
            ></el-input>
            <i
              class="el-icon-circle-close"
              @click="tab2Del(index)"
              v-if="index !== 0"
            ></i>
            <div class="tab_btn" @click="tab2Add" v-else>+ 添加场景</div>
          </div>
        </div>
        <!-- ------------------上传附件-------------------- -->
        <div id="tab3" class="conten_box">
          <div class="title" style="margin-bottom: 20px">资料文档</div>
          <el-upload
            class="upload-demo"
            drag
            :action="baseURL + '/cms/doc/upload'"
            :headers="{ token }"
            :on-success="successFujian"
            :show-file-list="true"
            multiple
          >
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">
              将文件拖到此处，或<em>点击上传</em>
            </div>
            <div class="el-upload__tip" slot="tip">
              <!-- 只能上传jpg/png文件，且不超过500kb -->
            </div>
          </el-upload>
          <!-- 上传成功后的数组数据 -->
          <div class="upFJSucc">
            <div v-for="(item, index) in fuJianArr" :key="index">
              <span>{{ item.name }}</span>
              <i class="el-icon-close" @click="delFJ(index)"></i>
            </div>
          </div>
        </div>
        <div id="tab4" class="conten_box">
          <div class="title">文物</div>
          <div class="imgBox">
            <div
              v-for="(item, index) in saveAntiqueArr"
              :key="index"
              @mouseenter="moveShowIdn = index"
              @mouseleave="moveShowIdn = null"
            >
              <img :src="baseURL + item.url" alt="" :onerror="defaultImg" />{{
                item.name
              }}
              <!-- 鼠标移上去显示的盒子 -->
              <div class="moveShow" v-show="moveShowIdn === index">
                <i class="el-icon-edit" @click="outEditAntique(item.id)"></i>
                <i class="el-icon-delete" @click="outDelAntique(index)"></i>
              </div>
            </div>
            <!-- 点击文物+号新增文物 -->
            <div class="uploaImg" @click="addAntique">+</div>
          </div>
        </div>
      </div>
      <!-- 底部按钮 -->
      <div class="button_btn">
        <div @click="$router.go(-1)">取 消</div>
        <div class="edit" @click="outBtnOk">保 存</div>
      </div>
    </div>
    <!-- 点击 文物 的+号出现弹出层 -->
    <el-dialog
      :title="addForm.id ? '编辑文物' : '添加文物'"
      :visible.sync="addIsShow"
      @close="addBtnX()"
    >
      <el-form
        :model="addForm"
        :rules="addRules"
        ref="addForm"
        label-width="100px"
        class="demo-ruleForm"
      >
        <el-form-item label="名称：" prop="name">
          <el-input
            v-model="addForm.name"
            placeholder="请输入名称"
            style="width: 500px"
          ></el-input>
        </el-form-item>
        <el-form-item label="链接：" prop="url">
          <el-input
            style="width: 500px"
            v-model="addForm.url"
            placeholder="请输入网址链接"
          ></el-input>
        </el-form-item>
        <el-form-item label="文物类别：">
          <el-select v-model="addForm.goodsTypeId">
            <el-option
              v-for="item in antiqueArr"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="文物图片：" class="myImgBox">
          <div class="upImgBox">
            <div
              class="imgdiv"
              :class="{ active: fengmianInd === index }"
              v-for="(item, index) in imgList"
              :key="index"
              @mouseenter="imgIconInd = index"
              @mouseleave="imgIconInd = null"
            >
              <img
                style="width: 100%; height: 100%"
                :src="baseURL + item.url"
                :onerror="defaultImg"
              />
              <div class="imgIcon" v-show="index === imgIconInd">
                <i class="el-icon-zoom-in" @click="lookImg(item.url)"></i>
                <a :href="baseURL + item.url" target="_blank" download
                  ><i class="el-icon-download"></i
                ></a>
                <i class="el-icon-delete" @click="delImg(index)"></i>
                <span
                  @click="modelSetIndex(item.id, index, item.url)"
                  v-if="fengmianInd !== index"
                  >设置封面</span
                >
              </div>
            </div>
          </div>
          <el-upload
            drag
            class="avatar-uploader"
            :action="baseURL + '/cms/goods/upload'"
            :headers="{ token }"
            :show-file-list="false"
            :before-upload="beforethumbUpload"
            :on-success="upload_thumb_success"
          >
            <div class="upImg">
              <i slot="default" class="el-icon-plus"></i>
            </div>
          </el-upload>
        </el-form-item>
        <span style="margin-left: 100px"
          >支持png / jpg / gif / jpeg的图片格式，最大支持20M。</span
        >
      </el-form>

      <div slot="footer" class="dialog-footer">
        <el-button @click="addBtnX">取 消</el-button>
        <el-button type="primary" @click="addBtnOk">保 存</el-button>
      </div>
    </el-dialog>
    <!-- 点击查看图片 -->
    <div class="lookImg" v-if="dialogImageIshow">
      <img :src="baseURL + dialogImageUrl" alt="" :onerror="defaultImg" />
      <div class="imgBtnX" @click="dialogImageIshow = false">关 闭</div>
    </div>
  </div>
</template>

<script>
import {
  getProjectType,
  getGoodsType,
  modelSetIndex,
  modelSave,
  getAntiqueById,
  projectAdd
} from '@/apis/tab1'
import axios from '@/utils/request'
export default {
  // import引入的组件需要注入到对象中才能使用
  name: 'tab1Add',
  components: {},
  data () {
    // 这里存放数据
    return {
      fengmianInd: 0,
      imgIconInd: null,
      imgList: [],
      dialogImageUrl: '',
      dialogImageIshow: false,
      addIsShow: false,
      addForm: {
        fileIds: '', // 图片id, 多个以逗号隔开
        name: '', // 名称
        url: '', // 链接
        goodsTypeId: null, // 文物类型id
        // projectId: '', // 项目id
        thumb: '' // 封面
      },
      addRules: {
        name: [
          { required: true, message: '不能为空', trigger: 'blur' },
          { max: 50, message: '不能超过50个字', trigger: 'blur' }
        ],
        url: { required: true, message: '不能为空', trigger: 'blur' }
      },
      // 文物类别数组
      antiqueArr: [],
      // 点击保存后的文物数组
      saveAntiqueArr: [],
      // 文物弹窗数据↑↑↑↑↑↑↑↑↑↑↑↑
      // 服务器前缀地址
      baseURL: '',
      token: '',
      // 项目网址数据
      tab1Arr: [{ name: '', href: '' }],
      // 三维场景数据
      tab2Arr: [{ name: '', href: '' }],
      topTabInd: 0,
      topTab: [
        { name: '项目详情', id: '#tab0' },
        { name: '项目网址', id: '#tab1' },
        { name: '三维场景', id: '#tab2' },
        { name: '资料文档', id: '#tab3' },
        { name: '文物', id: '#tab4' }
      ],
      ruleForm: {
        name: '',
        age: '',
        typeId: 1,
        application: 'web',
        technology: 'live',
        level: 1,
        cooperation: ''
      },
      // 项目分类数组
      projectType: [],
      rules: {
        name: { required: true, message: '请输入项目名称', trigger: 'blur' }
      },
      // 外层的文物数据
      moveShowIdn: null,
      // 上传附件成功的数组
      fuJianArr: []
    }
  },
  // 监听属性 类似于data概念
  computed: {},
  // 监控data中的数据变化
  watch: {},
  // 方法集合
  methods: {
    // 点击文物+号新增文物
    async addAntique () {
      const res = await getGoodsType()
      this.antiqueArr = res.data
      this.antiqueArr.unshift({ id: '', name: '' })
      this.addIsShow = true
      // 把封面默认变成第一个
      this.fengmianInd = 0
    },
    // 上面的tab栏切换
    tabCut (index) {
      this.topTabInd = index
    },
    // 点击添加网址
    tab1Add () {
      if (
        this.tab1Arr[this.tab1Arr.length - 1].name.trim() === '' ||
        this.tab1Arr[this.tab1Arr.length - 1].href.trim() === ''
      ) {
        return this.$message.warning('网址名称或链接不能为空')
      }
      this.tab1Arr.push({ name: '', href: '' })
    },
    tab1Del (index) {
      this.$confirm('确定删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.tab1Arr.splice(index, 1)
          this.$message.success('删除成功!')
        })
        .catch(() => {
          this.$message.info('已取消删除!')
        })
    },
    // 点击添加场景
    tab2Add () {
      if (
        this.tab2Arr[this.tab2Arr.length - 1].name.trim() === '' ||
        this.tab2Arr[this.tab2Arr.length - 1].href.trim() === ''
      ) {
        return this.$message.warning('场景名称或链接不能为空')
      }
      this.tab2Arr.push({ name: '', href: '' })
    },
    tab2Del (index) {
      this.$confirm('确定删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.tab2Arr.splice(index, 1)
          this.$message.success('删除成功!')
        })
        .catch(() => {
          this.$message.info('已取消删除!')
        })
    },
    // -------------点击外层文物-------------------
    // 编辑
    async outEditAntique (id) {
      const res = await getAntiqueById(id)
      // console.log(999, res)
      this.addForm = res.data.entity
      res.data.file.forEach((v, i) => {
        this.imgList.push({
          url: v.filePath,
          name: v.name,
          id: v.id
        })
        // index为1的是首页图片
        if (v.isIndex === 1) this.fengmianInd = i
      })
      this.addIsShow = true
    },
    // 删除
    outDelAntique (index) {
      this.$confirm('确定删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.saveAntiqueArr.splice(index, 1)
          this.$message.success('删除成功!')
        })
        .catch(() => {
          this.$message.info('已取消删除')
        })
    },
    // 保存
    async outBtnOk () {
      if (this.ruleForm.name.trim() === '') {
        return this.$message.warning('项目名称不能为空')
      }
      // 遍历文物数组，得到文物id
      const temp = []
      this.saveAntiqueArr.forEach((v) => {
        temp.push(v.id)
      })
      // 遍历附件数组，得到附件id
      const temp1 = []
      this.fuJianArr.forEach((v) => {
        temp1.push(v.id)
      })
      // 处理项目网址数据
      const websites = {}
      this.tab1Arr.forEach((v) => {
        websites[v.name] = v.href
      })
      // 处理三维场景数据
      const scenes = {}
      this.tab2Arr.forEach((v) => {
        scenes[v.name] = v.href
      })
      const obj = {
        ...this.ruleForm,
        goodsIds: temp.join(','),
        docIds: temp1.join(','),
        websites,
        scenes
      }
      // console.log(999, obj)
      const res = await projectAdd(obj)
      if (res.code === 0) {
        this.$router.push('/layout/tab1')
        this.$message.success('新增项目成功')
      }
      // console.log(999, res)
    },
    // --------------附件--------------

    successFujian (file) {
      // console.log('上传附件成功', file)
      if (file.code === 0) {
        this.fuJianArr.push({ name: file.data.name, id: file.data.id })
        this.$message.success('上传成功')
      } else if (file.code === -1) { this.$message.warning('上传失败，不支持的文件格式') }
    },
    // 删除附件
    delFJ (index) {
      // 点击删除
      this.$confirm('确定删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.fuJianArr.splice(index, 1)
          this.$message.success('删除成功!')
        })
        .catch(() => {
          this.$message.info('已取消删除')
        })
    },
    // ----------------文物弹窗里面---------------
    beforethumbUpload (file) {
      // console.log('上传文件前校验', file)
      // 限制图片大小和格式
      const sizeOk = file.size / 1024 / 1024 < 20
      const typeOk =
        file.type === 'image/png' ||
        file.type === 'image/jpeg' ||
        file.type === 'image/gif'

      return new Promise((resolve, reject) => {
        if (!typeOk) {
          this.$message.error('照片格式有误！')
          reject(file)
        } else if (!sizeOk) {
          this.$message.error('照片大小超过20M！')
          reject(file)
        } else {
          resolve(file)
        }
      })
    },
    async upload_thumb_success (data) {
      this.$message.success('上传成功')
      // console.log('上传文件成功', data)
      this.imgList.push({
        url: data.data.filePath,
        name: data.data.fileName,
        id: data.data.fileId
      })
      // 把第一张的url设置为封面---如果是新增
      // if (!this.addForm.id || this.imgList.length === 1) this.addForm.thumb = this.imgList[0].url
      if (this.imgList.length === 1) {
        await modelSetIndex(data.data.fileId)
        this.fengmianInd = 0
        this.addForm.thumb = this.imgList[0].url
      }
      // this.loading = false
      // this.ruleForm.thumb = data.data.filePath
    },
    delImg (index) {
      // 点击删除
      this.$confirm('确定删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.imgList.splice(index, 1)
          if (index === this.fengmianInd) {
            // 删除的是封面
            this.fengmianInd = null
            this.addForm.thumb = ''
          }
          this.$message.success('删除成功!')
        })
        .catch(() => {
          this.$message.info('已取消删除')
        })
    },
    // 点击放大镜，查看图片
    lookImg (url) {
      this.dialogImageUrl = url
      this.dialogImageIshow = true
    },
    // 点击设置为封面
    async modelSetIndex (id, index, url) {
      const res = await modelSetIndex(id)
      if (res.code === 0) {
        this.fengmianInd = index
        this.$message.success('设置封面成功')
        this.addForm.thumb = url
      }
    },
    // 点击弹窗里面的保存
    async addBtnOk () {
      if (this.addForm.name.trim() === '') {
        return this.$message.warning('文物名称不能为空')
      }
      if (this.addForm.name.length > 50) {
        return this.$message.warning('文物名称不能超过50个字')
      }

      if (this.addForm.url.trim() === '') {
        return this.$message.warning('文物链接不能为空')
      }
      const temp = []
      this.imgList.forEach((v) => {
        temp.push(v.id)
      })
      this.addForm.fileIds = temp.join(',')
      // console.log(999, this.addForm)
      const res = await modelSave(this.addForm)
      if (res.code === 0) {
        if (!this.addForm.id) {
          // 新增的push进去
          this.saveAntiqueArr.push({
            id: res.data.id,
            name: res.data.name,
            url: res.data.thumb
          })
        } else {
          // 修改的改变之前的数组
          this.saveAntiqueArr.forEach((v) => {
            if (v.id === this.addForm.id) {
              v.name = res.data.name
              v.url = res.data.thumb
            }
          })
        }
        this.$message.success('保存成功')
        this.addBtnX()
      }
      // console.log(999, res)
    },
    // 点击弹窗里面的取消
    addBtnX () {
      // 清空情况表单校验
      this.$refs.addForm.resetFields()

      this.addForm = {
        fileIds: '', // 图片id, 多个以逗号隔开
        name: '', // 名称
        url: '', // 链接
        goodsTypeId: null, // 文物类型id
        // projectId: '', // 项目id
        thumb: '' // 封面
      }
      this.imgList = []
      this.addIsShow = false
    }
  },
  // 生命周期 - 创建完成（可以访问当前this实例）
  async created () {
    // 获取服务器前缀地址
    this.baseURL = axios.defaults.baseURL
    // 获取用户token
    this.token = localStorage.getItem('SWKK_token')
    // 获取项目类型
    const res = await getProjectType()
    this.projectType = res.data
  },
  // 生命周期 - 挂载完成（可以访问DOM元素）
  mounted () {},
  beforeCreate () {}, // 生命周期 - 创建之前
  beforeMount () {}, // 生命周期 - 挂载之前
  beforeUpdate () {}, // 生命周期 - 更新之前
  updated () {}, // 生命周期 - 更新之后
  beforeDestroy () {}, // 生命周期 - 销毁之前
  destroyed () {}, // 生命周期 - 销毁完成
  activated () {} // 如果页面有keep-alive缓存功能，这个函数会触发
}
</script>
<style lang='less' scoped>
/deep/.el-upload-list__item .el-progress {
  top: 0;
}
/deep/.el-upload-list__item-name {
  display: none;
}
/deep/.el-upload-list__item-status-label {
  display: none !important;
}
/deep/.el-upload-list {
  width: 360px;
}
.lookImg {
  padding-top: 15px;
  display: flex;
  justify-content: center;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.7);
  img {
    max-width: 80vw;
    max-height: 80vh;
  }
  .imgBtnX {
    cursor: pointer;
    width: 100px;
    height: 30px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    background-color: #fff;
    border-radius: 8px;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
.myImgBox {
  /deep/.el-form-item__content {
    display: flex;
    flex-wrap: wrap;
  }
  /deep/.el-upload-dragger {
    width: 135px;
    height: 135px;
    border: 1px solid #ccc;
  }
}
.upImgBox {
  display: flex;
  .active {
    border: 2px solid #dc3545;
  }
}
.imgdiv {
  position: relative;
  margin: 0 10px 10px 0;
  border: 1px solid #ccc;
  width: 135px;
  height: 135px;
  & > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .imgIcon {
    justify-content: space-around;
    align-items: center;
    display: flex;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.6);
    i {
      color: #fff;
      font-size: 24px;
      cursor: pointer;
    }
    a {
      i {
        margin-top: 10px;
      }
    }
    i:hover {
      color: #dc3545;
    }
    & > span {
      cursor: pointer;
      color: #fff;
      position: absolute;
      bottom: 0px;
      left: 50%;
      transform: translateX(-50%);
    }
    & > span:hover {
      color: #dc3545;
    }
  }
}

.upImg {
  width: 135px;
  height: 135px;
  display: flex;
  justify-content: center;
  align-items: center;
  & > i {
    font-size: 50px;
    color: #ccc;
  }
}
/deep/.el-select {
  width: 500px;
}
//@import url(); 引入公共css类
.template {
  position: relative;
  padding: 0px 30px;
  .top {
    display: flex;
    align-items: center;
    height: 58px;
    width: 100%;

    .location {
      font-size: 22px;
      color: #999;
      & > span {
        color: black;
      }
    }
  }
  .conten {
    width: 100%;
    height: 720px;
    .txt {
      font-weight: 700;
      height: 40px;
      border-bottom: 1px solid #A3A2A9;
    }
    .search {
      position: relative;
      padding: 15px 20px 0;
      border-radius: 5px;
      box-shadow: 0px 0px 5px 0px;
      height: 110px;
      background-color: #d8dadc;
      ul {
        margin-top: 15px;
        display: flex;
        li {
          padding-bottom: 5px;
          cursor: pointer;
          margin-right: 100px;
          a {
            color: #666;
          }
        }
        li:hover {
          border-bottom: 2px solid #dc3545;
          a {
            color: black;
          }
        }
        .active {
          border-bottom: 2px solid #dc3545;
          a {
            color: black;
          }
        }
      }
    }
    .conten_box {
      position: relative;
      padding: 15px 30px;
      background-color: #fff;
      margin-top: 10px;
      .title {
        font-weight: 700;
        padding-bottom: 8px;
        font-size: 20px;
        color: #c82333;
        border-bottom: 1px solid #ccc;
      }
      .from {
        margin-top: 22px;
        width: 600px;
      }
      .tab_btn {
        margin-left: 20px;
        cursor: pointer;
        color: #fff;
        width: 130px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #dc3545;
      }
      .row {
        display: flex;
        align-items: center;
        margin: 15px 0 0;
        & > div {
          font-weight: 700;
        }
        a {
          background-color: #e7e9eb;
          padding: 5px 10px;
          margin-right: 20px;
        }
        i {
          margin-left: 20px;
          cursor: pointer;
          font-size: 24px;
        }
      }
      .imgBox {
        display: flex;
        flex-wrap: wrap;
        & > div {
          // cursor: pointer;
          position: relative;
          word-wrap: break-word;
          text-align: center;
          width: 120px;
          margin: 20px 0 0 10px;
          // border: 1px solid #ccc;
          // box-shadow: 1px 1px 3px 0px;
          .moveShow {
            position: absolute;
            left: 0;
            top: 0;
            width: 120px;
            height: 120px;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: space-around;
            align-items: center;
            & > i {
              cursor: pointer;
              color: #fff;
              font-size: 24px;
            }
            & > i:hover {
              color: #dc3545;
            }
          }
        }
        img {
          border: 1px solid #ccc;
          box-shadow: 1px 1px 3px 0px;
          padding: 5px;
          width: 120px;
          height: 120px;
          display: block;
          margin: 0 auto;
          margin-bottom: 10px;
          object-fit: contain;
        }
        .uploaImg {
          width: 120px;
          height: 120px;

          cursor: pointer;
          color: #ccc;
          border: 1px solid #ccc;
          font-size: 80px;
          font-weight: 700;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
      .upFJSucc {
        margin-top: 30px;
        width: 360px;
        & > div {
          margin-top: 8px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          i {
            cursor: pointer;
            &:hover {
              color: #dc3545;
            }
          }
        }
      }
    }
    .tabAll {
      max-height: 600px;
      overflow-y: auto;
    }
  }
  .button_btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    left: 100px;
    bottom: 30px;
    width: 300px;
    height: 40px;
    div {
      border-radius: 10px;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100px;
      height: 40px;
      background-color: #fff;
      cursor: pointer;
    }
    .edit {
      color: #fff !important;
      background-color: #dc3545 !important;
    }
  }
}
</style>
