添加角色参数

master
doublekou 1 year ago
parent 7e2670d04f
commit 8e27ec77ff

@ -380,6 +380,7 @@ const ProTable = defineComponent({
const fetchData = () => {
if (!props.request) return undefined
return async (pageParams?: Record<string, any>) => {
console.log(pageParams, 'pageParams')
const actionParams = {
...(pageParams || {}),
...formSearch,

@ -242,6 +242,7 @@ export type GeopoliticalCustomersRecord = {
*
*/
export interface GeopoliticalCustomersSearch {
// salesmanType: number | undefined
customName?: string
customNid?: string
enrollStatus?: string
@ -254,6 +255,9 @@ export interface GeopoliticalCustomersSearch {
*
*/
export interface FormReviewSearch {
//角色
// salesmanType: string | undefined
//编号
batchNo?: string
// 访问时间区间的开始值
startTime?: string

@ -54,7 +54,7 @@ export type SysUserDTO = {
// 组织机构ID
organizationId?: number
// 角色标识列表
roleCodes: string[]
roleCodes: any
// desc: objectState
// stage: objectState
}

@ -8,10 +8,11 @@ export type MergePageParamFunction = <U>(
keyword?: string
},
sorter: Record<string, SortOrder>,
filter: Record<string, VueKey[] | null>
filter: Record<string, VueKey[] | null>,
salesmanType?: number | undefined
) => Record<string, any>
export const mergePageParam: MergePageParamFunction = (params, sorter, filter) => {
export const mergePageParam: MergePageParamFunction = (params, sorter, filter, salesmanType?) => {
const sort = []
for (const key in sorter) {
sort.push(sorter[key] === 'ascend' ? `${key},asc` : `${key},desc`)
@ -24,6 +25,7 @@ export const mergePageParam: MergePageParamFunction = (params, sorter, filter) =
page: current,
...rest,
...filter,
sort
sort,
salesmanType
}
}

@ -54,6 +54,14 @@ import type {
defineOptions({ name: 'FormReview' })
//
import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore()
const salesmanType = ref<number | undefined>()
onMounted(() => {
salesmanType.value = userInfo?.salesmanType
})
//
//
const tableRef = ref<ProTableInstanceExpose>()
@ -64,7 +72,7 @@ let searchParams: GeopoliticalCustomersPageParam = {}
//
const tableRequest: TableRequest = (params, sorter, filter) => {
const pageParam = mergePageParam(params, sorter, filter)
const pageParam = mergePageParam(params, sorter, filter, salesmanType.value)
return pageAccessLogs({ ...pageParam, ...searchParams })
}

@ -55,6 +55,14 @@ import type {
defineOptions({ name: 'GeopoliticalCustomers' })
//
import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore()
const salesmanType = ref<number | undefined>()
onMounted(() => {
salesmanType.value = userInfo?.salesmanType
})
//
//
const tableRef = ref<ProTableInstanceExpose>()
@ -65,7 +73,7 @@ let searchParams: GeopoliticalCustomersPageParam = {}
//
const tableRequest: TableRequest = (params, sorter, filter) => {
const pageParam = mergePageParam(params, sorter, filter)
const pageParam = mergePageParam(params, sorter, filter, salesmanType.value)
return pageAccessLogs({ ...pageParam, ...searchParams })
}

@ -53,6 +53,14 @@ import type {
defineOptions({ name: 'GeopoliticalCustomers' })
//
import { useUserStore } from '@/stores/user-store'
const { userInfo } = useUserStore()
const salesmanType = ref<number | undefined>()
onMounted(() => {
salesmanType.value = userInfo?.salesmanType
})
//
//
const tableRef = ref<ProTableInstanceExpose>()
@ -63,7 +71,7 @@ let searchParams: GeopoliticalCustomersPageParam = {}
//
const tableRequest: TableRequest = (params, sorter, filter) => {
const pageParam = mergePageParam(params, sorter, filter)
const pageParam = mergePageParam(params, sorter, filter, salesmanType.value)
return pageAccessLogs({ ...pageParam, ...searchParams })
}

@ -116,6 +116,11 @@ const { submitLoading, validateAndSubmit, resetFields, validateInfos } = useAdmi
//
const handleSubmit = () => {
console.log(formModel, 'formModel')
console.log()
if (typeof formModel.roleCodes === 'string') {
formModel.roleCodes = [formModel.roleCodes]
}
validateAndSubmit(
{
...formModel,

@ -22,13 +22,13 @@ import { antdvStyleDeps } from './src/utils/resolvers'
//项目
// const serverAddress = 'http://admin.ballcat.cn'
//xy
const serverAddress = 'http://172.18.0.225:8000'
// const serverAddress = 'http://172.18.0.225:8000'
//jt
// const serverAddress = 'http://172.18.1.8:8000'
//ts
// const serverAddress = 'http://172.18.0.228:8000'
//测试
// const serverAddress = 'http://39.100.77.21:8000'
const serverAddress = 'http://39.100.77.21:8000'
//线上ip
// const serverAddress = 'http://175.27.212.74:80'

Loading…
Cancel
Save