Compare commits

..

8 Commits

5 changed files with 40 additions and 22 deletions

View File

@ -23,7 +23,7 @@
<span class="custom-title-4">{{ option.modalTitle }}</span> <span class="custom-title-4">{{ option.modalTitle }}</span>
<a-button icon="close" type="text" @click="dialogOpenCloseEvent(dialog)"></a-button> <a-button icon="close" type="text" @click="dialogOpenCloseEvent(dialog)"></a-button>
</v-card-title> </v-card-title>
<div class="pa-6 pt-0"> <div class="pa-6 pt-0 pb-3">
<v-row align="center"> <v-row align="center">
<v-col :cols="5"> <v-col :cols="5">
<component :is="'SelectBox'" ref="SelectBox1" :labelCols="12" :textCols="12" <component :is="'SelectBox'" ref="SelectBox1" :labelCols="12" :textCols="12"
@ -43,7 +43,7 @@
물리량명 물리량명
</label> </label>
</v-col> </v-col>
<v-col :cols="9"> <v-text-field append-icon="" class="v-input__custom" outlined <v-col :cols="10" class="pr-2"> <v-text-field append-icon="" class="v-input__custom" outlined
:hide-details="true" v-model="searchWord" @keyup.enter="search"><template :hide-details="true" v-model="searchWord" @keyup.enter="search"><template
v-slot:append> v-slot:append>
<!-- Custom SVG icon --> <!-- Custom SVG icon -->
@ -51,8 +51,7 @@
</template></v-text-field></v-col> </template></v-text-field></v-col>
<v-spacer></v-spacer> <v-col cols="2" class="text-right">
<v-col cols="3" class="text-right">
<a-button icon="search" type="primary" @click="search()" <a-button icon="search" type="primary" @click="search()"
class="search-button">조회</a-button> class="search-button">조회</a-button>
@ -63,9 +62,9 @@
</div> </div>
<!-- <div :style="'height: calc(50vh)'"> --> <!-- <div :style="'height: calc(50vh)'"> -->
<div :style="'height: 429px;'"> <div :style="{ height: 'calc(100% - 60px)' }">
<!-- <div :style="{ height: 'calc(100% - 213px)' }"> --> <!-- <div :style="{ height: 'calc(100% - 213px)' }"> -->
<div ref="modalGridParent" class="h100 px-6 py-4"> <div ref="modalGridParent" class="px-6 py-4">
<component :is="loadGrid && dialog ? 'Grid' : null" :gridName="gridName" <component :is="loadGrid && dialog ? 'Grid' : null" :gridName="gridName"
:dataPath="searchParam.modalDataEqpmBaseInfoPop.eqpmBaseInfoPop" :dataPath="searchParam.modalDataEqpmBaseInfoPop.eqpmBaseInfoPop"
:parentPrgmId="parentPrgmId" @getRowsData="getRowData" @dblClick="setUpdate($event)" /> :parentPrgmId="parentPrgmId" @getRowsData="getRowData" @dblClick="setUpdate($event)" />

View File

