初始化
This commit is contained in:
126
api/oa/app/field/index.ts
Normal file
126
api/oa/app/field/index.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { AppField, AppFieldParam } from '@/api/oa/app/field/model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询项目参数
|
||||
*/
|
||||
export async function pageAppField(params: AppFieldParam) {
|
||||
const res = await request.get<ApiResult<PageResult<AppField>>>(
|
||||
MODULES_API_URL + '/oa/app-field/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目参数列表
|
||||
*/
|
||||
export async function listAppField(params?: AppFieldParam) {
|
||||
const res = await request.get<ApiResult<AppField[]>>(
|
||||
MODULES_API_URL + '/oa/app-field',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询项目参数
|
||||
*/
|
||||
export async function getAppField(id: number) {
|
||||
const res = await request.get<ApiResult<AppField>>(
|
||||
MODULES_API_URL + '/oa/app-field/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加项目参数
|
||||
*/
|
||||
export async function addAppField(data: AppField) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目参数
|
||||
*/
|
||||
export async function updateAppField(data: AppField) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目参数
|
||||
*/
|
||||
export async function removeAppField(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-field/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目参数
|
||||
*/
|
||||
export async function removeBatchAppField(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-field/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-field/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
24
api/oa/app/field/model/index.ts
Normal file
24
api/oa/app/field/model/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 项目参数
|
||||
*/
|
||||
export interface AppField {
|
||||
id?: number;
|
||||
name?: string;
|
||||
comments?: string;
|
||||
userId?: number;
|
||||
appId?: number;
|
||||
status?: any;
|
||||
sortNumber?: any;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目参数搜索条件
|
||||
*/
|
||||
export interface AppFieldParam extends PageParam {
|
||||
id?: number;
|
||||
userId?: number;
|
||||
appId?: number;
|
||||
}
|
||||
190
api/oa/app/index.ts
Normal file
190
api/oa/app/index.ts
Normal file
@@ -0,0 +1,190 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { App, AppParam } from './model/index';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
export async function getCount() {
|
||||
const res = await request.get(MODULES_API_URL + '/oa/app/data');
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询应用
|
||||
*/
|
||||
export async function pageApp(params: AppParam) {
|
||||
const res = await request.get<ApiResult<PageResult<App>>>(
|
||||
MODULES_API_URL + '/oa/app/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应用列表
|
||||
*/
|
||||
export async function listApp(params?: AppParam) {
|
||||
const res = await request.get<ApiResult<App[]>>(MODULES_API_URL + '/oa/app', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询应用
|
||||
*/
|
||||
export async function getApp(id: number) {
|
||||
const res = await request.get<ApiResult<App>>(
|
||||
MODULES_API_URL + '/oa/app/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加应用
|
||||
*/
|
||||
export async function addApp(data: App) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应用
|
||||
*/
|
||||
export async function updateApp(data: App) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应用
|
||||
*/
|
||||
export async function removeApp(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除应用
|
||||
*/
|
||||
export async function removeBatchApp(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getAppSecret(data: App) {
|
||||
const res = await request.post<ApiResult<App>>(
|
||||
MODULES_API_URL + '/open/app/getAppSecret',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function updateAppSecret(data: App) {
|
||||
const res = await request.post<ApiResult<App>>(
|
||||
MODULES_API_URL + '/oa/app/updateAppSecret',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
// 添加菜单
|
||||
export async function saveMenu(data: App) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app/saveMenu',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
// 添加菜单按钮
|
||||
export async function saveAuthority(data: any[]) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app/saveAuthority',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我的项目信息
|
||||
*/
|
||||
export async function getMyApp() {
|
||||
const res = await request.get<ApiResult<App>>(
|
||||
MODULES_API_URL + '/oa/app/getMyApp'
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
166
api/oa/app/model/index.ts
Normal file
166
api/oa/app/model/index.ts
Normal file
@@ -0,0 +1,166 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import { AppUser } from '@/api/oa/app/user/model';
|
||||
import { AppField } from '@/api/oa/app/field/model';
|
||||
|
||||
/**
|
||||
* 应用
|
||||
*/
|
||||
export interface App {
|
||||
// 应用id
|
||||
appId?: number;
|
||||
// 应用秘钥
|
||||
appSecret?: string;
|
||||
// 英文名称
|
||||
enName?: string;
|
||||
// 应用名称
|
||||
appName?: string;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 应用编号
|
||||
appCode?: string;
|
||||
// 应用图标
|
||||
appIcon?: string;
|
||||
appQrcode?: string;
|
||||
// 应用截图
|
||||
images?: string;
|
||||
// 应用类型
|
||||
appType?: string;
|
||||
appTypeMultiple?: string[];
|
||||
// 菜单类型
|
||||
menuType?: number;
|
||||
// 应用地址
|
||||
appUrl?: string;
|
||||
// 后台管理地址
|
||||
adminUrl?: string;
|
||||
// 原型图地址
|
||||
prototypeUrl?: string;
|
||||
// 下载地址
|
||||
downUrl?: string;
|
||||
// 服务器接口地址
|
||||
serverUrl?: string;
|
||||
// 模块接口地址
|
||||
modulesUrl?: string;
|
||||
// 回调地址
|
||||
callbackUrl?: string;
|
||||
// 腾讯文档地址
|
||||
gitUrl?: string;
|
||||
docsUrl?: string;
|
||||
ipAddress?: string;
|
||||
fileUrl?: string;
|
||||
// 应用包名
|
||||
packageName?: string;
|
||||
// 点击次数
|
||||
clicks?: string;
|
||||
// 安装次数
|
||||
installs?: string;
|
||||
// 项目介绍
|
||||
content?: string;
|
||||
// 开发者(个人)
|
||||
developer?: string;
|
||||
director?: string;
|
||||
projectDirector?: string;
|
||||
salesman?: string;
|
||||
// 续费金额
|
||||
renewMoney?: string;
|
||||
// 软件定价
|
||||
price?: number;
|
||||
// 评分
|
||||
score?: string;
|
||||
// 星级
|
||||
star?: string;
|
||||
// 菜单组件地址
|
||||
component?: string;
|
||||
// 菜单路由地址
|
||||
path?: string;
|
||||
// 权限标识
|
||||
authority?: string;
|
||||
// 打开位置
|
||||
target?: string;
|
||||
// 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
|
||||
hide?: number;
|
||||
// 菜单侧栏选中的path
|
||||
active?: string;
|
||||
// 其它路由元信息
|
||||
meta?: string;
|
||||
// 版本
|
||||
edition?: string;
|
||||
// 版本号
|
||||
version?: string;
|
||||
// 是否已安装
|
||||
isUse?: number;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: any;
|
||||
tenantName?: string;
|
||||
companyId?: number;
|
||||
companyName?: string;
|
||||
// 租户编号
|
||||
tenantCode?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 过期时间
|
||||
expirationTime?: string;
|
||||
// 应用状态
|
||||
appStatus?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 发布者
|
||||
userId?: any;
|
||||
// 发布者昵称
|
||||
nickname?: string;
|
||||
// 子菜单
|
||||
children?: App[];
|
||||
// 权限树回显选中状态, 0未选中, 1选中
|
||||
checked?: boolean;
|
||||
//
|
||||
key?: number;
|
||||
//
|
||||
value?: number;
|
||||
//
|
||||
parentIds?: number[];
|
||||
//
|
||||
openType?: number;
|
||||
//
|
||||
search?: any;
|
||||
// 成员管理
|
||||
users?: AppUser[];
|
||||
fields?: AppField[];
|
||||
// 项目需求
|
||||
requirement?: string;
|
||||
phone?: string;
|
||||
file1?: string;
|
||||
file2?: string;
|
||||
file3?: string;
|
||||
showCase?: boolean;
|
||||
showIndex?: boolean;
|
||||
recommend?: boolean;
|
||||
categoryName?: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用搜索条件
|
||||
*/
|
||||
export interface AppParam extends PageParam {
|
||||
userId?: number;
|
||||
appName?: any;
|
||||
appCode?: string;
|
||||
appId?: number;
|
||||
developer?: string;
|
||||
tenantCode?: string;
|
||||
parentId?: string;
|
||||
tenantName?: string;
|
||||
companyName?: string;
|
||||
companyId?: number;
|
||||
status?: number;
|
||||
nickname?: string;
|
||||
appStatus?: any;
|
||||
showCase?: boolean;
|
||||
showIndex?: boolean;
|
||||
showExpiration?: boolean;
|
||||
keywords?: any;
|
||||
sceneType?: string;
|
||||
}
|
||||
126
api/oa/app/renew/index.ts
Normal file
126
api/oa/app/renew/index.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { AppRenew, AppRenewParam } from '@/api/oa/app/renew/model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询开发成员
|
||||
*/
|
||||
export async function pageAppRenew(params: AppRenewParam) {
|
||||
const res = await request.get<ApiResult<PageResult<AppRenew>>>(
|
||||
MODULES_API_URL + '/oa/app-renew/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询开发成员列表
|
||||
*/
|
||||
export async function listAppRenew(params?: AppRenewParam) {
|
||||
const res = await request.get<ApiResult<AppRenew[]>>(
|
||||
MODULES_API_URL + '/oa/app-renew',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询开发成员
|
||||
*/
|
||||
export async function getAppRenew(id: number) {
|
||||
const res = await request.get<ApiResult<AppRenew>>(
|
||||
MODULES_API_URL + '/oa/app-renew/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加开发成员
|
||||
*/
|
||||
export async function addAppRenew(data: AppRenew) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-renew',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改开发成员
|
||||
*/
|
||||
export async function updateAppRenew(data: AppRenew) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-renew',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除开发成员
|
||||
*/
|
||||
export async function removeAppRenew(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-renew/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除开发成员
|
||||
*/
|
||||
export async function removeBatchAppRenew(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-renew/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-renew/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
40
api/oa/app/renew/model/index.ts
Normal file
40
api/oa/app/renew/model/index.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 开发成员
|
||||
*/
|
||||
export interface AppRenew {
|
||||
appRenewId?: number;
|
||||
money?: any;
|
||||
comments?: string;
|
||||
startTime?: any;
|
||||
endTime?: any;
|
||||
userId?: number;
|
||||
nickname?: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
mobile?: string;
|
||||
appId?: number;
|
||||
companyId?: number;
|
||||
status?: any;
|
||||
images?: string;
|
||||
files?: any;
|
||||
createTime?: string;
|
||||
editStatus?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开发成员搜索条件
|
||||
*/
|
||||
export interface AppRenewParam extends PageParam {
|
||||
userId?: number;
|
||||
appId?: number;
|
||||
}
|
||||
|
||||
export interface UserItem {
|
||||
key: string;
|
||||
isEdit?: boolean;
|
||||
number?: string;
|
||||
name?: string;
|
||||
department?: string;
|
||||
}
|
||||
106
api/oa/app/url/index.ts
Normal file
106
api/oa/app/url/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { AppUrl, AppUrlParam } from '@/api/oa/app/url/model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询项目域名
|
||||
*/
|
||||
export async function pageAppUrl(params: AppUrlParam) {
|
||||
const res = await request.get<ApiResult<PageResult<AppUrl>>>(
|
||||
MODULES_API_URL + '/oa/app-url/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目域名列表
|
||||
*/
|
||||
export async function listAppUrl(params?: AppUrlParam) {
|
||||
const res = await request.get<ApiResult<AppUrl[]>>(
|
||||
MODULES_API_URL + '/oa/app-url',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询项目域名
|
||||
*/
|
||||
export async function getAppUrl(id: number) {
|
||||
const res = await request.get<ApiResult<AppUrl>>(
|
||||
MODULES_API_URL + '/oa/app-url/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加项目域名
|
||||
*/
|
||||
export async function addAppUrl(data: AppUrl) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-url',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目域名
|
||||
*/
|
||||
export async function updateAppUrl(data: AppUrl) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-url',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目域名
|
||||
*/
|
||||
export async function removeAppUrl(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-url/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目域名
|
||||
*/
|
||||
export async function removeBatchAppUrl(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-url/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
26
api/oa/app/url/model/index.ts
Normal file
26
api/oa/app/url/model/index.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 项目域名
|
||||
*/
|
||||
export interface AppUrl {
|
||||
appUrlId?: number;
|
||||
name?: string;
|
||||
domain?: string;
|
||||
account?: string;
|
||||
password?: string;
|
||||
comments?: string;
|
||||
appId?: number;
|
||||
status?: any;
|
||||
sortNumber?: any;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目域名搜索条件
|
||||
*/
|
||||
export interface AppUrlParam extends PageParam {
|
||||
id?: number;
|
||||
userId?: number;
|
||||
appId?: number;
|
||||
}
|
||||
126
api/oa/app/user/index.ts
Normal file
126
api/oa/app/user/index.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { AppUser, AppUserParam } from '@/api/oa/app/user/model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询开发成员
|
||||
*/
|
||||
export async function pageAppUser(params: AppUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<AppUser>>>(
|
||||
MODULES_API_URL + '/oa/app-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询开发成员列表
|
||||
*/
|
||||
export async function listAppUser(params?: AppUserParam) {
|
||||
const res = await request.get<ApiResult<AppUser[]>>(
|
||||
MODULES_API_URL + '/oa/app-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询开发成员
|
||||
*/
|
||||
export async function getAppUser(id: number) {
|
||||
const res = await request.get<ApiResult<AppUser>>(
|
||||
MODULES_API_URL + '/oa/app-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加开发成员
|
||||
*/
|
||||
export async function addAppUser(data: AppUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改开发成员
|
||||
*/
|
||||
export async function updateAppUser(data: AppUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除开发成员
|
||||
*/
|
||||
export async function removeAppUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除开发成员
|
||||
*/
|
||||
export async function removeBatchAppUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/app-user/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
37
api/oa/app/user/model/index.ts
Normal file
37
api/oa/app/user/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 开发成员
|
||||
*/
|
||||
export interface AppUser {
|
||||
// 开发成员id
|
||||
appUserId?: number;
|
||||
role?: number;
|
||||
userId?: number;
|
||||
username?: string;
|
||||
nickname?: string;
|
||||
avatar?: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
mobile?: string;
|
||||
appId?: number;
|
||||
status?: string;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开发成员搜索条件
|
||||
*/
|
||||
export interface AppUserParam extends PageParam {
|
||||
userId?: number;
|
||||
appId?: number;
|
||||
role?: number;
|
||||
}
|
||||
|
||||
export interface UserItem {
|
||||
key: string;
|
||||
isEdit?: boolean;
|
||||
number?: string;
|
||||
name?: string;
|
||||
department?: string;
|
||||
}
|
||||
18
api/oa/apply/index.ts
Normal file
18
api/oa/apply/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult } from '@/api';
|
||||
import type { Customer } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 申请免费体验
|
||||
*/
|
||||
export async function apply(data: Customer) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/customer-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
43
api/oa/apply/model/index.ts
Normal file
43
api/oa/apply/model/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 客户
|
||||
*/
|
||||
export interface Customer {
|
||||
// 客户id
|
||||
customerId?: number;
|
||||
// 客户类型
|
||||
customerType?: string;
|
||||
// 客户标识
|
||||
customerCode: string;
|
||||
// 客户名称
|
||||
customerName?: string;
|
||||
// 客户头像
|
||||
customerAvatar?: string;
|
||||
// 座机电话
|
||||
customerPhone?: string;
|
||||
// 手机号码
|
||||
customerMobile?: string;
|
||||
// 联系人
|
||||
customerContacts?: string;
|
||||
// 联系地址
|
||||
customerAddress?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 状态
|
||||
status?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户搜索条件
|
||||
*/
|
||||
export interface CustomerParam extends PageParam {
|
||||
customerName?: string;
|
||||
customerCode?: string;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
}
|
||||
134
api/oa/assets/index.ts
Normal file
134
api/oa/assets/index.ts
Normal file
@@ -0,0 +1,134 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Assets, AssetsParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
export async function getCount() {
|
||||
const res = await request.get(MODULES_API_URL + '/oa/assets/data');
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询资产
|
||||
*/
|
||||
export async function pageAssets(params: AssetsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Assets>>>(
|
||||
MODULES_API_URL + '/oa/assets/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资产列表
|
||||
*/
|
||||
export async function listAssets(params?: AssetsParam) {
|
||||
const res = await request.get<ApiResult<Assets[]>>(
|
||||
MODULES_API_URL + '/oa/assets',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询服务器
|
||||
*/
|
||||
export async function getAssets(id: number) {
|
||||
const res = await request.get<ApiResult<Assets>>(
|
||||
MODULES_API_URL + '/oa/assets/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加资产
|
||||
*/
|
||||
export async function addAssets(data: Assets) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资产
|
||||
*/
|
||||
export async function updateAssets(data: Assets) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产
|
||||
*/
|
||||
export async function removeAssets(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资产
|
||||
*/
|
||||
export async function removeBatchAssets(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
89
api/oa/assets/model/index.ts
Normal file
89
api/oa/assets/model/index.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import type { User } from '@/api/system/user/model';
|
||||
import {AssetsUser} from "@/api/oa/assets/user/model";
|
||||
|
||||
/**
|
||||
* 资产
|
||||
*/
|
||||
export interface Assets {
|
||||
// 资产id
|
||||
assetsId?: number;
|
||||
// 资产类型
|
||||
type?: string;
|
||||
// 资产标识
|
||||
code: string;
|
||||
// 资产名称
|
||||
name?: string;
|
||||
//
|
||||
account?: string;
|
||||
//
|
||||
password?: string;
|
||||
//
|
||||
panel?: string;
|
||||
//
|
||||
panelAccount?: string;
|
||||
//
|
||||
panelPassword?: string;
|
||||
//
|
||||
configuration?: any;
|
||||
root?: string;
|
||||
//
|
||||
sortNumber?: number;
|
||||
financeAmount?: any;
|
||||
financeYears?: any;
|
||||
financeRenew?: any;
|
||||
financeCustomerName?: string;
|
||||
financeCustomerContact?: string;
|
||||
financeCustomerPhone?: string;
|
||||
//
|
||||
brandAccount?: string;
|
||||
brandPassword?: string;
|
||||
btSign?: string;
|
||||
openPort?: any;
|
||||
comments?: string;
|
||||
// 所属客户
|
||||
customerId?: number;
|
||||
customerName?: string;
|
||||
// 品牌
|
||||
brand?: string;
|
||||
// 购买时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 状态
|
||||
status?: string;
|
||||
userId?: number;
|
||||
companyId?: number;
|
||||
companyName?: string;
|
||||
nickname?: string;
|
||||
// 可见性类型
|
||||
visibility?: string;
|
||||
// 可见用户ID
|
||||
userList?: User[];
|
||||
systemTotal?: Object;
|
||||
diskInfo?: Object;
|
||||
netWork?: Object;
|
||||
sites?: Object;
|
||||
users?: AssetsUser[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 资产搜索条件
|
||||
*/
|
||||
export interface AssetsParam extends PageParam {
|
||||
assetsId?: number;
|
||||
name?: string;
|
||||
code?: string;
|
||||
isExpire?: string;
|
||||
status?: string;
|
||||
brand?: string;
|
||||
customerId?: string;
|
||||
companyId?: number;
|
||||
companyName?: string;
|
||||
userId?: number;
|
||||
showExpiration?: string;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
}
|
||||
129
api/oa/assets/user/index.ts
Normal file
129
api/oa/assets/user/index.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
AssetsUser,
|
||||
AssetsUserParam
|
||||
} from '@/api/oa/assets/user/model/index';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询开发成员
|
||||
*/
|
||||
export async function pageAssetsUser(params: AssetsUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<AssetsUser>>>(
|
||||
MODULES_API_URL + '/oa/assets-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询开发成员列表
|
||||
*/
|
||||
export async function listAssetsUser(params?: AssetsUserParam) {
|
||||
const res = await request.get<ApiResult<AssetsUser[]>>(
|
||||
MODULES_API_URL + '/oa/assets-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询开发成员
|
||||
*/
|
||||
export async function getAssetsUser(id: number) {
|
||||
const res = await request.get<ApiResult<AssetsUser>>(
|
||||
MODULES_API_URL + '/oa/assets-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加开发成员
|
||||
*/
|
||||
export async function addAssetsUser(data: AssetsUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改开发成员
|
||||
*/
|
||||
export async function updateAssetsUser(data: AssetsUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除开发成员
|
||||
*/
|
||||
export async function removeAssetsUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除开发成员
|
||||
*/
|
||||
export async function removeBatchAssetsUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/assets-user/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
api/oa/assets/user/model/index.ts
Normal file
35
api/oa/assets/user/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 开发成员
|
||||
*/
|
||||
export interface AssetsUser {
|
||||
// 开发成员id
|
||||
id?: number;
|
||||
role?: number;
|
||||
userId?: number;
|
||||
username?: string;
|
||||
nickname?: string;
|
||||
avatar?: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
assetsId?: number;
|
||||
status?: string;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开发成员搜索条件
|
||||
*/
|
||||
export interface AssetsUserParam extends PageParam {
|
||||
userId?: number;
|
||||
assetsId?: number;
|
||||
}
|
||||
|
||||
export interface UserItem {
|
||||
key: string;
|
||||
isEdit?: boolean;
|
||||
number?: string;
|
||||
name?: string;
|
||||
department?: string;
|
||||
}
|
||||
31
api/oa/chatgpt/index.ts
Normal file
31
api/oa/chatgpt/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult } from '@/api';
|
||||
import { ChatParam } from '@/api/oa/chatgpt/model';
|
||||
import {MODULES_API_URL} from "@/config/setting";
|
||||
|
||||
/**
|
||||
* 发送
|
||||
*/
|
||||
export async function send(data: ChatParam) {
|
||||
const res = await request.post<ApiResult<unknown>>(MODULES_API_URL + '/open/chat/send', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求openAI
|
||||
* /open/chat/chat
|
||||
* 'https://chatgpt.websoft.top/api/open/chat/chat',
|
||||
*/
|
||||
export async function chat(data: ChatParam) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'https://chatgpt.websoft.top/api/open/chat/chat',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
17
api/oa/chatgpt/model/index.ts
Normal file
17
api/oa/chatgpt/model/index.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* 消息
|
||||
*/
|
||||
export interface Chat {
|
||||
noticeId?: number;
|
||||
content?: any;
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务搜索条件
|
||||
*/
|
||||
export interface ChatParam {
|
||||
tenantId?: number;
|
||||
content?: string;
|
||||
noticeId?: number;
|
||||
}
|
||||
140
api/oa/customer/index.ts
Normal file
140
api/oa/customer/index.ts
Normal file
@@ -0,0 +1,140 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Customer, CustomerParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询客户
|
||||
*/
|
||||
export async function pageCustomer(params: CustomerParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Customer>>>(
|
||||
MODULES_API_URL + '/oa/customer/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户列表
|
||||
*/
|
||||
export async function listCustomer(params?: CustomerParam) {
|
||||
const res = await request.get<ApiResult<Customer[]>>(
|
||||
MODULES_API_URL + '/oa/customer',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询客户
|
||||
*/
|
||||
export async function getCustomer(id: number) {
|
||||
const res = await request.get<ApiResult<Customer>>(
|
||||
MODULES_API_URL + '/oa/customer/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加客户
|
||||
*/
|
||||
export async function addCustomer(data: Customer) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/customer',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
*/
|
||||
export async function updateCustomer(data: Customer) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/customer',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改客户
|
||||
*/
|
||||
export async function updateBatchCustomer(data: Customer[]) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/customer/batch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
*/
|
||||
export async function removeCustomer(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/customer/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除客户
|
||||
*/
|
||||
export async function removeBatchCustomer(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/customer/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/customer/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
67
api/oa/customer/model/index.ts
Normal file
67
api/oa/customer/model/index.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 客户
|
||||
*/
|
||||
export interface Customer {
|
||||
// 客户id
|
||||
customerId?: number;
|
||||
// 客户类型
|
||||
customerType?: string;
|
||||
// 客户来源
|
||||
customerSource?: string;
|
||||
// 客户标识
|
||||
customerCode: string;
|
||||
// 客户名称
|
||||
customerName?: string;
|
||||
// 客户全称
|
||||
customerFullName?: string;
|
||||
// 客户头像
|
||||
customerAvatar?: string;
|
||||
// 座机电话
|
||||
customerPhone?: string;
|
||||
// 手机号码
|
||||
customerMobile?: string;
|
||||
// 联系人
|
||||
customerContacts?: string;
|
||||
// 联系地址
|
||||
customerAddress?: string;
|
||||
customerProvince?: string;
|
||||
customerCity?: string;
|
||||
customerRegion?: string;
|
||||
longitude?: string;
|
||||
latitude?: string;
|
||||
// 跟进状态
|
||||
progress?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 状态
|
||||
status?: string;
|
||||
// 用户ID
|
||||
userId?: any;
|
||||
// 发布者昵称
|
||||
nickname?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户搜索条件
|
||||
*/
|
||||
export interface CustomerParam extends PageParam {
|
||||
customerName?: string;
|
||||
customerCode?: string;
|
||||
customerType?: string;
|
||||
createTimeStart?: string;
|
||||
createTimeEnd?: string;
|
||||
customerCategory?: string;
|
||||
progress?: string;
|
||||
customerSource?: string;
|
||||
betweenTime?: any;
|
||||
userId?: number;
|
||||
nickname?: string;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
}
|
||||
113
api/oa/link/index.ts
Normal file
113
api/oa/link/index.ts
Normal file
@@ -0,0 +1,113 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Link, LinkParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询链接
|
||||
*/
|
||||
export async function pageLink(params: LinkParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Link>>>(
|
||||
MODULES_API_URL + '/oa/link/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询链接列表
|
||||
*/
|
||||
export async function listLink(params?: LinkParam) {
|
||||
const res = await request.get<ApiResult<Link[]>>(
|
||||
MODULES_API_URL + '/oa/link',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加链接
|
||||
*/
|
||||
export async function addLink(data: Link) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改链接
|
||||
*/
|
||||
export async function updateLink(data: Link) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除链接
|
||||
*/
|
||||
export async function removeLink(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除链接
|
||||
*/
|
||||
export async function removeBatchLink(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
29
api/oa/link/model/index.ts
Normal file
29
api/oa/link/model/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 链接
|
||||
*/
|
||||
export interface Link {
|
||||
id?: number;
|
||||
name?: string;
|
||||
icon?: string;
|
||||
url?: string;
|
||||
linkType?: string;
|
||||
appId?: number;
|
||||
userId?: number;
|
||||
comments?: string;
|
||||
recommend?: number;
|
||||
sortNumber?: number;
|
||||
deleted?: number;
|
||||
status?: number;
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 链接搜索条件
|
||||
*/
|
||||
export interface LinkParam extends PageParam {
|
||||
id?: number;
|
||||
linkType?: string;
|
||||
name?: string;
|
||||
}
|
||||
111
api/oa/notice/index.ts
Normal file
111
api/oa/notice/index.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Notice, NoticeParam } from './model/index';
|
||||
import { TabsParam } from '@/api/tabs';
|
||||
|
||||
/**
|
||||
* 分页查询消息
|
||||
*/
|
||||
export async function pageNotice(params: NoticeParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Notice>>>(
|
||||
'/oa/notice/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询消息列表
|
||||
*/
|
||||
export async function listNotice(params?: NoticeParam) {
|
||||
const res = await request.get<ApiResult<Notice[]>>('/oa/notice', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询消息
|
||||
*/
|
||||
export async function getNotice(id: number) {
|
||||
const res = await request.get<ApiResult<Notice>>('/oa/notice/' + id);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加消息
|
||||
*/
|
||||
export async function addNotice(data: Notice) {
|
||||
const res = await request.post<ApiResult<unknown>>('/oa/notice', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消息
|
||||
*/
|
||||
export async function updateNotice(data: Notice) {
|
||||
const res = await request.put<ApiResult<unknown>>('/oa/notice', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息
|
||||
*/
|
||||
export async function removeNotice(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/oa/notice/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改消息
|
||||
*/
|
||||
export async function updateBatchNotices(data: Notice[]) {
|
||||
const res = await request.put<ApiResult<unknown>>('/oa/notice/batch', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除消息
|
||||
*/
|
||||
export async function removeBatchNotice(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/oa/notice/batch', {
|
||||
data
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getCount(params?: TabsParam) {
|
||||
const res = await request.get<ApiResult<TabsParam>>('/oa/notice/count', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
40
api/oa/notice/model/index.ts
Normal file
40
api/oa/notice/model/index.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 消息
|
||||
*/
|
||||
export interface Notice {
|
||||
// 消息id
|
||||
noticeRecordId?: number;
|
||||
noticeId?: number;
|
||||
title?: string;
|
||||
channel?: string;
|
||||
avatar?: string;
|
||||
content?: string;
|
||||
files?: string;
|
||||
developerId?: number;
|
||||
userId?: number;
|
||||
sortNumber?: number;
|
||||
comments?: string;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息搜索条件
|
||||
*/
|
||||
export interface NoticeParam extends PageParam {
|
||||
type?: string;
|
||||
noticeRecordId?: number;
|
||||
noticeId?: number;
|
||||
userId?: number;
|
||||
developerId?: number;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
// 查询未读数量
|
||||
export interface NnReadNum {
|
||||
notice?: string;
|
||||
letter?: number;
|
||||
todo?: number;
|
||||
chatGPT?: number;
|
||||
}
|
||||
106
api/oa/oaApp/index.ts
Normal file
106
api/oa/oaApp/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaApp, OaAppParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询应用
|
||||
*/
|
||||
export async function pageOaApp(params: OaAppParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaApp>>>(
|
||||
MODULES_API_URL + '/oa/oa-app/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应用列表
|
||||
*/
|
||||
export async function listOaApp(params?: OaAppParam) {
|
||||
const res = await request.get<ApiResult<OaApp[]>>(
|
||||
MODULES_API_URL + '/oa/oa-app',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加应用
|
||||
*/
|
||||
export async function addOaApp(data: OaApp) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应用
|
||||
*/
|
||||
export async function updateOaApp(data: OaApp) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应用
|
||||
*/
|
||||
export async function removeOaApp(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除应用
|
||||
*/
|
||||
export async function removeBatchOaApp(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询应用
|
||||
*/
|
||||
export async function getOaApp(id: number) {
|
||||
const res = await request.get<ApiResult<OaApp>>(
|
||||
MODULES_API_URL + '/oa/oa-app/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
149
api/oa/oaApp/model/index.ts
Normal file
149
api/oa/oaApp/model/index.ts
Normal file
@@ -0,0 +1,149 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 应用
|
||||
*/
|
||||
export interface OaApp {
|
||||
// 应用ID
|
||||
appId?: number;
|
||||
// 应用名称
|
||||
appName?: string;
|
||||
// 应用标识
|
||||
appCode?: string;
|
||||
// 应用秘钥
|
||||
appSecret?: string;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 应用类型
|
||||
appType?: string;
|
||||
// 应用类型
|
||||
appTypeMultiple?: string;
|
||||
// 类型, 0菜单, 1按钮
|
||||
menuType?: number;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 企业名称
|
||||
companyName?: string;
|
||||
// 应用图标
|
||||
appIcon?: string;
|
||||
// 二维码
|
||||
appQrcode?: string;
|
||||
// 链接地址
|
||||
appUrl?: string;
|
||||
// 后台管理地址
|
||||
adminUrl?: string;
|
||||
// 下载地址
|
||||
downUrl?: string;
|
||||
// 链接地址
|
||||
serverUrl?: string;
|
||||
// 文件服务器
|
||||
fileUrl?: string;
|
||||
// 回调地址
|
||||
callbackUrl?: string;
|
||||
// 腾讯文档地址
|
||||
docsUrl?: string;
|
||||
// 代码仓库地址
|
||||
gitUrl?: string;
|
||||
// 原型图地址
|
||||
prototypeUrl?: string;
|
||||
// IP白名单
|
||||
ipAddress?: string;
|
||||
// 应用截图
|
||||
images?: string;
|
||||
// 应用包名
|
||||
packageName?: string;
|
||||
// 下载次数
|
||||
clicks?: number;
|
||||
// 安装次数
|
||||
installs?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 应用介绍
|
||||
content?: string;
|
||||
// 项目需求
|
||||
requirement?: string;
|
||||
// 开发者(个人或公司)
|
||||
developer?: string;
|
||||
// 项目负责人
|
||||
director?: string;
|
||||
// 项目经理
|
||||
projectDirector?: string;
|
||||
// 业务员
|
||||
salesman?: string;
|
||||
// 软件定价
|
||||
price?: number;
|
||||
// 划线价格
|
||||
linePrice?: string;
|
||||
// 评分
|
||||
score?: string;
|
||||
// 星级
|
||||
star?: string;
|
||||
// 菜单路由地址
|
||||
path?: string;
|
||||
// 菜单组件地址, 目录可为空
|
||||
component?: string;
|
||||
// 权限标识
|
||||
authority?: string;
|
||||
// 打开位置
|
||||
target?: string;
|
||||
// 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
|
||||
hide?: number;
|
||||
// 禁止搜索,1禁止 0 允许
|
||||
search?: number;
|
||||
// 菜单侧栏选中的path
|
||||
active?: string;
|
||||
// 其它路由元信息
|
||||
meta?: string;
|
||||
// 版本,0正式版 1基础版 2开发版
|
||||
edition?: string;
|
||||
// 版本号
|
||||
version?: string;
|
||||
// 是否已安装
|
||||
isUse?: number;
|
||||
// 附近1
|
||||
file1?: string;
|
||||
// 附件2
|
||||
file2?: string;
|
||||
// 附件3
|
||||
file3?: string;
|
||||
// 是否显示续费提醒
|
||||
showExpiration?: number;
|
||||
// 是否作为案例展示
|
||||
showCase?: number;
|
||||
// 是否显示在首页
|
||||
showIndex?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 到期时间
|
||||
expirationTime?: string;
|
||||
// 续费金额
|
||||
renewMoney?: string;
|
||||
// 应用状态
|
||||
appStatus?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 机构id
|
||||
organizationId?: number;
|
||||
// 租户编号
|
||||
tenantCode?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用搜索条件
|
||||
*/
|
||||
export interface OaAppParam extends PageParam {
|
||||
appId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAppField/index.ts
Normal file
106
api/oa/oaAppField/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAppField, OaAppFieldParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询应用参数
|
||||
*/
|
||||
export async function pageOaAppField(params: OaAppFieldParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAppField>>>(
|
||||
MODULES_API_URL + '/oa/oa-app-field/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应用参数列表
|
||||
*/
|
||||
export async function listOaAppField(params?: OaAppFieldParam) {
|
||||
const res = await request.get<ApiResult<OaAppField[]>>(
|
||||
MODULES_API_URL + '/oa/oa-app-field',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加应用参数
|
||||
*/
|
||||
export async function addOaAppField(data: OaAppField) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应用参数
|
||||
*/
|
||||
export async function updateOaAppField(data: OaAppField) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应用参数
|
||||
*/
|
||||
export async function removeOaAppField(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-field/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除应用参数
|
||||
*/
|
||||
export async function removeBatchOaAppField(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-field/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询应用参数
|
||||
*/
|
||||
export async function getOaAppField(id: number) {
|
||||
const res = await request.get<ApiResult<OaAppField>>(
|
||||
MODULES_API_URL + '/oa/oa-app-field/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
33
api/oa/oaAppField/model/index.ts
Normal file
33
api/oa/oaAppField/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 应用参数
|
||||
*/
|
||||
export interface OaAppField {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 应用ID
|
||||
appId?: number;
|
||||
// 名称
|
||||
name?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态, 0正常, 1删除
|
||||
status?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用参数搜索条件
|
||||
*/
|
||||
export interface OaAppFieldParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAppRenew/index.ts
Normal file
106
api/oa/oaAppRenew/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAppRenew, OaAppRenewParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询续费管理
|
||||
*/
|
||||
export async function pageOaAppRenew(params: OaAppRenewParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAppRenew>>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询续费管理列表
|
||||
*/
|
||||
export async function listOaAppRenew(params?: OaAppRenewParam) {
|
||||
const res = await request.get<ApiResult<OaAppRenew[]>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加续费管理
|
||||
*/
|
||||
export async function addOaAppRenew(data: OaAppRenew) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改续费管理
|
||||
*/
|
||||
export async function updateOaAppRenew(data: OaAppRenew) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除续费管理
|
||||
*/
|
||||
export async function removeOaAppRenew(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除续费管理
|
||||
*/
|
||||
export async function removeBatchOaAppRenew(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询续费管理
|
||||
*/
|
||||
export async function getOaAppRenew(id: number) {
|
||||
const res = await request.get<ApiResult<OaAppRenew>>(
|
||||
MODULES_API_URL + '/oa/oa-app-renew/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
41
api/oa/oaAppRenew/model/index.ts
Normal file
41
api/oa/oaAppRenew/model/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 续费管理
|
||||
*/
|
||||
export interface OaAppRenew {
|
||||
// 自增ID
|
||||
appRenewId?: number;
|
||||
// 应用ID
|
||||
appId?: number;
|
||||
// 续费金额
|
||||
money?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 开始时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 付款凭证
|
||||
images?: string;
|
||||
// 用户姓名
|
||||
nickname?: string;
|
||||
// 状态, 0正常, 1待确认
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 续费管理搜索条件
|
||||
*/
|
||||
export interface OaAppRenewParam extends PageParam {
|
||||
appRenewId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAppUrl/index.ts
Normal file
106
api/oa/oaAppUrl/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAppUrl, OaAppUrlParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询项目域名
|
||||
*/
|
||||
export async function pageOaAppUrl(params: OaAppUrlParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAppUrl>>>(
|
||||
MODULES_API_URL + '/oa/oa-app-url/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目域名列表
|
||||
*/
|
||||
export async function listOaAppUrl(params?: OaAppUrlParam) {
|
||||
const res = await request.get<ApiResult<OaAppUrl[]>>(
|
||||
MODULES_API_URL + '/oa/oa-app-url',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加项目域名
|
||||
*/
|
||||
export async function addOaAppUrl(data: OaAppUrl) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-url',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目域名
|
||||
*/
|
||||
export async function updateOaAppUrl(data: OaAppUrl) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-url',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目域名
|
||||
*/
|
||||
export async function removeOaAppUrl(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-url/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目域名
|
||||
*/
|
||||
export async function removeBatchOaAppUrl(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-url/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询项目域名
|
||||
*/
|
||||
export async function getOaAppUrl(id: number) {
|
||||
const res = await request.get<ApiResult<OaAppUrl>>(
|
||||
MODULES_API_URL + '/oa/oa-app-url/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
37
api/oa/oaAppUrl/model/index.ts
Normal file
37
api/oa/oaAppUrl/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 项目域名
|
||||
*/
|
||||
export interface OaAppUrl {
|
||||
// 自增ID
|
||||
appUrlId?: number;
|
||||
// 应用ID
|
||||
appId?: number;
|
||||
// 域名类型
|
||||
name?: string;
|
||||
// 域名
|
||||
domain?: string;
|
||||
// 账号
|
||||
account?: string;
|
||||
// 密码
|
||||
password?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1待确认
|
||||
status?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目域名搜索条件
|
||||
*/
|
||||
export interface OaAppUrlParam extends PageParam {
|
||||
appUrlId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAppUser/index.ts
Normal file
106
api/oa/oaAppUser/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAppUser, OaAppUserParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询应用成员
|
||||
*/
|
||||
export async function pageOaAppUser(params: OaAppUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAppUser>>>(
|
||||
MODULES_API_URL + '/oa/oa-app-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应用成员列表
|
||||
*/
|
||||
export async function listOaAppUser(params?: OaAppUserParam) {
|
||||
const res = await request.get<ApiResult<OaAppUser[]>>(
|
||||
MODULES_API_URL + '/oa/oa-app-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加应用成员
|
||||
*/
|
||||
export async function addOaAppUser(data: OaAppUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应用成员
|
||||
*/
|
||||
export async function updateOaAppUser(data: OaAppUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应用成员
|
||||
*/
|
||||
export async function removeOaAppUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除应用成员
|
||||
*/
|
||||
export async function removeBatchOaAppUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-app-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询应用成员
|
||||
*/
|
||||
export async function getOaAppUser(id: number) {
|
||||
const res = await request.get<ApiResult<OaAppUser>>(
|
||||
MODULES_API_URL + '/oa/oa-app-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
api/oa/oaAppUser/model/index.ts
Normal file
31
api/oa/oaAppUser/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 应用成员
|
||||
*/
|
||||
export interface OaAppUser {
|
||||
// 自增ID
|
||||
appUserId?: number;
|
||||
// 角色,10体验成员 20开发者成员 30管理员
|
||||
role?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 应用ID
|
||||
appId?: number;
|
||||
// 昵称
|
||||
nickname?: string;
|
||||
// 状态, 0正常, 1待确认
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用成员搜索条件
|
||||
*/
|
||||
export interface OaAppUserParam extends PageParam {
|
||||
appUserId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAssets/index.ts
Normal file
106
api/oa/oaAssets/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAssets, OaAssetsParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询服务器资产记录表
|
||||
*/
|
||||
export async function pageOaAssets(params: OaAssetsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAssets>>>(
|
||||
MODULES_API_URL + '/oa/oa-assets/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务器资产记录表列表
|
||||
*/
|
||||
export async function listOaAssets(params?: OaAssetsParam) {
|
||||
const res = await request.get<ApiResult<OaAssets[]>>(
|
||||
MODULES_API_URL + '/oa/oa-assets',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加服务器资产记录表
|
||||
*/
|
||||
export async function addOaAssets(data: OaAssets) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务器资产记录表
|
||||
*/
|
||||
export async function updateOaAssets(data: OaAssets) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务器资产记录表
|
||||
*/
|
||||
export async function removeOaAssets(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除服务器资产记录表
|
||||
*/
|
||||
export async function removeBatchOaAssets(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询服务器资产记录表
|
||||
*/
|
||||
export async function getOaAssets(id: number) {
|
||||
const res = await request.get<ApiResult<OaAssets>>(
|
||||
MODULES_API_URL + '/oa/oa-assets/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
91
api/oa/oaAssets/model/index.ts
Normal file
91
api/oa/oaAssets/model/index.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 服务器资产记录表
|
||||
*/
|
||||
export interface OaAssets {
|
||||
// 资产ID
|
||||
assetsId?: number;
|
||||
// 资产名称
|
||||
name?: string;
|
||||
// 资产标识
|
||||
code?: string;
|
||||
// 资产类型
|
||||
type?: string;
|
||||
// 服务器厂商
|
||||
brand?: string;
|
||||
// 服务器配置
|
||||
configuration?: string;
|
||||
// 初始账号
|
||||
account?: string;
|
||||
// 初始密码
|
||||
password?: string;
|
||||
// (阿里云/腾讯云)登录账号
|
||||
brandAccount?: string;
|
||||
// (阿里云/腾讯云)登录密码
|
||||
brandPassword?: string;
|
||||
// 宝塔面板
|
||||
panel?: string;
|
||||
// 宝塔面板账号
|
||||
panelAccount?: string;
|
||||
// 宝塔面板密码
|
||||
panelPassword?: string;
|
||||
// 财务信息-合同金额
|
||||
financeAmount?: string;
|
||||
// 购买年限
|
||||
financeYears?: number;
|
||||
// 续费金额
|
||||
financeRenew?: string;
|
||||
// 客户名称
|
||||
financeCustomerName?: string;
|
||||
// 客户联系人
|
||||
financeCustomerContact?: string;
|
||||
// 客户联系电话
|
||||
financeCustomerPhone?: string;
|
||||
// 客户ID
|
||||
customerId?: number;
|
||||
// 客户名称
|
||||
customerName?: string;
|
||||
// 开放端口
|
||||
openPort?: string;
|
||||
// 详情内容
|
||||
content?: string;
|
||||
// 购买时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 置顶状态
|
||||
isTop?: string;
|
||||
// 可见性(public,private,protected)
|
||||
visibility?: string;
|
||||
// 宝塔接口秘钥
|
||||
btSign?: string;
|
||||
// 文章排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 描述
|
||||
comments?: string;
|
||||
// 客户ID
|
||||
companyId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 机构id
|
||||
organizationId?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务器资产记录表搜索条件
|
||||
*/
|
||||
export interface OaAssetsParam extends PageParam {
|
||||
assetsId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAssetsCode/index.ts
Normal file
106
api/oa/oaAssetsCode/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAssetsCode, OaAssetsCodeParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询代码仓库
|
||||
*/
|
||||
export async function pageOaAssetsCode(params: OaAssetsCodeParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAssetsCode>>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-code/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询代码仓库列表
|
||||
*/
|
||||
export async function listOaAssetsCode(params?: OaAssetsCodeParam) {
|
||||
const res = await request.get<ApiResult<OaAssetsCode[]>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-code',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加代码仓库
|
||||
*/
|
||||
export async function addOaAssetsCode(data: OaAssetsCode) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-code',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改代码仓库
|
||||
*/
|
||||
export async function updateOaAssetsCode(data: OaAssetsCode) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-code',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除代码仓库
|
||||
*/
|
||||
export async function removeOaAssetsCode(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-code/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除代码仓库
|
||||
*/
|
||||
export async function removeBatchOaAssetsCode(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-code/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询代码仓库
|
||||
*/
|
||||
export async function getOaAssetsCode(id: number) {
|
||||
const res = await request.get<ApiResult<OaAssetsCode>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-code/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
51
api/oa/oaAssetsCode/model/index.ts
Normal file
51
api/oa/oaAssetsCode/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 代码仓库
|
||||
*/
|
||||
export interface OaAssetsCode {
|
||||
// ID
|
||||
id?: number;
|
||||
// 名称
|
||||
name?: string;
|
||||
// 英文标识
|
||||
code?: string;
|
||||
// 仓库地址
|
||||
gitUrl?: string;
|
||||
// 仓库品牌
|
||||
brand?: string;
|
||||
// 价格
|
||||
price?: number;
|
||||
// 详情内容
|
||||
content?: string;
|
||||
// 购买时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 置顶状态
|
||||
isTop?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 描述
|
||||
comments?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代码仓库搜索条件
|
||||
*/
|
||||
export interface OaAssetsCodeParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAssetsDomain/index.ts
Normal file
106
api/oa/oaAssetsDomain/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAssetsDomain, OaAssetsDomainParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询域名管理记录表
|
||||
*/
|
||||
export async function pageOaAssetsDomain(params: OaAssetsDomainParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAssetsDomain>>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-domain/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询域名管理记录表列表
|
||||
*/
|
||||
export async function listOaAssetsDomain(params?: OaAssetsDomainParam) {
|
||||
const res = await request.get<ApiResult<OaAssetsDomain[]>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-domain',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加域名管理记录表
|
||||
*/
|
||||
export async function addOaAssetsDomain(data: OaAssetsDomain) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-domain',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改域名管理记录表
|
||||
*/
|
||||
export async function updateOaAssetsDomain(data: OaAssetsDomain) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-domain',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除域名管理记录表
|
||||
*/
|
||||
export async function removeOaAssetsDomain(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-domain/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除域名管理记录表
|
||||
*/
|
||||
export async function removeBatchOaAssetsDomain(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-domain/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询域名管理记录表
|
||||
*/
|
||||
export async function getOaAssetsDomain(id: number) {
|
||||
const res = await request.get<ApiResult<OaAssetsDomain>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-domain/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
api/oa/oaAssetsDomain/model/index.ts
Normal file
55
api/oa/oaAssetsDomain/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 域名管理记录表
|
||||
*/
|
||||
export interface OaAssetsDomain {
|
||||
// ID
|
||||
domainId?: number;
|
||||
// 域名
|
||||
name?: string;
|
||||
// 域名标识
|
||||
code?: string;
|
||||
// 注册厂商
|
||||
brand?: string;
|
||||
// 初始账号
|
||||
account?: string;
|
||||
// 初始密码
|
||||
password?: string;
|
||||
// 价格
|
||||
price?: number;
|
||||
// 详情内容
|
||||
content?: string;
|
||||
// ssl证书
|
||||
ssl?: string;
|
||||
// 购买时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 置顶状态
|
||||
isTop?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 描述
|
||||
comments?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 域名管理记录表搜索条件
|
||||
*/
|
||||
export interface OaAssetsDomainParam extends PageParam {
|
||||
domainId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAssetsEmail/index.ts
Normal file
106
api/oa/oaAssetsEmail/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAssetsEmail, OaAssetsEmailParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询企业邮箱记录表
|
||||
*/
|
||||
export async function pageOaAssetsEmail(params: OaAssetsEmailParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAssetsEmail>>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-email/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询企业邮箱记录表列表
|
||||
*/
|
||||
export async function listOaAssetsEmail(params?: OaAssetsEmailParam) {
|
||||
const res = await request.get<ApiResult<OaAssetsEmail[]>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-email',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加企业邮箱记录表
|
||||
*/
|
||||
export async function addOaAssetsEmail(data: OaAssetsEmail) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-email',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业邮箱记录表
|
||||
*/
|
||||
export async function updateOaAssetsEmail(data: OaAssetsEmail) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-email',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业邮箱记录表
|
||||
*/
|
||||
export async function removeOaAssetsEmail(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-email/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除企业邮箱记录表
|
||||
*/
|
||||
export async function removeBatchOaAssetsEmail(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-email/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询企业邮箱记录表
|
||||
*/
|
||||
export async function getOaAssetsEmail(id: number) {
|
||||
const res = await request.get<ApiResult<OaAssetsEmail>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-email/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
api/oa/oaAssetsEmail/model/index.ts
Normal file
55
api/oa/oaAssetsEmail/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 企业邮箱记录表
|
||||
*/
|
||||
export interface OaAssetsEmail {
|
||||
// ID
|
||||
emailId?: number;
|
||||
// 域名
|
||||
name?: string;
|
||||
// 域名标识
|
||||
code?: string;
|
||||
// 主机型号
|
||||
type?: string;
|
||||
// 品牌厂商
|
||||
brand?: string;
|
||||
// 初始账号
|
||||
system?: string;
|
||||
// 价格
|
||||
price?: number;
|
||||
// 详情内容
|
||||
content?: string;
|
||||
// ssl证书
|
||||
ssl?: string;
|
||||
// 购买时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 置顶状态
|
||||
isTop?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 描述
|
||||
comments?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业邮箱记录表搜索条件
|
||||
*/
|
||||
export interface OaAssetsEmailParam extends PageParam {
|
||||
emailId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAssetsServer/index.ts
Normal file
106
api/oa/oaAssetsServer/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAssetsServer, OaAssetsServerParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询服务器资产记录表
|
||||
*/
|
||||
export async function pageOaAssetsServer(params: OaAssetsServerParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAssetsServer>>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-server/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务器资产记录表列表
|
||||
*/
|
||||
export async function listOaAssetsServer(params?: OaAssetsServerParam) {
|
||||
const res = await request.get<ApiResult<OaAssetsServer[]>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-server',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加服务器资产记录表
|
||||
*/
|
||||
export async function addOaAssetsServer(data: OaAssetsServer) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-server',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务器资产记录表
|
||||
*/
|
||||
export async function updateOaAssetsServer(data: OaAssetsServer) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-server',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务器资产记录表
|
||||
*/
|
||||
export async function removeOaAssetsServer(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-server/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除服务器资产记录表
|
||||
*/
|
||||
export async function removeBatchOaAssetsServer(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-server/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询服务器资产记录表
|
||||
*/
|
||||
export async function getOaAssetsServer(id: number) {
|
||||
const res = await request.get<ApiResult<OaAssetsServer>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-server/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
91
api/oa/oaAssetsServer/model/index.ts
Normal file
91
api/oa/oaAssetsServer/model/index.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 服务器资产记录表
|
||||
*/
|
||||
export interface OaAssetsServer {
|
||||
// 资产ID
|
||||
serverId?: number;
|
||||
// 资产名称
|
||||
name?: string;
|
||||
// 资产标识
|
||||
code?: string;
|
||||
// 资产类型
|
||||
type?: string;
|
||||
// 服务器厂商
|
||||
brand?: string;
|
||||
// 服务器配置
|
||||
configuration?: string;
|
||||
// 初始账号
|
||||
account?: string;
|
||||
// 初始密码
|
||||
password?: string;
|
||||
// (阿里云/腾讯云)登录账号
|
||||
brandAccount?: string;
|
||||
// (阿里云/腾讯云)登录密码
|
||||
brandPassword?: string;
|
||||
// 宝塔面板
|
||||
panel?: string;
|
||||
// 宝塔面板账号
|
||||
panelAccount?: string;
|
||||
// 宝塔面板密码
|
||||
panelPassword?: string;
|
||||
// 财务信息-合同金额
|
||||
financeAmount?: string;
|
||||
// 购买年限
|
||||
financeYears?: number;
|
||||
// 续费金额
|
||||
financeRenew?: string;
|
||||
// 客户名称
|
||||
financeCustomerName?: string;
|
||||
// 客户联系人
|
||||
financeCustomerContact?: string;
|
||||
// 客户联系电话
|
||||
financeCustomerPhone?: string;
|
||||
// 客户ID
|
||||
customerId?: number;
|
||||
// 客户名称
|
||||
customerName?: string;
|
||||
// 开放端口
|
||||
openPort?: string;
|
||||
// 详情内容
|
||||
content?: string;
|
||||
// 购买时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 置顶状态
|
||||
isTop?: string;
|
||||
// 可见性(public,private,protected)
|
||||
visibility?: string;
|
||||
// 宝塔接口秘钥
|
||||
btSign?: string;
|
||||
// 文章排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 描述
|
||||
comments?: string;
|
||||
// 客户ID
|
||||
companyId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 机构id
|
||||
organizationId?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务器资产记录表搜索条件
|
||||
*/
|
||||
export interface OaAssetsServerParam extends PageParam {
|
||||
serverId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAssetsSite/index.ts
Normal file
106
api/oa/oaAssetsSite/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAssetsSite, OaAssetsSiteParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询网站管理记录表
|
||||
*/
|
||||
export async function pageOaAssetsSite(params: OaAssetsSiteParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAssetsSite>>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-site/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网站管理记录表列表
|
||||
*/
|
||||
export async function listOaAssetsSite(params?: OaAssetsSiteParam) {
|
||||
const res = await request.get<ApiResult<OaAssetsSite[]>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-site',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加网站管理记录表
|
||||
*/
|
||||
export async function addOaAssetsSite(data: OaAssetsSite) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-site',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站管理记录表
|
||||
*/
|
||||
export async function updateOaAssetsSite(data: OaAssetsSite) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-site',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网站管理记录表
|
||||
*/
|
||||
export async function removeOaAssetsSite(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-site/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网站管理记录表
|
||||
*/
|
||||
export async function removeBatchOaAssetsSite(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-site/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询网站管理记录表
|
||||
*/
|
||||
export async function getOaAssetsSite(id: number) {
|
||||
const res = await request.get<ApiResult<OaAssetsSite>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-site/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
api/oa/oaAssetsSite/model/index.ts
Normal file
55
api/oa/oaAssetsSite/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 网站管理记录表
|
||||
*/
|
||||
export interface OaAssetsSite {
|
||||
// ID
|
||||
siteId?: number;
|
||||
// 网站名称
|
||||
name?: string;
|
||||
// 域名标识
|
||||
code?: string;
|
||||
// 主机型号
|
||||
type?: string;
|
||||
// 品牌厂商
|
||||
brand?: string;
|
||||
// 初始账号
|
||||
system?: string;
|
||||
// 价格
|
||||
price?: number;
|
||||
// 详情内容
|
||||
content?: string;
|
||||
// ssl证书
|
||||
ssl?: string;
|
||||
// 购买时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 置顶状态
|
||||
isTop?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 描述
|
||||
comments?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网站管理记录表搜索条件
|
||||
*/
|
||||
export interface OaAssetsSiteParam extends PageParam {
|
||||
siteId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAssetsUser/index.ts
Normal file
106
api/oa/oaAssetsUser/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAssetsUser, OaAssetsUserParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询服务器成员管理
|
||||
*/
|
||||
export async function pageOaAssetsUser(params: OaAssetsUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAssetsUser>>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务器成员管理列表
|
||||
*/
|
||||
export async function listOaAssetsUser(params?: OaAssetsUserParam) {
|
||||
const res = await request.get<ApiResult<OaAssetsUser[]>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加服务器成员管理
|
||||
*/
|
||||
export async function addOaAssetsUser(data: OaAssetsUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务器成员管理
|
||||
*/
|
||||
export async function updateOaAssetsUser(data: OaAssetsUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务器成员管理
|
||||
*/
|
||||
export async function removeOaAssetsUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除服务器成员管理
|
||||
*/
|
||||
export async function removeBatchOaAssetsUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询服务器成员管理
|
||||
*/
|
||||
export async function getOaAssetsUser(id: number) {
|
||||
const res = await request.get<ApiResult<OaAssetsUser>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
api/oa/oaAssetsUser/model/index.ts
Normal file
31
api/oa/oaAssetsUser/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 服务器成员管理
|
||||
*/
|
||||
export interface OaAssetsUser {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 角色,10体验成员 20开发者成员 30管理员
|
||||
role?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 应用ID
|
||||
assetsId?: number;
|
||||
// 昵称
|
||||
nickname?: string;
|
||||
// 状态, 0正常, 1待确认
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务器成员管理搜索条件
|
||||
*/
|
||||
export interface OaAssetsUserParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaAssetsVhost/index.ts
Normal file
106
api/oa/oaAssetsVhost/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaAssetsVhost, OaAssetsVhostParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询虚拟主机记录表
|
||||
*/
|
||||
export async function pageOaAssetsVhost(params: OaAssetsVhostParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaAssetsVhost>>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-vhost/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询虚拟主机记录表列表
|
||||
*/
|
||||
export async function listOaAssetsVhost(params?: OaAssetsVhostParam) {
|
||||
const res = await request.get<ApiResult<OaAssetsVhost[]>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-vhost',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加虚拟主机记录表
|
||||
*/
|
||||
export async function addOaAssetsVhost(data: OaAssetsVhost) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-vhost',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改虚拟主机记录表
|
||||
*/
|
||||
export async function updateOaAssetsVhost(data: OaAssetsVhost) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-vhost',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除虚拟主机记录表
|
||||
*/
|
||||
export async function removeOaAssetsVhost(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-vhost/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除虚拟主机记录表
|
||||
*/
|
||||
export async function removeBatchOaAssetsVhost(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-vhost/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询虚拟主机记录表
|
||||
*/
|
||||
export async function getOaAssetsVhost(id: number) {
|
||||
const res = await request.get<ApiResult<OaAssetsVhost>>(
|
||||
MODULES_API_URL + '/oa/oa-assets-vhost/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
api/oa/oaAssetsVhost/model/index.ts
Normal file
55
api/oa/oaAssetsVhost/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 虚拟主机记录表
|
||||
*/
|
||||
export interface OaAssetsVhost {
|
||||
// ID
|
||||
vhostId?: number;
|
||||
// 域名
|
||||
name?: string;
|
||||
// 域名标识
|
||||
code?: string;
|
||||
// 主机型号
|
||||
type?: string;
|
||||
// 品牌厂商
|
||||
brand?: string;
|
||||
// 初始账号
|
||||
system?: string;
|
||||
// 价格
|
||||
price?: number;
|
||||
// 详情内容
|
||||
content?: string;
|
||||
// ssl证书
|
||||
ssl?: string;
|
||||
// 购买时间
|
||||
startTime?: string;
|
||||
// 到期时间
|
||||
endTime?: string;
|
||||
// 置顶状态
|
||||
isTop?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 描述
|
||||
comments?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 虚拟主机记录表搜索条件
|
||||
*/
|
||||
export interface OaAssetsVhostParam extends PageParam {
|
||||
vhostId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaCompany/index.ts
Normal file
106
api/oa/oaCompany/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaCompany, OaCompanyParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询企业信息
|
||||
*/
|
||||
export async function pageOaCompany(params: OaCompanyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaCompany>>>(
|
||||
MODULES_API_URL + '/oa/oa-company/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询企业信息列表
|
||||
*/
|
||||
export async function listOaCompany(params?: OaCompanyParam) {
|
||||
const res = await request.get<ApiResult<OaCompany[]>>(
|
||||
MODULES_API_URL + '/oa/oa-company',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加企业信息
|
||||
*/
|
||||
export async function addOaCompany(data: OaCompany) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业信息
|
||||
*/
|
||||
export async function updateOaCompany(data: OaCompany) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业信息
|
||||
*/
|
||||
export async function removeOaCompany(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除企业信息
|
||||
*/
|
||||
export async function removeBatchOaCompany(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询企业信息
|
||||
*/
|
||||
export async function getOaCompany(id: number) {
|
||||
const res = await request.get<ApiResult<OaCompany>>(
|
||||
MODULES_API_URL + '/oa/oa-company/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
117
api/oa/oaCompany/model/index.ts
Normal file
117
api/oa/oaCompany/model/index.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 企业信息
|
||||
*/
|
||||
export interface OaCompany {
|
||||
// 企业id
|
||||
companyId?: number;
|
||||
// 企业简称
|
||||
shortName?: string;
|
||||
// 企业全称
|
||||
companyName?: string;
|
||||
// 企业标识
|
||||
companyCode?: string;
|
||||
// 类型 10企业 20政府单位
|
||||
companyType?: string;
|
||||
// 企业类型多选
|
||||
companyTypeMultiple?: string;
|
||||
// 应用标识
|
||||
companyLogo?: string;
|
||||
// 应用类型
|
||||
appType?: string;
|
||||
// 绑定域名
|
||||
domain?: string;
|
||||
// 联系电话
|
||||
phone?: string;
|
||||
// 座机电话
|
||||
tel?: string;
|
||||
// 邮箱
|
||||
email?: string;
|
||||
// 发票抬头
|
||||
invoiceHeader?: string;
|
||||
// 企业法人
|
||||
businessEntity?: string;
|
||||
// 服务开始时间
|
||||
startTime?: string;
|
||||
// 服务到期时间
|
||||
expirationTime?: string;
|
||||
// 应用版本 10体验版 20授权版 30旗舰版
|
||||
version?: number;
|
||||
// 成员数量(人数上限)
|
||||
members?: number;
|
||||
// 成员数量(当前)
|
||||
users?: number;
|
||||
// 行业类型(父级)
|
||||
industryParent?: string;
|
||||
// 行业类型(子级)
|
||||
industryChild?: string;
|
||||
// 部门数量
|
||||
departments?: number;
|
||||
// 存储空间
|
||||
storage?: string;
|
||||
// 存储空间(上限)
|
||||
storageMax?: string;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 街道地址
|
||||
address?: string;
|
||||
// 经度
|
||||
longitude?: string;
|
||||
// 纬度
|
||||
latitude?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否实名认证
|
||||
authentication?: number;
|
||||
// 企业默认主体
|
||||
authoritative?: number;
|
||||
// request合法域名
|
||||
requestUrl?: string;
|
||||
// socket合法域名
|
||||
socketUrl?: string;
|
||||
// 主控端域名
|
||||
serverUrl?: string;
|
||||
// 业务域名
|
||||
modulesUrl?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 点赞数量
|
||||
likes?: number;
|
||||
// 点击数量
|
||||
clicks?: number;
|
||||
// 购买数量
|
||||
buys?: number;
|
||||
// 是否含税, 0不含, 1含
|
||||
isTax?: number;
|
||||
// 当前克隆的租户ID
|
||||
planId?: number;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业信息搜索条件
|
||||
*/
|
||||
export interface OaCompanyParam extends PageParam {
|
||||
companyId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaCompanyField/index.ts
Normal file
106
api/oa/oaCompanyField/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaCompanyField, OaCompanyFieldParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询企业参数
|
||||
*/
|
||||
export async function pageOaCompanyField(params: OaCompanyFieldParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaCompanyField>>>(
|
||||
MODULES_API_URL + '/oa/oa-company-field/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询企业参数列表
|
||||
*/
|
||||
export async function listOaCompanyField(params?: OaCompanyFieldParam) {
|
||||
const res = await request.get<ApiResult<OaCompanyField[]>>(
|
||||
MODULES_API_URL + '/oa/oa-company-field',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加企业参数
|
||||
*/
|
||||
export async function addOaCompanyField(data: OaCompanyField) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业参数
|
||||
*/
|
||||
export async function updateOaCompanyField(data: OaCompanyField) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业参数
|
||||
*/
|
||||
export async function removeOaCompanyField(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company-field/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除企业参数
|
||||
*/
|
||||
export async function removeBatchOaCompanyField(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company-field/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询企业参数
|
||||
*/
|
||||
export async function getOaCompanyField(id: number) {
|
||||
const res = await request.get<ApiResult<OaCompanyField>>(
|
||||
MODULES_API_URL + '/oa/oa-company-field/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
33
api/oa/oaCompanyField/model/index.ts
Normal file
33
api/oa/oaCompanyField/model/index.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 企业参数
|
||||
*/
|
||||
export interface OaCompanyField {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 名称
|
||||
name?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 状态, 0正常, 1删除
|
||||
status?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业参数搜索条件
|
||||
*/
|
||||
export interface OaCompanyFieldParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaCompanyUser/index.ts
Normal file
106
api/oa/oaCompanyUser/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaCompanyUser, OaCompanyUserParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询成员管理
|
||||
*/
|
||||
export async function pageOaCompanyUser(params: OaCompanyUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaCompanyUser>>>(
|
||||
MODULES_API_URL + '/oa/oa-company-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成员管理列表
|
||||
*/
|
||||
export async function listOaCompanyUser(params?: OaCompanyUserParam) {
|
||||
const res = await request.get<ApiResult<OaCompanyUser[]>>(
|
||||
MODULES_API_URL + '/oa/oa-company-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加成员管理
|
||||
*/
|
||||
export async function addOaCompanyUser(data: OaCompanyUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成员管理
|
||||
*/
|
||||
export async function updateOaCompanyUser(data: OaCompanyUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成员管理
|
||||
*/
|
||||
export async function removeOaCompanyUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成员管理
|
||||
*/
|
||||
export async function removeBatchOaCompanyUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-company-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询成员管理
|
||||
*/
|
||||
export async function getOaCompanyUser(id: number) {
|
||||
const res = await request.get<ApiResult<OaCompanyUser>>(
|
||||
MODULES_API_URL + '/oa/oa-company-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
api/oa/oaCompanyUser/model/index.ts
Normal file
31
api/oa/oaCompanyUser/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 成员管理
|
||||
*/
|
||||
export interface OaCompanyUser {
|
||||
// 自增ID
|
||||
companyUserId?: number;
|
||||
// 角色,10体验成员 20开发者成员 30管理员
|
||||
role?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 昵称
|
||||
nickname?: string;
|
||||
// 状态, 0正常, 1待确认
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成员管理搜索条件
|
||||
*/
|
||||
export interface OaCompanyUserParam extends PageParam {
|
||||
companyUserId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaLink/index.ts
Normal file
106
api/oa/oaLink/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaLink, OaLinkParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询常用链接
|
||||
*/
|
||||
export async function pageOaLink(params: OaLinkParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaLink>>>(
|
||||
MODULES_API_URL + '/oa/oa-link/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询常用链接列表
|
||||
*/
|
||||
export async function listOaLink(params?: OaLinkParam) {
|
||||
const res = await request.get<ApiResult<OaLink[]>>(
|
||||
MODULES_API_URL + '/oa/oa-link',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加常用链接
|
||||
*/
|
||||
export async function addOaLink(data: OaLink) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改常用链接
|
||||
*/
|
||||
export async function updateOaLink(data: OaLink) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除常用链接
|
||||
*/
|
||||
export async function removeOaLink(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-link/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除常用链接
|
||||
*/
|
||||
export async function removeBatchOaLink(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-link/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询常用链接
|
||||
*/
|
||||
export async function getOaLink(id: number) {
|
||||
const res = await request.get<ApiResult<OaLink>>(
|
||||
MODULES_API_URL + '/oa/oa-link/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
45
api/oa/oaLink/model/index.ts
Normal file
45
api/oa/oaLink/model/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 常用链接
|
||||
*/
|
||||
export interface OaLink {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 链接名称
|
||||
name?: string;
|
||||
// 图标
|
||||
icon?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 链接分类
|
||||
linkType?: string;
|
||||
// 应用ID
|
||||
appId?: number;
|
||||
// 所属栏目
|
||||
categoryId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 状态, 0正常, 1待确认
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 常用链接搜索条件
|
||||
*/
|
||||
export interface OaLinkParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaProduct/index.ts
Normal file
106
api/oa/oaProduct/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaProduct, OaProductParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询产品记录表
|
||||
*/
|
||||
export async function pageOaProduct(params: OaProductParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaProduct>>>(
|
||||
MODULES_API_URL + '/oa/oa-product/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品记录表列表
|
||||
*/
|
||||
export async function listOaProduct(params?: OaProductParam) {
|
||||
const res = await request.get<ApiResult<OaProduct[]>>(
|
||||
MODULES_API_URL + '/oa/oa-product',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加产品记录表
|
||||
*/
|
||||
export async function addOaProduct(data: OaProduct) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-product',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品记录表
|
||||
*/
|
||||
export async function updateOaProduct(data: OaProduct) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-product',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品记录表
|
||||
*/
|
||||
export async function removeOaProduct(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-product/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产品记录表
|
||||
*/
|
||||
export async function removeBatchOaProduct(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-product/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询产品记录表
|
||||
*/
|
||||
export async function getOaProduct(id: number) {
|
||||
const res = await request.get<ApiResult<OaProduct>>(
|
||||
MODULES_API_URL + '/oa/oa-product/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
65
api/oa/oaProduct/model/index.ts
Normal file
65
api/oa/oaProduct/model/index.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 产品记录表
|
||||
*/
|
||||
export interface OaProduct {
|
||||
// 产品ID
|
||||
productId?: number;
|
||||
// 产品名称
|
||||
name?: string;
|
||||
// 产品标识
|
||||
code?: string;
|
||||
// 产品详情
|
||||
content?: string;
|
||||
// 产品类型
|
||||
type?: string;
|
||||
// 产品图标
|
||||
logo?: string;
|
||||
// 产品金额
|
||||
money?: string;
|
||||
// 初始销量
|
||||
salesInitial?: number;
|
||||
// 实际销量
|
||||
salesActual?: number;
|
||||
// 库存总量(包含所有sku)
|
||||
stockTotal?: number;
|
||||
// 背景颜色
|
||||
backgroundColor?: string;
|
||||
// 背景图片
|
||||
backgroundImage?: string;
|
||||
// 背景图片(gif)
|
||||
backgroundGif?: string;
|
||||
// 购买链接
|
||||
buyUrl?: string;
|
||||
// 控制台链接
|
||||
adminUrl?: string;
|
||||
// 附件
|
||||
files?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0已上架, 1已下架
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品记录表搜索条件
|
||||
*/
|
||||
export interface OaProductParam extends PageParam {
|
||||
productId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaProductTabs/index.ts
Normal file
106
api/oa/oaProductTabs/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaProductTabs, OaProductTabsParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询产品标签记录表
|
||||
*/
|
||||
export async function pageOaProductTabs(params: OaProductTabsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaProductTabs>>>(
|
||||
MODULES_API_URL + '/oa/oa-product-tabs/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品标签记录表列表
|
||||
*/
|
||||
export async function listOaProductTabs(params?: OaProductTabsParam) {
|
||||
const res = await request.get<ApiResult<OaProductTabs[]>>(
|
||||
MODULES_API_URL + '/oa/oa-product-tabs',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加产品标签记录表
|
||||
*/
|
||||
export async function addOaProductTabs(data: OaProductTabs) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-product-tabs',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品标签记录表
|
||||
*/
|
||||
export async function updateOaProductTabs(data: OaProductTabs) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-product-tabs',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品标签记录表
|
||||
*/
|
||||
export async function removeOaProductTabs(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-product-tabs/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产品标签记录表
|
||||
*/
|
||||
export async function removeBatchOaProductTabs(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-product-tabs/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询产品标签记录表
|
||||
*/
|
||||
export async function getOaProductTabs(id: number) {
|
||||
const res = await request.get<ApiResult<OaProductTabs>>(
|
||||
MODULES_API_URL + '/oa/oa-product-tabs/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
49
api/oa/oaProductTabs/model/index.ts
Normal file
49
api/oa/oaProductTabs/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 产品标签记录表
|
||||
*/
|
||||
export interface OaProductTabs {
|
||||
// 产品标签ID
|
||||
tabId?: number;
|
||||
// 产品ID
|
||||
productId?: number;
|
||||
// 标签名称
|
||||
name?: string;
|
||||
// 标签类型
|
||||
type?: string;
|
||||
// 产品标签详情
|
||||
content?: string;
|
||||
// 背景颜色
|
||||
backgroundColor?: string;
|
||||
// 背景图片
|
||||
backgroundImage?: string;
|
||||
// 附件
|
||||
files?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0已上架, 1已下架
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品标签记录表搜索条件
|
||||
*/
|
||||
export interface OaProductTabsParam extends PageParam {
|
||||
tabId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaTask/index.ts
Normal file
106
api/oa/oaTask/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaTask, OaTaskParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询任务记录表
|
||||
*/
|
||||
export async function pageOaTask(params: OaTaskParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaTask>>>(
|
||||
MODULES_API_URL + '/oa/oa-task/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务记录表列表
|
||||
*/
|
||||
export async function listOaTask(params?: OaTaskParam) {
|
||||
const res = await request.get<ApiResult<OaTask[]>>(
|
||||
MODULES_API_URL + '/oa/oa-task',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加任务记录表
|
||||
*/
|
||||
export async function addOaTask(data: OaTask) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务记录表
|
||||
*/
|
||||
export async function updateOaTask(data: OaTask) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务记录表
|
||||
*/
|
||||
export async function removeOaTask(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除任务记录表
|
||||
*/
|
||||
export async function removeBatchOaTask(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询任务记录表
|
||||
*/
|
||||
export async function getOaTask(id: number) {
|
||||
const res = await request.get<ApiResult<OaTask>>(
|
||||
MODULES_API_URL + '/oa/oa-task/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
85
api/oa/oaTask/model/index.ts
Normal file
85
api/oa/oaTask/model/index.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 任务记录表
|
||||
*/
|
||||
export interface OaTask {
|
||||
// 工单ID
|
||||
taskId?: number;
|
||||
// 工单类型
|
||||
taskType?: string;
|
||||
// 任务内容
|
||||
name?: string;
|
||||
// 问题描述
|
||||
content?: string;
|
||||
// 工单附件
|
||||
files?: string;
|
||||
// 工单发起人
|
||||
promoter?: number;
|
||||
// 受理人
|
||||
commander?: number;
|
||||
// 工单状态, 0未开始 1已指派
|
||||
progress?: number;
|
||||
// 优先级
|
||||
priority?: string;
|
||||
// 品质要求
|
||||
quality?: string;
|
||||
// 时限(天)
|
||||
day?: number;
|
||||
// 手机号
|
||||
phone?: string;
|
||||
// 开始时间
|
||||
startTime?: string;
|
||||
// 结束时间
|
||||
endTime?: string;
|
||||
// 逾期天数
|
||||
overdueDays?: number;
|
||||
// 项目ID
|
||||
appId?: number;
|
||||
// 机构id
|
||||
organizationId?: number;
|
||||
// 项目ID
|
||||
projectId?: number;
|
||||
// 客户ID
|
||||
customerId?: number;
|
||||
// 资产ID
|
||||
assetsId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 是否已查阅
|
||||
isRead?: number;
|
||||
// 最后回复人
|
||||
lastReadUser?: number;
|
||||
// 发起人昵称
|
||||
nickname?: string;
|
||||
// 发起人头像
|
||||
avatar?: string;
|
||||
// 最后回复人头像
|
||||
lastAvatar?: string;
|
||||
// 最后回复人昵称
|
||||
lastNickname?: string;
|
||||
// 订单是否已结算(0未结算 1已结算)
|
||||
isSettled?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0待处理, 1已完成
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务记录表搜索条件
|
||||
*/
|
||||
export interface OaTaskParam extends PageParam {
|
||||
taskId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaTaskCount/index.ts
Normal file
106
api/oa/oaTaskCount/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaTaskCount, OaTaskCountParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询数据统计
|
||||
*/
|
||||
export async function pageOaTaskCount(params: OaTaskCountParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaTaskCount>>>(
|
||||
MODULES_API_URL + '/oa/oa-task-count/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询数据统计列表
|
||||
*/
|
||||
export async function listOaTaskCount(params?: OaTaskCountParam) {
|
||||
const res = await request.get<ApiResult<OaTaskCount[]>>(
|
||||
MODULES_API_URL + '/oa/oa-task-count',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加数据统计
|
||||
*/
|
||||
export async function addOaTaskCount(data: OaTaskCount) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-count',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据统计
|
||||
*/
|
||||
export async function updateOaTaskCount(data: OaTaskCount) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-count',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据统计
|
||||
*/
|
||||
export async function removeOaTaskCount(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-count/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除数据统计
|
||||
*/
|
||||
export async function removeBatchOaTaskCount(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-count/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询数据统计
|
||||
*/
|
||||
export async function getOaTaskCount(id: number) {
|
||||
const res = await request.get<ApiResult<OaTaskCount>>(
|
||||
MODULES_API_URL + '/oa/oa-task-count/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
45
api/oa/oaTaskCount/model/index.ts
Normal file
45
api/oa/oaTaskCount/model/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 数据统计
|
||||
*/
|
||||
export interface OaTaskCount {
|
||||
// 自增ID
|
||||
taskCountId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 待处理数
|
||||
pending?: number;
|
||||
// 闲置的工单(废弃)
|
||||
unused?: number;
|
||||
// 已完成数(废弃)
|
||||
completed?: number;
|
||||
// 今天处理数
|
||||
today?: number;
|
||||
// 本月处理数
|
||||
month?: number;
|
||||
// 今年处理数
|
||||
year?: number;
|
||||
// 总工单数
|
||||
total?: number;
|
||||
// 部门ID
|
||||
organizationId?: number;
|
||||
// 角色ID
|
||||
roleId?: number;
|
||||
// 角色标识
|
||||
roleCode?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 更新时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据统计搜索条件
|
||||
*/
|
||||
export interface OaTaskCountParam extends PageParam {
|
||||
taskCountId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaTaskRecord/index.ts
Normal file
106
api/oa/oaTaskRecord/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaTaskRecord, OaTaskRecordParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询工单回复记录表
|
||||
*/
|
||||
export async function pageOaTaskRecord(params: OaTaskRecordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaTaskRecord>>>(
|
||||
MODULES_API_URL + '/oa/oa-task-record/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工单回复记录表列表
|
||||
*/
|
||||
export async function listOaTaskRecord(params?: OaTaskRecordParam) {
|
||||
const res = await request.get<ApiResult<OaTaskRecord[]>>(
|
||||
MODULES_API_URL + '/oa/oa-task-record',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加工单回复记录表
|
||||
*/
|
||||
export async function addOaTaskRecord(data: OaTaskRecord) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工单回复记录表
|
||||
*/
|
||||
export async function updateOaTaskRecord(data: OaTaskRecord) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单回复记录表
|
||||
*/
|
||||
export async function removeOaTaskRecord(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-record/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工单回复记录表
|
||||
*/
|
||||
export async function removeBatchOaTaskRecord(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-record/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询工单回复记录表
|
||||
*/
|
||||
export async function getOaTaskRecord(id: number) {
|
||||
const res = await request.get<ApiResult<OaTaskRecord>>(
|
||||
MODULES_API_URL + '/oa/oa-task-record/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
45
api/oa/oaTaskRecord/model/index.ts
Normal file
45
api/oa/oaTaskRecord/model/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 工单回复记录表
|
||||
*/
|
||||
export interface OaTaskRecord {
|
||||
// 回复ID
|
||||
taskRecordId?: number;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 工单ID
|
||||
taskId?: number;
|
||||
// 内容
|
||||
content?: string;
|
||||
// 机密信息
|
||||
confidential?: string;
|
||||
// 联系电话
|
||||
phone?: string;
|
||||
// 工单附件
|
||||
files?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0待处理, 1已完成
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工单回复记录表搜索条件
|
||||
*/
|
||||
export interface OaTaskRecordParam extends PageParam {
|
||||
taskRecordId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
api/oa/oaTaskUser/index.ts
Normal file
106
api/oa/oaTaskUser/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { OaTaskUser, OaTaskUserParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询工单成员
|
||||
*/
|
||||
export async function pageOaTaskUser(params: OaTaskUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<OaTaskUser>>>(
|
||||
MODULES_API_URL + '/oa/oa-task-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工单成员列表
|
||||
*/
|
||||
export async function listOaTaskUser(params?: OaTaskUserParam) {
|
||||
const res = await request.get<ApiResult<OaTaskUser[]>>(
|
||||
MODULES_API_URL + '/oa/oa-task-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加工单成员
|
||||
*/
|
||||
export async function addOaTaskUser(data: OaTaskUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工单成员
|
||||
*/
|
||||
export async function updateOaTaskUser(data: OaTaskUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单成员
|
||||
*/
|
||||
export async function removeOaTaskUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工单成员
|
||||
*/
|
||||
export async function removeBatchOaTaskUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/oa-task-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询工单成员
|
||||
*/
|
||||
export async function getOaTaskUser(id: number) {
|
||||
const res = await request.get<ApiResult<OaTaskUser>>(
|
||||
MODULES_API_URL + '/oa/oa-task-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
api/oa/oaTaskUser/model/index.ts
Normal file
31
api/oa/oaTaskUser/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 工单成员
|
||||
*/
|
||||
export interface OaTaskUser {
|
||||
// 自增ID
|
||||
taskUserId?: number;
|
||||
// 角色,10体验成员 20开发者成员 30管理员
|
||||
role?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 工单ID
|
||||
taskId?: number;
|
||||
// 昵称
|
||||
nickname?: string;
|
||||
// 状态, 0待处理, 1已完成
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 加入时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工单成员搜索条件
|
||||
*/
|
||||
export interface OaTaskUserParam extends PageParam {
|
||||
taskUserId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
120
api/oa/order/index.ts
Normal file
120
api/oa/order/index.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Order, OrderParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询订单
|
||||
*/
|
||||
export async function pageOrder(params: OrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Order>>>(
|
||||
'/oa/order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
export async function listOrder(params?: OrderParam) {
|
||||
const res = await request.get<ApiResult<Order[]>>('/oa/order', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加订单
|
||||
*/
|
||||
export async function addOrder(data: Order) {
|
||||
const res = await request.post<ApiResult<unknown>>('/oa/order', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*/
|
||||
export async function updateOrder(data: Order) {
|
||||
const res = await request.put<ApiResult<unknown>>('/oa/order', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
export async function removeOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/oa/order/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*/
|
||||
export async function removeBatchOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/oa/order/batch', {
|
||||
data
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户状态
|
||||
*/
|
||||
export async function updateOrderStatus(orderId?: number, status?: number) {
|
||||
const res = await request.put<ApiResult<unknown>>('/oa/order/status', {
|
||||
orderId,
|
||||
status
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询订单
|
||||
*/
|
||||
export async function getOrder(id: number) {
|
||||
const res = await request.get<ApiResult<Order>>('/oa/order/' + id);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>('/oa/order/existence', {
|
||||
params: { field, value, id }
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
44
api/oa/order/model/index.ts
Normal file
44
api/oa/order/model/index.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import { Company } from '@/api/system/company/model';
|
||||
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
export interface Order {
|
||||
orderId?: number;
|
||||
orderNo?: string;
|
||||
type?: number;
|
||||
logo?: string;
|
||||
money?: number;
|
||||
payPrice?: number;
|
||||
planId?: number;
|
||||
priceId?: number;
|
||||
gradeId?: number;
|
||||
userId?: number;
|
||||
companyId?: number;
|
||||
nickname?: string;
|
||||
username?: string;
|
||||
userAvatar?: string;
|
||||
shopId?: string;
|
||||
sortNumber?: number;
|
||||
comments?: string;
|
||||
status?: number;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
company?: Company;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单搜索条件
|
||||
*/
|
||||
export interface OrderParam extends PageParam {
|
||||
orderId?: number;
|
||||
orderNo?: string;
|
||||
type?: number;
|
||||
status?: string;
|
||||
sortNumber?: string;
|
||||
userId?: number;
|
||||
createTime?: string;
|
||||
username?: string;
|
||||
nickname?: string;
|
||||
}
|
||||
120
api/oa/product/index.ts
Normal file
120
api/oa/product/index.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Product, ProductParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询产品
|
||||
*/
|
||||
export async function pageProduct(params: ProductParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Product>>>(
|
||||
'/oa/product/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品列表
|
||||
*/
|
||||
export async function listProduct(params?: ProductParam) {
|
||||
const res = await request.get<ApiResult<Product[]>>('/oa/product', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加产品
|
||||
*/
|
||||
export async function addProduct(data: Product) {
|
||||
const res = await request.post<ApiResult<unknown>>('/oa/product', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品
|
||||
*/
|
||||
export async function updateProduct(data: Product) {
|
||||
const res = await request.put<ApiResult<unknown>>('/oa/product', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品
|
||||
*/
|
||||
export async function removeProduct(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/oa/product/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产品
|
||||
*/
|
||||
export async function removeBatchProduct(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/oa/product/batch', {
|
||||
data
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户状态
|
||||
*/
|
||||
export async function updateProductStatus(productId?: number, status?: number) {
|
||||
const res = await request.put<ApiResult<unknown>>('/oa/product/status', {
|
||||
productId,
|
||||
status
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询产品
|
||||
*/
|
||||
export async function getProduct(id: number) {
|
||||
const res = await request.get<ApiResult<Product>>('/oa/product/' + id);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>('/oa/product/existence', {
|
||||
params: { field, value, id }
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
94
api/oa/product/model/index.ts
Normal file
94
api/oa/product/model/index.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 产品
|
||||
*/
|
||||
export interface Product {
|
||||
// 自增ID
|
||||
productId?: number;
|
||||
// 类型 0软件产品 1实物商品 2虚拟商品
|
||||
type?: number;
|
||||
// 产品编码
|
||||
code?: string;
|
||||
// 产品标题
|
||||
title?: string;
|
||||
// 封面图
|
||||
image?: string;
|
||||
// 产品详情
|
||||
content?: string;
|
||||
// 父级分类ID
|
||||
parentId?: number;
|
||||
// 父级栏目名称
|
||||
parentName?: string;
|
||||
// 产品分类ID
|
||||
categoryId?: number;
|
||||
// 产品分类名称
|
||||
categoryName?: string;
|
||||
// 标签
|
||||
tag?: string;
|
||||
// 产品规格 0单规格 1多规格
|
||||
specs?: number;
|
||||
// 货架
|
||||
position?: string;
|
||||
// 单位名称 (个)
|
||||
unitName?: string;
|
||||
// 进货价格
|
||||
price?: number;
|
||||
// 销售价格
|
||||
salePrice?: number;
|
||||
// 库存计算方式(10下单减库存 20付款减库存)
|
||||
deductStockType?: number;
|
||||
// 启用交付方式
|
||||
deliveryMethod?: number;
|
||||
// 启用购买时长
|
||||
durationMethod?: number;
|
||||
// 启用套餐版本
|
||||
packageMethod?: number;
|
||||
// 最大可购买数量
|
||||
canBuyNumber?: number;
|
||||
// 轮播图
|
||||
files?: string;
|
||||
// 销量
|
||||
sales?: number;
|
||||
// 库存
|
||||
stock?: number;
|
||||
// 消费赚取积分
|
||||
gainIntegral?: string;
|
||||
// 推荐
|
||||
recommend?: number;
|
||||
// 是否官方自营
|
||||
official?: boolean;
|
||||
// 商户ID
|
||||
merchantId?: number;
|
||||
// 状态(0:未上架,1:上架)
|
||||
isShow?: string;
|
||||
// 状态, 0上架 1待上架 2待审核 3审核不通过
|
||||
status?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
// 购买数量
|
||||
num?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品搜索条件
|
||||
*/
|
||||
export interface ProductParam extends PageParam {
|
||||
productId?: number;
|
||||
type?: number;
|
||||
official?: boolean;
|
||||
status?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
129
api/oa/product/tabs/index.ts
Normal file
129
api/oa/product/tabs/index.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {
|
||||
ProductTabs,
|
||||
ProductTabsParam
|
||||
} from '@/api/oa/product/tabs/model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询产品属性
|
||||
*/
|
||||
export async function pageProductTabs(params: ProductTabsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ProductTabs>>>(
|
||||
MODULES_API_URL + '/oa/product-tabs/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品属性列表
|
||||
*/
|
||||
export async function listProductTabs(params?: ProductTabsParam) {
|
||||
const res = await request.get<ApiResult<ProductTabs[]>>(
|
||||
MODULES_API_URL + '/oa/product-tabs',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询产品属性
|
||||
*/
|
||||
export async function getProductTabs(id: number) {
|
||||
const res = await request.get<ApiResult<ProductTabs>>(
|
||||
MODULES_API_URL + '/oa/product-tabs/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加产品属性
|
||||
*/
|
||||
export async function addProductTabs(data: ProductTabs) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/product-tabs',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品属性
|
||||
*/
|
||||
export async function updateProductTabs(data: ProductTabs) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/product-tabs',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品属性
|
||||
*/
|
||||
export async function removeProductTabs(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/product-tabs/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产品属性
|
||||
*/
|
||||
export async function removeBatchProductTabs(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/product-tabs/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/product-tabs/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
24
api/oa/product/tabs/model/index.ts
Normal file
24
api/oa/product/tabs/model/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 产品属性
|
||||
*/
|
||||
export interface ProductTabs {
|
||||
productId?: number;
|
||||
name?: string;
|
||||
type?: string;
|
||||
comments?: string;
|
||||
userId?: number;
|
||||
appId?: number;
|
||||
status?: any;
|
||||
sortNumber?: number;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目参数搜索条件
|
||||
*/
|
||||
export interface ProductTabsParam extends PageParam {
|
||||
productId?: number;
|
||||
userId?: number;
|
||||
}
|
||||
106
api/oa/project/index.ts
Normal file
106
api/oa/project/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Project, ProjectParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询项目
|
||||
*/
|
||||
export async function pageProject(params: ProjectParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Project>>>(
|
||||
'/oa/project/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目列表
|
||||
*/
|
||||
export async function listProject(params?: ProjectParam) {
|
||||
const res = await request.get<ApiResult<Project[]>>('/oa/project', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询项目
|
||||
*/
|
||||
export async function getProject(id: number) {
|
||||
const res = await request.get<ApiResult<Project>>('/oa/project/' + id);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加项目
|
||||
*/
|
||||
export async function addProject(data: Project) {
|
||||
const res = await request.post<ApiResult<unknown>>('/oa/project', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目
|
||||
*/
|
||||
export async function updateProject(data: Project) {
|
||||
const res = await request.put<ApiResult<unknown>>('/oa/project', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目
|
||||
*/
|
||||
export async function removeProject(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/oa/project/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目
|
||||
*/
|
||||
export async function removeBatchProject(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/oa/project/batch', {
|
||||
data
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>('/oa/project/existence', {
|
||||
params: { field, value, id }
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
56
api/oa/project/model/index.ts
Normal file
56
api/oa/project/model/index.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
export interface Project {
|
||||
// 项目id
|
||||
projectId?: number;
|
||||
// 项目类型
|
||||
projectType?: string;
|
||||
// 项目分类
|
||||
projectCategory?: string;
|
||||
// 项目标识
|
||||
projectCode: string;
|
||||
// 项目名称
|
||||
projectName?: string;
|
||||
// 项目图标
|
||||
projectAvatar?: string;
|
||||
url?: string;
|
||||
urlDev?: string;
|
||||
urlAdmin?: string;
|
||||
account?: string;
|
||||
money?: string;
|
||||
realMoney?: string;
|
||||
annualFee?: string;
|
||||
qrcode?: string;
|
||||
progress?: string;
|
||||
views?: string;
|
||||
// 项目详情
|
||||
content?: string;
|
||||
// 客户ID
|
||||
customerId?: number;
|
||||
// 客户名称
|
||||
customerName?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 状态
|
||||
status?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目搜索条件
|
||||
*/
|
||||
export interface ProjectParam extends PageParam {
|
||||
projectName?: string;
|
||||
projectCode?: string;
|
||||
status?: string;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
}
|
||||
120
api/oa/task-count/index.ts
Normal file
120
api/oa/task-count/index.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { TaskCount, TaskCountParam } from './model/index';
|
||||
import { TabsParam } from '@/api/tabs';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询统计
|
||||
*/
|
||||
export async function pageTaskCount(params: TaskCountParam) {
|
||||
const res = await request.get<ApiResult<PageResult<TaskCount>>>(
|
||||
MODULES_API_URL + '/oa/task-count/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询统计列表
|
||||
*/
|
||||
export async function listTaskCount(params?: TaskCountParam) {
|
||||
const res = await request.get<ApiResult<TaskCount[]>>(
|
||||
MODULES_API_URL + '/oa/task-count',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询统计
|
||||
*/
|
||||
export async function getTaskCount(id: number) {
|
||||
const res = await request.get<ApiResult<TaskCount>>(
|
||||
MODULES_API_URL + '/oa/task-count/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加统计
|
||||
*/
|
||||
export async function addTaskCount(data: TaskCount) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-count',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改统计
|
||||
*/
|
||||
export async function updateTaskCount(data: TaskCount) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-count',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除统计
|
||||
*/
|
||||
export async function removeTaskCount(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-count/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除统计
|
||||
*/
|
||||
export async function removeBatchTaskCount(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-count/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getCount(params?: TabsParam) {
|
||||
const res = await request.get<ApiResult<TabsParam>>(
|
||||
MODULES_API_URL + '/oa/task-count/count',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
32
api/oa/task-count/model/index.ts
Normal file
32
api/oa/task-count/model/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 统计
|
||||
*/
|
||||
export interface TaskCount {
|
||||
// 统计id
|
||||
taskCountId?: number;
|
||||
userId?: number;
|
||||
nickname?: string;
|
||||
avatar?: string;
|
||||
phone?: string;
|
||||
pending?: number;
|
||||
unused?: number;
|
||||
today?: number;
|
||||
month?: number;
|
||||
year?: number;
|
||||
total?: number;
|
||||
commander?: number;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计搜索条件
|
||||
*/
|
||||
export interface TaskCountParam extends PageParam {
|
||||
taskCountId?: number;
|
||||
userId?: number;
|
||||
roleId?: number;
|
||||
roleCode?: string;
|
||||
}
|
||||
120
api/oa/task-record/index.ts
Normal file
120
api/oa/task-record/index.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { TaskRecord, TaskRecordParam } from './model/index';
|
||||
import { TabsParam } from '@/api/tabs';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询任务
|
||||
*/
|
||||
export async function pageTaskRecord(params: TaskRecordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<TaskRecord>>>(
|
||||
MODULES_API_URL + '/oa/task-record/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务列表
|
||||
*/
|
||||
export async function listTaskRecord(params?: TaskRecordParam) {
|
||||
const res = await request.get<ApiResult<TaskRecord[]>>(
|
||||
MODULES_API_URL + '/oa/task-record',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询任务
|
||||
*/
|
||||
export async function getTaskRecord(id: number) {
|
||||
const res = await request.get<ApiResult<TaskRecord>>(
|
||||
MODULES_API_URL + '/oa/task-record/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加任务
|
||||
*/
|
||||
export async function addTaskRecord(data: TaskRecord) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务
|
||||
*/
|
||||
export async function updateTaskRecord(data: TaskRecord) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
*/
|
||||
export async function removeTaskRecord(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-record/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除任务
|
||||
*/
|
||||
export async function removeBatchTaskRecord(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-record/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getCount(params?: TabsParam) {
|
||||
const res = await request.get<ApiResult<TabsParam>>(
|
||||
MODULES_API_URL + '/oa/task-record/count',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
api/oa/task-record/model/index.ts
Normal file
35
api/oa/task-record/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import { User } from '@/api/user/model';
|
||||
|
||||
/**
|
||||
* 任务
|
||||
*/
|
||||
export interface TaskRecord {
|
||||
// 任务id
|
||||
taskRecordId?: number;
|
||||
taskId?: number;
|
||||
parentId?: number;
|
||||
nickname?: string;
|
||||
avatar?: string;
|
||||
content?: string;
|
||||
files?: any;
|
||||
appId?: number;
|
||||
developerId?: number;
|
||||
userId?: number;
|
||||
sortNumber?: number;
|
||||
comments?: string;
|
||||
status?: string;
|
||||
children?: TaskRecord[] | [];
|
||||
createTime?: string;
|
||||
toUser: User | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务搜索条件
|
||||
*/
|
||||
export interface TaskRecordParam extends PageParam {
|
||||
taskRecordId?: number;
|
||||
taskId?: number;
|
||||
userId?: number;
|
||||
developerId?: number;
|
||||
}
|
||||
120
api/oa/task-user/index.ts
Normal file
120
api/oa/task-user/index.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { TaskUser, TaskUserParam } from './model/index';
|
||||
import { TabsParam } from '@/api/tabs';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询工单成员
|
||||
*/
|
||||
export async function pageTaskUser(params: TaskUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<TaskUser>>>(
|
||||
MODULES_API_URL + '/oa/task-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工单成员列表
|
||||
*/
|
||||
export async function listTaskUser(params?: TaskUserParam) {
|
||||
const res = await request.get<ApiResult<TaskUser[]>>(
|
||||
MODULES_API_URL + '/oa/task-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询工单成员
|
||||
*/
|
||||
export async function getTaskUser(id: number) {
|
||||
const res = await request.get<ApiResult<TaskUser>>(
|
||||
MODULES_API_URL + '/oa/task-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加工单成员
|
||||
*/
|
||||
export async function addTaskUser(data: TaskUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工单成员
|
||||
*/
|
||||
export async function updateTaskUser(data: TaskUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工单成员
|
||||
*/
|
||||
export async function removeTaskUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工单成员
|
||||
*/
|
||||
export async function removeBatchTaskUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getCount(params?: TabsParam) {
|
||||
const res = await request.get<ApiResult<TabsParam>>(
|
||||
MODULES_API_URL + '/oa/task-user/count',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
27
api/oa/task-user/model/index.ts
Normal file
27
api/oa/task-user/model/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 任务
|
||||
*/
|
||||
export interface TaskUser {
|
||||
// 任务id
|
||||
taskUserId?: number;
|
||||
taskId?: number;
|
||||
role?: number;
|
||||
userId?: number;
|
||||
status?: string;
|
||||
avatar?: string;
|
||||
name?: string;
|
||||
username?: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务搜索条件
|
||||
*/
|
||||
export interface TaskUserParam extends PageParam {
|
||||
taskUserId?: number;
|
||||
taskId?: number;
|
||||
userId?: number;
|
||||
}
|
||||
154
api/oa/task/index.ts
Normal file
154
api/oa/task/index.ts
Normal file
@@ -0,0 +1,154 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Task, TaskParam } from './model/index';
|
||||
import { TabsParam } from '@/api/tabs';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询任务
|
||||
*/
|
||||
export async function pageTask(params: TaskParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Task>>>(
|
||||
MODULES_API_URL + '/oa/task/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务列表
|
||||
*/
|
||||
export async function listTask(params?: TaskParam) {
|
||||
const res = await request.get<ApiResult<Task[]>>(
|
||||
MODULES_API_URL + '/oa/task',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询任务
|
||||
*/
|
||||
export async function getTask(id: number) {
|
||||
const res = await request.get<ApiResult<Task>>(
|
||||
MODULES_API_URL + '/oa/task/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加任务
|
||||
*/
|
||||
export async function addTask(data: Task) {
|
||||
const res = await request.post<ApiResult<Task>>(
|
||||
MODULES_API_URL + '/oa/task',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务
|
||||
*/
|
||||
export async function updateTask(data: Task) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
*/
|
||||
export async function removeTask(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除任务
|
||||
*/
|
||||
export async function removeBatchTask(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/task/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getCount(params?: TabsParam) {
|
||||
const res = await request.get<ApiResult<TabsParam>>(
|
||||
MODULES_API_URL + '/oa/task/count',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工单二维码
|
||||
* @param params
|
||||
*/
|
||||
export async function taskQRCode(params: TaskParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Task>>>(
|
||||
MODULES_API_URL + '/oa/task/taskQRCode',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取邀请加入二维码
|
||||
* @param params
|
||||
*/
|
||||
export async function taskJoinQRCode(params: TaskParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Task>>>(
|
||||
MODULES_API_URL + '/oa/task/taskJoinQRCode',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
111
api/oa/task/model/index.ts
Normal file
111
api/oa/task/model/index.ts
Normal file
@@ -0,0 +1,111 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import { TaskRecord } from '@/api/oa/task-record/model';
|
||||
import { TaskUser } from '@/api/oa/task-user/model';
|
||||
|
||||
/**
|
||||
* 任务
|
||||
*/
|
||||
export interface Task {
|
||||
// 任务id
|
||||
taskId?: number;
|
||||
// 任务名称
|
||||
name?: string;
|
||||
// 任务类型
|
||||
taskType?: string;
|
||||
// 关联应用
|
||||
appId?: number;
|
||||
appName?: string;
|
||||
// 项目ID
|
||||
projectId?: string;
|
||||
// 客户ID
|
||||
customerId?: string;
|
||||
// 资产ID
|
||||
assetsId?: string;
|
||||
// 开始时间
|
||||
startTime?: string;
|
||||
// 结束时间
|
||||
endTime?: string;
|
||||
// 任务内容
|
||||
content?: string;
|
||||
files?: string;
|
||||
// 任务发起人
|
||||
promoter?: number;
|
||||
promoterName?: string;
|
||||
promoterAlias?: string;
|
||||
promoterAvatar?: string;
|
||||
promoterCompanyName?: string;
|
||||
// 任务状态
|
||||
progress?: number;
|
||||
isRead?: boolean;
|
||||
// 优先级
|
||||
priority?: string;
|
||||
// 品质要求
|
||||
quality?: string;
|
||||
// 期限(天)
|
||||
day?: string;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
redirect?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 发布者
|
||||
userId?: any;
|
||||
// 发布者昵称
|
||||
nickname?: string;
|
||||
// 项目名称
|
||||
projectName?: string;
|
||||
// 图片集
|
||||
images?: [];
|
||||
avatar?: string;
|
||||
// 受理人
|
||||
commander?: number;
|
||||
commanderName?: string;
|
||||
commanderAlias?: string;
|
||||
commanderAvatar?: string;
|
||||
commanderCompanyName?: string;
|
||||
commanderRealName?: string;
|
||||
// 最后回复人
|
||||
lastRealName?: string;
|
||||
lastAvatar?: string;
|
||||
lastReadUser?: number;
|
||||
lastNickname?: string;
|
||||
recordList?: TaskRecord[];
|
||||
users?: TaskUser[];
|
||||
phone?: string;
|
||||
overdueDays?: string;
|
||||
phoneXX?: string;
|
||||
action?: string;
|
||||
// 机密信息
|
||||
confidential?: any;
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务搜索条件
|
||||
*/
|
||||
export interface TaskParam extends PageParam {
|
||||
taskId?: number;
|
||||
status?: any;
|
||||
name?: string;
|
||||
promoter?: number;
|
||||
promoterName?: string;
|
||||
commander?: number;
|
||||
commanderName?: string;
|
||||
progress?: number;
|
||||
betweenTime?: any;
|
||||
userId?: number;
|
||||
nickname?: string;
|
||||
keywords?: any;
|
||||
current?: string;
|
||||
pending?: number;
|
||||
appId?: number;
|
||||
appName?: string;
|
||||
companyId?: number;
|
||||
companyName?: string;
|
||||
taskType?: string;
|
||||
}
|
||||
9
api/oa/task/model/progress.ts
Normal file
9
api/oa/task/model/progress.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* 枚举类
|
||||
*/
|
||||
export const TOBEARRANGED = 0; // 待安排
|
||||
export const PENDING = 1; // 待处理
|
||||
export const PROCESSING = 2; // 处理中
|
||||
export const TOBECONFIRMED = 3; // 待评价
|
||||
export const COMPLETED = 4; // 已完成
|
||||
export const CLOSED = 5; // 已关闭
|
||||
8
api/oa/task/model/task.ts
Normal file
8
api/oa/task/model/task.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const TASK_STATUS_0 = 0; // 待处理
|
||||
export const TASK_STATUS_1 = 1; // 已完成
|
||||
|
||||
export const ACTION_1 = '派单';
|
||||
export const ACTION_2 = '已解决';
|
||||
export const ACTION_3 = '关单';
|
||||
export const ACTION_4 = '分享';
|
||||
export const ACTION_5 = '编辑';
|
||||
155
api/oa/tennat/index.ts
Normal file
155
api/oa/tennat/index.ts
Normal file
@@ -0,0 +1,155 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Tenant, TenantParam } from './model';
|
||||
import { Menu } from '@/api/system/menu/model';
|
||||
|
||||
/**
|
||||
* 分页查询租户
|
||||
*/
|
||||
export async function pageTenant(params: TenantParam) {
|
||||
// 租户列表查询需要传一个key
|
||||
// params.tenantCode = 'ZAcxbdmDQFwUKC3e';
|
||||
const res = await request.get<ApiResult<PageResult<Tenant>>>(
|
||||
'/system/tenant/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租户资料
|
||||
*/
|
||||
export async function profile(params?: TenantParam) {
|
||||
const res = await request.get<ApiResult<Tenant>>('/system/tenant/profile', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租户列表
|
||||
*/
|
||||
export async function listTenant(params?: TenantParam) {
|
||||
const res = await request.get<ApiResult<Tenant[]>>('/system/tenant', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
export async function getTenant(id: number) {
|
||||
const res = await request.get<ApiResult<Tenant>>('/system/tenant/' + id);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加租户
|
||||
*/
|
||||
export async function addTenant(data: Tenant) {
|
||||
const res = await request.post<ApiResult<unknown>>('/system/tenant', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租户
|
||||
*/
|
||||
export async function updateTenant(data: Tenant) {
|
||||
const res = await request.put<ApiResult<unknown>>('/system/tenant', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除租户
|
||||
*/
|
||||
export async function removeTenant(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/system/tenant/' + id);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租户
|
||||
*/
|
||||
export async function removeBatchTenant(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>('/system/tenant/batch', {
|
||||
data
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置用户密码
|
||||
*/
|
||||
export async function updateTenantPassword(
|
||||
tenantId?: number,
|
||||
password = 'gxwebsoft.com'
|
||||
) {
|
||||
const res = await request.put<ApiResult<unknown>>('/system/tenant/password', {
|
||||
tenantId,
|
||||
password
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
'/system/tenant/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 租户初始化
|
||||
*/
|
||||
export async function initialization(roleId?: number) {
|
||||
const res = await request.get<ApiResult<Menu[]>>(
|
||||
'/system/tenant/role-menu/' + roleId
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
39
api/oa/tennat/model/index.ts
Normal file
39
api/oa/tennat/model/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 租户
|
||||
*/
|
||||
export interface Tenant {
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 租户名称
|
||||
tenantName?: string;
|
||||
// 应用ID
|
||||
appId?: string;
|
||||
// 应用秘钥
|
||||
appSecret?: string;
|
||||
logo?: string;
|
||||
// 所属客户
|
||||
companyName?: string;
|
||||
// 关联客户ID
|
||||
companyId?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
//
|
||||
password?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 租户搜索条件
|
||||
*/
|
||||
export interface TenantParam extends PageParam {
|
||||
tenantName?: string;
|
||||
appId?: string;
|
||||
companyId?: number;
|
||||
companyName?: string;
|
||||
tenantCode?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user