提交代码
This commit is contained in:
parent
897a8bed1c
commit
8eb22eaff4
|
|
@ -31,4 +31,6 @@ export default {
|
|||
#app .theme-picker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
//查询数据集
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/ai/dataset/getDataSetBasicFile',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function remove(datasetId,fileIds) {
|
||||
const data ={
|
||||
datasetId,
|
||||
fileIds
|
||||
}
|
||||
console.log(data);
|
||||
return request({
|
||||
url: '/ai/dataset/removeDataSetBasicFile',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
|
@ -17,4 +17,11 @@ export function add(data) {
|
|||
})
|
||||
}
|
||||
|
||||
export function remove(versionIds) {
|
||||
return request({
|
||||
url: '/ai/version/delete/' + versionIds,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,34 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/dataCenter/dataSet-details',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:dict:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:dataSetId(\\d+)',
|
||||
component: () => import('@/views/dataCenter/dataSet/child/dataSetDetails'),
|
||||
name: 'Data',
|
||||
meta: { title: '数据详情', activeMenu: '/dataCenter/dataSet' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/dataCenter/dataSet-version',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:dict:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:dataSetId(\\d+)',
|
||||
component: () => import('@/views/dataCenter/dataSet/child/datasetVersion'),
|
||||
name: 'Data',
|
||||
meta: { title: '数据集版本管理', activeMenu: '/dataCenter/dataSet' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/monitor/job-log',
|
||||
component: Layout,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog title="创建数据集" :visible.sync="isOpen" width="700px" append-to-body @close="cancel" :close-on-click-modal="false">
|
||||
<el-dialog title="创建数据集" :visible.sync="isOpen" width="700px" append-to-body :modal="false" @close="cancel" :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="名称" prop="datasetName">
|
||||
<el-input v-model="form.datasetName" maxlength="20" placeholder="请输入名称" />
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源" prop="dataSource" >
|
||||
<el-radio-group v-model="form.dataSource" @change="dataSourceChange">
|
||||
<el-radio-group v-model="form.dataSource">
|
||||
<el-radio :label="0" border>系统选择</el-radio>
|
||||
<el-radio :label="1" border>本地上传</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
</el-form-item>
|
||||
<div v-show="form.dataSource ===1">
|
||||
<el-form-item label="上传文件" prop="dataSource">
|
||||
<uploadFiles :get-list="getList" :parent-id="form.inputPath" :fileUrl="form.inputPath"/>
|
||||
<uploadFiles :disabled="form.inputId===0" :parent-id="form.inputId.toString()" :fileUrl="form.inputPath || ''"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源" prop="isAnnotated">
|
||||
<el-radio-group v-model="form.isAnnotated">
|
||||
|
|
@ -188,4 +188,11 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
/* 样式按需定义 */
|
||||
.el-dialog__wrapper {
|
||||
z-index: 2000 !important; /* Set a lower z-index for dialog */
|
||||
}
|
||||
|
||||
input[aria-hidden=true]{
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
tableData:[],
|
||||
selectOpen:false,
|
||||
form: {}, // 初始化为空
|
||||
rules:{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="85px">
|
||||
<el-form-item label="文件名称" prop="fileName">
|
||||
<el-input
|
||||
v-model="queryParams.fileName"
|
||||
placeholder="请输入数据集名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['dataCenter:dataSet:add']"
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['dataCenter:dataSet:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
@click="handleClose"
|
||||
>关闭</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table style="width: 100%" v-loading="loading" :data="list" :height="tableHeight" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column type="index" label="序号" min-width="50" />
|
||||
<el-table-column label="文件名称" align="center" show-overflow-tooltip prop="fileName" min-width="100" />
|
||||
<el-table-column label="文件大小" align="center" show-overflow-tooltip prop="fileSize" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.fileSize < 1024 * 1024?(scope.row.fileSize/1024).toFixed(2)+'KB':(scope.row.fileSize/1024/1024).toFixed(2)+'MB'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="格式" align="center" show-overflow-tooltip prop="createBy" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{scope.row.fileName.split('.').pop()}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" show-overflow-tooltip align="center" prop="createTime" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="100" class-name="small-padding fixed-width" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
|
||||
import { list,remove} from '@/api/dataCenter/dataSetDetails'
|
||||
export default {
|
||||
components: {},
|
||||
name: "DataSet",
|
||||
data() {
|
||||
return {
|
||||
datasetId: 0,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
tableHeight: 0,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表格数据
|
||||
list: [],
|
||||
// 是否显示弹出层
|
||||
addOpen: false,
|
||||
releaseOpen: false,
|
||||
annotationOpen:false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
datasetName: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.datasetId = this.$route.params && this.$route.params.dataSetId;
|
||||
this.getList();
|
||||
// 初始化表格高度
|
||||
this.updateTableHeight();
|
||||
// 监听窗口大小变化
|
||||
window.addEventListener("resize", this.updateTableHeight);
|
||||
},
|
||||
methods: {
|
||||
updateTableHeight() {
|
||||
// 设置表格高度为窗口高度减去其他元素高度
|
||||
const headerHeight = 200; // 头部高度,可以调整
|
||||
const footerHeight = 80; // 底部高度,可以调整
|
||||
this.tableHeight = window.innerHeight - headerHeight - footerHeight;
|
||||
},
|
||||
/**获取数据 **/
|
||||
getList(){
|
||||
this.loading =true
|
||||
this.queryParams.dataSetId = this.datasetId;
|
||||
list(this.queryParams).then(response => {
|
||||
console.log(response);
|
||||
this.list = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading =false
|
||||
})
|
||||
},
|
||||
/** 返回按钮操作 */
|
||||
handleClose() {
|
||||
const obj = { path: "/dataCenter/dataSet" };
|
||||
this.$tab.closeOpenPage(obj);
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
handleAdd(){
|
||||
this.addOpen = true;
|
||||
},
|
||||
handleRelease(row){
|
||||
this.releaseOpen = true;
|
||||
this.datasetId = row.datasetId;
|
||||
},
|
||||
handleAnnotation(row){
|
||||
this.annotationOpen = true;
|
||||
this.datasetId = row.datasetId;
|
||||
},
|
||||
handleUpdate(){
|
||||
|
||||
},
|
||||
handleDelete(row){
|
||||
const datasetId = this.datasetId;
|
||||
const ids = row.fileId || this.ids.join(",");
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
return remove(datasetId,ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
change(){
|
||||
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.fileId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 处理取消事件
|
||||
handleCancel() {
|
||||
this.addOpen = false;
|
||||
this.releaseOpen= false;
|
||||
this.annotationOpen = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.demo-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
.demo-table-expand label {
|
||||
width: 90px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
.demo-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 50%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="85px">
|
||||
<el-form-item label="文件名称" prop="fileName">
|
||||
<el-input
|
||||
v-model="queryParams.fileName"
|
||||
placeholder="请输入数据集名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['dataCenter:dataSet:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
@click="handleClose"
|
||||
>关闭</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table style="width: 100%" v-loading="loading" :data="list" :height="tableHeight" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column type="index" label="序号" min-width="50" />
|
||||
<el-table-column label="数据集名称" align="center" show-overflow-tooltip prop="versionName" min-width="100" />
|
||||
<el-table-column label="版本号" align="center" show-overflow-tooltip prop="versionName" min-width="100" />
|
||||
<el-table-column label="发布人" align="center" show-overflow-tooltip prop="fileName" min-width="100" />
|
||||
<el-table-column label="发布时间" align="center" show-overflow-tooltip prop="createTime" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件数量" align="center" show-overflow-tooltip prop="fileName" min-width="100" />
|
||||
<el-table-column label="任务名称" align="center" show-overflow-tooltip prop="fileName" min-width="100" />
|
||||
<el-table-column label="标注类型" align="center" show-overflow-tooltip prop="fileName" min-width="100" />
|
||||
<el-table-column label="已审核数量" align="center" show-overflow-tooltip prop="fileName" min-width="100" />
|
||||
<el-table-column label="操作" align="center" min-width="100" class-name="small-padding fixed-width" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
|
||||
import {list,remove} from '@/api/dataCenter/releaseVersion'
|
||||
|
||||
|
||||
export default {
|
||||
name: "DataSet",
|
||||
data() {
|
||||
return {
|
||||
datasetId: 0,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
tableHeight: 0,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表格数据
|
||||
list: [],
|
||||
// 是否显示弹出层
|
||||
addOpen: false,
|
||||
releaseOpen: false,
|
||||
annotationOpen:false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.datasetId = this.$route.params && this.$route.params.dataSetId;
|
||||
this.getList();
|
||||
// 初始化表格高度
|
||||
this.updateTableHeight();
|
||||
// 监听窗口大小变化
|
||||
window.addEventListener("resize", this.updateTableHeight);
|
||||
},
|
||||
methods: {
|
||||
updateTableHeight() {
|
||||
// 设置表格高度为窗口高度减去其他元素高度
|
||||
const headerHeight = 200; // 头部高度,可以调整
|
||||
const footerHeight = 80; // 底部高度,可以调整
|
||||
this.tableHeight = window.innerHeight - headerHeight - footerHeight;
|
||||
},
|
||||
/**获取数据 **/
|
||||
getList(){
|
||||
this.loading =true
|
||||
this.queryParams.dataSetId = this.datasetId;
|
||||
list(this.queryParams).then(response => {
|
||||
this.list = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading =false
|
||||
})
|
||||
},
|
||||
/** 返回按钮操作 */
|
||||
handleClose() {
|
||||
const obj = { path: "/dataCenter/dataSet" };
|
||||
this.$tab.closeOpenPage(obj);
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
handleDelete(row){
|
||||
const ids = row.versionId || this.ids;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
return remove(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.versionId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.demo-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
.demo-table-expand label {
|
||||
width: 90px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
.demo-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 50%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -166,8 +166,6 @@ export default {
|
|||
this.fileList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
// 清空选中项
|
||||
this.$refs.table.clearSelection();
|
||||
// 根据逻辑重新设置选中项
|
||||
const defaultSelection = []; // 自定义默认选中项
|
||||
this.handleSelectionChange(defaultSelection);
|
||||
|
|
|
|||
|
|
@ -54,13 +54,30 @@
|
|||
<el-table style="width: 100%" v-loading="loading" :data="list" :height="tableHeight" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column type="index" label="序号" min-width="50" />
|
||||
<el-table-column label="名称" align="center" show-overflow-tooltip prop="datasetName" />
|
||||
<el-table-column label="版本名称" align="center" show-overflow-tooltip prop="sampleFormat" />
|
||||
<el-table-column label="标注进度" align="center" show-overflow-tooltip prop="createBy">
|
||||
<el-table-column label="名称" align="center" show-overflow-tooltip prop="datasetName">
|
||||
<template slot-scope="scope">
|
||||
<el-progress color="#13ce66" :percentage="50"></el-progress>
|
||||
<router-link :to="'/dataCenter/dataSet-details/index/' + scope.row.datasetId" class="link-type">
|
||||
<span>{{ scope.row.datasetName }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="版本名称" align="center" show-overflow-tooltip prop="sampleFormat" />
|
||||
<el-table-column label="标注进度" align="center" show-overflow-tooltip prop="createBy" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;align-items: center;justify-content: center;">
|
||||
<!-- 使用 v-if 确保当 annotatedCount > 0 时渲染进度条 -->
|
||||
<el-progress
|
||||
v-if="scope.row.annotatedCount > 0"
|
||||
color="#13ce66"
|
||||
:percentage="getPercentage(scope.row)"
|
||||
style="width: 150px;"/>
|
||||
<!-- 显示标注进度 -->
|
||||
<span>({{ (scope.row.annotatedCount - scope.row.notAnnotatedCount) + '/' + scope.row.annotatedCount }})</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间" show-overflow-tooltip align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
|
|
@ -109,7 +126,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
@click="handleVersion(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:edit']"
|
||||
>版本查看</el-button>
|
||||
<el-button
|
||||
|
|
@ -136,8 +153,6 @@
|
|||
<release-version-dialog :dataset-id="datasetId" :open="releaseOpen" @dialog-cancel="handleCancel"/>
|
||||
<!--创建标注任务-->
|
||||
<annotation-task-dialog :dataset-id="datasetId" :open="annotationOpen" @dialog-cancel="handleCancel"/>
|
||||
|
||||
<
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -229,6 +244,17 @@ export default {
|
|||
},
|
||||
handleUpdate(){
|
||||
|
||||
},
|
||||
handleVersion(row){
|
||||
this.$tab.openPage("数据集版本管理", '/dataCenter/dataSet-version/index/' + row.datasetId);
|
||||
},
|
||||
getPercentage(row) {
|
||||
if (row.annotatedCount > 0 && row.notAnnotatedCount >= 0) {
|
||||
let percentage = ((row.annotatedCount - row.notAnnotatedCount) / row.annotatedCount) * 100;
|
||||
// 确保 percentage 在 0 到 100 之间
|
||||
return Math.min(Math.max(percentage, 0), 100);
|
||||
}
|
||||
return 0; // 如果没有标注数据,返回 0%
|
||||
},
|
||||
handleDelete(row){
|
||||
const ids = row.datasetId || this.ids;
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@
|
|||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column label="标签名称" prop="labelName" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column class-name="labelName" label="标签名称" prop="labelName" :show-overflow-tooltip="true" width="160">
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="labelName" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column label="描述" align="center" prop="labelName" />
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="labelName">
|
||||
<template slot-scope="scope">
|
||||
<span>{{parseTime(scope.row.createTime)}}</span>
|
||||
|
|
@ -266,7 +266,7 @@ export default {
|
|||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除样本标签管理编号为"' + row.labelId + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
return delDataSetLabels(row.labelId);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
|
|
@ -276,3 +276,16 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 提升优先级 */
|
||||
.vue-treeselect--has-value .vue-treeselect__input {
|
||||
line-height: inherit !important;
|
||||
vertical-align: baseline !important;
|
||||
}
|
||||
|
||||
/* 调整右侧内边距 */
|
||||
.labelName .cell {
|
||||
padding-left: 30px !important; /* 可根据需要调整值 */
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -15,13 +15,15 @@
|
|||
>
|
||||
<el-row>
|
||||
<el-col :span="1.5">
|
||||
<el-button icon="el-icon-upload2" size="small" type="primary">上传文件</el-button>
|
||||
<el-button icon="el-icon-upload2" :disabled="disabled" size="small" type="primary">上传文件</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-upload>
|
||||
|
||||
<el-drawer
|
||||
style="z-index: 4001 !important;"
|
||||
title="上传进度"
|
||||
:modal="false"
|
||||
:visible.sync="drawer"
|
||||
:before-close="handleClose"
|
||||
:close-on-click-modal="false"
|
||||
|
|
@ -54,9 +56,12 @@ export default {
|
|||
type: String,
|
||||
required: true,
|
||||
},
|
||||
disabled:{
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
getList: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
|
|
@ -179,4 +184,9 @@ export default {
|
|||
font-size: 12px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
/* Optional: Adjust z-index of el-dialog if needed */
|
||||
.el-dialog__wrapper {
|
||||
z-index: 1000 !important; /* Set a lower z-index for dialog */
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -400,6 +400,7 @@ export default {
|
|||
this.pasteOpen = false;
|
||||
this.copyOpen =false;
|
||||
this.open = false;
|
||||
this.renameOpen = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
<el-table v-loading="loading" :data="sampleList" :height="tableHeight" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" label="序号" width="80" />
|
||||
<el-table-column type="index" label="序号" :index="indexMethod" width="80" />
|
||||
<el-table-column label="样本类型名称" align="center" prop="sampleName" />
|
||||
<el-table-column label="样本格式" align="center" prop="sampleFormat" />
|
||||
<el-table-column label="添加人" align="center" prop="createBy" />
|
||||
|
|
@ -144,7 +144,7 @@ export default {
|
|||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
sampleName: null,
|
||||
sampleFormat: null,
|
||||
|
|
@ -178,6 +178,10 @@ export default {
|
|||
window.removeEventListener("resize", this.updateTableHeight);
|
||||
},
|
||||
methods: {
|
||||
indexMethod(index){
|
||||
console.log(index);
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + index + 1;
|
||||
},
|
||||
updateTableHeight() {
|
||||
// 设置表格高度为窗口高度减去其他元素高度
|
||||
const headerHeight = 200; // 头部高度,可以调整
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<el-table v-loading="loading" :data="teamMemberList" :height="tableHeight" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" label="序号" width="80" />
|
||||
<el-table-column type="index" label="序号" :index="indexMethod" width="80" />
|
||||
<el-table-column label="姓名" align="center" prop="userName" />
|
||||
<el-table-column label="性别" align="center" prop="sex" >
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -254,6 +254,10 @@ export default {
|
|||
window.addEventListener("resize", this.updateTableHeight);
|
||||
},
|
||||
methods: {
|
||||
indexMethod(index){
|
||||
console.log(index);
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + index + 1;
|
||||
},
|
||||
updateTableHeight() {
|
||||
// 设置表格高度为窗口高度减去其他元素高度
|
||||
const headerHeight = 200; // 头部高度,可以调整
|
||||
|
|
|
|||
Loading…
Reference in New Issue