From bcd6f63bb308cf5bb0c99046cd1db3751faaf14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Wed, 5 Nov 2025 11:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VideoAnalysis/Properties/launchSettings.json | 2 +- VideoAnalysis/WebUI/src/api/hTable.ts | 10 +- VideoAnalysis/WebUI/src/api/videoTask.ts | 14 +- .../WebUI/src/components/hTable/hTable.ts | 8 +- .../WebUI/src/components/hTable/index.vue | 16 +- .../WebUI/src/router/modules/home.ts | 13 +- .../WebUI/src/views/welcome/index.vue | 26 +- .../WebUI/src/views/welcome/runningTask.vue | 233 ++++++++++++++++++ .../WebUI/src/views/welcome/showTask.vue | 224 +++++++++++++---- 9 files changed, 455 insertions(+), 91 deletions(-) create mode 100644 VideoAnalysis/WebUI/src/views/welcome/runningTask.vue diff --git a/VideoAnalysis/Properties/launchSettings.json b/VideoAnalysis/Properties/launchSettings.json index 8e2ec82..78c793d 100644 --- a/VideoAnalysis/Properties/launchSettings.json +++ b/VideoAnalysis/Properties/launchSettings.json @@ -13,7 +13,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "", + "launchUrl": "/swagger/index.html", "applicationUrl": "http://*:5238", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" diff --git a/VideoAnalysis/WebUI/src/api/hTable.ts b/VideoAnalysis/WebUI/src/api/hTable.ts index 2ccdb58..8706883 100644 --- a/VideoAnalysis/WebUI/src/api/hTable.ts +++ b/VideoAnalysis/WebUI/src/api/hTable.ts @@ -9,21 +9,21 @@ export class hTableAPI { this.url = url; } PageList(data = {}) { - return http.request>("post", `api/${this.url}/PageList`, { data }); + return http.request("post", `api/${this.url}/PageList`, { data }); } Info(tag) { const pUrl = `api/${this.url}/${tag}`; let getUrl = pUrl; - return http.request>("get", getUrl); + return http.request("get", getUrl); } edit(data) { - return http.request>("post", `api/${this.url}/Edit`, { data }); + return http.request("post", `api/${this.url}/Edit`, { data }); } delete(data) { - return http.request>("post", `api/${this.url}/Del`, { data }); + return http.request("post", `api/${this.url}/Del`, { data }); } querycombo(data = {}) { - return http.request>( + return http.request( "post", `api/${this.url}/QueryCombo`, { diff --git a/VideoAnalysis/WebUI/src/api/videoTask.ts b/VideoAnalysis/WebUI/src/api/videoTask.ts index 02a1083..ff6798d 100644 --- a/VideoAnalysis/WebUI/src/api/videoTask.ts +++ b/VideoAnalysis/WebUI/src/api/videoTask.ts @@ -9,11 +9,11 @@ export interface Question { } export interface VideoKnowRes { - Theme: string; - Content: string; - KnowPoint: string; - KnowPointId: number; - QuestionArr: Question[]; + theme: string; + content: string; + knowPoint: string; + knowPointId: number; + questionArr: Question[]; startTime: number; } @@ -25,8 +25,8 @@ export interface SenseVoiceRes { export interface ShowTaskInfoRes { captions: SenseVoiceRes[]; captions1: SenseVoiceRes[]; - VideoKnows: VideoKnowRes[]; - MediaUrl: string; + videoKnows: VideoKnowRes[]; + mediaUrl: string; } export interface RowRloadResult { progress: string; diff --git a/VideoAnalysis/WebUI/src/components/hTable/hTable.ts b/VideoAnalysis/WebUI/src/components/hTable/hTable.ts index 00412b4..c351a15 100644 --- a/VideoAnalysis/WebUI/src/components/hTable/hTable.ts +++ b/VideoAnalysis/WebUI/src/components/hTable/hTable.ts @@ -303,13 +303,13 @@ export class SearchConditions { this.defaultConditions = []; this.Conditions = []; } - /** 是否显示搜索 */ + /** 是否显示搜索 [true]*/ show?: boolean; - /** 显示分页器 */ + /** 显示分页器 [true]*/ showPage?:boolean; - /** 当前页码 */ + /** 当前页码 [0]*/ PageIndex?: number; - /** 每页大小 */ + /** 每页大小 [20]*/ PageSize?: number; /** 排序字段 */ OrderBy?: string; diff --git a/VideoAnalysis/WebUI/src/components/hTable/index.vue b/VideoAnalysis/WebUI/src/components/hTable/index.vue index f32897b..bbae499 100644 --- a/VideoAnalysis/WebUI/src/components/hTable/index.vue +++ b/VideoAnalysis/WebUI/src/components/hTable/index.vue @@ -248,12 +248,9 @@ function handleResetForm() { function tableClose() { handleAddCallback(); } -function pageSizeChange(o) { - table.value.search.PageSize = o; - fetchPagedData(); -} -function pageIndexChange(o) { - table.value.search.PageIndex = o - 1; +function paginationChange(currentPage: number, pageSize: number) { + table.value.search.PageIndex = currentPage - 1; + table.value.search.PageSize = pageSize; fetchPagedData(); } @@ -375,7 +372,7 @@ function fetchPagedData() { table.value.data = res.data.map((s, i) => { return { ...s, customId: i }; }); - table.value.pageData = res.data; + table.value.pageData = res; } }); } @@ -556,13 +553,10 @@ function fetchPagedData() { " > diff --git a/VideoAnalysis/WebUI/src/router/modules/home.ts b/VideoAnalysis/WebUI/src/router/modules/home.ts index f67d017..7a131e6 100644 --- a/VideoAnalysis/WebUI/src/router/modules/home.ts +++ b/VideoAnalysis/WebUI/src/router/modules/home.ts @@ -23,11 +23,20 @@ export default { }, { path: "/welcome/showTask", - name: "ShowTask", + name: "showTask", component: () => import("@/views/welcome/showTask.vue"), + meta: { + title: "预览任务", + showLink: false + } + }, + { + path: "/welcome/runningTask", + name: "runningTask", + component: () => import("@/views/welcome/runningTask.vue"), meta: { title: "进行中任务", - showLink: VITE_HIDE_HOME === "true" ? false : true + showLink: true } } ] diff --git a/VideoAnalysis/WebUI/src/views/welcome/index.vue b/VideoAnalysis/WebUI/src/views/welcome/index.vue index db21203..ce54a5b 100644 --- a/VideoAnalysis/WebUI/src/views/welcome/index.vue +++ b/VideoAnalysis/WebUI/src/views/welcome/index.vue @@ -17,16 +17,16 @@ import { ReStart, RowRload } from "@/api/videoTask"; import { Refresh } from "@element-plus/icons-vue"; import { message } from "@/utils/message"; import { json } from "stream/consumers"; + +import { useRouter } from "vue-router"; + const ControllerName = "VideoTask"; defineOptions({ name: ControllerName, }); -const props = defineProps<{ - data: any; -}>(); - +const route = useRouter(); function searchCallback(data) {} const table = ref<{ initTable: (config: TableConfig) => void }>(); const tableData: TableConfig = intTableData({ @@ -40,6 +40,7 @@ const tableData: TableConfig = intTableData({ // 查询条件 show: true, PageSize: 10, + showPage: true, }, operationColumn: true, // 显示操作按钮 operationColumnData: [], @@ -100,6 +101,7 @@ let redisChannelEnum = ref([]); const showTable = ref(false); onMounted(async () => { //初始化数据 + tableData.column.videoType.setting.datasource = await getenum("AttachmentsInfoType"); tableData.column.lastEnum.setting.datasource = await getenum("RedisChannelEnum"); tableData.column.subject.setting.datasource = await getenum("SubjectEnum"); @@ -132,11 +134,12 @@ async function RloadTaskInfo(row: any) { element.time = formatDateToChinese( row.TaskInfo.startTime[element.title.toLowerCase()] ); - if (element.value < row.TaskInfo.lastEnum) { + let i = row.TaskInfo.stepData.indexOf(element); + if (i < row.TaskInfo.active) { element.status = "finish"; } else if (element.value == 60) { element.status = "success"; - } else if (element.value == row.TaskInfo.lastEnum) { + } else if (i == row.TaskInfo.active) { element.status = "process"; } else { element.status = "wait"; @@ -198,7 +201,16 @@ const stepData = ref([ 重试 - 预览 + 预览 diff --git a/VideoAnalysis/WebUI/src/views/welcome/runningTask.vue b/VideoAnalysis/WebUI/src/views/welcome/runningTask.vue new file mode 100644 index 0000000..823851e --- /dev/null +++ b/VideoAnalysis/WebUI/src/views/welcome/runningTask.vue @@ -0,0 +1,233 @@ + + + diff --git a/VideoAnalysis/WebUI/src/views/welcome/showTask.vue b/VideoAnalysis/WebUI/src/views/welcome/showTask.vue index 3f202a6..7def628 100644 --- a/VideoAnalysis/WebUI/src/views/welcome/showTask.vue +++ b/VideoAnalysis/WebUI/src/views/welcome/showTask.vue @@ -10,14 +10,14 @@
-
{{ getTimeRange(item) }} {{ item.Theme }}
- #{{ item.KnowPointId }} {{ item.KnowPoint }} +
{{ getTimeRange(item) }} {{ item.theme }}
+ #{{ item.knowPointId }} {{ item.knowPoint }}
-
概览: {{ item.Content }}
+
概览: {{ item.content }}

-
+

@@ -41,16 +41,16 @@
-