企业认证

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

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

@ -124,3 +124,21 @@ export function updatetesterApply(data) {
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%">
@ -194,160 +321,196 @@
</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 {
return{ companyInfoForm: {
companyDesc: '',
applyId: '',
},
companyInfoFormRules: {
companyDesc: [{ required: true, message: '公司简介', trigger: 'blur' }],
},
userGetFlag: false, userGetFlag: false,
userType: "普通用户", userType: '普通用户',
// userinform:{nickName:'',phonenumber:'',email:'',sex:''}, // userinform:{nickName:'',phonenumber:'',email:'',sex:''},
passform:{oldPassword:'',newPassword:'',confirmPassword:''}, passform: { oldPassword: '', newPassword: '', confirmPassword: '' },
// //
rules: { rules: {
nickName: [ { required: true, message: "用户昵称不能为空", trigger: "blur" } ], nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
email: [{ required: true, message: "邮箱地址不能为空", trigger: "blur" }, email: [
{type: "email", message: "请输入正确的邮箱地址",trigger: ["blur", "change"]}], { required: true, message: '邮箱地址不能为空', trigger: 'blur' },
phonenumber: [{ required: true, message: "手机号码不能为空", trigger: "blur" }, { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] },
{pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message: "请输入正确的手机号码",trigger: "blur"}] ],
phonenumber: [
{ required: true, message: '手机号码不能为空', trigger: 'blur' },
{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' },
],
}, },
// //
passrules: { passrules: {
oldPassword: [ oldPassword: [{ required: true, message: '旧密码不能为空', trigger: 'blur' }],
{ required: true, message: "旧密码不能为空", trigger: "blur" }
],
newPassword: [ newPassword: [
{ required: true, message: "新密码不能为空", trigger: "blur" }, { required: true, message: '新密码不能为空', trigger: 'blur' },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" } { min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' },
], ],
confirmPassword: [ confirmPassword: [
{ required: true, message: "确认密码不能为空", trigger: "blur" }, { required: true, message: '确认密码不能为空', trigger: 'blur' },
{ required: true, validator: equalToPassword, trigger: "blur" } { required: true, validator: equalToPassword, trigger: 'blur' },
] ],
}, },
} }
}, },
components: { userAvatar,userUpgrade}, components: { userAvatar, userUpgrade },
computed:{ computed: {
...mapGetters(['userinform','token']) ...mapGetters(['userinform', 'token']),
}, },
mounted(){ mounted() {
if(this.token){ if (this.token) {
this.getUser(); this.getUser()
} }
// userinform:{nickName:'',phonenumber:'',email:'',sex:''}, // userinform:{nickName:'',phonenumber:'',email:'',sex:''},
// let {nickName,phonenumber,email,sex}=this.userinform // let {nickName,phonenumber,email,sex}=this.userinform
// this.userinform={nickName,phonenumber,email,sex} // this.userinform={nickName,phonenumber,email,sex}
}, },
methods:{ methods: {
setTip(val) {
this.companyInfoForm.companyDesc = val.dec
this.companyInfoForm.applyId = val.applyId
},
getUser() { getUser() {
this.userGetFlag = false; this.userGetFlag = false
this.userType = "普通用户"; this.userType = '普通用户'
getUserProfile().then((response) => { getUserProfile().then((response) => {
this.user = response.data; this.user = response.data
this.roleGroup = response.roleGroup; this.roleGroup = response.roleGroup
this.postGroup = response.postGroup; this.postGroup = response.postGroup
this.userGetFlag = true; this.userGetFlag = true
if (this.user.companyStatus == 2) { if (this.user.companyStatus == 2) {
if (this.user.testerStatus == 2) { if (this.user.testerStatus == 2) {
this.userType = "认证测试公司"; this.userType = '认证测试公司'
} else { } else {
this.userType = "认证公司"; this.userType = '认证公司'
} }
} else { } else {
if (this.user.testerStatus == 2) { if (this.user.testerStatus == 2) {
this.userType = "个人测试者"; this.userType = '个人测试者'
} else { } else {
this.userType = "普通用户"; this.userType = '普通用户'
} }
} }
}); })
}, },
// //
submit() { submit() {
this.$refs.form.validate(valid => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
updateUserProfile(this.userinform).then(response => { const data = {
this.$message.success("修改成功"); userId: this.userinform.userId,
store.commit('SET_USERINFORM', this.userinform) 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(){ close() {
this.$router.push({ path: "/console" }); this.$router.push({ path: '/console' })
}, },
// //
passsubmit() { passsubmit() {
this.$refs.passform.validate(valid => { this.$refs.passform.validate((valid) => {
if (valid) { if (valid) {
// updateUserPwd(this.passform.oldPassword, this.passform.newPassword).then(response => { // updateUserPwd(this.passform.oldPassword, this.passform.newPassword).then(response => {
updateUserPwd(encrypt(this.passform.oldPassword), encrypt(this.passform.newPassword)).then(response => { updateUserPwd(encrypt(this.passform.oldPassword), encrypt(this.passform.newPassword)).then(
this.$message.success("修改成功"); (response) => {
}); this.$message.success('修改成功')
},
)
} }
}); })
}, },
passclose(){ passclose() {
this.$router.push({ path: "/console" }); this.$router.push({ path: '/console' })
// this.passform={} // 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;
}); });
}); });

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