新增视频管理员角色

This commit is contained in:
a0049873 2022-11-23 10:40:25 +08:00
parent 6cfde21605
commit 7b843847a7
2 changed files with 37 additions and 7 deletions

View File

@ -2,11 +2,11 @@
* @Author: Light
* @Date: 2022-11-18 11:53:43
* @LastEditors: Light
* @LastEditTime: 2022-11-22 19:28:55
* @LastEditTime: 2022-11-23 10:32:10
* @Description: 告诉大家这是什么
-->
<template>
<div class="infrastructureApplication">
<div class="infrastructureApplication" v-if="showFlag">
<div class="top">
<a-list size="small" bordered :data-source="dataList.toBeApplied">
<template #renderItem="{ item }">
@ -137,6 +137,7 @@
getApplyCameraListXha,
delApplyCamera,
} from '@/api/home'
import { getUserInfo, getRole } from '@/api/user'
import { endProcess } from '@/api/personalCenter.js'
import { onBeforeUnmount, reactive, ref } from 'vue'
import { message } from 'ant-design-vue'
@ -172,6 +173,20 @@
},
]
const router = useRouter()
const showFlag = ref(false)
getUserInfo().then((res) => {
if (res.data.data.superAdmin == '1') {
showFlag.value = true
} else {
res.data.data.roleIdList.map((val) => {
getRole(val).then((role) => {
if (role.data.data.name === '视频管理员') {
showFlag.value = true
}
})
})
}
})
const delWillApplyCamera = (id) => {
console.log('撤销===>', id)
if (delWacFlag.value) {

View File

@ -30,10 +30,10 @@
<div class="text-label">
<span>{{defaultIndex+1}}</span>/<span>{{cameraDataList.length}}</span>
</div>
<div class="footer-button">
<div class="footer-button" v-if="showFlag">
<a-button type="primary" @click="applyNow(cameraDataList[defaultIndex])">立即申请</a-button>
<a-button type="primary" style="margin-left:20px" @click="addIntoCart(cameraDataList[defaultIndex])">加入申购车</a-button>
</div>
</div>
</div>
</div>
</div>
@ -46,6 +46,7 @@
LeftCircleOutlined,
RightCircleOutlined,
} from '@ant-design/icons-vue'
import { getUserInfo, getRole } from '@/api/user'
// import { useRouter } from 'vue-router'
import H5Player from '@/views/home/components/H5Player.vue'
import mybus from '@/myplugins/mybus'
@ -71,12 +72,25 @@
},
},
resetFlag:{
type: Boolean,
default: false
type: Boolean,
default: false
}
},
mounted() {
this.getVideoUrl(this.cameraDataList[this.defaultIndex]);
getUserInfo().then((res) => {
if (res.data.data.superAdmin == '1') {
this.showFlag = true
} else {
res.data.data.roleIdList.map((val) => {
getRole(val).then((role) => {
if (role.data.data.name === '视频管理员') {
this.showFlag = true
}
})
})
}
})
},
// directives: {
// viewer: viewer({
@ -101,7 +115,8 @@
videoStream: '',
videoUrl:'', //url
defaultIndex:0,//
selectedFlag:true
selectedFlag:true,
showFlag:false
// router:useRouter()
}
},