Merge pull request 'dj' (#321) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/321
This commit is contained in:
2024-06-11 12:56:37 +00:00
5 changed files with 48 additions and 37 deletions

View File

@@ -299,7 +299,7 @@ const tableConfig = reactive({
api: '/workflow/mosr/project/implementation',
params: {},
btns: [
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
// {name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
]
})

View File

@@ -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
})
}

View File

@@ -4,9 +4,9 @@
<fvForm :schema="schame" @getInstance="getInstance" :rules="rules"></fvForm>
<div class="assign-menu-title" >
<baseTitle title="分配菜单"></baseTitle>
<fvSelect
<fvSelect
:options="localData.tempRoleOpt"
v-model="localData.tempRoleSelect"
v-model="localData.tempRoleSelect"
style="width: 200px;"
placeholder="请选择模版角色"
@change="roleTempChange"
@@ -15,14 +15,14 @@
<fvCheckbox :options="localData.checkOptions" v-model="localData.checkList" @change="checkBoxChange" />
<el-input v-model="localData.filterText" placeholder="请输入关键词" style="width: 400px;" />
<div class="menu-assign">
<el-tree
<el-tree
ref="menuTree"
:data="localData.menuData"
:filter-node-method="filterMenu"
: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
}
@@ -171,7 +171,7 @@ const roleTempChange = async (val) => {
} catch (error) {
loading.value = false
}
}
const filterMenu = (value, data) => {
@@ -261,4 +261,4 @@ onMounted( async ()=>{
max-height: 500px;
overflow: auto;
}
</style>
</style>

View File

@@ -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: '是否为模版角色',
@@ -144,7 +162,7 @@ const tableConfig = reactive({
// }
// )
if(authStore.roles.includes('superAdmin')) {
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
} else if(!row.template) {
btn.push({label: '删除', auth: auths.del, func: ()=>handleDel(row) , type: 'danger'})
}
@@ -152,9 +170,9 @@ const tableConfig = reactive({
<div>
{
btn.map(item=>(
<el-button
type={item.type}
v-perm={item.auth}
<el-button
type={item.type}
v-perm={item.auth}
onClick={()=>item.func()}
link
>
@@ -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({
@@ -229,7 +233,7 @@ const handleDel = (row) => {
// })
// return
// }
ElMessageBox.confirm('确定删除该条数据吗?', '确定删除', {
type: 'warning',
confirmButtonText: '确定',
@@ -252,8 +256,18 @@ 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>
</style>
</style>

View File

@@ -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: {