|
@@ -1,299 +1,300 @@
|
|
<template>
|
|
<template>
|
|
- <div class="mine">
|
|
|
|
- <!--<navbar />-->
|
|
|
|
- <div class="mine-page">
|
|
|
|
- <div class="left-max-box">
|
|
|
|
- <p class="left-title">个人中心</p>
|
|
|
|
- <div class="left-user-img">
|
|
|
|
- <userAvatar :user="user" />
|
|
|
|
- </div>
|
|
|
|
- <p class="left-name">{{user.nickName}}</p>
|
|
|
|
- <p class="left-num">{{user.userType=='11'?'工号:':(user.userType=='22'?'学号:':'其他:')}}{{user.userName}}</p>
|
|
|
|
- <div class="left-text-max-box">
|
|
|
|
- <div class="left-text-big-box">
|
|
|
|
- <div class="left-text-big-box-left">
|
|
|
|
- <img v-if="user.userType == '22'" src="@/assets/ZDimages/mine/icon_grzx_xl.png">
|
|
|
|
- <img v-else src="@/assets/ZDimages/mine/icon_grzx_zc.png">
|
|
|
|
- <p>{{user.education?user.education:'未设置'}}</p>
|
|
|
|
- </div>
|
|
|
|
- <div class="left-text-big-box-right">
|
|
|
|
- <img class="img-two" v-if="user.userType == '22'" src="@/assets/ZDimages/mine/icon_grzx_zy.png">
|
|
|
|
- <img class="img-one" v-else src="@/assets/ZDimages/mine/icon_grzx_zw.png">
|
|
|
|
- <p>{{user.major?user.major:'未设置'}}</p>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="left-text-min-box">
|
|
|
|
- <img src="@/assets/ZDimages/mine/icon_grzx_sjh.png">
|
|
|
|
- <p>{{user.phonenumber?user.phonenumber:'未设置'}}</p>
|
|
|
|
- </div>
|
|
|
|
- <div class="left-text-min-box">
|
|
|
|
- <img src="@/assets/ZDimages/mine/icon_grzx_yx.png">
|
|
|
|
- <p>{{user.email?user.email:'未设置'}}</p>
|
|
|
|
|
|
+ <div class="mine">
|
|
|
|
+ <!--<navbar />-->
|
|
|
|
+ <div class="mine-page">
|
|
|
|
+ <div class="left-max-box">
|
|
|
|
+ <p class="left-title">个人中心</p>
|
|
|
|
+ <div class="left-user-img">
|
|
|
|
+ <userAvatar :user="user" />
|
|
|
|
+ </div>
|
|
|
|
+ <p class="left-name">{{user.nickName}}</p>
|
|
|
|
+ <p class="left-num">{{user.userType=='11'?'工号:':(user.userType=='22'?'学号:':'其他:')}}{{user.userName}}</p>
|
|
|
|
+ <div class="left-text-max-box">
|
|
|
|
+ <div class="left-text-big-box">
|
|
|
|
+ <div class="left-text-big-box-left">
|
|
|
|
+ <img v-if="user.userType == '22'" src="@/assets/ZDimages/mine/icon_grzx_xl.png">
|
|
|
|
+ <img v-else src="@/assets/ZDimages/mine/icon_grzx_zc.png">
|
|
|
|
+ <p>{{user.education?user.education:'未设置'}}</p>
|
|
</div>
|
|
</div>
|
|
- <div class="left-text-min-box">
|
|
|
|
- <img src="@/assets/ZDimages/mine/icon_grzx_bgl.png">
|
|
|
|
- <p>{{user.deptName?user.deptName:'未设置'}}</p>
|
|
|
|
|
|
+ <div class="left-text-big-box-right">
|
|
|
|
+ <img class="img-two" v-if="user.userType == '22'" src="@/assets/ZDimages/mine/icon_grzx_zy.png">
|
|
|
|
+ <img class="img-one" v-else src="@/assets/ZDimages/mine/icon_grzx_zw.png">
|
|
|
|
+ <p>{{user.major?user.major:'未设置'}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="left-type-text-max-box">
|
|
|
|
- <div>
|
|
|
|
- <p>手机号码</p>
|
|
|
|
- <p :class="user.phonenumber?'p-color-a':'p-color-b'">{{user.phonenumber?'已设置':'未设置'}}</p>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <p>系统头像</p>
|
|
|
|
- <p :class="user.avatar?'p-color-a':'p-color-b'">{{user.avatar?'已设置':'未设置'}}</p>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <p>人脸照片</p>
|
|
|
|
- <p :class="user.faceImg?'p-color-a':'p-color-b'">{{user.faceImg?'已设置':'未设置'}}</p>
|
|
|
|
- </div>
|
|
|
|
- <!--<div>-->
|
|
|
|
- <!--<p>电子签名</p>-->
|
|
|
|
- <!--<p :class="user.signature?'p-color-a':'p-color-b'">{{user.signature?'已设置':'未设置'}}</p>-->
|
|
|
|
- <!--</div>-->
|
|
|
|
|
|
+ <div class="left-text-min-box">
|
|
|
|
+ <img src="@/assets/ZDimages/mine/icon_grzx_sjh.png">
|
|
|
|
+ <p>{{user.phonenumber?user.phonenumber:'未设置'}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="left-text-min-box">
|
|
|
|
+ <img src="@/assets/ZDimages/mine/icon_grzx_yx.png">
|
|
|
|
+ <p>{{user.email?user.email:'未设置'}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="left-text-min-box">
|
|
|
|
+ <img src="@/assets/ZDimages/mine/icon_grzx_bgl.png">
|
|
|
|
+ <p>{{user.deptName?user.deptName:'未设置'}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="right-max-box">
|
|
|
|
- <div class="right-title-box">
|
|
|
|
- <div class="title-button-min-box">
|
|
|
|
- <p :class="buttonType == '1'?'bottomColor':''">基本资料</p>
|
|
|
|
- <p :class="buttonType == '1'?'bottomBack':''"></p>
|
|
|
|
- </div>
|
|
|
|
- <!--<div class="title-button-min-box" @click="buttonTypeClick(2)">-->
|
|
|
|
- <!--<p :class="buttonType == '2'?'bottomColor':''">安全设置</p>-->
|
|
|
|
- <!--<p :class="buttonType == '2'?'bottomBack':''"></p>-->
|
|
|
|
- <!--</div>-->
|
|
|
|
- <p class="right-null-p"></p>
|
|
|
|
- <!--<p class="reset-button-one right-out-button" @click="outButton">返回</p>-->
|
|
|
|
|
|
+ <div class="left-type-text-max-box">
|
|
|
|
+ <div>
|
|
|
|
+ <p>手机号码</p>
|
|
|
|
+ <p :class="user.phonenumber?'p-color-a':'p-color-b'">{{user.phonenumber?'已设置':'未设置'}}</p>
|
|
</div>
|
|
</div>
|
|
- <div v-if="buttonType == 1">
|
|
|
|
- <el-form :model="userform" ref="userform" :rules="rules" :inline="true" >
|
|
|
|
- <div>
|
|
|
|
- <el-form-item class="form-item-min" label="手机号码:" prop="phonenumber" label-width="120px">
|
|
|
|
- <el-input
|
|
|
|
- maxlength="11"
|
|
|
|
- disabled
|
|
|
|
- v-model="userform.phonenumber"
|
|
|
|
- placeholder="未填写"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"
|
|
|
|
- />
|
|
|
|
- <span style="color:#0183FA;margin-left:20px;cursor: pointer;" @click="showPhone(1)">修改手机号</span>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item class="form-item-min" label="邮箱:" prop="email" label-width="110px">
|
|
|
|
- <el-input
|
|
|
|
- maxlength="30"
|
|
|
|
- v-model="userform.email"
|
|
|
|
- placeholder="请输入邮箱"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item class="form-item-min" label="出生年月:" prop="dateBirth" label-width="120px">
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="userform.dateBirth"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- type="date"
|
|
|
|
- placeholder="请选择出生日期">
|
|
|
|
- </el-date-picker>
|
|
|
|
- </el-form-item>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <el-form-item class="form-item-min" label="人脸照片:" prop="searchValue" label-width="120px">
|
|
|
|
- <div class="up-data-box" style="width:210px;">
|
|
|
|
- <div class="up-data-min-box" style="display: flex;">
|
|
|
|
- <div class="up-data-button" v-if="!user.faceImg" @click="upFaceOpenClick(2)">
|
|
|
|
- <p>+</p>
|
|
|
|
- <p>上传</p>
|
|
|
|
- </div>
|
|
|
|
- <img class="img-one" :src="user.faceImg" v-if="user.faceImg" @click="upFaceOpenClick(2)">
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
- <!--<el-form-item class="form-item-min" label="电子签名:" prop="searchValue" label-width="120px">-->
|
|
|
|
- <!--<div class="up-data-box">-->
|
|
|
|
- <!--<div class="up-data-min-box" style="display: flex;">-->
|
|
|
|
- <!--<el-upload-->
|
|
|
|
- <!--class="position-button"-->
|
|
|
|
- <!--:action="uploadImgUrlTwo"-->
|
|
|
|
- <!--:show-file-list="false"-->
|
|
|
|
- <!--:auto-upload="false"-->
|
|
|
|
- <!--:on-change="signatureChange"-->
|
|
|
|
- <!--accept="image/jpeg,image/gif,image/png"-->
|
|
|
|
- <!--:headers="headers"-->
|
|
|
|
- <!--:before-upload="beforeAvatarUpload">-->
|
|
|
|
- <!--<div class="up-data-button" v-if="!user.signature">-->
|
|
|
|
- <!--<p>+</p>-->
|
|
|
|
- <!--<p>上传</p>-->
|
|
|
|
- <!--</div>-->
|
|
|
|
- <!--<img class="img-two" :src="user.signature" v-if="user.signature">-->
|
|
|
|
- <!--</el-upload>-->
|
|
|
|
- <!--</div>-->
|
|
|
|
- <!--</div>-->
|
|
|
|
- <!--</el-form-item>-->
|
|
|
|
- </div>
|
|
|
|
- </el-form>
|
|
|
|
- <p class="type-one-max-box add-button-one-120" @click="upDataProfile">保存</p>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <p>系统头像</p>
|
|
|
|
+ <p :class="user.avatar?'p-color-a':'p-color-b'">{{user.avatar?'已设置':'未设置'}}</p>
|
|
</div>
|
|
</div>
|
|
- <div v-if="buttonType == 2">
|
|
|
|
- <el-form :model="form" ref="form" :inline="true" :rules="rules">
|
|
|
|
- <div>
|
|
|
|
- <el-form-item class="form-item-min" label="原始密码:" prop="oldPassword" label-width="120px">
|
|
|
|
- <el-input
|
|
|
|
- maxlength="16"
|
|
|
|
- type="password"
|
|
|
|
- v-model.trim="form.oldPassword"
|
|
|
|
- placeholder="请输入原始密码"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item class="form-item-min" label="新密码:" prop="newPassword" label-width="110px">
|
|
|
|
- <el-input
|
|
|
|
- maxlength="16"
|
|
|
|
- type="password"
|
|
|
|
- v-model.trim="form.newPassword"
|
|
|
|
- placeholder="请输入新密码"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item class="form-item-min" label="确认密码:" prop="confirmPassword" label-width="120px">
|
|
|
|
- <el-input
|
|
|
|
- maxlength="16"
|
|
|
|
- type="password"
|
|
|
|
- v-model.trim="form.confirmPassword"
|
|
|
|
- placeholder="请确认密码"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <span class="type-one-max-box add-button-one-120" style="margin-left:20px;display: inline-block;" @click="submit">保存</span>
|
|
|
|
- </div>
|
|
|
|
- </el-form>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <p>人脸照片</p>
|
|
|
|
+ <p :class="user.faceImg?'p-color-a':'p-color-b'">{{user.faceImg?'已设置':'未设置'}}</p>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!--<div>-->
|
|
|
|
+ <!--<p>电子签名</p>-->
|
|
|
|
+ <!--<p :class="user.signature?'p-color-a':'p-color-b'">{{user.signature?'已设置':'未设置'}}</p>-->
|
|
|
|
+ <!--</div>-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!--电子签名-->
|
|
|
|
- <el-dialog class="up-img-box" title="上传电子签名" :visible.sync="upImgOpen" width="600px" append-to-body>
|
|
|
|
- <p>示例</p>
|
|
|
|
- <img class="img-one" src="@/assets/ZDimages/icon_scdzqm_sl.png">
|
|
|
|
- <p>正楷签名</p>
|
|
|
|
- <div class="cropper-box">
|
|
|
|
- <vueCropper
|
|
|
|
- ref="cropper"
|
|
|
|
- :img="option.img"
|
|
|
|
- :outputSize="option.outputSize"
|
|
|
|
- :outputType="option.outputType"
|
|
|
|
- :info="option.info"
|
|
|
|
- :canScale="option.canScale"
|
|
|
|
- :autoCrop="option.autoCrop"
|
|
|
|
- :autoCropWidth="option.autoCropWidth"
|
|
|
|
- :autoCropHeight="option.autoCropHeight"
|
|
|
|
- :fixed="option.fixed"
|
|
|
|
- :fixedNumber="option.fixedNumber"
|
|
|
|
- :full="option.full"
|
|
|
|
- :fixedBox="option.fixedBox"
|
|
|
|
- :canMove="option.canMove"
|
|
|
|
- :canMoveBox="option.canMoveBox"
|
|
|
|
- :original="option.original"
|
|
|
|
- :centerBox="option.centerBox"
|
|
|
|
- :height="option.height"
|
|
|
|
- :infoTrue="option.infoTrue"
|
|
|
|
- :maxImgSize="option.maxImgSize"
|
|
|
|
- :enlarge="option.enlarge"
|
|
|
|
- :mode="option.mode"
|
|
|
|
- @realTime="realTime"
|
|
|
|
- @imgLoad="imgLoad"
|
|
|
|
- ></vueCropper>
|
|
|
|
- <p class="cropper-button" @click="upImgButton">保存查看</p>
|
|
|
|
- <el-upload
|
|
|
|
- class="position-button"
|
|
|
|
- :action="uploadImgUrl"
|
|
|
|
- :show-file-list="false"
|
|
|
|
- :auto-upload="false"
|
|
|
|
- :on-change="signatureChange"
|
|
|
|
- accept="image/jpeg,image/gif,image/png"
|
|
|
|
- :headers="headers"
|
|
|
|
- :before-upload="beforeAvatarUpload">
|
|
|
|
- <p style="position: absolute;right:100px;top:10px;z-index:1;color:#fff;background:#14AE10;cursor: pointer;padding:5px 10px;margin:0;border-radius:6px;">选择签名</p>
|
|
|
|
- </el-upload>
|
|
|
|
|
|
+ <div class="right-max-box">
|
|
|
|
+ <div class="right-title-box">
|
|
|
|
+ <div class="title-button-min-box">
|
|
|
|
+ <p :class="buttonType == '1'?'bottomColor':''">基本资料</p>
|
|
|
|
+ <p :class="buttonType == '1'?'bottomBack':''"></p>
|
|
|
|
+ </div>
|
|
|
|
+ <!--<div class="title-button-min-box" @click="buttonTypeClick(2)">-->
|
|
|
|
+ <!--<p :class="buttonType == '2'?'bottomColor':''">安全设置</p>-->
|
|
|
|
+ <!--<p :class="buttonType == '2'?'bottomBack':''"></p>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+ <p class="right-null-p"></p>
|
|
|
|
+ <!--<p class="reset-button-one right-out-button" @click="outButton">返回</p>-->
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="buttonType == 1">
|
|
|
|
+ <el-form :model="userform" ref="userform" :rules="rules" :inline="true" >
|
|
|
|
+ <div>
|
|
|
|
+ <el-form-item class="form-item-min" label="手机号码:" prop="phonenumber" label-width="120px">
|
|
|
|
+ <el-input
|
|
|
|
+ maxlength="11"
|
|
|
|
+ disabled
|
|
|
|
+ v-model="userform.phonenumber"
|
|
|
|
+ placeholder="未填写"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"
|
|
|
|
+ />
|
|
|
|
+ <span style="color:#0183FA;margin-left:20px;cursor: pointer;" @click="showPhone(1)">修改手机号</span>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="form-item-min" label="邮箱:" prop="email" label-width="120px">
|
|
|
|
+ <el-input
|
|
|
|
+ maxlength="30"
|
|
|
|
+ v-model="userform.email"
|
|
|
|
+ placeholder="请输入邮箱"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="form-item-min" label="出生年月:" prop="dateBirth" label-width="120px">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="userform.dateBirth"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ type="date"
|
|
|
|
+ placeholder="请选择出生日期">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <el-form-item class="form-item-min" label="人脸照片:" prop="searchValue" label-width="120px">
|
|
|
|
+ <div class="up-data-box" style="width:210px;">
|
|
|
|
+ <div class="up-data-min-box" style="display: flex;">
|
|
|
|
+ <div class="up-data-button" v-if="!user.faceImg" @click="upFaceOpenClick(2)">
|
|
|
|
+ <p>+</p>
|
|
|
|
+ <p>上传</p>
|
|
|
|
+ </div>
|
|
|
|
+ <img class="img-one" :src="user.faceImg" v-if="user.faceImg" @click="upFaceOpenClick(2)">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!--<el-form-item class="form-item-min" label="电子签名:" prop="searchValue" label-width="120px">-->
|
|
|
|
+ <!--<div class="up-data-box">-->
|
|
|
|
+ <!--<div class="up-data-min-box" style="display: flex;">-->
|
|
|
|
+ <!--<el-upload-->
|
|
|
|
+ <!--class="position-button"-->
|
|
|
|
+ <!--:action="uploadImgUrlTwo"-->
|
|
|
|
+ <!--:show-file-list="false"-->
|
|
|
|
+ <!--:auto-upload="false"-->
|
|
|
|
+ <!--:on-change="signatureChange"-->
|
|
|
|
+ <!--accept="image/jpeg,image/gif,image/png"-->
|
|
|
|
+ <!--:headers="headers"-->
|
|
|
|
+ <!--:before-upload="beforeAvatarUpload">-->
|
|
|
|
+ <!--<div class="up-data-button" v-if="!user.signature">-->
|
|
|
|
+ <!--<p>+</p>-->
|
|
|
|
+ <!--<p>上传</p>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+ <!--<img class="img-two" :src="user.signature" v-if="user.signature">-->
|
|
|
|
+ <!--</el-upload>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+ <!--</el-form-item>-->
|
|
|
|
+ </div>
|
|
|
|
+ </el-form>
|
|
|
|
+ <p class="type-one-max-box add-button-one-120" @click="upDataProfile">保存</p>
|
|
</div>
|
|
</div>
|
|
- <p style="color:#999;">请将签名置于选择框内以便提高识别度</p>
|
|
|
|
- <img class="cropper-img" v-if="signatureData" :src="signatureData">
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
- <el-button @click="upImgOpenClick(1)">取 消</el-button>
|
|
|
|
- <el-button type="primary" @click="upSignatureData">确 定</el-button>
|
|
|
|
|
|
+ <div v-if="buttonType == 2">
|
|
|
|
+ <el-form :model="form" ref="form" :inline="true" :rules="rules">
|
|
|
|
+ <div>
|
|
|
|
+ <el-form-item class="form-item-min" label="原始密码:" prop="oldPassword" label-width="120px">
|
|
|
|
+ <el-input
|
|
|
|
+ maxlength="16"
|
|
|
|
+ type="password"
|
|
|
|
+ v-model.trim="form.oldPassword"
|
|
|
|
+ placeholder="请输入原始密码"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="form-item-min" label="新密码:" prop="newPassword" label-width="110px">
|
|
|
|
+ <el-input
|
|
|
|
+ maxlength="16"
|
|
|
|
+ type="password"
|
|
|
|
+ v-model.trim="form.newPassword"
|
|
|
|
+ placeholder="请输入新密码"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item class="form-item-min" label="确认密码:" prop="confirmPassword" label-width="120px">
|
|
|
|
+ <el-input
|
|
|
|
+ maxlength="16"
|
|
|
|
+ type="password"
|
|
|
|
+ v-model.trim="form.confirmPassword"
|
|
|
|
+ placeholder="请确认密码"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <span class="type-one-max-box add-button-one-120" style="margin-left:20px;display: inline-block;" @click="submit">保存</span>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form>
|
|
</div>
|
|
</div>
|
|
- </el-dialog>
|
|
|
|
- <!--上传照片-->
|
|
|
|
- <el-dialog class="up-img-box" title="上传照片" :visible.sync="upFaceOpen" width="600px" append-to-body>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!--电子签名-->
|
|
|
|
+ <el-dialog class="up-img-box" title="上传电子签名" :visible.sync="upImgOpen" width="600px" append-to-body>
|
|
|
|
+ <p>示例</p>
|
|
|
|
+ <img class="img-one" src="@/assets/ZDimages/icon_scdzqm_sl.png">
|
|
|
|
+ <p>正楷签名</p>
|
|
|
|
+ <div class="cropper-box">
|
|
|
|
+ <vueCropper
|
|
|
|
+ ref="cropper"
|
|
|
|
+ :img="option.img"
|
|
|
|
+ :outputSize="option.outputSize"
|
|
|
|
+ :outputType="option.outputType"
|
|
|
|
+ :info="option.info"
|
|
|
|
+ :canScale="option.canScale"
|
|
|
|
+ :autoCrop="option.autoCrop"
|
|
|
|
+ :autoCropWidth="option.autoCropWidth"
|
|
|
|
+ :autoCropHeight="option.autoCropHeight"
|
|
|
|
+ :fixed="option.fixed"
|
|
|
|
+ :fixedNumber="option.fixedNumber"
|
|
|
|
+ :full="option.full"
|
|
|
|
+ :fixedBox="option.fixedBox"
|
|
|
|
+ :canMove="option.canMove"
|
|
|
|
+ :canMoveBox="option.canMoveBox"
|
|
|
|
+ :original="option.original"
|
|
|
|
+ :centerBox="option.centerBox"
|
|
|
|
+ :height="option.height"
|
|
|
|
+ :infoTrue="option.infoTrue"
|
|
|
|
+ :maxImgSize="option.maxImgSize"
|
|
|
|
+ :enlarge="option.enlarge"
|
|
|
|
+ :mode="option.mode"
|
|
|
|
+ @realTime="realTime"
|
|
|
|
+ @imgLoad="imgLoad"
|
|
|
|
+ ></vueCropper>
|
|
|
|
+ <p class="cropper-button" @click="upImgButton">保存查看</p>
|
|
<el-upload
|
|
<el-upload
|
|
- ref="faceUpLoad"
|
|
|
|
class="position-button"
|
|
class="position-button"
|
|
:action="uploadImgUrl"
|
|
:action="uploadImgUrl"
|
|
:show-file-list="false"
|
|
:show-file-list="false"
|
|
:auto-upload="false"
|
|
:auto-upload="false"
|
|
- :on-change="faceChange"
|
|
|
|
|
|
+ :on-change="signatureChange"
|
|
accept="image/jpeg,image/gif,image/png"
|
|
accept="image/jpeg,image/gif,image/png"
|
|
- :on-success="(res)=>handleAvatarSuccess(res)"
|
|
|
|
:headers="headers"
|
|
:headers="headers"
|
|
:before-upload="beforeAvatarUpload">
|
|
:before-upload="beforeAvatarUpload">
|
|
- <div v-if="!upFaceUrl" style="width:300px;height:300px;border: 1px dashed #E0E0E0;cursor: pointer;margin:20px 130px 0;">
|
|
|
|
- <p style="text-align: center;color:#999;font-weight:500;font-size: 20px;line-height:300px;margin:0;">+</p>
|
|
|
|
- </div>
|
|
|
|
- <div v-if="upFaceUrl" class="scrollbar-box" style="width:560px;margin:0 auto;max-height:700px;overflow-y: scroll">
|
|
|
|
- <img :src="upFaceUrl" style="max-width:560px;border: 1px dashed #E0E0E0;cursor: pointer;margin:0 auto;">
|
|
|
|
- </div>
|
|
|
|
|
|
+ <p style="position: absolute;right:100px;top:10px;z-index:1;color:#fff;background:#14AE10;cursor: pointer;padding:5px 10px;margin:0;border-radius:6px;">选择签名</p>
|
|
</el-upload>
|
|
</el-upload>
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
- <el-button @click="faceButton(1)">取 消</el-button>
|
|
|
|
- <el-button type="primary" @click="faceButton(2)">确 定</el-button>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <p style="color:#999;">请将签名置于选择框内以便提高识别度</p>
|
|
|
|
+ <img class="cropper-img" v-if="signatureData" :src="signatureData">
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="upImgOpenClick(1)">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="upSignatureData">确 定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <!--上传照片-->
|
|
|
|
+ <el-dialog class="up-img-box" title="上传照片" :visible.sync="upFaceOpen" width="600px" append-to-body>
|
|
|
|
+ <el-upload
|
|
|
|
+ ref="faceUpLoad"
|
|
|
|
+ class="position-button"
|
|
|
|
+ :action="uploadImgUrl"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ :auto-upload="false"
|
|
|
|
+ :on-change="faceChange"
|
|
|
|
+ accept="image/jpeg,image/gif,image/png"
|
|
|
|
+ :on-success="(res)=>handleAvatarSuccess(res)"
|
|
|
|
+ :headers="headers"
|
|
|
|
+ :before-upload="beforeAvatarUpload">
|
|
|
|
+ <div v-if="!upFaceUrl" style="width:300px;height:300px;border: 1px dashed #E0E0E0;cursor: pointer;margin:20px 130px 0;">
|
|
|
|
+ <p style="text-align: center;color:#999;font-weight:500;font-size: 20px;line-height:300px;margin:0;">+</p>
|
|
</div>
|
|
</div>
|
|
- </el-dialog>
|
|
|
|
- <!--修改手机号-->
|
|
|
|
- <el-dialog class="revise-phone-box" @close="offPhone" title="修改手机号" :visible.sync="dialogPhoneType"
|
|
|
|
- v-if="dialogPhoneType" width="400px" append-to-body>
|
|
|
|
- <el-form ref="phoneForm" :model="phoneForm" :rules="rules" label-width="0px">
|
|
|
|
- <el-form-item label="" prop="phone">
|
|
|
|
- <div class="phone-box">
|
|
|
|
- <el-input
|
|
|
|
- maxlength="11"
|
|
|
|
- v-model.trim="phoneForm.phone"
|
|
|
|
- :placeholder="phoneState == 1?'请输入旧手机号':'请输入新手机号'"
|
|
|
|
- clearable>
|
|
|
|
- <template slot="prepend">+86</template>
|
|
|
|
- </el-input>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <el-form ref="codeForm" :model="phoneForm" :rules="rules" label-width="0px">
|
|
|
|
- <el-form-item label="" prop="code">
|
|
|
|
- <div class="code-box">
|
|
|
|
- <el-input
|
|
|
|
- maxlength="6"
|
|
|
|
- v-model.trim="phoneForm.code"
|
|
|
|
- placeholder="请输入验证码"
|
|
|
|
- clearable>
|
|
|
|
- </el-input>
|
|
|
|
- <p class="code-button" @click="getCode">{{codeTimeText}}</p>
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
- <el-button style="width:100px;" @click="showPhone(2)">取 消</el-button>
|
|
|
|
- <el-button style="width:100px;" type="primary" @click="revisePhone">{{phoneState==1?'下一步':(phoneState==2?'确定':'')}}</el-button>
|
|
|
|
|
|
+ <div v-if="upFaceUrl" class="scrollbar-box" style="width:560px;margin:0 auto;max-height:700px;overflow-y: scroll">
|
|
|
|
+ <img :src="upFaceUrl" style="max-width:560px;border: 1px dashed #E0E0E0;cursor: pointer;margin:0 auto;">
|
|
</div>
|
|
</div>
|
|
- </el-dialog>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </el-upload>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="faceButton(1)">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="faceButton(2)">确 定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <!--修改手机号-->
|
|
|
|
+ <el-dialog class="revise-phone-box" @close="offPhone" title="修改手机号" :visible.sync="dialogPhoneType"
|
|
|
|
+ v-if="dialogPhoneType" width="400px" append-to-body>
|
|
|
|
+ <el-form ref="phoneForm" :model="phoneForm" :rules="rules" label-width="0px">
|
|
|
|
+ <el-form-item label="" prop="phone">
|
|
|
|
+ <div class="phone-box">
|
|
|
|
+ <el-input
|
|
|
|
+ maxlength="11"
|
|
|
|
+ v-model.trim="phoneForm.phone"
|
|
|
|
+ :placeholder="phoneState == 1?'请输入旧手机号':'请输入新手机号'"
|
|
|
|
+ clearable>
|
|
|
|
+ <template slot="prepend">+86</template>
|
|
|
|
+ </el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-form ref="codeForm" :model="phoneForm" :rules="rules" label-width="0px">
|
|
|
|
+ <el-form-item label="" prop="code">
|
|
|
|
+ <div class="code-box">
|
|
|
|
+ <el-input
|
|
|
|
+ maxlength="6"
|
|
|
|
+ v-model.trim="phoneForm.code"
|
|
|
|
+ placeholder="请输入验证码"
|
|
|
|
+ clearable>
|
|
|
|
+ </el-input>
|
|
|
|
+ <p class="code-button" @click="getCode">{{codeTimeText}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button style="width:100px;" @click="showPhone(2)">取 消</el-button>
|
|
|
|
+ <el-button style="width:100px;" type="primary" @click="revisePhone">{{phoneState==1?'下一步':(phoneState==2?'确定':'')}}</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { Navbar } from '@/layout/components'
|
|
import { Navbar } from '@/layout/components'
|
|
import userAvatar from "./userAvatar";
|
|
import userAvatar from "./userAvatar";
|
|
- import { getUserProfile,updateUserPwd,changePhone,genSign,updateSignature,upDataProfile } from "@/api/system/user";
|
|
|
|
|
|
+ import { getUserProfile,updateUserPwd,changePhone,genSign,updateSignature,upDataProfile,
|
|
|
|
+ getSendCode, phoneCheckCode, putPhone} from "@/api/system/user";
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
export default {
|
|
export default {
|
|
name: "mine",
|
|
name: "mine",
|
|
@@ -362,16 +363,16 @@
|
|
{ required: true, validator: equalToPasswordTwo, trigger: "blur" },
|
|
{ required: true, validator: equalToPasswordTwo, trigger: "blur" },
|
|
{ required: true, message: "请输入8-16位密码,不能输入连续性和重复性的密码,密码中需要包含:大写字母、小写字符、数字和字符", validator: validatePass, trigger: "blur" }
|
|
{ required: true, message: "请输入8-16位密码,不能输入连续性和重复性的密码,密码中需要包含:大写字母、小写字符、数字和字符", validator: validatePass, trigger: "blur" }
|
|
],
|
|
],
|
|
- // phone: [
|
|
|
|
- // { required: true, message: "请输入11位手机号码", trigger: "blur" },
|
|
|
|
- // { validator: this.checkPhone, trigger: 'blur' },
|
|
|
|
- // { min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
|
|
|
- // { required: true, message: "请输入11位手机号码", validator: this.spaceJudgment, trigger: "blur" }
|
|
|
|
- // ],
|
|
|
|
phone: [
|
|
phone: [
|
|
{ required: true, message: "请输入手机号码", trigger: "blur" },
|
|
{ required: true, message: "请输入手机号码", trigger: "blur" },
|
|
|
|
+ { validator: this.checkPhone, trigger: 'blur' },
|
|
|
|
+ { min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
|
{ required: true, message: "请输入手机号码", validator: this.spaceJudgment, trigger: "blur" }
|
|
{ required: true, message: "请输入手机号码", validator: this.spaceJudgment, trigger: "blur" }
|
|
],
|
|
],
|
|
|
|
+ // phone: [
|
|
|
|
+ // { required: true, message: "请输入手机号码", trigger: "blur" },
|
|
|
|
+ // { required: true, message: "请输入手机号码", validator: this.spaceJudgment, trigger: "blur" }
|
|
|
|
+ // ],
|
|
code: [
|
|
code: [
|
|
{ required: true, message: "请输入验证码", trigger: "blur" },
|
|
{ required: true, message: "请输入验证码", trigger: "blur" },
|
|
{ required: true, message: "请输入验证码", validator: this.spaceJudgment, trigger: "blur" }
|
|
{ required: true, message: "请输入验证码", validator: this.spaceJudgment, trigger: "blur" }
|
|
@@ -425,6 +426,7 @@
|
|
codeTime:"",
|
|
codeTime:"",
|
|
codeTimeText:"获取验证码",
|
|
codeTimeText:"获取验证码",
|
|
phoneState:1,
|
|
phoneState:1,
|
|
|
|
+ newPhoneData:{},
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -438,13 +440,40 @@
|
|
this.$refs["codeForm"].validate((valid) => {
|
|
this.$refs["codeForm"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if(this.phoneState == 1){
|
|
if(this.phoneState == 1){
|
|
- clearInterval(this.codeTime);
|
|
|
|
- this.$set(this,'phoneForm',{phone:"",code:""});
|
|
|
|
- this.$set(this,'codeTime',"");
|
|
|
|
- this.$set(this,'codeTimeText',"获取验证码");
|
|
|
|
- this.$set(this,'phoneState',2);
|
|
|
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.phoneForm))
|
|
|
|
+ phoneCheckCode(obj).then(response => {
|
|
|
|
+ if(response.data){
|
|
|
|
+ this.$set(this,'newPhoneData',JSON.parse(JSON.stringify(obj)));
|
|
|
|
+ clearInterval(this.codeTime);
|
|
|
|
+ this.$set(this,'phoneForm',{phone:"",code:""});
|
|
|
|
+ this.$set(this,'codeTime',"");
|
|
|
|
+ this.$set(this,'codeTimeText',"获取验证码");
|
|
|
|
+ this.$set(this,'phoneState',2);
|
|
|
|
+ }else{
|
|
|
|
+ this.msgError('验证码错误')
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}else{
|
|
}else{
|
|
-
|
|
|
|
|
|
+ let newObj = {
|
|
|
|
+ code:this.phoneForm.code,
|
|
|
|
+ newPhone:this.phoneForm.phone,
|
|
|
|
+ oldPhone:this.newPhoneData.phone,
|
|
|
|
+ }
|
|
|
|
+ putPhone(newObj).then(response => {
|
|
|
|
+ console.log('response',response);
|
|
|
|
+ if(response.code==200){
|
|
|
|
+ this.dialogPhoneType = false;
|
|
|
|
+ clearInterval(this.codeTime);
|
|
|
|
+ this.$set(this,'phoneForm',{phone:"",code:""});
|
|
|
|
+ this.$set(this,'codeTime',"");
|
|
|
|
+ this.$set(this,'codeTimeText',"获取验证码");
|
|
|
|
+ this.$set(this,'phoneState',1);
|
|
|
|
+ this.msgSuccess(response.msg)
|
|
|
|
+ this.getUser();
|
|
|
|
+ }else{
|
|
|
|
+ this.msgError(response.msg)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -452,6 +481,19 @@
|
|
});
|
|
});
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ //手机号验证
|
|
|
|
+ checkPhone(rule, value, callback) {
|
|
|
|
+ if (!value) {
|
|
|
|
+ return callback(new Error('不能为空'))
|
|
|
|
+ } else {
|
|
|
|
+ const reg = /^1[3|4|5|7|8|9][0-9]\d{8}$/
|
|
|
|
+ if (reg.test(value)) {
|
|
|
|
+ callback()
|
|
|
|
+ } else {
|
|
|
|
+ return callback(new Error('请输入正确的手机号码'))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//开启修改手机号
|
|
//开启修改手机号
|
|
showPhone(type){
|
|
showPhone(type){
|
|
if (type == 1){
|
|
if (type == 1){
|
|
@@ -473,8 +515,14 @@
|
|
this.$refs["phoneForm"].validate((valid) => {
|
|
this.$refs["phoneForm"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if(!this.codeTime){
|
|
if(!this.codeTime){
|
|
- this.$set(this,'codeTimeText',30);
|
|
|
|
- this.phoneTime();
|
|
|
|
|
|
+ let obj = {
|
|
|
|
+ phone:this.phoneForm.phone
|
|
|
|
+ }
|
|
|
|
+ getSendCode(obj).then(response => {
|
|
|
|
+ console.log(response.data)
|
|
|
|
+ this.$set(this,'codeTimeText',30);
|
|
|
|
+ this.phoneTime();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -499,6 +547,7 @@
|
|
},
|
|
},
|
|
//修改用户信息
|
|
//修改用户信息
|
|
upDataProfile(){
|
|
upDataProfile(){
|
|
|
|
+ let self = this;
|
|
this.$refs["userform"].validate(valid => {
|
|
this.$refs["userform"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if(!this.userform.email&&!this.userform.dateBirth){
|
|
if(!this.userform.email&&!this.userform.dateBirth){
|
|
@@ -510,19 +559,7 @@
|
|
this.msgError('邮箱/出生年月,请至少修改一项再进行保存操作')
|
|
this.msgError('邮箱/出生年月,请至少修改一项再进行保存操作')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- // let obj = JSON.parse(JSON.stringify(this.userform));
|
|
|
|
let obj = {};
|
|
let obj = {};
|
|
- // if(this.userform.phonenumber){
|
|
|
|
- // let regex = /^1[23456789]\d{9}$/;
|
|
|
|
- // if(!regex.test(this.userform.phonenumber)){
|
|
|
|
- // this.msgError('请输入正确的手机号码')
|
|
|
|
- // return
|
|
|
|
- // }else{
|
|
|
|
- // obj.phonenumber = this.userform.phonenumber;
|
|
|
|
- // }
|
|
|
|
- // }else {
|
|
|
|
- // obj.phonenumber = '';
|
|
|
|
- // }
|
|
|
|
if(this.userform.email){
|
|
if(this.userform.email){
|
|
let regex = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
|
let regex = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
|
if(!regex.test(this.userform.email)){
|
|
if(!regex.test(this.userform.email)){
|
|
@@ -540,10 +577,17 @@
|
|
obj.dateBirth = '';
|
|
obj.dateBirth = '';
|
|
}
|
|
}
|
|
obj.userId = this.user.userId;
|
|
obj.userId = this.user.userId;
|
|
- upDataProfile(obj).then(response => {
|
|
|
|
- this.msgSuccess('操作成功');
|
|
|
|
- this.getUser();
|
|
|
|
- });
|
|
|
|
|
|
+ this.$confirm('确定要修改吗', "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function() {
|
|
|
|
+ upDataProfile(obj).then(response => {
|
|
|
|
+ self.msgSuccess('操作成功');
|
|
|
|
+ self.getUser();
|
|
|
|
+ });
|
|
|
|
+ }).then(() => {
|
|
|
|
+ }).catch(() => {});
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|