Files
sk_fems_ui/mixin/global.js
Tran Van Dung/(Tran Van Dung)/현장대리인/SK 8f83e1d60c hotfix grid
2025-07-29 14:58:37 +07:00

67 lines
1.7 KiB
JavaScript

import { mapState, mapMutations, mapActions } from 'vuex';
export default {
computed: {
...mapState({
comId: state => state.userInfo.comId,
userInfo: state => state.userInfo,
pageData(state) {
return state.pageData[this.myPrgmId];
},
drawer: state => state.drawer,
}),
// chkIsFind() {
// // 조회 플래그
// return this.pageData.isFind;
// }
},
watch: {
// chkIsFind(val) {
// if (val) this.search();
// }
},
beforeCreate() {
// console.log("mixin beforeCreate");
},
created() {
// console.log("mixin created");
},
mounted() {
// console.log("mixin mounted", this.myPrgmId);
this.layoutInit();
//this.init();
},
beforeDestroy() {
// console.log("mixin beforeDestroy");
this.chkOpenTabList({ key: 'destroy', prgmId: this.myPrgmId });
},
methods: {
...mapMutations({
setPageData: 'setPageData',
setGridData: 'setGridData',
setGridColumn: 'setGridColumn',
setGridOption: 'setGridOption',
setChartXAxisData: 'setChartXAxisData',
setChartSeries: 'setChartSeries',
setChartLegend: 'setChartLegend',
setGridSelectData: 'setGridSelectData',
setChartColorData: 'setChartColorData',
setPageDataInit: 'setPageDataInit',
}),
...mapActions({
postApi: 'modules/list/postApi',
postUpdateApi: 'modules/list/postUpdateApi',
postApiReturn: 'modules/list/postApiReturn',
setTree: 'modules/list/setTree',
chkOpenTabList: 'chkOpenTabList',
getPrgmId: 'getPrgmId',
}),
layoutInit() {
if (this.$refs.searchFilter) {
const searchFilterHeight = this.$refs.searchFilter.offsetHeight;
this.$refs.contents.style.height = `calc(100% - ${searchFilterHeight + 20}px)`;
}
},
//init() {}
},
};