权限配置
This commit is contained in:
parent
00719a5c3b
commit
e5d497c24a
|
|
@ -76,7 +76,15 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref,computed } from 'vue'
|
||||
import { onShow,onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
const urlPermissions = ref([])
|
||||
onShow((options) => {
|
||||
urlPermissions.value = uni.getStorageSync('urlPermissions')
|
||||
console.log("yyyyyyy",urlPermissions.value)
|
||||
})
|
||||
|
||||
// 业务办理
|
||||
const newInfoList = ref([
|
||||
{
|
||||
|
|
@ -95,6 +103,13 @@ const newInfoList = ref([
|
|||
iconSrc: '../../static/workbench/panDian.png',
|
||||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const newInfoListTwo = computed(() => {
|
||||
return newInfoList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
|
||||
// 电子档案
|
||||
const newPurchaseList = ref([
|
||||
{
|
||||
|
|
@ -104,6 +119,12 @@ const newPurchaseList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const newPurchaseListTwo = computed(() => {
|
||||
return newPurchaseList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
|
||||
// 检验预警
|
||||
const pickingList = ref([
|
||||
{
|
||||
|
|
@ -113,6 +134,12 @@ const pickingList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const pickingListTwo = computed(() => {
|
||||
return pickingList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
|
||||
// 综合查询
|
||||
const integratedQueryList = ref([
|
||||
{
|
||||
|
|
@ -147,6 +174,11 @@ const integratedQueryList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const integratedQueryListTwo = computed(() => {
|
||||
return integratedQueryList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
|
||||
const onNavigateTo = (url) => {
|
||||
uni.navigateTo({ url })
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ onMounted(async () => {
|
|||
uni.setStorageSync('password', loginForm.password)
|
||||
uni.setStorageSync('id', res.user.userId)
|
||||
uni.setStorageSync('deptName', res.user?.dept?.deptName)
|
||||
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index',
|
||||
|
|
@ -83,12 +84,14 @@ const onHandleLogin = async () => {
|
|||
memberStore.setToken(res.data.access_token)
|
||||
// 2 . 获取用户信息并存储
|
||||
const result = await getUserInfoAPI()
|
||||
console.log("xxxxxxxxxx",result)
|
||||
memberStore.setUserInfo(result.user)
|
||||
uni.showToast({ title: '登录成功!', icon: 'none' })
|
||||
uni.setStorageSync('username', loginForm.username)
|
||||
uni.setStorageSync('password', loginForm.password)
|
||||
uni.setStorageSync('id', result.user.userId)
|
||||
uni.setStorageSync('deptName', result.user?.dept?.deptName)
|
||||
uni.setStorageSync('urlPermissions',result.urlPermissions?result.urlPermissions:[])
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index',
|
||||
|
|
|
|||
|
|
@ -96,7 +96,15 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref,computed } from 'vue'
|
||||
import { onShow,onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
const urlPermissions = ref([])
|
||||
onShow((options) => {
|
||||
urlPermissions.value = uni.getStorageSync('urlPermissions')
|
||||
console.log("yyyyyyy",urlPermissions.value)
|
||||
})
|
||||
|
||||
// 设备信息管理
|
||||
const newInfoList = ref([
|
||||
{
|
||||
|
|
@ -120,6 +128,11 @@ const newInfoList = ref([
|
|||
iconSrc: '../../static/searchModel/electTag.png',
|
||||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const newInfoListTwo = computed(() => {
|
||||
return newInfoList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
// 业务信息管理
|
||||
const newPurchaseList = ref([
|
||||
{
|
||||
|
|
@ -149,6 +162,11 @@ const newPurchaseList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const newPurchaseListTwo = computed(() => {
|
||||
return newPurchaseList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
// 标准箱管理
|
||||
const pickingList = ref([
|
||||
{
|
||||
|
|
@ -178,6 +196,11 @@ const pickingList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const pickingListTwo = computed(() => {
|
||||
return pickingList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
// 库存查询
|
||||
const partList = ref([
|
||||
{
|
||||
|
|
@ -192,6 +215,11 @@ const partList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const partListTwo = computed(() => {
|
||||
return partList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
// 机具查询
|
||||
const deviceList = ref([
|
||||
{
|
||||
|
|
@ -201,6 +229,11 @@ const deviceList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const deviceListTwo = computed(() => {
|
||||
return deviceList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
const onNavigateTo = (url) => {
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="new-purchase">
|
||||
<view class="new-purchase" >
|
||||
<div class="title-text">
|
||||
<div></div>
|
||||
<div class="purchase-title">信息采集</div>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="new-purchase">
|
||||
<view class="new-purchase" >
|
||||
<div class="title-text">
|
||||
<div></div>
|
||||
<div class="purchase-title">新购管理</div>
|
||||
|
|
@ -36,10 +36,10 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="new-purchase">
|
||||
<view class="new-purchase" >
|
||||
<div class="title-text">
|
||||
<div></div>
|
||||
<div class="purchase-title">仓储管理</div>
|
||||
<div class="purchase-title" >仓储管理</div>
|
||||
</div>
|
||||
<view
|
||||
class="purchase-item"
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="new-purchase">
|
||||
<view class="new-purchase" >
|
||||
<div class="title-text">
|
||||
<div></div>
|
||||
<div class="purchase-title">修试管理</div>
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="new-purchase">
|
||||
<view class="new-purchase" >
|
||||
<div class="title-text">
|
||||
<div></div>
|
||||
<div class="purchase-title">配件管理</div>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="new-purchase">
|
||||
<view class="new-purchase" >
|
||||
<div class="title-text">
|
||||
<div></div>
|
||||
<div class="purchase-title">标准箱管理</div>
|
||||
|
|
@ -131,22 +131,31 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref,computed } from 'vue'
|
||||
import { onShow,onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
const urlPermissions = ref([])
|
||||
onShow((options) => {
|
||||
urlPermissions.value = uni.getStorageSync('urlPermissions')
|
||||
console.log("yyyyyyy",urlPermissions.value)
|
||||
})
|
||||
|
||||
|
||||
// 信息采集
|
||||
const newInfoList = ref([
|
||||
{
|
||||
title: '编码采集',
|
||||
url: '',
|
||||
url: '/pages/new-purchase/bind/index',
|
||||
iconSrc: '../../static/workbench/bianMa.png',
|
||||
},
|
||||
{
|
||||
title: '盘点绑定',
|
||||
url: '',
|
||||
url: '/pages/new-purchase/entry/index',
|
||||
iconSrc: '../../static/workbench/panDian.png',
|
||||
},
|
||||
{
|
||||
title: '日期更新',
|
||||
url: '',
|
||||
url: '/pages/new-purchase/accept/index',
|
||||
iconSrc: '../../static/workbench/panDian.png',
|
||||
},
|
||||
{
|
||||
|
|
@ -155,6 +164,13 @@ const newInfoList = ref([
|
|||
iconSrc: '../../static/workbench/minPai.png',
|
||||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const newInfoListTwo = computed(() => {
|
||||
return newInfoList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
|
||||
// 新购
|
||||
const newPurchaseList = ref([
|
||||
{
|
||||
|
|
@ -175,6 +191,11 @@ const newPurchaseList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const newPurchaseListTwo = computed(() => {
|
||||
return newPurchaseList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
// 仓储
|
||||
const pickingList = ref([
|
||||
{
|
||||
|
|
@ -209,6 +230,11 @@ const pickingList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const pickingListTwo = computed(() => {
|
||||
return pickingList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
// 配件
|
||||
const partList = ref([
|
||||
{
|
||||
|
|
@ -233,6 +259,11 @@ const partList = ref([
|
|||
// }
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const partListTwo = computed(() => {
|
||||
return partList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
// 维修
|
||||
const repairList = ref([
|
||||
{
|
||||
|
|
@ -262,6 +293,11 @@ const repairList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const repairListTwo = computed(() => {
|
||||
return repairList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
// 标准箱
|
||||
const boxList = ref([
|
||||
{
|
||||
|
|
@ -281,6 +317,11 @@ const boxList = ref([
|
|||
},
|
||||
])
|
||||
|
||||
// 使用计算属性筛选 newInfoList 中的数据
|
||||
const boxListTwo = computed(() => {
|
||||
return boxList.value.filter(item => urlPermissions.value.includes(item.url))
|
||||
})
|
||||
|
||||
// // 库存查询
|
||||
// const searchList = ref([
|
||||
// {
|
||||
|
|
|
|||
Loading…
Reference in New Issue