commit
d18ed70671
@ -1,57 +1,123 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types'
|
|
||||||
|
export type CodegenTableVO = {
|
||||||
|
id: number
|
||||||
|
tableId: number
|
||||||
|
isParentMenuIdValid: boolean
|
||||||
|
dataSourceConfigId: number
|
||||||
|
scene: number
|
||||||
|
tableName: string
|
||||||
|
tableComment: string
|
||||||
|
remark: string
|
||||||
|
moduleName: string
|
||||||
|
businessName: string
|
||||||
|
className: string
|
||||||
|
classComment: string
|
||||||
|
author: string
|
||||||
|
createTime: Date
|
||||||
|
updateTime: Date
|
||||||
|
templateType: number
|
||||||
|
parentMenuId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type CodegenColumnVO = {
|
||||||
|
id: number
|
||||||
|
tableId: number
|
||||||
|
columnName: string
|
||||||
|
dataType: string
|
||||||
|
columnComment: string
|
||||||
|
nullable: number
|
||||||
|
primaryKey: number
|
||||||
|
autoIncrement: string
|
||||||
|
ordinalPosition: number
|
||||||
|
javaType: string
|
||||||
|
javaField: string
|
||||||
|
dictType: string
|
||||||
|
example: string
|
||||||
|
createOperation: number
|
||||||
|
updateOperation: number
|
||||||
|
listOperation: number
|
||||||
|
listOperationCondition: string
|
||||||
|
listOperationResult: number
|
||||||
|
htmlType: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DatabaseTableVO = {
|
||||||
|
name: string
|
||||||
|
comment: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type CodegenDetailVO = {
|
||||||
|
table: CodegenTableVO
|
||||||
|
columns: CodegenColumnVO[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type CodegenPreviewVO = {
|
||||||
|
filePath: string
|
||||||
|
code: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type CodegenUpdateReqVO = {
|
||||||
|
table: CodegenTableVO | any
|
||||||
|
columns: CodegenColumnVO[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type CodegenCreateListReqVO = {
|
||||||
|
dataSourceConfigId: number
|
||||||
|
tableNames: string[]
|
||||||
|
}
|
||||||
|
|
||||||
// 查询列表代码生成表定义
|
// 查询列表代码生成表定义
|
||||||
export const getCodegenTablePageApi = (params) => {
|
export const getCodegenTablePage = (params: PageParam) => {
|
||||||
return request.get({ url: '/infra/codegen/table/page', params })
|
return request.get({ url: '/infra/codegen/table/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情代码生成表定义
|
// 查询详情代码生成表定义
|
||||||
export const getCodegenTableApi = (id: number) => {
|
export const getCodegenTable = (id: number) => {
|
||||||
return request.get({ url: '/infra/codegen/detail?tableId=' + id })
|
return request.get({ url: '/infra/codegen/detail?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增代码生成表定义
|
// 新增代码生成表定义
|
||||||
export const createCodegenTableApi = (data: CodegenCreateListReqVO) => {
|
export const createCodegenTable = (data: CodegenCreateListReqVO) => {
|
||||||
return request.post({ url: '/infra/codegen/create', data })
|
return request.post({ url: '/infra/codegen/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改代码生成表定义
|
// 修改代码生成表定义
|
||||||
export const updateCodegenTableApi = (data: CodegenUpdateReqVO) => {
|
export const updateCodegenTable = (data: CodegenUpdateReqVO) => {
|
||||||
return request.put({ url: '/infra/codegen/update', data })
|
return request.put({ url: '/infra/codegen/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基于数据库的表结构,同步数据库的表和字段定义
|
// 基于数据库的表结构,同步数据库的表和字段定义
|
||||||
export const syncCodegenFromDBApi = (id: number) => {
|
export const syncCodegenFromDB = (id: number) => {
|
||||||
return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
|
return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基于 SQL 建表语句,同步数据库的表和字段定义
|
// 基于 SQL 建表语句,同步数据库的表和字段定义
|
||||||
export const syncCodegenFromSQLApi = (id: number, sql: string) => {
|
export const syncCodegenFromSQL = (id: number, sql: string) => {
|
||||||
return request.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
|
return request.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 预览生成代码
|
// 预览生成代码
|
||||||
export const previewCodegenApi = (id: number) => {
|
export const previewCodegen = (id: number) => {
|
||||||
return request.get({ url: '/infra/codegen/preview?tableId=' + id })
|
return request.get({ url: '/infra/codegen/preview?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载生成代码
|
// 下载生成代码
|
||||||
export const downloadCodegenApi = (id: number) => {
|
export const downloadCodegen = (id: number) => {
|
||||||
return request.download({ url: '/infra/codegen/download?tableId=' + id })
|
return request.download({ url: '/infra/codegen/download?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得表定义
|
// 获得表定义
|
||||||
export const getSchemaTableListApi = (params) => {
|
export const getSchemaTableList = (params) => {
|
||||||
return request.get({ url: '/infra/codegen/db/table/list', params })
|
return request.get({ url: '/infra/codegen/db/table/list', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基于数据库的表结构,创建代码生成器的表定义
|
// 基于数据库的表结构,创建代码生成器的表定义
|
||||||
export const createCodegenListApi = (data) => {
|
export const createCodegenList = (data) => {
|
||||||
return request.post({ url: '/infra/codegen/create-list', data })
|
return request.post({ url: '/infra/codegen/create-list', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除代码生成表定义
|
// 删除代码生成表定义
|
||||||
export const deleteCodegenTableApi = (id: number) => {
|
export const deleteCodegenTable = (id: number) => {
|
||||||
return request.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
return request.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,61 +0,0 @@
|
|||||||
export type CodegenTableVO = {
|
|
||||||
id: number
|
|
||||||
tableId: number
|
|
||||||
isParentMenuIdValid: boolean
|
|
||||||
dataSourceConfigId: number
|
|
||||||
scene: number
|
|
||||||
tableName: string
|
|
||||||
tableComment: string
|
|
||||||
remark: string
|
|
||||||
moduleName: string
|
|
||||||
businessName: string
|
|
||||||
className: string
|
|
||||||
classComment: string
|
|
||||||
author: string
|
|
||||||
createTime: Date
|
|
||||||
updateTime: Date
|
|
||||||
templateType: number
|
|
||||||
parentMenuId: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CodegenColumnVO = {
|
|
||||||
id: number
|
|
||||||
tableId: number
|
|
||||||
columnName: string
|
|
||||||
dataType: string
|
|
||||||
columnComment: string
|
|
||||||
nullable: number
|
|
||||||
primaryKey: number
|
|
||||||
autoIncrement: string
|
|
||||||
ordinalPosition: number
|
|
||||||
javaType: string
|
|
||||||
javaField: string
|
|
||||||
dictType: string
|
|
||||||
example: string
|
|
||||||
createOperation: number
|
|
||||||
updateOperation: number
|
|
||||||
listOperation: number
|
|
||||||
listOperationCondition: string
|
|
||||||
listOperationResult: number
|
|
||||||
htmlType: string
|
|
||||||
}
|
|
||||||
export type DatabaseTableVO = {
|
|
||||||
name: string
|
|
||||||
comment: string
|
|
||||||
}
|
|
||||||
export type CodegenDetailVO = {
|
|
||||||
table: CodegenTableVO
|
|
||||||
columns: CodegenColumnVO[]
|
|
||||||
}
|
|
||||||
export type CodegenPreviewVO = {
|
|
||||||
filePath: string
|
|
||||||
code: string
|
|
||||||
}
|
|
||||||
export type CodegenUpdateReqVO = {
|
|
||||||
table: CodegenTableVO
|
|
||||||
columns: CodegenColumnVO[]
|
|
||||||
}
|
|
||||||
export type CodegenCreateListReqVO = {
|
|
||||||
dataSourceConfigId: number
|
|
||||||
tableNames: string[]
|
|
||||||
}
|
|
||||||
@ -1,35 +1,35 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
export interface DataSourceConfigVO {
|
export interface DataSourceConfigVO {
|
||||||
id: number
|
id: number | undefined
|
||||||
name: string
|
name: string
|
||||||
url: string
|
url: string
|
||||||
username: string
|
username: string
|
||||||
password: string
|
password: string
|
||||||
createTime: Date
|
createTime?: Date
|
||||||
}
|
|
||||||
|
|
||||||
// 查询数据源配置列表
|
|
||||||
export const getDataSourceConfigListApi = () => {
|
|
||||||
return request.get({ url: '/infra/data-source-config/list' })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询数据源配置详情
|
|
||||||
export const getDataSourceConfigApi = (id: number) => {
|
|
||||||
return request.get({ url: '/infra/data-source-config/get?id=' + id })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增数据源配置
|
// 新增数据源配置
|
||||||
export const createDataSourceConfigApi = (data: DataSourceConfigVO) => {
|
export const createDataSourceConfig = (data: DataSourceConfigVO) => {
|
||||||
return request.post({ url: '/infra/data-source-config/create', data })
|
return request.post({ url: '/infra/data-source-config/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改数据源配置
|
// 修改数据源配置
|
||||||
export const updateDataSourceConfigApi = (data: DataSourceConfigVO) => {
|
export const updateDataSourceConfig = (data: DataSourceConfigVO) => {
|
||||||
return request.put({ url: '/infra/data-source-config/update', data })
|
return request.put({ url: '/infra/data-source-config/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除数据源配置
|
// 删除数据源配置
|
||||||
export const deleteDataSourceConfigApi = (id: number) => {
|
export const deleteDataSourceConfig = (id: number) => {
|
||||||
return request.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
return request.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询数据源配置详情
|
||||||
|
export const getDataSourceConfig = (id: number) => {
|
||||||
|
return request.get({ url: '/infra/data-source-config/get?id=' + id })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询数据源配置列表
|
||||||
|
export const getDataSourceConfigList = () => {
|
||||||
|
return request.get({ url: '/infra/data-source-config/list' })
|
||||||
|
}
|
||||||
|
|||||||
@ -0,0 +1,60 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品分类
|
||||||
|
*/
|
||||||
|
export interface CategoryVO {
|
||||||
|
/**
|
||||||
|
* 分类编号
|
||||||
|
*/
|
||||||
|
id?: number
|
||||||
|
/**
|
||||||
|
* 父分类编号
|
||||||
|
*/
|
||||||
|
parentId?: number
|
||||||
|
/**
|
||||||
|
* 分类名称
|
||||||
|
*/
|
||||||
|
name: string
|
||||||
|
/**
|
||||||
|
* 分类图片
|
||||||
|
*/
|
||||||
|
picUrl: string
|
||||||
|
/**
|
||||||
|
* 分类排序
|
||||||
|
*/
|
||||||
|
sort?: number
|
||||||
|
/**
|
||||||
|
* 分类描述
|
||||||
|
*/
|
||||||
|
description?: string
|
||||||
|
/**
|
||||||
|
* 开启状态
|
||||||
|
*/
|
||||||
|
status: number
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建商品分类
|
||||||
|
export const createCategory = (data: CategoryVO) => {
|
||||||
|
return request.post({ url: '/product/category/create', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新商品分类
|
||||||
|
export const updateCategory = (data: CategoryVO) => {
|
||||||
|
return request.put({ url: '/product/category/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除商品分类
|
||||||
|
export const deleteCategory = (id: number) => {
|
||||||
|
return request.delete({ url: `/product/category/delete?id=${id}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得商品分类
|
||||||
|
export const getCategory = (id: number) => {
|
||||||
|
return request.get({ url: `/product/category/get?id=${id}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得商品分类列表
|
||||||
|
export const getCategoryList = (params: any) => {
|
||||||
|
return request.get({ url: '/product/category/list', params })
|
||||||
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品属性
|
||||||
|
*/
|
||||||
|
export interface PropertyVO {
|
||||||
|
id?: number
|
||||||
|
/** 名称 */
|
||||||
|
name: string
|
||||||
|
/** 备注 */
|
||||||
|
remark?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性值
|
||||||
|
*/
|
||||||
|
export interface PropertyValueVO {
|
||||||
|
id?: number
|
||||||
|
/** 属性项的编号 */
|
||||||
|
propertyId?: number
|
||||||
|
/** 名称 */
|
||||||
|
name: string
|
||||||
|
/** 备注 */
|
||||||
|
remark?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品属性值的明细
|
||||||
|
*/
|
||||||
|
export interface PropertyValueDetailVO {
|
||||||
|
/** 属性项的编号 */
|
||||||
|
propertyId: number // 属性的编号
|
||||||
|
/** 属性的名称 */
|
||||||
|
propertyName: string
|
||||||
|
/** 属性值的编号 */
|
||||||
|
valueId: number
|
||||||
|
/** 属性值的名称 */
|
||||||
|
valueName: string
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------ 属性项 -------------------
|
||||||
|
|
||||||
|
// 创建属性项
|
||||||
|
export const createProperty = (data: PropertyVO) => {
|
||||||
|
return request.post({ url: '/product/property/create', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新属性项
|
||||||
|
export const updateProperty = (data: PropertyVO) => {
|
||||||
|
return request.put({ url: '/product/property/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除属性项
|
||||||
|
export const deleteProperty = (id: number) => {
|
||||||
|
return request.delete({ url: `/product/property/delete?id=${id}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得属性项
|
||||||
|
export const getProperty = (id: number): Promise<PropertyVO> => {
|
||||||
|
return request.get({ url: `/product/property/get?id=${id}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得属性项分页
|
||||||
|
export const getPropertyPage = (params: PageParam) => {
|
||||||
|
return request.get({ url: '/product/property/page', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得属性项列表
|
||||||
|
export const getPropertyList = (params: any) => {
|
||||||
|
return request.get({ url: '/product/property/list', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得属性项列表
|
||||||
|
export const getPropertyListAndValue = (params: any) => {
|
||||||
|
return request.get({ url: '/product/property/get-value-list', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------ 属性值 -------------------
|
||||||
|
|
||||||
|
// 获得属性值分页
|
||||||
|
export const getPropertyValuePage = (params: PageParam & any) => {
|
||||||
|
return request.get({ url: '/product/property/value/page', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得属性值
|
||||||
|
export const getPropertyValue = (id: number): Promise<PropertyValueVO> => {
|
||||||
|
return request.get({ url: `/product/property/value/get?id=${id}` })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建属性值
|
||||||
|
export const createPropertyValue = (data: PropertyValueVO) => {
|
||||||
|
return request.post({ url: '/product/property/value/create', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新属性值
|
||||||
|
export const updatePropertyValue = (data: PropertyValueVO) => {
|
||||||
|
return request.put({ url: '/product/property/value/update', data })
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除属性值
|
||||||
|
export const deletePropertyValue = (id: number) => {
|
||||||
|
return request.delete({ url: `/product/property/value/delete?id=${id}` })
|
||||||
|
}
|
||||||
@ -1,15 +1,11 @@
|
|||||||
import request from '@/config/axios/request'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// 获得地区树
|
// 获得地区树
|
||||||
export const getAreaTree = async (content?: any) => {
|
export const getAreaTree = async () => {
|
||||||
return await request.get({
|
return await request.get({ url: '/system/area/tree' })
|
||||||
url: '/system/area/tree',
|
|
||||||
params: content
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得 IP 对应的地区名
|
// 获得 IP 对应的地区名
|
||||||
export const getAreaByIp = async (ip) => {
|
export const getAreaByIp = async (ip: string) => {
|
||||||
return await request.get({
|
return await request.get({ url: '/system/area/get-by-ip?ip=' + ip })
|
||||||
url: '/system/area/get-by-ip?ip=' + ip
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,36 +1,49 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types'
|
|
||||||
|
export type DictDataVO = {
|
||||||
|
id: number | undefined
|
||||||
|
sort: number | undefined
|
||||||
|
label: string
|
||||||
|
value: string
|
||||||
|
dictType: string
|
||||||
|
status: number
|
||||||
|
colorType: string
|
||||||
|
cssClass: string
|
||||||
|
remark: string
|
||||||
|
createTime: Date
|
||||||
|
}
|
||||||
|
|
||||||
// 查询字典数据(精简)列表
|
// 查询字典数据(精简)列表
|
||||||
export const listSimpleDictDataApi = () => {
|
export const listSimpleDictData = () => {
|
||||||
return request.get({ url: '/system/dict-data/list-all-simple' })
|
return request.get({ url: '/system/dict-data/list-all-simple' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询字典数据列表
|
// 查询字典数据列表
|
||||||
export const getDictDataPageApi = (params: DictDataPageReqVO) => {
|
export const getDictDataPage = (params: PageParam) => {
|
||||||
return request.get({ url: '/system/dict-data/page', params })
|
return request.get({ url: '/system/dict-data/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询字典数据详情
|
// 查询字典数据详情
|
||||||
export const getDictDataApi = (id: number) => {
|
export const getDictData = (id: number) => {
|
||||||
return request.get({ url: '/system/dict-data/get?id=' + id })
|
return request.get({ url: '/system/dict-data/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增字典数据
|
// 新增字典数据
|
||||||
export const createDictDataApi = (data: DictDataVO) => {
|
export const createDictData = (data: DictDataVO) => {
|
||||||
return request.post({ url: '/system/dict-data/create', data })
|
return request.post({ url: '/system/dict-data/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改字典数据
|
// 修改字典数据
|
||||||
export const updateDictDataApi = (data: DictDataVO) => {
|
export const updateDictData = (data: DictDataVO) => {
|
||||||
return request.put({ url: '/system/dict-data/update', data })
|
return request.put({ url: '/system/dict-data/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除字典数据
|
// 删除字典数据
|
||||||
export const deleteDictDataApi = (id: number) => {
|
export const deleteDictData = (id: number) => {
|
||||||
return request.delete({ url: '/system/dict-data/delete?id=' + id })
|
return request.delete({ url: '/system/dict-data/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出字典类型数据
|
// 导出字典类型数据
|
||||||
export const exportDictDataApi = (params: DictDataExportReqVO) => {
|
export const exportDictDataApi = (params) => {
|
||||||
return request.get({ url: '/system/dict-data/export', params })
|
return request.get({ url: '/system/dict-data/export', params })
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,36 +1,44 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types'
|
|
||||||
|
export type DictTypeVO = {
|
||||||
|
id: number | undefined
|
||||||
|
name: string
|
||||||
|
type: string
|
||||||
|
status: number
|
||||||
|
remark: string
|
||||||
|
createTime: Date
|
||||||
|
}
|
||||||
|
|
||||||
// 查询字典(精简)列表
|
// 查询字典(精简)列表
|
||||||
export const listSimpleDictTypeApi = () => {
|
export const getSimpleDictTypeList = () => {
|
||||||
return request.get({ url: '/system/dict-type/list-all-simple' })
|
return request.get({ url: '/system/dict-type/list-all-simple' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询字典列表
|
// 查询字典列表
|
||||||
export const getDictTypePageApi = (params: DictTypePageReqVO) => {
|
export const getDictTypePage = (params: PageParam) => {
|
||||||
return request.get({ url: '/system/dict-type/page', params })
|
return request.get({ url: '/system/dict-type/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询字典详情
|
// 查询字典详情
|
||||||
export const getDictTypeApi = (id: number) => {
|
export const getDictType = (id: number) => {
|
||||||
return request.get({ url: '/system/dict-type/get?id=' + id })
|
return request.get({ url: '/system/dict-type/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增字典
|
// 新增字典
|
||||||
export const createDictTypeApi = (data: DictTypeVO) => {
|
export const createDictType = (data: DictTypeVO) => {
|
||||||
return request.post({ url: '/system/dict-type/create', data })
|
return request.post({ url: '/system/dict-type/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改字典
|
// 修改字典
|
||||||
export const updateDictTypeApi = (data: DictTypeVO) => {
|
export const updateDictType = (data: DictTypeVO) => {
|
||||||
return request.put({ url: '/system/dict-type/update', data })
|
return request.put({ url: '/system/dict-type/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除字典
|
// 删除字典
|
||||||
export const deleteDictTypeApi = (id: number) => {
|
export const deleteDictType = (id: number) => {
|
||||||
return request.delete({ url: '/system/dict-type/delete?id=' + id })
|
return request.delete({ url: '/system/dict-type/delete?id=' + id })
|
||||||
}
|
}
|
||||||
// 导出字典类型
|
// 导出字典类型
|
||||||
export const exportDictTypeApi = (params: DictTypeExportReqVO) => {
|
export const exportDictType = (params) => {
|
||||||
return request.get({ url: '/system/dict-type/export', params })
|
return request.get({ url: '/system/dict-type/export', params })
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,46 +0,0 @@
|
|||||||
export type DictTypeVO = {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
status: number
|
|
||||||
remark: string
|
|
||||||
createTime: Date
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DictTypePageReqVO = {
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
status: number
|
|
||||||
createTime: Date[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DictTypeExportReqVO = {
|
|
||||||
name: string
|
|
||||||
type: string
|
|
||||||
status: number
|
|
||||||
createTime: Date[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DictDataVO = {
|
|
||||||
id: number
|
|
||||||
sort: number
|
|
||||||
label: string
|
|
||||||
value: string
|
|
||||||
dictType: string
|
|
||||||
status: number
|
|
||||||
colorType: string
|
|
||||||
cssClass: string
|
|
||||||
remark: string
|
|
||||||
createTime: Date
|
|
||||||
}
|
|
||||||
export type DictDataPageReqVO = {
|
|
||||||
label: string
|
|
||||||
dictType: string
|
|
||||||
status: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DictDataExportReqVO = {
|
|
||||||
label: string
|
|
||||||
dictType: string
|
|
||||||
status: number
|
|
||||||
}
|
|
||||||
@ -1,57 +1,39 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
export interface SmsLogVO {
|
export interface SmsLogVO {
|
||||||
id: number
|
id: number | null
|
||||||
channelId: number
|
channelId: number | null
|
||||||
channelCode: string
|
channelCode: string
|
||||||
templateId: number
|
templateId: number | null
|
||||||
templateCode: string
|
templateCode: string
|
||||||
templateType: number
|
templateType: number | null
|
||||||
templateContent: string
|
templateContent: string
|
||||||
templateParams: Map<string, object>
|
templateParams: Map<string, object> | null
|
||||||
|
apiTemplateId: string
|
||||||
mobile: string
|
mobile: string
|
||||||
userId: number
|
userId: number | null
|
||||||
userType: number
|
userType: number | null
|
||||||
sendStatus: number
|
sendStatus: number | null
|
||||||
sendTime: Date
|
sendTime: Date | null
|
||||||
sendCode: number
|
sendCode: number | null
|
||||||
sendMsg: string
|
sendMsg: string
|
||||||
apiSendCode: string
|
apiSendCode: string
|
||||||
apiSendMsg: string
|
apiSendMsg: string
|
||||||
apiRequestId: string
|
apiRequestId: string
|
||||||
apiSerialNo: string
|
apiSerialNo: string
|
||||||
receiveStatus: number
|
receiveStatus: number | null
|
||||||
receiveTime: Date
|
receiveTime: Date | null
|
||||||
apiReceiveCode: string
|
apiReceiveCode: string
|
||||||
apiReceiveMsg: string
|
apiReceiveMsg: string
|
||||||
createTime: Date
|
createTime: Date | null
|
||||||
}
|
|
||||||
|
|
||||||
export interface SmsLogPageReqVO extends PageParam {
|
|
||||||
channelId?: number
|
|
||||||
templateId?: number
|
|
||||||
mobile?: string
|
|
||||||
sendStatus?: number
|
|
||||||
sendTime?: Date[]
|
|
||||||
receiveStatus?: number
|
|
||||||
receiveTime?: Date[]
|
|
||||||
}
|
|
||||||
export interface SmsLogExportReqVO {
|
|
||||||
channelId?: number
|
|
||||||
templateId?: number
|
|
||||||
mobile?: string
|
|
||||||
sendStatus?: number
|
|
||||||
sendTime?: Date[]
|
|
||||||
receiveStatus?: number
|
|
||||||
receiveTime?: Date[]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询短信日志列表
|
// 查询短信日志列表
|
||||||
export const getSmsLogPageApi = (params: SmsLogPageReqVO) => {
|
export const getSmsLogPage = (params: PageParam) => {
|
||||||
return request.get({ url: '/system/sms-log/page', params })
|
return request.get({ url: '/system/sms-log/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出短信日志
|
// 导出短信日志
|
||||||
export const exportSmsLogApi = (params: SmsLogExportReqVO) => {
|
export const exportSmsLog = (params) => {
|
||||||
return request.download({ url: '/system/sms-log/export-excel', params })
|
return request.download({ url: '/system/sms-log/export-excel', params })
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@ -1,50 +0,0 @@
|
|||||||
import { service } from './service'
|
|
||||||
|
|
||||||
import { config } from './config'
|
|
||||||
|
|
||||||
const { default_headers } = config
|
|
||||||
|
|
||||||
const request = (option: any) => {
|
|
||||||
const { url, method, params, data, headersType, responseType } = option
|
|
||||||
return service({
|
|
||||||
url: url,
|
|
||||||
method,
|
|
||||||
params,
|
|
||||||
data,
|
|
||||||
responseType: responseType,
|
|
||||||
headers: {
|
|
||||||
'Content-Type': headersType || default_headers
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export default {
|
|
||||||
get: async <T = any>(option: any) => {
|
|
||||||
const res = await request({ method: 'GET', ...option })
|
|
||||||
return res as unknown as T
|
|
||||||
},
|
|
||||||
post: async <T = any>(option: any) => {
|
|
||||||
const res = await request({ method: 'POST', ...option })
|
|
||||||
return res as unknown as T
|
|
||||||
},
|
|
||||||
delete: async <T = any>(option: any) => {
|
|
||||||
const res = await request({ method: 'DELETE', ...option })
|
|
||||||
return res as unknown as T
|
|
||||||
},
|
|
||||||
put: async <T = any>(option: any) => {
|
|
||||||
const res = await request({ method: 'PUT', ...option })
|
|
||||||
return res as unknown as T
|
|
||||||
},
|
|
||||||
patch: async <T = any>(option: any) => {
|
|
||||||
const res = await request({ method: 'PATCH', ...option })
|
|
||||||
return res as unknown as T
|
|
||||||
},
|
|
||||||
download: async <T = any>(option: any) => {
|
|
||||||
const res = await request({ method: 'GET', responseType: 'blob', ...option })
|
|
||||||
return res as unknown as Promise<T>
|
|
||||||
},
|
|
||||||
upload: async <T = any>(option: any) => {
|
|
||||||
option.headersType = 'multipart/form-data'
|
|
||||||
const res = await request({ method: 'POST', ...option })
|
|
||||||
return res as unknown as Promise<T>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
|
||||||
|
|
||||||
// CrudSchema
|
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
|
||||||
primaryKey: 'id',
|
|
||||||
primaryType: null,
|
|
||||||
action: true,
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '定义编号',
|
|
||||||
field: 'id',
|
|
||||||
table: {
|
|
||||||
width: 360
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '定义名称',
|
|
||||||
field: 'name',
|
|
||||||
table: {
|
|
||||||
// width: 120,
|
|
||||||
slots: {
|
|
||||||
default: 'name_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '定义分类',
|
|
||||||
field: 'category',
|
|
||||||
// dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
|
|
||||||
// dictClass: 'number',
|
|
||||||
table: {
|
|
||||||
// width: 120,
|
|
||||||
slots: {
|
|
||||||
default: 'category_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '表单信息',
|
|
||||||
field: 'formId',
|
|
||||||
table: {
|
|
||||||
// width: 200,
|
|
||||||
slots: {
|
|
||||||
default: 'formId_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '流程版本',
|
|
||||||
field: 'version',
|
|
||||||
table: {
|
|
||||||
// width: 80,
|
|
||||||
slots: {
|
|
||||||
default: 'version_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '激活状态',
|
|
||||||
field: 'suspensionState',
|
|
||||||
table: {
|
|
||||||
// width: 80,
|
|
||||||
slots: {
|
|
||||||
default: 'suspensionState_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部署时间',
|
|
||||||
field: 'deploymentTime',
|
|
||||||
isForm: false,
|
|
||||||
formatter: 'formatDate'
|
|
||||||
// table: {
|
|
||||||
// width: 180
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
|
|
||||||
// 表单校验
|
|
||||||
export const rules = reactive({
|
|
||||||
name: [required]
|
|
||||||
})
|
|
||||||
|
|
||||||
// CrudSchema
|
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
|
||||||
primaryKey: 'id',
|
|
||||||
primaryType: 'id',
|
|
||||||
primaryTitle: '表单编号',
|
|
||||||
action: true,
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '表单名',
|
|
||||||
field: 'name',
|
|
||||||
isSearch: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('common.status'),
|
|
||||||
field: 'status',
|
|
||||||
dictType: DICT_TYPE.COMMON_STATUS,
|
|
||||||
dictClass: 'number'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '备注',
|
|
||||||
field: 'remark'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('common.createTime'),
|
|
||||||
field: 'createTime',
|
|
||||||
formatter: 'formatDate',
|
|
||||||
isForm: false,
|
|
||||||
table: {
|
|
||||||
width: 180
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
|
|
||||||
// 表单校验
|
|
||||||
export const rules = reactive({
|
|
||||||
name: [required],
|
|
||||||
description: [required],
|
|
||||||
memberUserIds: [required],
|
|
||||||
status: [required]
|
|
||||||
})
|
|
||||||
|
|
||||||
// CrudSchema
|
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
|
||||||
primaryKey: 'id',
|
|
||||||
primaryType: 'id',
|
|
||||||
primaryTitle: '编号',
|
|
||||||
action: true,
|
|
||||||
searchSpan: 8,
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '组名',
|
|
||||||
field: 'name',
|
|
||||||
isSearch: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '成员',
|
|
||||||
field: 'memberUserIds',
|
|
||||||
table: {
|
|
||||||
slots: {
|
|
||||||
default: 'memberUserIds_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '描述',
|
|
||||||
field: 'description'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('common.status'),
|
|
||||||
field: 'status',
|
|
||||||
dictType: DICT_TYPE.COMMON_STATUS,
|
|
||||||
dictClass: 'number',
|
|
||||||
isSearch: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('common.createTime'),
|
|
||||||
field: 'createTime',
|
|
||||||
formatter: 'formatDate',
|
|
||||||
isForm: false,
|
|
||||||
isSearch: true,
|
|
||||||
search: {
|
|
||||||
show: true,
|
|
||||||
itemRender: {
|
|
||||||
name: 'XDataTimePicker'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
table: {
|
|
||||||
width: 180
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|
|
||||||
@ -1,106 +0,0 @@
|
|||||||
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
|
|
||||||
// 表单校验
|
|
||||||
export const rules = reactive({
|
|
||||||
key: [required],
|
|
||||||
name: [required],
|
|
||||||
category: [required],
|
|
||||||
formType: [required],
|
|
||||||
formId: [required],
|
|
||||||
formCustomCreatePath: [required],
|
|
||||||
formCustomViewPath: [required]
|
|
||||||
})
|
|
||||||
|
|
||||||
// CrudSchema
|
|
||||||
const crudSchemas = reactive<VxeCrudSchema>({
|
|
||||||
primaryKey: 'key',
|
|
||||||
primaryType: null,
|
|
||||||
action: true,
|
|
||||||
actionWidth: '540px',
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '流程标识',
|
|
||||||
field: 'key',
|
|
||||||
isSearch: true,
|
|
||||||
table: {
|
|
||||||
width: 120
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '流程名称',
|
|
||||||
field: 'name',
|
|
||||||
isSearch: true,
|
|
||||||
table: {
|
|
||||||
width: 120,
|
|
||||||
slots: {
|
|
||||||
default: 'name_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '流程分类',
|
|
||||||
field: 'category',
|
|
||||||
dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
|
|
||||||
dictClass: 'number',
|
|
||||||
isSearch: true,
|
|
||||||
table: {
|
|
||||||
slots: {
|
|
||||||
default: 'category_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '表单信息',
|
|
||||||
field: 'formId',
|
|
||||||
table: {
|
|
||||||
width: 180,
|
|
||||||
slots: {
|
|
||||||
default: 'formId_default'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '最新部署的流程定义',
|
|
||||||
field: 'processDefinition',
|
|
||||||
isForm: false,
|
|
||||||
table: {
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '流程版本',
|
|
||||||
field: 'version',
|
|
||||||
slots: {
|
|
||||||
default: 'version_default'
|
|
||||||
},
|
|
||||||
width: 80
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '激活状态',
|
|
||||||
field: 'status',
|
|
||||||
slots: {
|
|
||||||
default: 'status_default'
|
|
||||||
},
|
|
||||||
width: 80
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部署时间',
|
|
||||||
field: 'processDefinition.deploymentTime',
|
|
||||||
formatter: 'formatDate',
|
|
||||||
width: 180
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('common.createTime'),
|
|
||||||
field: 'createTime',
|
|
||||||
isForm: false,
|
|
||||||
formatter: 'formatDate',
|
|
||||||
table: {
|
|
||||||
width: 180
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue