2021-03-30 08:28:44 +00:00
|
|
|
import ngModule from '../../module';
|
2020-03-17 13:43:46 +00:00
|
|
|
import Section from 'salix/components/section';
|
2020-01-15 12:07:33 +00:00
|
|
|
import './style.scss';
|
|
|
|
|
2022-02-15 11:59:57 +00:00
|
|
|
export default class Controller extends Section {
|
|
|
|
constructor($element, $) {
|
|
|
|
super($element, $);
|
|
|
|
|
|
|
|
this.getWasteConfig();
|
|
|
|
}
|
|
|
|
|
|
|
|
getWasteConfig() {
|
|
|
|
return this.wasteConfig = JSON.parse(localStorage.getItem('wasteConfig')) || {};
|
|
|
|
}
|
|
|
|
|
|
|
|
setWasteConfig() {
|
|
|
|
localStorage.setItem('wasteConfig', JSON.stringify(this.wasteConfig));
|
|
|
|
}
|
|
|
|
|
|
|
|
toggleHidePanel(detail) {
|
|
|
|
if (!this.wasteConfig[detail.buyer]) {
|
|
|
|
this.wasteConfig[detail.buyer] = {
|
|
|
|
hidden: true
|
|
|
|
};
|
|
|
|
} else
|
|
|
|
this.wasteConfig[detail.buyer].hidden = !this.wasteConfig[detail.buyer].hidden;
|
|
|
|
|
|
|
|
this.setWasteConfig();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-30 08:28:44 +00:00
|
|
|
ngModule.vnComponent('vnItemWasteIndex', {
|
2020-01-15 12:07:33 +00:00
|
|
|
template: require('./index.html'),
|
2022-02-15 11:59:57 +00:00
|
|
|
controller: Controller
|
2020-01-15 12:07:33 +00:00
|
|
|
});
|