fix : 屏蔽导出修复角色权限
This commit is contained in:
@@ -52,7 +52,6 @@ const router = useRouter()
|
||||
const route = useRoute()
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const showTinymce = ref(true)
|
||||
const showTable = ref(true)
|
||||
const processInstanceData = ref()
|
||||
const fundForm = ref()
|
||||
@@ -249,10 +248,8 @@ const getDetailInfo = async () => {
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
formData.value = res.data
|
||||
showTinymce.value = false
|
||||
showTable.value = false
|
||||
nextTick(() => {
|
||||
showTinymce.value = true
|
||||
showTable.value = true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
:props="localData.menuTreeProps"
|
||||
:check-strictly="!localData.checkStrictly"
|
||||
show-checkbox
|
||||
node-key="menuId"
|
||||
node-key="value"
|
||||
@check-change="checkChange"
|
||||
/>
|
||||
</div>
|
||||
@@ -38,7 +38,7 @@ import { useTagsView } from '@/stores/tagsview.js'
|
||||
import { useAuthStore } from '@/stores/userstore.js'
|
||||
import fvRadio from '@/fvcomponents/fvRadio/index.vue'
|
||||
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";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
@@ -55,8 +55,8 @@ const localData = reactive({
|
||||
filterText: '',
|
||||
menuData: [],
|
||||
menuTreeProps: {
|
||||
value: "menuId",
|
||||
label: 'menuName',
|
||||
value: "value",
|
||||
label: 'label',
|
||||
children: 'children'
|
||||
},
|
||||
checkStrictly: true,
|
||||
@@ -143,7 +143,7 @@ const init = async () => {
|
||||
form.value.setValues({state: '1', template: false})
|
||||
const res = await getTemRoleOption()
|
||||
localData.tempRoleOpt = res.data
|
||||
const { data } = await getMenuList()
|
||||
const { data } = await getMenuOpt(0)
|
||||
localData.menuData = data
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import Tag from '@/components/Tag.vue'
|
||||
import { ElMessageBox, ElNotification } from 'element-plus';
|
||||
import { deleteRole } from "@/api/role/role";
|
||||
import { useAuthStore } from '@/stores/userstore.js'
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
|
||||
const authStore = useAuthStore()
|
||||
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: '角色名称',
|
||||
prop: 'roleName',
|
||||
@@ -108,6 +121,11 @@ const tableConfig = reactive({
|
||||
label: '角色权限',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'companyName',
|
||||
label: '公司名称',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'template',
|
||||
label: '是否为模版角色',
|
||||
@@ -183,20 +201,6 @@ const search = (val) => {
|
||||
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 = () => {
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -15,7 +15,7 @@ const router = useRouter()
|
||||
|
||||
const searchConfig = ref([
|
||||
{
|
||||
label: '子公司ID',
|
||||
label: '子公司名称',
|
||||
prop: 'subCompanyId',
|
||||
component: 'el-tree-select',
|
||||
props: {
|
||||
@@ -33,7 +33,7 @@ const searchConfig = ref([
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '部门ID',
|
||||
label: '部门名称',
|
||||
prop: 'departmentId',
|
||||
component: 'el-tree-select',
|
||||
props: {
|
||||
|
||||
Reference in New Issue
Block a user