Browse Source

fix: 权限修改

master
zhang_li 6 months ago
parent
commit
ff879e4c62
  1. 3
      .env.development
  2. 6
      src/pages/index.vue
  3. 6
      src/plugins/auth.js
  4. BIN
      src/static/images/icon8.png
  5. BIN
      src/static/images/icon9.png
  6. 15
      src/store/modules/countStore.ts

3
.env.development

@ -1,4 +1,5 @@
VITE_BASE_URL=http://192.168.0.106:12080/admin-api
#VITE_BASE_URL=http://dev.ccwin-in.com:25202/api/admin-api
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api
VITE_BASE_URL_IMAGE=http://192.168.0.106:12080/admin-api

6
src/pages/index.vue

@ -46,7 +46,7 @@
<!-- 报修图标 -->
<image src="../static/images/icon4.svg" mode="" v-if="cur.componentName == 'report'"></image>
<!-- 报修确认图标 -->
<image src="../static/images/icon4.svg" mode="" v-else-if="cur.componentName == 'reportSure'"></image>
<image src="../static/images/icon8.png" mode="" v-else-if="cur.componentName == 'reportSure'"></image>
<!-- 维修工单图标 -->
<image src="../static/images/icon5.svg" mode="" v-else-if="cur.componentName == 'maintenanceOrder'"></image>
<!-- 检修工单图标 -->
@ -60,7 +60,7 @@
<!-- 备件申领审核图标 -->
<image src="../static/images/icon7.png" mode="" v-else-if="cur.componentName == 'itemApprove1'"></image>
<!-- 备件申领审核图标 -->
<image src="../static/images/icon7.png" mode="" v-else-if="cur.componentName == 'itemApprove2'"></image>
<image src="../static/images/icon9.png" mode="" v-else-if="cur.componentName == 'itemApprove2'"></image>
<!-- 备件维修工单图标 -->
<image src="../static/images/icon5.svg" mode="" v-else-if="cur.componentName == 'itemMaintenanceRecord'"></image>
<view>{{cur.name}}</view>
@ -93,7 +93,6 @@
getAccessToken
} from '@/utils/auth'
import { storeToRefs } from 'pinia'
import auth from '@/plugins/auth'
import { useCountStore } from '@/store'
import * as sparePartsApplicationApproveApi from "@/api/sparePartsApplicationApprove.js"
@ -143,7 +142,6 @@
})
//
async function sparePartsApplicationApprovePage(){
await sparePartsApplicationApproveApi.sparePartsApplicationApprovePage(params.value).then((res) => {
number1.value = res.data.total
console.log(res.data.total)

6
src/plugins/auth.js

@ -1,7 +1,9 @@
// import store from '@/store'
import { useCountStore } from '@/store'
import {
useCountStore
} from '@/store'
const store = useCountStore()
console.log(store)
function authPermission(permission) {
const all_permission = "*:*:*"
const permissions = store && store.permissions

BIN
src/static/images/icon8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/static/images/icon9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

15
src/store/modules/countStore.ts

@ -68,21 +68,6 @@ const useStore = defineStore('storeId', {
}
})
// if (menus.filter(item => item.path == 'device') && menus.filter(item => item.path == 'device').length > 0) {
// this.deviceMenus = menus.filter(item => item.path == 'device')[0].children
// } else {
// this.deviceMenus = []
// }
// if (menus.filter(item => item.path == 'mold') && menus.filter(item => item.path == 'mold').length > 0) {
// this.moldMenus = menus.filter(item => item.path == 'mold')[0].children
// } else {
// this.moldMenus = []
// }
// if (menus.filter(item => item.path != 'device' && item.path != 'mold') && menus.filter(item => item.path != 'device' && item.path != 'mold').length > 0) {
// this.thchMenus = menus.filter(item => item.path != 'device' && item.path != 'mold')
// } else {
// this.thchMenus = []
// }
this.meaus = menus
} else {

Loading…
Cancel
Save