|
@@ -3,58 +3,60 @@
|
|
|
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form" label-width="190px">
|
|
|
<h3 class="title">注册信息</h3>
|
|
|
<el-collapse v-model="activeName">
|
|
|
- <el-collapse-item title="账户信息" name="1">
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="账户名称" prop="userName">
|
|
|
- <el-input v-model="registerForm.userName" type="text" auto-complete="off" placeholder="账号">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="密码" prop="password">
|
|
|
- <el-input
|
|
|
- v-model="registerForm.password"
|
|
|
- type="password"
|
|
|
- auto-complete="new-password"
|
|
|
- placeholder="密码">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="确认密码" prop="confirmPassword">
|
|
|
- <el-input
|
|
|
- v-model="registerForm.confirmPassword"
|
|
|
- type="password"
|
|
|
- auto-complete="new-password"
|
|
|
- placeholder="确认密码">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-collapse-item>
|
|
|
- <el-collapse-item title="账户联系人信息" name="2">
|
|
|
- <el-row :gutter="40">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="姓名" prop="nickName">
|
|
|
- <el-input v-model="registerForm.nickName" type="text" auto-complete="off" placeholder="姓名">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="手机号码" prop="phonenumber">
|
|
|
- <el-input v-model="registerForm.phonenumber" type="text" auto-complete="off" placeholder="手机号码">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="邮箱地址" prop="email">
|
|
|
- <el-input v-model="registerForm.email" type="text" auto-complete="off" placeholder="邮箱地址">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-collapse-item>
|
|
|
+ <template v-if="tokenVisile">
|
|
|
+ <el-collapse-item title="账户信息" name="1">
|
|
|
+ <el-row :gutter="40">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="账户名称" prop="userName">
|
|
|
+ <el-input v-model="registerForm.userName" type="text" auto-complete="off" placeholder="账号">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="密码" prop="password">
|
|
|
+ <el-input
|
|
|
+ v-model="registerForm.password"
|
|
|
+ type="password"
|
|
|
+ auto-complete="new-password"
|
|
|
+ placeholder="密码">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="确认密码" prop="confirmPassword">
|
|
|
+ <el-input
|
|
|
+ v-model="registerForm.confirmPassword"
|
|
|
+ type="password"
|
|
|
+ auto-complete="new-password"
|
|
|
+ placeholder="确认密码">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-collapse-item>
|
|
|
+ <el-collapse-item title="账户联系人信息" name="2">
|
|
|
+ <el-row :gutter="40">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="姓名" prop="nickName">
|
|
|
+ <el-input v-model="registerForm.nickName" type="text" auto-complete="off" placeholder="姓名">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="手机号码" prop="phonenumber">
|
|
|
+ <el-input v-model="registerForm.phonenumber" type="text" auto-complete="off" placeholder="手机号码">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="邮箱地址" prop="email">
|
|
|
+ <el-input v-model="registerForm.email" type="text" auto-complete="off" placeholder="邮箱地址">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-collapse-item>
|
|
|
+ </template>
|
|
|
<el-collapse-item title="企业信息" name="3">
|
|
|
<el-row :gutter="40">
|
|
|
<el-col :span="12">
|
|
@@ -333,7 +335,7 @@
|
|
|
|
|
|
<script>
|
|
|
|
|
|
-import { getCodeImg, registerEntApi } from "@/api/login";
|
|
|
+import { getCodeImg, registerEntApi,getEntUserById } from "@/api/login";
|
|
|
import {getProvinceDataApi,getRegionChildrenApi} from "@/api/common/common"
|
|
|
import { regTypeOptions,mainProductsOptions,yesOrNoOptions } from "@/utils/dataFormat"
|
|
|
import FileUpload from '@/components/FileUpload'
|
|
@@ -354,6 +356,7 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ tokenVisile: false,
|
|
|
limit: 1, //长传图片数量
|
|
|
fileSize: 1,
|
|
|
params: {
|
|
@@ -362,6 +365,7 @@ export default {
|
|
|
},
|
|
|
activeName: '1',
|
|
|
provinceName: '',
|
|
|
+ token: '',
|
|
|
cityName: '',
|
|
|
districtName: '',
|
|
|
codeUrl: "",
|
|
@@ -379,7 +383,7 @@ export default {
|
|
|
provinceId: '',
|
|
|
cityId: '',
|
|
|
districtId: '',
|
|
|
- mainProductArray: [],
|
|
|
+ mainProductArray: ['电子信息'],
|
|
|
mainProducts: '',
|
|
|
userName: "",
|
|
|
password: "",
|
|
@@ -508,9 +512,47 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getCode();
|
|
|
- this.getProvinceData()
|
|
|
+ this.getProvinceData()
|
|
|
+ this.token = this.$route.params.token || ''
|
|
|
+ if(this.token) {
|
|
|
+ this.getData()
|
|
|
+ this.tokenVisile = false
|
|
|
+ this.activeName = '3'
|
|
|
+ }else {
|
|
|
+ this.tokenVisile = true
|
|
|
+ this.activeName = '1'
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
+ getData() {
|
|
|
+ this.loading = true
|
|
|
+ getEntUserById(this.token).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ this.registerForm = res.data || {}
|
|
|
+ let mainProductArray = this.registerForm.mainProducts.split(',') || ['电子信息'];
|
|
|
+ this.$set(this.registerForm, 'mainProductArray', mainProductArray);
|
|
|
+ this.registerForm.serviceDate = []
|
|
|
+ if(this.registerForm.startDate) {
|
|
|
+ this.registerForm.serviceDate[0] = this.registerForm.startDate
|
|
|
+ this.registerForm.serviceDate[1] = this.registerForm.endDate
|
|
|
+ }
|
|
|
+ this.registerForm.provinceId = res.data.provinceId
|
|
|
+ if(this.registerForm.provinceId) {
|
|
|
+ getRegionChildrenApi(this.registerForm.provinceId).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.cityDataList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(this.registerForm.cityId) {
|
|
|
+ getRegionChildrenApi(this.registerForm.cityId).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.districtDataList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
handleSuccess(file) {
|
|
|
this.registerForm.licensePath = file.url;
|
|
|
this.registerForm.fileName = file.name;
|