289d2c9e by renchao@pashanhoo.com

style:身份证打卡器方法封装

1 parent 1e7b4fd3
{
"TITLE": "不动产登记系统",
"SERVERAPI": "/bdcdj",
"SERVERAPI": "/bdcdj-th",
"ip": "http://192.168.2.38",
"IDCARDURL": "http://127.0.0.1:33088/function=get_idcard&readnew=0"
}
\ No newline at end of file
......
import Vue from 'vue'
import axios from 'axios'
import { Message } from "element-ui";
export function removeTreeListItem (treeList, dictId, idName = 'bsmDict') {
if (!treeList || !treeList.length) {
......@@ -111,7 +113,6 @@ export function down (index, data) {
}
}
export function getUrlParam (paraName) {
let url = document.location.toString();
let arrObj = url.split('?');
......@@ -133,3 +134,7 @@ export function getUrlParam (paraName) {
return '';
}
}
export function getIdCardInfo () {
return axios.post(Vue.prototype.BASE_API.IDCARDURL)
}
\ No newline at end of file
......
......@@ -66,9 +66,9 @@
<el-select v-model="scope.row.sqrzjlxbm" class="width100">
<el-option
v-for="item in zjzlData"
:key="item.value"
:label="item.label"
:value="item.value">
:key="item.dcode"
:label="item.dname"
:value="item.dcode">
</el-option>
</el-select>
</template>
......@@ -113,10 +113,10 @@
</div>
</template>
<script>
import axios from 'axios'
import store from '@/store/index.js'
import { getLodop } from "@/utils/LodopFuncs"
import { datas } from "./addjtfcdata";
import { getLodop } from "@/utils/LodopFuncs"
import { getIdCardInfo } from '@/utils/operation.js'
import { getPrintTemplateByCode } from "@/api/system";
import { addJtfcCxjgXx, getJtfcInfo, printJtcfInfo } from "@/api/sqcx";
export default {
......@@ -359,7 +359,7 @@
this.isSearch = false;
},
handleRead (row, type) {
axios.post(this.BASE_API.IDCARDURL).then(res => {
getIdCardInfo().then(res => {
if (res.data.code == 0) {
let data = res.data.IDCardInfo
row.sqrxm = data.name
......@@ -372,7 +372,6 @@
if (type == 'sqr') {
this.form.qlrList = _.cloneDeep(this.form.sqrList)
}
console.log(this.form.sqrList);
} else {
this.$message({
message: res.data.message,
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-14 13:14:26
* @LastEditTime: 2023-06-16 10:38:23
-->
<template>
<div>
......@@ -12,8 +12,8 @@
</div>
</template>
<script>
import axios from 'axios'
import { mapGetters } from 'vuex'
import { getIdCardInfo } from '@/utils/operation.js'
import addQlr from './dialog/addQlr.vue'
export default {
components: {
......@@ -195,7 +195,7 @@
// 身份证读取
readClick (row) {
axios.post(this.BASE_API.IDCARDURL).then(res => {
getIdCardInfo().then(res => {
if (res.data.code == 0) {
let data = res.data.IDCardInfo
row.sqrmc = data.name
......