2545307760@qq.com hai 3 días
pai
achega
a131939cde

+ 4 - 1
server/api/v1/devices/captureVehicles.go

@@ -1,6 +1,7 @@
 package devices
 
 import (
+	"fmt"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
 	"server/global"
@@ -17,10 +18,12 @@ func (cva *CaptureVehiclesApi) QueryCaptureVehiclesList(c *gin.Context) {
 		response.FailWithMessage("参数错误", c)
 		return
 	}
+	fmt.Println(info)
 	list, total, err := captureVehiclesService.QueryCaptureVehiclesList(info)
+	fmt.Println(list)
 	if err != nil {
 		global.GVA_LOG.Error("查询失败", zap.Error(err))
-		response.FailWithMessage("查询失败", c)
+		response.FailWithMessage(" 查询失败", c)
 		return
 	}
 	response.OkWithDetailed(response.PageResult{

+ 1 - 2
server/initialize/router.go

@@ -102,15 +102,14 @@ func Routers() *gin.Engine {
 		systemRouter.InitSysDictionaryDetailRouter(PrivateGroup) // 字典详情管理
 		systemRouter.InitAuthorityBtnRouterRouter(PrivateGroup)  // 字典详情管理
 		systemRouter.InitStreamRouter(PrivateGroup, PublicGroup)
-
 		exampleRouter.InitFileUploadAndDownloadRouter(PrivateGroup)
-
 		projectRouter.InitProjectRouter(PrivateGroup) //注册项目管理路由
 		devicesRouter.InitScreensRouter(PrivateGroup) //注册设备管理路由
 		devicesRouter.InitProgramRouter(PrivateGroup)
 		devicesRouter.InitSoundPeriodRouter(PrivateGroup)
 		devicesRouter.InitVoiceRouter(PrivateGroup)
 		devicesRouter.InitCameraRouter(PrivateGroup, PublicGroup)
+		devicesRouter.InitCaptureVehiclesRouter(PrivateGroup, PublicGroup)
 	}
 
 	global.GVA_LOG.Info("router register success")

+ 0 - 3
server/router/devices/captureVehicles.go

@@ -12,9 +12,6 @@ func (cvr *CaptureVehiclesRouter) InitCaptureVehiclesRouter(Router *gin.RouterGr
 	captureVehiclesRouter := Router.Group("captureVehicles")
 	//captureVehiclesPubRouter := PubRouter.Group("captureVehicles")
 	CaptureVehiclesApi := v1.ApiGroupApp.DevicesApiGroup.CaptureVehiclesApi
-	{
-	}
-
 	{
 		captureVehiclesRouter.POST("queryCaptureVehiclesList", CaptureVehiclesApi.QueryCaptureVehiclesList)
 	}

+ 1 - 0
server/router/devices/enter.go

@@ -6,4 +6,5 @@ type RouterGroup struct {
 	SoundPeriodRouter
 	VoiceRouter
 	CameraRouter
+	CaptureVehiclesRouter
 }

+ 9 - 0
web/src/api/vehicle.js

@@ -0,0 +1,9 @@
+import service from '@/utils/request'
+// @Router /authority/getAuthorityList [post]
+export const getSnapshotList = (data) => {
+  return service({
+    url: '/captureVehicles/queryCaptureVehiclesList',
+    method: 'post',
+    data
+  })
+}

BIN=BIN
web/src/assets/preview/绿湘AA29059.jpg


BIN=BIN
web/src/assets/preview/绿湘FF18509.jpg


BIN=BIN
web/src/assets/preview/绿湘FFA6608.jpg


BIN=BIN
web/src/assets/preview/蓝湘F7UV77.jpg


BIN=BIN
web/src/assets/preview/蓝湘F92UPI.jpg


BIN=BIN
web/src/assets/preview/蓝湘FFV575.jpg


BIN=BIN
web/src/assets/preview/蓝湘FLQ698.jpg


+ 8 - 7
web/src/view/vehicle/component/chart.vue

@@ -33,37 +33,38 @@ const option = {
     {
       name: '客车',
       type: 'line',
-      data: [120, 132, 101, 134, 90, 230, 210, 101]
+      data: [497, 416, 18, 55, 74, 295, 93, 459, 323, 229, 122, 487, 432, 255, 35, 307, 298, 67, 57]
     },
     {
       name: '货车',
       type: 'line',
-      data: [220, 182, 191, 234, 290, 330, 310, 241]
+      data: [389, 190, 110, 394, 44, 384, 122, 166, 166, 188, 164, 236, 117, 393, 497, 334, 161, 32, 15]
     },
     {
       name: '轿车',
       type: 'line',
-      data: [150, 232, 201, 154, 190, 330, 410, 963]
+      data: [160, 21, 36, 370, 116, 261, 304, 420, 262, 440, 298, 174, 251, 51, 471, 220, 36, 20, 10]
     },
     {
       name: '工程车',
       type: 'line',
-      data: [320, 332, 301, 334, 390, 330, 320, 148]
+      data: [311, 448, 270, 185, 87, 26, 88, 284, 485, 497, 398, 39, 13, 181, 294, 31, 5, 0, 0
+      ]
     },
     {
       name: '卡车',
       type: 'line',
-      data: [820, 932, 901, 934, 1290, 1330, 1320, 674]
+      data: [364, 397, 415, 69, 115, 6, 291, 86, 311, 128, 13, 490, 39, 197, 122, 453, 51, 243, 62]
     },
     {
       name: '拖车',
       type: 'line',
-      data: [98, 92, 701, 964, 670, 1260, 1450, 196]
+      data: [37, 68, 272, 63, 473, 402, 206, 490, 305, 497, 86, 174, 15, 366, 96, 75, 21, 12, 15]
     },
     {
       name: '私家车',
       type: 'line',
-      data: [844, 456, 1250, 1450, 289, 376, 250 ]
+      data: [370, 387, 367, 117, 19, 120, 465, 84, 286, 195, 271, 367, 60, 75, 396, 119, 163, 359, 140]
     }
   ]
 }

+ 42 - 4
web/src/view/vehicle/vehicle.vue

@@ -128,7 +128,9 @@
     >
       <Chart />
     </el-dialog>
-    <el-dialog>
+    <el-dialog v-model="imageShow" title="抓拍预览">
+      <div style="height: 20px">
+      </div>
       <el-image
         :src="filePath"
         alt="Preview"
@@ -138,9 +140,18 @@
 </template>
 
 <script setup>
+
 import { Search, Monitor, Notebook } from '@element-plus/icons-vue'
-import { reactive, ref } from 'vue'
+import { reactive, ref, onMounted } from 'vue'
 import Chart from '@/view/vehicle/component/chart.vue'
+import { getSnapshotList } from '@/api/vehicle'
+import image1 from '@/assets/preview/绿湘AA29059.jpg'
+import image2 from '@/assets/preview/绿湘FF18509.jpg'
+import image3 from '@/assets/preview/绿湘FFA6608.jpg'
+import image4 from '@/assets/preview/蓝湘F7UV77.jpg'
+import image5 from '@/assets/preview/蓝湘F92UPI.jpg'
+import image6 from '@/assets/preview/蓝湘FFV575.jpg'
+import image7 from '@/assets/preview/蓝湘FLQ698.jpg'
 const chartShow = ref(false)
 const vehicleList = reactive([
   {
@@ -195,15 +206,30 @@ const vehicleList = reactive([
 ])
 const fileTotal = ref(10)
 const filePath = ref('')
-const dateValue = ref('')
 const condition = reactive({
   code: '',
   date: '',
   licensePlate: '',
   vehicleType: ''
 })
+const imageShow = ref(false)
+const imageList = [
+  { label: '绿湘AA29059', value: image1 },
+  { label: '绿湘FF18509', value: image2 },
+  { label: '绿湘FFA6608', value: image3 },
+  { label: '蓝湘F7UV77', value: image4 },
+  { label: '蓝湘F92UPI', value: image5 },
+  { label: '蓝湘FFV575', value: image6 },
+  { label: '蓝湘FLQ698', value: image7 }
+]
 const openPreview = (val) => {
-  console.log(val)
+  console.log(val.licensePlate)
+  imageShow.value = true
+  imageList.forEach(item => {
+    if (item.label === val.licensePlate) {
+      filePath.value = item.value
+    }
+  })
 }
 
 const changePage = (page) => {
@@ -226,6 +252,18 @@ const changeType = (e) => {
     }
   })
 }
+
+onMounted(() => {
+  const data = {
+    page: 1,
+    pageSize: 10
+  }
+  getSnapshotList(data).then(res => {
+    if (res.code === 0) {
+      console.log(res.data)
+    }
+  })
+})
 </script>
 
 <style scoped lang="scss">