数据集数据源删除

yanzili 3 years ago
parent f611cccb33
commit 3f9b4ff6d6

@ -59,21 +59,15 @@
<li> <li>
<div><i class="el-icon-full-screen mr10"></i>边框 <i class="el-icon-arrow-right ml20"></i></div> <div><i class="el-icon-full-screen mr10"></i>边框 <i class="el-icon-arrow-right ml20"></i></div>
<ul class="three-level"> <ul class="three-level">
<li><a href="#">三级菜单项</a></li> <li><a href="#">122222222</a></li>
<li><a href="#">三级菜单项</a></li> <li><a href="#">222222222222312</a></li>
<li><a href="#">三级菜单项</a></li> <li><a href="#">3ewwwwwrwerwer</a></li>
<li><a href="#">三级菜单项</a></li>
<li><a href="#">三级菜单项</a></li>
</ul> </ul>
</li> </li>
<li> <li>
<div><i class="el-icon-magic-stick mr10"></i>装饰<i class="el-icon-arrow-right ml20"></i></div> <div><i class="el-icon-magic-stick mr10"></i>装饰<i class="el-icon-arrow-right ml20"></i></div>
<ul class="three-level"> <ul class="three-level">
<li><a href="#">三级菜单项</a></li> <!-- <li><a href="#">4</a></li> -->
<li><a href="#">三级菜单项</a></li>
<li><a href="#">三级菜单项</a></li>
<li><a href="#">三级菜单项</a></li>
<li><a href="#">三级菜单项</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -866,7 +860,7 @@ li {
} }
.nav ul { .nav ul {
display: none; // display: none;
background: #00113a; background: #00113a;
position: absolute; position: absolute;
z-index: 10000; z-index: 10000;
@ -881,14 +875,21 @@ li {
display: block; display: block;
} }
.nav > li > .three-level > li > a { .nav > li > .three-level > li > a {
width: 10em; width: 100%;
padding-left: 1em; padding-left: 1em;
padding-right: 1em; padding-right: 1em;
background-color: #0f2030; background-color: #0f2030;
} }
// .nav li .three-level li { .nav li .three-level {
// display: none; padding: 10px 20px;
// } }
.nav li .three-level li {
width: 33.333%;
height: 80px;
float: left;
height: 80px;
display: inline-block;
}
.nav > li > ul > li:hover > a { .nav > li > ul > li:hover > a {
display: block; display: block;
background-color: #182e42; background-color: #182e42;

@ -106,11 +106,12 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="showAddLogModel(scope.row)">编辑</el-button> @click="showAddLogModel(scope.row)">编辑</el-button>
<el-popconfirm :title="'确定删除' + scope.row.sourceNameCode + '吗?'" <!-- <el-popconfirm :title="'确定删除' + scope.row.sourceNameCode + '吗?'"
@onConfirm="delData(scope.row)"> @onConfirm="delData(scope.row)"> -->
<el-button slot="reference" <el-button slot="reference"
@click="delData(scope.row)"
type="text">删除</el-button> type="text">删除</el-button>
</el-popconfirm> <!-- </el-popconfirm> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -376,9 +377,29 @@ export default {
}) })
}, },
async delData (val) { async delData (val) {
const { code } = await deleteDataSource(val) this.$confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
this.$emit('deletelayer')
this.visible = false
const { code, data } = await deleteDataSource(val)
if (code != '200') return if (code != '200') return
this.queryByPage() this.queryByPage()
this.$message({
type: 'success',
message: '删除成功!',
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除',
})
})
}, },
// //
async UserConfirm (formName) { async UserConfirm (formName) {

@ -97,11 +97,12 @@
<el-button size="mini" <el-button size="mini"
type="text" type="text"
@click="addOrEditDataSet(scope.row)">编辑</el-button> @click="addOrEditDataSet(scope.row)">编辑</el-button>
<el-popconfirm :title="'确定删除' + scope.row.setName + '吗?'" <!-- <el-popconfirm :title="'确定删除' + scope.row.setName + '吗?'"
@onConfirm="delect(scope.row)"> @onConfirm="delect(scope.row)"> -->
<el-button slot="reference" <el-button slot="reference"
type="text">删除</el-button> type="text"
</el-popconfirm> @click="delect(scope.row)">删除</el-button>
<!-- </el-popconfirm> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -614,10 +615,29 @@ export default {
this.caseResultTitle = item.setName this.caseResultTitle = item.setName
this.caseResultContent = JSON.parse(item.caseResult) this.caseResultContent = JSON.parse(item.caseResult)
}, },
async delect (row) { delect (row) {
this.$confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
this.$emit('deletelayer')
this.visible = false this.visible = false
const { code, data } = await deleteDataSet(row) const { code, data } = await deleteDataSet(row)
if (code != '200') return if (code != '200') return
this.queryByPage()
this.$message({
type: 'success',
message: '删除成功!',
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除',
})
})
}, },
// , // ,
addOrEditDataSet (row) { addOrEditDataSet (row) {
@ -901,9 +921,11 @@ export default {
if (this.dialogFormVisibleTitle === '新增数据集') { if (this.dialogFormVisibleTitle === '新增数据集') {
const { code } = await addDataSet(this.formData) const { code } = await addDataSet(this.formData)
if (code != '200') return if (code != '200') return
this.queryByPage()
} else { } else {
const { code } = await editDataSet(this.formData) const { code } = await editDataSet(this.formData)
if (code != '200') return if (code != '200') return
this.queryByPage()
} }
this.dialogFormVisible = false this.dialogFormVisible = false
} else { } else {

Loading…
Cancel
Save