import http from '@/utils/http' import { AppDispatch } from '..' /** *人际关系-列表 */ export const A3_APIgetList = (data: any, isAll?: boolean): any => { if (isAll) return http.post('cms/person/pageList', data) return async (dispatch: AppDispatch) => { const res = await http.post('cms/person/pageList', data) if (res.code === 0) { const obj = { list: res.data.records, total: res.data.total } dispatch({ type: 'A3/getList', payload: obj }) } } } /** * 人际关系-删除 */ export const A3_APIdel = (id: number) => { return http.get(`cms/person/remove/${id}`) } /** * 人际关系-新增、编辑 */ export const A3_APIsave = (data: any) => { return http.post('cms/person/save', data) } // -------------------关系组----------------- /** * 人际关系-关系组-获取列表 */ export const A3_APIG_getList = () => { return http.post('cms/relation/getList') } /** * 人际关系-关系组-删除 */ export const A3_APIG_del = (id: number) => { return http.get(`cms/relation/remove/${id}`) } /** * 人际关系-关系组-新增、编辑 */ export const A3_APIG_save = (data: any) => { return http.post('cms/relation/save', data) } /** * 人际关系-关系组-获取关系组人员列表 */ export const A3_APIG_getUserList = () => { return http.get('cms/relation/getPerson') } // -------------------用户展示端设置----------------- /** * 人际关系-展示端-获取配置 */ export const A3_APIS_getInfo = (dictId = 1) => { return http.get(`cms/person/dict/getDict/${dictId}`) } /** * 人际关系-展示端-设置配置 */ export const A3_APIS_save = (data: any) => { return http.post('cms/person/dict/update', data) }