企业认证

main
lijingyu007 11 months ago
parent b562369c71
commit 071637fcb1
  1. 11
      src/api/system/user.js
  2. 18
      src/api/tester/CompanyApply.js
  3. 2
      src/page/personalpage/commonheader/personalheader.vue
  4. 583
      src/page/personalpage/home/personalcenter.vue
  5. 27
      src/page/personalpage/home/userAvatar.vue
  6. 945
      src/page/personalpage/home/userUpgrade.vue

@ -234,4 +234,13 @@ export default function createEnum(definition) {
} }
} }
// 全局方法和属性 - 结束 // 全局方法和属性 - 结束
// 企业简介
export function saveCompanyInfo(data) {
return request({
url: '/companyInfo/update',
method: 'post',
data: data
})
}

@ -123,4 +123,22 @@ export function updatetesterApply(data) {
method: 'post', method: 'post',
data: data data: data
}) })
}
// 公司认证
export function companyApply(data) {
return request({
url: '/companyApply/apply',
method: 'post',
data: data
})
}
// 认证不通过修改
export function companyApplyUpdate(data) {
return request({
url: '/companyApply/edit',
method: 'post',
data: data
})
} }

@ -46,7 +46,7 @@
</div> </div>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click" placement='bottom'> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click" placement='bottom'>
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img style="width:54px;height:54px;margin:13px 0 5px 0px;cursor:pointer;border-radius:50%" :src="avatar" alt=""> <img style="width:54px;height:54px;margin:13px 0 5px 0px;cursor:pointer;border-radius:50%" :src="userinform.avatar" alt="">
<!-- <i style="margin-bottom:10px" class="el-icon-caret-bottom"/> --> <!-- <i style="margin-bottom:10px" class="el-icon-caret-bottom"/> -->
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">

