5334-editDepartment #1521
|
@ -4,6 +4,10 @@ import Section from 'salix/components/section';
|
||||||
class Controller extends Section {
|
class Controller extends Section {
|
||||||
$postLink() {
|
$postLink() {
|
||||||
this.$.treeview.fetch();
|
this.$.treeview.fetch();
|
||||||
|
if (this.$params.q) {
|
||||||
|
const search = JSON.parse(this.$params.q);
|
||||||
|
this.onSearch(search);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onSearch(params) {
|
onSearch(params) {
|
||||||
|
|
|
@ -4,14 +4,6 @@
|
||||||
limit="20"
|
limit="20"
|
||||||
order="id">
|
order="id">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<vn-portal slot="topbar">
|
|
||||||
<vn-searchbar
|
|
||||||
vn-focus
|
|
||||||
info="Search departments by id, name or code"
|
|
||||||
on-search="$ctrl.onSearch($params)"
|
|
||||||
base-state="worker.department">
|
|
||||||
</vn-searchbar>
|
|
||||||
</vn-portal>
|
|
||||||
<ui-view>
|
<ui-view>
|
||||||
<vn-worker-department-index></vn-worker-department-index>
|
<vn-worker-department-index></vn-worker-department-index>
|
||||||
</ui-view>
|
</ui-view>
|
||||||
|
|
Loading…
Reference in New Issue