Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -26,9 +26,11 @@ import Breadcrumb from './Breadcrumb.vue';
|
|||||||
import Hamburger from './Hamburger.vue';
|
import Hamburger from './Hamburger.vue';
|
||||||
import {useAuthStore} from '@/stores/userstore.js'
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import {usePermisstionStroe} from '@/stores/permisstion'
|
import {usePermisstionStroe} from '@/stores/permisstion'
|
||||||
|
import { useTagsView } from '@/stores/tagsview';
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
const permisstionStore = usePermisstionStroe()
|
const permisstionStore = usePermisstionStroe()
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
const userInfo = ref({})
|
const userInfo = ref({})
|
||||||
const visitedP = ref(false)
|
const visitedP = ref(false)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -58,6 +60,7 @@ const handleLogout = () => {
|
|||||||
authStore.userLogout()
|
authStore.userLogout()
|
||||||
permisstionStore.removeMenu()
|
permisstionStore.removeMenu()
|
||||||
permisstionStore.setIsSuccessReq()
|
permisstionStore.setIsSuccessReq()
|
||||||
|
tagsViewStore.removeAllTagView()
|
||||||
router.push('/login')
|
router.push('/login')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -56,11 +56,16 @@ export const useTagsView = defineStore('tagsView',()=>{
|
|||||||
router.push(lastTagView.path)
|
router.push(lastTagView.path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const removeAllTagView = () => {
|
||||||
|
visitedViews.value.length = 0
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
visitedViews,
|
visitedViews,
|
||||||
addVisitedViews,
|
addVisitedViews,
|
||||||
delVisitedViews,
|
delVisitedViews,
|
||||||
delOtherVisitedViews,
|
delOtherVisitedViews,
|
||||||
delViewAndGoView
|
delViewAndGoView,
|
||||||
|
removeAllTagView
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ const getAllInfo = async (state) => {
|
|||||||
message: msg,
|
message: msg,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
loading.close()
|
||||||
}
|
}
|
||||||
if(data===undefined)return;
|
if(data===undefined)return;
|
||||||
commonForm.value = data
|
commonForm.value = data
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-button type="primary" link >
|
<el-button type="primary" link >
|
||||||
{{ modelValue }}
|
{{ modelValue || '请选择' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const getInfo = async () => {
|
|||||||
|
|
||||||
const formatIdsToNames = (ids, infoList, key, viewKey) => {
|
const formatIdsToNames = (ids, infoList, key, viewKey) => {
|
||||||
const resArr = []
|
const resArr = []
|
||||||
if(!ids.length) return '--'
|
if(!ids?.length) return
|
||||||
ids.forEach(item=>{
|
ids.forEach(item=>{
|
||||||
infoList.forEach(v=>{
|
infoList.forEach(v=>{
|
||||||
item == v[key] && resArr.push(v[viewKey])
|
item == v[key] && resArr.push(v[viewKey])
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<el-table-column prop="createTime" label="创建时间"/>
|
<el-table-column prop="createTime" label="创建时间"/>
|
||||||
<el-table-column prop="oper" label="操作">
|
<el-table-column prop="oper" label="操作">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link @click="goEdit(row.departmentId)">编辑</el-button>
|
<el-button type="primary" v-perm="['admin:department:update']" link @click="goEdit(row.departmentId)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@@ -135,14 +135,14 @@ const tableConfig = reactive({
|
|||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = [{label: '修改', auth: auths.edit, func: ()=>handleEdit(row) , type: 'primary'}]
|
let btn = [{label: '修改', auth: auths.edit, func: ()=>handleEdit(row) , type: 'primary'}]
|
||||||
btn.push(
|
// btn.push(
|
||||||
{
|
// {
|
||||||
label: '分配用户',
|
// label: '分配用户',
|
||||||
auth: auths.edit,
|
// auth: auths.edit,
|
||||||
func: ()=>handleAssign(row),
|
// func: ()=>handleAssign(row),
|
||||||
type: 'primary'
|
// type: 'primary'
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
if(authStore.roles.includes('superAdmin')) {
|
if(authStore.roles.includes('superAdmin')) {
|
||||||
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
|
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
|
||||||
} else if(!row.template) {
|
} else if(!row.template) {
|
||||||
|
|||||||
@@ -119,10 +119,10 @@ const tableConfig = reactive({
|
|||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" link onClick={()=>handleEdit(row)}>编辑</el-button>
|
<el-button type="primary" link onClick={()=>handleEdit(row)} v-perm={['admin:user:edit']}>编辑</el-button>
|
||||||
{
|
{
|
||||||
row.userType != 0 ?
|
row.userType != 0 ?
|
||||||
<el-button type="danger" link onClick={()=>handleDel(row)}>删除</el-button> :
|
<el-button type="danger" link onClick={()=>handleDel(row)} v-perm={['admin:user:del']}>删除</el-button> :
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user