兰宝车间质量管理系统-前端
疯狂的狮子Li
2023-04-03 1595cb282aab5399862fac6406b5de550863e3b6
src/views/system/user/profile/userAvatar.vue
@@ -100,58 +100,58 @@
</script>
<template>
   <div class="user-info-head" @click="editCropper()">
      <img :src="options.img as string" title="点击上传头像" class="img-circle img-lg" />
      <el-dialog :title="title" v-model="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
         <el-row>
            <el-col :xs="24" :md="12" :style="{ height: '350px' }">
               <vue-cropper
                  ref="cropper"
                  :img="options.img"
                  :info="true"
                  :autoCrop="options.autoCrop"
                  :autoCropWidth="options.autoCropWidth"
                  :autoCropHeight="options.autoCropHeight"
                  :fixedBox="options.fixedBox"
                  :outputType="options.outputType"
                  @realTime="realTime"
                  v-if="visible"
               />
            </el-col>
            <el-col :xs="24" :md="12" :style="{ height: '350px' }">
               <div class="avatar-upload-preview">
                  <img :src="options.previews.url" :style="options.previews.img" />
               </div>
            </el-col>
         </el-row>
         <br />
         <el-row>
            <el-col :lg="2" :md="2">
               <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload">
                  <el-button>
                     选择
                     <el-icon class="el-icon--right"><Upload /></el-icon>
                  </el-button>
               </el-upload>
            </el-col>
            <el-col :lg="{ span: 1, offset: 2 }" :md="2">
               <el-button icon="Plus" @click="changeScale(1)"></el-button>
            </el-col>
            <el-col :lg="{ span: 1, offset: 1 }" :md="2">
               <el-button icon="Minus" @click="changeScale(-1)"></el-button>
            </el-col>
            <el-col :lg="{ span: 1, offset: 1 }" :md="2">
               <el-button icon="RefreshLeft" @click="rotateLeft()"></el-button>
            </el-col>
            <el-col :lg="{ span: 1, offset: 1 }" :md="2">
               <el-button icon="RefreshRight" @click="rotateRight()"></el-button>
            </el-col>
            <el-col :lg="{ span: 2, offset: 6 }" :md="2">
               <el-button type="primary" @click="uploadImg()">提 交</el-button>
            </el-col>
         </el-row>
      </el-dialog>
   </div>
  <div class="user-info-head" @click="editCropper()">
    <img :src="options.img as string" title="点击上传头像" class="img-circle img-lg" />
    <el-dialog :title="title" v-model="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
      <el-row>
        <el-col :xs="24" :md="12" :style="{ height: '350px' }">
          <vue-cropper
            ref="cropper"
            :img="options.img"
            :info="true"
            :autoCrop="options.autoCrop"
            :autoCropWidth="options.autoCropWidth"
            :autoCropHeight="options.autoCropHeight"
            :fixedBox="options.fixedBox"
            :outputType="options.outputType"
            @realTime="realTime"
            v-if="visible"
          />
        </el-col>
        <el-col :xs="24" :md="12" :style="{ height: '350px' }">
          <div class="avatar-upload-preview">
            <img :src="options.previews.url" :style="options.previews.img" />
          </div>
        </el-col>
      </el-row>
      <br />
      <el-row>
        <el-col :lg="2" :md="2">
          <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload">
            <el-button>
              选择
              <el-icon class="el-icon--right"><Upload /></el-icon>
            </el-button>
          </el-upload>
        </el-col>
        <el-col :lg="{ span: 1, offset: 2 }" :md="2">
          <el-button icon="Plus" @click="changeScale(1)"></el-button>
        </el-col>
        <el-col :lg="{ span: 1, offset: 1 }" :md="2">
          <el-button icon="Minus" @click="changeScale(-1)"></el-button>
        </el-col>
        <el-col :lg="{ span: 1, offset: 1 }" :md="2">
          <el-button icon="RefreshLeft" @click="rotateLeft()"></el-button>
        </el-col>
        <el-col :lg="{ span: 1, offset: 1 }" :md="2">
          <el-button icon="RefreshRight" @click="rotateRight()"></el-button>
        </el-col>
        <el-col :lg="{ span: 2, offset: 6 }" :md="2">
          <el-button type="primary" @click="uploadImg()">提 交</el-button>
        </el-col>
      </el-row>
    </el-dialog>
  </div>
</template>
<style lang="scss" scoped>