@ -102,7 +102,7 @@ export default {
this.gridInit(); this.gridInit();
}, },
gridInit() { gridInit() {
const gridHeight = this.$refs.gridParent.offsetHeight; const gridHeight = this.$refs.gridParent.offsetHeight - 37;
const myOptions = { const myOptions = {
columnOptions: { columnOptions: {
@ -113,8 +113,8 @@ export default {
header: { header: {
height: 28, height: 28,
}, },
rowHeight: 38, rowHeight: 37,
minRowHeight: 38, minRowHeight: 37,
selectionUnit: 'row', selectionUnit: 'row',
editingEvent: 'click', editingEvent: 'click',
}; };
@ -441,14 +441,8 @@ export default {
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped >
::v-deep { ::v-deep {
.tui-grid-layer-state {
top: 40px !important;
}
.tui-grid-cell-content-editor { .tui-grid-cell-content-editor {
position: relative; height: 37px !important;
height: 39px !important;
top: 39px !important;
} }
} }

View File

@ -177,6 +177,8 @@ import ThemeSwitch from "@/components/common/ThemeSwitch";
import AdminMenu from "@/components/common/AdminMenu"; import AdminMenu from "@/components/common/AdminMenu";
import FadeLoader from "vue-spinner/src/FadeLoader.vue"; import FadeLoader from "vue-spinner/src/FadeLoader.vue";
import ChangePswdPop from "~/components/common/modal/ChangePswdPop"; import ChangePswdPop from "~/components/common/modal/ChangePswdPop";
import { notification } from 'ant-design-vue';
export default { export default {
components: { components: {
@ -233,6 +235,7 @@ export default {
drawer: (state) => state.drawer, drawer: (state) => state.drawer,
userInfo: (state) => state.userInfo, userInfo: (state) => state.userInfo,
pageData: "pageData", pageData: "pageData",
openTabList: (state) => state.openTabList
}), }),
activeTabs() { activeTabs() {
if (this.routerTabInstance) { if (this.routerTabInstance) {
@ -275,6 +278,11 @@ export default {
var _this = this; var _this = this;
const nv = newVal[0]; const nv = newVal[0];
const ov = oldVal[0]; const ov = oldVal[0];
// Check open tab at menu
if (this.openTabList.length > 7 && !this.openTabList.some(tab => tab.to === to.fullPath)) {
return;
}
if (nv !== ov) { if (nv !== ov) {
if (!nv) { if (!nv) {
// 중복클릭 시 발생 상황 기존 값을 다시 넣어줌 // 중복클릭 시 발생 상황 기존 값을 다시 넣어줌
@ -395,6 +403,24 @@ export default {
this.$router.beforeEach((to, from, next) => { this.$router.beforeEach((to, from, next) => {
_this.isLoading = true; _this.isLoading = true;
const tabList = this.openTabList;
const targetPrgmId = to.query.prgmId;
const currentPrgmId = from.query.prgmId;
const isTabAlreadyOpen = tabList.includes(targetPrgmId);
const isSamePage = to.fullPath === from.fullPath || targetPrgmId === currentPrgmId;
if (tabList.length >= 7 && !isTabAlreadyOpen && !isSamePage) {
notification.error({
message: 'Error',
description: '탭을 7개 이상 열 수 없습니다.',
});
next(false);
return;
}
// console.log('$router.beforeEach...'); // console.log('$router.beforeEach...');
// console.log('state : ', _this.$store.state) // console.log('state : ', _this.$store.state)
// console.log('activeActionCnt : ', _this.$store.state.activeActionCnt) // console.log('activeActionCnt : ', _this.$store.state.activeActionCnt)

View File

@ -561,12 +561,6 @@ export default {
columnOptions: { columnOptions: {
resizable: true, resizable: true,
}, },
rowHeaders: [
{
type: 'rowNum',
align: 'right',
},
],
header: { header: {
height: 37, height: 37,
}, },
@ -623,6 +617,7 @@ export default {
} }
} }
const myColumns = [ const myColumns = [
{ header: 'No.', name: 'rowSeq', align: 'right', width: 90 },
{ {
header: 'FAB', header: 'FAB',
name: 'fabNm', name: 'fabNm',

View File

@ -136,6 +136,10 @@ export const state = () => Object.assign({}, INIT_STATE);
export const mutations = { export const mutations = {
// 활성화 페이지 메뉴정보 set // 활성화 페이지 메뉴정보 set
setActiveMenuInfo(state, payload) { setActiveMenuInfo(state, payload) {
const isTabAlreadyOpen = state.openTabList.includes(payload.prgmId);
if(state.openTabList.length >= 7 && !isTabAlreadyOpen) {
return;
}
// console.log("======================================================="); // console.log("=======================================================");
// console.log( // console.log(
// ">>>>>>>>>> ", // ">>>>>>>>>> ",