| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- import request from "@/config/axios";
- // 钉钉扫码登录
- export async function socialLogin(type: string, code: string, state: string) {
- return await request.post({
- url: "/admin-api/system/auth/social-login",
- data: {
- type,
- code,
- state,
- },
- });
- }
- // 登出
- export const loginOut = () => {
- return request.post({ url: "/admin-api/system/auth/logout" });
- };
- // 获取用户权限信息
- export const getUserInfo = () => {
- return request.get({ url: "/admin-api/system/auth/get-permission-info" });
- };
- // 密码登陆
- type UserLoginVO = {
- username: string;
- password: string;
- captchaVerification: string;
- socialType?: string;
- socialCode?: string;
- socialState?: string;
- };
- export const login = (data: UserLoginVO) => {
- return request.post({
- url: "/admin-api/system/auth/login",
- data,
- });
- };
- // SSO登录
- export const ssoLogin = (data: any) => {
- return request.post({
- url: "/admin-api/system/auth/oaSsoToken",
- headers: { "Content-Type": "application/json" },
- data,
- });
- };
- export const zentaoSsoLogin = (data: any) => {
- return request.post({
- url: "/admin-api/system/auth/zentaoSsoToken",
- headers: { "Content-Type": "application/json" },
- data,
- });
- };
- export const getUnreadNotifyMessageCount = async () => {
- return await request.get({
- url: "/admin-api/system/notify-message/get-unread-count",
- });
- };
- // 经营驾驶舱sso
- export const getMCSsoToken = async () => {
- // https://portal.deepoil.cc/admin-api/rq/iot-fine-report/createSsoToken
- return await request.get({
- url: "/admin-api/rq/iot-fine-report/createSsoToken",
- });
- };
- // 分组接口
- export const getGroups = async () => {
- return await request.get({
- url: "/admin-api/portal/flow-group/page",
- });
- };
- // 根据id获取分组详情
- export const getGroupById = async (id: string) => {
- return await request.get({
- url: "/admin-api/portal/flow/get?groupId=" + id,
- });
- };
- // 获取所有的flow
- export const getFlows = async (params) => {
- return await request.get({
- url: "/admin-api/portal/flow-group/all",
- params,
- });
- };
- // oa待办任务
- export const getOATasks = async (params) => {
- return await request.get({
- url:
- "/admin-api/portal/todo/oa?workcode=" +
- params.id +
- "&pageNo=" +
- params.pageNum +
- "&pageSize=" +
- params.pageSize,
- });
- };
- // crm待办任务
- export const getCRMTasks = async (params) => {
- return await request.get({
- url:
- "/admin-api/portal/todo/crm?workcode=" +
- params.id +
- "&type=" +
- params.type +
- "&pageNo=" +
- params.pageNum +
- "&pageSize=" +
- params.pageSize,
- });
- };
- // 消息通知
- export const getNotifyMessages = async (id) => {
- return await request.get({
- url: "/admin-api/portal/todo/crm/notice?workcode=" + id,
- });
- };
- // 消息列表
- export const getNotifyMessageList = async (id) => {
- return await request.get({
- url: "/admin-api/portal/todo/crm/notice/self?workcode=" + id,
- });
- };
- // 标记消息为已读
- export const markMessageAsRead = async (id) => {
- return await request.get({
- url: "/admin-api/portal/todo/crm/notice/readed?workcode=" + id,
- });
- };
|