mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-07-05 10:08:15 +08:00
@ -67,11 +67,11 @@ export default {
|
||||
this.loading = true
|
||||
try {
|
||||
await this.$API.sys_api.sync.post()
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success('同步成功')
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
this.loading = false
|
||||
},
|
||||
},
|
||||
|
@ -133,21 +133,21 @@ export default {
|
||||
const res = await this.$API.sys_config.bulkDelete.post({
|
||||
items: this.selection,
|
||||
})
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
loading?.close()
|
||||
},
|
||||
async changeSwitch(event, row) {
|
||||
try {
|
||||
await this.$API.sys_config.edit.post(row)
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`操作成功`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
filterChange(data) {
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
@ -160,10 +160,10 @@ export default {
|
||||
try {
|
||||
const res = await this.$API.sys_config.delete.post({ id: row.id })
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
this.$refs.table.refresh()
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
onSearch(form) {
|
||||
if (Array.isArray(form.dy.createdTime)) {
|
||||
|
@ -129,11 +129,11 @@ export default {
|
||||
async changeSwitch(event, row) {
|
||||
try {
|
||||
await this.$API.sys_dept.setEnabled.post(row)
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`操作成功`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
async batchDel() {
|
||||
let loading
|
||||
@ -145,11 +145,11 @@ export default {
|
||||
const res = await this.$API.sys_dept.bulkDelete.post({
|
||||
items: this.selection,
|
||||
})
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
loading?.close()
|
||||
},
|
||||
filterChange(data) {
|
||||
@ -162,10 +162,10 @@ export default {
|
||||
try {
|
||||
const res = await this.$API.sys_dept.delete.post({ id: row.id })
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
this.$refs.table.refresh()
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
onSearch(form) {
|
||||
if (Array.isArray(form.dy.createdTime)) {
|
||||
|
@ -139,11 +139,11 @@ export default {
|
||||
async rowDel(row) {
|
||||
try {
|
||||
const res = await this.$API.sys_dic.deleteContent.post({ id: row.id })
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -241,15 +241,14 @@ export default {
|
||||
try {
|
||||
await this.$API.sys_job.setEnabled.post(row)
|
||||
this.$message.success(`操作成功`)
|
||||
this.$refs.table.refresh()
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
async execute(row) {
|
||||
try {
|
||||
await this.$API.sys_job.execute.post({ id: row.id })
|
||||
this.$refs.table.refresh()
|
||||
this.$notify.success({
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `<div id="countdown">已发起执行请求,5 秒后弹出执行结果</div>`,
|
||||
@ -270,16 +269,17 @@ export default {
|
||||
.innerText.replace(countdown, `${parseInt(countdown) - 1}`)
|
||||
}, 1000)
|
||||
} catch {}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
//删除
|
||||
async rowDel(row) {
|
||||
try {
|
||||
const res = await this.$API.sys_job.delete.post({ id: row.id })
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
//批量删除
|
||||
async batchDel() {
|
||||
@ -292,12 +292,12 @@ export default {
|
||||
const res = await this.$API.sys_job.bulkDelete.post({
|
||||
items: this.selection,
|
||||
})
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
loading?.close()
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
|
||||
//搜索
|
||||
|
@ -143,11 +143,11 @@ export default {
|
||||
async rowDel(row) {
|
||||
try {
|
||||
const res = await this.$API.sys_sitemsg.delete.post({ id: row.id })
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
//批量删除
|
||||
async batchDel() {
|
||||
@ -160,12 +160,12 @@ export default {
|
||||
const res = await this.$API.sys_sitemsg.bulkDelete.post({
|
||||
items: this.selection,
|
||||
})
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
loading?.close()
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
|
||||
//搜索
|
||||
|
@ -177,11 +177,11 @@ export default {
|
||||
async changeSwitch(event, row) {
|
||||
try {
|
||||
await this.$API.sys_role.setEnabled.post(row)
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`操作成功`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
async batchDel() {
|
||||
let loading
|
||||
@ -193,12 +193,12 @@ export default {
|
||||
const res = await this.$API.sys_role.bulkDelete.post({
|
||||
items: this.selection,
|
||||
})
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
loading?.close()
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
filterChange(data) {
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
@ -210,10 +210,10 @@ export default {
|
||||
try {
|
||||
const res = await this.$API.sys_role.delete.post({ id: row.id })
|
||||
this.$message.success(`删除 ${res.data} 项`)
|
||||
this.$refs.table.refresh()
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
onSearch(form) {
|
||||
if (Array.isArray(form.dy.createdTime)) {
|
||||
|
@ -139,11 +139,11 @@ export default {
|
||||
async changeSwitch(event, row) {
|
||||
try {
|
||||
await this.$API.sys_user.setEnabled.post(row)
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success(`操作成功`)
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
filterChange(data) {
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
|
Reference in New Issue
Block a user