update
This commit is contained in:
@@ -147,6 +147,12 @@ export default {
|
|||||||
eventBus.$on('home-update-page', (data) => {
|
eventBus.$on('home-update-page', (data) => {
|
||||||
that.onUpdatePage(data);
|
that.onUpdatePage(data);
|
||||||
});
|
});
|
||||||
|
eventBus.$on('home::sidebar::click-item', (data) => {
|
||||||
|
that.OnClickSidebarItem(that.getItemMenuByValue("page",data));
|
||||||
|
});
|
||||||
|
eventBus.$on('home::update-settings', (data) => {
|
||||||
|
that.updateSettings(data);
|
||||||
|
});
|
||||||
eventBus.$on('home-update-datacase', (data) => {
|
eventBus.$on('home-update-datacase', (data) => {
|
||||||
that.onUpdateDataCase(data);
|
that.onUpdateDataCase(data);
|
||||||
});
|
});
|
||||||
@@ -394,6 +400,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
pageFactory(item){
|
pageFactory(item){
|
||||||
this.filters = [];
|
this.filters = [];
|
||||||
|
this.lastPage = this.page;
|
||||||
this.page = item.item.page;
|
this.page = item.item.page;
|
||||||
this.filters = item.item.filters;
|
this.filters = item.item.filters;
|
||||||
this.pageId = item.item.id;
|
this.pageId = item.item.id;
|
||||||
@@ -423,7 +430,6 @@ export default {
|
|||||||
&& this.$refs["component"].updateView) {
|
&& this.$refs["component"].updateView) {
|
||||||
this.$refs["component"].updateView(this.pageData);
|
this.$refs["component"].updateView(this.pageData);
|
||||||
}
|
}
|
||||||
this.lastPage = this.page;
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Click sidebar menu item handler
|
* Click sidebar menu item handler
|
||||||
|
|||||||
@@ -387,9 +387,6 @@ export default {
|
|||||||
id: this.id
|
id: this.id
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
Event.$on('inbox::update-filters', (data) => {
|
|
||||||
that.updateSettings(data);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
columns: function (val) {
|
columns: function (val) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<b-form-group>
|
<b-form-group>
|
||||||
<b-form-checkbox-group
|
<b-form-checkbox-group
|
||||||
v-model="localSelected"
|
v-model="localSelected"
|
||||||
:options="options"
|
:options="results"
|
||||||
value-field="key"
|
value-field="key"
|
||||||
text-field="value"
|
text-field="value"
|
||||||
name="flavour-2a"
|
name="flavour-2a"
|
||||||
@@ -60,17 +60,19 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ProcessPopover",
|
name: "ProcessPopover",
|
||||||
props: ["target", "options"],
|
props: ["target"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
timeCounter:"",
|
options: [],
|
||||||
text: "",
|
text: "",
|
||||||
|
results: [],
|
||||||
allColumns: false,
|
allColumns: false,
|
||||||
localSelected: [],
|
localSelected: [],
|
||||||
selected: [],
|
selected: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.results = this.options;
|
||||||
this.localSelected = this.selected;
|
this.localSelected = this.selected;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -80,6 +82,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
setOptions(options) {
|
setOptions(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
this.results = options;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Setter the selected options
|
* Setter the selected options
|
||||||
@@ -115,11 +118,14 @@ export default {
|
|||||||
* Search in the column name
|
* Search in the column name
|
||||||
*/
|
*/
|
||||||
search() {
|
search() {
|
||||||
let that = this;
|
let txt = this.text.toLowerCase(),
|
||||||
clearTimeout(this.timeCounter);
|
val,
|
||||||
this.timeCounter = setTimeout(()=>{
|
opts = [];
|
||||||
that.$emit("onChange", this.text.toLowerCase())
|
opts = _.filter(this.options, function (o) {
|
||||||
}, 500);
|
val = o.value.toLowerCase();
|
||||||
|
return val.search(txt) != -1;
|
||||||
|
});
|
||||||
|
this.results = opts;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Toogle all options in popover
|
* Toogle all options in popover
|
||||||
@@ -131,7 +137,7 @@ export default {
|
|||||||
res.push(o.key);
|
res.push(o.key);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.localSelected = res;
|
this.selected = res;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Handler when change options event
|
* Handler when change options event
|
||||||
|
|||||||
@@ -421,11 +421,13 @@ export default {
|
|||||||
},
|
},
|
||||||
value: this.currentSelection["PRO_ID"],
|
value: this.currentSelection["PRO_ID"],
|
||||||
};
|
};
|
||||||
eventBus.$emit("inbox::update-filters", {
|
eventBus.$emit("home::update-settings", {
|
||||||
params: [obj],
|
data: [obj],
|
||||||
refresh: false,
|
key: "filters",
|
||||||
|
page: taskList,
|
||||||
|
type: "normal",
|
||||||
});
|
});
|
||||||
eventBus.$emit("home-update-page", taskList);
|
eventBus.$emit("home::sidebar::click-item", taskList);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user