|
@@ -78,7 +78,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
placeholder="请输入访客名称"
|
|
|
- v-model="form.visitorPersonList.peopleName"
|
|
|
+ v-model="form.visitorPersonList[0].peopleName"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -89,13 +89,13 @@
|
|
|
>
|
|
|
<el-input
|
|
|
placeholder="请输入访客手机号"
|
|
|
- v-model="form.visitorPersonList.peoplePhone"
|
|
|
+ v-model="form.visitorPersonList[0].peoplePhone"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="性别" :rules="rules.sex">
|
|
|
- <el-select v-model="form.visitorPersonList.sex" placeholder="请选择性别" style="width: 100%" >
|
|
|
+ <el-select v-model="form.visitorPersonList[0].sex" placeholder="请选择性别" style="width: 100%" >
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in sex"
|
|
@@ -110,7 +110,7 @@
|
|
|
<el-form-item label="身份证号码" :rules="rules.cardId">
|
|
|
<el-input
|
|
|
placeholder="请输入身份证号码"
|
|
|
- v-model="form.visitorPersonList.cardId"
|
|
|
+ v-model="form.visitorPersonList[0].cardId"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -118,7 +118,7 @@
|
|
|
<el-form-item label="来访单位" :rules="rules.callerCorpName">
|
|
|
<el-input
|
|
|
placeholder="请输入来访单位"
|
|
|
- v-model="form.visitorPersonList.callerCorpName"
|
|
|
+ v-model="form.visitorPersonList[0].callerCorpName"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -161,23 +161,25 @@ const departData = ref(); //组织列表
|
|
|
const phoneArray = ref([]); //人员电话号码合集
|
|
|
const data = reactive({
|
|
|
form: {
|
|
|
- targetPeoplePhone:"",//被访人手机号
|
|
|
- targetPeopleName:"",//被访人姓名 .
|
|
|
- visitorReasonCode:"",//来访事由编码 .
|
|
|
- visitorReasonInfo:"",//来访事由 .
|
|
|
- visitorNumber:"",//来访人数 .
|
|
|
+ targetPeoplePhone:"13127578888",//被访人手机号
|
|
|
+ targetPeopleName:"金工",//被访人姓名 .
|
|
|
+ visitorReasonCode:"business_talks",//来访事由编码 .
|
|
|
+ visitorReasonInfo:"business_talks",//来访事由 .
|
|
|
+ visitorNumber:"3",//来访人数 .
|
|
|
startTime:"", //开始时间 .
|
|
|
endTime:"", //结束时间 .
|
|
|
- visitorPersonList:{
|
|
|
- peopleName:"",//访客姓名 .
|
|
|
- peoplePhone:"",//访客手机号 .
|
|
|
- sex:"",//访客性别 .
|
|
|
- cardId:"341282199208123456",//证件号 .
|
|
|
- cardType:"2",//证件类型 .
|
|
|
- plates:"2",//车牌号 .
|
|
|
- callerCorpName:"",//来访单位 .
|
|
|
- signInOutState:"non",//签到/离状态 .
|
|
|
- } //访客信息列表 .
|
|
|
+ visitorPersonList:[
|
|
|
+ {
|
|
|
+ peopleName:"王工",//访客姓名 .
|
|
|
+ peoplePhone:"13127578866",//访客手机号 .
|
|
|
+ sex:"",//访客性别 .
|
|
|
+ cardId:"341282199208123456",//证件号 .
|
|
|
+ cardType:"2",//证件类型 .
|
|
|
+ plates:"2",//车牌号 .
|
|
|
+ callerCorpName:"永天",//来访单位 .
|
|
|
+ signInOutState:"non",//签到/离状态 .
|
|
|
+ } //访客信息列表 .
|
|
|
+ ]
|
|
|
},
|
|
|
visitorReasonCodeList:[
|
|
|
{label:"亲友拜访",value:"family_friends_visitor"},
|
|
@@ -284,21 +286,27 @@ function submitForm() {
|
|
|
if (valid) {
|
|
|
// form.value.sex = Number(form.value.sex);
|
|
|
// form.value.accompanyNum = Number(form.value.accompanyNum);
|
|
|
- console.log(form.value)
|
|
|
- addVisitor(form.value).then((requset) => {
|
|
|
- if (requset.success == true) {
|
|
|
- ElMessage({
|
|
|
- message: "访客预约申请成功,请稍后查看微信小程序推送信息",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- setTimeout(function () {
|
|
|
- formRef.value.resetFields(); //重置from校验
|
|
|
- dateRange.value = [];
|
|
|
- router.push({ path: "/" });
|
|
|
- }, 5000);
|
|
|
- } else {
|
|
|
- ElMessage.error(requset.msg);
|
|
|
- }
|
|
|
+ // console.log(form.value)
|
|
|
+ // axios
|
|
|
+ // .post(
|
|
|
+ // "http://218.4.219.62:8083/visitor/record",form.value
|
|
|
+ // ).then((response) => {})
|
|
|
+ let a = JSON.stringify(form.value)
|
|
|
+console.log(a)
|
|
|
+ addVisitor(a).then((requset) => {
|
|
|
+ // if (requset.success == true) {
|
|
|
+ // ElMessage({
|
|
|
+ // message: "访客预约申请成功,请稍后查看微信小程序推送信息",
|
|
|
+ // type: "success",
|
|
|
+ // });
|
|
|
+ // setTimeout(function () {
|
|
|
+ // formRef.value.resetFields(); //重置from校验
|
|
|
+ // dateRange.value = [];
|
|
|
+ // router.push({ path: "/" });
|
|
|
+ // }, 5000);
|
|
|
+ // } else {
|
|
|
+ // ElMessage.error(requset.msg);
|
|
|
+ // }
|
|
|
});
|
|
|
}
|
|
|
});
|