Parcourir la source

增加电子围栏绘制中的提示

louhangfei il y a 2 ans
Parent
commit
34f1f1bb0d

+ 1 - 1
src/api/camera/camera-preview.ts

@@ -276,7 +276,7 @@ export const cameraMoveApi = (data: CameraMoveParam) => {
 interface SaveCameraParams {
   startTime: string;
   endTime: string;
-  imageResolution: string;
+  imageResolution: number;
   recordPeriod: number;
   /** 这个要调整一下 */
   reservation: string;

+ 1 - 1
src/views/cameras/preview/CameraPreview.vue

@@ -22,7 +22,7 @@
 </script>
 <style lang="scss" scoped>
   .cameraView {
-    width: 800px;
+    // width: 800px;
     // height: 400px;
     // border: 1px solid #ccc;
   }

+ 1 - 1
src/views/cameras/preview/components/AlgorithmsSetting/AlgorithmsSetting.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div style="font-size: 12px; font-weight: bold">算法配置</div>
+    <div style="font-size: 14px; font-weight: bold">算法配置</div>
     <div style="display: flex">
       <div class="algoTagWrapper">
         <AddAlgoDialog />

+ 5 - 1
src/views/cameras/preview/components/CameraParams/CameraParams.vue

@@ -1,4 +1,5 @@
 <template>
+  <div class="cameraParamTitle">相机参数设置</div>
   <el-form :model="cameraDetailStore" label-width="130px" lable-position="left">
     <el-form-item label="分辨率:">
       <el-select
@@ -75,7 +76,7 @@
       startTime,
       endTime,
       cameraId: cameraDetailStore.cameraId,
-    }).then((res) => {
+    }).then(() => {
       ElMessage.success('保存成功');
     });
   };
@@ -86,4 +87,7 @@
     /* text-align: center; */
     margin-left: 2px;
   }
+  .cameraParamTitle {
+    font-weight: bold;
+  }
 </style>

+ 15 - 0
src/views/cameras/preview/components/FenceToolbar/FenceToolbar.vue

@@ -5,6 +5,9 @@
     <ElButton type="primary" size="small" @click="toggleEdit">{{
       props.isEdit ? '退出编辑' : '编辑'
     }}</ElButton>
+    <div class="fenceDrawingTip" v-if="isEdit"
+      >{{ cameraAlgoStore.selectedAlgoDetail?.algoInfo?.name }}算法绘制中</div
+    >
   </div>
 </template>
 <script setup lang="ts">
@@ -13,6 +16,9 @@
   import ToolbarIcon from '../ToolbarIcon/ToolbarIcon.vue';
   import saveIcon from '@/assets/images/camera/save.png';
   import deleteIcon from '@/assets/images/camera/delete.png';
+  import useCameraAlgoStore from '../../store/useCameraAlgoStore';
+
+  const cameraAlgoStore = useCameraAlgoStore();
 
   const props = defineProps<{ isEdit: boolean }>();
 
@@ -36,4 +42,13 @@
     padding: 5px 30px;
     border-radius: 50px;
   }
+  .fenceDrawingTip {
+    background: #e6f4ff;
+    border-radius: 6px;
+    border: 1px solid #bae0ff;
+    text-align: center;
+    font-size: 12px;
+    padding: 2px 40px;
+    margin-left: 50px;
+  }
 </style>