mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 04:08:44 +08:00 
			
		
		
		
	Vue3 重构:流程分配规则
This commit is contained in:
		@@ -166,7 +166,7 @@ const resetForm = () => {
 | 
			
		||||
/** 获得部门树 */
 | 
			
		||||
const getTree = async () => {
 | 
			
		||||
  deptTree.value = []
 | 
			
		||||
  const data = await DeptApi.listSimpleDeptApi()
 | 
			
		||||
  const data = await DeptApi.getSimpleDeptList()
 | 
			
		||||
  let dept: Tree = { id: 0, name: '顶级部门', children: [] }
 | 
			
		||||
  dept.children = handleTree(data)
 | 
			
		||||
  deptTree.value.push(dept)
 | 
			
		||||
 
 | 
			
		||||
@@ -165,7 +165,7 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 | 
			
		||||
import { rules, allSchemas } from './role.data'
 | 
			
		||||
import * as RoleApi from '@/api/system/role'
 | 
			
		||||
import { listSimpleMenusApi } from '@/api/system/menu'
 | 
			
		||||
import { listSimpleDeptApi } from '@/api/system/dept'
 | 
			
		||||
import { getSimpleDeptList } from '@/api/system/dept'
 | 
			
		||||
import * as PermissionApi from '@/api/system/permission'
 | 
			
		||||
 | 
			
		||||
const { t } = useI18n() // 国际化
 | 
			
		||||
@@ -278,7 +278,7 @@ const handleScope = async (type: string, row: RoleApi.RoleVO) => {
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
  } else if (type === 'data') {
 | 
			
		||||
    const deptRes = await listSimpleDeptApi()
 | 
			
		||||
    const deptRes = await getSimpleDeptList()
 | 
			
		||||
    treeOptions.value = handleTree(deptRes)
 | 
			
		||||
    const role = await RoleApi.getRoleApi(row.id)
 | 
			
		||||
    dataScopeForm.dataScope = role.dataScope
 | 
			
		||||
 
 | 
			
		||||
@@ -271,8 +271,8 @@ import { getAccessToken, getTenantId } from '@/utils/auth'
 | 
			
		||||
import type { FormExpose } from '@/components/Form'
 | 
			
		||||
import { rules, allSchemas } from './user.data'
 | 
			
		||||
import * as UserApi from '@/api/system/user'
 | 
			
		||||
import { listSimpleDeptApi } from '@/api/system/dept'
 | 
			
		||||
import { listSimpleRolesApi } from '@/api/system/role'
 | 
			
		||||
import { getSimpleDeptList } from '@/api/system/dept'
 | 
			
		||||
import { getSimpleRoleList } from '@/api/system/role'
 | 
			
		||||
import { getSimplePostList, PostVO } from '@/api/system/post'
 | 
			
		||||
import {
 | 
			
		||||
  aassignUserRoleApi,
 | 
			
		||||
@@ -301,7 +301,7 @@ const filterText = ref('')
 | 
			
		||||
const deptOptions = ref<Tree[]>([]) // 树形结构
 | 
			
		||||
const treeRef = ref<InstanceType<typeof ElTree>>()
 | 
			
		||||
const getTree = async () => {
 | 
			
		||||
  const res = await listSimpleDeptApi()
 | 
			
		||||
  const res = await getSimpleDeptList()
 | 
			
		||||
  deptOptions.value.push(...handleTree(res))
 | 
			
		||||
}
 | 
			
		||||
const filterNode = (value: string, data: Tree) => {
 | 
			
		||||
@@ -477,7 +477,7 @@ const handleRole = async (row: UserApi.UserVO) => {
 | 
			
		||||
  const roles = await listUserRolesApi(row.id)
 | 
			
		||||
  userRole.roleIds = roles
 | 
			
		||||
  // 获取角色列表
 | 
			
		||||
  const roleOpt = await listSimpleRolesApi()
 | 
			
		||||
  const roleOpt = await getSimpleRoleList()
 | 
			
		||||
  roleOptions.value = roleOpt
 | 
			
		||||
  roleDialogVisible.value = true
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user