|
@ -98,26 +98,17 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 获取数据前设置好接口地址 |
|
|
|
|
|
[CRUD.HOOK.afterDelete]() { |
|
|
|
|
|
console.log(this.$parent) |
|
|
|
|
|
if (this.$parent) { |
|
|
|
|
|
this.$emit('treeRefresh') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[CRUD.HOOK.afterSubmit]() { |
|
|
|
|
|
this.$emit('treeRefresh') |
|
|
return true |
|
|
return true |
|
|
}, |
|
|
}, |
|
|
[CRUD.HOOK.afterToEdit]() { |
|
|
|
|
|
console.log(this.$parent) |
|
|
|
|
|
if (this.$parent) { |
|
|
|
|
|
this.$emit('treeRefresh') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[CRUD.HOOK.afterDelete]() { |
|
|
|
|
|
this.$emit('treeRefresh') |
|
|
return true |
|
|
return true |
|
|
}, |
|
|
}, |
|
|
[CRUD.HOOK.afterToAdd]() { |
|
|
|
|
|
console.log(this.$parent) |
|
|
|
|
|
if (this.$parent) { |
|
|
|
|
|
this.$emit('treeRefresh') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 获取数据前设置默认参数 |
|
|
|
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
|
|
|
this.crud.query.id = this.dictId |
|
|
return true |
|
|
return true |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|