|
@@ -5,40 +5,40 @@
|
|
<!-- <div class="login-logo">
|
|
<!-- <div class="login-logo">
|
|
<img src="../assets/image/login_logo.png" style="width:80px;height:80px;"/>
|
|
<img src="../assets/image/login_logo.png" style="width:80px;height:80px;"/>
|
|
</div> -->
|
|
</div> -->
|
|
- <h3 class="title">注册</h3>
|
|
|
|
|
|
+ <h3 class="title">{{ $t('zhuCe') }}</h3>
|
|
<el-form-item class="login-input" prop="companyName">
|
|
<el-form-item class="login-input" prop="companyName">
|
|
- <el-input type="text" v-model="ruleForm.companyName" autocomplete="off" placeholder="公司名" clearable prefix-icon="el-icon-s-home"></el-input>
|
|
|
|
|
|
+ <el-input type="text" v-model="ruleForm.companyName" autocomplete="off" :placeholder="$t('gongSiMing')" clearable prefix-icon="el-icon-s-home"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item class="login-input" prop="name">
|
|
<el-form-item class="login-input" prop="name">
|
|
- <el-input type="text" v-model="ruleForm.name" autocomplete="off" placeholder="姓名" clearable prefix-icon="el-icon-user-solid"></el-input>
|
|
|
|
|
|
+ <el-input type="text" v-model="ruleForm.name" autocomplete="off" :placeholder="$t('lable.name')" clearable prefix-icon="el-icon-user-solid"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item class="login-input" prop="phone">
|
|
<el-form-item class="login-input" prop="phone">
|
|
- <el-input type="text" v-model="ruleForm.phone" autocomplete="off" placeholder="手机号" clearable prefix-icon="el-icon-mobile-phone"></el-input>
|
|
|
|
|
|
+ <el-input type="text" v-model="ruleForm.phone" autocomplete="off" :placeholder="$t('lable.phone')" clearable prefix-icon="el-icon-mobile-phone"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item class="login-input" prop="vcode">
|
|
<el-form-item class="login-input" prop="vcode">
|
|
- <el-input type="text" v-model="ruleForm.vcode" autocomplete="off" placeholder="验证码" @keyup.enter.native="sendVcode()" clearable prefix-icon="iconfont firerock-iconyanzhengma">
|
|
|
|
- <el-button slot="append" @click="sendVcode" :disabled="ruleForm.phone=='' || showTimer">发送验证码<span v-if="showTimer">({{countNum}})</span></el-button>
|
|
|
|
|
|
+ <el-input type="text" v-model="ruleForm.vcode" autocomplete="off" :placeholder="$t('yanZhengMa')" @keyup.enter.native="sendVcode()" clearable prefix-icon="iconfont firerock-iconyanzhengma">
|
|
|
|
+ <el-button slot="append" @click="sendVcode" :disabled="ruleForm.phone=='' || showTimer">{{ $t('faSongYanZhengMa') }}<span v-if="showTimer">({{countNum}})</span></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item class="login-input" prop="password">
|
|
<el-form-item class="login-input" prop="password">
|
|
- <el-input type="password" v-model="ruleForm.password" autocomplete="off" placeholder="设置密码,长度不低于6位" clearable prefix-icon="iconfont firerock-iconmima">
|
|
|
|
|
|
+ <el-input type="password" v-model="ruleForm.password" autocomplete="off" :placeholder="$t('sheZhiMiMaChangDuBuDiYu_6Wei')" clearable prefix-icon="iconfont firerock-iconmima">
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item class="login-input" prop="repwd">
|
|
<el-form-item class="login-input" prop="repwd">
|
|
- <el-input type="password" v-model="ruleForm.repwd" autocomplete="off" placeholder="重复密码" clearable prefix-icon="iconfont firerock-iconmima">
|
|
|
|
|
|
+ <el-input type="password" v-model="ruleForm.repwd" autocomplete="off" :placeholder="$t('zhongFuMiMa')" clearable prefix-icon="iconfont firerock-iconmima">
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item class="login-input" prop="type" style="text-align:center;">
|
|
<el-form-item class="login-input" prop="type" style="text-align:center;">
|
|
<el-divider ></el-divider>
|
|
<el-divider ></el-divider>
|
|
<div style="margin-top:10px;">
|
|
<div style="margin-top:10px;">
|
|
- <span>选择版本: </span><el-select v-model="ruleForm.type" style="width:250px;">
|
|
|
|
|
|
+ <span>{{ $t('xuanZeBanBen') }} </span><el-select v-model="ruleForm.type" style="width:250px;">
|
|
<el-option v-for="item in typeList" :value="item.id" :label="item.name" :key="item.id"></el-option>
|
|
<el-option v-for="item in typeList" :value="item.id" :label="item.name" :key="item.id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<div class="login-button" style="width:100%;margin-top:20px;">
|
|
<div class="login-button" style="width:100%;margin-top:20px;">
|
|
- <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">注册</el-button>
|
|
|
|
|
|
+ <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{ $t('zhuCe') }}</el-button>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
@@ -49,8 +49,8 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- typeList:[{id:1,name:'工时统计基础版'},
|
|
|
|
- {id:2,name:'项目管理专业版'},{id:3,name:'企业办公旗舰版'},{id:4,name:'工程管理专业版'}],
|
|
|
|
|
|
+ typeList:[{id:1,name:this.$t('gongShiTongJiJiChuBan')},
|
|
|
|
+ {id:2,name:this.$t('xiangMuGuanLiZhuanYeBan')},{id:3,name:this.$t('qiYeBanGongQiJianBan')},{id:4,name:this.$t('gongChengGuanLiZhuanYeBan')}],
|
|
logining: false,
|
|
logining: false,
|
|
showTimer: false,
|
|
showTimer: false,
|
|
countNum: 60,
|
|
countNum: 60,
|
|
@@ -62,12 +62,12 @@
|
|
type:2,
|
|
type:2,
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
- companyName: [{ required: true, message: '请输入公司名', trigger: 'blur' },],
|
|
|
|
- name: [{ required: true, message: '请输入姓名', trigger: 'blur' },],
|
|
|
|
- phone: [{ required: true, message: '请输入手机号', trigger: 'blur' },],
|
|
|
|
- vcode: [{ required: true, message: '请输入验证码', trigger: 'blur' },],
|
|
|
|
- password: [{ required: true, message: '请设置密码,长度不低于6位', trigger: 'blur' },],
|
|
|
|
- repwd: [{ required: true, message: '请重复输入密码', trigger: 'blur' },]
|
|
|
|
|
|
+ companyName: [{ required: true, message: this.$t('qingShuRuGongSiMing'), trigger: 'blur' },],
|
|
|
|
+ name: [{ required: true, message: this.$t('defaultText.PleaseEnterYourName'), trigger: 'blur' },],
|
|
|
|
+ phone: [{ required: true, message: this.$t('defaultText.PleaseEnterYourPhone'), trigger: 'blur' },],
|
|
|
|
+ vcode: [{ required: true, message: this.$t('qingShuRuYanZhengMa'), trigger: 'blur' },],
|
|
|
|
+ password: [{ required: true, message: this.$t('qingSheZhiMiMaChangDuBuDiYu_6Wei'), trigger: 'blur' },],
|
|
|
|
+ repwd: [{ required: true, message: this.$t('qingZhongFuShuRuMiMa'), trigger: 'blur' },]
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -87,7 +87,7 @@
|
|
sendVcode() {
|
|
sendVcode() {
|
|
if (this.ruleForm.phone.length != 11) {
|
|
if (this.ruleForm.phone.length != 11) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '手机号码格式不正确',
|
|
|
|
|
|
+ message: this.$t('shouJiHaoMaGeShiBuZhengQue'),
|
|
type: 'error'
|
|
type: 'error'
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -95,7 +95,7 @@
|
|
this.logining = false;
|
|
this.logining = false;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '发送成功',
|
|
|
|
|
|
+ message: this.$t('faSongChengGong'),
|
|
type: 'success'
|
|
type: 'success'
|
|
});
|
|
});
|
|
this.showTimer = true;
|
|
this.showTimer = true;
|
|
@@ -125,7 +125,7 @@
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.ruleForm.password.length < 6) {
|
|
if (this.ruleForm.password.length < 6) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '密码长度不能少于6位',
|
|
|
|
|
|
+ message: this.$t('miMaChangDuBuNengShaoYu_6Wei'),
|
|
type: 'error'
|
|
type: 'error'
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
@@ -133,7 +133,7 @@
|
|
//检查两次密码是否一致
|
|
//检查两次密码是否一致
|
|
if (this.ruleForm.password != this.ruleForm.repwd) {
|
|
if (this.ruleForm.password != this.ruleForm.repwd) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '两次输入的密码不一致',
|
|
|
|
|
|
+ message: this.$t('liangCiShuRuDeMiMaBuYiZhi'),
|
|
type: 'error'
|
|
type: 'error'
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
@@ -151,7 +151,7 @@
|
|
this.logining = false;
|
|
this.logining = false;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '注册成功',
|
|
|
|
|
|
+ message: this.$t('zhuCeChengGong'),
|
|
type: 'success'
|
|
type: 'success'
|
|
});
|
|
});
|
|
this.$router.push({ path: '/login' });
|
|
this.$router.push({ path: '/login' });
|