fix : 屏蔽导出修复角色权限
This commit is contained in:
@@ -52,7 +52,6 @@ const router = useRouter()
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const showTinymce = ref(true)
|
|
||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
const processInstanceData = ref()
|
const processInstanceData = ref()
|
||||||
const fundForm = ref()
|
const fundForm = ref()
|
||||||
@@ -249,10 +248,8 @@ const getDetailInfo = async () => {
|
|||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
formData.value = res.data
|
formData.value = res.data
|
||||||
showTinymce.value = false
|
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
showTinymce.value = true
|
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
:props="localData.menuTreeProps"
|
:props="localData.menuTreeProps"
|
||||||
:check-strictly="!localData.checkStrictly"
|
:check-strictly="!localData.checkStrictly"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
node-key="menuId"
|
node-key="value"
|
||||||
@check-change="checkChange"
|
@check-change="checkChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,7 +38,7 @@ import { useTagsView } from '@/stores/tagsview.js'
|
|||||||
import { useAuthStore } from '@/stores/userstore.js'
|
import { useAuthStore } from '@/stores/userstore.js'
|
||||||
import fvRadio from '@/fvcomponents/fvRadio/index.vue'
|
import fvRadio from '@/fvcomponents/fvRadio/index.vue'
|
||||||
import { ElLoading, ElNotification } from 'element-plus';
|
import { ElLoading, ElNotification } from 'element-plus';
|
||||||
import { getMenuList } from '@/api/system/menuman.js'
|
import { getMenuOpt } from '@/api/system/menuman.js'
|
||||||
import { getRoleDetail, operate, getTemRoleOption } from "@/api/role/role";
|
import { getRoleDetail, operate, getTemRoleOption } from "@/api/role/role";
|
||||||
|
|
||||||
const tagsViewStore = useTagsView()
|
const tagsViewStore = useTagsView()
|
||||||
@@ -55,8 +55,8 @@ const localData = reactive({
|
|||||||
filterText: '',
|
filterText: '',
|
||||||
menuData: [],
|
menuData: [],
|
||||||
menuTreeProps: {
|
menuTreeProps: {
|
||||||
value: "menuId",
|
value: "value",
|
||||||
label: 'menuName',
|
label: 'label',
|
||||||
children: 'children'
|
children: 'children'
|
||||||
},
|
},
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
@@ -143,7 +143,7 @@ const init = async () => {
|
|||||||
form.value.setValues({state: '1', template: false})
|
form.value.setValues({state: '1', template: false})
|
||||||
const res = await getTemRoleOption()
|
const res = await getTemRoleOption()
|
||||||
localData.tempRoleOpt = res.data
|
localData.tempRoleOpt = res.data
|
||||||
const { data } = await getMenuList()
|
const { data } = await getMenuOpt(0)
|
||||||
localData.menuData = data
|
localData.menuData = data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import Tag from '@/components/Tag.vue'
|
|||||||
import { ElMessageBox, ElNotification } from 'element-plus';
|
import { ElMessageBox, ElNotification } from 'element-plus';
|
||||||
import { deleteRole } from "@/api/role/role";
|
import { deleteRole } from "@/api/role/role";
|
||||||
import { useAuthStore } from '@/stores/userstore.js'
|
import { useAuthStore } from '@/stores/userstore.js'
|
||||||
|
import {getSubCompOpt} from "@/api/user/user";
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -43,7 +44,19 @@ const shortcuts = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const searchConfig = reactive([
|
const searchConfig = ref([
|
||||||
|
{
|
||||||
|
label: '子公司名称',
|
||||||
|
prop: 'subCompanyId',
|
||||||
|
component: 'el-tree-select',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
clearable: true,
|
||||||
|
data: [],
|
||||||
|
filterable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '角色名称',
|
label: '角色名称',
|
||||||
prop: 'roleName',
|
prop: 'roleName',
|
||||||
@@ -108,6 +121,11 @@ const tableConfig = reactive({
|
|||||||
label: '角色权限',
|
label: '角色权限',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'companyName',
|
||||||
|
label: '公司名称',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'template',
|
prop: 'template',
|
||||||
label: '是否为模版角色',
|
label: '是否为模版角色',
|
||||||
@@ -183,20 +201,6 @@ const search = (val) => {
|
|||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
const formatDataScope = (dataScope) => {
|
|
||||||
let text = '--'
|
|
||||||
switch(dataScope) {
|
|
||||||
case '1': text = '所有数据权限'
|
|
||||||
break
|
|
||||||
case '2': text = '自定义数据权限'
|
|
||||||
break
|
|
||||||
case '3': text = '本部门数据权限'
|
|
||||||
break
|
|
||||||
case '4': text = '本部门及以下数据权限'
|
|
||||||
break
|
|
||||||
}
|
|
||||||
return text
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
router.push({
|
router.push({
|
||||||
@@ -252,6 +256,16 @@ const headBtnClick = (key) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const init = async () => {
|
||||||
|
if(!authStore.roles.includes('superAdmin')) {
|
||||||
|
searchConfig.value = searchConfig.value.slice(1)
|
||||||
|
}
|
||||||
|
searchConfig.value = searchConfig.value
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
searchConfig.value.find(item=>item.prop == 'subCompanyId').props.data = res.data
|
||||||
|
}
|
||||||
|
init()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const router = useRouter()
|
|||||||
|
|
||||||
const searchConfig = ref([
|
const searchConfig = ref([
|
||||||
{
|
{
|
||||||
label: '子公司ID',
|
label: '子公司名称',
|
||||||
prop: 'subCompanyId',
|
prop: 'subCompanyId',
|
||||||
component: 'el-tree-select',
|
component: 'el-tree-select',
|
||||||
props: {
|
props: {
|
||||||
@@ -33,7 +33,7 @@ const searchConfig = ref([
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '部门ID',
|
label: '部门名称',
|
||||||
prop: 'departmentId',
|
prop: 'departmentId',
|
||||||
component: 'el-tree-select',
|
component: 'el-tree-select',
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
Reference in New Issue
Block a user