From 32f83c31c561fd9273a54ac18d33225831d1dd3c Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Fri, 12 Sep 2025 17:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E8=84=B8=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/faceRecognition/index.js | 36 +++- src/utils/request.js | 1 + .../faceRecognition/module/batchImport.vue | 197 +++++++++++++++++- .../faceRecognition/personInfoManage.vue | 10 +- 4 files changed, 221 insertions(+), 23 deletions(-) diff --git a/src/api/faceRecognition/index.js b/src/api/faceRecognition/index.js index a809661..2e7231e 100644 --- a/src/api/faceRecognition/index.js +++ b/src/api/faceRecognition/index.js @@ -26,13 +26,13 @@ export function edit(data) { }) } -// export function del(data) { -// return request({ -// url: 'api/queryMachine/deleteQueryTopic', -// method: 'post', -// data -// }) -// } +export function del(data) { + return request({ + url: 'api/person/deletePersonInfos', + method: 'post', + data + }) +} // 根据id查看人员详细信息 export function FetchPersonInfoById(params) { @@ -42,8 +42,28 @@ export function FetchPersonInfoById(params) { }) } +// 导入批量添加人脸基本信息预查看 +export function FetchPreviewFileInfo(params) { + return request({ + url: 'api/person/previewFileInfo' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +// 更改人员类型 +export function FetchChangePersonInfo(data) { + return request({ + url: 'api/person/changePersonInfo', + method: 'post', + data + }) +} + export default { add, edit, - FetchPersonInfoById + del, + FetchPersonInfoById, + FetchPreviewFileInfo, + FetchChangePersonInfo } diff --git a/src/utils/request.js b/src/utils/request.js index b142a0d..2963853 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -86,6 +86,7 @@ service.interceptors.response.use( return Promise.reject(error) } } + console.log('code', code) if (code) { if (code === 401) { store.dispatch('LogOut').then(() => { diff --git a/src/views/faceRecognition/module/batchImport.vue b/src/views/faceRecognition/module/batchImport.vue index 18313c2..b14a068 100644 --- a/src/views/faceRecognition/module/batchImport.vue +++ b/src/views/faceRecognition/module/batchImport.vue @@ -1,25 +1,181 @@ @@ -27,5 +183,26 @@ export default { diff --git a/src/views/faceRecognition/personInfoManage.vue b/src/views/faceRecognition/personInfoManage.vue index 0a7f0f9..39dfbe1 100644 --- a/src/views/faceRecognition/personInfoManage.vue +++ b/src/views/faceRecognition/personInfoManage.vue @@ -135,7 +135,7 @@ import BatchImport from './module/batchImport' import { mapGetters } from 'vuex' import { upload } from '@/utils/upload' -const defaultForm = { personId: null, libcode: null, barcode: null, personName: null, personPhotoUrl: null, idcard: null, phone: null, personSex: 1, personType: 1 } +const defaultForm = { personId: null, libcode: null, barcode: null, personName: null, personPhotoUrl: null, idcard: null, phone: null, personSex: 1, personType: 0, personPhotoBase64: null } export default { name: 'PersonInfoManage', components: { pagination, crudOperation, rrOperation, FaceSearch, SelfRegister, BatchImport }, @@ -158,9 +158,9 @@ export default { del: ['admin', 'face:del'] }, userTypeOptions: [ - { value: 1, label: '普通用户' }, - { value: 2, label: 'VIP用户' }, - { value: 3, label: '黑名单用户' } + { value: 0, label: '普通用户' }, + { value: 1, label: 'VIP用户' }, + { value: 2, label: '黑名单用户' } ], rules: { libcode: [ @@ -215,7 +215,7 @@ export default { return false } console.log(crud.form) - return false + return true }, async changeFile(e) { const file = e.target.files[0]