This commit is contained in:
parent
d4431a98ca
commit
e51f9bde6f
|
|
@ -316,11 +316,11 @@
|
|||
>更多</el-button
|
||||
>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
<!-- <el-dropdown-item
|
||||
command="handleUpFace"
|
||||
icon="el-icon-key"
|
||||
>人脸上传
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-item> -->
|
||||
<el-dropdown-item
|
||||
command="handleResetPwd"
|
||||
icon="el-icon-key"
|
||||
|
|
@ -562,6 +562,31 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人脸图片">
|
||||
<el-upload
|
||||
:http-request="
|
||||
(obj) => imgUpLoad(obj, 'fileUrl')
|
||||
"
|
||||
action="#"
|
||||
:limit="1"
|
||||
:file-list="fileList"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:class="{ disabled: uploadDisabled }"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
>
|
||||
<i
|
||||
class="el-icon-plus avatar-uploader-icon"
|
||||
></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
|
|
@ -1002,6 +1027,8 @@ export default {
|
|||
loginType: null,
|
||||
}
|
||||
this.resetForm('form')
|
||||
this.checkUrlList = []
|
||||
this.checkUrlNameList = []
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
|
|
@ -1075,6 +1102,9 @@ export default {
|
|||
this.roleOptions = response.roles
|
||||
this.$set(this.form, 'postIds', response.postIds)
|
||||
this.$set(this.form, 'roleIds', response.roleIds)
|
||||
// console.log(store.getters.face)
|
||||
this.fileList=[{url:response.data.photoUrl}]
|
||||
this.checkUrlList=[response.data.photoUrl]
|
||||
this.open = true
|
||||
this.title = '修改用户'
|
||||
this.form.password = ''
|
||||
|
|
@ -1170,6 +1200,12 @@ export default {
|
|||
submitForm: function () {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
this.form.loginType = this.loginTypeArr.toString()
|
||||
if(this.checkUrlList.length==0){
|
||||
this.form.photoUrl = null
|
||||
// this.$message.warning('请先上传人脸图片')
|
||||
}else{
|
||||
this.form.photoUrl = this.checkUrlList[0]
|
||||
}
|
||||
if (valid) {
|
||||
if (this.form.userId != undefined) {
|
||||
updateUser(this.form).then((response) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue