diff --git a/src/pages/materialsStation/index/index.vue b/src/pages/materialsStation/index/index.vue index c432d57..cba01c6 100644 --- a/src/pages/materialsStation/index/index.vue +++ b/src/pages/materialsStation/index/index.vue @@ -25,11 +25,17 @@ class="item" v-for="(item, index) in isUsingList" :key="index" + v-show="item.isShow" @click="jumpUrl(item.path)" > - +
{{ item.name }}
+ 暂无权限 @@ -46,6 +52,8 @@ import { getBmTeamList, } from '@/services/materialsStation' import { useMemberStore } from '@/stores' + +const urlPermissions = ref([]) const memberStore = useMemberStore() const userInfo = ref({}) const isTeamLeader = ref(false) @@ -56,15 +64,15 @@ const todayDatas = reactive({ oneMonthNum: '', // 一个月 }) const isUsingList = ref([ - { path: 'toolsLease', name: '领料', src: 'lease1', isShow: true }, - { path: 'toolsOut', name: '出库', src: 'outStore1', isShow: true }, - { path: 'toolsBack', name: '退料', src: 'back1', isShow: true }, - { path: 'toolsLedger', name: '台账', src: 'ledger1', isShow: true }, - { path: 'teamLeaseRecord', name: '领料记录', src: 'teamLease1', isShow: true }, - { path: 'teamBackRecord', name: '退料记录', src: 'teamBack1', isShow: true }, - { path: 'teamStore', name: '班组库存', src: 'teamStore1', isShow: true }, - { path: 'teamWarning', name: '班组预警', src: 'teamWarning1', isShow: true }, - { path: 'authorizeSignature', name: '项目部授权', src: 'authorizeSignature1', isShow: true }, + { path: 'toolsLease', name: '班组预领申请', src: 'lease', isShow: true }, + { path: 'toolsOut', name: '材料站出库', src: 'outStore', isShow: true }, + { path: 'toolsBack', name: '退料', src: 'back', isShow: true }, + { path: 'toolsLedger', name: '台账', src: 'ledger', isShow: true }, + { path: 'teamLeaseRecord', name: '班组领料记录', src: 'teamLease', isShow: true }, + { path: 'teamBackRecord', name: '班组退料记录', src: 'teamBack', isShow: true }, + { path: 'teamStore', name: '班组库存', src: 'teamStore', isShow: true }, + { path: 'teamWarning', name: '班组预警', src: 'teamWarning', isShow: true }, + { path: 'authorizeSignature', name: '项目部授权', src: 'authorizeSignature', isShow: true }, ]) let statusBarHeight = ref('50px') @@ -183,7 +191,14 @@ const getTeamList = async () => { // 页面显示时获取数据 onShow(async () => { userInfo.value = memberStore.userInfo || {} + urlPermissions.value = uni.getStorageSync('urlPermissions') // console.log('🚀 ~ onShow ~ userInfo.value:', userInfo.value) + isUsingList.value.forEach((item) => { + // 查找item.path 是否 在 urlPermissions.value 中 是 item.isShow = true 否则 item.isShow = false + item.isShow = urlPermissions.value.includes(item.path) + }) + console.log('isUsingList.value:', isUsingList.value.every((item) => !item.isShow)) + if (isUsingList.value.every((item) => !item.isShow)) return getToolsLedgerDetailsList() getUserInfoByUserName() // await Promise.all([getUserInfoByUserName(), projectInfoList()]) @@ -301,7 +316,7 @@ onShow(async () => { } } .item-name { - margin-top: -50rpx; + margin-top: 10rpx; font-size: 23rpx; z-index: 1; } diff --git a/src/services/index.js b/src/services/index.js index e5d631d..0b81f24 100644 --- a/src/services/index.js +++ b/src/services/index.js @@ -4,6 +4,7 @@ import { http } from '@/utils/http' * 登录方法 - 调试使用 - 产线环境需注释 */ export const appLoginAPI = (data) => { + // return false return http({ method: 'POST', url: '/auth/login', diff --git a/src/static/home/authorizeSignature.png b/src/static/home/authorizeSignature.png index 7115eaa..6b81d6c 100644 Binary files a/src/static/home/authorizeSignature.png and b/src/static/home/authorizeSignature.png differ diff --git a/src/static/home/back.png b/src/static/home/back.png index 159d98a..0b6a18f 100644 Binary files a/src/static/home/back.png and b/src/static/home/back.png differ diff --git a/src/static/home/lease.png b/src/static/home/lease.png index 390ae29..a06aea2 100644 Binary files a/src/static/home/lease.png and b/src/static/home/lease.png differ diff --git a/src/static/home/ledger.png b/src/static/home/ledger.png index dfadb2c..d043b66 100644 Binary files a/src/static/home/ledger.png and b/src/static/home/ledger.png differ diff --git a/src/static/home/outStore.png b/src/static/home/outStore.png index 870a50e..54bb4c6 100644 Binary files a/src/static/home/outStore.png and b/src/static/home/outStore.png differ diff --git a/src/static/home/teamBack.png b/src/static/home/teamBack.png index 91f381c..53ce989 100644 Binary files a/src/static/home/teamBack.png and b/src/static/home/teamBack.png differ diff --git a/src/static/home/teamLease.png b/src/static/home/teamLease.png index 2b5e095..6ab33a3 100644 Binary files a/src/static/home/teamLease.png and b/src/static/home/teamLease.png differ diff --git a/src/static/home/teamStore.png b/src/static/home/teamStore.png index e64dfcf..100bf5f 100644 Binary files a/src/static/home/teamStore.png and b/src/static/home/teamStore.png differ diff --git a/src/static/home/teamWarning.png b/src/static/home/teamWarning.png index 6b24f4b..4c6c041 100644 Binary files a/src/static/home/teamWarning.png and b/src/static/home/teamWarning.png differ