提交代码
This commit is contained in:
		
							parent
							
								
									fc3462d20a
								
							
						
					
					
						commit
						a2b12de227
					
				| 
						 | 
					@ -36,14 +36,22 @@
 | 
				
			||||||
    <el-table  style="width: 100%" v-loading="loading"  :data="list"  :height="tableHeight"  @selection-change="handleSelectionChange">
 | 
					    <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="selection" width="50" align="center" />
 | 
				
			||||||
      <el-table-column type="index" label="序号" align="center" min-width="50" />
 | 
					      <el-table-column type="index" label="序号" align="center" min-width="50" />
 | 
				
			||||||
      <el-table-column label="开始时间-结束时间" align="center" show-overflow-tooltip prop="datasetName"/>
 | 
					      <el-table-column label="开始时间-结束时间" align="center" show-overflow-tooltip prop="datasetName" min-width="200">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <span v-show="scope.row.startTime !==null && scope.row.endTime !==null">{{parseTime(scope.row.startTime) +" 至 " +parseTime(scope.row.endTime)}}</span>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="任务标题" align="center" show-overflow-tooltip prop="taskName" />
 | 
					      <el-table-column label="任务标题" align="center" show-overflow-tooltip prop="taskName" />
 | 
				
			||||||
      <el-table-column label="负责人员" align="center" show-overflow-tooltip prop="ownerName" min-width="100"/>
 | 
					      <el-table-column label="负责人员" align="center" show-overflow-tooltip prop="ownerName" min-width="100"/>
 | 
				
			||||||
      <el-table-column label="任务状态" show-overflow-tooltip align="center" prop="annotateTaskStatus" width="160"/>
 | 
					      <el-table-column label="任务状态" show-overflow-tooltip align="center" prop="annotateTaskStatus" width="160">
 | 
				
			||||||
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
 | 
					          <span>{{annotateTaskStatus.find(opt => opt.value === scope.row.annotateTaskStatus).label}}</span>
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="所属数据集" show-overflow-tooltip align="center" prop="datasetName" />
 | 
					      <el-table-column label="所属数据集" show-overflow-tooltip align="center" prop="datasetName" />
 | 
				
			||||||
      <el-table-column label="标注进度(已标注个数/总数)" show-overflow-tooltip min-width="140" align="center" prop="createBy" >
 | 
					      <el-table-column label="标注进度(已标注个数/总数)" show-overflow-tooltip min-width="140" align="center" prop="createBy" >
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <div style="display: flex;align-items: center;justify-content: center;">
 | 
					          <div style="display: flex;align-items: center;">
 | 
				
			||||||
            <!-- 使用 v-if 确保当 annotatedCount > 0 时渲染进度条 -->
 | 
					            <!-- 使用 v-if 确保当 annotatedCount > 0 时渲染进度条 -->
 | 
				
			||||||
            <el-progress
 | 
					            <el-progress
 | 
				
			||||||
              v-if="scope.row.totalCount > 0"
 | 
					              v-if="scope.row.totalCount > 0"
 | 
				
			||||||
| 
						 | 
					@ -51,13 +59,13 @@
 | 
				
			||||||
              :percentage="getPercentage(scope.row)"
 | 
					              :percentage="getPercentage(scope.row)"
 | 
				
			||||||
              style="width: 150px;"/>
 | 
					              style="width: 150px;"/>
 | 
				
			||||||
            <!-- 显示标注进度 -->
 | 
					            <!-- 显示标注进度 -->
 | 
				
			||||||
            <span>({{ (scope.row.totalCount - scope.row.status0Count) + '/' + scope.row.totalCount }})</span>
 | 
					            <span >({{ (scope.row.totalCount - scope.row.status0Count) + '/' + scope.row.totalCount }})</span>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="待审核个数" show-overflow-tooltip align="center" prop="createBy">
 | 
					      <el-table-column label="待审核个数" show-overflow-tooltip align="center" prop="createBy">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <span>{{ scope.row.totalCount - (scope.row.status2Count+scope.row.status3Count)}}</span>
 | 
					            <span>{{ scope.row.totalCount - (scope.row.status2Count+scope.row.status3Count)}}</span>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="操作" align="center" min-width="140" class-name="small-padding fixed-width">
 | 
					      <el-table-column label="操作" align="center" min-width="140" class-name="small-padding fixed-width">
 | 
				
			||||||
