层级管理修改
This commit is contained in:
parent
2e5f9029e7
commit
82edb3cc43
|
|
@ -152,7 +152,25 @@ export default {
|
|||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs.addOrEditFormRef.resetFields()
|
||||
// 先重置表单数据到初始状态
|
||||
this.addOrEditForm = {
|
||||
levelSettingName: '',
|
||||
configId: undefined,
|
||||
levelList: [
|
||||
{
|
||||
level: 1,
|
||||
levelName: '一级节点',
|
||||
},
|
||||
{
|
||||
level: 2,
|
||||
levelName: '二级节点',
|
||||
},
|
||||
],
|
||||
}
|
||||
// 等待 DOM 更新后再调用 resetFields
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrEditFormRef && this.$refs.addOrEditFormRef.resetFields()
|
||||
})
|
||||
},
|
||||
|
||||
addNextLevel(index) {
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ export default {
|
|||
|
||||
// 删除按钮
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除层级编号为"' + row.configId + '"的数据项?').then(async () => {
|
||||
this.$modal.confirm('是否确认删除层级名称为"' + row.configName + '"的数据项?').then(async () => {
|
||||
const res = await delLevelApi([row.configId])
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
|
|
|
|||
Loading…
Reference in New Issue