From 5f1c156f0548b3551c5e85c906ce168ab574a38b Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Wed, 1 May 2024 18:49:17 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9D=83=E9=99=90=E6=94=B9=E6=88=90?=
=?UTF-8?q?=E7=BC=93=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 7 +++++--
src/main.ts | 4 ++--
src/pages/deviceReport/index.vue | 10 +++++-----
src/pages/index.vue | 6 +-----
src/pages/overhaulOrder/detail.vue | 4 ++--
src/pages/overhaulOrder/index.vue | 3 +--
src/pages/repairOrder/detail.vue | 13 ++++++-------
src/pages/repairOrder/index.vue | 3 +--
src/pages/sparePartsApplication/detail.vue | 5 ++---
src/pages/sparePartsApplication/index.vue | 5 ++---
src/pages/sparePartsApplicationApprove/index.vue | 5 ++---
src/pages/spotCheckOrder/detail.vue | 3 +--
src/pages/spotCheckOrder/index.vue | 3 +--
src/pages/upkeepOrder/detail.vue | 7 +++----
src/plugins/auth.js | 12 ++++++------
src/store/modules/countStore.ts | 4 ++++
16 files changed, 44 insertions(+), 50 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index a482a03..1c345d7 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -5,6 +5,7 @@
onHide
} from '@dcloudio/uni-app'
import {
+ ref,
getCurrentInstance
} from 'vue'
import {
@@ -15,7 +16,6 @@
import { storeToRefs } from 'pinia'
import { useCountStore } from '@/store'
-
// 获取自定义的store
const store = useCountStore()
onLaunch(async () => {
@@ -91,7 +91,10 @@
// #endif
if (getAccessToken()) {
await store.GetPermissionInfo().then(res => {
- }).catch(() => { })
+ uni.setStorageSync('permissionInfo',res.permissions)
+ uni.setStorageSync('roles',res.roles)
+ }).catch(() => {
+ })
await store.GetInfo().then(res => {
}).catch(() => { })
}
diff --git a/src/main.ts b/src/main.ts
index c24d283..22b7f31 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -9,7 +9,7 @@ import App from './App.vue'
import tab from './plugins/tab'
import modal from './plugins/modal'
import time from './plugins/time'
-// import auth from './plugins/auth'
+import auth from './plugins/auth'
// 权限
import { setupAuth } from '@/directives'
@@ -34,7 +34,7 @@ export function createApp() {
app.config.globalProperties.$modal = modal
// 时间对象
app.config.globalProperties.$time = time
- // app.config.globalProperties.$auth = auth
+ app.config.globalProperties.$auth = auth
diff --git a/src/pages/deviceReport/index.vue b/src/pages/deviceReport/index.vue
index 9173e5a..e10f5e8 100644
--- a/src/pages/deviceReport/index.vue
+++ b/src/pages/deviceReport/index.vue
@@ -4,7 +4,7 @@
-
+
@@ -44,9 +44,9 @@
撤销
@@ -72,7 +72,7 @@
getCurrentInstance
} from 'vue'
import * as reportApi from "@/api/report.js"
- import auth from '@/plugins/auth'
+
import { useCountStore } from '@/store'
// 获取自定义的store
const store = useCountStore()
diff --git a/src/pages/index.vue b/src/pages/index.vue
index e36c992..6cd4863 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -97,9 +97,9 @@
import * as sparePartsApplicationApproveApi from "@/api/sparePartsApplicationApprove.js"
const { proxy } = getCurrentInstance()
+ console.log(proxy.$plugins)
// 获取自定义的store
const store = useCountStore()
- console.log(99,store)
const bgOpacity = ref(0)
@@ -144,7 +144,6 @@
async function sparePartsApplicationApprovePage(){
await sparePartsApplicationApproveApi.sparePartsApplicationApprovePage(params.value).then((res) => {
number1.value = res.data.total
- console.log(res.data.total)
}).catch(() => {
proxy.$modal.closeLoading()
})
@@ -162,7 +161,6 @@
await proxy.$onLaunched;
if (getAccessToken()) {
meaus.value = store.meaus
- console.log(meaus.value)
let isHave = meaus.value.find (item=>item.path == 'parePartsManagement')
let isHaveIndex = meaus.value.findIndex (item=>item.path == 'parePartsManagement')
if(isHave&&isHave.children){
@@ -174,8 +172,6 @@
})
await sparePartsApplicationApprovePage()
await sparePartsApplicationApprovePage1()
- console.log(isShowItemApprove1.value)
- console.log(isShowItemApprove2.value)
// 如果只有一级审核 、待审核数量等于一级审核数量
if(isShowItemApprove1.value && !isShowItemApprove2.value){
number.value =number1.value
diff --git a/src/pages/overhaulOrder/detail.vue b/src/pages/overhaulOrder/detail.vue
index f7f9dee..5f863ca 100644
--- a/src/pages/overhaulOrder/detail.vue
+++ b/src/pages/overhaulOrder/detail.vue
@@ -131,10 +131,10 @@
@@ -207,23 +207,23 @@
撤回
+ v-if="item.status==0&&$auth.hasPermi('eam:item-apply-request-main:cancelAPP')" @click="cancle(item)">撤回
@@ -62,7 +62,6 @@
getCurrentInstance
} from 'vue'
import * as sparePartsApplicationApi from "@/api/sparePartsApplication.js"
- import auth from '@/plugins/auth'
const { proxy } = getCurrentInstance()
const params = ref({
pageNo: 1,
diff --git a/src/pages/sparePartsApplicationApprove/index.vue b/src/pages/sparePartsApplicationApprove/index.vue
index cd4d4cb..a98d16a 100644
--- a/src/pages/sparePartsApplicationApprove/index.vue
+++ b/src/pages/sparePartsApplicationApprove/index.vue
@@ -38,9 +38,9 @@
驳回
+ v-if="item.status==0&&((from==2&&$auth.hasPermi('eam:item-apply-request-main:role0APP'))||(from==3&&$auth.hasPermi('eam:item-apply-request-main:role1APP')))" @click="reject(item)">驳回
通过
+ v-if="item.status==0&&((from==2&&$auth.hasPermi('eam:item-apply-request-main:role0APP'))||(from==3&&$auth.hasPermi('eam:item-apply-request-main:role1APP')))" @click="agree(item)">通过
@@ -60,7 +60,6 @@
ref,
getCurrentInstance
} from 'vue'
- import auth from '@/plugins/auth'
import * as sparePartsApplicationApproveApi from "@/api/sparePartsApplicationApprove.js"
const { proxy } = getCurrentInstance()
const params = ref({
diff --git a/src/pages/spotCheckOrder/detail.vue b/src/pages/spotCheckOrder/detail.vue
index 9a26b66..9ee814a 100644
--- a/src/pages/spotCheckOrder/detail.vue
+++ b/src/pages/spotCheckOrder/detail.vue
@@ -95,7 +95,7 @@