@ -1,59 +1,108 @@
<template> <template>
<div style="margin-left:30px;padding-bottom:50px"> <div style="margin-left: 30px; padding-bottom: 50px">
<div style="display:flex;align-items:center"> <div style="display: flex; align-items: center">
<div class="dvied"></div> <div class="dvied"></div>
<div style="font-weight: bold;color: #333333;font-size:18px;margin-left:10px">个人中心</div> <div style="font-weight: bold; color: #333333; font-size: 18px; margin-left: 10px">个人中心</div>
</div> </div>
<div style="display:flex;width:80%"> <div style="display: flex; width: 80%">
<div class="userclass" style="border: 1px solid #DCDFE6;margin-top:30px"> <div class="userclass" style="border: 1px solid #dcdfe6; margin-top: 30px">
<div style="background:#f5f7fa;height:45px;color:#909399;line-height:45px;border-bottom:1px solid #DCDFE6;margin-bottom:30px"> <div
style="
background: #f5f7fa;
height: 45px;
color: #909399;
line-height: 45px;
border-bottom: 1px solid #dcdfe6;
margin-bottom: 30px;
"
>
<p class="userclassp">个人资料</p> <p class="userclassp">个人资料</p>
</div> </div>
<!-- <el-divider></el-divider> --> <!-- <el-divider></el-divider> -->
<div style="padding:0 20px;font-size:14px;margin-bottom:30px" class="baseinfo"> <div style="padding: 0 20px; font-size: 14px; margin-bottom: 30px" class="baseinfo">
<div style="text-align:center"> <div style="text-align: center">
<userAvatar :user="userinform" /> <userAvatar :user="userinform" />
<!-- <img style="width:122px;object-fit:contain" src="/assets/personal/poto.png" alt=""> --> <!-- <img style="width:122px;object-fit:contain" src="/assets/personal/poto.png" alt=""> -->
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<div style="display:flex;justify-content:space-between;margin:0 10px;height:35px;align-items:center"> <div
<div style="display:flex;align-items:center"> style="
<img src="/assets/personal/yonghu.png" alt=""> display: flex;
<p style="color: #1A1A1A;margin-left:10px;">用户ID</p> justify-content: space-between;
margin: 0 10px;
height: 35px;
align-items: center;
"
>
<div style="display: flex; align-items: center">
<img src="/assets/personal/yonghu.png" alt="" />
<p style="color: #1a1a1a; margin-left: 10px">用户ID</p>
</div> </div>
<p style="color:#666666;">{{ userinform.userName }}</p> <p style="color: #666666">{{ userinform.userName }}</p>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<div style="display:flex;justify-content:space-between;margin:0 10px;height:35px;align-items:center"> <div
<div style="display:flex;align-items:center"> style="
<img src="/assets/personal/shoujitianchong.png" alt=""> display: flex;
<p style="color: #1A1A1A;margin-left:10px;">手机号码</p> justify-content: space-between;
margin: 0 10px;
height: 35px;
align-items: center;
"
>
<div style="display: flex; align-items: center">
<img src="/assets/personal/shoujitianchong.png" alt="" />
<p style="color: #1a1a1a; margin-left: 10px">手机号码</p>
</div> </div>
<p style="color:#666666;">{{ userinform.phonenumber }}</p> <p style="color: #666666">{{ userinform.phonenumber }}</p>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<div style="display:flex;justify-content:space-between;margin:0 10px;height:35px;align-items:center"> <div
<div style="display:flex;align-items:center"> style="
<img src="/assets/personal/youxiang.png" alt=""> display: flex;
<p style="color: #1A1A1A;margin-left:10px;">用户邮箱</p> justify-content: space-between;
margin: 0 10px;
height: 35px;
align-items: center;
"
>
<div style="display: flex; align-items: center">
<img src="/assets/personal/youxiang.png" alt="" />
<p style="color: #1a1a1a; margin-left: 10px">用户邮箱</p>
</div> </div>
<p style="color:#666666;">{{ userinform.email }}</p> <p style="color: #666666">{{ userinform.email }}</p>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<div style="display:flex;justify-content:space-between;margin:0 10px;height:35px;align-items:center"> <div
<div style="display:flex;align-items:center"> style="
<img src="/assets/personal/fuwuleixing.png" alt=""> display: flex;
<p style="color: #1A1A1A;margin-left:10px;">用户类型</p> justify-content: space-between;
margin: 0 10px;
height: 35px;
align-items: center;
"
>
<div style="display: flex; align-items: center">
<img src="/assets/personal/fuwuleixing.png" alt="" />
<p style="color: #1a1a1a; margin-left: 10px">用户类型</p>
</div> </div>
<p style="color:#666666;"> {{ userType }}</p> <p style="color: #666666">{{ userType }}</p>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<div style="display:flex;justify-content:space-between;margin:0 10px;height:35px;align-items:center"> <div
<div style="display:flex;align-items:center"> style="
<img src="/assets/personal/rili.png" alt=""> display: flex;
<p style="color: #1A1A1A;margin-left:10px;">创建日期</p> justify-content: space-between;
margin: 0 10px;
height: 35px;
align-items: center;
"
>
<div style="display: flex; align-items: center">
<img src="/assets/personal/rili.png" alt="" />
<p style="color: #1a1a1a; margin-left: 10px">创建日期</p>
</div> </div>
<p style="color:#666666;">{{ userinform.createTime }}</p> <p style="color: #666666">{{ userinform.createTime }}</p>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
</div> </div>
@ -103,59 +152,137 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> --> </div> -->
<div class="basedata" style="border: 1px solid #DCDFE6;margin-top:30px;width:688px;height:430px;"> <div class="basedata" style="border: 1px solid #dcdfe6; margin-top: 30px; width: 688px; height: 430px">
<div style="background:#f5f7fa;height:45px;color:#909399;line-height:45px;border-bottom:1px solid #DCDFE6;margin-bottom:30px"> <div
style="
background: #f5f7fa;
height: 45px;
color: #909399;
line-height: 45px;
border-bottom: 1px solid #dcdfe6;
margin-bottom: 30px;
"
>
<p class="userclassp">基本资料</p> <p class="userclassp">基本资料</p>
</div> </div>
<el-tabs type="card" style=""> <el-tabs type="card" style="">
<el-tab-pane label="用户信息"> <el-tab-pane label="用户信息">
<el-form ref="form" :model="userinform" :rules="rules" label-width="80px" style="padding:0 20px;"> <el-form
ref="form"
:model="userinform"
:rules="rules"
label-width="80px"
style="padding: 0 20px"
>
<el-form-item label="用户昵称" prop="nickName"> <el-form-item label="用户昵称" prop="nickName">
<el-input v-model="userinform.nickName" size='mini'/> <el-input v-model="userinform.nickName" size="mini" />
</el-form-item> </el-form-item>
<el-form-item label="手机号码" prop="phonenumber"> <el-form-item label="手机号码" prop="phonenumber">
<el-input v-model="userinform.phonenumber" maxlength="11" size='mini'/> <el-input v-model="userinform.phonenumber" maxlength="11" size="mini" />
</el-form-item> </el-form-item>
<el-form-item label="邮箱" prop="email"> <el-form-item label="邮箱" prop="email">
<el-input v-model="userinform.email" maxlength="50" size='mini'/> <el-input v-model="userinform.email" maxlength="50" size="mini" />
</el-form-item> </el-form-item>
<el-form-item label="性别"> <el-form-item label="性别" v-if="userinform.companyStatus != 2">
<el-radio-group v-model="userinform.sex"> <el-radio-group v-model="userinform.sex">
<el-radio label="0"></el-radio> <el-radio label="0"></el-radio>
<el-radio label="1"></el-radio> <el-radio label="1"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item class="inforbtn" style="text-align:right"> <el-form-item class="inforbtn" style="text-align: right">
<el-button size="mini" @click="submit">保存</el-button> <el-button size="mini" @click="submit">保存</el-button>
<el-button style="background: #EBEDF0;color: #808080;border:none" size="mini" @click="close">关闭</el-button> <el-button
style="background: #ebedf0; color: #808080; border: none"
size="mini"
@click="close"
>关闭</el-button
>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="企业简介" v-if="userinform.companyStatus == 2">
<el-form
ref="companyInfoForm"
:model="companyInfoForm"
:rules="companyInfoFormRules"
label-width="80px"
style="padding: 0 20px"
>
<el-form-item label="公司简介" prop="companyDesc">
<el-input :rows="8" type="textarea" v-model="companyInfoForm.companyDesc" size="mini" />
</el-form-item>
<el-form-item class="inforbtn" style="text-align: right">
<el-button size="mini" @click="saveCom">保存</el-button>
<el-button
style="background: #ebedf0; color: #808080; border: none"
size="mini"
@click="passclose"
>关闭</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="修改密码"> <el-tab-pane label="修改密码">
<el-form ref="passform" :model="passform" :rules="passrules" label-width="80px" style="padding:0 20px;"> <el-form
ref="passform"
:model="passform"
:rules="passrules"
label-width="80px"
style="padding: 0 20px"
>
<el-form-item label="旧密码" prop="oldPassword"> <el-form-item label="旧密码" prop="oldPassword">
<el-input v-model="passform.oldPassword" placeholder="请输入旧密码" type="password" size='mini'/> <el-input
v-model="passform.oldPassword"
placeholder="请输入旧密码"
type="password"
size="mini"
/>
</el-form-item> </el-form-item>
<el-form-item label="新密码" prop="newPassword"> <el-form-item label="新密码" prop="newPassword">
<el-input v-model="passform.newPassword" placeholder="请输入新密码" type="password" size='mini'/> <el-input
v-model="passform.newPassword"
placeholder="请输入新密码"
type="password"
size="mini"
/>
</el-form-item> </el-form-item>
<el-form-item label="确认密码" prop="confirmPassword"> <el-form-item label="确认密码" prop="confirmPassword">
<el-input v-model="passform.confirmPassword" placeholder="请确认密码" type="password" size='mini'/> <el-input
v-model="passform.confirmPassword"
placeholder="请确认密码"
type="password"
size="mini"
/>
</el-form-item> </el-form-item>
<el-form-item class="inforbtn" style="text-align:right" label-width="100px" > <el-form-item class="inforbtn" style="text-align: right" label-width="100px">
<el-button size="mini" @click="passsubmit">保存</el-button> <el-button size="mini" @click="passsubmit">保存</el-button>
<el-button style="background: #EBEDF0;color: #808080;border:none" size="mini" @click="passclose">关闭</el-button> <el-button
style="background: #ebedf0; color: #808080; border: none"
size="mini"
@click="passclose"
>关闭</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
<div style="width:80%;padding:1px;margin-top:0"> <div class="basedata" style="border: 1px solid #dcdfe6; margin-top: 30px; width: 95%">
<p style="font-weight: bold;font-size:18px;">升级认证</p> <div
<el-divider></el-divider> style="
<div style="margin:-15px 0 0 0px;padding-right:20px"> background: #f5f7fa;
<userUpgrade :user="userinform" v-if="userGetFlag" /> height: 45px;
color: #909399;
line-height: 45px;
border-bottom: 1px solid #dcdfe6;
"
>
<p class="userclassp">升级认证</p>
</div>
<div style="padding: 33px 48px">
<userUpgrade :user="userinform" v-if="userGetFlag" @setTip="setTip" />
<!-- <el-tag color='#F7F7F7'>更新测试公司的申请已提交平台审核后会站内消息通知您</el-tag> <!-- <el-tag color='#F7F7F7'>更新测试公司的申请已提交平台审核后会站内消息通知您</el-tag>
<el-tag color='#F2A51A' style="color:#FFFFFF;margin-left:17px">更新测试公司信息</el-tag> --> <el-tag color='#F2A51A' style="color:#FFFFFF;margin-left:17px">更新测试公司信息</el-tag> -->
<!-- <div style="border: 1px solid #DCDCDC;border-radius:5px;padding:0 20px;margin:20px 0;width:80%"> <!-- <div style="border: 1px solid #DCDCDC;border-radius:5px;padding:0 20px;margin:20px 0;width:80%">
@ -190,164 +317,200 @@
</div> </div>
</div> --> </div> -->
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {mapGetters} from "vuex"; import { mapGetters } from 'vuex'
import store from "@/store"; import store from '@/store'
import userAvatar from "./userAvatar"; import userAvatar from './userAvatar'
import userUpgrade from "./userUpgrade"; import userUpgrade from './userUpgrade'
import { updateUserProfile,updateUserPwd,getUserProfile } from "@/api/system/user"; import { updateUserProfile, updateUserPwd, getUserProfile, saveCompanyInfo } from '@/api/system/user'
import { encrypt, decrypt } from '@/util/encrypt' import { encrypt, decrypt } from '@/util/encrypt'
export default{ export default {
data(){ data() {
const equalToPassword = (rule, value, callback) => { const equalToPassword = (rule, value, callback) => {
if (this.passform.newPassword !== value) { if (this.passform.newPassword !== value) {
callback(new Error("两次输入的密码不一致")); callback(new Error('两次输入的密码不一致'))
} else { } else {
callback(); callback()
}
};
return{
userGetFlag: false,
userType: "普通用户",
// userinform:{nickName:'',phonenumber:'',email:'',sex:''},
passform:{oldPassword:'',newPassword:'',confirmPassword:''},
//
rules: {
nickName: [ { required: true, message: "用户昵称不能为空", trigger: "blur" } ],
email: [{ required: true, message: "邮箱地址不能为空", trigger: "blur" },
{type: "email", message: "请输入正确的邮箱地址",trigger: ["blur", "change"]}],
phonenumber: [{ required: true, message: "手机号码不能为空", trigger: "blur" },
{pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message: "请输入正确的手机号码",trigger: "blur"}]
},
//
passrules: {
oldPassword: [
{ required: true, message: "旧密码不能为空", trigger: "blur" }
],
newPassword: [
{ required: true, message: "新密码不能为空", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
],
confirmPassword: [
{ required: true, message: "确认密码不能为空", trigger: "blur" },
{ required: true, validator: equalToPassword, trigger: "blur" }
]
},
}
},
components: { userAvatar,userUpgrade},
computed:{
...mapGetters(['userinform','token'])
},
mounted(){
if(this.token){
this.getUser();
} }
// userinform:{nickName:'',phonenumber:'',email:'',sex:''}, }
// let {nickName,phonenumber,email,sex}=this.userinform return {
// this.userinform={nickName,phonenumber,email,sex} companyInfoForm: {
}, companyDesc: '',
methods:{ applyId: '',
getUser() {
this.userGetFlag = false;
this.userType = "普通用户";
getUserProfile().then((response) => {
this.user = response.data;
this.roleGroup = response.roleGroup;
this.postGroup = response.postGroup;
this.userGetFlag = true;
if (this.user.companyStatus == 2) {
if (this.user.testerStatus == 2) {
this.userType = "认证测试公司";
} else {
this.userType = "认证公司";
}
} else {
if (this.user.testerStatus == 2) {
this.userType = "个人测试者";
} else {
this.userType = "普通用户";
}
}
});
},
//
submit() {
this.$refs.form.validate(valid => {
if (valid) {
updateUserProfile(this.userinform).then(response => {
this.$message.success("修改成功");
store.commit('SET_USERINFORM', this.userinform)
});
}
});
}, },
close(){ companyInfoFormRules: {
this.$router.push({ path: "/console" }); companyDesc: [{ required: true, message: '公司简介', trigger: 'blur' }],
}, },
// userGetFlag: false,
passsubmit() { userType: '普通用户',
this.$refs.passform.validate(valid => { // userinform:{nickName:'',phonenumber:'',email:'',sex:''},
if (valid) { passform: { oldPassword: '', newPassword: '', confirmPassword: '' },
// updateUserPwd(this.passform.oldPassword, this.passform.newPassword).then(response => { //
updateUserPwd(encrypt(this.passform.oldPassword), encrypt(this.passform.newPassword)).then(response => { rules: {
this.$message.success("修改成功"); nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
}); email: [
} { required: true, message: '邮箱地址不能为空', trigger: 'blur' },
}); { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] },
],
phonenumber: [
{ required: true, message: '手机号码不能为空', trigger: 'blur' },
{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' },
],
}, },
passclose(){ //
this.$router.push({ path: "/console" }); passrules: {
// this.passform={} oldPassword: [{ required: true, message: '旧密码不能为空', trigger: 'blur' }],
newPassword: [
{ required: true, message: '新密码不能为空', trigger: 'blur' },
{ min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' },
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: 'blur' },
{ required: true, validator: equalToPassword, trigger: 'blur' },
],
}, },
}
},
components: { userAvatar, userUpgrade },
computed: {
...mapGetters(['userinform', 'token']),
},
mounted() {
if (this.token) {
this.getUser()
}
// userinform:{nickName:'',phonenumber:'',email:'',sex:''},
// let {nickName,phonenumber,email,sex}=this.userinform
// this.userinform={nickName,phonenumber,email,sex}
},
methods: {
setTip(val) {
this.companyInfoForm.companyDesc = val.dec
this.companyInfoForm.applyId = val.applyId
}, },
getUser() {
} this.userGetFlag = false
this.userType = '普通用户'
getUserProfile().then((response) => {
this.user = response.data
this.roleGroup = response.roleGroup
this.postGroup = response.postGroup
this.userGetFlag = true
if (this.user.companyStatus == 2) {
if (this.user.testerStatus == 2) {
this.userType = '认证测试公司'
} else {
this.userType = '认证公司'
}
} else {
if (this.user.testerStatus == 2) {
this.userType = '个人测试者'
} else {
this.userType = '普通用户'
}
}
})
},
//
submit() {
this.$refs.form.validate((valid) => {
if (valid) {
const data = {
userId: this.userinform.userId,
email: this.userinform.email,
nickName: this.userinform.nickName,
phonenumber: this.userinform.phonenumber,
}
const userInfo = JSON.parse(JSON.stringify(this.userinform))
userInfo.email = this.userinform.email
userInfo.nickName = this.userinform.nickName
userInfo.phonenumber = this.userinform.phonenumber
updateUserProfile(data).then((response) => {
this.$message.success('修改成功')
store.commit('SET_USERINFORM', userInfo)
})
}
})
},
close() {
this.$router.push({ path: '/console' })
},
//
passsubmit() {
this.$refs.passform.validate((valid) => {
if (valid) {
// updateUserPwd(this.passform.oldPassword, this.passform.newPassword).then(response => {
updateUserPwd(encrypt(this.passform.oldPassword), encrypt(this.passform.newPassword)).then(
(response) => {
this.$message.success('修改成功')
},
)
}
})
},
passclose() {
this.$router.push({ path: '/console' })
// this.passform={}
},
saveCom() {
this.$refs['companyInfoForm'].validate((valid) => {
if (valid) {
this.companyInfoForm.userId = this.$store.getters.userId
saveCompanyInfo(this.companyInfoForm).then((res) => {
if (res.code == 200) {
this.$message.success('修改成功')
}
})
}
})
},
},
}
</script> </script>
<style scoped> <style scoped>
.dvied{ .dvied {
width: 4px; width: 4px;
height: 18px; height: 18px;
background: #0066EB; background: #0054a7;
} }
.userclass{ .userclass {
width:380px; width: 380px;
/* height: 510px; */ /* height: 510px; */
background: #FFFFFF; background: #ffffff;
border-radius: 4px; border-radius: 4px;
margin:20px 30px 20px 0; margin: 20px 30px 20px 0;
/* border: 1px solid rgb(220, 220, 220); */ /* border: 1px solid rgb(220, 220, 220); */
border-radius: 5px; border-radius: 5px;
} }
.userclassp{ .userclassp {
font-weight: bold; font-weight: bold;
color: #5c5a5a; color: #5c5a5a;
margin:0px 0 0 20px; margin: 0px 0 0 20px;
} }
.el-divider--horizontal{ .el-divider--horizontal {
margin:15px 0 30px 0; margin: 15px 0 30px 0;
} }
.baseinfo>>>.el-divider--horizontal{ .baseinfo >>> .el-divider--horizontal {
margin:10px 0; margin: 10px 0;
} }
.inforbtn{ .inforbtn {
width:300px width: 300px;
} }
.inforbtn>>>.el-button{ .inforbtn >>> .el-button {
width: 90px; width: 90px;
height: 34px; height: 34px;
background: #0066EB; background: #0054a7;
border-radius: 4px; border-radius: 4px;
color:#FFFFFF color: #ffffff;
} }
.el-tag{ .el-tag {
border:none; border: none;
cursor: pointer; cursor: pointer;
} }
.basedata>>>.el-tabs--card>.el-tabs__header .el-tabs__nav{ .basedata >>> .el-tabs--card > .el-tabs__header .el-tabs__nav {
border-radius:0 border-radius: 0;
} }
</style> </style>

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div class="user-info-head" @click="editCropper()"> <div class="user-info-head" @click="editCropper()">
<img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div> <img v-bind:src="userinform.avatar" title="点击上传头像" class="img-circle img-lg" /></div>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog()"> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog()">
<el-row> <el-row>
<el-col :xs="24" :md="12" :style="{height: '350px'}"> <el-col :xs="24" :md="12" :style="{height: '350px'}">
@ -136,15 +136,24 @@ export default {
this.options.img = response.imgUrl; this.options.img = response.imgUrl;
store.commit('SET_AVATAR', this.options.img); store.commit('SET_AVATAR', this.options.img);
let str = '/'+ this.options.img.replace(/^.*\/prod-api\//, '') // let str = '/'+ this.options.img.replace(/^.*\/prod-api\//, '')
this.userinform.avatar = str // this.userinform.avatar = this.options.img
updateUserProfile(this.userinform).then(response => {
const data = {
userId: this.userinform.userId,
avatar: this.options.img
}
updateUserProfile(data).then(response => {
//
const userInfo = JSON.parse(JSON.stringify(this.userinform))
userInfo.avatar = this.bas + this.options.img
console.log('=============',userInfo);
store.commit('SET_USERINFORM', userInfo)
//
this.options.img = this.bas + this.options.img;
this.$message.success("修改成功"); this.$message.success("修改成功");
store.commit('SET_USERINFORM', this.userinform)
this.$store.dispatch('GetInfo')
this.options.img = this.basurl +'/'+ this.options.img.replace(/^.*\/prod-api\//, '');
}); });
// this.$message.success("");
this.visible = false; this.visible = false;
}); });
}); });
@ -203,4 +212,4 @@ export default {
line-height: 110px; line-height: 110px;
border-radius: 50%; border-radius: 50%;
} }
</style> </style>

