From 236a0b8334dfa75685c7ee69619d8e76536ba666 Mon Sep 17 00:00:00 2001
From: sd <shidong@jhsoft.cc>
Date: 星期五, 01 八月 2025 14:58:10 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.6:8080/vue-smart-ai

---
 src/api/task.ts                           |    8 +++++++-
 src/assets/img/modelTraining.png          |    0 
 src/components/subComponents/CardItem.vue |   26 ++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/src/api/task.ts b/src/api/task.ts
index 0e02f98..db5a5d9 100644
--- a/src/api/task.ts
+++ b/src/api/task.ts
@@ -57,7 +57,13 @@
     data: params
   });
 };
-
+export const insertModelTraining = (params: any) => {
+  return request({
+    url: "/api-v1/v1/train/add ",
+    method: "post",
+    data: params
+  });
+};
 export const initCaptureData = (params: any) => {//瀹炴椂鎶撴媿鏁版嵁鍒楄〃
   return request({
     url: "/data/api-v/realTime/initForCaptureData",
diff --git a/src/assets/img/modelTraining.png b/src/assets/img/modelTraining.png
new file mode 100644
index 0000000..6081710
--- /dev/null
+++ b/src/assets/img/modelTraining.png
Binary files differ
diff --git a/src/components/subComponents/CardItem.vue b/src/components/subComponents/CardItem.vue
index fff7e16..9bb2319 100644
--- a/src/components/subComponents/CardItem.vue
+++ b/src/components/subComponents/CardItem.vue
@@ -416,6 +416,15 @@
           <img src="@/assets/img/article-fill@1x.png" >
             <!-- <i class="iconfont iconcaidan" @click="detailsClick($event)"></i> -->
           </el-tooltip>
+          <el-dropdown size="small"  style="margin-left: 10px;"  @command="handleCommand" >
+            <img src="@/assets/img/modelTraining.png"  style="height: 15px;width: 14px">
+
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item  :command="{ ruleName: data.rule_names[0].fileName, cameraId: data.video_point_id+'', cameraName: data.video_name,imagePath:data.image_path,status:1 }">姝g‘</el-dropdown-item>
+              <el-dropdown-item :command="{ ruleName: data.rule_names[0].fileName, cameraId: data.video_point_id+'', cameraName: data.video_name,imagePath:data.image_path,status:2 }">閿欒</el-dropdown-item>
+              <el-dropdown-item :command="{ ruleName: data.rule_names[0].fileName, cameraId: data.video_point_id+'', cameraName: data.video_name,imagePath:data.image_path,status:0 }">涓嶇‘瀹�</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
           <!-- <el-tooltip content="璇︽儏" placement="top" popper-class="atooltip">
             <i class="iconfont iconcaidan" @click="detailsClick($event)"></i>
           </el-tooltip> -->
@@ -783,6 +792,7 @@
 
 <script>
 import { collect } from "@/api/search";
+import {insertModelTraining} from "@/api/task";
 
 Date.prototype.Format = function (fmt) {
   var o = {
@@ -891,6 +901,22 @@
     },
   },
   methods: {
+    handleCommand(command) {
+      console.log(JSON.stringify(command))
+      insertModelTraining(JSON.stringify(command)).then((res) => {
+        if (res && res.status === 200) {
+          this.$notify({
+            type: "success",
+            message: "娣诲姞鎴愬姛",
+          });
+        } else {
+          this.$notify({
+            type: "error",
+            message: "娣诲姞澶辫触锛�",
+          });
+        }
+      });
+    },
     getBottom() {
       this.$nextTick(() => {
         let imgDom = this.$refs.firstImg;

--
Gitblit v1.8.0