From f38df351ceaff41c8ab779aaef72b010f4de10a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tha=C3=ADs=20Ferreira?= Date: Thu, 6 Feb 2025 01:14:17 -0300 Subject: [PATCH] =?UTF-8?q?Vers=C3=A3o=2006/02=2001h04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 357 ++++++++++++++++----- src/components/TheWelcome.vue | 310 ++++++++---------- src/router/index.js | 13 +- src/views/ReportsView.vue | 425 +++++++++++++++++++++++-- src/views/TrainingView.vue | 156 ++++----- src/views/UserProfileView.vue | 583 +++++++++++++++++++++++++++------- 6 files changed, 1366 insertions(+), 478 deletions(-) diff --git a/src/App.vue b/src/App.vue index da12c31..106dddc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,100 +1,299 @@ + + + + \ No newline at end of file diff --git a/src/components/TheWelcome.vue b/src/components/TheWelcome.vue index fd3d2ce..30a6dba 100644 --- a/src/components/TheWelcome.vue +++ b/src/components/TheWelcome.vue @@ -1,150 +1,67 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 515e73b..7387325 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,8 +10,9 @@ import ForgotPassword from '@/views/ForgotPassword.vue'; import RegisterView from '@/views/RegisterView.vue'; import TrainingView from '@/views/TrainingView.vue'; import SSOView from '@/views/SSOView.vue'; -import UserProfileView from '@/views/UserProfileView.vue' -import EditUserView from '@/views/EditUserView.vue' +import UserProfileView from '@/views/UserProfileView.vue'; +import EditUserView from '@/views/EditUserView.vue'; +import RegisterUserCamView from '@/views/RegisterUserCamView.vue'; const routes = [ { @@ -104,6 +105,12 @@ const routes = [ requiresAuth: false } }, + { + path: '/register-user-cam', + name: 'register-user-cam', + component: RegisterUserCamView, + meta: { requiresAuth: true } + }, // Catch-all route for unmatched paths { path: '/:pathMatch(.*)*', @@ -116,4 +123,4 @@ const router = createRouter({ routes, }); -export default router; \ No newline at end of file +export default router; diff --git a/src/views/ReportsView.vue b/src/views/ReportsView.vue index 1535c45..e2310ce 100644 --- a/src/views/ReportsView.vue +++ b/src/views/ReportsView.vue @@ -1,54 +1,423 @@ + +.v-data-table :deep(th) { + font-weight: 600 !important; + background-color: rgb(var(--v-theme-surface)) !important; +} + +.v-data-table :deep(tr:hover) { + background-color: rgb(var(--v-theme-surface-variant)) !important; +} + +/* Animações */ +.v-enter-active, +.v-leave-active { + transition: opacity 0.3s ease; +} + +.v-enter-from, +.v-leave-to { + opacity: 0; +} + \ No newline at end of file diff --git a/src/views/TrainingView.vue b/src/views/TrainingView.vue index 90b4641..23f0aeb 100644 --- a/src/views/TrainingView.vue +++ b/src/views/TrainingView.vue @@ -3,51 +3,49 @@ - Cadastro Pesquisar Treino Lista de Nomes - - - - - - - - - - - - - - - - - - - - Cadastrar Modelo - - - - + + + + + + + + + + Pesquisar + + + + + {{ camera.name }} + {{ camera.id }} + {{ camera.registrationDate }} + {{ camera.isActive ? 'Ativo' : 'Inativo' }} + + + + + - + Treinamento de Modelo de Câmera @@ -80,27 +78,50 @@ + + + {{ trainingMessage }} + + + + + Informações da Câmera + +

Nome: {{ selectedCameraForTraining.name }}

+

Status do Treinamento: Concluído

+

Status da Integração: {{ integrationStatus }}

+

Tempo de Treinamento: 5 minutos

+

Tempo de Integração: 3 minutos

+
+
+
+
- + Rostos Identificados + - + mdi-account-circle - {{ face.name }} - - {{ face.isActive ? 'Ativo' : 'Inativo' }} - + {{ face.name }} + {{ face.isActive ? 'Associado' : 'Não Associado' }} + Associar @@ -108,6 +129,7 @@ +
@@ -119,15 +141,11 @@ export default { data() { return { activeTab: 0, - cameraModel: { - name: '', - id: '', - description: '', - registrationDate: null - }, searchCriteria: { id: '', - name: '' + name: '', + status: '', + order: '' }, selectedCameraForTraining: null, isTraining: false, @@ -138,45 +156,35 @@ export default { { id: 'CAM003', name: 'Câmera Estacionamento', brand: 'Dahua' } ], cameras: [ - { id: 'CAM001', name: 'Câmera Principal', description: 'Câmera frontal do prédio', isActive: true, registrationDate: '2025-02-03T08:30', isTrained: true }, - { id: 'CAM002', name: 'Câmera Corredor', description: 'Câmera do corredor principal', isActive: false, registrationDate: '2025-01-28T14:00', isTrained: false } + { id: 'CAM001', name: 'Câmera Principal', description: 'Câmera frontal do prédio', isActive: true, registrationDate: '2025-02-03T 08:30', isTrained: true }, + { id: 'CAM002', name: 'Câmera Corredor', description: 'Câmera do corredor principal', isActive: false, registrationDate: '2025-01-28T 14:00', isTrained: false } ], searchResults: [], + selectedFaceStatus: 'Associado', identifiedFaces: [ - { - id: 'USER001', - name: 'João Silva', - isActive: true - }, - { - id: 'USER002', - name: 'Maria Souza', - isActive: true - } + { id: 'USER001', name: 'João Silva', isActive: true }, + { id: 'USER002', name: 'Maria Souza', isActive: true } ], unidentifiedFaces: [ - { selectedUser: null }, - { selectedUser: null } + { selectedUser: null, name: 'Desconhecido' }, + { selectedUser: null, name: 'Desconhecido' } ], - registeredUsers: ['João Silva', 'Maria Souza', 'Pedro Santos', 'Ana Oliveira'] + registeredUsers: ['João Silva', 'Maria Souza', 'Pedro Santos', 'Ana Oliveira'], + integrationStatus: 'Pendente', }; }, methods: { - registerCameraModel() { - console.log('Registrando modelo de câmera:', this.cameraModel); - this.cameraModel = { - name: '', - id: '', - description: '', - registrationDate: null - }; - }, searchCameraModels() { - console.log('Critérios de pesquisa:', this.searchCriteria); this.searchResults = this.cameras.filter(camera => (camera.id.includes(this.searchCriteria.id) || camera.name.includes(this.searchCriteria.name)) && (!this.searchCriteria.status || (this.searchCriteria.status === 'Ativo' && camera.isActive) || (this.searchCriteria.status === 'Inativo' && !camera.isActive)) ); + + if (this.searchCriteria.order === 'A-Z') { + this.searchResults.sort((a, b) => a.name.localeCompare(b.name)); + } else if (this.searchCriteria.order === 'Z-A') { + this.searchResults.sort((a, b) => b.name.localeCompare(a.name)); + } }, startTraining() { if (this.selectedCameraForTraining) { @@ -210,16 +218,22 @@ export default { } }, integrateModel() { - console.log('Integrando modelo:', this.selectedCameraForTraining); - this.trainingComplete = false; - this.isTraining = false; - }, - confirmAssignments() { - console.log('Atribuições confirmadas:', this.unidentifiedFaces); + this.integrationStatus = 'Em andamento...'; + setTimeout(() => { + this.integrationStatus = 'Concluído'; + }, 3000); }, editFaceName(face) { console.log('Editando rosto:', face); + face.isActive = true; + }, + }, + computed: { + filteredFaces() { + return this.selectedFaceStatus === 'Associado' ? + this.identifiedFaces.filter(face => face.isActive) : + this.unidentifiedFaces.filter(face => !face.isActive); } } } - + \ No newline at end of file diff --git a/src/views/UserProfileView.vue b/src/views/UserProfileView.vue index 386076f..ca6826b 100644 --- a/src/views/UserProfileView.vue +++ b/src/views/UserProfileView.vue @@ -1,144 +1,501 @@ + \ No newline at end of file