Commit 9bff051d authored by mhw's avatar mhw

新增数据集版本删除

parent 3e584f0b
......@@ -30,4 +30,7 @@ export default class myDataSet {
static delete (sender, params, axiosOption, httpOption) {
return sender.doUrl('/admin/app/datasetManage/delete', 'post', params, axiosOption, httpOption);
}
static deleteVersion (sender, params, axiosOption, httpOption) {
return sender.doUrl('/admin/app/datasetVersion/delete', 'post', params, axiosOption, httpOption);
}
}
......@@ -77,7 +77,7 @@
</template>
</vxe-column>
<vxe-column field="createTime" title="创建时间"></vxe-column>
<vxe-column field="operation" title="操作" width="290">
<vxe-column field="operation" title="操作" width="230">
<template slot-scope="scope">
<el-button type="text" icon="el-icon-menu" @click="all(scope.row)" :size="defaultFormItemSize">详情</el-button>
<el-button v-if="scope.row.releaseStatus==0" type="text" icon="el-icon-plus" @click="addVersions(scope.row)" :size="defaultFormItemSize">新增版本</el-button>
......@@ -91,7 +91,9 @@
<el-dropdown-item v-if="scope.row.releaseStatus!==1" @click.native="putOut(scope.row)">发布</el-dropdown-item>
<el-dropdown-item @click.native="derived(scope.row)">导出</el-dropdown-item>
<el-dropdown-item>清洗</el-dropdown-item>
<el-button type="text" icon="el-icon-delete" @click="delDataset(scope.row)" :size="defaultFormItemSize">删除</el-button>
<el-dropdown-item @click.native="delDataset(scope.row)">删除数据集</el-dropdown-item>
<el-dropdown-item @click.native="delVersions(scope.row)">删除版本</el-dropdown-item>
<!-- <el-dropdown-item @click.native="analyse(scope.row)">分析</el-dropdown-item>
<el-dropdown-item @click.native="enhance(scope.row)">增强</el-dropdown-item> -->
</el-dropdown-menu>
......@@ -205,7 +207,7 @@ export default {
.catch((e) => {})
},
delDataset(item) {
this.$confirm('是否确认删除', '提示', {
this.$confirm('是否确认删除数据集', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......@@ -221,7 +223,23 @@ export default {
})
})
},
delVersions(item) {
this.$confirm('是否确认删除最新版本', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = { versionId: item.versionId }
MyDataSet.deleteVersion(this, params)
.then((res) => {
this.$message.success('删除成功')
this.refresh()
})
.catch((e) => {
console.log(e)
})
})
},
all(row) {
// this.dialogTitle = this.value.datasetName
// this.dialogVisible = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment