style:身份证打卡器方法封装
Showing
4 changed files
with
16 additions
and
12 deletions
| 1 | { | 1 | { |
| 2 | "TITLE": "不动产登记系统", | 2 | "TITLE": "不动产登记系统", |
| 3 | "SERVERAPI": "/bdcdj", | 3 | "SERVERAPI": "/bdcdj-th", |
| 4 | "ip": "http://192.168.2.38", | 4 | "ip": "http://192.168.2.38", |
| 5 | "IDCARDURL": "http://127.0.0.1:33088/function=get_idcard&readnew=0" | 5 | "IDCARDURL": "http://127.0.0.1:33088/function=get_idcard&readnew=0" |
| 6 | } | 6 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | import Vue from 'vue' | ||
| 2 | import axios from 'axios' | ||
| 1 | import { Message } from "element-ui"; | 3 | import { Message } from "element-ui"; |
| 2 | export function removeTreeListItem (treeList, dictId, idName = 'bsmDict') { | 4 | export function removeTreeListItem (treeList, dictId, idName = 'bsmDict') { |
| 3 | if (!treeList || !treeList.length) { | 5 | if (!treeList || !treeList.length) { |
| ... | @@ -111,7 +113,6 @@ export function down (index, data) { | ... | @@ -111,7 +113,6 @@ export function down (index, data) { |
| 111 | } | 113 | } |
| 112 | } | 114 | } |
| 113 | 115 | ||
| 114 | |||
| 115 | export function getUrlParam (paraName) { | 116 | export function getUrlParam (paraName) { |
| 116 | let url = document.location.toString(); | 117 | let url = document.location.toString(); |
| 117 | let arrObj = url.split('?'); | 118 | let arrObj = url.split('?'); |
| ... | @@ -133,3 +134,7 @@ export function getUrlParam (paraName) { | ... | @@ -133,3 +134,7 @@ export function getUrlParam (paraName) { |
| 133 | return ''; | 134 | return ''; |
| 134 | } | 135 | } |
| 135 | } | 136 | } |
| 137 | |||
| 138 | export function getIdCardInfo () { | ||
| 139 | return axios.post(Vue.prototype.BASE_API.IDCARDURL) | ||
| 140 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -66,9 +66,9 @@ | ... | @@ -66,9 +66,9 @@ |
| 66 | <el-select v-model="scope.row.sqrzjlxbm" class="width100"> | 66 | <el-select v-model="scope.row.sqrzjlxbm" class="width100"> |
| 67 | <el-option | 67 | <el-option |
| 68 | v-for="item in zjzlData" | 68 | v-for="item in zjzlData" |
| 69 | :key="item.value" | 69 | :key="item.dcode" |
| 70 | :label="item.label" | 70 | :label="item.dname" |
| 71 | :value="item.value"> | 71 | :value="item.dcode"> |
| 72 | </el-option> | 72 | </el-option> |
| 73 | </el-select> | 73 | </el-select> |
| 74 | </template> | 74 | </template> |
| ... | @@ -113,10 +113,10 @@ | ... | @@ -113,10 +113,10 @@ |
| 113 | </div> | 113 | </div> |
| 114 | </template> | 114 | </template> |
| 115 | <script> | 115 | <script> |
| 116 | import axios from 'axios' | ||
| 117 | import store from '@/store/index.js' | 116 | import store from '@/store/index.js' |
| 118 | import { getLodop } from "@/utils/LodopFuncs" | ||
| 119 | import { datas } from "./addjtfcdata"; | 117 | import { datas } from "./addjtfcdata"; |
| 118 | import { getLodop } from "@/utils/LodopFuncs" | ||
| 119 | import { getIdCardInfo } from '@/utils/operation.js' | ||
| 120 | import { getPrintTemplateByCode } from "@/api/system"; | 120 | import { getPrintTemplateByCode } from "@/api/system"; |
| 121 | import { addJtfcCxjgXx, getJtfcInfo, printJtcfInfo } from "@/api/sqcx"; | 121 | import { addJtfcCxjgXx, getJtfcInfo, printJtcfInfo } from "@/api/sqcx"; |
| 122 | export default { | 122 | export default { |
| ... | @@ -359,7 +359,7 @@ | ... | @@ -359,7 +359,7 @@ |
| 359 | this.isSearch = false; | 359 | this.isSearch = false; |
| 360 | }, | 360 | }, |
| 361 | handleRead (row, type) { | 361 | handleRead (row, type) { |
| 362 | axios.post(this.BASE_API.IDCARDURL).then(res => { | 362 | getIdCardInfo().then(res => { |
| 363 | if (res.data.code == 0) { | 363 | if (res.data.code == 0) { |
| 364 | let data = res.data.IDCardInfo | 364 | let data = res.data.IDCardInfo |
| 365 | row.sqrxm = data.name | 365 | row.sqrxm = data.name |
| ... | @@ -372,7 +372,6 @@ | ... | @@ -372,7 +372,6 @@ |
| 372 | if (type == 'sqr') { | 372 | if (type == 'sqr') { |
| 373 | this.form.qlrList = _.cloneDeep(this.form.sqrList) | 373 | this.form.qlrList = _.cloneDeep(this.form.sqrList) |
| 374 | } | 374 | } |
| 375 | console.log(this.form.sqrList); | ||
| 376 | } else { | 375 | } else { |
| 377 | this.$message({ | 376 | this.$message({ |
| 378 | message: res.data.message, | 377 | message: res.data.message, | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-06-14 13:14:26 | 4 | * @LastEditTime: 2023-06-16 10:38:23 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div> | 7 | <div> |
| ... | @@ -12,8 +12,8 @@ | ... | @@ -12,8 +12,8 @@ |
| 12 | </div> | 12 | </div> |
| 13 | </template> | 13 | </template> |
| 14 | <script> | 14 | <script> |
| 15 | import axios from 'axios' | ||
| 16 | import { mapGetters } from 'vuex' | 15 | import { mapGetters } from 'vuex' |
| 16 | import { getIdCardInfo } from '@/utils/operation.js' | ||
| 17 | import addQlr from './dialog/addQlr.vue' | 17 | import addQlr from './dialog/addQlr.vue' |
| 18 | export default { | 18 | export default { |
| 19 | components: { | 19 | components: { |
| ... | @@ -195,7 +195,7 @@ | ... | @@ -195,7 +195,7 @@ |
| 195 | 195 | ||
| 196 | // 身份证读取 | 196 | // 身份证读取 |
| 197 | readClick (row) { | 197 | readClick (row) { |
| 198 | axios.post(this.BASE_API.IDCARDURL).then(res => { | 198 | getIdCardInfo().then(res => { |
| 199 | if (res.data.code == 0) { | 199 | if (res.data.code == 0) { |
| 200 | let data = res.data.IDCardInfo | 200 | let data = res.data.IDCardInfo |
| 201 | row.sqrmc = data.name | 201 | row.sqrmc = data.name | ... | ... |
-
Please register or sign in to post a comment