人脸识别与大模型问答

This commit is contained in:
jiang 2024-08-26 10:15:17 +08:00
parent 460991d615
commit fcfa7fcb02
11 changed files with 194 additions and 156 deletions

View File

@ -43,7 +43,7 @@ export default {
this.currentTime = `${hours}:${minutes}:${seconds}`; this.currentTime = `${hours}:${minutes}:${seconds}`;
}, },
backToHome() { backToHome() {
this.$router.push('/largeScreen').then(() => { this.$router.push('/index').then(() => {
localStorage.clear(); localStorage.clear();
}); });
}, },

View File

@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/updateFace','/largeScreen','/updateIDCard','/Violation','/Text','/Video','/askRequest','/radar'] const whiteList = ['/login', '/updateFace','/index','/updateIDCard','/Violation','/Text','/Video','/askRequest','/radar']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()

View File

@ -41,7 +41,7 @@ export const constantRoutes = [
hidden: true hidden: true
}, },
{ {
path: '/largeScreen', path: '/index',
component: () => import('@/views/largeScreen/largeScreen'), component: () => import('@/views/largeScreen/largeScreen'),
hidden: true hidden: true
}, },

View File

@ -75,7 +75,7 @@ export default {
methods: { methods: {
backToHome() { backToHome() {
this.$router.beforeEach((to, from, next) => { this.$router.beforeEach((to, from, next) => {
if (from.path === '/largeScreen') { if (from.path === '/index') {
// //
// 使 localStorage.clear() // 使 localStorage.clear()
localStorage.clear(); localStorage.clear();
@ -84,7 +84,7 @@ export default {
}); });
// //
this.$router.push('/largeScreen'); this.$router.push('/index');
}, },
handup() { handup() {
alert(1) alert(1)

View File

@ -175,7 +175,9 @@ export default {
deleteChatWindow(windowId).then(res => { deleteChatWindow(windowId).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success("删除成功"); // this.$message.success("删除成功"); //
this.getList(); // this.getList();
/* this.answerList = [];*/
this.generateNewWindowId();//
} }
}); });
}, },
@ -188,6 +190,10 @@ export default {
// //
submitInput() { submitInput() {
if (this.isAncestor) {
this.$message.warning("问答进行中");
return;
}
if (this.answerList.length === 0) { if (this.answerList.length === 0) {
// //
insertChatWindow({windowName: this.inputValue, windowId: this.windowId}).then(res => { insertChatWindow({windowName: this.inputValue, windowId: this.windowId}).then(res => {

View File

@ -42,15 +42,6 @@
<div class="boxMidTwoc"> <div class="boxMidTwoc">
<div class="boxMidLevelThreec">OCR识别</div> <div class="boxMidLevelThreec">OCR识别</div>
<div class="midIconMainc"> <div class="midIconMainc">
<div class="midIconc">
<a href="javascript:;" class="midIconLinkc">
<img src="../../assets/images/midFiveIcon.png" alt="error" class="midIconLinkPicc"
@click="goToViolation"></a>
<div class="midTextc midTextFithc">发票识别</div>
<div class="hatInsertc"><span class="bigTextc">{{ InvoiceNum }}</span><span
class="smallTextc">()</span>
</div>
</div>
<div class="midIconc"> <div class="midIconc">
<a href="javascript:;" class="midIconLinkc"> <a href="javascript:;" class="midIconLinkc">
<img src="../../assets/images/midSixIcon.png" alt="error" class="midIconLinkPicc" <img src="../../assets/images/midSixIcon.png" alt="error" class="midIconLinkPicc"
@ -60,6 +51,16 @@
class="smallTextc">()</span> class="smallTextc">()</span>
</div> </div>
</div> </div>
<div class="midIconc">
<a href="javascript:;" class="midIconLinkc">
<img src="../../assets/images/midFiveIcon.png" alt="error" class="midIconLinkPicc"
@click="goToViolation"></a>
<div class="midTextc midTextFithc">发票识别</div>
<div class="hatInsertc"><span class="bigTextc">{{ InvoiceNum }}</span><span
class="smallTextc">()</span>
</div>
</div>
<div class="midIconc "> <div class="midIconc ">
<a href="javascript:;" class="midIconLinkc"> <a href="javascript:;" class="midIconLinkc">
<img src="../../assets/images/midSevenIcon.png" alt="error" class="midIconLinkPicc" <img src="../../assets/images/midSevenIcon.png" alt="error" class="midIconLinkPicc"

View File

@ -9,7 +9,7 @@
<div class="modal-body-left"> <div class="modal-body-left">
<input <input
type="file" type="file"
accept="image/jpeg" accept="image/jpeg,image/png"
style="display: none" style="display: none"
ref="fileInput" ref="fileInput"
@change="handleFileChange" @change="handleFileChange"
@ -60,10 +60,32 @@ import faceListShowPic from "@/views/updateFace/faceListShowPic.vue";
const validationRules = { const validationRules = {
name: [ name: [
{required: true, message: '人员名称不能为空', trigger: 'blur'}, {required: true, message: '人员名称不能为空', trigger: 'blur'},
{min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur'} {min: 2, max: 20, message: '用户名称长度必须介于 2 和 4 之间', trigger: 'blur'},
{
validator: (rule, value, callback) => {
const chineseNamePattern = /^[\u4e00-\u9fa5]{2,4}$/;
if (!chineseNamePattern.test(value)) {
callback(new Error('姓名只能包含中文字符'));
} else {
callback();
}
},
trigger: 'blur'
}
], ],
idCardNumber: [ idCardNumber: [
{required: true, message: '人员身份证号不能为空', trigger: 'blur'} {required: true, message: '人员身份证号不能为空', trigger: 'blur'},
{
validator: (rule, value, callback) => {
const idCardPattern = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[\dXx]$/;
if (!idCardPattern.test(value)) {
callback(new Error('身份证号码格式不正确'));
} else {
callback();
}
},
trigger: 'blur'
}
], ],
sex: [ sex: [
{required: true, message: '请选择性别', trigger: 'change'} {required: true, message: '请选择性别', trigger: 'change'}
@ -145,7 +167,6 @@ export default {
}); });
}, },
close() { close() {
faceListShowPic.methods.getList();
this.visible = false; this.visible = false;
this.$emit('input', this.visible); this.$emit('input', this.visible);
}, },

View File

@ -1,8 +1,7 @@
<template> <template>
<div class="faceListResWatchBox"> <div class="body-container">
<img src="../../assets/images/resultHeader.png" alt="error" class="faceListResWatchPic"> <table class="mian">
<table class="faceListResWatchTable"> <thead class="thead-dark">
<thead>
<tr class="faceListResWatchRow"> <tr class="faceListResWatchRow">
<th class="faceListResWatchColume faceListResWatchColumeSort">序号</th> <th class="faceListResWatchColume faceListResWatchColumeSort">序号</th>
<th class="faceListResWatchColume faceListResWatchColumeIPAddr">访问地址</th> <th class="faceListResWatchColume faceListResWatchColumeIPAddr">访问地址</th>
@ -39,6 +38,13 @@ export default {
display: none; display: none;
} }
.mian {
width: 100%;
height: 100%;
display: flex;
flex-direction: column
}
/* Firefox */ /* Firefox */
html { html {
scrollbar-width: none; scrollbar-width: none;
@ -49,19 +55,22 @@ html {
* { * {
-ms-overflow-style: none; -ms-overflow-style: none;
} }
.faceListResWatchBox { .faceListResWatchBox {
padding-left: 1.25rem; padding-left: 1.25rem;
padding-right: 1.25rem; padding-right: 1.25rem;
position: relative; position: relative;
} }
tbody { tbody {
height: 14.5rem; width: 100%;
height: 100%;
overflow: auto; overflow: auto;
display: block; display: block;
scroll-behavior: smooth; scroll-behavior: smooth;
} }
.faceListResWatchPic { .faceListResWatchPic {
width: 100%; width: 100%;
height: 3.0625rem; height: 3.0625rem;
@ -103,7 +112,6 @@ tbody {
} }
.faceListResWatchColumeSort { .faceListResWatchColumeSort {
flex: 1 flex: 1
} }
@ -114,10 +122,6 @@ tbody {
flex: 2 flex: 2
} }
.faceListResWatchColumeDate {
/* border: #2f6ca2 1px solid; */
flex: 2
}
.faceListResWatchColumeTime { .faceListResWatchColumeTime {
/* border: #530303 1px solid; */ /* border: #530303 1px solid; */

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="faceListRecoResultBox"> <div class="body-container">
<img src="../../assets/images/resultHeader.png" alt="error" class="faceListRecoResultPic"> <table class="mian">
<table class="faceListRecoResultTable">
<thead> <thead>
<tr class="faceListRecoResultRow"> <tr class="faceListRecoResultRow">
<th class="faceListRecoResultColume faceListRecoResultColumeSort">序号</th> <th class="faceListRecoResultColume faceListRecoResultColumeSort">序号</th>
@ -39,6 +38,13 @@ export default {
display: none; display: none;
} }
.mian {
width: 100%;
height: 100%;
display: flex;
flex-direction: column
}
/* Firefox */ /* Firefox */
html { html {
scrollbar-width: none; scrollbar-width: none;
@ -69,7 +75,7 @@ html {
} }
tbody { tbody {
height: 14.5rem; height: 100%;
overflow: auto; overflow: auto;
display: block; display: block;
scroll-behavior: smooth; scroll-behavior: smooth;
@ -106,7 +112,6 @@ tbody {
} }
.faceListRecoResultColumeSort { .faceListRecoResultColumeSort {
flex: 1 flex: 1
} }

View File

@ -2,7 +2,7 @@
<div class="body-container"> <div class="body-container">
<div class="content"> <div class="content">
<div class="face_img" v-for="(item, index) in faceList" :key="index"> <div class="face_img" v-for="(item, index) in faceList" :key="index">
<img :src="'http://127.0.0.1:9300/'+item.faceAddress" class="face_img" alt="">/> <img :src="'http://192.168.0.56:18093/'+item.faceAddress" class="face_img" alt="">/>
</div> </div>
</div> </div>
</div> </div>

View File

@ -59,7 +59,7 @@
<div class="bottom-right-content"> <div class="bottom-right-content">
<img <img
v-if="faceUrl" v-if="faceUrl"
:src="'http://127.0.0.1:9300/'+faceUrl" :src="'http://192.168.0.56:18093/'+faceUrl"
class="avatar" class="avatar"
alt="Avatar" alt="Avatar"
/> />
@ -85,7 +85,6 @@
import addFace from "@/views/updateFace/addFace.vue"; import addFace from "@/views/updateFace/addFace.vue";
import {recognition} from '@/api/updateFace/updateFace' import {recognition} from '@/api/updateFace/updateFace'
import faceListShowPic from "@/views/updateFace/faceListShowPic.vue"; import faceListShowPic from "@/views/updateFace/faceListShowPic.vue";
export default { export default {
components: { components: {
addFace addFace
@ -101,9 +100,10 @@ export default {
}, },
watch: { watch: {
showModal(val) { showModal(val) {
/* if (!val) { console.log(val)
if (!val) {
faceListShowPic.methods.getList(); faceListShowPic.methods.getList();
}*/ }
} }
}, },
methods: { methods: {
@ -126,6 +126,7 @@ export default {
this.showModal = true this.showModal = true
}, },
handleVisibleChange(newVal) { handleVisibleChange(newVal) {
console.log(newVal);
this.showModal = newVal; this.showModal = newVal;
}, },
selectFile() { selectFile() {