提交代码
parent
df47cc4124
commit
5ece1c71d8
|
@ -35,7 +35,13 @@ const modlMainType=()=>{
|
||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//获取模型子类型列表
|
||||||
|
const modlSubType=()=>{
|
||||||
|
return request({
|
||||||
|
url: `/const/modl_sub_type`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
}
|
||||||
//获取模型网络类型列表
|
//获取模型网络类型列表
|
||||||
const modlNetType=()=>{
|
const modlNetType=()=>{
|
||||||
return request({
|
return request({
|
||||||
|
@ -64,6 +70,7 @@ export default {
|
||||||
modlFileType,
|
modlFileType,
|
||||||
modlFramework,
|
modlFramework,
|
||||||
modlMainType,
|
modlMainType,
|
||||||
|
modlSubType,
|
||||||
modlNetType,
|
modlNetType,
|
||||||
operMainType,
|
operMainType,
|
||||||
userRole
|
userRole
|
||||||
|
|
|
@ -336,6 +336,18 @@ class MenuAPI {
|
||||||
alwaysShow: false,
|
alwaysShow: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "datasAdd",
|
||||||
|
component: "manage/datas/add",
|
||||||
|
name: "datasAdd",
|
||||||
|
meta: {
|
||||||
|
title: "数据集新增",
|
||||||
|
hidden: true,
|
||||||
|
roles: ["ADMIN6", "GUEST", "ADMIN"],
|
||||||
|
keepAlive: true,
|
||||||
|
alwaysShow: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "datasEdit",
|
path: "datasEdit",
|
||||||
component: "manage/datas/edit",
|
component: "manage/datas/edit",
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.oper_main_type"
|
v-model="formData.oper_main_type"
|
||||||
placeholder="请选择算子主类型"
|
placeholder="请选择算子主类型"
|
||||||
size="large"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
>
|
>
|
||||||
|
@ -34,7 +33,6 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.oper_sub_type"
|
v-model="formData.oper_sub_type"
|
||||||
placeholder="请选择算子子类型"
|
placeholder="请选择算子子类型"
|
||||||
size="large"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="handleChangeRules"
|
@change="handleChangeRules"
|
||||||
>
|
>
|
||||||
|
|
|
@ -5,18 +5,15 @@
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="openDialog('user-form')"
|
<el-button type="primary" @click="handleAdd()"
|
||||||
><i-ep-plus />未标注数据集</el-button
|
><i-ep-plus />添加数据集</el-button
|
||||||
>
|
|
||||||
<el-button type="primary" @click="openDialog('user-form')"
|
|
||||||
><i-ep-plus />已标注数据集</el-button
|
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="数据名称" prop="keywords">
|
<el-form-item label="数据名称" prop="dataset_name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.keywords"
|
v-model="queryParams.dataset_name"
|
||||||
placeholder="请输入数据名称"
|
placeholder="请输入数据名称"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
|
@ -38,32 +35,33 @@
|
||||||
</template>
|
</template>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="tableData"
|
:data="pageData"
|
||||||
stripe
|
stripe
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column label="数据集名称" align="left" prop="szmc" width="250" />
|
<el-table-column label="数据集名称" align="left" prop="dataset_name" width="250" />
|
||||||
<el-table-column label="版本" align="left" prop="szlx" />
|
<el-table-column label="版本" align="left" prop="dataset_version" />
|
||||||
<el-table-column label="标签" align="left" prop="szzlx" />
|
<el-table-column label="数据集描述" align="left" prop="dataset_desc" />
|
||||||
<el-table-column label="使用任务类型" align="left" prop="bb" />
|
<el-table-column label="适用模型类型" align="left" prop="modl_sub_type_name" />
|
||||||
<el-table-column label="数据格式" align="left" prop="hlcjsj" />
|
<el-table-column label="数据格式" align="left" prop="dats_dataset_format" />
|
||||||
<el-table-column label="数量" align="left" prop="sl" />
|
<el-table-column label="图像分辨率" align="left" prop="image_resolution" />
|
||||||
<el-table-column label="是否标注" align="left" prop="sfbz" />
|
<el-table-column label="数量" align="left" prop="frame_count" />
|
||||||
<el-table-column label="操作" fixed="right" width="220">
|
<el-table-column label="标注类型" align="left" prop="dats_label_type" />
|
||||||
|
<el-table-column label="操作" fixed="right" width="250">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
text
|
text
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="openDialog('user-form', scope.row.id)"
|
@click="handleDetail(scope.row)"
|
||||||
><i-ep-view />查看</el-button
|
><i-ep-edit />查看</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
text
|
text
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="openDialog('user-form', scope.row.id)"
|
@click="handleDelete(scope.row)"
|
||||||
><i-ep-edit />修改</el-button
|
><i-ep-delete />删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -81,126 +79,74 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
defineOptions({
|
import DataSetApi from "@/api/dataSet";
|
||||||
name: "calculateIndex",
|
|
||||||
inheritAttrs: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
import { UserQuery } from "@/api/user/model";
|
|
||||||
|
|
||||||
const queryFormRef = ref(ElForm); // 查询表单
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const loading = ref(false); // 加载状态
|
const loading = ref(false); // 加载状态
|
||||||
const removeIds = ref([]); // 删除用户ID集合 用于批量删除
|
|
||||||
const queryParams = reactive<UserQuery>({
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
});
|
|
||||||
const dateTimeRange = ref("");
|
|
||||||
const total = ref(0); // 数据总数
|
const total = ref(0); // 数据总数
|
||||||
|
const pageData = ref([]); // 分页数据
|
||||||
watch(dateTimeRange, (newVal) => {
|
const removeIds = ref([]); // 删除ID集合 用于批量删除
|
||||||
if (newVal) {
|
const queryFormRef = ref(ElForm); // 查询表单
|
||||||
queryParams.startTime = newVal[0];
|
const queryParams = reactive({
|
||||||
queryParams.endTime = newVal[1];
|
page_num: 1,
|
||||||
}
|
page_size: 10,
|
||||||
|
dataset_name: null,
|
||||||
|
modl_sub_type: null,
|
||||||
|
dats_label_type: null,
|
||||||
|
dats_dataset_format: null
|
||||||
});
|
});
|
||||||
|
|
||||||
const tableData = [
|
|
||||||
{
|
|
||||||
szmc: "RGB24格式转换数据集",
|
|
||||||
szlx: "v1",
|
|
||||||
szzlx: "格式转换",
|
|
||||||
bb: "格式转换",
|
|
||||||
hlcjsj: "RGB24",
|
|
||||||
sl: "86",
|
|
||||||
sfbz: "未标注",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
szmc: "图像缩放数据集",
|
|
||||||
szlx: "v1.2",
|
|
||||||
szzlx: "图像缩放",
|
|
||||||
bb: "专业的图像缩放",
|
|
||||||
hlcjsj: "RGB24",
|
|
||||||
sl: "121",
|
|
||||||
sfbz: "未标注",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
szmc: "人脸识别数据集",
|
|
||||||
szlx: "v4",
|
|
||||||
szzlx: "人脸识别",
|
|
||||||
bb: "人脸识别",
|
|
||||||
hlcjsj: "GRAY16",
|
|
||||||
sl: "288",
|
|
||||||
sfbz: "已标注",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/** 查询 */
|
/** 查询 */
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
ElMessage.success("查询成功");
|
DataSetApi.list(queryParams)
|
||||||
|
.then((res) => {
|
||||||
|
pageData.value = res.data.data.raw_dataset_list;
|
||||||
|
total.value = res.data.data.total;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
// UserAPI.getPage(queryParams)
|
});
|
||||||
// .then((data) => {
|
|
||||||
// console.log("handleQuery", data);
|
|
||||||
// pageData.value = data.list;
|
|
||||||
// total.value = data.total;
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// loading.value = false;
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置查询 */
|
/** 重置查询 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
queryFormRef.value.resetFields();
|
queryFormRef.value.resetFields();
|
||||||
dateTimeRange.value = "";
|
queryParams.page_num = 1;
|
||||||
queryParams.pageNum = 1;
|
|
||||||
queryParams.deptId = undefined;
|
|
||||||
queryParams.startTime = undefined;
|
|
||||||
queryParams.endTime = undefined;
|
|
||||||
handleQuery();
|
handleQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 行选中 */
|
/** 行选中 */
|
||||||
function handleSelectionChange(selection: any) {
|
function handleSelectionChange(selection: any) {
|
||||||
removeIds.value = selection.map((item: any) => item.id);
|
removeIds.value = selection.map((item: any) => item.dataset_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除数据 */
|
/** 删除数据 */
|
||||||
function handleDelete(row: { [key: string]: any }) {
|
function handleDelete(row: { [key: string]: any }) {
|
||||||
ElMessageBox.confirm("确认删除数据集?", "警告", {
|
ElMessageBox.confirm("确认删除数据集信息?", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
|
DataSetApi.deleteRaw(row.dataset_id).then((res) => {
|
||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
|
resetQuery();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 新增原始数据集 */
|
||||||
* 打开弹窗
|
function handleAdd() {
|
||||||
*
|
router.push({ path: "/dataMgr/datasAdd" });
|
||||||
* @param type 弹窗类型 用户表单:user-form | 用户导入:user-import
|
|
||||||
* @param id 用户ID
|
|
||||||
*/
|
|
||||||
async function openDialog(type: string, id?: number) {
|
|
||||||
router.push({ path: "/dataMgr/datasEdit" });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 下载导入模板 */
|
/** 查看/修改数据集 */
|
||||||
function downloadTemplate() {
|
function handleDetail(row: { [key: string]: any }) {
|
||||||
ElMessage.success("下载模板成功");
|
router.push({ path: "/dataMgr/datasEdit", query: { id: row.dataset_id } });
|
||||||
}
|
|
||||||
|
|
||||||
/** 导出用户 */
|
|
||||||
function handleExport() {
|
|
||||||
ElMessage.success("导出成功");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
//handleQuery();
|
handleQuery();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -49,17 +49,15 @@
|
||||||
<el-table-column label="模型类型" align="left" prop="modl_net_type" />
|
<el-table-column label="模型类型" align="left" prop="modl_net_type" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="连接状态"
|
label="连接状态"
|
||||||
width="180"
|
|
||||||
align="left"
|
align="left"
|
||||||
prop="connection_state"
|
prop="connection_state"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="工作状态"
|
label="工作状态"
|
||||||
width="180"
|
|
||||||
align="left"
|
align="left"
|
||||||
prop="working_state_name"
|
prop="working_state_name"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="CPU使用率" width="180" align="left" prop="cpu_usage">
|
<el-table-column label="CPU使用率" width="120" align="left" prop="cpu_usage">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="scope.row.cpu_usage > 1024 ? 'danger' : 'success'"
|
:type="scope.row.cpu_usage > 1024 ? 'danger' : 'success'"
|
||||||
|
@ -69,13 +67,13 @@
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="内核温度" width="180" align="left" prop="tempurature">
|
<el-table-column label="内核温度" width="80" align="left" prop="tempurature">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag
|
||||||
:type="scope.row.tempurature > 80 ? 'danger' : 'success'"
|
:type="scope.row.tempurature > 80 ? 'danger' : 'success'"
|
||||||
effect="plain"
|
effect="plain"
|
||||||
>
|
>
|
||||||
{{ scope.row.tempurature + " °" }}
|
{{ scope.row.tempurature + " ℃" }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-card v-loading="loading" style="padding-bottom: 50px;">
|
<el-card v-loading="loading" style="padding-bottom: 50px">
|
||||||
<template #header
|
<template #header
|
||||||
><svg-icon
|
><svg-icon
|
||||||
icon-class="pause"
|
icon-class="pause"
|
||||||
|
@ -146,6 +146,20 @@
|
||||||
placeholder="请输入运行参数描述"
|
placeholder="请输入运行参数描述"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="适用模型类型" prop="modl_sub_type">
|
||||||
|
<el-select
|
||||||
|
v-model="form.modl_sub_type"
|
||||||
|
placeholder="请选择适用模型类型"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in listOpt.modlSubTypeList"
|
||||||
|
:key="item.modl_sub_type"
|
||||||
|
:label="item.modl_sub_type_name"
|
||||||
|
:value="item.modl_sub_type"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="运行参数文件" prop="params_content">
|
<el-form-item label="运行参数文件" prop="params_content">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
|
@ -195,7 +209,7 @@
|
||||||
>
|
>
|
||||||
<el-form label-width="108px">
|
<el-form label-width="108px">
|
||||||
<el-form-item label="适用模型类型">
|
<el-form-item label="适用模型类型">
|
||||||
{{dataInfo.modl_sub_type_name}}
|
{{ dataInfo.modl_sub_type_name }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="运行参数名称">
|
<el-form-item label="运行参数名称">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -232,6 +246,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import ConstApi from "@/api/const";
|
||||||
import ToolChainshApi from "@/api/tool";
|
import ToolChainshApi from "@/api/tool";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -267,6 +282,7 @@ const dialogFormVisible = ref(false); // 弹窗加载状态
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
params_name: [{ required: true, message: "运行参数名称不能为空", trigger: "blur" }],
|
params_name: [{ required: true, message: "运行参数名称不能为空", trigger: "blur" }],
|
||||||
params_desc: [{ required: true, message: "运行参数描述不能为空", trigger: "blur" }],
|
params_desc: [{ required: true, message: "运行参数描述不能为空", trigger: "blur" }],
|
||||||
|
modl_sub_type: [{ required: true, message: "适用模型类型不能为空", trigger: "change" }],
|
||||||
params_content: [{ required: true, message: "运行参数文件不能为空", trigger: "blur" }],
|
params_content: [{ required: true, message: "运行参数文件不能为空", trigger: "blur" }],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -290,6 +306,7 @@ let listOpt = reactive({
|
||||||
name: "其他工具",
|
name: "其他工具",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
modlSubTypeList: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
// 参数详情查看
|
// 参数详情查看
|
||||||
|
@ -451,6 +468,7 @@ function handleDelete(row: { [key: string]: any }) {
|
||||||
function initData() {
|
function initData() {
|
||||||
let id = route.query.id;
|
let id = route.query.id;
|
||||||
ID.value = id;
|
ID.value = id;
|
||||||
|
handleQuery();
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
ToolChainshApi.toolChains(id)
|
ToolChainshApi.toolChains(id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -459,7 +477,11 @@ function initData() {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
handleQuery();
|
ConstApi.modlSubType().then((res) => {
|
||||||
|
if ((res.data.code = -0)) {
|
||||||
|
listOpt.modlSubTypeList = res.data.data.modl_sub_type_list || [];
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询运行参数列表 */
|
/** 查询运行参数列表 */
|
||||||
|
|
Loading…
Reference in New Issue