feat:数据集管理新增标签列

main
liu.tao3 2 years ago
parent 654e92009f
commit 17d6578268

@ -163,6 +163,16 @@
<span>{{ datasetTypeList.find(type=>type.datasetType===scope.row.datasetType) ? datasetTypeList.find(type=>type.datasetType===scope.row.datasetType).name : '其他' }}</span> <span>{{ datasetTypeList.find(type=>type.datasetType===scope.row.datasetType) ? datasetTypeList.find(type=>type.datasetType===scope.row.datasetType).name : '其他' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="labelIds"
label="标签"
align="center"
show-overflow-tooltip
>
<template slot-scope="scope">
<span>{{getLabels(scope.row.labelIds).join(',')}}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="remark" prop="remark"
label="备注" label="备注"
@ -358,6 +368,13 @@ export default {
} }
}, },
methods: { methods: {
getLabels(list){
const arr=[]
list?.forEach((item)=>{
arr.push(this.labelList.filter(x=>x.id==item)[0]?.labelName)
})
return arr
},
toggleRowSelection () { toggleRowSelection () {
this.$nextTick(() => { this.$nextTick(() => {
const dsIds = this.multipleSelection.map(ds => ds.id) const dsIds = this.multipleSelection.map(ds => ds.id)
@ -515,9 +532,9 @@ export default {
}) })
} }
this.getDataList() this.getDataList()
getLabelList().then(res => { // getLabelList().then(res => {
this.labelList = res // this.labelList = res
}) // })
}, },
// //
addDataset () { addDataset () {
@ -530,6 +547,9 @@ export default {
}, },
// //
getDataList () { getDataList () {
getLabelList().then(res => {
this.labelList = res
})
this.dataListLoading = true this.dataListLoading = true
datasetPage({ datasetPage({
current: this.current, current: this.current,

Loading…
Cancel
Save