@@ -30,6 +30,11 @@ | |||
"integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", | |||
"dev": true | |||
}, | |||
"@vant/area-data": { | |||
"version": "1.2.2", | |||
"resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.2.2.tgz", | |||
"integrity": "sha512-efv7Yl/OTHjyy0irhJJPtgZb5mJZmroEtVOa8vkGRNTLY93+NgEcVuIBaC35hYCMsTrPHDQRvQGnI9Hyhtto0Q==" | |||
}, | |||
"@vant/icons": { | |||
"version": "1.5.2", | |||
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.5.2.tgz", | |||
@@ -10,6 +10,7 @@ | |||
"build": "node build/build.js" | |||
}, | |||
"dependencies": { | |||
"@vant/area-data": "^1.2.2", | |||
"axios": "^0.21.1", | |||
"echarts": "^5.2.2", | |||
"element-ui": "^2.15.6", | |||
@@ -38,3 +38,11 @@ export function userRegister(data) { | |||
}) | |||
} | |||
// 查询部门下拉树结构 | |||
export function treeselect() { | |||
return request({ | |||
url: '/system/dept/treeselect', | |||
method: 'get' | |||
}) | |||
} | |||
@@ -61,6 +61,9 @@ const whiteList = [ | |||
'/lawEnforcement/waitingProcessing', | |||
'/lawEnforcement/complaintAdd', | |||
'/homesteadLogin', | |||
'/lawEnforcement/userRegister', | |||
'/lawEnforcement/companyRegister', | |||
] | |||
router.beforeEach((to, from, next) => { | |||
@@ -1617,6 +1617,24 @@ export const constantRoutes = [ | |||
}, | |||
component: (resolve) => require(['@/views/lawEnforcement/login'], resolve) | |||
}, | |||
{ | |||
path: '/lawEnforcement/userRegister', | |||
name: 'lawEnforcementUser', | |||
meta: { | |||
title: '个体工商户注册', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/lawEnforcement/register/userRegister'], resolve) | |||
}, | |||
{ | |||
path: '/lawEnforcement/companyRegister', | |||
name: 'lawEnforcementCompanyRegister', | |||
meta: { | |||
title: '企业注册', | |||
hidden: true, | |||
}, | |||
component: (resolve) => require(['@/views/lawEnforcement/register/companyRegister'], resolve) | |||
}, | |||
{ | |||
path: '/lawEnforcement/indexComplaint', | |||
name: 'indexComplaint', | |||
@@ -1113,12 +1113,12 @@ | |||
<!--绘制结束弹窗开始--> | |||
<van-popup v-model:show="showhzht" style="width: 94%;border-radius: 15PX" :close-on-click-overlay="false"> | |||
<div style="height: 200px;padding: 0 3%;"> | |||
<div style="padding: 5px 3% 3%;"> | |||
<h1 style="font-size: 0.35rem;font-weight: 400;border-bottom: 1px solid #ccc; line-height: 0.8rem;"><i style="display: inline-block;width: 1%;height: 0.4rem;background: #7ac943;vertical-align: middle;margin-right: 1%;"></i>是否完成绘制</h1> | |||
<div style="text-align: center;margin-top: 30PX"> | |||
<p style="font-size: 0.3rem;display: inline-block;background: #ccc;padding: 15PX 10%;border-radius: 30PX;color: #FFF;margin-right: 10%;" @click="deleteHistory">否</p> | |||
<p style="font-size: 0.3rem;display: inline-block;background: #7ac943;padding: 15PX 10%;border-radius: 30PX;color: #FFF;" @click="showhzlx = true,showhzht = false">是</p> | |||
<div style="text-align: center;margin-top: 3%;"> | |||
<p style="font-size: 0.3rem;display: inline-block;background: #ccc;padding: 2% 0;border-radius: 30PX;color: #FFF;margin-right: 10%;width: 40%" @click="deleteHistory">否</p> | |||
<p style="font-size: 0.3rem;display: inline-block;background: #7ac943;padding: 2% 0;border-radius: 30PX;color: #FFF;width: 40%" @click="showhzlx = true,showhzht = false">是</p> | |||
</div> | |||
</div> | |||
</van-popup> | |||
@@ -1126,10 +1126,10 @@ | |||
<!-- background: #ccc --> | |||
<van-popup v-model:show="showhzlx" style="width: 94%;border-radius: 15PX"> | |||
<div style="height: 200px;padding: 0 3%;"> | |||
<div style="padding: 5px 3% 3%;"> | |||
<h1 style="font-size: 0.35rem;font-weight: 400;border-bottom: 1px solid #ccc; line-height: 0.8rem;"><i style="display: inline-block;width: 1%;height: 0.4rem;background: #7ac943;vertical-align: middle;margin-right: 1%;"></i>请选择绘制类型<van-icon name="cross" color="#666666" style="position: absolute;right: 2%;top: 0.1rem" @click="showhzlx = false,showhzht = true" /></h1> | |||
<div style="text-align: center;margin-top: 30PX"> | |||
<div style="text-align: center;margin-top: 3%;"> | |||
<p class="hzlxBtn" :style="{background: '#7ac943'}" @click="zjdTz">宅基地</p> | |||
<p class="hzlxBtn" :style="{background: mapZjdTeAll.mapZrzAData ? '#CCC':'#b026ff'}" @click="zrzTz">自然幢</p> | |||
<p class="hzlxBtn" :style="{background: mapZjdTeAll.mapFsssAData ? '#CCC':'#3ac2db'}" @click="fsssTz">附属设施</p> | |||
@@ -4729,10 +4729,11 @@ | |||
.hzlxBtn{ | |||
font-size: 0.3rem; | |||
display: inline-block; | |||
padding: 15PX 10%; | |||
padding: 2% 0; | |||
border-radius: 30PX; | |||
color: #FFF; | |||
margin-right: 2%; | |||
width: 30%; | |||
&:last-child{ | |||
margin: 0; | |||
} | |||
@@ -39,8 +39,35 @@ | |||
<van-button block type="info" native-type="submit" @click="handleLogin">登录</van-button> | |||
</div> | |||
<div style="margin: 0px 16px;border-radius: 30px;overflow: hidden;"> | |||
<van-button block type="info" native-type="submit" to="register/index">注册</van-button> | |||
<van-button block type="info" @click="registerShow=true">注册</van-button> | |||
</div> | |||
<van-popup v-model:show="registerShow" style="width: 80%" round> | |||
<div style="background: #FFF;padding: 5% 2%;"> | |||
<p style="text-align: center;font-size: 0.45rem;margin-bottom: 5%;font-family: zqkhyt;">请选择注册类型</p> | |||
<van-row> | |||
<van-col :span="12" align="center"> | |||
<router-link :to="{name:'lawEnforcementUser'}"> | |||
<van-image | |||
round | |||
width="50%" | |||
src="../../../static/images/lawEnforcement/sh.png" | |||
/> | |||
</router-link> | |||
<p style="font-family: zqkhyt;font-size: 0.4rem;margin-top: 3%">个体工商户</p> | |||
</van-col> | |||
<van-col :span="12" align="center"> | |||
<van-image | |||
round | |||
width="50%" | |||
src="../../../static/images/lawEnforcement/qy.png" | |||
/> | |||
<p style="font-family: zqkhyt;font-size: 0.4rem;margin-top: 3%">企业</p> | |||
</van-col> | |||
</van-row> | |||
</div> | |||
</van-popup> | |||
</van-form> | |||
</div> | |||
</template> | |||
@@ -141,6 +168,7 @@ | |||
name: "login", | |||
data() { | |||
return { | |||
registerShow:false, | |||
showMessage:false, | |||
smsCodeValue:"", | |||
showKeyboard:false, | |||
@@ -0,0 +1,141 @@ | |||
<template> | |||
<div class="app-container" :style="{height:height+'px'}"> | |||
<van-nav-bar | |||
title="单位用户注册" | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="onClickLeft" | |||
/> | |||
<van-form @submit="getSubmit"> | |||
<van-field | |||
readonly | |||
clickable | |||
name="picker" | |||
:value="value" | |||
label="供求类型" | |||
placeholder="点击选择供求类型" | |||
@click="showPicker = true" | |||
required | |||
:rules="[{ required:true }]" | |||
/> | |||
<van-popup v-model="showPicker" position="bottom"> | |||
<van-picker | |||
show-toolbar | |||
:columns="columns" | |||
@confirm="onConfirm" | |||
@cancel="showPicker = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.phone" type="tel" label="手机号" placeholder="请输入手机号" required :rules="[{ required:true }]" /> | |||
<van-field | |||
v-model="form.code" | |||
center | |||
clearable | |||
label="验证码" | |||
placeholder="图形验证码" | |||
required :rules="[{ required:true }]" | |||
> | |||
<template #button> | |||
<img class="code-img" :src="codeUrl" @click="getCode" /> | |||
</template> | |||
</van-field> | |||
<van-field v-model="form.password" type="password" label="密码" placeholder="请输入密码" required :rules="[{ required:true }]"/> | |||
<van-field v-model="confirmPassWord" type="password" label="确认密码" placeholder="请再次输入密码" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.companyName" label="公司名称" placeholder="请输入公司名称" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.realname" label="负责人姓名" placeholder="请输入负责人姓名" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.idCardNum" label="身份证号" placeholder="请输入法人身份证号" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.companyCode" label="社会信用代码" placeholder="请输入公司的社会信用代码" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.companyLicense" label="营业执照号" placeholder="请输入公司的营业执照号" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.address" label="联系地址" placeholder="请输入联系地址" /> | |||
<div class="submit"> | |||
<p>我已阅读并同意<span>《农村产权交易信息服务平台会员注册协议》</span></p> | |||
<van-button round block type="info" color="#007E72" native-type="submit">立即注册</van-button> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { getCodeImg } from "@/api/login"; | |||
import { userRegister } from "@/api/register/index"; | |||
export default { | |||
name: "companyRegister", | |||
data() { | |||
return { | |||
height:0, | |||
tel:'', | |||
value:'', | |||
confirmPassWord:'', | |||
showPicker: false, | |||
columns:[], | |||
form: { | |||
phone: "", //账号 | |||
code: "", //验证码 | |||
password: "", //密码 | |||
realname: "", //姓名 | |||
idCardNum: "", //身份证号 | |||
address: "", //地址 | |||
uuid:'',//图形验证码ID | |||
memberType:2, | |||
economicType:1, | |||
companyName:'', | |||
companyLicense:'', | |||
companyCode:'' | |||
}, | |||
codeUrl:'' | |||
}; | |||
}, | |||
created() { | |||
this.getCode(); | |||
this.getDicts("economic_type").then(res => { | |||
res.data.map(item => { | |||
this.columns.push(item.dictLabel); | |||
}); | |||
}); | |||
this.height = document.body.clientHeight | |||
}, | |||
methods: { | |||
getCode() { | |||
getCodeImg().then((res) => { | |||
this.form.uuid = res.uuid; | |||
this.codeUrl = "data:image/gif;base64," + res.img; | |||
}); | |||
}, | |||
onConfirm(value, index) { | |||
this.value = value; | |||
this.showPicker = false; | |||
this.form.supplyDemandType = index + 1 ; | |||
}, | |||
getSubmit(){ | |||
console.log(this.form) | |||
userRegister(this.form).then((res) => { | |||
console.log(res) | |||
}); | |||
} | |||
}, | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
background-color: #FFF; | |||
.code-img { | |||
width: 220px; | |||
} | |||
} | |||
.submit{ | |||
position: absolute; | |||
bottom: 5%; | |||
width: 90%; | |||
left: 5%; | |||
p{ | |||
text-align: center; | |||
margin-bottom: 0.2rem; | |||
span{ | |||
color: #007E72; | |||
} | |||
} | |||
} | |||
</style> |
@@ -0,0 +1,212 @@ | |||
<template> | |||
<div class="app-container" :style="{height:height+'px'}"> | |||
<van-nav-bar | |||
title="个体工商户注册" | |||
left-arrow | |||
fixed | |||
placeholder | |||
@click-left="onClickLeft" | |||
/> | |||
<van-form @submit="getSubmit" style="padding-bottom: 22%;"> | |||
<van-field v-model="form.name" label="姓名" placeholder="请输入姓名" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.cardNum" label="身份证号" placeholder="请输入身份证号" required :rules="[{ required:true }]"/> | |||
<van-field name="radio" label="性别" :rules="[{ required:true }]" required> | |||
<template #input> | |||
<van-radio-group v-model="form.sex" direction="horizontal"> | |||
<van-radio name="0">男</van-radio> | |||
<van-radio name="1">女</van-radio> | |||
</van-radio-group> | |||
</template> | |||
</van-field> | |||
<van-field | |||
v-model="nationText" | |||
is-link | |||
readonly | |||
label="民族" | |||
placeholder="点击选择民族" | |||
@click="showNation = true" | |||
/> | |||
<van-popup v-model:show="showNation" position="bottom"> | |||
<van-picker | |||
title="民族" | |||
show-toolbar | |||
:columns="nationOptions" | |||
@confirm="onConfirmNation" | |||
value-key="dictLabel" | |||
/> | |||
<!-- @confirm="onConfirm"--> | |||
<!-- @cancel="onCancel"--> | |||
<!-- @change="onChange"--> | |||
</van-popup> | |||
<van-field v-model="form.phone" type="tel" label="手机号" placeholder="请输入手机号" required :rules="[{ required:true }]" /> | |||
<van-field | |||
v-model="form.code" | |||
center | |||
clearable | |||
label="验证码" | |||
placeholder="图形验证码" | |||
required :rules="[{ required:true }]" | |||
> | |||
<template #button> | |||
<img class="code-img" :src="codeUrl" @click="getCode" /> | |||
</template> | |||
</van-field> | |||
<van-field v-model="form.password" type="password" label="密码" placeholder="请输入密码" required :rules="[{ required:true }]"/> | |||
<van-field v-model="confirmPassWord" type="password" label="确认密码" placeholder="请再次输入密码" required :rules="[{ required:true }]"/> | |||
<van-field | |||
v-model="form.birthday" | |||
is-link | |||
readonly | |||
name="datetimePicker" | |||
label="出生日期" | |||
placeholder="点击选择出生日期" | |||
@click="showDate = true" | |||
/> | |||
<van-popup v-model:show="showDate" position="bottom"> | |||
<van-datetime-picker | |||
type="date" | |||
title="选择年月日" | |||
:min-date="minDate" | |||
:max-date="maxDate" | |||
@confirm="onConfirmBirthday" | |||
@cancel="showDate = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.companyPosition" label="工作单位及职务" placeholder="请输入工作单位及职务" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.uniformCode" label="统一社会信用代码" placeholder="请输入统一社会信用代码" required :rules="[{ required:true }]"/> | |||
<van-field | |||
v-model="form.deptId" | |||
is-link | |||
readonly | |||
name="area" | |||
label="所在地区" | |||
placeholder="点击选择地区" | |||
@click="showArea = true" | |||
/> | |||
<van-popup v-model:show="showArea" position="bottom"> | |||
<van-area | |||
:area-list="deptOptions" | |||
@confirm="onConfirmAdress" | |||
@cancel="showArea = false" | |||
/> | |||
</van-popup> | |||
<van-field v-model="form.zihao" label="字号名称" placeholder="请输入字号名称" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.address" label="详细地址" placeholder="请输入详细地址" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.businessType" label="经营类别" placeholder="请输入经营类别" required :rules="[{ required:true }]"/> | |||
<van-field v-model="form.businessScope" label="经营范围" placeholder="请输入经营范围" required :rules="[{ required:true }]"/> | |||
<div class="submit"> | |||
<van-button round block type="info" color="#007E72" native-type="submit">立即注册</van-button> | |||
</div> | |||
</van-form> | |||
</div> | |||
</template> | |||
<script> | |||
import { getCodeImg } from "@/api/login"; | |||
import { userRegister,treeselect } from "@/api/register/index"; | |||
import { areaList } from '@vant/area-data'; | |||
export default { | |||
name: "userRegister", | |||
data() { | |||
return { | |||
height:0, | |||
tel:'', | |||
result:'', | |||
confirmPassWord:'', | |||
areaList:areaList, | |||
showArea:false, | |||
showDate:false, | |||
showNation:false, | |||
minDate: new Date(1900, 1, 1), | |||
maxDate: new Date(), | |||
form: { | |||
sex:'0' | |||
}, | |||
codeUrl:'', | |||
nationText:'', | |||
// 民族字典 | |||
nationOptions: [], | |||
// 部门列表 | |||
deptOptions: [], | |||
}; | |||
}, | |||
created() { | |||
this.getCode() | |||
this.height = document.body.clientHeight | |||
this.getDicts("nationality").then(response => { | |||
this.nationOptions = response.data; | |||
}); | |||
/** 查询部门下拉树结构 */ | |||
treeselect().then((response) => { | |||
this.deptOptions = response.data; | |||
}); | |||
}, | |||
methods: { | |||
onConfirmAdress(areaValues){ | |||
this.showArea = false; | |||
this.result = areaValues | |||
.filter((item) => !!item) | |||
.map((item) => item.name) | |||
.join('/'); | |||
}, | |||
onConfirmBirthday(value){ | |||
console.log(this.timeFormat(value)) | |||
this.showDate = false; | |||
this.form.birthday = this.timeFormat(value); | |||
}, | |||
onConfirmNation(value,index){ | |||
this.showNation = false; | |||
this.nationText = value.dictLabel; | |||
this.form.nation = value.dictValue; | |||
}, | |||
timeFormat(time) { // 时间格式化 2019-09-08 | |||
let year = time.getFullYear(); | |||
let month = time.getMonth() + 1; | |||
let day = time.getDate(); | |||
return year + '-' + month + '-' + day | |||
}, | |||
getCode() { | |||
getCodeImg().then((res) => { | |||
this.form.uuid = res.uuid; | |||
this.codeUrl = "data:image/gif;base64," + res.img; | |||
}); | |||
}, | |||
getSubmit(){ | |||
console.log(this.form) | |||
userRegister(this.form).then((res) => { | |||
console.log(res) | |||
}); | |||
} | |||
}, | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
.app-container { | |||
background-color: #FFF; | |||
.code-img { | |||
width: 220px; | |||
} | |||
} | |||
.submit{ | |||
position: fixed; | |||
bottom: 0; | |||
width: 100%; | |||
left: 0; | |||
background: #FFF; | |||
padding: 5% 3%; | |||
box-shadow: 0px -5px 9px #eee; | |||
p{ | |||
text-align: center; | |||
margin-bottom: 0.2rem; | |||
span{ | |||
color: #007E72; | |||
} | |||
} | |||
} | |||
</style> |