<script setup lang="ts">
import ahTable from "@/components/hTable/index.vue";
import {
  ComboModel,
  ConditionalType,
  intTableData,
  SearchConditions,
  TableColumnSearch,
  TableConfig,
} from "@/components/hTable/hTable";
import { onMounted, ref } from "vue";
import { getenum } from "@/api/enum";
import { ElMessage } from "element-plus";
import { ReStart, RowRload, RunningTaskList } from "@/api/videoTask";
import { Refresh } from "@element-plus/icons-vue";
import { message } from "@/utils/message";
import videoTask from "./index.vue";

defineOptions({
  name: `runningTask`,
});
async function searchCallback(s: SearchConditions, tv: TableConfig): Promise<boolean> {
  //自定义搜索回调函数
  let res = await RunningTaskList(s);
  tv.data = res.data.map((s, i) => {
    return { ...s, customId: i };
  });
  tv.pageData = res;
  return true;
  //返回true则不调用基础搜索API
}
onMounted(async () => {
  //初始化数据
});
</script>

<template>
  <div>
    <videoTask :searchCallback="searchCallback"></videoTask>
  </div>
</template>
