From cdddff9312554b48ad44a1c63ff187af4c74fe68 Mon Sep 17 00:00:00 2001
From: wangrong <wangrong@shsening.com>
Date: 星期一, 10 八月 2026 18:52:36 +0800
Subject: [PATCH] 增加监控点每日抓图

---
 src/modules/monitor/views/capturetask.vue |  183 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 183 insertions(+), 0 deletions(-)

diff --git a/src/modules/monitor/views/capturetask.vue b/src/modules/monitor/views/capturetask.vue
new file mode 100644
index 0000000..35b663f
--- /dev/null
+++ b/src/modules/monitor/views/capturetask.vue
@@ -0,0 +1,183 @@
+<template>
+	<cl-crud ref="Crud">
+		<cl-row>
+			<!-- 鍒锋柊鎸夐挳 -->
+			<cl-refresh-btn />
+			<!-- 鏂板鎸夐挳 -->
+			<cl-add-btn />
+			<!-- 鍒犻櫎鎸夐挳 -->
+			<cl-multi-delete-btn />
+			<cl-flex1 />
+			<!-- 鏉′欢鎼滅储 -->
+			<cl-search ref="Search" />
+		</cl-row>
+
+		<cl-row>
+			<!-- 鏁版嵁琛ㄦ牸 -->
+			<cl-table ref="Table" />
+		</cl-row>
+
+		<cl-row>
+			<cl-flex1 />
+			<!-- 鍒嗛〉鎺т欢 -->
+			<cl-pagination />
+		</cl-row>
+
+		<!-- 鏂板銆佺紪杈� -->
+		<cl-upsert ref="Upsert" />
+	</cl-crud>
+</template>
+
+<script lang="ts" setup>
+	defineOptions({
+		name: "monitor-capturetask"
+	});
+
+	import { useCrud, useTable, useUpsert, useSearch } from "@cool-vue/crud";
+	import { useCool } from "/@/cool";
+	import { useI18n } from "vue-i18n";
+	import { reactive } from "vue";
+
+	const { service } = useCool();
+	const { t } = useI18n();
+
+	// 閫夐」
+	const options = reactive({
+		status: [
+			{ label: t('PENDING'), value: 0 },
+			{ label: t('SUCCESS'), value: 1 },
+			{ label: t('FAILED'), value: 2 }
+		]
+	});
+
+	// cl-upsert
+	const Upsert = useUpsert({
+		items: [
+			{
+				label: t('璁惧搴忓垪鍙�'),
+				prop: "deviceSerial",
+				component: { name: "el-input", props: { clearable: true } },
+				span: 12,
+				required: true
+			},
+			{
+				label: t('閫氶亾鍙�'),
+				prop: "channelNo",
+				hook: "number",
+				component: { name: "el-input-number", props: { min: 0 } },
+				span: 12,
+				required: true
+			},
+			{
+				label: t('閫夋嫨鎶撳浘浠诲姟'),
+				prop: "captureTaskId",
+				component: { name: "el-input", props: { clearable: true } },
+				span: 12
+			},
+			{
+				label: t('閫夋嫨浜戠┖闂�'),
+				prop: "spaceId",
+				component: { name: "el-input", props: { clearable: true } },
+				span: 12
+			},
+			{
+				label: t('浜戠┖闂村浘鐗囬摼鎺�'),
+				prop: "cloudUrl",
+				component: { name: "cl-upload" }
+			},
+			{ label: t('鏈湴鍥剧墖閾炬帴'), prop: "localUrl", component: { name: "cl-upload" } },
+			{
+				label: t('鏈湴瀛樺偍璺緞'),
+				prop: "localPath",
+				component: { name: "el-input", props: { clearable: true } },
+				span: 12
+			},
+			{
+				label: t('鎶撴媿鐘舵��'),
+				prop: "status",
+				component: { name: "el-radio-group", options: options.status },
+				value: 0,
+				required: true
+			},
+			{
+				label: t('浠诲姟鎵ц鏃ユ湡'),
+				prop: "captureDate",
+				component: {
+					name: "el-date-picker",
+					props: { type: "date", valueFormat: "YYYY-MM-DD" }
+				},
+				span: 12
+			}
+		]
+	});
+
+	// cl-table
+	const Table = useTable({
+		columns: [
+			{ type: "selection" },
+			{ label: t('璁惧搴忓垪鍙�'), prop: "deviceSerial", minWidth: 140 },
+			{ label: t('閫氶亾鍙�'), prop: "channelNo", minWidth: 140, sortable: "custom" },
+			{ label: t('鎶撳浘浠诲姟ID'), prop: "captureTaskId", minWidth: 140 },
+			{ label: t('浜戠┖闂碔D'), prop: "spaceId", minWidth: 140 },
+			{
+				label: t('浜戠┖闂村浘鐗囬摼鎺�'),
+				prop: "cloudUrl",
+				minWidth: 100,
+				component: { name: "cl-image", props: { size: 60 } }
+			},
+			{
+				label: t('鏈湴鍥剧墖閾炬帴'),
+				prop: "localUrl",
+				minWidth: 100,
+				component: { name: "cl-image", props: { size: 60 } }
+			},
+			{ label: t('鏈湴瀛樺偍璺緞'), prop: "localPath", minWidth: 140 },
+			{
+				label: t('鎶撴媿鐘舵��'),
+				prop: "status",
+				minWidth: 120,
+				dict: options.status
+			},
+			{
+				label: t('浠诲姟鎵ц鏃ユ湡'),
+				prop: "captureDate",
+				minWidth: 140,
+				sortable: "custom",
+				component: { name: "cl-date-text", props: { format: "YYYY-MM-DD" } }
+			},
+			{
+				label: t('鍒涘缓鏃堕棿'),
+				prop: "createTime",
+				minWidth: 170,
+				sortable: "desc",
+				component: { name: "cl-date-text" }
+			},
+			{
+				label: t('鏇存柊鏃堕棿'),
+				prop: "updateTime",
+				minWidth: 170,
+				sortable: "custom",
+				component: { name: "cl-date-text" }
+			},
+			{ type: "op", buttons: ["edit", "delete"] }
+		]
+	});
+
+	// cl-search
+	const Search = useSearch();
+
+	// cl-crud
+	const Crud = useCrud(
+		{
+			service: service.monitor.capturetask
+		},
+		(app) => {
+			app.refresh();
+		}
+	);
+
+	// 鍒锋柊
+	function refresh(params?: any) {
+		Crud.value?.refresh(params);
+	}
+</script>
\ No newline at end of file

--
Gitblit v1.9.1