运维管理员 部门联系人联系电话
This commit is contained in:
parent
d065f76217
commit
bcbfd87eb7
|
@ -2,7 +2,7 @@
|
|||
* @author chuzhixin 1204505056@qq.com
|
||||
* @description 登录、获取用户信息、退出登录、清除accessToken逻辑,不建议修改
|
||||
*/
|
||||
import { getUserInfo, login, logout } from '@/api/user'
|
||||
import { getUserInfo, login, logout, getRole } from '@/api/user'
|
||||
import {
|
||||
getAccessToken,
|
||||
removeAccessToken,
|
||||
|
@ -20,6 +20,7 @@ const state = () => ({
|
|||
userId: '',
|
||||
avatar: '',
|
||||
role: 0, // 用户管理员权限
|
||||
roleList: [], // 用户管理员权限
|
||||
})
|
||||
const getters = {
|
||||
accessToken: (state) => state.accessToken,
|
||||
|
@ -27,6 +28,7 @@ const getters = {
|
|||
realName: (state) => state.realName,
|
||||
avatar: (state) => state.avatar,
|
||||
role: (state) => state.role,
|
||||
roleList: (state) => state.roleList,
|
||||
userId: (state) => state.userId,
|
||||
deptName: (state) => state.deptName,
|
||||
deptId: (state) => state.deptId,
|
||||
|
@ -64,6 +66,9 @@ const mutations = {
|
|||
setRole(state, role) {
|
||||
state.role = role
|
||||
},
|
||||
setRoleList(state, role) {
|
||||
state.roleList = role
|
||||
},
|
||||
// 设置用户userId
|
||||
setUserId(state, id) {
|
||||
state.userId = id
|
||||
|
@ -146,6 +151,14 @@ const actions = {
|
|||
commit('setUsername', res.data.data.username)
|
||||
commit('setRealname', res.data.data.realName)
|
||||
commit('setRole', res.data.data.roleIdList.length)
|
||||
// 获取角色数据
|
||||
const roleArr = []
|
||||
res.data.data.roleIdList.map((val) => {
|
||||
getRole(val).then((role) => {
|
||||
roleArr.push(role.data.data.name)
|
||||
})
|
||||
})
|
||||
commit('setRoleList', roleArr)
|
||||
commit('setUserId', res.data.data.id)
|
||||
commit('setDeptName', res.data.data.deptName)
|
||||
commit('setDeptId', res.data.data.deptId)
|
||||
|
@ -181,7 +194,6 @@ const actions = {
|
|||
* @param {*} { commit, dispatch }
|
||||
*/
|
||||
async resetAll({ dispatch }) {
|
||||
|
||||
await dispatch('setAccessToken', '')
|
||||
await dispatch('acl/setFull', false, {
|
||||
root: true,
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
></DetalsTitle>
|
||||
</div>
|
||||
<!-- 青岛市局 -->
|
||||
<div style="width: 100%; display: flex; justify-content: center"
|
||||
>
|
||||
<div style="width: 100%; display: flex; justify-content: center">
|
||||
<div class="content" v-for="item in dataFrom.content" :key="item.title">
|
||||
<div class="content-left" v-if="item.titleType === '调用接口'">
|
||||
<div class="left">
|
||||
|
@ -97,12 +96,14 @@
|
|||
<a-tooltip>
|
||||
<template #title>
|
||||
{{
|
||||
approveStatus === '通过'
|
||||
approveStatus === '通过' || role
|
||||
? item.people.value
|
||||
: '请申请后查看'
|
||||
}}
|
||||
</template>
|
||||
<span :class="{ 'blur-word': approveStatus !== '通过' }">
|
||||
<span
|
||||
:class="{ 'blur-word': approveStatus !== '通过' && !role }"
|
||||
>
|
||||
{{ item.people.value }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
|
@ -112,12 +113,14 @@
|
|||
<a-tooltip>
|
||||
<template #title>
|
||||
{{
|
||||
approveStatus === '通过'
|
||||
approveStatus === '通过' || role
|
||||
? item.phone.value
|
||||
: '请申请后查看'
|
||||
}}
|
||||
</template>
|
||||
<span :class="{ 'blur-word': approveStatus !== '通过' }">
|
||||
<span
|
||||
:class="{ 'blur-word': approveStatus !== '通过' && !role }"
|
||||
>
|
||||
{{ item.phone.value }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
|
@ -169,7 +172,15 @@
|
|||
import { ref, defineProps, watch } from 'vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
const router = useRouter()
|
||||
const store = useStore()
|
||||
const role = ref(false)
|
||||
store.getters['user/roleList'].map((val) => {
|
||||
if (val === '运维管理员') {
|
||||
role.value = true
|
||||
}
|
||||
})
|
||||
|
||||
const approveStatus = ref('通过')
|
||||
const whoShow1 = ref(whoShow)
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
></DetalsTitle>
|
||||
</div>
|
||||
<!-- 青岛市局 -->
|
||||
<div style="width: 100%; display: flex; justify-content: center"
|
||||
>
|
||||
<div style="width: 100%; display: flex; justify-content: center">
|
||||
<div class="content">
|
||||
<div
|
||||
v-for="(item, index) in dataFrom.content"
|
||||
|
@ -24,6 +23,7 @@
|
|||
<a-tooltip
|
||||
v-if="
|
||||
approveStatus !== '通过' &&
|
||||
!role &&
|
||||
(carditem.attrType === '联系人' ||
|
||||
carditem.attrType === '联系人电话')
|
||||
"
|
||||
|
@ -55,7 +55,15 @@
|
|||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
const router = useRouter()
|
||||
const store = useStore()
|
||||
const role = ref(false)
|
||||
store.getters['user/roleList'].map((val) => {
|
||||
if (val === '运维管理员') {
|
||||
role.value = true
|
||||
}
|
||||
})
|
||||
const approveStatus = ref('通过')
|
||||
const whoShow1 = ref(whoShow)
|
||||
let dataFrom = ref({
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
:type="dataFrom.englishTitle"
|
||||
></DetalsTitle>
|
||||
</div>
|
||||
<div style="width: 100%; display: flex; justify-content: center"
|
||||
>
|
||||
<div style="width: 100%; display: flex; justify-content: center">
|
||||
<div class="content" v-for="item in dataFrom.content" :key="item.title">
|
||||
<div class="content-left">
|
||||
<div class="left">
|
||||
|
@ -52,12 +51,14 @@
|
|||
<a-tooltip>
|
||||
<template #title>
|
||||
{{
|
||||
approveStatus === '通过'
|
||||
approveStatus === '通过' || role
|
||||
? item.people.value
|
||||
: '请申请后查看'
|
||||
}}
|
||||
</template>
|
||||
<span :class="{ 'blur-word': approveStatus !== '通过' }">
|
||||
<span
|
||||
:class="{ 'blur-word': approveStatus !== '通过' && !role }"
|
||||
>
|
||||
{{ item.people.value }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
|
@ -67,12 +68,14 @@
|
|||
<a-tooltip>
|
||||
<template #title>
|
||||
{{
|
||||
approveStatus === '通过'
|
||||
approveStatus === '通过' || role
|
||||
? item.phone.value
|
||||
: '请申请后查看'
|
||||
}}
|
||||
</template>
|
||||
<span :class="{ 'blur-word': approveStatus !== '通过' }">
|
||||
<span
|
||||
:class="{ 'blur-word': approveStatus !== '通过' && !role }"
|
||||
>
|
||||
{{ item.phone.value }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
|
@ -124,7 +127,15 @@
|
|||
import { ref, defineProps, watch } from 'vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
const router = useRouter()
|
||||
const store = useStore()
|
||||
const role = ref(false)
|
||||
store.getters['user/roleList'].map((val) => {
|
||||
if (val === '运维管理员') {
|
||||
role.value = true
|
||||
}
|
||||
})
|
||||
const approveStatus = ref('通过')
|
||||
const whoShow1 = ref(whoShow)
|
||||
let dataFrom = ref({
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
:type="dataFrom.englishTitle"
|
||||
></DetalsTitle>
|
||||
</div>
|
||||
<div style="width: 100%; display: flex; justify-content: center"
|
||||
>
|
||||
<div style="width: 100%; display: flex; justify-content: center">
|
||||
<div class="content">
|
||||
<div class="content-card">
|
||||
<div class="left">
|
||||
|
@ -40,6 +39,7 @@
|
|||
<template #title>
|
||||
{{
|
||||
approveStatus !== '通过' &&
|
||||
!role &&
|
||||
(carditem.attrType === '部门联系人' ||
|
||||
carditem.attrType === '联系人电话')
|
||||
? '请申请后查看'
|
||||
|
@ -50,6 +50,7 @@
|
|||
:class="{
|
||||
'blur-word':
|
||||
approveStatus !== '通过' &&
|
||||
!role &&
|
||||
(carditem.attrType === '部门联系人' ||
|
||||
carditem.attrType === '联系人电话'),
|
||||
}"
|
||||
|
@ -80,7 +81,15 @@
|
|||
import { pinyin } from 'pinyin-pro'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
const router = useRouter()
|
||||
const store = useStore()
|
||||
const role = ref(false)
|
||||
store.getters['user/roleList'].map((val) => {
|
||||
if (val === '运维管理员') {
|
||||
role.value = true
|
||||
}
|
||||
})
|
||||
const approveStatus = ref('通过')
|
||||
const whoShow1 = ref(whoShow)
|
||||
let flag = ref(true)
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
:type="dataFrom.englishTitle"
|
||||
></DetalsTitle>
|
||||
</div>
|
||||
<div style="width: 100%; display: flex; justify-content: center"
|
||||
>
|
||||
<div style="width: 100%; display: flex; justify-content: center">
|
||||
<div class="content" v-for="item in dataFrom.content" :key="item.title">
|
||||
<div class="content-left">
|
||||
<div class="left">
|
||||
|
@ -63,12 +62,14 @@
|
|||
<a-tooltip>
|
||||
<template #title>
|
||||
{{
|
||||
approveStatus === '通过'
|
||||
approveStatus === '通过' || role
|
||||
? item.people.value
|
||||
: '请申请后查看'
|
||||
}}
|
||||
</template>
|
||||
<span :class="{ 'blur-word': approveStatus !== '通过' }">
|
||||
<span
|
||||
:class="{ 'blur-word': approveStatus !== '通过' && !role }"
|
||||
>
|
||||
{{ item.people.value }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
|
@ -78,12 +79,14 @@
|
|||
<a-tooltip>
|
||||
<template #title>
|
||||
{{
|
||||
approveStatus === '通过'
|
||||
approveStatus === '通过' || role
|
||||
? item.phone.value
|
||||
: '请申请后查看'
|
||||
}}
|
||||
</template>
|
||||
<span :class="{ 'blur-word': approveStatus !== '通过' }">
|
||||
<span
|
||||
:class="{ 'blur-word': approveStatus !== '通过' && !role }"
|
||||
>
|
||||
{{ item.phone.value }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
|
@ -135,7 +138,15 @@
|
|||
import { pinyin } from 'pinyin-pro'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
const router = useRouter()
|
||||
const store = useStore()
|
||||
const role = ref(false)
|
||||
store.getters['user/roleList'].map((val) => {
|
||||
if (val === '运维管理员') {
|
||||
role.value = true
|
||||
}
|
||||
})
|
||||
const approveStatus = ref('通过')
|
||||
const whoShow1 = ref(whoShow)
|
||||
let dataFrom = ref({
|
||||
|
|
Loading…
Reference in New Issue