update:个人认证前端完成
This commit is contained in:
4
src/services/regex.js
Normal file
4
src/services/regex.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export default {
|
||||||
|
IdCardNo: /\d{17}[\dX]/,
|
||||||
|
Phone: /1\d{10}/
|
||||||
|
};
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<Button type="primary" @click="onSubmit" v-if="!disableEdit"
|
<Button type="primary" @click="onSubmit" v-if="!disableEdit"
|
||||||
>前往申领</Button
|
>前往申领</Button
|
||||||
>
|
>
|
||||||
<Button type="primary" @click="onSubmit" v-if="disableEdit"
|
<Button type="primary" @click="goCertUrl" v-if="disableEdit"
|
||||||
>继续申领流程</Button
|
>继续申领流程</Button
|
||||||
>
|
>
|
||||||
<Button style="margin-left: 10px" @click="showDrawer"
|
<Button style="margin-left: 10px" @click="showDrawer"
|
||||||
@@ -58,6 +58,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Form, Input, Button, Select, message, Drawer } from "ant-design-vue";
|
import { Form, Input, Button, Select, message, Drawer } from "ant-design-vue";
|
||||||
import { get, post } from "@/services/http";
|
import { get, post } from "@/services/http";
|
||||||
|
import regex from "@/services/regex";
|
||||||
|
console.log(regex);
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -71,7 +73,12 @@ export default {
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
idCardNo: [
|
idCardNo: [
|
||||||
{ required: true, message: "请输入18位身份证号码", trigger: "blur" }
|
{ required: true, message: "请输入18位身份证号码", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern: regex.IdCardNo,
|
||||||
|
message: "输入正确的18位身份证号码",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
idCardName: [
|
idCardName: [
|
||||||
{ required: true, message: "请输入真实姓名", trigger: "blur" }
|
{ required: true, message: "请输入真实姓名", trigger: "blur" }
|
||||||
@@ -80,13 +87,19 @@ export default {
|
|||||||
{ required: true, message: "请选择你的单位名称", trigger: "change" }
|
{ required: true, message: "请选择你的单位名称", trigger: "change" }
|
||||||
],
|
],
|
||||||
phone: [
|
phone: [
|
||||||
{ required: true, message: "请输入你的手机号码", trigger: "blur" }
|
{ required: true, message: "请输入你的手机号码", trigger: "blur" },
|
||||||
|
{
|
||||||
|
pattern: regex.Phone,
|
||||||
|
message: "请输入正确的11位手机号码",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
userApplyList: [],
|
userApplyList: [],
|
||||||
organizeList: [],
|
organizeList: [],
|
||||||
drawVisible: false,
|
drawVisible: false,
|
||||||
disableEdit: true
|
disableEdit: true,
|
||||||
|
currentApplyId: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -104,7 +117,21 @@ export default {
|
|||||||
if (resp.errorCode != 0) {
|
if (resp.errorCode != 0) {
|
||||||
message.error(resp.errorMsg);
|
message.error(resp.errorMsg);
|
||||||
} else {
|
} else {
|
||||||
message.success("录入完成即将进入申请页面");
|
this.currentApplyId = resp.data;
|
||||||
|
message.success(
|
||||||
|
"录入完成即将进入申请页面",
|
||||||
|
(onclose = () => this.goCertUrl())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async goCertUrl() {
|
||||||
|
const res = await get("/api2/CA/GetRedirectUrl", {
|
||||||
|
applyId: this.currentApplyId
|
||||||
|
});
|
||||||
|
if (res.errorCode == 0) {
|
||||||
|
window.open(res.data);
|
||||||
|
} else {
|
||||||
|
message.error(res.errorMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -134,6 +161,7 @@ export default {
|
|||||||
this.form.idCardNo = current.idCardNo;
|
this.form.idCardNo = current.idCardNo;
|
||||||
this.form.unitName = current.unitName;
|
this.form.unitName = current.unitName;
|
||||||
this.form.phone = current.phone;
|
this.form.phone = current.phone;
|
||||||
|
this.currentApplyId = current.id;
|
||||||
} else {
|
} else {
|
||||||
this.disableEdit = false;
|
this.disableEdit = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user