| | |
| | | <template> |
| | | <div> |
| | | |
| | | </div> |
| | | <Component :is="currentSignage" :userType="userType" :productionCode="productionCode" |
| | | :workshopSectionProductionCode="workshopSectionProductionCode" |
| | | > |
| | | </Component> |
| | | </template> |
| | | |
| | | <script> |
| | | import signageApi from '@/api/signage' |
| | | import DncManagerSignage from './DncManagerSignage.vue' |
| | | |
| | | export default { |
| | | name: "Analysis", |
| | | components: { |
| | | |
| | | DncManagerSignage |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | currentSignage: '', |
| | | productionCode: '', |
| | | branchFactoryProductionCode: '', |
| | | workshopSectionProductionCode: '', |
| | | userType: '' |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | this.showModuleByUserInfo() |
| | | }, |
| | | methods: { |
| | | |
| | | showModuleByUserInfo() { |
| | | const id = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id |
| | | signageApi.getUserByIdApi(id) |
| | | .then(res => { |
| | | console.log("res", res.userType) |
| | | this.userType = res.userType |
| | | switch (this.userType) { |
| | | // case 1: |
| | | // //刀具管理 |
| | | // this.currentSignage = 'EquipmentSignage' |
| | | // break |
| | | // case 2: |
| | | // //mdc |
| | | // this.currentSignage = 'WorkshopSectionSignage' |
| | | // break |
| | | case 3: |
| | | //dnc |
| | | this.currentSignage = 'DncManagerSignage' |
| | | break |
| | | // case 4: |
| | | // //设备管理 |
| | | // this.currentSignage = 'IndexSignage' |
| | | // break |
| | | default: |
| | | this.currentSignage = '' |
| | | break |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | </script> |
| | | <style lang="less" scoped> |
| | | /deep/ .back-nav { |
| | | width: 100px; |
| | | height: 30px; |
| | | color: #fff; |
| | | position: absolute; |
| | | top: 15px; |
| | | left: 10px; |
| | | cursor: pointer; |
| | | z-index: 9999 |
| | | } |
| | | </style> |