123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808 |
- <!--
- @Date: 2024-10-29
- @Author: ©WANGKANG
- @Email: 1686617586@qq.com
- -->
- <template>
- <div class="table-box">
- <ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listTrackSequenceApi">
- <!-- 表格 header 按钮 -->
- <template #tableHeader="scope">
- <el-button type="primary" v-auth="['demo:trackSequence:add']" icon="CirclePlus" @click="openDialog(1, '注视轨迹序列新增')">
- 新增(MASC)
- </el-button>
- <el-button type="primary" v-auth="['demo:trackSequence:add']" icon="CirclePlus" @click="addCATDialog()"> 新增(CAT) </el-button>
- <!-- <el-button type="primary" v-auth="['demo:trackSequence:import']" icon="Upload" plain @click="batchAdd"> 导入 </el-button>
- <el-button type="primary" v-auth="['demo:trackSequence:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button> -->
- <el-button
- type="danger"
- v-auth="['demo:trackSequence:remove']"
- icon="Delete"
- plain
- :disabled="!scope.isSelected"
- @click="batchDelete(scope.selectedListIds)"
- >
- 批量删除
- </el-button>
- </template>
- <!-- 表格操作 -->
- <template #operation="scope">
- <el-button type="primary" link icon="View" v-if="scope.row.algorithmModelId != null" @click="openModelDialog(scope.row.id)">
- <!--@click="openStartDialog(scope.row)" -->
- 详情
- </el-button>
- <el-button
- type="primary"
- link
- icon="View"
- v-auth="['demo:trackSequence:start']"
- v-if="scope.row.status == '0' || scope.row.status == '3' || scope.row.status == '4'"
- @click="startTrackSequence(scope.row)"
- >
- 开始
- </el-button>
- <el-popconfirm title="确定终止此任务吗?" @confirm="stopTrackSequence(scope.row)" v-if="scope.row.status == '1'">
- <template #reference>
- <el-button type="primary" link icon="Delete"> 终止</el-button>
- </template>
- </el-popconfirm>
- <el-button
- type="primary"
- link
- icon="View"
- v-auth="['demo:toInfrared:query']"
- @click="viewLogRef.handleOpen(scope.row.id)"
- v-if="scope.row.status != '0'"
- >
- 日志
- </el-button>
- <el-button
- type="primary"
- link
- icon="View"
- v-auth="['demo:trackSequence:download']"
- v-if="scope.row.status == '2'"
- @click="dowloadTrackSequence(scope.row)"
- >
- 下载
- </el-button>
- <el-button
- type="primary"
- link
- icon="View"
- v-if="scope.row.status == '2' && scope.row.type === AlgorithmType2['预测/推理']"
- @click="showEvaluate(scope.row)"
- >
- 评估
- </el-button>
- <el-button
- type="primary"
- link
- icon="View"
- v-auth="['demo:ToInfrared:download']"
- v-if="scope.row.status == '2' && scope.row.type == AlgorithmType2['训练']"
- @click="showModelDialog(scope.row.id)"
- >
- 模型
- </el-button>
- <!-- <el-button type="primary" link icon="View" v-auth="['demo:toInfrared:query']" @click="openDialog(3, '查看', scope.row)"> 查看 </el-button> -->
- <!-- <el-button type="primary" link icon="EditPen"v-auth="['demo:toInfrared:edit']" @click="openDialog(2, '编辑', scope.row)"> 编辑 </el-button> -->
- <el-button
- type="primary"
- link
- icon="Delete"
- v-auth="['demo:toInfrared:remove']"
- @click="deleteTrackSequence(scope.row)"
- :disabled="scope.row.status == '1'"
- >
- 删除
- </el-button>
- </template>
- </ProTable>
- <FormDialog ref="formDialogRef" />
- <ImportExcel ref="dialogRef" />
- <ViewLog ref="viewLogRef" :get-log-api="getLogTrackSequenceApi" />
- <el-dialog v-model="showModelDialogVisible" title="模型列表" width="1000">
- <el-scrollbar ref="scrollbarRef" id="scrollbarRef1" height="500px">
- <template v-for="model in model_list" :key="model">
- <el-card style="width: 100%; margin-bottom: 10px">
- <el-form label-width="130px" label-position="left">
- <el-form-item label="Model Name">
- {{ model.name }}
- </el-form-item>
- <el-form-item label="Model Path">
- {{ model.path }}
- </el-form-item>
- <el-form-item label="Model Size">
- {{ model.size }}
- </el-form-item>
- <el-form-item label="操作">
- <el-link :href="model.url" type="primary" icon="Download" :underline="false" target="_blank" style="margin-right: 20px"
- >下载
- </el-link>
- <el-button type="success" link @click="addModel(model.path, model.name)"
- ><el-icon><Plus /></el-icon>添加模型</el-button
- >
- </el-form-item>
- </el-form>
- </el-card>
- </template>
- </el-scrollbar>
- </el-dialog>
- </div>
- </template>
- <script setup lang="tsx" name="TrackSequence">
- import { ref, reactive, onMounted } from 'vue'
- import { useHandleData } from '@/hooks/useHandleData'
- import { useDownload } from '@/hooks/useDownload'
- import { ElMessage, ElMessageBox } from 'element-plus'
- import ProTable from '@/components/ProTable/index.vue'
- import ImportExcel from '@/components/ImportExcel/index.vue'
- import FormDialog from '@/components/FormDialog/index.vue'
- import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
- import {
- listTrackSequenceApi,
- delTrackSequenceApi,
- addTrackSequenceApi,
- updateTrackSequenceApi,
- importTemplateApi,
- importTrackSequenceDataApi,
- exportTrackSequenceApi,
- getTrackSequenceApi,
- startTrackSequenceApi,
- stopTrackSequenceApi,
- dowloadTrackSequenceApi,
- getLogTrackSequenceApi,
- getLDetailTrackSequenceApi,
- addEvaluateTrackSequenceApi,
- showCATModelApi
- } from '@/api/modules/demo/trackSequence'
- import { enumAlgorithmModelTrackApi } from '@/api/modules/demo/AlgorithmModelTrack'
- import { getAlgorithmModelTrackApi } from '@/api/modules/demo/AlgorithmModelTrack'
- import { enumAlgorithmConfigTrackApi } from '@/api/modules/demo/AlgorithmConfigTrack'
- import { listDataSeqApi } from '@/api/modules/demo/DataSeq'
- import statusEnums from '@/utils/status'
- import { AlgorithmType, SubSystem, SubSystem__, enumsAlgorithmType, enumsSubSystem, AlgorithmType2 } from '@/views/demo/utils'
- import ViewLog from '@/views/demo/components/ViewLog.vue'
- import { addAlgorithmModelTrackApi } from '@/api/modules/demo/AlgorithmModelTrack'
- import { Status } from '@/views/demo/utils'
- const timerRefreshTable = ref()
- const clearTimerRefreshTable = () => {
- if (timerRefreshTable.value) {
- clearInterval(timerRefreshTable.value)
- }
- }
- const refreshTable = () => {
- clearTimerRefreshTable()
- timerRefreshTable.value = setInterval(async () => {
- await proTable.value?.getTableList(false)
- console.log('refresh table')
- const tableData = proTable.value?.tableData
- let flag = false
- if (tableData) {
- console.log(tableData)
- for (const item of tableData) {
- if (item.status === Status['运行中']) {
- flag = true
- break
- }
- }
- }
- if (!flag) {
- clearTimerRefreshTable()
- }
- }, 7000)
- }
- const enumsAlgorithmConfigTrack_addModel____ = ref<any>([])
- const setItemsOptions222 = async () => {
- console.log('setItemsOptions222')
- const result = await enumAlgorithmConfigTrackApi()
- enumsAlgorithmConfigTrack_addModel____.value = []
- const tmp_data: any = result['data']
- for (const item of tmp_data) {
- if (item.subsystem === SubSystem__['注释轨迹序列'] && item.type === AlgorithmType2['预测/推理']) {
- item['label'] = item['label'] + '-' + SubSystem[item['subsystem']] + '-' + AlgorithmType[item['type']]
- enumsAlgorithmConfigTrack_addModel____.value.push(item)
- }
- }
- console.log(enumsAlgorithmConfigTrack_addModel____.value)
- itemsOptions = [
- {
- label: '算法',
- prop: 'algorithmId',
- rules: [{ required: true, message: '算法不能为空', trigger: 'blur' }],
- compOptions: {
- elTagName: 'select',
- placeholder: '请输入算法',
- enum: enumsAlgorithmConfigTrack_addModel____
- }
- },
- {
- label: '子系统',
- prop: 'subSystem',
- rules: [{ required: true, message: '子系统不能为空', trigger: 'blur' }],
- compOptions: {
- disabled: true,
- elTagName: 'select',
- placeholder: '请输入子系统',
- enum: enumsSubSystem
- }
- },
- {
- label: '模型名称',
- prop: 'modelName',
- rules: [{ required: true, message: '模型名称不能为空', trigger: 'blur' }],
- compOptions: {
- disabled: true,
- placeholder: '请输入模型名称'
- }
- },
- {
- label: '模型路径',
- prop: 'modelPath',
- rules: [{ required: false, message: '模型文件不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入模型名称',
- disabled: true
- }
- },
- {
- label: '备注',
- prop: 'remarks',
- rules: [{ required: false, message: '备注不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入备注'
- }
- }
- ]
- }
- const addModel = async (modelPath: string, modelName: string) => {
- console.log(modelPath, modelName)
- let res = { data: { modelPath, subSystem: SubSystem__['目标检测'], type: AlgorithmType2['预测/推理'], modelName: modelName } }
- // 重置表单
- await setItemsOptions222()
- const params = {
- title: '添加模型',
- width: 580,
- isEdit: true,
- itemsOptions: itemsOptions,
- model: res.data,
- api: addAlgorithmModelTrackApi,
- getTableList: proTable.value?.getTableList,
- closedEvent: async () => {
- await updateEnumsAlgorithmModelTrack()
- }
- }
- formDialogRef.value?.openDialog(params)
- }
- const showModelDialogVisible = ref(false)
- const model_list: Ref<any> = ref([])
- const showModelDialog = async (id: any) => {
- const res: any = await showCATModelApi(id)
- model_list.value = res.data
- showModelDialogVisible.value = true
- }
- const setItemsOptionsAddCAT = () => {
- itemsOptions = [
- {
- label: '任务名称',
- prop: 'name',
- rules: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入任务名称'
- }
- },
- {
- label: '选择数据集',
- prop: 'inputOssId',
- rules: [{ required: false, message: '数据集不能为空', trigger: 'blur' }],
- compOptions: {
- elTagName: 'select',
- placeholder: '请选择或者上传数据集',
- enum: datasetList,
- clearable: true
- }
- },
- {
- label: '上传数据集',
- prop: 'inputOssId',
- rules: [{ required: false, message: '数据集不能为空', trigger: 'blur' }],
- compOptions: {
- elTagName: 'file-upload',
- fileSize: 4096,
- fileType: ['zip'],
- placeholder: '请上传数据集'
- }
- },
- {
- label: '选择模型',
- prop: 'algorithmModelId',
- rules: [{ required: true, message: '模型不能为空', trigger: 'blur' }],
- compOptions: {
- elTagName: 'select',
- placeholder: '请选择模型',
- enum: enumsAlgorithmModelTrack_______.value
- }
- },
- {
- label: '备注',
- prop: 'remarks',
- rules: [],
- compOptions: {
- placeholder: '请输入备注'
- }
- }
- ]
- }
- const enumsAlgorithmModelTrack_______ = ref([])
- const addCATDialog = async () => {
- const result: any = await enumAlgorithmModelTrackApi()
- // console.log(result.data);
- enumsAlgorithmModelTrack_______.value = []
- for (const item of result.data) {
- if (SubSystem[item['subsystem']] === '注释轨迹序列' || SubSystem[item['subsystem']] === '目标检测') {
- item['label'] = item['label'] + '-' + SubSystem[item['subsystem']] + '-' + AlgorithmType[item['type']] + '-' + item['algorithmName']
- enumsAlgorithmModelTrack_______.value.push(item)
- }
- }
- // 重置表单
- setItemsOptionsAddCAT()
- const params = {
- title: '注释轨迹序列新增',
- width: 580,
- isEdit: true,
- itemsOptions: itemsOptions,
- model: {},
- api: addTrackSequenceApi,
- getTableList: proTable.value?.getTableList
- }
- formDialogRef.value?.openDialog(params)
- }
- const showEvaluate = (row: any) => {
- const newItem = {
- id: row.id
- }
- const enumsAlgorithmConfigTrack__: Array<any> = []
- for (const item of enumsAlgorithmConfigTrack.value) {
- if (item.subsystem === SubSystem__['注释轨迹序列'] && item.type === AlgorithmType2['测试']) {
- enumsAlgorithmConfigTrack__.push(item)
- }
- }
- itemsOptions = [
- {
- label: '任务名称',
- prop: 'name',
- rules: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入任务名称'
- }
- },
- {
- label: '选择算法',
- prop: 'algorithmId',
- rules: [{ required: true, message: '请选择算法', trigger: 'blur' }],
- compOptions: {
- disabled: false,
- elTagName: 'select',
- placeholder: '请输入算法',
- enum: enumsAlgorithmConfigTrack__
- }
- },
- {
- label: '备注',
- prop: 'remarks',
- rules: [],
- compOptions: {
- placeholder: '请输入备注'
- }
- }
- ]
- const params = {
- title: '新增评估',
- width: 580,
- isEdit: true,
- itemsOptions: itemsOptions,
- model: newItem,
- api: addEvaluateTrackSequenceApi,
- getTableList: proTable.value?.getTableList
- }
- formDialogRef.value?.openDialog(params)
- }
- const viewLogRef = ref()
- const enumsAlgorithmConfigTrack = ref<any>([])
- onMounted(async () => {
- const result = await enumAlgorithmConfigTrackApi()
- enumsAlgorithmConfigTrack.value = []
- const tmp_data: any = result['data']
- for (const item of tmp_data) {
- if (item.subsystem === SubSystem__['注释轨迹序列']) {
- item['label'] = item['label'] + '-' + SubSystem[item['subsystem']] + '-' + AlgorithmType[item['type']]
- enumsAlgorithmConfigTrack.value.push(item)
- }
- }
- })
- const openModelDialog = async id => {
- const result: any = await getLDetailTrackSequenceApi(id)
- // console.log(result.data)
- setItemsOptionsModel()
- const params = {
- title: '模型',
- width: 580,
- isEdit: false,
- itemsOptions: itemsOptions,
- model: result.data,
- api: updateTrackSequenceApi,
- getTableList: proTable.value?.getTableList
- }
- formDialogRef.value?.openDialog(params)
- }
- const startTrackSequence = async (params: any) => {
- const res: any = await startTrackSequenceApi(params.id)
- if (res.code === 200) {
- ElMessage.success('任务已开始,请等待完成!')
- } else {
- ElMessage.error('任务开始失败,请检查!')
- }
- refreshTable()
- }
- const stopTrackSequence = async (params: any) => {
- const res: any = await stopTrackSequenceApi(params.id)
- if (res.code === 200) {
- ElMessage.success('终止任务成功!')
- } else {
- ElMessage.error('终止任务失败,请检查!')
- }
- proTable.value?.getTableList()
- }
- const dowloadTrackSequence = async (params: any) => {
- await useDownload(dowloadTrackSequenceApi, params.name, params.id, true, '.zip')
- }
- // ProTable 实例
- const proTable = ref<ProTableInstance>()
- // 删除注视轨迹序列信息
- const deleteTrackSequence = async (params: any) => {
- await useHandleData(delTrackSequenceApi, params.id, '删除【' + params.id + '】注视轨迹序列')
- proTable.value?.getTableList()
- }
- // 批量删除注视轨迹序列信息
- const batchDelete = async (ids: string[]) => {
- await useHandleData(delTrackSequenceApi, ids, '删除所选注视轨迹序列信息')
- proTable.value?.clearSelection()
- proTable.value?.getTableList()
- }
- // 导出注视轨迹序列列表
- const downloadFile = async () => {
- ElMessageBox.confirm('确认导出注视轨迹序列数据?', '温馨提示', { type: 'warning' }).then(() =>
- useDownload(exportTrackSequenceApi, '注视轨迹序列列表', proTable.value?.searchParam)
- )
- }
- // 批量添加注视轨迹序列
- const dialogRef = ref<InstanceType<typeof ImportExcel> | null>(null)
- const batchAdd = () => {
- const params = {
- title: '注视轨迹序列',
- tempApi: importTemplateApi,
- importApi: importTrackSequenceDataApi,
- getTableList: proTable.value?.getTableList
- }
- dialogRef.value?.acceptParams(params)
- }
- const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
- // 打开弹框的功能
- const openDialog = async (type: number, title: string, row?: any) => {
- let res = { data: {} }
- if (row?.id) {
- res = await getTrackSequenceApi(row?.id || null)
- }
- // 重置表单
- setItemsOptions()
- const params = {
- title,
- width: 580,
- isEdit: type !== 3,
- itemsOptions: itemsOptions,
- model: type == 1 ? {} : res.data,
- api: type == 1 ? addTrackSequenceApi : updateTrackSequenceApi,
- getTableList: proTable.value?.getTableList
- }
- formDialogRef.value?.openDialog(params)
- }
- // 表格配置项
- const columns = reactive<ColumnProps<any>[]>([
- { type: 'selection', fixed: 'left', width: 70 },
- { prop: 'id', label: '主键ID', width: 180 },
- {
- prop: 'name',
- label: '任务名称',
- search: {
- el: 'input'
- },
- width: 150
- },
- {
- prop: 'status',
- label: '任务状态',
- search: {
- el: 'select'
- },
- tag: true,
- enum: statusEnums,
- width: 150
- },
- {
- prop: 'type',
- label: '类型',
- tag: true,
- enum: enumsAlgorithmType,
- width: 120
- },
- {
- prop: 'subsystem',
- label: '分系统',
- tag: true,
- enum: enumsSubSystem,
- width: 200
- },
- {
- prop: 'algorithmName',
- label: '算法名称',
- width: 200
- },
- {
- prop: 'modelName',
- label: '模型名称',
- width: 200
- },
- // {
- // prop: 'algorithmModelId',
- // label: '模型',
- // search: {
- // el: 'input'
- // },
- // width: 150
- // },
- {
- prop: 'startTime',
- label: '开始时间',
- width: 180
- },
- {
- prop: 'endTime',
- label: '结束时间',
- width: 180
- },
- {
- prop: 'costSecond',
- label: '耗时',
- width: 120
- },
- {
- prop: 'log',
- label: '日志',
- width: 120
- },
- {
- prop: 'outputPath',
- label: '输出路径',
- width: 120
- },
- {
- prop: 'remarks',
- label: '备注',
- search: {
- el: 'input'
- },
- width: 120
- },
- { prop: 'operation', label: '操作', width: 230, fixed: 'right' }
- ])
- // 表单配置项
- let itemsOptions: ProForm.ItemsOptions[] = []
- const setItemsOptions = () => {
- itemsOptions = [
- {
- label: '任务名称',
- prop: 'name',
- rules: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入任务名称'
- }
- },
- {
- label: '选择数据集',
- prop: 'inputOssId',
- rules: [{ required: false, message: '数据集不能为空', trigger: 'blur' }],
- compOptions: {
- elTagName: 'select',
- placeholder: '请选择或者上传数据集',
- enum: datasetList,
- clearable: true
- }
- },
- {
- label: '上传数据集',
- prop: 'inputOssId',
- rules: [{ required: false, message: '数据集不能为空', trigger: 'blur' }],
- compOptions: {
- elTagName: 'file-upload',
- fileSize: 4096,
- fileType: ['zip'],
- placeholder: '请上传数据集'
- }
- },
- {
- label: '选择模型',
- prop: 'algorithmModelId',
- rules: [{ required: true, message: '模型不能为空', trigger: 'blur' }],
- compOptions: {
- elTagName: 'select',
- placeholder: '请选择模型',
- enum: enumsAlgorithmModelTrack
- }
- },
- {
- label: '选择算法',
- prop: 'algorithmId',
- rules: [{ required: true, message: '请选择算法', trigger: 'blur' }],
- compOptions: {
- disabled: false,
- elTagName: 'select',
- placeholder: '请输入算法',
- enum: enumsAlgorithmConfigTrack
- }
- },
- {
- label: '备注',
- prop: 'remarks',
- rules: [],
- compOptions: {
- placeholder: '请输入备注'
- }
- }
- ]
- }
- const setItemsOptionsModel = () => {
- itemsOptions = [
- {
- label: '算法ID',
- prop: 'algorithmId',
- rules: [{ required: true, message: '算法不能为空', trigger: 'blur' }],
- compOptions: {
- disabled: true,
- placeholder: '请输入算法'
- }
- },
- {
- label: '算法名称',
- prop: 'algorithmName',
- rules: [{ required: true, message: '算法不能为空', trigger: 'blur' }],
- compOptions: {
- disabled: true,
- elTagName: 'select',
- placeholder: '请输入算法',
- enum: enumsAlgorithmConfigTrack
- }
- },
- {
- label: '算法参数',
- prop: 'parameterConfig',
- rules: [{ required: true, message: '模型名称不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入模型名称'
- }
- },
- {
- label: '模型ID',
- prop: 'id',
- rules: [{ required: true, message: '模型名称不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入模型名称'
- }
- },
- {
- label: '模型名称',
- prop: 'modelName',
- rules: [{ required: true, message: '模型名称不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入模型名称'
- }
- },
- {
- label: '模型保存路径',
- prop: 'modelAddress',
- rules: [{ required: true, message: '模型名称不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入模型名称'
- }
- },
- {
- label: '备注',
- prop: 'remarks',
- rules: [{ required: false, message: '备注不能为空', trigger: 'blur' }],
- compOptions: {
- placeholder: '请输入备注'
- }
- }
- ]
- }
- const datasetList = ref<any>([])
- const geDatasetList = async (subsystem: string) => {
- const qyery = {
- subsystem: SubSystem__[subsystem],
- pageNum: 1,
- pageSize: 1000
- }
- const result: any = await listDataSeqApi(qyery)
- const data = result['data']['list']
- for (const item of data) {
- datasetList.value.push({
- value: item['inputOssId'],
- label: item['name']
- })
- }
- }
- onMounted(async () => {
- await geDatasetList('注释轨迹序列')
- await geDatasetList('目标检测')
- })
- const enumsAlgorithmModelTrack = ref<any>([])
- const updateEnumsAlgorithmModelTrack = async () => {
- const result: any = await enumAlgorithmModelTrackApi()
- // console.log(result.data);
- enumsAlgorithmModelTrack.value = []
- for (const item of result.data) {
- if (item.type !== AlgorithmType2['预测/推理']) {
- continue
- }
- if (SubSystem[item['subsystem']] === '注释轨迹序列' || SubSystem[item['subsystem']] === '目标检测') {
- item['label'] =
- item['value'] + '_' + item['label'] + '-' + SubSystem[item['subsystem']] + '-' + AlgorithmType[item['type']] + '-' + item['algorithmName']
- enumsAlgorithmModelTrack.value.push(item)
- }
- }
- }
- onMounted(async () => {
- updateEnumsAlgorithmModelTrack()
- })
- </script>
|