From 5575dcb361ae7aff8095223db61ba40d6b64616a Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期六, 16 八月 2025 20:53:27 +0800 Subject: [PATCH] 添加首页功能 --- src/views/dashboard/Analysis.vue | 66 +++++++++++++++++++++++++++++---- 1 files changed, 58 insertions(+), 8 deletions(-) diff --git a/src/views/dashboard/Analysis.vue b/src/views/dashboard/Analysis.vue index 1503277..7c7b4bf 100644 --- a/src/views/dashboard/Analysis.vue +++ b/src/views/dashboard/Analysis.vue @@ -1,25 +1,75 @@ <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> \ No newline at end of file + + +</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> \ No newline at end of file -- Gitblit v1.9.3