Compare commits
4 Commits
5a19e81931
...
7978582c60
Author | SHA1 | Date |
---|---|---|
|
7978582c60 | |
|
716b388d46 | |
|
886fe18434 | |
|
19fb6e61f9 |
|
@ -25,6 +25,7 @@ import './permission' // permission control
|
||||||
|
|
||||||
import { useDict } from '@/utils/dict'
|
import { useDict } from '@/utils/dict'
|
||||||
import { parseTime, resetForm, addDateRange, formatDuraDate, formatDuraTime, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
|
import { parseTime, resetForm, addDateRange, formatDuraDate, formatDuraTime, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 分页组件
|
// 分页组件
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
|
@ -70,6 +71,8 @@ app.config.globalProperties.$tryToJson=(str,df)=>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
app.config.globalProperties.$dt=dayjs;
|
app.config.globalProperties.$dt=dayjs;
|
||||||
|
app.config.globalProperties.$http=request;
|
||||||
|
|
||||||
// 全局组件挂载
|
// 全局组件挂载
|
||||||
app.component('DictTag', DictTag)
|
app.component('DictTag', DictTag)
|
||||||
app.component('Pagination', Pagination)
|
app.component('Pagination', Pagination)
|
||||||
|
|
|
@ -260,7 +260,24 @@
|
||||||
<el-input v-model="form.bankOffice" placeholder="请输入开户网点" />
|
<el-input v-model="form.bankOffice" placeholder="请输入开户网点" />
|
||||||
</el-form-item></el-col>
|
</el-form-item></el-col>
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="身份证信息" prop="identificationCard">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="div-header">头像面</div>
|
||||||
|
<image-upload v-model="form.certificatePhoto1" :limit="1" class="identification-card-1"
|
||||||
|
@change="doImageUpload(1)" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="div-header">国徽面</div>
|
||||||
|
<image-upload v-model="form.certificatePhoto2" :limit="1" class="identification-card-2"
|
||||||
|
@change="doImageUpload(2)" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="div-header">人脸识别头像</div>
|
||||||
|
<image-upload v-model="form.faceImage" :limit="1" class="face-image" @change="doImageUpload(3)" />
|
||||||
|
</el-col>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
@ -385,9 +402,48 @@ function handleBatchEnterState(state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//图片上传
|
//图片上传
|
||||||
function doImageUpload() {
|
function doImageUpload(type) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
let url='';
|
||||||
form.value.identificationCard = form.value.certificatePhoto1 && form.value.certificatePhoto2 && form.value.faceImage ? "yes" : ''
|
form.value.identificationCard = form.value.certificatePhoto1 && form.value.certificatePhoto2 && form.value.faceImage ? "yes" : ''
|
||||||
|
if(type==1){
|
||||||
|
url=form.value.certificatePhoto1;
|
||||||
|
if(url){
|
||||||
|
url=location.origin+url;
|
||||||
|
//url="http://62.234.3.186/statics/2025/01/19/4491f170cd1609142f9a6f097cbf681f_20250119000046A004.jpg"
|
||||||
|
proxy.$http.get(`/system/tools/id/front?url=${url}`).then(d=>{
|
||||||
|
form.value.userName=form.value.userName||d.data.name||'';
|
||||||
|
form.value.certificateCode=form.value.certificateCode||d.data.cardId||'';
|
||||||
|
form.value.address=form.value.address||d.data.address||'';
|
||||||
|
let nation=d.data.nation||"";
|
||||||
|
if(nation){
|
||||||
|
let tmps= data.nationOpts.filter(it=>it.indexOf(nation)>=0);
|
||||||
|
if(tmps.length>0){
|
||||||
|
form.value.nation=form.value.nation||tmps[0]||'';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let sex=d.data.sex||'';
|
||||||
|
if(sex){
|
||||||
|
form.value.sex=form.value.sex||(sex=='男'?0:1);
|
||||||
|
}
|
||||||
|
let birthDay=d.data.birthday;
|
||||||
|
if(birthDay && birthDay.length==8){
|
||||||
|
birthDay=birthDay.substr(0,4)+"-"+birthDay.substr(4,2)+"-"+birthDay.substr(6);
|
||||||
|
form.value.birthDay=form.value.birthDay||birthDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}else if(type==2){
|
||||||
|
url=form.value.certificatePhoto2;
|
||||||
|
if(url){
|
||||||
|
url=location.origin+url;
|
||||||
|
//url="https://gss0.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/a8014c086e061d95103a068779f40ad162d9ca14.jpg"
|
||||||
|
proxy.$http.get(`/system/tools/id/back?url=${url}`).then(d=>{
|
||||||
|
form.value.nativePlace=form.value.nativePlace||d.data.issuing||'';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}, 800);
|
}, 800);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue