Skip to content

Commit 4f18844

Browse files
committed
refactor🎨 参数设置删除修改
1 parent 937743f commit 4f18844

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/api/system/config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ export function updateConfig(data) {
4444
}
4545

4646
// 删除参数配置
47-
export function delConfig(configId) {
47+
export function delConfig(data) {
4848
return request({
49-
url: '/api/v1/config/' + configId,
50-
method: 'delete'
49+
url: '/api/v1/config',
50+
method: 'delete',
51+
data: data
5152
})
5253
}
5354

src/views/config/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,13 @@ export default {
316316
},
317317
/** 删除按钮操作 */
318318
handleDelete(row) {
319-
const configIds = row.id || this.ids
320-
this.$confirm('是否确认删除参数编号为"' + configIds + '"的数据项?', '警告', {
319+
const data = (row.id && [row.id]) || this.ids
320+
this.$confirm('是否确认删除参数编号为"' + data + '"的数据项?', '警告', {
321321
confirmButtonText: '确定',
322322
cancelButtonText: '取消',
323323
type: 'warning'
324324
}).then(function() {
325-
return delConfig(configIds)
325+
return delConfig({ 'ids': data })
326326
}).then(() => {
327327
this.getList()
328328
this.msgSuccess('删除成功')

0 commit comments

Comments
 (0)