{"version":3,"sources":["webpack:///./src/mixins/plan/edit/PlanEditResultMixin.ts","webpack:///./src/enums/PlanEditResultShiftEnum.ts","webpack:///./src/configs/PlanEditResultConfig.ts","webpack:///./src/enums/PlanEditResultConfigTabTypesEnum.ts","webpack:///./src/views/journals/planEdit/planEditTabs/result/PlanEditResult.vue?3702","webpack:///./src/views/journals/planEdit/planEditTabs/result/PlanEditResult.vue","webpack:///./src/views/journals/planEdit/planEditTabs/result/PlanEditResult.vue?84eb","webpack:///./src/views/journals/planEdit/planEditTabs/result/PlanEditResult.vue?18de","webpack:///./src/enums/PlanEditResultConfigComponentsEnum.ts"],"names":["PlanEditResultMixin","key","value","this","componentsList","find","item","component","title","requestParams","api","depth","activeTabs","Tabs","componentKey","props","tabs","getComponentRequestParams","map","param","includes","dependencieTab","idGridConfigItem","isCompressed","getComponentData","disabledDefault","shifts","id","First","description","$t","Last","Object","assign","byDefault","disabled","ets","equipmentTypesFromCatalogue","equipment","Id","Description","wvs","warehouseVeneerDescriptions","wv","wps","warehousePlywoodDescriptions","wp","isEditing","PlanResSummaryOrderBalance","$api","journals","planResSummaryOrderBalance","PlanResSummaryPlywoodBalance","planResSummaryPlywoodBalance","PlanResSummaryWarehouseVeneer","planResSummaryWarehouseVeneer","PlanResSummaryIndicator","PlanResSummaryList","EquipmentType","getDescriptions","getShiftsDescriptions","Shift","getEquipmentTypesDescriptions","Equipment","PlanResByShiftWarehouseVeneer","getWarehouseVeneerDescriptions","WarehouseVeneer","PlanResByShiftOrderBalance","customTitle","planResByShiftOrderBalance","PlanResByShiftPlywoodBalance","planResByShiftPlywoodBalance","PlanResByShiftRecommendation","planResByShiftRecommendation","computed","PlanEditResultShiftEnum","config","name","type","User","content","data","idWarehouseVeneer","PlanEditResultConfigTabTypesEnum","routePath","defaultConfig","oldValue","result","increasePlanCalculationCount","getRoutePath","init","planEdit","IdLastPlanRes","$router","replace","path","$route","catch","route","idPlanRes","hasOwnConfig","currentConfig","Value","JSON","parse","planCalculationCount","deep","components","PlanResultItem","methods","_vm","_h","$createElement","_c","_self","attrs","loading","_l","i","tabData","on","onUpdateRoute","_e","VCard","PlanEditResultConfigComponentsEnum"],"mappings":"4TAgBqBA,EAArB,+KAmKqBC,GACb,IAAIC,EAAQC,KAAKC,eAAeC,MAAK,SAAAC,GAAI,OAAIA,EAAKL,MAAQA,KAC1D,OAAOC,GAAgB,OArK/B,mCAwKiBD,GACT,IAAIC,EAAQC,KAAKC,eAAeC,MAAK,SAAAC,GAAI,OAAIA,EAAKL,MAAQA,KAC1D,OAAOC,EAAQA,EAAMK,UAAY,OA1KzC,wCA6KsBN,GACd,IAAIC,EAAQC,KAAKC,eAAeC,MAAK,SAAAC,GAAI,OAAIA,EAAKL,MAAQA,KAC1D,OAAOC,EAAQA,EAAMM,MAAQ,OA/KrC,gDAkL8BP,GACtB,IAAIC,EAAQC,KAAKC,eAAeC,MAAK,SAAAC,GAAI,OAAIA,EAAKL,MAAQA,KAC1D,OAAOC,EAAQA,EAAMO,cAAgB,OApL7C,sCAuLoBR,GACZ,IAAIC,EAAQC,KAAKC,eAAeC,MAAK,SAAAC,GAAI,OAAIA,EAAKL,MAAQA,KAC1D,OAAOC,EAAQA,EAAMQ,IAAM,OAzLnC,iCA4LeT,EAAyCU,EAAeC,GAAiB,QAChF,OAAIX,IAAQ,IAAmCY,KACpC,CACHC,aAAcb,EACdc,MAAO,CACHJ,QACAK,KAAM,KAIP,CACHF,aAAcb,EACdc,MAAO,CACHJ,SAEJF,cAAa,UAAEN,KAAKc,0BAA0BhB,UAAjC,aAAE,EAAqCiB,KAAI,SAAAC,GACpD,IAAIjB,GAAS,EAEb,OADIU,EAAWQ,SAASD,EAAME,kBAAiBnB,GAAS,GACjD,CACHD,IAAKkB,EAAMlB,IACXC,YAGRoB,iBAAkB,KAClBC,aAAY,UAAEpB,KAAKqB,iBAAiBvB,UAAxB,aAAE,EAA4BsB,gBApN1D,4CAwN0BE,GAClB,IAAMC,EAAS,CACX,CACIC,GAAI,IAAw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,EAAc,aAflC,YAAU,CACP7B,KAAM,qBACN8B,WAAY,CACRC,eAAA,KAEJlC,SAAU,uCACH,YAAS,WAAY,CAAC,WAAY,0BAClC,YAAS,iBAAkB,CAAC,UAAW,mBACvC,YAAW,iBAAkB,CAAC,kBAErCmC,QAAS,2BACF,YAAW,iBAAkB,CAAC,UAC9B,YAAa,WAAY,CAAC,qCAGhB,G,6CEjCjBtG,EAAY,YACd,GHRW,WAAa,IAAIuG,EAAI3G,KAAS4G,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,SAAS,CAAChH,IAAI6G,EAAI7G,IAAIkH,MAAM,CAAC,QAAUL,EAAIM,QAAU,UAAY,KAAK,KAAO,KAAK,CAAEN,EAAU,OAAEA,EAAIO,GAAIP,EAAU,QAAE,SAASxG,EAAKgH,GAAG,OAAOL,EAAG,mBAAmB,CAAChH,IAAIqH,EAAEH,MAAM,CAAC,KAAO7G,EAAK,MAAQwG,EAAI1B,UAAU,WAAW0B,EAAIS,SAASC,GAAG,CAAC,eAAeV,EAAIW,oBAAmBX,EAAIY,MAAM,KAC3W,IGUpB,EACA,KACA,KACA,MAIa,UAAAnH,EAAiB,QAKhC,IAAkBA,EAAW,CAACoH,QAAA,K,kCCvB9B,IAAKC,GAAL,SAAKA,GACD,mBACA,+DACA,mEACA,qEACA,qCACA,qEACA,yDACA,+DACA,mEACA,mEACA,gDAXJ,CAAKA,MAAkC,KAcxB","file":"js/chunk-8b158696.541ca093.js","sourcesContent":["import {Component, Vue} from 'vue-property-decorator';\r\nimport {mapState} from 'vuex';\r\nimport PlanEditResultConfigComponentsEnum from '@/enums/PlanEditResultConfigComponentsEnum';\r\nimport {PlanEditResultConfigItem} from '@/models/PlanEditResultConfigModel';\r\nimport {WarehouseDescription} from '@/models/PlanEditModel';\r\nimport PlanEditResultModel from '@/models/PlanEditResultModel';\r\nimport PlanEditResultConfigTabTypesEnum from '@/enums/PlanEditResultConfigTabTypesEnum';\r\nimport PlanEditResultShiftEnum from '@/enums/PlanEditResultShiftEnum';\r\n\r\n@Component({\r\n computed: {\r\n ...mapState('planEditResult', ['isEditing']),\r\n ...mapState('planEditResult', ['result', 'equipmentTypesFromCatalogue']),\r\n ...mapState('planEdit', ['warehouseVeneerDescriptions', 'warehousePlywoodDescriptions']),\r\n },\r\n})\r\nexport default class PlanEditResultMixin extends Vue {\r\n public isEditing!: boolean;\r\n public result!: PlanEditResultModel;\r\n public warehouseVeneerDescriptions!: WarehouseDescription[];\r\n public warehousePlywoodDescriptions!: WarehouseDescription[];\r\n public equipmentTypesFromCatalogue!: WarehouseDescription[];\r\n\r\n get byDefault() {\r\n return {id: -1, description: this.$t('Common.FromTab')};\r\n }\r\n\r\n get componentsList() {\r\n return [\r\n {\r\n key: PlanEditResultConfigComponentsEnum.Tabs,\r\n component: () =>\r\n this.isEditing\r\n ? import('@/views/journals/planEdit/planEditTabs/result/edit/PlanEditResultEditTabs.vue')\r\n : import('@/views/journals/planEdit/planEditTabs/result/PlanEditResultTabs.vue'),\r\n title: this.$t('Documents.Plan.Tabs'),\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResSummaryOrderBalance,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResSummaryOrderBalance.vue'),\r\n title: this.$t('Documents.PlanRes.OrderBalance'),\r\n api: this.$api.journals.planResSummaryOrderBalance,\r\n requestParams: [],\r\n isCompressed: false,\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResSummaryPlywoodBalance,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResSummaryPlywoodBalance.vue'),\r\n title: this.$t('Documents.PlanRes.PlywoodBalance'),\r\n api: this.$api.journals.planResSummaryPlywoodBalance,\r\n requestParams: [],\r\n isCompressed: false,\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResSummaryWarehouseVeneer,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResSummaryWarehouseVeneer.vue'),\r\n title: this.$t('Documents.PlanRes.VeneerBalance'),\r\n api: this.$api.journals.planResSummaryWarehouseVeneer,\r\n requestParams: [],\r\n isCompressed: false,\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResSummaryIndicator,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResSummaryIndicator.vue'),\r\n title: this.$t('Common.Summary'),\r\n requestParams: [],\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResSummaryList,\r\n component: () => import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResSummaryList.vue'),\r\n title: this.$t('Common.TargetSummary'),\r\n requestParams: [],\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.EquipmentType,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/equipmentType/EquipmentType.vue'),\r\n title: this.$t('Documents.PlanRes.EquipmentTypePlanByShift'),\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n getDescriptions: this.getShiftsDescriptions,\r\n title: this.$t('Catalogues.ShiftTml.Shift'),\r\n dependencieTab: PlanEditResultConfigTabTypesEnum.Shift,\r\n },\r\n {\r\n key: 'idEquipmentType',\r\n getDescriptions: this.getEquipmentTypesDescriptions,\r\n title: this.$t('Catalogues.Equipments.EquipmentType.NameSingle'),\r\n dependencieTab: PlanEditResultConfigTabTypesEnum.Equipment,\r\n },\r\n ],\r\n isCompressed: false,\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResByShiftWarehouseVeneer,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResByShiftWarehouseVeneer.vue'),\r\n title: this.$t('Documents.PlanRes.VeneerBalanceByShift'),\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n getDescriptions: this.getShiftsDescriptions,\r\n title: this.$t('Catalogues.ShiftTml.Shift'),\r\n dependencieTab: PlanEditResultConfigTabTypesEnum.Shift,\r\n },\r\n {\r\n key: 'idWarehouseVeneer',\r\n getDescriptions: this.getWarehouseVeneerDescriptions,\r\n title: this.$t('Catalogues.Warehouses.WarehouseVeneer.NameSingle'),\r\n dependencieTab: PlanEditResultConfigTabTypesEnum.WarehouseVeneer,\r\n },\r\n ],\r\n isCompressed: false,\r\n // api: this.$api.journals.planResByShiftWarehouseVeneer\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResByShiftOrderBalance,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResByShiftOrderBalance.vue'),\r\n title: this.$t('Documents.PlanRes.OrderBalanceByShift'),\r\n customTitle: this.$t('Documents.PlanRes.OrderBalance'),\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n getDescriptions: this.getShiftsDescriptions,\r\n title: this.$t('Catalogues.ShiftTml.Shift'),\r\n dependencieTab: PlanEditResultConfigTabTypesEnum.Shift,\r\n },\r\n ],\r\n api: this.$api.journals.planResByShiftOrderBalance,\r\n isCompressed: false,\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResByShiftPlywoodBalance,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResByShiftPlywoodBalance.vue'),\r\n title: this.$t('Documents.PlanRes.PlywoodBalanceByShift'),\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n getDescriptions: this.getShiftsDescriptions,\r\n title: this.$t('Catalogues.ShiftTml.Shift'),\r\n dependencieTab: PlanEditResultConfigTabTypesEnum.Shift,\r\n },\r\n ],\r\n api: this.$api.journals.planResByShiftPlywoodBalance,\r\n isCompressed: false,\r\n },\r\n {\r\n key: PlanEditResultConfigComponentsEnum.PlanResByShiftRecommendation,\r\n component: () =>\r\n import('@/views/journals/planEdit/planEditTabs/result/tables/PlanResByShiftRecommendation.vue'),\r\n title: this.$t('Documents.PlanRes.RecommendationByShift'),\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n getDescriptions: this.getShiftsDescriptions,\r\n title: this.$t('Catalogues.ShiftTml.Shift'),\r\n dependencieTab: PlanEditResultConfigTabTypesEnum.Shift,\r\n },\r\n ],\r\n api: this.$api.journals.planResByShiftRecommendation,\r\n isCompressed: false,\r\n },\r\n ];\r\n }\r\n\r\n get descriptions() {\r\n return this.componentsList.map(item => ({\r\n key: item.key,\r\n description: item.title,\r\n }));\r\n }\r\n\r\n getComponentData(key: PlanEditResultConfigComponentsEnum) {\r\n let value = this.componentsList.find(item => item.key === key);\r\n return value ? value : null;\r\n }\r\n\r\n getComponent(key: PlanEditResultConfigComponentsEnum) {\r\n let value = this.componentsList.find(item => item.key === key);\r\n return value ? value.component : null;\r\n }\r\n\r\n getComponentTitle(key: PlanEditResultConfigComponentsEnum) {\r\n let value = this.componentsList.find(item => item.key === key);\r\n return value ? value.title : null;\r\n }\r\n\r\n getComponentRequestParams(key: PlanEditResultConfigComponentsEnum): any[] | null | undefined {\r\n let value = this.componentsList.find(item => item.key === key);\r\n return value ? value.requestParams : null;\r\n }\r\n\r\n getComponentApi(key: PlanEditResultConfigComponentsEnum) {\r\n let value = this.componentsList.find(item => item.key === key);\r\n return value ? value.api : null;\r\n }\r\n\r\n createItem(key: PlanEditResultConfigComponentsEnum, depth: number, activeTabs: any[]): PlanEditResultConfigItem {\r\n if (key === PlanEditResultConfigComponentsEnum.Tabs)\r\n return {\r\n componentKey: key,\r\n props: {\r\n depth,\r\n tabs: [],\r\n },\r\n };\r\n else\r\n return {\r\n componentKey: key,\r\n props: {\r\n depth,\r\n },\r\n requestParams: this.getComponentRequestParams(key)?.map(param => {\r\n let value = -2;\r\n if (activeTabs.includes(param.dependencieTab)) value = -1;\r\n return {\r\n key: param.key,\r\n value,\r\n };\r\n }),\r\n idGridConfigItem: null,\r\n isCompressed: this.getComponentData(key)?.isCompressed,\r\n };\r\n }\r\n\r\n getShiftsDescriptions(disabledDefault?: boolean) {\r\n const shifts = [\r\n {\r\n id: PlanEditResultShiftEnum.First,\r\n description: this.$t('Documents.PlanRes.FirstShift'),\r\n },\r\n {\r\n id: PlanEditResultShiftEnum.Last,\r\n description: this.$t('Documents.PlanRes.LastShift'),\r\n },\r\n ];\r\n return [Object.assign({}, this.byDefault, {disabled: disabledDefault}), ...shifts];\r\n }\r\n\r\n getEquipmentTypesDescriptions(disabledDefault?: boolean) {\r\n const ets = this.equipmentTypesFromCatalogue.map(equipment => ({\r\n id: equipment.Id,\r\n description: equipment.Description,\r\n }));\r\n return [Object.assign({}, this.byDefault, {disabled: disabledDefault}), ...ets];\r\n }\r\n\r\n getWarehouseVeneerDescriptions(disabledDefault?: boolean) {\r\n const wvs = this.warehouseVeneerDescriptions.map(wv => ({\r\n id: wv.Id,\r\n description: wv.Description,\r\n }));\r\n return [\r\n Object.assign({}, this.byDefault, {disabled: disabledDefault}),\r\n {\r\n id: null,\r\n description: this.$t('Catalogues.Warehouses.Warehouse.AllWarehouses'),\r\n },\r\n ...wvs,\r\n ];\r\n }\r\n\r\n getWarehousePlywoodDescriptions(disabledDefault?: boolean) {\r\n const wps = this.warehousePlywoodDescriptions.map(wp => ({\r\n id: wp.Id,\r\n description: wp.Description,\r\n }));\r\n return [\r\n Object.assign({}, this.byDefault, {disabled: disabledDefault}),\r\n {\r\n id: null,\r\n description: this.$t('Catalogues.Warehouses.Warehouse.AllWarehouses'),\r\n },\r\n ...wps,\r\n ];\r\n }\r\n}\r\n","enum PlanEditResultShiftEnum {\r\n First = 'first',\r\n Last = 'last',\r\n}\r\nexport default PlanEditResultShiftEnum;\r\n","import {PlanEditResultConfigItem} from '@/models/PlanEditResultConfigModel';\r\nimport Components from '@/enums/PlanEditResultConfigComponentsEnum';\r\nimport TabTypes from '@/enums/PlanEditResultConfigTabTypesEnum';\r\n\r\nconst config: PlanEditResultConfigItem[] = [\r\n {\r\n componentKey: Components.Tabs,\r\n props: {\r\n depth: 1,\r\n tabs: [\r\n {\r\n name: 'Общая сводка по сменам',\r\n type: TabTypes.User,\r\n content: [\r\n {\r\n componentKey: Components.PlanResSummaryIndicator,\r\n idGridConfigItem: null,\r\n requestParams: [],\r\n },\r\n {\r\n componentKey: Components.PlanResSummaryOrderBalance,\r\n idGridConfigItem: null,\r\n requestParams: [],\r\n isCompressed: false,\r\n },\r\n {\r\n componentKey: Components.PlanResSummaryPlywoodBalance,\r\n idGridConfigItem: null,\r\n requestParams: [],\r\n isCompressed: false,\r\n },\r\n {\r\n componentKey: Components.PlanResSummaryWarehouseVeneer,\r\n idGridConfigItem: null,\r\n requestParams: [],\r\n isCompressed: false,\r\n },\r\n ],\r\n },\r\n {\r\n name: 'Documents.PlanRes.ShiftTabs',\r\n type: TabTypes.Shift,\r\n content: [\r\n {\r\n componentKey: Components.Tabs,\r\n props: {\r\n depth: 2,\r\n tabs: [\r\n {\r\n name: 'Движение по складам шпона',\r\n type: TabTypes.User,\r\n content: [\r\n {\r\n componentKey: Components.Tabs,\r\n props: {\r\n depth: 3,\r\n tabs: [\r\n {\r\n name: 'Все склады',\r\n type: TabTypes.User,\r\n content: [\r\n {\r\n componentKey:\r\n Components.PlanResByShiftWarehouseVeneer,\r\n idGridConfigItem: null,\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n value: -1,\r\n },\r\n {\r\n key: 'idWarehouseVeneer',\r\n value: null,\r\n },\r\n ],\r\n isCompressed: false,\r\n props: {\r\n data: {\r\n idWarehouseVeneer: null,\r\n },\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n name: 'Documents.PlanRes.WarehouseVeneerTabs',\r\n type: TabTypes.WarehouseVeneer,\r\n content: [\r\n {\r\n componentKey:\r\n Components.PlanResByShiftWarehouseVeneer,\r\n idGridConfigItem: null,\r\n isCompressed: false,\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n value: -1,\r\n },\r\n {\r\n key: 'idWarehouseVeneer',\r\n value: -1,\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n },\r\n ],\r\n },\r\n {\r\n name: 'Обработка фанеры',\r\n type: TabTypes.User,\r\n content: [\r\n {\r\n componentKey: Components.PlanResByShiftOrderBalance,\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n value: -1,\r\n },\r\n ],\r\n idGridConfigItem: null,\r\n isCompressed: false,\r\n },\r\n {\r\n componentKey: Components.PlanResByShiftPlywoodBalance,\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n value: -1,\r\n },\r\n ],\r\n idGridConfigItem: null,\r\n isCompressed: false,\r\n },\r\n {\r\n componentKey: Components.PlanResByShiftRecommendation,\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n value: -1,\r\n },\r\n ],\r\n idGridConfigItem: null,\r\n isCompressed: false,\r\n },\r\n ],\r\n },\r\n {\r\n name: 'Documents.PlanRes.EquipmentTabs',\r\n type: TabTypes.Equipment,\r\n content: [\r\n {\r\n componentKey: Components.EquipmentType,\r\n requestParams: [\r\n {\r\n key: 'shiftIndex',\r\n value: -1,\r\n },\r\n {\r\n key: 'idEquipmentType',\r\n value: -1,\r\n },\r\n ],\r\n idGridConfigItem: null,\r\n isCompressed: false,\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n },\r\n];\r\n\r\nexport default config;\r\n","enum PlanEditResultConfigTabTypesEnum {\r\n User,\r\n Equipment,\r\n Shift,\r\n WarehouseVeneer,\r\n WarehousePlywood,\r\n}\r\n\r\nexport default PlanEditResultConfigTabTypesEnum;\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-card',{key:_vm.key,attrs:{\"loading\":_vm.loading ? 'plywood' : null,\"flat\":\"\"}},[(_vm.result)?_vm._l((_vm.config),function(item,i){return _c('plan-result-item',{key:i,attrs:{\"data\":item,\"route\":_vm.routePath,\"tab-data\":_vm.tabData},on:{\"update:route\":_vm.onUpdateRoute}})}):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport {Component, Prop, Mixins, Watch} from 'vue-property-decorator';\r\nimport PlanResultItem from './PlanEdtiResultItem.vue';\r\nimport PlanEditResultMixin from '@/mixins/plan/edit/PlanEditResultMixin';\r\nimport {mapActions, mapGetters, mapMutations, mapState} from 'vuex';\r\nimport PlanEditModel from '@/models/PlanEditModel';\r\nimport DefaultConfig from '@/configs/PlanEditResultConfig';\r\nimport {cloneDeep, isEqual} from 'lodash';\r\nimport {PlanEditResultCurrentConfig} from '@/models/PlanEditResultModel';\r\n\r\n@Component({\r\n name: 'PlanEditResult.vue',\r\n components: {\r\n PlanResultItem,\r\n },\r\n computed: {\r\n ...mapState('planEdit', ['planEdit', 'planCalculationCount']),\r\n ...mapState('planEditResult', ['loading', 'currentConfig']),\r\n ...mapGetters('planEditResult', ['hasOwnConfig']),\r\n },\r\n methods: {\r\n ...mapActions('planEditResult', ['init']),\r\n ...mapMutations('planEdit', ['increasePlanCalculationCount']),\r\n },\r\n})\r\nexport default class PlanEditResult extends Mixins(PlanEditResultMixin) {\r\n @Prop() isEdit!: boolean;\r\n\r\n public planEdit!: PlanEditModel;\r\n public loading!: boolean;\r\n public init!: Function;\r\n public hasOwnConfig!: boolean;\r\n public currentConfig!: PlanEditResultCurrentConfig | null;\r\n public planCalculationCount!: number;\r\n public increasePlanCalculationCount!: Function;\r\n\r\n private routePath: string = '';\r\n private defaultConfig = DefaultConfig;\r\n\r\n get tabData() {\r\n return {\r\n idPlanRes: this.result?.Id,\r\n };\r\n }\r\n\r\n get config() {\r\n if (this.hasOwnConfig && this.currentConfig?.Value) {\r\n return JSON.parse(this.currentConfig.Value);\r\n } else {\r\n return cloneDeep(this.defaultConfig);\r\n }\r\n }\r\n\r\n get key() {\r\n return `${this.currentConfig?.Id}${this.planCalculationCount}`;\r\n }\r\n\r\n @Watch('config', {deep: true})\r\n onConfigChange(value: any, oldValue: any) {\r\n if (this.result && !isEqual(value, oldValue)) this.increasePlanCalculationCount();\r\n }\r\n\r\n created() {\r\n this.routePath = this.getRoutePath();\r\n this.init(this.planEdit.IdLastPlanRes);\r\n }\r\n\r\n async activated() {\r\n if (this.routePath)\r\n this.$router\r\n .replace({\r\n path: this.$route.path.replace(/(?<=result).*/, this.routePath),\r\n })\r\n .catch(() => {});\r\n }\r\n\r\n getRoutePath() {\r\n return this.$route.path.replace(/^.*result/gi, '');\r\n }\r\n\r\n onUpdateRoute(route: string) {\r\n this.routePath = route;\r\n this.$router\r\n .replace({\r\n path: this.$route.path.replace(/(?<=result).*/, route),\r\n })\r\n .catch(() => {});\r\n }\r\n}\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--22-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PlanEditResult.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../../../node_modules/vuetify-loader/lib/loader.js??ref--22-0!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PlanEditResult.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PlanEditResult.vue?vue&type=template&id=2fca96dc&\"\nimport script from \"./PlanEditResult.vue?vue&type=script&lang=ts&\"\nexport * from \"./PlanEditResult.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VCard } from 'vuetify/lib/components/VCard';\ninstallComponents(component, {VCard})\n","enum PlanEditResultConfigComponentsEnum {\r\n Tabs,\r\n PlanResSummaryOrderBalance,\r\n PlanResSummaryPlywoodBalance,\r\n PlanResSummaryWarehouseVeneer,\r\n EquipmentType,\r\n PlanResByShiftWarehouseVeneer,\r\n PlanResSummaryIndicator,\r\n PlanResByShiftOrderBalance,\r\n PlanResByShiftPlywoodBalance,\r\n PlanResByShiftRecommendation,\r\n PlanResSummaryList,\r\n}\r\n\r\nexport default PlanEditResultConfigComponentsEnum;\r\n"],"sourceRoot":""}