| 
						 | 
					@ -115,11 +123,20 @@
 | 
				
			||||||
import { list,del,setPublic} from '@/api/dataCenter/annotationTask'
 | 
					import { list,del,setPublic} from '@/api/dataCenter/annotationTask'
 | 
				
			||||||
import addTaskDialog from '../dialog/addTaskDialog'
 | 
					import addTaskDialog from '../dialog/addTaskDialog'
 | 
				
			||||||
import releaseVersionDialog from '../dialog/releaseVersionDialog.vue'
 | 
					import releaseVersionDialog from '../dialog/releaseVersionDialog.vue'
 | 
				
			||||||
 | 
					import { parseTime } from '@/utils/bonus'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: { releaseVersionDialog, addTaskDialog},
 | 
					  components: { releaseVersionDialog, addTaskDialog},
 | 
				
			||||||
  name: "allTasks",
 | 
					  name: "allTasks",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
 | 
					      annotateTaskStatus:[
 | 
				
			||||||
 | 
					        {label:'未标注',value:'0'},
 | 
				
			||||||
 | 
					        {label:'正在标注',value:'1'},
 | 
				
			||||||
 | 
					        {label:'已标注',value:'2'},
 | 
				
			||||||
 | 
					        {label:'正在审核',value:'3'},
 | 
				
			||||||
 | 
					        {label:'已审核',value:'4'},
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
      taskId:0,
 | 
					      taskId:0,
 | 
				
			||||||
      datasetId: 0,
 | 
					      datasetId: 0,
 | 
				
			||||||
      // 遮罩层
 | 
					      // 遮罩层
 | 
				
			||||||
| 
						 | 
					@ -156,6 +173,7 @@ export default {
 | 
				
			||||||
    window.addEventListener("resize", this.updateTableHeight);
 | 
					    window.addEventListener("resize", this.updateTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    parseTime,
 | 
				
			||||||
    updateTableHeight() {
 | 
					    updateTableHeight() {
 | 
				
			||||||
      // 设置表格高度为窗口高度减去其他元素高度
 | 
					      // 设置表格高度为窗口高度减去其他元素高度
 | 
				
			||||||
      const headerHeight = 300; // 头部高度,可以调整
 | 
					      const headerHeight = 300; // 头部高度,可以调整
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -175,7 +175,7 @@ export default {
 | 
				
			||||||
        delete node.children;
 | 
					        delete node.children;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      return {
 | 
					      return {
 | 
				
			||||||
        id: node.labelId,
 | 
					        id: node.labelName,
 | 
				
			||||||
        label: node.labelName,
 | 
					        label: node.labelName,
 | 
				
			||||||
        children: node.children
 | 
					        children: node.children
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -55,18 +55,9 @@
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="版本名称" align="center" show-overflow-tooltip prop="latestVersionName" />
 | 
					      <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">
 | 
					      <el-table-column label="文件数量" align="center" show-overflow-tooltip prop="createBy" min-width="100">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
           <div style="display: flex;align-items: center;justify-content: center;">
 | 
					          <span>{{scope.row.annotatedCount }}</span>
 | 
				
			||||||
              <!-- 使用 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>
 | 
					        </template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
| 
						 | 
					@ -90,7 +81,6 @@
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
            size="mini"
 | 
					            size="mini"
 | 
				
			||||||
            type="text"
 | 
					            type="text"
 | 
				
			||||||
 | 
					 | 
				
			||||||
            @click="handleImport(scope.row)"
 | 
					            @click="handleImport(scope.row)"
 | 
				
			||||||
            v-hasPermi="['dataCenter:dataSet:import']"
 | 
					            v-hasPermi="['dataCenter:dataSet:import']"
 | 
				
			||||||
          >导入</el-button>
 | 
					          >导入</el-button>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue