Compare commits

...

2 Commits

Author SHA1 Message Date
guoyue c8d315934a 基础设施,左侧树增加tips显示 2022-11-03 17:58:46 +08:00
guoyue 3e1ff71686 删除增加二次确认 2022-11-03 17:58:28 +08:00
7 changed files with 161 additions and 78 deletions

View File

@ -356,6 +356,11 @@ export default {
deleteHandle2(id) {
console.log('删除========================》', id, this.dataListSelections)
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const ids = []
if (id) {
ids.push(id)
@ -368,8 +373,18 @@ export default {
}
this.$http.post('/resource/delete', { ids: ids }).then(res => {
console.log('删除成功', res)
this.$message({
type: 'success',
message: '删除成功!'
});
this.getDataList()
})
}).catch(() => {
// this.$message({
// type: 'info',
// message: '已取消删除'
// });
});
},
// 导出
exportHandle() {

View File

@ -70,7 +70,7 @@ export default {
mixinViewModuleOptions: {
getDataListURL: "/fuse/page",
exportURL: "/ability/bsabilityai/export",
deleteURL: "/fuse",
deleteURL: "/fuse/delete",
getDataListIsPage: true,
deleteIsBatch: false,
},
@ -93,6 +93,11 @@ export default {
},
methods: {
deleteRow(id) {
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.delete('/fuse/delete', {
data: [id]
}).then(res => {
@ -111,6 +116,8 @@ export default {
}).catch(err => {
this.$message.error(err);
})
}).catch(() => {
});
},
//
searchData() {

View File

@ -19,7 +19,11 @@
<path d="M512 624a112 112 0 1 0 0-224 112 112 0 0 0 0 224z" p-id="2157"
fill="#0058e1"></path>
</svg>
<span class="name">{{ val.name }}({{ val.channelCount }})</span>
<el-tooltip effect="dark" placement="top-start">
<div class="tooltip-name" slot="content">{{val.name}}</div>
<span class="name">{{ val.name }}</span>
</el-tooltip>
<span class="num">({{ val.channelCount }})</span>
</div>
<span v-if="item.children.length < 0">{{ val.total }}</span>
<span v-else>
@ -311,4 +315,21 @@ export default {
}
}
}
.name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
word-break: break-all;
width: 190px;
text-align: left;
}
.num {
width: 40px;
text-align: right;
}
.tooltip-name {
max-width: 300px;
}
</style>

View File

@ -12,8 +12,8 @@
v-if="dataInfo.length > 1">删除
</el-button>
</el-form-item>
<el-button class="add-btn" size="small" v-if="index == dataInfo.length - 1" @click="addItem"
type="primary">添加
<el-button class="add-btn" size="small" v-if="index == dataInfo.length - 1" @click="addItem" type="primary">
添加
</el-button>
</div>
</div>
@ -97,8 +97,19 @@ export default {
})
},
//
deleteItem(list, index) {
deleteItem(index) {
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.dataInfo.splice(index, 1)
}).catch(() => {
});
}
}
}

View File

@ -16,8 +16,8 @@
v-if="!disabledType && dataInfo.length > 1">删除
</el-button>
</el-form-item>
<el-button class="add-btn" size="small"
v-if="!disabledType && index == dataInfo.length - 1" @click="addItem" type="primary">添加
<el-button class="add-btn" size="small" v-if="!disabledType && index == dataInfo.length - 1"
@click="addItem" type="primary">添加
</el-button>
</div>
@ -100,8 +100,19 @@ export default {
})
},
//
deleteItem(list, index) {
deleteItem(index) {
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.dataInfo.splice(index, 1)
}).catch(() => {
});
}
}
}

View File

@ -84,6 +84,11 @@ export default {
},
methods: {
deleteRow(id) {
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.delete('/fuse/delete', {
data: [id]
}).then(res => {
@ -102,6 +107,8 @@ export default {
}).catch(err => {
this.$message.error(err);
})
}).catch(() => {
});
},
//
searchData() {

View File

@ -110,8 +110,19 @@ export default {
})
},
//
deleteItem(list, index) {
deleteItem(index) {
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.dataInfo.splice(index, 1)
}).catch(() => {
});
}
}
}