master
lion 3 years ago
parent 781ab03990
commit 1a756d3240

@ -30,7 +30,6 @@
"view-design": "^4.7.0", "view-design": "^4.7.0",
"vue": "2.6.10", "vue": "2.6.10",
"vue-count-to": "^1.0.13", "vue-count-to": "^1.0.13",
"vue-jsonp": "^2.0.0",
"vue-router": "3.0.6", "vue-router": "3.0.6",
"vuex": "3.1.0" "vuex": "3.1.0"
}, },

@ -24,14 +24,6 @@ export function cancelCode(params){
}) })
} }
export function getIdcard(baseURL,params){
return request({
idcards:baseURL,
url:'/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1',
method:'get',
params
})
}
// http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1 // http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1

@ -21,9 +21,6 @@ const service = axios.create({
// request interceptor // request interceptor
service.interceptors.request.use( service.interceptors.request.use(
config => { config => {
if(config.idcards){
config.baseURL = config.idcards
}
if(config.isLoading){ if(config.isLoading){
loading = Loading.service({ loading = Loading.service({
lock:true, lock:true,

@ -19,7 +19,7 @@
<div> <div>
核验销码 核验销码
<el-input clearable ref='codeInput' size="mini" placeholder="请输入核销码或扫码" v-model="select.code" <el-input clearable ref='codeInput' size="mini" placeholder="请输入核销码或扫码" v-model="select.code"
style="width: 160px;margin-right: 10px;"></el-input> style="width: 160px;margin-right: 10px;" @change='getList'></el-input>
</div> </div>
<div> <div>
身份证件 身份证件
@ -49,11 +49,11 @@
</template> </template>
<script> <script>
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import axios from 'axios'
import showVisit from '@/views/visit/component/showVisit' import showVisit from '@/views/visit/component/showVisit'
import { import {
getList, getList,
getUserList, getUserList
getIdcard
} from '@/api/gate' } from '@/api/gate'
export default { export default {
components: { components: {
@ -137,6 +137,7 @@
this.$refs['showVisit'].formDataType = 'coderecord' this.$refs['showVisit'].formDataType = 'coderecord'
this.$refs['showVisit'].gateAdminId = this.gateAdminId this.$refs['showVisit'].gateAdminId = this.gateAdminId
this.$refs['showVisit'].isShow = true this.$refs['showVisit'].isShow = true
return
} else { } else {
this.$successMessage(k.audit_status_text, '', 'success') this.$successMessage(k.audit_status_text, '', 'success')
} }
@ -144,6 +145,8 @@
} else { } else {
this.$successMessage("未查询到记录", '', 'warning') this.$successMessage("未查询到记录", '', 'warning')
} }
this.select.code = ''
this.select.idcard = ''
}, },
async getUserList() { async getUserList() {
this.gateUser = Cookies.get("gateUser") ? JSON.parse(Cookies.get("gateUser")) : '' this.gateUser = Cookies.get("gateUser") ? JSON.parse(Cookies.get("gateUser")) : ''
@ -183,18 +186,27 @@
}, },
getIdcard() { getIdcard() {
let that = this let that = this
this.$jsonp( axios.get('https://127.0.0.1:24011/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1',{
'http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1' 'headers':{
) "Content-Type":'application/json'
.then((res) => { }
})
.then(res=>{
console.log(res) console.log(res)
that.select.idcard = res.Certificate.IDNumber console.log(res.data)
if(!res.data){
return
}
let data1 = res.data?res.data.split('"IDNumber"'):''
let data2= data1[1].split(",")
let data3 =data2[0].replace(/[^\d]/g, "")
that.select.idcard = data3
that.getList() that.getList()
}) }).catch(err=>{
.catch((err) => { console.log(err)
console.log(err) this.$successMessage(err.statusText, '', 'warning')
this.$successMessage(err.statusText, '', 'warning') })
})
}, },
screen() { screen() {
let element = document.documentElement; let element = document.documentElement;

@ -45,14 +45,6 @@ module.exports = {
}, },
//before: require('./mock/mock-server.js'), //before: require('./mock/mock-server.js'),
proxy: { proxy: {
'^/idcard': {
target: 'http://127.0.0.1:24010',
changeOrigin: true, //配置跨域
"secure": true, // 接受运行在https上默认不接受
pathRewrite: {
['^/idcard']:'http://127.0.0.1:24010'
}
},
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_BASE_API, target: process.env.VUE_APP_BASE_API,
changeOrigin: true, //配置跨域 changeOrigin: true, //配置跨域

Loading…
Cancel
Save