提交代码
This commit is contained in:
parent
3554e5e20b
commit
1d27a8f44b
|
|
@ -8,6 +8,22 @@ export function list(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
export function creation(query) {
|
||||
return request({
|
||||
url: '/ai/annotationTask/list/creation',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function participant(query) {
|
||||
return request({
|
||||
url: '/ai/annotationTask/list/participant',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//创建数据集
|
||||
export function add(data) {
|
||||
return request({
|
||||
|
|
@ -16,5 +32,13 @@ export function add(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
// 获取标注任务文件详情
|
||||
export function getAnnotationDetails(data) {
|
||||
return request({
|
||||
url: '/ai/annotationTask/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ export const dynamicRoutes = [
|
|||
path: '/dataCenter/dataSet-details',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:dict:list'],
|
||||
permissions: ['dataCenter:dataSet:file:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:dataSetId(\\d+)',
|
||||
|
|
@ -152,7 +152,7 @@ export const dynamicRoutes = [
|
|||
path: '/dataCenter/dataSet-version',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:dict:list'],
|
||||
permissions: ['dataCenter:version:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index/:dataSetId(\\d+)',
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
<!-- 新建数据集弹窗 -->
|
||||
<add-task-dialog :open="addOpen" :get-list="getList" @dialog-cancel="handleCancel"></add-task-dialog>
|
||||
|
||||
<release-version-dialog :dataset-id="datasetId" :open="releaseOpen" @dialog-cancel="handleCancel"></release-version-dialog>
|
||||
<release-version-dialog :dataset-id="datasetId" :open="releaseOpen" :task-id="taskId" @dialog-cancel="handleCancel"></release-version-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -120,6 +120,7 @@ export default {
|
|||
name: "allTasks",
|
||||
data() {
|
||||
return {
|
||||
taskId:0,
|
||||
datasetId: 0,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
|
|
@ -187,6 +188,7 @@ export default {
|
|||
handleRelease(row){
|
||||
this.releaseOpen = true;
|
||||
this.datasetId = row.datasetId;
|
||||
this.taskId = row.taskId;
|
||||
},
|
||||
handleDimension(row){
|
||||
|
||||
|
|
|
|||
|
|
@ -1,53 +1,262 @@
|
|||
<template>
|
||||
<div>
|
||||
<canvas ref="canvas" @mousedown="startDraw" @mousemove="draw" @mouseup="endDraw"></canvas>
|
||||
<div v-for="(box, index) in boxes" :key="index" :style="{ position: 'absolute', left: box.x + 'px', top: box.y + 'px', width: box.width + 'px', height: box.height + 'px', border: '2px solid red' }"></div>
|
||||
<div class="div-main">
|
||||
<!-- 顶部区域 -->
|
||||
<div class="top-part">
|
||||
<div class="top-content">
|
||||
<!-- 左侧按钮组 -->
|
||||
<div class="top-content-left">
|
||||
<el-button v-for="(icon, index) in leftIcons"
|
||||
:key="index"
|
||||
:icon="icon"
|
||||
circle>
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- 右侧选择框和设置按钮 -->
|
||||
<div class="top-content-right">
|
||||
<el-select
|
||||
v-model="taskId"
|
||||
placeholder="请选择标注任务"
|
||||
clearable
|
||||
class="select-task"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.ai_annotate_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="settings-icon">
|
||||
<i class="el-icon-setting"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 底部区域 -->
|
||||
<div class="bottom-part">
|
||||
<div class="bottom-content">
|
||||
<div class="bottom-content-left">
|
||||
<div class="bottom-content-left-top">
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
>全部</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
>已标注</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
>未标注</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
>审核驳回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-content-left-bottom">
|
||||
<div>
|
||||
<ul>
|
||||
<li v-for="i in count" class="list-item">
|
||||
<el-checkbox v-model="checked"> 文件名称{{ i }}</el-checkbox>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-content-center">
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="bottom-content-right">
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
dicts: ['ai_annotate_type'],
|
||||
data() {
|
||||
return {
|
||||
isDrawing: false,
|
||||
startX: 0,
|
||||
startY: 0,
|
||||
boxes: []
|
||||
taskId: undefined, // 当前选中的任务 ID
|
||||
leftIcons: [
|
||||
'el-icon-circle-plus-outline',
|
||||
'el-icon-remove-outline',
|
||||
'el-icon-search',
|
||||
'el-icon-search',
|
||||
'el-icon-search',
|
||||
'el-icon-search',
|
||||
], // 顶部左侧按钮的图标
|
||||
count: 600
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const canvas = this.$refs.canvas;
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
this.ctx = canvas.getContext('2d');
|
||||
},
|
||||
methods: {
|
||||
startDraw(e) {
|
||||
this.isDrawing = true;
|
||||
const rect = this.$refs.canvas.getBoundingClientRect();
|
||||
this.startX = e.clientX - rect.left;
|
||||
this.startY = e.clientY - rect.top;
|
||||
},
|
||||
draw(e) {
|
||||
if (this.isDrawing) {
|
||||
const rect = this.$refs.canvas.getBoundingClientRect();
|
||||
this.ctx.clearRect(0, 0, this.$refs.canvas.width, this.$refs.canvas.height);
|
||||
this.ctx.strokeRect(this.startX, this.startY, e.clientX - rect.left - this.startX, e.clientY - rect.top - this.startY);
|
||||
}
|
||||
},
|
||||
endDraw() {
|
||||
if (this.isDrawing) {
|
||||
this.isDrawing = false;
|
||||
const rect = this.$refs.canvas.getBoundingClientRect();
|
||||
const box = {
|
||||
x: this.startX,
|
||||
y: this.startY,
|
||||
width: Math.abs(e.clientX - rect.left - this.startX),
|
||||
height: Math.abs(e.clientY - rect.top - this.startY)
|
||||
};
|
||||
this.boxes.push(box);
|
||||
}
|
||||
methods:{
|
||||
load () {
|
||||
this.count += 2
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped lang="scss">
|
||||
.div-main {
|
||||
width: 100%;
|
||||
height: calc(100vh - 84px);
|
||||
|
||||
/* 顶部样式 */
|
||||
.top-part {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
padding: 10px;
|
||||
|
||||
.top-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
background-color: #f5f7fa;
|
||||
border: 1px solid #dfe4ed;
|
||||
|
||||
.top-content-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px; /* 按钮之间的间距 */
|
||||
}
|
||||
|
||||
.top-content-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
.select-task {
|
||||
flex-shrink: 0; /* 防止选择框缩小 */
|
||||
}
|
||||
|
||||
.settings-icon {
|
||||
font-size: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部样式 */
|
||||
.bottom-part {
|
||||
width: 100%;
|
||||
height: calc(100% - 60px);
|
||||
padding: 10px;
|
||||
|
||||
.bottom-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #dfe4ed;
|
||||
|
||||
.bottom-content-left,
|
||||
.bottom-content-center,
|
||||
.bottom-content-right {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bottom-content-left {
|
||||
width: 20%;
|
||||
|
||||
.bottom-content-left-bottom,
|
||||
.bottom-content-left-top{
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
}
|
||||
.bottom-content-left-top{
|
||||
height: 50px;
|
||||
div{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f5f7fa;
|
||||
border: 1px solid #dfe4ed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-content-left-bottom{
|
||||
height: calc(100% - 50px);
|
||||
div{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f5f7fa;
|
||||
border: 1px solid #dfe4ed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
ul{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: 0;
|
||||
list-style: none; /* 移除默认的点样式 */
|
||||
li {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
/* 针对自定义滚动条样式 */
|
||||
ul::-webkit-scrollbar {
|
||||
cursor: default; /* 对滚动条自定义光标 */
|
||||
width: 5px;
|
||||
}
|
||||
ul::-webkit-scrollbar-thumb {
|
||||
background-color: #888;
|
||||
cursor: pointer; /* 手势效果 */
|
||||
}
|
||||
ul::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #555;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-content-center {
|
||||
width: 60%;
|
||||
padding: 5px;
|
||||
div{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f5f7fa;
|
||||
border: 1px solid #dfe4ed;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-content-right {
|
||||
width: 20%;
|
||||
padding: 5px;
|
||||
div{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f5f7fa;
|
||||
border: 1px solid #dfe4ed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow:auto;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
|
||||
|
||||
|
||||
import { list,del,setPublic} from '@/api/dataCenter/annotationTask'
|
||||
import { creation,del} from '@/api/dataCenter/annotationTask'
|
||||
import addTaskDialog from '../dialog/addTaskDialog'
|
||||
import releaseVersionDialog from '../dialog/releaseVersionDialog.vue'
|
||||
export default {
|
||||
|
|
@ -147,7 +147,7 @@ export default {
|
|||
/**获取数据 **/
|
||||
getList(){
|
||||
this.loading =true
|
||||
list(this.queryParams).then(response => {
|
||||
creation(this.queryParams).then(response => {
|
||||
console.log(response);
|
||||
this.list = response.rows;
|
||||
this.total = response.total;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
|
||||
|
||||
|
||||
import { list,del,setPublic} from '@/api/dataCenter/annotationTask'
|
||||
import { participant,del} from '@/api/dataCenter/annotationTask'
|
||||
import addTaskDialog from '../dialog/addTaskDialog'
|
||||
import releaseVersionDialog from '../dialog/releaseVersionDialog.vue'
|
||||
export default {
|
||||
|
|
@ -147,7 +147,7 @@ export default {
|
|||
/**获取数据 **/
|
||||
getList(){
|
||||
this.loading =true
|
||||
list(this.queryParams).then(response => {
|
||||
participant(this.queryParams).then(response => {
|
||||
console.log(response);
|
||||
this.list = response.rows;
|
||||
this.total = response.total;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@ export default {
|
|||
type: Number,
|
||||
default: 0,
|
||||
required: true,
|
||||
},
|
||||
taskId:{
|
||||
type: Number,
|
||||
default: 0,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -69,6 +74,7 @@ export default {
|
|||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.datasetId = this.datasetId;
|
||||
this.form.taskId = this.taskId;
|
||||
add(this.form).then(response => {
|
||||
this.$modal.msgSuccess("发布成功");
|
||||
this.cancel();
|
||||
|
|
|
|||
|
|
@ -109,7 +109,9 @@ export default {
|
|||
dataType:0,
|
||||
dataSource:0,
|
||||
inputId:0,
|
||||
outputId:0
|
||||
outputId:0,
|
||||
inputPath:'',
|
||||
outputPath:'',
|
||||
}, // 初始化为空
|
||||
rules:{
|
||||
datasetName:[
|
||||
|
|
@ -160,7 +162,10 @@ export default {
|
|||
dataType:0,
|
||||
dataSource:0,
|
||||
inputId:0,
|
||||
outputId:0}; // 清空表单
|
||||
outputId:0,
|
||||
inputPath:'',
|
||||
outputPath:'',
|
||||
}; // 清空表单
|
||||
this.$refs.form.resetFields(); // 调用 Element UI 的重置方法
|
||||
},
|
||||
//选择文件夹
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['dataCenter:dataSet:add']"
|
||||
v-hasPermi="['dataCenter:dataSet:import']"
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['dataCenter:dataSet:remove']"
|
||||
v-hasPermi="['dataCenter:dataSet:file:delete']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
<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 type="index" label="序号" :index="indexMethod" 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">
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:remove']"
|
||||
v-hasPermi="['dataCenter:dataSet:file:delete']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -142,6 +142,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; // 头部高度,可以调整
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<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-form-item label="版本名称" prop="versionName">
|
||||
<el-input
|
||||
v-model="queryParams.fileName"
|
||||
placeholder="请输入数据集名称"
|
||||
v-model="queryParams.versionName"
|
||||
placeholder="请输入版本名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['dataCenter:dataSet:remove']"
|
||||
v-hasPermi="['dataCenter:version:delete']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
|
@ -41,19 +41,23 @@
|
|||
|
||||
<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 type="index" label="序号" :index="indexMethod" width="50" />
|
||||
<el-table-column label="数据集名称" align="center" show-overflow-tooltip prop="datasetName" 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="releaseUserName" 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" show-overflow-tooltip prop="totalCount" min-width="100" />
|
||||
<el-table-column label="任务名称" align="center" show-overflow-tooltip prop="taskName" min-width="100" />
|
||||
<el-table-column label="标注类型" align="center" show-overflow-tooltip prop="annotationType" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.ai_annotate_type" :value="scope.row.annotationType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已审核数量" align="center" show-overflow-tooltip prop="auditedCount" min-width="100" />
|
||||
<el-table-column label="操作" align="center" min-width="100" class-name="small-padding fixed-width" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
@ -61,7 +65,7 @@
|
|||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:remove']"
|
||||
v-hasPermi="['dataCenter:version:delete']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -83,6 +87,7 @@ import {list,remove} from '@/api/dataCenter/releaseVersion'
|
|||
|
||||
|
||||
export default {
|
||||
dicts: ['ai_annotate_type'],
|
||||
name: "DataSet",
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -121,7 +126,16 @@ export default {
|
|||
// 监听窗口大小变化
|
||||
window.addEventListener("resize", this.updateTableHeight);
|
||||
},
|
||||
watch:{
|
||||
datasetId(newVal, oldVal){
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
indexMethod(index){
|
||||
console.log(index);
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + index + 1;
|
||||
},
|
||||
updateTableHeight() {
|
||||
// 设置表格高度为窗口高度减去其他元素高度
|
||||
const headerHeight = 200; // 头部高度,可以调整
|
||||
|
|
@ -131,8 +145,9 @@ export default {
|
|||
/**获取数据 **/
|
||||
getList(){
|
||||
this.loading =true
|
||||
this.queryParams.dataSetId = this.datasetId;
|
||||
this.queryParams.datasetId = this.datasetId;
|
||||
list(this.queryParams).then(response => {
|
||||
console.log(response);
|
||||
this.list = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading =false
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
v-model="queryParams.datasetName"
|
||||
placeholder="请输入数据集名称"
|
||||
clearable
|
||||
v-hasPermi="['dataCenter:dataSet:list']"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['dataCenter:dataSet:add']"
|
||||
v-hasPermi="['dataCenter:dataSet:create']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
|
@ -34,7 +35,7 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['dataCenter:dataSet:remove']"
|
||||
v-hasPermi="['dataCenter:dataSet:delete']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
|
|
@ -42,7 +43,7 @@
|
|||
|
||||
<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 type="index" label="序号" :index="indexMethod" width="50" />
|
||||
<el-table-column label="名称" align="center" show-overflow-tooltip prop="datasetName">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="{
|
||||
|
|
@ -53,7 +54,7 @@
|
|||
</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="latestVersionName" />
|
||||
<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;">
|
||||
|
|
@ -89,37 +90,35 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
||||
@click="handleImport(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:edit']"
|
||||
v-hasPermi="['dataCenter:dataSet:import']"
|
||||
>导入</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleAnnotation(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:edit']"
|
||||
v-hasPermi="['dataCenter:task:create']"
|
||||
>标注</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
||||
@click="downloadFile(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:edit']"
|
||||
v-hasPermi="['dataCenter:dataSet:export']"
|
||||
>导出</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
||||
@click="handleVersion(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:edit']"
|
||||
v-hasPermi="['dataCenter:version:list']"
|
||||
>版本查看</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['dataCenter:sample:remove']"
|
||||
v-hasPermi="['dataCenter:dataSet:delete']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -193,6 +192,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 = 300; // 头部高度,可以调整
|
||||
|
|
|
|||
Loading…
Reference in New Issue