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