@ -1,94 +1,228 @@
<template> <template>
<div class="examku"> <div class="examku">
<main id="main"> <main id="main">
<!--========================== <section id="profile">
Profile Section <div class="container mt30" style="margin-top: 0px">
============================--> <div v-if="showAlert">
<section id="profile"> <el-tag color="#F7F7F7">实名认证的申请已提交平台审核后会站内消息通知您</el-tag>
<div class="container mt30" style="margin-top: 0px"> <el-tag color="#F2A51A" style="color: #ffffff; margin-left: 17px; border: none"
<!-- <el-row :gutter="20">--> >实名认证信息</el-tag
<!-- <el-alert type="info" effect="dark" v-if="showAlert" :closable="false"> >
{{appleTypeStr}}的申请已提交平台审核后会站内消息通知您 </div>
</el-alert> --> <div id="con_a_3">
<div v-if="showAlert"> <!-- 个人认证 -->
<el-tag color='#F7F7F7' >实名认证的申请已提交平台审核后会站内消息通知您</el-tag> <div class="cona3it" v-if="certifform.applyId || (!certifform.applyId && !companyForm.applyId)">
<el-tag color='#F2A51A' style="color:#FFFFFF;margin-left:17px;border:none;">实名认证信息</el-tag> <h4 style="font-weight: bold; font-size: 16px; color: #19191a; margin-top: 20px">
</div> 个人用户实名认证
<br/> </h4>
<div id="con_a_3" class="profile-info"> <div class="testuser" style="margin-bottom: 20px">
<div style="border: 1px solid #DCDCDC;border-radius:5px;padding:0 20px;margin:20px 0;width:80%"> <div style="font-weight: 500; font-size: 14px; color: #666666; margin: 20px 0 30px 0">
<h4 style="font-weight: bold;color:#0066EB;margin-bottom:0px">实名认证</h4> <p>实名认证通过后可在众包服务下报名承接测试项目</p>
<div class="testuser" style="margin-bottom:20px"> </div>
<div style="color:#808080;font-size:14px;line-height:15px;"> <el-button v-if="testerStatus == 0" size="small" @click="x2ctChild">提交申请</el-button>
<p >实名认证通过后可在众包服务下报名承接测试项目</p> <el-button
<!-- <p >普通用户可提交个人身份信息和资历升级为个人测试者</p> --> style="background: #f6a414"
<!-- <p>个人测试者可在测试任务众包市场中应征和承接测试项目完成任务可获取赏金</p> --> v-if="testerStatus == 1"
size="small"
disabled
@click="x2ctChild"
>实名认证审核中</el-button
>
<el-button
style="background: #1cc27e"
v-if="testerStatus == 2"
size="small"
disabled
@click="x2ctChild"
>查看认证信息</el-button
>
<el-button
style="background: #f6a414"
v-if="testerStatus == 3"
size="small"
disabled
@click="x2ctChild"
>修改实名认证</el-button
>
</div>
<div
v-if="testerStatus == 3"
style="color: #808080; font-size: 14px; line-height: 15px; margin: 10px 0"
>
<span></span>
<span style="color: #fa3534"
>{{ testerdata.auditOpinion ? testerdata.auditOpinion : '无' }}</span
>
<span>审核未能通过请完善后再提交</span>
</div>
</div>
<!-- 企业认证 -->
<div
class="cona3it"
v-if="companyForm.applyId || (!certifform.applyId && !companyForm.applyId)"
>
<h4 style="font-weight: bold; font-size: 16px; color: #19191a; margin-top: 20px">
企业用户资质认证
</h4>
<div class="testuser" style="margin-bottom: 20px">
<div style="color: #808080; font-size: 14px; line-height: 15px; margin: 20px 0 30px 0">
<p>企业资质审批通过后可以在众包服务下发布测试项目</p>
</div>
<el-button v-if="!companyForm.applyId" size="small" @click="openCompanyAdd"
>提交申请</el-button
>
<el-button
style="background: #f6a414"
v-if="companyForm.companyStatus == 0"
size="small"
disabled
>实名认证审核中</el-button
>
<el-button
style="background: #1cc27e"
v-if="companyForm.companyStatus == 1"
size="small"
@click="lookCompanyApplyInfo"
>查看认证信息</el-button
>
<el-button
style="background: #f6a414"
v-if="companyForm.companyStatus == 2"
size="small"
@click="updateCompanyAdd"
>修改实名认证</el-button
>
</div>
<div
v-if="companyForm.companyStatus == 2"
style="color: #808080; font-size: 14px; line-height: 15px; margin: 10px 0"
>
<span></span>
<span style="color: #fa3534">{{
testerdata.auditOpinion ? testerdata.auditOpinion : ''
}}</span>
<span>审核未能通过请完善后再提交</span>
</div>
</div>
</div> </div>
<!-- -->
<el-button size="small" :disabled="testerStatus==1" @click="x2ctChild" >
<span v-if="testerStatus==0">升级为实名认证</span>
<span v-if="testerStatus==1">实名认证审核中</span>
<span v-if="testerStatus==2">查看认证信息</span>
<span v-if="testerStatus==3">修改实名认证</span>
</el-button>
</div> </div>
<div v-if="testerStatus==3" style="color:#808080;font-size:14px;line-height:15px;margin:10px 0"> </section>
<span ></span> </main>
<span style="color:#fa3534">{{testerdata.auditOpinion?testerdata.auditOpinion:'无'}}</span> <el-dialog
<span>审核未能通过请完善后再提交</span> v-if="certification"
:title="title"
:visible.sync="certification"
width="600px"
append-to-body
:close-on-click-modal="false"
>
<el-form ref="certifform" :model="certifform" :rules="certifRules" label-width="150px">
<el-form-item label="姓名" prop="name">
<el-input v-model="certifform.name" :disabled="testerStatus == 2" placeholder="请输入真实姓名" />
</el-form-item>
<el-form-item label="身份证号码" prop="idNumber">
<el-input
v-model="certifform.idNumber"
:disabled="testerStatus == 2"
placeholder="请输入身份证号码"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<div class="submitbtn">
<el-button type="primary" @click="certtSubmitForm" :disabled="testerStatus == 2"> </el-button>
</div> </div>
</div> <el-button @click="certCancel"> </el-button>
</div> </div>
</div> </el-dialog>
</section> <el-dialog
</main> v-if="certificationCom"
<el-dialog v-if="certification" :title="title" :visible.sync="certification" width="800px" append-to-body :close-on-click-modal="false" > title="企业用户资质认证"
<el-form ref="certifform" :model="certifform" :rules="certifRules" label-width="150px"> :visible.sync="certificationCom"
<el-form-item label="姓名" prop="name"> width="600px"
<el-input v-model="certifform.name" :disabled="testerStatus==2" placeholder="请输入真实姓名"/> append-to-body
</el-form-item> :close-on-click-modal="false"
<el-form-item label="身份证号码" prop="idNumber"> >
<el-input v-model="certifform.idNumber" :disabled="testerStatus==2" placeholder="请输入身份证号码"/> <el-form ref="companyForm" :model="companyForm" :rules="companyRules" class="companyForm">
</el-form-item> <el-form-item prop="name">
<!-- <el-form-item label="所在城市" prop="city"> <el-input placeholder="请输入企业名称(须与营业执照一致)" v-model="companyForm.name">
<el-input v-model="certifform.city" placeholder="请输入所在城市"/> <img
</el-form-item> slot="prefix"
<el-form-item label="个人技能" prop="testSkills"> src="/assets/personal/comicon1.png"
<el-input v-model="certifform.testSkills" type="textarea" placeholder="请输入内容" /> style="width: 17px; height: 17px"
<el-popover placement="top-start" title="示例:" width="400" trigger="hover" > alt=""
<span>性能测试LoadRunner, Jmeter自动化测试Selenium</span> />
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> </el-input>
</el-popover> </el-form-item>
</el-form-item> <el-form-item prop="contactName">
<el-form-item label="技能证书" prop="idCardFrontUrl"> <el-input placeholder="请输入您的姓名" v-model="companyForm.contactName">
<multi-upload v-model="certifform.certificateUrl" :serverAddr="materialServerAddr" @setImgPath='setImgPath' fileName="技能证书" :limit="1" /> <img
</el-form-item> slot="prefix"
<el-form-item label="工作经历" prop="workExperience"> src="/assets/personal/comicon2.png"
<el-input v-model="certifform.workExperience" type="textarea" placeholder="请输入内容" /> style="width: 17px; height: 17px"
<el-popover placement="top-start" title="示例:" width="500" trigger="hover"> alt=""
<span>2017.5-2021.7 西安未央软件有限公司 软件测试工程师<br> />
2013.9-2017.4. 西安大唐软件有限公司 软件测试工程师<br> </el-input>
2009.9-2013.7 西安电子科技大学 软件工程专业 本科 </el-form-item>
</span> <el-form-item prop="businessLicenseUrl">
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> <div class="imgitemcon">
</el-popover> <multi-upload
</el-form-item> --> v-model="companyForm.businessLicenseUrl"
</el-form> @setImgPath="setImgPath"
<div slot="footer" class="dialog-footer"> fileName="技能证书"
<div class="submitbtn"> :limit="1"
<el-button type="primary" @click="certtSubmitForm" :disabled="testerStatus==2"> </el-button> />
</div> <div class="rightimgcon">
<el-button @click="certCancel"> </el-button> <div class="imgtip">
</div> 1.请上传营业执照清晰彩色原件扫描件或数码照
</el-dialog> <br />
</div> 2.支持jpgjpegpng格式照片大小不超过10M
</div>
<div class="lookimgdefault" @click="companyDetailOpenDefault = true">点击查看图例</div>
</div>
</div>
</el-form-item>
</el-form>
<el-button
style="
width: 564px;
height: 44px;
background: linear-gradient(90deg, #5ea6fd, #1a81f9);
border-radius: 22px;
color: #ffffff;
"
@click="submitCompany"
>提交认证</el-button
>
</el-dialog>
<!-- 查看企业认证详情 -->
<el-dialog
:title="companyForm.companyName + '认证详情'"
:visible.sync="companyDetailOpen"
width="800px"
append-to-body
:close-on-click-modal="false"
>
<div>认证人{{ companyForm.contactName }}</div>
<img :src="companyForm.businessLicenseUrl" style="width: 100%" alt="" />
</el-dialog>
<el-dialog
title="营业执照图例"
:visible.sync="companyDetailOpenDefault"
width="600px"
append-to-body
:close-on-click-modal="false"
>
<img src="/assets/home/12.png" style="width: 100%" alt="" />
</el-dialog>
</div>
</template> </template>
<script> <script>
import {mapGetters} from "vuex"; import { mapGetters } from 'vuex'
import {apple_type} from "@/api/system/user"; import { apple_type } from '@/api/system/user'
import { import {
listTesterApply, listTesterApply,
getTesterApplyByUid, getTesterApplyByUid,
delTesterApply, delTesterApply,
@ -97,302 +231,411 @@
exportTesterApply, exportTesterApply,
certificationStatus, certificationStatus,
addTesterApply, addTesterApply,
} from "@/api/tester/TesterApply"; } from '@/api/tester/TesterApply'
import { import {
listCompanyApply, listCompanyApply,
getCompanyApplyByUid, getCompanyApplyByUid,
delCompanyApply, delCompanyApply,
addCompanyApply, addCompanyApply,
updateCompanyApply, updateCompanyApply,
exportCompanyApply,gettesterId,addtesterApply,updatetesterApply exportCompanyApply,
} from "@/api/tester/CompanyApply"; gettesterId,
import {VueCropper} from "vue-cropper"; addtesterApply,
import MultiUpload from "@/page/common/MultiUpload"; updatetesterApply,
import NonimageUpload from "@/page/common/NonimageUpload"; companyApply,
import {getInfo} from '@/api/system/login' companyApplyUpdate,
} from '@/api/tester/CompanyApply'
export default { import { VueCropper } from 'vue-cropper'
import MultiUpload from '@/page/common/MultiUpload'
import NonimageUpload from '@/page/common/NonimageUpload'
import { getInfo } from '@/api/system/login'
export default {
components: { components: {
MultiUpload, MultiUpload,
NonimageUpload, NonimageUpload,
VueCropper, VueCropper,
}, },
props: { props: {
user: { user: {
type: Object, type: Object,
}, },
}, },
computed: { computed: {
...mapGetters(['userinform']), ...mapGetters(['userinform']),
},
},
data() { data() {
return { return {
bArray: [ companyDetailOpenDefault: false,
[true, true], companyDetailOpen: false,
["升级为认证公司用户", "升级为测试认证"], companyForm: {},
// ["", "", ""], companyRules: {
], name: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
certification:false, contactName: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
showAlert: false, businessLicenseUrl: [{ required: true, message: '营业执照不能为空', trigger: 'blur' }],
appleTypeStr: "",
testerApplyB: {},
companyApplyB: {},
// p2ct
userInfo: {},
testerApply: {},
companyApply: {},
certifform:{applyId:'',userId:'',name:'',idNumber:'',city:'',certificateUrl:[],testSkills:'',workExperience:''},
form: {},
//
title: "",
// regCompany
regCompanyOpen: false,
// p2pt
p2ptOpen: false,
// p2ct
p2ctOpen: false,
// c2ct
c2ctOpen: false,
rules: {},
//
certifRules: {
name: [
{required: true, message: "真实姓名不能为空", trigger: "blur"},
{max: 20, message: '最多输入20个中文', trigger: 'blur' },
{
pattern:
/^(?:[\u4e00-\u9fa5·]{2,16})$/,
message: "请输入中文",
trigger: "blur",
}, },
], certificationCom: false,
// city: [ bArray: [
// {required: true, message: "", trigger: "blur"}, [true, true],
// ], ['升级为认证公司用户', '升级为测试认证'],
idNumber: [ ],
{required: true, message: "身份证号码能为空", trigger: "blur"}, certification: false,
{ showAlert: false,
pattern: appleTypeStr: '',
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, testerApplyB: {},
message: "请输入正确的身份证号码", companyApplyB: {},
trigger: "blur", // p2ct
userInfo: {},
testerApply: {},
companyApply: {},
certifform: {
applyId: '',
userId: '',
name: '',
idNumber: '',
city: '',
certificateUrl: [],
testSkills: '',
workExperience: '',
}, },
{max:18, message: '身份证长度为18', trigger: 'change' }, form: {},
{min:18, message: '身份证长度为18', trigger: 'change' }, //
], title: '',
// regCompany
// testSkills: [ regCompanyOpen: false,
// {required: true, message: "", trigger: "blur"}, // p2pt
// ], p2ptOpen: false,
// p2ct
// certificateUrl: [ p2ctOpen: false,
// { // c2ct
// required: true, c2ctOpen: false,
// message: "", rules: {},
// trigger: "change", //
// }, certifRules: {
// ], name: [
{ required: true, message: '真实姓名不能为空', trigger: 'blur' },
}, { max: 20, message: '最多输入20个中文', trigger: 'blur' },
materialServerAddr: "", {
allFileGetFlag: false, pattern: /^(?:[\u4e00-\u9fa5·]{2,16})$/,
testerdata:null, message: '请输入中文',
testerStatus:0, trigger: 'blur',
}; },
],
idNumber: [
{ required: true, message: '身份证号码能为空', trigger: 'blur' },
{
pattern:
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
message: '请输入正确的身份证号码',
trigger: 'blur',
},
{ max: 18, message: '身份证长度为18', trigger: 'change' },
{ min: 18, message: '身份证长度为18', trigger: 'change' },
],
},
materialServerAddr: '',
allFileGetFlag: false,
testerdata: null,
testerStatus: 0,
baseUrl: process.env.VUE_APP_BASE_TARGET,
}
}, },
created() { created() {
this.certifform.userId=this.userinform.userId; this.certifform.userId = this.userinform.userId
if(this.userinform){ if (this.userinform) {
this.getcertinfor() this.getcertinfor()
getInfo().then(res => { }
const user = res.user
this.$store.commit("SET_USERINFORM",user);
})
}
}, },
methods: { methods: {
getcertinfor(){ getcertinfor() {
gettesterId(this.userinform.userId).then(res=>{ gettesterId(this.userinform.userId).then((res) => {
this.testerdata=res.data; // companyApplyId
if(this.testerdata){ if (res.data.companyApplyId) {
let {applyId,name,idNumber,city,certificateUrl,testSkills,workExperience,userId}=this.testerdata; this.companyForm = {
// let setidNumber= name: res.data.companyName,
let imglist=[]; companyDesc: res.data.companyDesc,
if(certificateUrl){ companyStatus: res.data.companyStatus,
imglist.push(certificateUrl) applyId: res.data.companyApplyId,
} businessLicenseUrl: [this.baseUrl + res.data.companyBusinessLicense],
this.certifform={applyId,name,idNumber,city,certificateUrl:imglist,testSkills,workExperience,userId} companyName: res.data.companyName,
if(this.testerdata){ contactName: res.data.companyContactName,
if(this.testerdata.status==0){ }
this.testerStatus=1 this.$emit('setTip', {dec: res.data.companyDesc,applyId: res.data.companyApplyId})
this.istest=true if (res.data.companyStatus == 1 && userinform.companyStatus !=2) {
}else if(this.testerdata.status==1){ getInfo().then((res) => {
this.testerStatus=2 const user = res.user
// this.certifform.idNumber=this.certifform.idNumber.slice(0,2)+'************'+idNumber.slice(14) this.$store.commit('SET_USERINFORM', user)
this.istest=true })
}else if(this.testerdata.status==2){ }
this.testerStatus=3
}else{
this.testerStatus=0
} }
}
}
})
},
x2ctChild(){
// this.getcertinfor()
// this.certification=true
// return;
gettesterId(this.userinform.userId).then(res=>{ this.testerdata = res.data
this.testerdata=res.data; if (this.testerdata) {
if(this.testerdata){ let { applyId, name, idNumber, city, certificateUrl, testSkills, workExperience, userId } =
let {applyId,name,idNumber,city,certificateUrl,testSkills,workExperience,userId}=this.testerdata; this.testerdata
// let setidNumber=idNumber.slice(0,2)+'************'+idNumber.slice(14) // let setidNumber=
let imglist=[]; let imglist = []
if(certificateUrl){ if (certificateUrl) {
imglist.push(certificateUrl) imglist.push(certificateUrl)
} }
this.certifform={applyId,name,idNumber,city,certificateUrl:imglist,testSkills,workExperience,userId} this.certifform = {
this.certification=true applyId,
if(this.testerdata){ name,
if(this.testerdata.status==0){ idNumber,
this.testerStatus=1 city,
this.istest=true certificateUrl: imglist,
}else if(this.testerdata.status==1){ testSkills,
this.testerStatus=2 workExperience,
this.istest=true userId,
}else if(this.testerdata.status==2){ }
this.testerStatus=3 if (this.testerdata) {
}else{ if (this.testerdata.status == 0) {
this.testerStatus=0 this.testerStatus = 1
this.istest = true
} else if (this.testerdata.status == 1) {
this.testerStatus = 2
this.istest = true
} else if (this.testerdata.status == 2) {
this.testerStatus = 3
} else {
this.testerStatus = 0
}
}
} }
} })
}else{ },
this.certification=true x2ctChild() {
} gettesterId(this.userinform.userId).then((res) => {
}) this.testerdata = res.data
if (this.testerdata) {
let { applyId, name, idNumber, city, certificateUrl, testSkills, workExperience, userId } =
}, this.testerdata
// // let setidNumber=idNumber.slice(0,2)+'************'+idNumber.slice(14)
certCancel() { let imglist = []
this.certification = false; if (certificateUrl) {
imglist.push(certificateUrl)
this.reset(); }
}, this.certifform = {
setImgPath(value) { applyId,
if(value){ name,
this.certifform.certificateUrl.push(value); idNumber,
// this.addeditfaform.equipModel.push(value); city,
} certificateUrl: imglist,
}, testSkills,
certtSubmitForm(){ workExperience,
this.$refs["certifform"].validate((valid) => { userId,
if (valid) { }
// if(this.certifform.certificateUrl.length==0){ this.certification = true
// this.$message.warning(""); if (this.testerdata) {
// return; if (this.testerdata.status == 0) {
// } this.testerStatus = 1
// return; this.istest = true
let certificateUrl=''; } else if (this.testerdata.status == 1) {
if(this.certifform.certificateUrl.length==1){ this.testerStatus = 2
certificateUrl=this.certifform.certificateUrl[0] this.istest = true
}else if(this.certifform.certificateUrl.length==0){ } else if (this.testerdata.status == 2) {
certificateUrl='' this.testerStatus = 3
}else{ } else {
certificateUrl='https://www.keyitest.cn/prod-api'+this.certifform.certificateUrl.pop() this.testerStatus = 0
}
}
} else {
this.certification = true
}
})
},
//
certCancel() {
this.certification = false
this.reset()
},
setImgPath(value) {
if (value) {
this.companyForm.businessLicenseUrl = value
// this.addeditfaform.equipModel.push(value);
} }
// if(this.certifform.certificateUrl.pop().indexOf('https')==0){ },
// certificateUrl=this.certifform.certificateUrl.pop() //
// }else{ certtSubmitForm() {
// certificateUrl='https://www.keyitest.cn/prod-api'+this.certifform.certificateUrl.pop() this.$refs['certifform'].validate((valid) => {
// } if (valid) {
let data={ let data = {
applyId:this.certifform.applyId, applyId: this.certifform.applyId,
userId:this.certifform.userId, userId: this.certifform.userId,
name:this.certifform.name, name: this.certifform.name,
idNumber:this.certifform.idNumber, idNumber: this.certifform.idNumber,
// city:this.certifform.city, }
// certificateUrl, // return;
// testSkills:this.certifform.testSkills, console.log(data)
// workExperience:this.certifform.workExperience, if (this.certifform.applyId) {
} updatetesterApply(data)
// return; .then((res) => {
if (this.certifform.applyId != '') { console.log('修改', res)
updatetesterApply(data).then(res=>{
console.log('修改',res);
if(res.code==200){ if (res.code == 200) {
this.$message.success("实名认证成功"); this.$message.success('实名认证成功')
this.getcertinfor() this.getcertinfor()
this.certification = false; this.certification = false
} else { } else {
}
})
.catch((error) => {
this.getcertinfor()
})
} else {
addtesterApply(data)
.then((res) => {
console.log('添加', res)
if (res.code == 200) {
this.$message.success('实名认证成功')
this.getcertinfor()
this.certification = false
} else {
}
})
.catch((error) => {
this.getcertinfor()
})
}
} }
})
}).catch(error => { },
this.getcertinfor() //
reset() {
}) this.form = {}
} else { this.resetForm('form')
addtesterApply(data).then(res=>{ },
console.log('添加',res); //
if(res.code==200){ openCompanyAdd() {
this.$message.success("实名认证成功"); this.certificationCom = true
this.getcertinfor() },
this.certification = false; //
submitCompany() {
} else { this.$refs['companyForm'].validate((valid) => {
if (valid) {
if (this.companyForm.applyId) {
//
let newUrl
if (typeof this.companyForm.businessLicenseUrl == 'string') {
newUrl = [this.companyForm.businessLicenseUrl]
} else {
//
let url = this.companyForm.businessLicenseUrl[0]
let index = url.indexOf('/profile')
newUrl = [url.substring(index)]
}
const data = {
applyId: this.companyForm.applyId,
name: this.companyForm.name,
contactName: this.companyForm.contactName,
businessLicenseUrl: newUrl,
}
companyApplyUpdate(data).then((res) => {
if (res.code == 200) {
this.closeCompany()
this.getcertinfor()
this.$message.success('提交成功,请等待审核结果')
}
})
} else {
//
const data = {
name: this.companyForm.name,
contactName: this.companyForm.contactName,
businessLicenseUrl: [this.companyForm.businessLicenseUrl],
}
companyApply(data).then((res) => {
if (res.code == 200) {
this.closeCompany()
this.getcertinfor()
this.$message.success('提交成功,请等待审核结果')
}
})
}
} }
})
}).catch(error => { },
this.getcertinfor() //
closeCompany() {
}) this.certificationCom = false
} this.companyForm = {}
} },
}); //
}, lookCompanyApplyInfo() {
// this.companyDetailOpen = true
reset() { },
this.form = {}; //
this.resetForm("form"); updateCompanyAdd() {
}, this.certificationCom = true
},
}, },
}; }
</script> </script>
<style scoped > <style scoped >
.user-userUpgrade-span { .imgitemcon {
display: flex;
align-items: center;
}
.imgtip {
font-weight: 500;
font-size: 14px;
color: #666666;
line-height: 32px;
}
.rightimgcon {
margin-left: 20px;
}
.lookimgdefault {
cursor: pointer;
font-weight: 500;
font-size: 14px;
color: #0054a7;
cursor: pointer;
}
.companyForm >>> .el-input__prefix {
line-height: 45px;
}
.user-userUpgrade-span {
text-align: center; text-align: center;
} }
.testuser{ .testuser {
display:flex; /* display: flex;
align-items:center; align-items: center;
justify-content:space-between; justify-content: space-between; */
} }
.testuser>>>.el-button{ .testuser >>> .el-button {
background:#F2A51A; background: #0054a7;
color:#FFFFFF; color: #ffffff;
margin-left:50px;
border: none; border: none;
} }
.dialog-footer{ .dialog-footer {
display:flex; display: flex;
text-align:right; text-align: right;
margin-left:550px margin-left: 200px;
} }
.submitbtn>>>.el-button{ .submitbtn >>> .el-button {
background:#0066EB; background: #0054a7;
color:#FFFFFF; color: #ffffff;
margin-right:30px; margin-right: 30px;
border: none; border: none;
} }
.examku>>>.el-dialog__title{ .examku >>> .el-dialog__title {
font-weight:bold; font-weight: bold;
color: #0969bd color: #0969bd;
} }
</style> #con_a_3 {
display: flex;
align-items: center;
justify-content: space-between;
}
.cona3it {
width: 48%;
height: 200px;
background: #ffffff;
box-shadow: 0px 4px 9px 1px rgba(14, 16, 18, 0.05);
border-radius: 4px;
border: 1px solid #ebedf0;
padding: 0 40px;
box-sizing: border-box;
}
</style>
Loading…
Cancel
Save