diff --git a/package.json b/package.json
index 683d09eb..d067560f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "yudao-ui-admin-vue3",
- "version": "1.7.1-snapshot.1961",
+ "version": "1.7.1-snapshot.1941",
"description": "基于vue3、vite4、element-plus、typesScript",
"author": "xingyu",
"private": false,
@@ -29,14 +29,12 @@
"@form-create/designer": "^3.1.0",
"@form-create/element-ui": "^3.1.17",
"@iconify/iconify": "^3.1.0",
- "@videojs-player/vue": "^1.0.0",
"@vueuse/core": "^9.13.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.10",
"@zxcvbn-ts/core": "^2.2.1",
"animate.css": "^4.1.1",
"axios": "^1.3.4",
- "benz-amr-recorder": "^1.1.5",
"bpmn-js-token-simulation": "^0.10.0",
"camunda-bpmn-moddle": "^7.0.1",
"cropperjs": "^1.5.13",
@@ -45,7 +43,7 @@
"diagram-js": "^11.6.0",
"echarts": "^5.4.1",
"echarts-wordcloud": "^2.1.0",
- "element-plus": "2.3.1",
+ "element-plus": "2.2.34",
"fast-xml-parser": "^4.1.3",
"highlight.js": "^11.7.0",
"intro.js": "^6.0.0",
@@ -59,63 +57,62 @@
"qs": "^6.11.1",
"steady-xml": "^0.1.0",
"url": "^0.11.0",
- "video.js": "^8.0.4",
"vue": "3.2.47",
"vue-i18n": "9.2.2",
"vue-router": "^4.1.6",
"vue-types": "^5.0.2",
"vuedraggable": "^4.1.0",
- "vxe-table": "^4.3.11",
+ "vxe-table": "^4.3.10",
"web-storage-cache": "^1.1.1",
"xe-utils": "^3.5.7",
"xml-js": "^1.6.11"
},
"devDependencies": {
- "@commitlint/cli": "^17.5.0",
+ "@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
- "@iconify/json": "^2.2.38",
- "@intlify/unplugin-vue-i18n": "^0.10.0",
+ "@iconify/json": "^2.2.31",
+ "@intlify/unplugin-vue-i18n": "^0.8.2",
"@purge-icons/generated": "^0.9.0",
"@types/intro.js": "^5.1.1",
- "@types/lodash-es": "^4.17.7",
- "@types/node": "^18.15.5",
+ "@types/lodash-es": "^4.17.6",
+ "@types/node": "^18.14.6",
"@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0",
"@types/qs": "^6.9.7",
- "@typescript-eslint/eslint-plugin": "^5.56.0",
- "@typescript-eslint/parser": "^5.56.0",
- "@vitejs/plugin-legacy": "^4.0.2",
- "@vitejs/plugin-vue": "^4.1.0",
- "@vitejs/plugin-vue-jsx": "^3.0.1",
- "autoprefixer": "^10.4.14",
+ "@typescript-eslint/eslint-plugin": "^5.54.1",
+ "@typescript-eslint/parser": "^5.54.1",
+ "@vitejs/plugin-legacy": "^4.0.1",
+ "@vitejs/plugin-vue": "^4.0.0",
+ "@vitejs/plugin-vue-jsx": "^3.0.0",
+ "autoprefixer": "^10.4.13",
"bpmn-js": "^8.9.0",
"bpmn-js-properties-panel": "^0.46.0",
"consola": "^2.15.3",
- "eslint": "^8.36.0",
- "eslint-config-prettier": "^8.8.0",
- "eslint-define-config": "^1.17.0",
+ "eslint": "^8.35.0",
+ "eslint-config-prettier": "^8.7.0",
+ "eslint-define-config": "^1.15.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.9.0",
- "lint-staged": "^13.2.0",
+ "lint-staged": "^13.1.2",
"postcss": "^8.4.21",
"postcss-html": "^1.5.0",
"postcss-scss": "^4.0.6",
- "prettier": "^2.8.6",
- "rimraf": "^4.4.1",
- "rollup": "^3.20.0",
- "sass": "^1.59.3",
- "stylelint": "^15.3.0",
+ "prettier": "^2.8.4",
+ "rimraf": "^4.3.1",
+ "rollup": "^3.18.0",
+ "sass": "^1.58.3",
+ "stylelint": "^15.2.0",
"stylelint-config-html": "^1.1.0",
"stylelint-config-prettier": "^9.0.5",
- "stylelint-config-recommended": "^11.0.0",
- "stylelint-config-standard": "^31.0.0",
- "stylelint-order": "^6.0.3",
- "terser": "^5.16.6",
- "typescript": "5.0.2",
+ "stylelint-config-recommended": "^10.0.1",
+ "stylelint-config-standard": "^30.0.1",
+ "stylelint-order": "^6.0.2",
+ "terser": "^5.16.5",
+ "typescript": "4.9.5",
"unplugin-auto-import": "^0.15.1",
"unplugin-element-plus": "^0.7.0",
"unplugin-vue-components": "^0.24.1",
- "vite": "4.2.1",
+ "vite": "4.1.4",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-ejs": "^1.6.4",
"vite-plugin-eslint": "^1.8.1",
@@ -128,7 +125,7 @@
"windicss": "^3.5.6"
},
"engines": {
- "node": ">=16.18.0"
+ "node": ">=16.0.0"
},
"license": "MIT",
"repository": {
diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts
index c0e51fab..477d6729 100644
--- a/src/api/bpm/definition/index.ts
+++ b/src/api/bpm/definition/index.ts
@@ -1,19 +1,19 @@
import request from '@/config/axios'
-export const getProcessDefinitionBpmnXML = async (id: number) => {
+export const getProcessDefinitionBpmnXMLApi = async (id: number) => {
return await request.get({
url: '/bpm/process-definition/get-bpmn-xml?id=' + id
})
}
-export const getProcessDefinitionPage = async (params) => {
+export const getProcessDefinitionPageApi = async (params) => {
return await request.get({
url: '/bpm/process-definition/page',
params
})
}
-export const getProcessDefinitionList = async (params) => {
+export const getProcessDefinitionListApi = async (params) => {
return await request.get({
url: '/bpm/process-definition/list',
params
diff --git a/src/api/bpm/form/index.ts b/src/api/bpm/form/index.ts
index 142ed24c..c745201f 100644
--- a/src/api/bpm/form/index.ts
+++ b/src/api/bpm/form/index.ts
@@ -11,7 +11,7 @@ export type FormVO = {
}
// 创建工作流的表单定义
-export const createForm = async (data: FormVO) => {
+export const createFormApi = async (data: FormVO) => {
return await request.post({
url: '/bpm/form/create',
data: data
@@ -19,7 +19,7 @@ export const createForm = async (data: FormVO) => {
}
// 更新工作流的表单定义
-export const updateForm = async (data: FormVO) => {
+export const updateFormApi = async (data: FormVO) => {
return await request.put({
url: '/bpm/form/update',
data: data
@@ -27,21 +27,21 @@ export const updateForm = async (data: FormVO) => {
}
// 删除工作流的表单定义
-export const deleteForm = async (id: number) => {
+export const deleteFormApi = async (id: number) => {
return await request.delete({
url: '/bpm/form/delete?id=' + id
})
}
// 获得工作流的表单定义
-export const getForm = async (id: number) => {
+export const getFormApi = async (id: number) => {
return await request.get({
url: '/bpm/form/get?id=' + id
})
}
// 获得工作流的表单定义分页
-export const getFormPage = async (params) => {
+export const getFormPageApi = async (params) => {
return await request.get({
url: '/bpm/form/page',
params
@@ -49,7 +49,7 @@ export const getFormPage = async (params) => {
}
// 获得动态表单的精简列表
-export const getSimpleFormList = async () => {
+export const getSimpleFormsApi = async () => {
return await request.get({
url: '/bpm/form/list-all-simple'
})
diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts
index 2e1d4e64..0335a3db 100644
--- a/src/api/bpm/model/index.ts
+++ b/src/api/bpm/model/index.ts
@@ -25,20 +25,20 @@ export type ModelVO = {
bpmnXml: string
}
-export const getModelPage = async (params) => {
+export const getModelPageApi = async (params) => {
return await request.get({ url: '/bpm/model/page', params })
}
-export const getModel = async (id: number) => {
+export const getModelApi = async (id: number) => {
return await request.get({ url: '/bpm/model/get?id=' + id })
}
-export const updateModel = async (data: ModelVO) => {
+export const updateModelApi = async (data: ModelVO) => {
return await request.put({ url: '/bpm/model/update', data: data })
}
// 任务状态修改
-export const updateModelState = async (id: number, state: number) => {
+export const updateModelStateApi = async (id: number, state: number) => {
const data = {
id: id,
state: state
@@ -46,14 +46,14 @@ export const updateModelState = async (id: number, state: number) => {
return await request.put({ url: '/bpm/model/update-state', data: data })
}
-export const createModel = async (data: ModelVO) => {
+export const createModelApi = async (data: ModelVO) => {
return await request.post({ url: '/bpm/model/create', data: data })
}
-export const deleteModel = async (id: number) => {
+export const deleteModelApi = async (id: number) => {
return await request.delete({ url: '/bpm/model/delete?id=' + id })
}
-export const deployModel = async (id: number) => {
+export const deployModelApi = async (id: number) => {
return await request.post({ url: '/bpm/model/deploy?id=' + id })
}
diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts
index 95591ae3..d48253c3 100644
--- a/src/api/bpm/processInstance/index.ts
+++ b/src/api/bpm/processInstance/index.ts
@@ -4,7 +4,6 @@ export type Task = {
id: string
name: string
}
-
export type ProcessInstanceVO = {
id: number
name: string
diff --git a/src/api/bpm/userGroup/index.ts b/src/api/bpm/userGroup/index.ts
index 035762bf..88ee9619 100644
--- a/src/api/bpm/userGroup/index.ts
+++ b/src/api/bpm/userGroup/index.ts
@@ -11,7 +11,7 @@ export type UserGroupVO = {
}
// 创建用户组
-export const createUserGroup = async (data: UserGroupVO) => {
+export const createUserGroupApi = async (data: UserGroupVO) => {
return await request.post({
url: '/bpm/user-group/create',
data: data
@@ -19,7 +19,7 @@ export const createUserGroup = async (data: UserGroupVO) => {
}
// 更新用户组
-export const updateUserGroup = async (data: UserGroupVO) => {
+export const updateUserGroupApi = async (data: UserGroupVO) => {
return await request.put({
url: '/bpm/user-group/update',
data: data
@@ -27,21 +27,21 @@ export const updateUserGroup = async (data: UserGroupVO) => {
}
// 删除用户组
-export const deleteUserGroup = async (id: number) => {
+export const deleteUserGroupApi = async (id: number) => {
return await request.delete({ url: '/bpm/user-group/delete?id=' + id })
}
// 获得用户组
-export const getUserGroup = async (id: number) => {
+export const getUserGroupApi = async (id: number) => {
return await request.get({ url: '/bpm/user-group/get?id=' + id })
}
// 获得用户组分页
-export const getUserGroupPage = async (params) => {
+export const getUserGroupPageApi = async (params) => {
return await request.get({ url: '/bpm/user-group/page', params })
}
// 获取用户组精简信息列表
-export const getSimpleUserGroupList = async (): Promise
=> {
+export const listSimpleUserGroupsApi = async () => {
return await request.get({ url: '/bpm/user-group/list-all-simple' })
}
diff --git a/src/api/infra/apiAccessLog/index.ts b/src/api/infra/apiAccessLog/index.ts
index c6b4b45f..b46199e4 100644
--- a/src/api/infra/apiAccessLog/index.ts
+++ b/src/api/infra/apiAccessLog/index.ts
@@ -19,12 +19,32 @@ export interface ApiAccessLogVO {
createTime: Date
}
+export interface ApiAccessLogPageReqVO extends PageParam {
+ userId?: number
+ userType?: number
+ applicationName?: string
+ requestUrl?: string
+ beginTime?: Date[]
+ duration?: number
+ resultCode?: number
+}
+
+export interface ApiAccessLogExportReqVO {
+ userId?: number
+ userType?: number
+ applicationName?: string
+ requestUrl?: string
+ beginTime?: Date[]
+ duration?: number
+ resultCode?: number
+}
+
// 查询列表API 访问日志
-export const getApiAccessLogPage = (params: PageParam) => {
+export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => {
return request.get({ url: '/infra/api-access-log/page', params })
}
// 导出API 访问日志
-export const exportApiAccessLog = (params) => {
+export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => {
return request.download({ url: '/infra/api-access-log/export-excel', params })
}
diff --git a/src/api/infra/apiErrorLog/index.ts b/src/api/infra/apiErrorLog/index.ts
index 59ee2143..06515c36 100644
--- a/src/api/infra/apiErrorLog/index.ts
+++ b/src/api/infra/apiErrorLog/index.ts
@@ -27,20 +27,38 @@ export interface ApiErrorLogVO {
createTime: Date
}
+export interface ApiErrorLogPageReqVO extends PageParam {
+ userId?: number
+ userType?: number
+ applicationName?: string
+ requestUrl?: string
+ exceptionTime?: Date[]
+ processStatus: number
+}
+
+export interface ApiErrorLogExportReqVO {
+ userId?: number
+ userType?: number
+ applicationName?: string
+ requestUrl?: string
+ exceptionTime?: Date[]
+ processStatus: number
+}
+
// 查询列表API 访问日志
-export const getApiErrorLogPage = (params: PageParam) => {
+export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => {
return request.get({ url: '/infra/api-error-log/page', params })
}
// 更新 API 错误日志的处理状态
-export const updateApiErrorLogPage = (id: number, processStatus: number) => {
+export const updateApiErrorLogPageApi = (id: number, processStatus: number) => {
return request.put({
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
})
}
// 导出API 访问日志
-export const exportApiErrorLog = (params) => {
+export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => {
return request.download({
url: '/infra/api-error-log/export-excel',
params
diff --git a/src/api/infra/codegen/index.ts b/src/api/infra/codegen/index.ts
index 64701efe..54f00ff0 100644
--- a/src/api/infra/codegen/index.ts
+++ b/src/api/infra/codegen/index.ts
@@ -1,123 +1,57 @@
import request from '@/config/axios'
-
-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[]
-}
+import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types'
// 查询列表代码生成表定义
-export const getCodegenTablePage = (params: PageParam) => {
+export const getCodegenTablePageApi = (params) => {
return request.get({ url: '/infra/codegen/table/page', params })
}
// 查询详情代码生成表定义
-export const getCodegenTable = (id: number) => {
+export const getCodegenTableApi = (id: number) => {
return request.get({ url: '/infra/codegen/detail?tableId=' + id })
}
// 新增代码生成表定义
-export const createCodegenTable = (data: CodegenCreateListReqVO) => {
+export const createCodegenTableApi = (data: CodegenCreateListReqVO) => {
return request.post({ url: '/infra/codegen/create', data })
}
// 修改代码生成表定义
-export const updateCodegenTable = (data: CodegenUpdateReqVO) => {
+export const updateCodegenTableApi = (data: CodegenUpdateReqVO) => {
return request.put({ url: '/infra/codegen/update', data })
}
// 基于数据库的表结构,同步数据库的表和字段定义
-export const syncCodegenFromDB = (id: number) => {
+export const syncCodegenFromDBApi = (id: number) => {
return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
}
// 基于 SQL 建表语句,同步数据库的表和字段定义
-export const syncCodegenFromSQL = (id: number, sql: string) => {
+export const syncCodegenFromSQLApi = (id: number, sql: string) => {
return request.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
}
// 预览生成代码
-export const previewCodegen = (id: number) => {
+export const previewCodegenApi = (id: number) => {
return request.get({ url: '/infra/codegen/preview?tableId=' + id })
}
// 下载生成代码
-export const downloadCodegen = (id: number) => {
+export const downloadCodegenApi = (id: number) => {
return request.download({ url: '/infra/codegen/download?tableId=' + id })
}
// 获得表定义
-export const getSchemaTableList = (params) => {
+export const getSchemaTableListApi = (params) => {
return request.get({ url: '/infra/codegen/db/table/list', params })
}
// 基于数据库的表结构,创建代码生成器的表定义
-export const createCodegenList = (data) => {
+export const createCodegenListApi = (data) => {
return request.post({ url: '/infra/codegen/create-list', data })
}
// 删除代码生成表定义
-export const deleteCodegenTable = (id: number) => {
+export const deleteCodegenTableApi = (id: number) => {
return request.delete({ url: '/infra/codegen/delete?tableId=' + id })
}
diff --git a/src/api/infra/codegen/types.ts b/src/api/infra/codegen/types.ts
new file mode 100644
index 00000000..be6a66ed
--- /dev/null
+++ b/src/api/infra/codegen/types.ts
@@ -0,0 +1,61 @@
+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[]
+}
diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts
index 07fb52fd..c6d3772e 100644
--- a/src/api/infra/config/index.ts
+++ b/src/api/infra/config/index.ts
@@ -12,6 +12,13 @@ export interface ConfigVO {
createTime: Date
}
+export interface ConfigExportReqVO {
+ name?: string
+ key?: string
+ type?: number
+ createTime?: Date[]
+}
+
// 查询参数列表
export const getConfigPage = (params: PageParam) => {
return request.get({ url: '/infra/config/page', params })
@@ -43,6 +50,6 @@ export const deleteConfig = (id: number) => {
}
// 导出参数
-export const exportConfigApi = (params) => {
+export const exportConfigApi = (params: ConfigExportReqVO) => {
return request.download({ url: '/infra/config/export', params })
}
diff --git a/src/api/infra/dataSourceConfig/index.ts b/src/api/infra/dataSourceConfig/index.ts
index b413f345..c0f9f624 100644
--- a/src/api/infra/dataSourceConfig/index.ts
+++ b/src/api/infra/dataSourceConfig/index.ts
@@ -1,35 +1,35 @@
import request from '@/config/axios'
export interface DataSourceConfigVO {
- id: number | undefined
+ id: number
name: string
url: string
username: 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 createDataSourceConfig = (data: DataSourceConfigVO) => {
+export const createDataSourceConfigApi = (data: DataSourceConfigVO) => {
return request.post({ url: '/infra/data-source-config/create', data })
}
// 修改数据源配置
-export const updateDataSourceConfig = (data: DataSourceConfigVO) => {
+export const updateDataSourceConfigApi = (data: DataSourceConfigVO) => {
return request.put({ url: '/infra/data-source-config/update', data })
}
// 删除数据源配置
-export const deleteDataSourceConfig = (id: number) => {
+export const deleteDataSourceConfigApi = (id: number) => {
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' })
-}
diff --git a/src/api/infra/fileConfig/index.ts b/src/api/infra/fileConfig/index.ts
index b72f18b7..9a4f625c 100644
--- a/src/api/infra/fileConfig/index.ts
+++ b/src/api/infra/fileConfig/index.ts
@@ -13,7 +13,6 @@ export interface FileClientConfig {
accessSecret?: string
domain: string
}
-
export interface FileConfigVO {
id: number
name: string
@@ -25,37 +24,43 @@ export interface FileConfigVO {
createTime: Date
}
+export interface FileConfigPageReqVO extends PageParam {
+ name?: string
+ storage?: number
+ createTime?: Date[]
+}
+
// 查询文件配置列表
-export const getFileConfigPage = (params: PageParam) => {
+export const getFileConfigPageApi = (params: FileConfigPageReqVO) => {
return request.get({ url: '/infra/file-config/page', params })
}
// 查询文件配置详情
-export const getFileConfig = (id: number) => {
+export const getFileConfigApi = (id: number) => {
return request.get({ url: '/infra/file-config/get?id=' + id })
}
// 更新文件配置为主配置
-export const updateFileConfigMaster = (id: number) => {
+export const updateFileConfigMasterApi = (id: number) => {
return request.put({ url: '/infra/file-config/update-master?id=' + id })
}
// 新增文件配置
-export const createFileConfig = (data: FileConfigVO) => {
+export const createFileConfigApi = (data: FileConfigVO) => {
return request.post({ url: '/infra/file-config/create', data })
}
// 修改文件配置
-export const updateFileConfig = (data: FileConfigVO) => {
+export const updateFileConfigApi = (data: FileConfigVO) => {
return request.put({ url: '/infra/file-config/update', data })
}
// 删除文件配置
-export const deleteFileConfig = (id: number) => {
+export const deleteFileConfigApi = (id: number) => {
return request.delete({ url: '/infra/file-config/delete?id=' + id })
}
// 测试文件配置
-export const testFileConfig = (id: number) => {
+export const testFileConfigApi = (id: number) => {
return request.get({ url: '/infra/file-config/test?id=' + id })
}
diff --git a/src/api/infra/fileList/index.ts b/src/api/infra/fileList/index.ts
new file mode 100644
index 00000000..48b3c991
--- /dev/null
+++ b/src/api/infra/fileList/index.ts
@@ -0,0 +1,28 @@
+import request from '@/config/axios'
+
+export interface FileVO {
+ id: number
+ configId: number
+ path: string
+ name: string
+ url: string
+ size: string
+ type: string
+ createTime: Date
+}
+
+export interface FilePageReqVO extends PageParam {
+ path?: string
+ type?: string
+ createTime?: Date[]
+}
+
+// 查询文件列表
+export const getFilePageApi = (params: FilePageReqVO) => {
+ return request.get({ url: '/infra/file/page', params })
+}
+
+// 删除文件
+export const deleteFileApi = (id: number) => {
+ return request.delete({ url: '/infra/file/delete?id=' + id })
+}
diff --git a/src/api/infra/job/index.ts b/src/api/infra/job/index.ts
index c1398d07..63f15da0 100644
--- a/src/api/infra/job/index.ts
+++ b/src/api/infra/job/index.ts
@@ -13,38 +13,50 @@ export interface JobVO {
createTime: Date
}
+export interface JobPageReqVO extends PageParam {
+ name?: string
+ status?: number
+ handlerName?: string
+}
+
+export interface JobExportReqVO {
+ name?: string
+ status?: number
+ handlerName?: string
+}
+
// 任务列表
-export const getJobPage = (params: PageParam) => {
+export const getJobPageApi = (params: JobPageReqVO) => {
return request.get({ url: '/infra/job/page', params })
}
// 任务详情
-export const getJob = (id: number) => {
+export const getJobApi = (id: number) => {
return request.get({ url: '/infra/job/get?id=' + id })
}
// 新增任务
-export const createJob = (data: JobVO) => {
+export const createJobApi = (data: JobVO) => {
return request.post({ url: '/infra/job/create', data })
}
// 修改定时任务调度
-export const updateJob = (data: JobVO) => {
+export const updateJobApi = (data: JobVO) => {
return request.put({ url: '/infra/job/update', data })
}
// 删除定时任务调度
-export const deleteJob = (id: number) => {
+export const deleteJobApi = (id: number) => {
return request.delete({ url: '/infra/job/delete?id=' + id })
}
// 导出定时任务调度
-export const exportJob = (params) => {
+export const exportJobApi = (params: JobExportReqVO) => {
return request.download({ url: '/infra/job/export-excel', params })
}
// 任务状态修改
-export const updateJobStatus = (id: number, status: number) => {
+export const updateJobStatusApi = (id: number, status: number) => {
const params = {
id,
status
@@ -58,6 +70,6 @@ export const runJobApi = (id: number) => {
}
// 获得定时任务的下 n 次执行时间
-export const getJobNextTimes = (id: number) => {
+export const getJobNextTimesApi = (id: number) => {
return request.get({ url: '/infra/job/get_next_times?id=' + id })
}
diff --git a/src/api/infra/jobLog/index.ts b/src/api/infra/jobLog/index.ts
index f429cd9e..84b74fbd 100644
--- a/src/api/infra/jobLog/index.ts
+++ b/src/api/infra/jobLog/index.ts
@@ -14,18 +14,34 @@ export interface JobLogVO {
createTime: string
}
+export interface JobLogPageReqVO extends PageParam {
+ jobId?: number
+ handlerName?: string
+ beginTime?: string
+ endTime?: string
+ status?: number
+}
+
+export interface JobLogExportReqVO {
+ jobId?: number
+ handlerName?: string
+ beginTime?: string
+ endTime?: string
+ status?: number
+}
+
// 任务日志列表
-export const getJobLogPage = (params: PageParam) => {
+export const getJobLogPageApi = (params: JobLogPageReqVO) => {
return request.get({ url: '/infra/job-log/page', params })
}
// 任务日志详情
-export const getJobLog = (id: number) => {
+export const getJobLogApi = (id: number) => {
return request.get({ url: '/infra/job-log/get?id=' + id })
}
// 导出定时任务日志
-export const exportJobLog = (params) => {
+export const exportJobLogApi = (params: JobLogExportReqVO) => {
return request.download({
url: '/infra/job-log/export-excel',
params
diff --git a/src/api/mp/account/index.ts b/src/api/mp/account/index.ts
index d641ef3c..cbdb1422 100644
--- a/src/api/mp/account/index.ts
+++ b/src/api/mp/account/index.ts
@@ -1,10 +1,5 @@
import request from '@/config/axios'
-export interface AccountVO {
- id?: number
- name: string
-}
-
// 创建公众号账号
export const createAccount = async (data) => {
return await request.post({ url: '/mp/account/create', data })
@@ -31,7 +26,7 @@ export const getAccountPage = async (query) => {
}
// 获取公众号账号精简信息列表
-export const getSimpleAccountList = async () => {
+export const getSimpleAccounts = async () => {
return request.get({ url: '/mp/account/list-all-simple' })
}
diff --git a/src/api/mp/message/index.ts b/src/api/mp/message/index.ts
index ad9b95dd..8b7d3cbd 100644
--- a/src/api/mp/message/index.ts
+++ b/src/api/mp/message/index.ts
@@ -1,7 +1,7 @@
import request from '@/config/axios'
// 获得公众号消息分页
-export const getMessagePage = (query: PageParam) => {
+export const getMessagePage = (query) => {
return request.get({
url: '/mp/message/page',
params: query
diff --git a/src/api/mp/tag/index.ts b/src/api/mp/tag/index.ts
index 50183a51..e681e2e1 100644
--- a/src/api/mp/tag/index.ts
+++ b/src/api/mp/tag/index.ts
@@ -1,14 +1,7 @@
import request from '@/config/axios'
-export interface TagVO {
- id?: number
- name: string
- accountId: number
- createTime: Date
-}
-
// 创建公众号标签
-export const createTag = (data: TagVO) => {
+export const createTag = (data) => {
return request.post({
url: '/mp/tag/create',
data: data
@@ -16,7 +9,7 @@ export const createTag = (data: TagVO) => {
}
// 更新公众号标签
-export const updateTag = (data: TagVO) => {
+export const updateTag = (data) => {
return request.put({
url: '/mp/tag/update',
data: data
@@ -24,21 +17,21 @@ export const updateTag = (data: TagVO) => {
}
// 删除公众号标签
-export const deleteTag = (id: number) => {
+export const deleteTag = (id) => {
return request.delete({
url: '/mp/tag/delete?id=' + id
})
}
// 获得公众号标签
-export const getTag = (id: number) => {
+export const getTag = (id) => {
return request.get({
url: '/mp/tag/get?id=' + id
})
}
// 获得公众号标签分页
-export const getTagPage = (query: PageParam) => {
+export const getTagPage = (query) => {
return request.get({
url: '/mp/tag/page',
params: query
@@ -46,14 +39,14 @@ export const getTagPage = (query: PageParam) => {
}
// 获取公众号标签精简信息列表
-export const getSimpleTagList = () => {
+export const getSimpleTags = () => {
return request.get({
url: '/mp/tag/list-all-simple'
})
}
// 同步公众号标签
-export const syncTag = (accountId: number) => {
+export const syncTag = (accountId) => {
return request.post({
url: '/mp/tag/sync?accountId=' + accountId
})
diff --git a/src/api/pay/merchant/index.ts b/src/api/pay/merchant/index.ts
index bfb8f5e4..b4b6ba51 100644
--- a/src/api/pay/merchant/index.ts
+++ b/src/api/pay/merchant/index.ts
@@ -29,17 +29,17 @@ export interface MerchantExportReqVO {
}
// 查询列表支付商户
-export const getMerchantPage = (params: MerchantPageReqVO) => {
+export const getMerchantPageApi = (params: MerchantPageReqVO) => {
return request.get({ url: '/pay/merchant/page', params })
}
// 查询详情支付商户
-export const getMerchant = (id: number) => {
+export const getMerchantApi = (id: number) => {
return request.get({ url: '/pay/merchant/get?id=' + id })
}
// 根据商户名称搜索商户列表
-export const getMerchantListByName = (name: string) => {
+export const getMerchantListByNameApi = (name: string) => {
return request.get({
url: '/pay/merchant/list-by-name?id=',
params: {
@@ -49,27 +49,26 @@ export const getMerchantListByName = (name: string) => {
}
// 新增支付商户
-export const createMerchant = (data: MerchantVO) => {
+export const createMerchantApi = (data: MerchantVO) => {
return request.post({ url: '/pay/merchant/create', data })
}
// 修改支付商户
-export const updateMerchant = (data: MerchantVO) => {
+export const updateMerchantApi = (data: MerchantVO) => {
return request.put({ url: '/pay/merchant/update', data })
}
// 删除支付商户
-export const deleteMerchant = (id: number) => {
+export const deleteMerchantApi = (id: number) => {
return request.delete({ url: '/pay/merchant/delete?id=' + id })
}
// 导出支付商户
-export const exportMerchant = (params: MerchantExportReqVO) => {
+export const exportMerchantApi = (params: MerchantExportReqVO) => {
return request.download({ url: '/pay/merchant/export-excel', params })
}
-
// 支付商户状态修改
-export const updateMerchantStatus = (id: number, status: number) => {
+export const changeMerchantStatusApi = (id: number, status: number) => {
const data = {
id,
status
diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts
index e91a4997..7d8a9d7c 100644
--- a/src/api/system/area/index.ts
+++ b/src/api/system/area/index.ts
@@ -1,11 +1,15 @@
-import request from '@/config/axios'
+import request from '@/config/axios/request'
// 获得地区树
-export const getAreaTree = async () => {
- return await request.get({ url: '/system/area/tree' })
+export const getAreaTree = async (content?: any) => {
+ return await request.get({
+ url: '/system/area/tree',
+ params: content
+ })
}
-
// 获得 IP 对应的地区名
-export const getAreaByIp = async (ip: string) => {
- return await request.get({ url: '/system/area/get-by-ip?ip=' + ip })
+export const getAreaByIp = async (ip) => {
+ return await request.get({
+ url: '/system/area/get-by-ip?ip=' + ip
+ })
}
diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts
index e9c31fd7..d66de3f1 100644
--- a/src/api/system/dept/index.ts
+++ b/src/api/system/dept/index.ts
@@ -18,7 +18,7 @@ export interface DeptPageReqVO {
}
// 查询部门(精简)列表
-export const getSimpleDeptList = async (): Promise => {
+export const listSimpleDeptApi = async () => {
return await request.get({ url: '/system/dept/list-all-simple' })
}
diff --git a/src/api/system/dict/dict.data.ts b/src/api/system/dict/dict.data.ts
index 6d981326..fd97a2dc 100644
--- a/src/api/system/dict/dict.data.ts
+++ b/src/api/system/dict/dict.data.ts
@@ -1,49 +1,36 @@
import request from '@/config/axios'
-
-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
-}
+import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types'
// 查询字典数据(精简)列表
-export const listSimpleDictData = () => {
+export const listSimpleDictDataApi = () => {
return request.get({ url: '/system/dict-data/list-all-simple' })
}
// 查询字典数据列表
-export const getDictDataPage = (params: PageParam) => {
+export const getDictDataPageApi = (params: DictDataPageReqVO) => {
return request.get({ url: '/system/dict-data/page', params })
}
// 查询字典数据详情
-export const getDictData = (id: number) => {
+export const getDictDataApi = (id: number) => {
return request.get({ url: '/system/dict-data/get?id=' + id })
}
// 新增字典数据
-export const createDictData = (data: DictDataVO) => {
+export const createDictDataApi = (data: DictDataVO) => {
return request.post({ url: '/system/dict-data/create', data })
}
// 修改字典数据
-export const updateDictData = (data: DictDataVO) => {
+export const updateDictDataApi = (data: DictDataVO) => {
return request.put({ url: '/system/dict-data/update', data })
}
// 删除字典数据
-export const deleteDictData = (id: number) => {
+export const deleteDictDataApi = (id: number) => {
return request.delete({ url: '/system/dict-data/delete?id=' + id })
}
-
// 导出字典类型数据
-export const exportDictDataApi = (params) => {
+export const exportDictDataApi = (params: DictDataExportReqVO) => {
return request.get({ url: '/system/dict-data/export', params })
}
diff --git a/src/api/system/dict/dict.type.ts b/src/api/system/dict/dict.type.ts
index ed2969f1..22e6411e 100644
--- a/src/api/system/dict/dict.type.ts
+++ b/src/api/system/dict/dict.type.ts
@@ -1,44 +1,36 @@
import request from '@/config/axios'
-
-export type DictTypeVO = {
- id: number | undefined
- name: string
- type: string
- status: number
- remark: string
- createTime: Date
-}
+import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types'
// 查询字典(精简)列表
-export const getSimpleDictTypeList = () => {
+export const listSimpleDictTypeApi = () => {
return request.get({ url: '/system/dict-type/list-all-simple' })
}
// 查询字典列表
-export const getDictTypePage = (params: PageParam) => {
+export const getDictTypePageApi = (params: DictTypePageReqVO) => {
return request.get({ url: '/system/dict-type/page', params })
}
// 查询字典详情
-export const getDictType = (id: number) => {
+export const getDictTypeApi = (id: number) => {
return request.get({ url: '/system/dict-type/get?id=' + id })
}
// 新增字典
-export const createDictType = (data: DictTypeVO) => {
+export const createDictTypeApi = (data: DictTypeVO) => {
return request.post({ url: '/system/dict-type/create', data })
}
// 修改字典
-export const updateDictType = (data: DictTypeVO) => {
+export const updateDictTypeApi = (data: DictTypeVO) => {
return request.put({ url: '/system/dict-type/update', data })
}
// 删除字典
-export const deleteDictType = (id: number) => {
+export const deleteDictTypeApi = (id: number) => {
return request.delete({ url: '/system/dict-type/delete?id=' + id })
}
// 导出字典类型
-export const exportDictType = (params) => {
+export const exportDictTypeApi = (params: DictTypeExportReqVO) => {
return request.get({ url: '/system/dict-type/export', params })
}
diff --git a/src/api/system/dict/types.ts b/src/api/system/dict/types.ts
new file mode 100644
index 00000000..b630dccb
--- /dev/null
+++ b/src/api/system/dict/types.ts
@@ -0,0 +1,46 @@
+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
+}
diff --git a/src/api/system/errorCode/index.ts b/src/api/system/errorCode/index.ts
index 65eabd3a..0e000794 100644
--- a/src/api/system/errorCode/index.ts
+++ b/src/api/system/errorCode/index.ts
@@ -1,10 +1,10 @@
import request from '@/config/axios'
export interface ErrorCodeVO {
- id: number | undefined
+ id: number
type: number
applicationName: string
- code: number | undefined
+ code: number
message: string
memo: string
createTime: Date
diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts
index f275c3e2..cadaeaf3 100644
--- a/src/api/system/loginLog/index.ts
+++ b/src/api/system/loginLog/index.ts
@@ -13,12 +13,18 @@ export interface LoginLogVO {
createTime: Date
}
-// 查询登录日志列表
-export const getLoginLogPage = (params: PageParam) => {
- return request.get({ url: '/system/login-log/page', params })
+export interface LoginLogReqVO extends PageParam {
+ userIp?: string
+ username?: string
+ status?: boolean
+ createTime?: Date[]
}
+// 查询登录日志列表
+export const getLoginLogPageApi = (params: LoginLogReqVO) => {
+ return request.get({ url: '/system/login-log/page', params })
+}
// 导出登录日志
-export const exportLoginLog = (params) => {
+export const exportLoginLogApi = (params: LoginLogReqVO) => {
return request.download({ url: '/system/login-log/export', params })
}
diff --git a/src/api/system/mail/account/index.ts b/src/api/system/mail/account/index.ts
index 9e10c92a..8b662a70 100644
--- a/src/api/system/mail/account/index.ts
+++ b/src/api/system/mail/account/index.ts
@@ -10,32 +10,37 @@ export interface MailAccountVO {
sslEnable: boolean
}
+export interface MailAccountPageReqVO extends PageParam {
+ mail?: string
+ username?: string
+}
+
// 查询邮箱账号列表
-export const getMailAccountPage = async (params: PageParam) => {
+export const getMailAccountPageApi = async (params: MailAccountPageReqVO) => {
return await request.get({ url: '/system/mail-account/page', params })
}
// 查询邮箱账号详情
-export const getMailAccount = async (id: number) => {
+export const getMailAccountApi = async (id: number) => {
return await request.get({ url: '/system/mail-account/get?id=' + id })
}
// 新增邮箱账号
-export const createMailAccount = async (data: MailAccountVO) => {
+export const createMailAccountApi = async (data: MailAccountVO) => {
return await request.post({ url: '/system/mail-account/create', data })
}
// 修改邮箱账号
-export const updateMailAccount = async (data: MailAccountVO) => {
+export const updateMailAccountApi = async (data: MailAccountVO) => {
return await request.put({ url: '/system/mail-account/update', data })
}
// 删除邮箱账号
-export const deleteMailAccount = async (id: number) => {
+export const deleteMailAccountApi = async (id: number) => {
return await request.delete({ url: '/system/mail-account/delete?id=' + id })
}
// 获得邮箱账号精简列表
-export const getSimpleMailAccountList = async () => {
+export const getSimpleMailAccounts = async () => {
return request.get({ url: '/system/mail-account/list-all-simple' })
}
diff --git a/src/api/system/mail/log/index.ts b/src/api/system/mail/log/index.ts
index 13172a72..9c6c60eb 100644
--- a/src/api/system/mail/log/index.ts
+++ b/src/api/system/mail/log/index.ts
@@ -19,12 +19,22 @@ export interface MailLogVO {
sendException: string
}
+export interface MailLogPageReqVO extends PageParam {
+ userId?: number
+ userType?: number
+ toMail?: string
+ accountId?: number
+ templateId?: number
+ sendStatus?: number
+ sendTime?: Date[]
+}
+
// 查询邮件日志列表
-export const getMailLogPage = async (params: PageParam) => {
+export const getMailLogPageApi = async (params: MailLogPageReqVO) => {
return await request.get({ url: '/system/mail-log/page', params })
}
// 查询邮件日志详情
-export const getMailLog = async (id: number) => {
+export const getMailLogApi = async (id: number) => {
return await request.get({ url: '/system/mail-log/get?id=' + id })
}
diff --git a/src/api/system/mail/template/index.ts b/src/api/system/mail/template/index.ts
index fb7ce5ea..c044ddd4 100644
--- a/src/api/system/mail/template/index.ts
+++ b/src/api/system/mail/template/index.ts
@@ -13,6 +13,14 @@ export interface MailTemplateVO {
remark: string
}
+export interface MailTemplatePageReqVO extends PageParam {
+ name?: string
+ code?: string
+ accountId?: number
+ status?: number
+ createTime?: Date[]
+}
+
export interface MailSendReqVO {
mail: string
templateCode: string
@@ -20,31 +28,31 @@ export interface MailSendReqVO {
}
// 查询邮件模版列表
-export const getMailTemplatePage = async (params: PageParam) => {
+export const getMailTemplatePageApi = async (params: MailTemplatePageReqVO) => {
return await request.get({ url: '/system/mail-template/page', params })
}
// 查询邮件模版详情
-export const getMailTemplate = async (id: number) => {
+export const getMailTemplateApi = async (id: number) => {
return await request.get({ url: '/system/mail-template/get?id=' + id })
}
// 新增邮件模版
-export const createMailTemplate = async (data: MailTemplateVO) => {
+export const createMailTemplateApi = async (data: MailTemplateVO) => {
return await request.post({ url: '/system/mail-template/create', data })
}
// 修改邮件模版
-export const updateMailTemplate = async (data: MailTemplateVO) => {
+export const updateMailTemplateApi = async (data: MailTemplateVO) => {
return await request.put({ url: '/system/mail-template/update', data })
}
// 删除邮件模版
-export const deleteMailTemplate = async (id: number) => {
+export const deleteMailTemplateApi = async (id: number) => {
return await request.delete({ url: '/system/mail-template/delete?id=' + id })
}
// 发送邮件
-export const sendMail = (data: MailSendReqVO) => {
+export const sendMailApi = (data: MailSendReqVO) => {
return request.post({ url: '/system/mail-template/send-mail', data })
}
diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts
index 13736215..5913972b 100644
--- a/src/api/system/menu/index.ts
+++ b/src/api/system/menu/index.ts
@@ -18,13 +18,18 @@ export interface MenuVO {
createTime: Date
}
+export interface MenuPageReqVO {
+ name?: string
+ status?: number
+}
+
// 查询菜单(精简)列表
-export const getSimpleMenusList = () => {
+export const listSimpleMenusApi = () => {
return request.get({ url: '/system/menu/list-all-simple' })
}
// 查询菜单列表
-export const getMenuList = (params) => {
+export const getMenuListApi = (params: MenuPageReqVO) => {
return request.get({ url: '/system/menu/list', params })
}
@@ -34,16 +39,16 @@ export const getMenuApi = (id: number) => {
}
// 新增菜单
-export const createMenu = (data: MenuVO) => {
+export const createMenuApi = (data: MenuVO) => {
return request.post({ url: '/system/menu/create', data })
}
// 修改菜单
-export const updateMenu = (data: MenuVO) => {
+export const updateMenuApi = (data: MenuVO) => {
return request.put({ url: '/system/menu/update', data })
}
// 删除菜单
-export const deleteMenu = (id: number) => {
+export const deleteMenuApi = (id: number) => {
return request.delete({ url: '/system/menu/delete?id=' + id })
}
diff --git a/src/api/system/notify/message/index.ts b/src/api/system/notify/message/index.ts
index e24c3f8c..a42d75c2 100644
--- a/src/api/system/notify/message/index.ts
+++ b/src/api/system/notify/message/index.ts
@@ -15,13 +15,31 @@ export interface NotifyMessageVO {
readTime: Date
}
+export interface NotifyMessagePageReqVO extends PageParam {
+ userId?: number
+ userType?: number
+ templateCode?: string
+ templateType?: number
+ createTime?: Date[]
+}
+
+export interface NotifyMessageMyPageReqVO extends PageParam {
+ readStatus?: boolean
+ createTime?: Date[]
+}
+
// 查询站内信消息列表
-export const getNotifyMessagePage = async (params: PageParam) => {
+export const getNotifyMessagePageApi = async (params: NotifyMessagePageReqVO) => {
return await request.get({ url: '/system/notify-message/page', params })
}
+// 查询站内信消息详情
+export const getNotifyMessageApi = async (id: number) => {
+ return await request.get({ url: '/system/notify-message/get?id=' + id })
+}
+
// 获得我的站内信分页
-export const getMyNotifyMessagePage = async (params: PageParam) => {
+export const getMyNotifyMessagePage = async (params: NotifyMessageMyPageReqVO) => {
return await request.get({ url: '/system/notify-message/my-page', params })
}
diff --git a/src/api/system/oauth2/client.ts b/src/api/system/oauth2/client.ts
index 6f71acad..4c06386d 100644
--- a/src/api/system/oauth2/client.ts
+++ b/src/api/system/oauth2/client.ts
@@ -21,27 +21,31 @@ export interface OAuth2ClientVO {
createTime: Date
}
-// 查询 OAuth2 客户端的列表
-export const getOAuth2ClientPage = (params: PageParam) => {
+export interface OAuth2ClientPageReqVO extends PageParam {
+ name?: string
+ status?: number
+}
+// 查询 OAuth2列表
+export const getOAuth2ClientPageApi = (params: OAuth2ClientPageReqVO) => {
return request.get({ url: '/system/oauth2-client/page', params })
}
-// 查询 OAuth2 客户端的详情
-export const getOAuth2Client = (id: number) => {
+// 查询 OAuth2详情
+export const getOAuth2ClientApi = (id: number) => {
return request.get({ url: '/system/oauth2-client/get?id=' + id })
}
-// 新增 OAuth2 客户端
-export const createOAuth2Client = (data: OAuth2ClientVO) => {
+// 新增 OAuth2
+export const createOAuth2ClientApi = (data: OAuth2ClientVO) => {
return request.post({ url: '/system/oauth2-client/create', data })
}
-// 修改 OAuth2 客户端
-export const updateOAuth2Client = (data: OAuth2ClientVO) => {
+// 修改 OAuth2
+export const updateOAuth2ClientApi = (data: OAuth2ClientVO) => {
return request.put({ url: '/system/oauth2-client/update', data })
}
// 删除 OAuth2
-export const deleteOAuth2Client = (id: number) => {
+export const deleteOAuth2ClientApi = (id: number) => {
return request.delete({ url: '/system/oauth2-client/delete?id=' + id })
}
diff --git a/src/api/system/oauth2/token.ts b/src/api/system/oauth2/token.ts
index 8e9dca1e..dc7c44f5 100644
--- a/src/api/system/oauth2/token.ts
+++ b/src/api/system/oauth2/token.ts
@@ -11,12 +11,18 @@ export interface OAuth2TokenVO {
expiresTime: Date
}
+export interface OAuth2TokenPageReqVO extends PageParam {
+ userId?: number
+ userType?: number
+ clientId?: string
+}
+
// 查询 token列表
-export const getAccessTokenPage = (params: PageParam) => {
+export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => {
return request.get({ url: '/system/oauth2-token/page', params })
}
// 删除 token
-export const deleteAccessToken = (accessToken: number) => {
+export const deleteAccessTokenApi = (accessToken: number) => {
return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
}
diff --git a/src/api/system/operatelog/index.ts b/src/api/system/operatelog/index.ts
index 848a5333..5fd31dba 100644
--- a/src/api/system/operatelog/index.ts
+++ b/src/api/system/operatelog/index.ts
@@ -23,11 +23,19 @@ export type OperateLogVO = {
resultData: string
}
+export interface OperateLogPageReqVO extends PageParam {
+ module?: string
+ userNickname?: string
+ type?: number
+ success?: boolean
+ startTime?: Date[]
+}
+
// 查询操作日志列表
-export const getOperateLogPage = (params: PageParam) => {
+export const getOperateLogPageApi = (params: OperateLogPageReqVO) => {
return request.get({ url: '/system/operate-log/page', params })
}
// 导出操作日志
-export const exportOperateLog = (params) => {
+export const exportOperateLogApi = (params: OperateLogPageReqVO) => {
return request.download({ url: '/system/operate-log/export', params })
}
diff --git a/src/api/system/permission/index.ts b/src/api/system/permission/index.ts
index baf2805b..aa355dfc 100644
--- a/src/api/system/permission/index.ts
+++ b/src/api/system/permission/index.ts
@@ -17,26 +17,26 @@ export interface PermissionAssignRoleDataScopeReqVO {
}
// 查询角色拥有的菜单权限
-export const getRoleMenuList = async (roleId: number) => {
+export const listRoleMenusApi = async (roleId: number) => {
return await request.get({ url: '/system/permission/list-role-resources?roleId=' + roleId })
}
// 赋予角色菜单权限
-export const assignRoleMenu = async (data: PermissionAssignRoleMenuReqVO) => {
+export const assignRoleMenuApi = async (data: PermissionAssignRoleMenuReqVO) => {
return await request.post({ url: '/system/permission/assign-role-menu', data })
}
// 赋予角色数据权限
-export const assignRoleDataScope = async (data: PermissionAssignRoleDataScopeReqVO) => {
+export const assignRoleDataScopeApi = async (data: PermissionAssignRoleDataScopeReqVO) => {
return await request.post({ url: '/system/permission/assign-role-data-scope', data })
}
// 查询用户拥有的角色数组
-export const getUserRoleList = async (userId: number) => {
+export const listUserRolesApi = async (userId: number) => {
return await request.get({ url: '/system/permission/list-user-roles?userId=' + userId })
}
// 赋予用户角色
-export const assignUserRole = async (data: PermissionAssignUserRoleReqVO) => {
+export const aassignUserRoleApi = async (data: PermissionAssignUserRoleReqVO) => {
return await request.post({ url: '/system/permission/assign-user-role', data })
}
diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts
index 405db387..9e2540f0 100644
--- a/src/api/system/post/index.ts
+++ b/src/api/system/post/index.ts
@@ -10,37 +10,49 @@ export interface PostVO {
createTime?: Date
}
+export interface PostPageReqVO extends PageParam {
+ code?: string
+ name?: string
+ status?: number
+}
+
+export interface PostExportReqVO {
+ code?: string
+ name?: string
+ status?: number
+}
+
// 查询岗位列表
-export const getPostPage = async (params: PageParam) => {
+export const getPostPageApi = async (params: PostPageReqVO) => {
return await request.get({ url: '/system/post/page', params })
}
// 获取岗位精简信息列表
-export const getSimplePostList = async (): Promise => {
+export const listSimplePostsApi = async () => {
return await request.get({ url: '/system/post/list-all-simple' })
}
// 查询岗位详情
-export const getPost = async (id: number) => {
+export const getPostApi = async (id: number) => {
return await request.get({ url: '/system/post/get?id=' + id })
}
// 新增岗位
-export const createPost = async (data: PostVO) => {
+export const createPostApi = async (data: PostVO) => {
return await request.post({ url: '/system/post/create', data })
}
// 修改岗位
-export const updatePost = async (data: PostVO) => {
+export const updatePostApi = async (data: PostVO) => {
return await request.put({ url: '/system/post/update', data })
}
// 删除岗位
-export const deletePost = async (id: number) => {
+export const deletePostApi = async (id: number) => {
return await request.delete({ url: '/system/post/delete?id=' + id })
}
// 导出岗位
-export const exportPost = async (params) => {
+export const exportPostApi = async (params: PostExportReqVO) => {
return await request.download({ url: '/system/post/export', params })
}
diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts
index 93636ff0..0d477555 100644
--- a/src/api/system/role/index.ts
+++ b/src/api/system/role/index.ts
@@ -7,55 +7,52 @@ export interface RoleVO {
sort: number
status: number
type: number
- dataScope: number
- dataScopeDeptIds: number[]
createTime: Date
}
+export interface RolePageReqVO extends PageParam {
+ name?: string
+ code?: string
+ status?: number
+ createTime?: Date[]
+}
+
export interface UpdateStatusReqVO {
id: number
status: number
}
// 查询角色列表
-export const getRolePage = async (params: PageParam) => {
+export const getRolePageApi = async (params: RolePageReqVO) => {
return await request.get({ url: '/system/role/page', params })
}
// 查询角色(精简)列表
-export const getSimpleRoleList = async (): Promise => {
+export const listSimpleRolesApi = async () => {
return await request.get({ url: '/system/role/list-all-simple' })
}
// 查询角色详情
-export const getRole = async (id: number) => {
+export const getRoleApi = async (id: number) => {
return await request.get({ url: '/system/role/get?id=' + id })
}
// 新增角色
-export const createRole = async (data: RoleVO) => {
+export const createRoleApi = async (data: RoleVO) => {
return await request.post({ url: '/system/role/create', data })
}
// 修改角色
-export const updateRole = async (data: RoleVO) => {
+export const updateRoleApi = async (data: RoleVO) => {
return await request.put({ url: '/system/role/update', data })
}
// 修改角色状态
-export const updateRoleStatus = async (data: UpdateStatusReqVO) => {
+export const updateRoleStatusApi = async (data: UpdateStatusReqVO) => {
return await request.put({ url: '/system/role/update-status', data })
}
// 删除角色
-export const deleteRole = async (id: number) => {
+export const deleteRoleApi = async (id: number) => {
return await request.delete({ url: '/system/role/delete?id=' + id })
}
-
-// 导出角色
-export const exportRole = (params) => {
- return request.download({
- url: '/system/role/export-excel',
- params
- })
-}
diff --git a/src/api/system/sensitiveWord/index.ts b/src/api/system/sensitiveWord/index.ts
index 1116226f..ffda89c0 100644
--- a/src/api/system/sensitiveWord/index.ts
+++ b/src/api/system/sensitiveWord/index.ts
@@ -1,5 +1,4 @@
import request from '@/config/axios'
-import qs from 'qs'
export interface SensitiveWordVO {
id: number
@@ -10,49 +9,56 @@ export interface SensitiveWordVO {
createTime: Date
}
-export interface SensitiveWordTestReqVO {
- text: string
- tag: string[]
+export interface SensitiveWordPageReqVO extends PageParam {
+ name?: string
+ tag?: string
+ status?: number
+ createTime?: Date[]
+}
+
+export interface SensitiveWordExportReqVO {
+ name?: string
+ tag?: string
+ status?: number
+ createTime?: Date[]
}
// 查询敏感词列表
-export const getSensitiveWordPage = (params: PageParam) => {
+export const getSensitiveWordPageApi = (params: SensitiveWordPageReqVO) => {
return request.get({ url: '/system/sensitive-word/page', params })
}
// 查询敏感词详情
-export const getSensitiveWord = (id: number) => {
+export const getSensitiveWordApi = (id: number) => {
return request.get({ url: '/system/sensitive-word/get?id=' + id })
}
// 新增敏感词
-export const createSensitiveWord = (data: SensitiveWordVO) => {
+export const createSensitiveWordApi = (data: SensitiveWordVO) => {
return request.post({ url: '/system/sensitive-word/create', data })
}
// 修改敏感词
-export const updateSensitiveWord = (data: SensitiveWordVO) => {
+export const updateSensitiveWordApi = (data: SensitiveWordVO) => {
return request.put({ url: '/system/sensitive-word/update', data })
}
// 删除敏感词
-export const deleteSensitiveWord = (id: number) => {
+export const deleteSensitiveWordApi = (id: number) => {
return request.delete({ url: '/system/sensitive-word/delete?id=' + id })
}
// 导出敏感词
-export const exportSensitiveWord = (params) => {
+export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => {
return request.download({ url: '/system/sensitive-word/export-excel', params })
}
// 获取所有敏感词的标签数组
-export const getSensitiveWordTagList = () => {
+export const getSensitiveWordTagsApi = () => {
return request.get({ url: '/system/sensitive-word/get-tags' })
}
// 获得文本所包含的不合法的敏感词数组
-export const validateText = (query: SensitiveWordTestReqVO) => {
- return request.get({
- url: '/system/sensitive-word/validate-text?' + qs.stringify(query, { arrayFormat: 'repeat' })
- })
+export const validateTextApi = (id: number) => {
+ return request.get({ url: '/system/sensitive-word/validate-text?' + id })
}
diff --git a/src/api/system/sms/smsChannel/index.ts b/src/api/system/sms/smsChannel/index.ts
index f335628f..176d075f 100644
--- a/src/api/system/sms/smsChannel/index.ts
+++ b/src/api/system/sms/smsChannel/index.ts
@@ -12,32 +12,39 @@ export interface SmsChannelVO {
createTime: Date
}
+export interface SmsChannelPageReqVO extends PageParam {
+ signature?: string
+ code?: string
+ status?: number
+ createTime?: Date[]
+}
+
// 查询短信渠道列表
-export const getSmsChannelPage = (params: PageParam) => {
+export const getSmsChannelPageApi = (params: SmsChannelPageReqVO) => {
return request.get({ url: '/system/sms-channel/page', params })
}
// 获得短信渠道精简列表
-export function getSimpleSmsChannelList() {
+export function getSimpleSmsChannels() {
return request.get({ url: '/system/sms-channel/list-all-simple' })
}
// 查询短信渠道详情
-export const getSmsChannel = (id: number) => {
+export const getSmsChannelApi = (id: number) => {
return request.get({ url: '/system/sms-channel/get?id=' + id })
}
// 新增短信渠道
-export const createSmsChannel = (data: SmsChannelVO) => {
+export const createSmsChannelApi = (data: SmsChannelVO) => {
return request.post({ url: '/system/sms-channel/create', data })
}
// 修改短信渠道
-export const updateSmsChannel = (data: SmsChannelVO) => {
+export const updateSmsChannelApi = (data: SmsChannelVO) => {
return request.put({ url: '/system/sms-channel/update', data })
}
// 删除短信渠道
-export const deleteSmsChannel = (id: number) => {
+export const deleteSmsChannelApi = (id: number) => {
return request.delete({ url: '/system/sms-channel/delete?id=' + id })
}
diff --git a/src/api/system/sms/smsLog/index.ts b/src/api/system/sms/smsLog/index.ts
index 3d54fac1..863eabb6 100644
--- a/src/api/system/sms/smsLog/index.ts
+++ b/src/api/system/sms/smsLog/index.ts
@@ -1,39 +1,57 @@
import request from '@/config/axios'
export interface SmsLogVO {
- id: number | null
- channelId: number | null
+ id: number
+ channelId: number
channelCode: string
- templateId: number | null
+ templateId: number
templateCode: string
- templateType: number | null
+ templateType: number
templateContent: string
- templateParams: Map | null
- apiTemplateId: string
+ templateParams: Map
mobile: string
- userId: number | null
- userType: number | null
- sendStatus: number | null
- sendTime: Date | null
- sendCode: number | null
+ userId: number
+ userType: number
+ sendStatus: number
+ sendTime: Date
+ sendCode: number
sendMsg: string
apiSendCode: string
apiSendMsg: string
apiRequestId: string
apiSerialNo: string
- receiveStatus: number | null
- receiveTime: Date | null
+ receiveStatus: number
+ receiveTime: Date
apiReceiveCode: string
apiReceiveMsg: string
- createTime: Date | null
+ createTime: Date
+}
+
+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 getSmsLogPage = (params: PageParam) => {
+export const getSmsLogPageApi = (params: SmsLogPageReqVO) => {
return request.get({ url: '/system/sms-log/page', params })
}
// 导出短信日志
-export const exportSmsLog = (params) => {
+export const exportSmsLogApi = (params: SmsLogExportReqVO) => {
return request.download({ url: '/system/sms-log/export-excel', params })
}
diff --git a/src/api/system/sms/smsTemplate/index.ts b/src/api/system/sms/smsTemplate/index.ts
index 35cb489d..0433fe3a 100644
--- a/src/api/system/sms/smsTemplate/index.ts
+++ b/src/api/system/sms/smsTemplate/index.ts
@@ -1,18 +1,18 @@
import request from '@/config/axios'
export interface SmsTemplateVO {
- id: number | null
- type: number | null
+ id: number
+ type: number
status: number
code: string
name: string
content: string
remark: string
apiTemplateId: string
- channelId: number | null
- channelCode?: string
- params?: string[]
- createTime?: Date
+ channelId: number
+ channelCode: string
+ params: string[]
+ createTime: Date
}
export interface SendSmsReqVO {
@@ -21,40 +21,60 @@ export interface SendSmsReqVO {
templateParams: Map
}
+export interface SmsTemplatePageReqVO {
+ type?: number
+ status?: number
+ code?: string
+ content?: string
+ apiTemplateId?: string
+ channelId?: number
+ createTime?: Date[]
+}
+
+export interface SmsTemplateExportReqVO {
+ type?: number
+ status?: number
+ code?: string
+ content?: string
+ apiTemplateId?: string
+ channelId?: number
+ createTime?: Date[]
+}
+
// 查询短信模板列表
-export const getSmsTemplatePage = (params: PageParam) => {
+export const getSmsTemplatePageApi = (params: SmsTemplatePageReqVO) => {
return request.get({ url: '/system/sms-template/page', params })
}
// 查询短信模板详情
-export const getSmsTemplate = (id: number) => {
+export const getSmsTemplateApi = (id: number) => {
return request.get({ url: '/system/sms-template/get?id=' + id })
}
// 新增短信模板
-export const createSmsTemplate = (data: SmsTemplateVO) => {
+export const createSmsTemplateApi = (data: SmsTemplateVO) => {
return request.post({ url: '/system/sms-template/create', data })
}
// 修改短信模板
-export const updateSmsTemplate = (data: SmsTemplateVO) => {
+export const updateSmsTemplateApi = (data: SmsTemplateVO) => {
return request.put({ url: '/system/sms-template/update', data })
}
// 删除短信模板
-export const deleteSmsTemplate = (id: number) => {
+export const deleteSmsTemplateApi = (id: number) => {
return request.delete({ url: '/system/sms-template/delete?id=' + id })
}
+// 发送短信
+export const sendSmsApi = (data: SendSmsReqVO) => {
+ return request.post({ url: '/system/sms-template/send-sms', data })
+}
+
// 导出短信模板
-export const exportSmsTemplate = (params) => {
+export const exportPostApi = (params: SmsTemplateExportReqVO) => {
return request.download({
url: '/system/sms-template/export-excel',
params
})
}
-
-// 发送短信
-export const sendSms = (data: SendSmsReqVO) => {
- return request.post({ url: '/system/sms-template/send-sms', data })
-}
diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts
index 176c3757..d79fb7b2 100644
--- a/src/api/system/tenant/index.ts
+++ b/src/api/system/tenant/index.ts
@@ -32,31 +32,31 @@ export interface TenantExportReqVO {
}
// 查询租户列表
-export const getTenantPage = (params: TenantPageReqVO) => {
+export const getTenantPageApi = (params: TenantPageReqVO) => {
return request.get({ url: '/system/tenant/page', params })
}
// 查询租户详情
-export const getTenant = (id: number) => {
+export const getTenantApi = (id: number) => {
return request.get({ url: '/system/tenant/get?id=' + id })
}
// 新增租户
-export const createTenant = (data: TenantVO) => {
+export const createTenantApi = (data: TenantVO) => {
return request.post({ url: '/system/tenant/create', data })
}
// 修改租户
-export const updateTenant = (data: TenantVO) => {
+export const updateTenantApi = (data: TenantVO) => {
return request.put({ url: '/system/tenant/update', data })
}
// 删除租户
-export const deleteTenant = (id: number) => {
+export const deleteTenantApi = (id: number) => {
return request.delete({ url: '/system/tenant/delete?id=' + id })
}
// 导出租户
-export const exportTenant = (params: TenantExportReqVO) => {
+export const exportTenantApi = (params: TenantExportReqVO) => {
return request.download({ url: '/system/tenant/export-excel', params })
}
diff --git a/src/api/system/tenantPackage/index.ts b/src/api/system/tenantPackage/index.ts
index 01d139e2..e431a9ee 100644
--- a/src/api/system/tenantPackage/index.ts
+++ b/src/api/system/tenantPackage/index.ts
@@ -12,28 +12,35 @@ export interface TenantPackageVO {
createTime: Date
}
+export interface TenantPackagePageReqVO extends PageParam {
+ name?: string
+ status?: number
+ remark?: string
+ createTime?: Date[]
+}
+
// 查询租户套餐列表
-export const getTenantPackagePage = (params: PageParam) => {
+export const getTenantPackageTypePageApi = (params: TenantPackagePageReqVO) => {
return request.get({ url: '/system/tenant-package/page', params })
}
// 获得租户
-export const getTenantPackage = (id: number) => {
+export const getTenantPackageApi = (id: number) => {
return request.get({ url: '/system/tenant-package/get?id=' + id })
}
// 新增租户套餐
-export const createTenantPackage = (data: TenantPackageVO) => {
+export const createTenantPackageTypeApi = (data: TenantPackageVO) => {
return request.post({ url: '/system/tenant-package/create', data })
}
// 修改租户套餐
-export const updateTenantPackage = (data: TenantPackageVO) => {
+export const updateTenantPackageTypeApi = (data: TenantPackageVO) => {
return request.put({ url: '/system/tenant-package/update', data })
}
// 删除租户套餐
-export const deleteTenantPackage = (id: number) => {
+export const deleteTenantPackageTypeApi = (id: number) => {
return request.delete({ url: '/system/tenant-package/delete?id=' + id })
}
// 获取租户套餐精简信息列表
diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts
index 6224f0e8..e505921d 100644
--- a/src/api/system/user/index.ts
+++ b/src/api/system/user/index.ts
@@ -17,43 +17,58 @@ export interface UserVO {
createTime: Date
}
+export interface UserPageReqVO extends PageParam {
+ deptId?: number
+ username?: string
+ mobile?: string
+ status?: number
+ createTime?: Date[]
+}
+
+export interface UserExportReqVO {
+ code?: string
+ name?: string
+ status?: number
+ createTime?: Date[]
+}
+
// 查询用户管理列表
-export const getUserPage = (params: PageParam) => {
+export const getUserPageApi = (params: UserPageReqVO) => {
return request.get({ url: '/system/user/page', params })
}
// 查询用户详情
-export const getUser = (id: number) => {
+export const getUserApi = (id: number) => {
return request.get({ url: '/system/user/get?id=' + id })
}
// 新增用户
-export const createUser = (data: UserVO) => {
+export const createUserApi = (data: UserVO) => {
return request.post({ url: '/system/user/create', data })
}
// 修改用户
-export const updateUser = (data: UserVO) => {
+export const updateUserApi = (data: UserVO) => {
return request.put({ url: '/system/user/update', data })
}
// 删除用户
-export const deleteUser = (id: number) => {
+export const deleteUserApi = (id: number) => {
return request.delete({ url: '/system/user/delete?id=' + id })
}
// 导出用户
-export const exportUser = (params) => {
+export const exportUserApi = (params: UserExportReqVO) => {
return request.download({ url: '/system/user/export', params })
}
// 下载用户导入模板
-export const importUserTemplate = () => {
+export const importUserTemplateApi = () => {
return request.download({ url: '/system/user/get-import-template' })
}
// 用户密码重置
-export const resetUserPwd = (id: number, password: string) => {
+export const resetUserPwdApi = (id: number, password: string) => {
const data = {
id,
password
@@ -62,7 +77,7 @@ export const resetUserPwd = (id: number, password: string) => {
}
// 用户状态修改
-export const updateUserStatus = (id: number, status: number) => {
+export const updateUserStatusApi = (id: number, status: number) => {
const data = {
id,
status
@@ -71,6 +86,6 @@ export const updateUserStatus = (id: number, status: number) => {
}
// 获取用户精简信息列表
-export const getSimpleUserList = (): Promise => {
+export const getListSimpleUsersApi = () => {
return request.get({ url: '/system/user/list-all-simple' })
}
diff --git a/src/components/ContentWrap/src/ContentWrap.vue b/src/components/ContentWrap/src/ContentWrap.vue
index 6890e214..51e50410 100644
--- a/src/components/ContentWrap/src/ContentWrap.vue
+++ b/src/components/ContentWrap/src/ContentWrap.vue
@@ -13,7 +13,7 @@ defineProps({
-
+
{{ title }}
diff --git a/src/components/Crontab/src/Crontab.vue b/src/components/Crontab/src/Crontab.vue
index 0e474fb2..fe33bd5f 100644
--- a/src/components/Crontab/src/Crontab.vue
+++ b/src/components/Crontab/src/Crontab.vue
@@ -6,10 +6,7 @@ interface shortcutsType {
value: string
}
const props = defineProps({
- modelValue: {
- type: String,
- default: '* * * * * ?'
- },
+ modelValue: { type: String, default: '* * * * * ?' },
shortcuts: { type: Array as PropType
, default: () => [] }
})
const defaultValue = ref('')
diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue
index f1e77ddf..fca37000 100644
--- a/src/components/Descriptions/src/Descriptions.vue
+++ b/src/components/Descriptions/src/Descriptions.vue
@@ -76,7 +76,7 @@ const toggleClick = () => {
v-if="title"
:class="[
`${prefixCls}-header`,
- 'h-50px flex justify-between items-center border-bottom-1 border-solid border-[var(--tags-view-border-color)] px-10px cursor-pointer dark:border-[var(--el-border-color)]'
+ 'h-50px flex justify-between items-center mb-10px border-bottom-1 border-solid border-[var(--tags-view-border-color)] px-10px cursor-pointer dark:border-[var(--el-border-color)]'
]"
@click="toggleClick"
>
diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue
index e3ba78d2..ecbfedb4 100644
--- a/src/components/DictTag/src/DictTag.vue
+++ b/src/components/DictTag/src/DictTag.vue
@@ -34,7 +34,7 @@ export default defineComponent({
return null
}
// 解决自定义字典标签值为零时标签不渲染的问题
- if (props.value === undefined || props.value === null) {
+ if (props.value === undefined) {
return null
}
getDictObj(props.type, props.value.toString())
diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue
index 4d8e7dde..85b849fb 100644
--- a/src/components/Editor/src/Editor.vue
+++ b/src/components/Editor/src/Editor.vue
@@ -178,7 +178,7 @@ defineExpose({
-
-
diff --git a/src/views/system/errorCode/errorCode.data.ts b/src/views/system/errorCode/errorCode.data.ts
new file mode 100644
index 00000000..4736068b
--- /dev/null
+++ b/src/views/system/errorCode/errorCode.data.ts
@@ -0,0 +1,54 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+
+// 表单校验
+export const rules = reactive({
+ applicationName: [required],
+ code: [required],
+ message: [required]
+})
+
+// 新增 + 修改
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '编号',
+ action: true,
+ columns: [
+ {
+ title: '错误码类型',
+ field: 'type',
+ dictType: DICT_TYPE.SYSTEM_ERROR_CODE_TYPE,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '应用名',
+ field: 'applicationName',
+ isSearch: true
+ },
+ {
+ title: '错误码编码',
+ field: 'code',
+ isSearch: true
+ },
+ {
+ title: '错误码错误提示',
+ field: 'message',
+ isSearch: true
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/errorCode/index.vue b/src/views/system/errorCode/index.vue
index e94b00f0..1ff3d103 100644
--- a/src/views/system/errorCode/index.vue
+++ b/src/views/system/errorCode/index.vue
@@ -1,228 +1,145 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
+
+
+
+
+
- 新增
-
-
- 导出
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/system/loginlog/index.vue b/src/views/system/loginlog/index.vue
index c48957a7..f2bb8c67 100644
--- a/src/views/system/loginlog/index.vue
+++ b/src/views/system/loginlog/index.vue
@@ -1,175 +1,53 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
- 导出
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 详情
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/system/loginlog/loginLog.data.ts b/src/views/system/loginlog/loginLog.data.ts
new file mode 100644
index 00000000..c0a51fbe
--- /dev/null
+++ b/src/views/system/loginlog/loginLog.data.ts
@@ -0,0 +1,53 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '日志编号',
+ action: true,
+ actionWidth: '100px',
+ columns: [
+ {
+ title: '日志类型',
+ field: 'logType',
+ dictType: DICT_TYPE.SYSTEM_LOGIN_TYPE,
+ dictClass: 'number'
+ },
+ {
+ title: '用户名称',
+ field: 'username',
+ isSearch: true
+ },
+ {
+ title: '登录地址',
+ field: 'userIp',
+ isSearch: true
+ },
+ {
+ title: '浏览器',
+ field: 'userAgent'
+ },
+ {
+ title: '登陆结果',
+ field: 'result',
+ dictType: DICT_TYPE.SYSTEM_LOGIN_RESULT,
+ dictClass: 'number'
+ },
+ {
+ title: '登录日期',
+ field: 'createTime',
+ formatter: 'formatDate',
+ table: {
+ width: 150
+ },
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/mail/account/account.data.ts b/src/views/system/mail/account/account.data.ts
index f01c39f2..bd05ce4f 100644
--- a/src/views/system/mail/account/account.data.ts
+++ b/src/views/system/mail/account/account.data.ts
@@ -1,10 +1,10 @@
-import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
-import { dateFormatter } from '@/utils/formatTime'
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
const { t } = useI18n() // 国际化
// 表单校验
export const rules = reactive({
+ // mail: [required],
mail: [
{ required: true, message: t('profile.rules.mail'), trigger: 'blur' },
{
@@ -20,54 +20,56 @@ export const rules = reactive({
sslEnable: [required]
})
-// CrudSchema:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
-const crudSchemas = reactive([
- {
- label: '邮箱',
- field: 'mail',
- isSearch: true
- },
- {
- label: '用户名',
- field: 'username',
- isSearch: true
- },
- {
- label: '密码',
- field: 'password',
- isTable: false
- },
- {
- label: 'SMTP 服务器域名',
- field: 'host'
- },
- {
- label: 'SMTP 服务器端口',
- field: 'port',
- form: {
- component: 'InputNumber',
- value: 465
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id', // 默认的主键 ID
+ primaryTitle: '编号',
+ primaryType: 'id',
+ action: true,
+ actionWidth: '200', // 3 个按钮默认 200,如有删减对应增减即可
+ columns: [
+ {
+ title: '邮箱',
+ field: 'mail',
+ isSearch: true
+ },
+ {
+ title: '用户名',
+ field: 'username',
+ isSearch: true
+ },
+ {
+ title: '密码',
+ field: 'password',
+ isTable: false
+ },
+ {
+ title: 'SMTP 服务器域名',
+ field: 'host'
+ },
+ {
+ title: 'SMTP 服务器端口',
+ field: 'port',
+ form: {
+ component: 'InputNumber',
+ value: 465
+ }
+ },
+ {
+ title: '是否开启 SSL',
+ field: 'sslEnable',
+ dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
+ dictClass: 'boolean'
+ },
+ {
+ title: '创建时间',
+ field: 'createTime',
+ isForm: false,
+ formatter: 'formatDate',
+ table: {
+ width: 180
+ }
}
- },
- {
- label: '是否开启 SSL',
- field: 'sslEnable',
- dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
- dictClass: 'boolean',
- form: {
- component: 'Radio'
- }
- },
- {
- label: '创建时间',
- field: 'createTime',
- isForm: false,
- formatter: dateFormatter
- },
- {
- label: '操作',
- field: 'action',
- isForm: false
- }
-])
-export const { allSchemas } = useCrudSchemas(crudSchemas)
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/mail/account/index.vue b/src/views/system/mail/account/index.vue
index 1f80684f..7c4ad0f9 100644
--- a/src/views/system/mail/account/index.vue
+++ b/src/views/system/mail/account/index.vue
@@ -1,84 +1,151 @@
-
-
-
-
-
-
+
+
+
+
+
- 新增
-
+ @click="handleCreate()"
+ />
-
-
-
-
-
-
-
-
+
+
- 编辑
-
-
+
+
+
+
- 删除
-
+ @click="deleteData(row.id)"
+ />
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/mail/log/index.vue b/src/views/system/mail/log/index.vue
index 5373b71d..e147c52c 100644
--- a/src/views/system/mail/log/index.vue
+++ b/src/views/system/mail/log/index.vue
@@ -1,59 +1,98 @@
-
-
-
-
-
-
-
-
-
-
- 详情
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+ {{ row.toMail }}
+
+ {{ '(' + row.userId + ')' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/mail/log/log.data.ts b/src/views/system/mail/log/log.data.ts
index 8ea96926..f01cb549 100644
--- a/src/views/system/mail/log/log.data.ts
+++ b/src/views/system/mail/log/log.data.ts
@@ -1,133 +1,122 @@
-import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
-import { dateFormatter } from '@/utils/formatTime'
-import * as MailAccountApi from '@/api/system/mail/account'
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
-// 邮箱账号的列表
-const accounts = await MailAccountApi.getSimpleMailAccountList()
-
-// CrudSchema:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
-const crudSchemas = reactive([
- {
- label: '编号',
- field: 'id'
- },
- {
- label: '发送时间',
- field: 'sendTime',
- formatter: dateFormatter,
- search: {
- show: true,
- component: 'DatePicker',
- componentProps: {
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- type: 'daterange',
- defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
- }
- },
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- }
- },
- {
- label: '接收邮箱',
- field: 'toMail'
- },
- {
- label: '用户编号',
- field: 'userId',
- isSearch: true,
- isTable: false
- },
- {
- label: '用户类型',
- field: 'userType',
- dictType: DICT_TYPE.USER_TYPE,
- dictClass: 'number',
- isSearch: true,
- isTable: false
- },
- {
- label: '邮件标题',
- field: 'templateTitle'
- },
- {
- label: '邮件内容',
- field: 'templateContent',
- isTable: false
- },
- {
- label: '邮箱参数',
- field: 'templateParams',
- isTable: false
- },
- {
- label: '发送状态',
- field: 'sendStatus',
- dictType: DICT_TYPE.SYSTEM_MAIL_SEND_STATUS,
- dictClass: 'string',
- isSearch: true
- },
- {
- label: '邮箱账号',
- field: 'accountId',
- isTable: false,
- search: {
- show: true,
- component: 'Select',
- api: () => accounts,
- componentProps: {
- optionsAlias: {
- labelField: 'mail',
- valueField: 'id'
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryTitle: '编号',
+ primaryType: 'id',
+ action: true,
+ actionWidth: '70',
+ columns: [
+ {
+ title: '发送时间',
+ field: 'sendTime',
+ table: {
+ width: 180
+ },
+ formatter: 'formatDate',
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
}
}
+ },
+ {
+ title: '接收邮箱',
+ field: 'toMail',
+ isSearch: true,
+ table: {
+ width: 180,
+ slots: {
+ default: 'toMail_default'
+ }
+ }
+ },
+ {
+ title: '用户编号',
+ field: 'userId',
+ isSearch: true,
+ isTable: false
+ },
+ {
+ title: '用户类型',
+ field: 'userType',
+ dictType: DICT_TYPE.USER_TYPE,
+ dictClass: 'number',
+ isSearch: true,
+ isTable: false
+ },
+ {
+ title: '邮件标题',
+ field: 'templateTitle'
+ },
+ {
+ title: '邮件内容',
+ field: 'templateContent',
+ isTable: false
+ },
+ {
+ title: '邮箱参数',
+ field: 'templateParams',
+ isTable: false
+ },
+ {
+ title: '发送状态',
+ field: 'sendStatus',
+ dictType: DICT_TYPE.SYSTEM_MAIL_SEND_STATUS,
+ dictClass: 'string',
+ isSearch: true
+ },
+ {
+ title: '邮箱账号',
+ field: 'accountId',
+ isSearch: true,
+ isTable: false,
+ search: {
+ slots: {
+ default: 'accountId_search'
+ }
+ }
+ },
+ {
+ title: '发送邮箱地址',
+ field: 'fromMail',
+ table: {
+ title: '邮箱账号'
+ }
+ },
+ {
+ title: '模板编号',
+ field: 'templateId',
+ isSearch: true
+ },
+ {
+ title: '模板编码',
+ field: 'templateCode',
+ isTable: false
+ },
+ {
+ title: '模版发送人名称',
+ field: 'templateNickname',
+ isTable: false
+ },
+ {
+ title: '发送返回的消息编号',
+ field: 'sendMessageId',
+ isTable: false
+ },
+ {
+ title: '发送异常',
+ field: 'sendException',
+ isTable: false
+ },
+ {
+ title: '创建时间',
+ field: 'createTime',
+ isTable: false,
+ formatter: 'formatDate'
}
- },
- {
- label: '发送邮箱地址',
- field: 'fromMail',
- table: {
- label: '邮箱账号'
- }
- },
- {
- label: '模板编号',
- field: 'templateId',
- isSearch: true
- },
- {
- label: '模板编码',
- field: 'templateCode',
- isTable: false
- },
- {
- label: '模版发送人名称',
- field: 'templateNickname',
- isTable: false
- },
- {
- label: '发送返回的消息编号',
- field: 'sendMessageId',
- isTable: false
- },
- {
- label: '发送异常',
- field: 'sendException',
- isTable: false
- },
- {
- label: '创建时间',
- field: 'createTime',
- isTable: false,
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- }
- },
- {
- label: '操作',
- field: 'action',
- isDetail: false
- }
-])
-export const { allSchemas } = useCrudSchemas(crudSchemas)
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/mail/template/index.vue b/src/views/system/mail/template/index.vue
index b9a5040b..cb4a7e5d 100644
--- a/src/views/system/mail/template/index.vue
+++ b/src/views/system/mail/template/index.vue
@@ -1,102 +1,273 @@
-
-
-
-
-
-
- 新增
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ accountOptions.find((account) => account.id === row.accountId)?.mail }}
+
+
+
+
- 测试
-
-
+
+
- 编辑
-
-
+
+
+
+
- 删除
-
+ @click="deleteData(row.id)"
+ />
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/mail/template/template.data.ts b/src/views/system/mail/template/template.data.ts
index ba76dc27..32522e33 100644
--- a/src/views/system/mail/template/template.data.ts
+++ b/src/views/system/mail/template/template.data.ts
@@ -1,113 +1,98 @@
-import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
-import { dateFormatter } from '@/utils/formatTime'
-import { TableColumn } from '@/types/table'
-import * as MailAccountApi from '@/api/system/mail/account'
-
-// 邮箱账号的列表
-const accounts = await MailAccountApi.getSimpleMailAccountList()
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
// 表单校验
export const rules = reactive({
name: [required],
code: [required],
accountId: [required],
- label: [required],
+ title: [required],
content: [required],
params: [required],
status: [required]
})
-// CrudSchema:https://kailong110120130.gitee.io/vue-element-plus-admin-doc/hooks/useCrudSchemas.html
-const crudSchemas = reactive([
- {
- label: '模板编码',
- field: 'code',
- isSearch: true
- },
- {
- label: '模板名称',
- field: 'name',
- isSearch: true
- },
- {
- label: '模板标题',
- field: 'title'
- },
- {
- label: '模板内容',
- field: 'content',
- form: {
- component: 'Editor',
- componentProps: {
- valueHtml: '',
- height: 200
- }
- }
- },
- {
- label: '邮箱账号',
- field: 'accountId',
- width: '200px',
- formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
- return accounts.find((account) => account.id === cellValue)?.mail
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id', // 默认的主键ID
+ primaryTitle: '编号', // 默认显示的值
+ primaryType: null,
+ action: true,
+ actionWidth: '260',
+ columns: [
+ {
+ title: '模板编码',
+ field: 'code',
+ isSearch: true
},
- search: {
- show: true,
- component: 'Select',
- api: () => accounts,
- componentProps: {
- optionsAlias: {
- labelField: 'mail',
- valueField: 'id'
+ {
+ title: '模板名称',
+ field: 'name',
+ isSearch: true
+ },
+ {
+ title: '模板标题',
+ field: 'title'
+ },
+ {
+ title: '模板内容',
+ field: 'content',
+ form: {
+ component: 'Editor',
+ colProps: {
+ span: 24
+ },
+ componentProps: {
+ valueHtml: ''
}
}
},
- form: {
- component: 'Select',
- api: () => accounts,
- componentProps: {
- optionsAlias: {
- labelField: 'mail',
- valueField: 'id'
+ {
+ title: '邮箱账号',
+ field: 'accountId',
+ isSearch: true,
+ table: {
+ width: 200,
+ slots: {
+ default: 'accountId_default'
+ }
+ },
+ search: {
+ slots: {
+ default: 'accountId_search'
+ }
+ }
+ },
+ {
+ title: '发送人名称',
+ field: 'nickname'
+ },
+ {
+ title: '开启状态',
+ field: 'status',
+ isSearch: true,
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number'
+ },
+ {
+ title: '备注',
+ field: 'remark',
+ isTable: false
+ },
+ {
+ title: '创建时间',
+ field: 'createTime',
+ isForm: false,
+ formatter: 'formatDate',
+ table: {
+ width: 180
+ },
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
}
}
}
- },
- {
- label: '发送人名称',
- field: 'nickname'
- },
- {
- label: '开启状态',
- field: 'status',
- isSearch: true,
- dictType: DICT_TYPE.COMMON_STATUS,
- dictClass: 'number'
- },
- {
- label: '备注',
- field: 'remark',
- isTable: false
- },
- {
- label: '创建时间',
- field: 'createTime',
- isForm: false,
- formatter: dateFormatter,
- search: {
- show: true,
- component: 'DatePicker',
- componentProps: {
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- type: 'daterange',
- defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
- }
- }
- },
- {
- label: '操作',
- field: 'action',
- isForm: false
- }
-])
-export const { allSchemas } = useCrudSchemas(crudSchemas)
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index 8feb066b..0604aa93 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -1,183 +1,351 @@
-
+
+
+
+
+
+
+
+
+
+
+ {{ row.name }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/menu/menu.data.ts b/src/views/system/menu/menu.data.ts
new file mode 100644
index 00000000..753c1211
--- /dev/null
+++ b/src/views/system/menu/menu.data.ts
@@ -0,0 +1,76 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+
+// 新增和修改的表单校验
+export const rules = reactive({
+ name: [required],
+ sort: [required],
+ path: [required],
+ status: [required]
+})
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: null,
+ action: true,
+ columns: [
+ {
+ title: '上级菜单',
+ field: 'parentId',
+ isTable: false
+ },
+ {
+ title: '菜单名称',
+ field: 'name',
+ isSearch: true,
+ table: {
+ treeNode: true,
+ align: 'left',
+ width: '200px',
+ slots: {
+ default: 'name_default'
+ }
+ }
+ },
+ {
+ title: '菜单类型',
+ field: 'type',
+ dictType: DICT_TYPE.SYSTEM_MENU_TYPE
+ },
+ {
+ title: '路由地址',
+ field: 'path'
+ },
+ {
+ title: '组件路径',
+ field: 'component'
+ },
+ {
+ title: '组件名字',
+ field: 'componentName'
+ },
+ {
+ title: '权限标识',
+ field: 'permission'
+ },
+ {
+ title: '排序',
+ field: 'sort'
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isTable: false
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/notice/form.vue b/src/views/system/notice/form.vue
index 87e75623..b8a49586 100644
--- a/src/views/system/notice/form.vue
+++ b/src/views/system/notice/form.vue
@@ -38,14 +38,17 @@
- 确 定
- 取 消
+
diff --git a/src/views/system/notice/notice.data.ts b/src/views/system/notice/notice.data.ts
new file mode 100644
index 00000000..7a72a723
--- /dev/null
+++ b/src/views/system/notice/notice.data.ts
@@ -0,0 +1,59 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+
+// 表单校验
+export const rules = reactive({
+ title: [required],
+ type: [required]
+})
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'seq',
+ action: true,
+ columns: [
+ {
+ title: '公告标题',
+ field: 'title',
+ isSearch: true
+ },
+ {
+ title: '公告类型',
+ field: 'type',
+ dictType: DICT_TYPE.SYSTEM_NOTICE_TYPE,
+ dictClass: 'number'
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '公告内容',
+ field: 'content',
+ table: {
+ type: 'html'
+ },
+ form: {
+ component: 'Editor',
+ colProps: {
+ span: 24
+ },
+ componentProps: {
+ valueHtml: ''
+ }
+ },
+ isTable: false
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/notify/message/index.vue b/src/views/system/notify/message/index.vue
index 9a39e7f6..93a8ed68 100644
--- a/src/views/system/notify/message/index.vue
+++ b/src/views/system/notify/message/index.vue
@@ -1,208 +1,67 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.templateParams }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 详情
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
diff --git a/src/views/system/notify/message/message.data.ts b/src/views/system/notify/message/message.data.ts
new file mode 100644
index 00000000..665311d2
--- /dev/null
+++ b/src/views/system/notify/message/message.data.ts
@@ -0,0 +1,101 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id', // 默认的主键ID
+ primaryTitle: '编号', // 默认显示的值
+ primaryType: 'id', // 默认为seq,序号模式
+ action: true,
+ actionWidth: '200', // 3个按钮默认200,如有删减对应增减即可
+ columns: [
+ {
+ title: '用户编号',
+ field: 'userId',
+ isSearch: true
+ },
+ {
+ title: '用户类型',
+ field: 'userType',
+ dictType: DICT_TYPE.USER_TYPE,
+ dictClass: 'string',
+ isSearch: true,
+ table: {
+ width: 80
+ }
+ },
+ {
+ title: '模版编号',
+ field: 'templateId'
+ },
+ {
+ title: '模板编码',
+ field: 'templateCode',
+ isSearch: true,
+ table: {
+ width: 80
+ }
+ },
+ {
+ title: '发送人名称',
+ field: 'templateNickname',
+ table: {
+ width: 120
+ }
+ },
+ {
+ title: '模版内容',
+ field: 'templateContent',
+ table: {
+ width: 200
+ }
+ },
+ {
+ title: '模版类型',
+ field: 'templateType',
+ dictType: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE,
+ dictClass: 'number',
+ isSearch: true,
+ table: {
+ width: 80
+ }
+ },
+ {
+ title: '模版参数',
+ field: 'templateParams',
+ isTable: false
+ },
+ {
+ title: '是否已读',
+ field: 'readStatus',
+ dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
+ dictClass: 'boolean',
+ table: {
+ width: 80
+ }
+ },
+ {
+ title: '阅读时间',
+ field: 'readTime',
+ formatter: 'formatDate',
+ table: {
+ width: 180
+ }
+ },
+ {
+ title: '创建时间',
+ field: 'createTime',
+ isForm: false,
+ formatter: 'formatDate',
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ },
+ table: {
+ width: 180
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/notify/my/index.vue b/src/views/system/notify/my/index.vue
index d423a98c..9f3e9b10 100644
--- a/src/views/system/notify/my/index.vue
+++ b/src/views/system/notify/my/index.vue
@@ -1,213 +1,58 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
- 标记已读
-
-
- 全部已读
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.readStatus ? '详情' : '已读' }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/system/notify/my/my.data.ts b/src/views/system/notify/my/my.data.ts
new file mode 100644
index 00000000..103ed8ef
--- /dev/null
+++ b/src/views/system/notify/my/my.data.ts
@@ -0,0 +1,58 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryTitle: ' ',
+ primaryType: 'checkbox',
+ action: true,
+ actionWidth: '200', // 3个按钮默认200,如有删减对应增减即可
+ columns: [
+ {
+ title: '发送人名称',
+ field: 'templateNickname',
+ table: {
+ width: 120
+ }
+ },
+ {
+ title: '发送时间',
+ field: 'createTime',
+ isForm: false,
+ formatter: 'formatDate',
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ },
+ table: {
+ width: 180
+ }
+ },
+ {
+ title: '类型',
+ field: 'templateType',
+ dictType: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE,
+ dictClass: 'number',
+ table: {
+ width: 80
+ }
+ },
+ {
+ title: '内容',
+ field: 'templateContent'
+ },
+ {
+ title: '是否已读',
+ field: 'readStatus',
+ dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
+ dictClass: 'boolean',
+ table: {
+ width: 80
+ },
+ isSearch: true
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/notify/template/index.vue b/src/views/system/notify/template/index.vue
index c4113924..4ec16a0a 100644
--- a/src/views/system/notify/template/index.vue
+++ b/src/views/system/notify/template/index.vue
@@ -119,7 +119,7 @@ import { FormExpose } from '@/components/Form'
// 业务相关的 import
import { rules, allSchemas } from './template.data'
import * as NotifyTemplateApi from '@/api/system/notify/template'
-import { getSimpleUserList, UserVO } from '@/api/system/user'
+import { getListSimpleUsersApi, UserVO } from '@/api/system/user'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
@@ -244,7 +244,7 @@ const sendTest = async () => {
// ========== 初始化 ==========
onMounted(() => {
- getSimpleUserList().then((data) => {
+ getListSimpleUsersApi().then((data) => {
userOption.value = data
})
})
diff --git a/src/views/system/oauth2/client/client.data.ts b/src/views/system/oauth2/client/client.data.ts
new file mode 100644
index 00000000..52ee8895
--- /dev/null
+++ b/src/views/system/oauth2/client/client.data.ts
@@ -0,0 +1,197 @@
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+
+const authorizedGrantOptions = getStrDictOptions(DICT_TYPE.SYSTEM_OAUTH2_GRANT_TYPE)
+
+// 表单校验
+export const rules = reactive({
+ clientId: [required],
+ secret: [required],
+ name: [required],
+ status: [required],
+ accessTokenValiditySeconds: [required],
+ refreshTokenValiditySeconds: [required],
+ redirectUris: [required],
+ authorizedGrantTypes: [required]
+})
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'clientId',
+ primaryType: null,
+ action: true,
+ columns: [
+ {
+ title: '客户端端号',
+ field: 'clientId'
+ },
+ {
+ title: '客户端密钥',
+ field: 'secret'
+ },
+ {
+ title: '应用名',
+ field: 'name',
+ isSearch: true
+ },
+ {
+ title: '应用图标',
+ field: 'logo',
+ table: {
+ cellRender: {
+ name: 'XImg'
+ }
+ },
+ form: {
+ component: 'UploadImg'
+ }
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '访问令牌的有效期',
+ field: 'accessTokenValiditySeconds',
+ form: {
+ component: 'InputNumber'
+ },
+ table: {
+ slots: {
+ default: 'accessTokenValiditySeconds_default'
+ }
+ }
+ },
+ {
+ title: '刷新令牌的有效期',
+ field: 'refreshTokenValiditySeconds',
+ form: {
+ component: 'InputNumber'
+ },
+ table: {
+ slots: {
+ default: 'refreshTokenValiditySeconds_default'
+ }
+ }
+ },
+ {
+ title: '授权类型',
+ field: 'authorizedGrantTypes',
+ table: {
+ width: 400,
+ slots: {
+ default: 'authorizedGrantTypes_default'
+ }
+ },
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: authorizedGrantOptions,
+ multiple: true,
+ filterable: true
+ }
+ }
+ },
+ {
+ title: '授权范围',
+ field: 'scopes',
+ isTable: false,
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: [],
+ multiple: true,
+ filterable: true,
+ allowCreate: true,
+ defaultFirstOption: true
+ }
+ }
+ },
+ {
+ title: '自动授权范围',
+ field: 'autoApproveScopes',
+ isTable: false,
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: [],
+ multiple: true,
+ filterable: true,
+ allowCreate: true,
+ defaultFirstOption: true
+ }
+ }
+ },
+ {
+ title: '可重定向的 URI 地址',
+ field: 'redirectUris',
+ isTable: false,
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: [],
+ multiple: true,
+ filterable: true,
+ allowCreate: true,
+ defaultFirstOption: true
+ }
+ }
+ },
+ {
+ title: '权限',
+ field: 'authorities',
+ isTable: false,
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: [],
+ multiple: true,
+ filterable: true,
+ allowCreate: true,
+ defaultFirstOption: true
+ }
+ }
+ },
+ {
+ title: '资源',
+ field: 'resourceIds',
+ isTable: false,
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: [],
+ multiple: true,
+ filterable: true,
+ allowCreate: true,
+ defaultFirstOption: true
+ }
+ }
+ },
+ {
+ title: '附加信息',
+ field: 'additionalInformation',
+ isTable: false,
+ form: {
+ component: 'Input',
+ componentProps: {
+ type: 'textarea',
+ rows: 4
+ },
+ colProps: {
+ span: 24
+ }
+ }
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/oauth2/client/index.vue b/src/views/system/oauth2/client/index.vue
index fa04e6d3..9ff44692 100644
--- a/src/views/system/oauth2/client/index.vue
+++ b/src/views/system/oauth2/client/index.vue
@@ -1,185 +1,207 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
+
+
+
+
+
+
+
+ {{ row.accessTokenValiditySeconds + '秒' }}
+
+
+ {{ row.refreshTokenValiditySeconds + '秒' }}
+
+
+
- 新增
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.accessTokenValiditySeconds }} 秒
-
-
- {{ scope.row.refreshTokenValiditySeconds }} 秒
-
-
-
-
- {{ authorizedGrantType }}
-
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+ {{ row.accessTokenValiditySeconds + '秒' }}
+
+
+ {{ row.refreshTokenValiditySeconds + '秒' }}
+
+
+
+ {{ authorizedGrantType }}
+
+
+
+
+ {{ scopes }}
+
+
+
+
+ {{ autoApproveScopes }}
+
+
+
+
+ {{ redirectUris }}
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/views/system/oauth2/token/index.vue b/src/views/system/oauth2/token/index.vue
index a809e452..f0dfbd9c 100644
--- a/src/views/system/oauth2/token/index.vue
+++ b/src/views/system/oauth2/token/index.vue
@@ -1,159 +1,64 @@
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 强退
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/oauth2/token/token.data.ts b/src/views/system/oauth2/token/token.data.ts
new file mode 100644
index 00000000..8a0e8486
--- /dev/null
+++ b/src/views/system/oauth2/token/token.data.ts
@@ -0,0 +1,48 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: null,
+ action: true,
+ columns: [
+ {
+ title: '用户编号',
+ field: 'userId',
+ isSearch: true
+ },
+ {
+ title: '访问令牌',
+ field: 'accessToken'
+ },
+ {
+ title: '刷新令牌',
+ field: 'refreshToken'
+ },
+ {
+ title: '客户端编号',
+ field: 'clientId',
+ isSearch: true
+ },
+ {
+ title: '用户类型',
+ field: 'userType',
+ dictType: DICT_TYPE.USER_TYPE,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false
+ },
+ {
+ title: '过期时间',
+ field: 'expiresTime',
+ formatter: 'formatDate',
+ isForm: false
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/operatelog/index.vue b/src/views/system/operatelog/index.vue
index c5713be1..7f1e9bb4 100644
--- a/src/views/system/operatelog/index.vue
+++ b/src/views/system/operatelog/index.vue
@@ -1,208 +1,67 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
- 导出
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.resultCode === 0 ? '成功' : '失败' }}
-
-
-
-
-
- {{ scope.row.duration }} ms
-
-
-
-
-
- 详情
-
-
-
-
-
-
-
-
-
-
+
+
+ {{ row.duration + 'ms' }}
+
+
+ {{ row.resultCode === 0 ? '成功' : '失败' }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.resultCode === 0 ? '成功' : '失败' }}
+
+
+ {{ row.duration + 'ms' }}
+
+
+
+
+
+
+
diff --git a/src/views/system/operatelog/operatelog.data.ts b/src/views/system/operatelog/operatelog.data.ts
new file mode 100644
index 00000000..f8b4ef90
--- /dev/null
+++ b/src/views/system/operatelog/operatelog.data.ts
@@ -0,0 +1,106 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+
+const { t } = useI18n() // 国际化
+
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '日志编号',
+ action: true,
+ actionWidth: '80px',
+ columns: [
+ {
+ title: '操作模块',
+ field: 'module',
+ isSearch: true
+ },
+ {
+ title: '操作名',
+ field: 'name'
+ },
+ {
+ title: '操作类型',
+ field: 'type',
+ dictType: DICT_TYPE.SYSTEM_OPERATE_TYPE,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '请求方法名',
+ field: 'requestMethod',
+ isTable: false
+ },
+ {
+ title: '请求地址',
+ field: 'requestUrl',
+ isTable: false
+ },
+ {
+ title: '操作人员',
+ field: 'userNickname',
+ isSearch: true
+ },
+ {
+ title: '操作明细',
+ field: 'content',
+ isTable: false
+ },
+ {
+ title: '用户 IP',
+ field: 'userIp',
+ isTable: false
+ },
+ {
+ title: 'userAgent',
+ field: 'userAgent'
+ },
+ {
+ title: '操作结果',
+ field: 'resultCode',
+ table: {
+ slots: {
+ default: 'resultCode'
+ }
+ }
+ },
+ {
+ title: '操作结果',
+ field: 'success',
+ isTable: false,
+ isDetail: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: '$select',
+ props: { placeholder: t('common.selectText') },
+ options: [
+ { label: '成功', value: 'true' },
+ { label: '失败', value: 'false' }
+ ]
+ }
+ }
+ },
+ {
+ title: '操作日期',
+ field: 'startTime',
+ formatter: 'formatDate',
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ },
+ {
+ title: '执行时长',
+ field: 'duration',
+ table: {
+ slots: {
+ default: 'duration'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/post/form.vue b/src/views/system/post/form.vue
new file mode 100644
index 00000000..065aecaf
--- /dev/null
+++ b/src/views/system/post/form.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue
index 03e491d0..c5a13e1e 100644
--- a/src/views/system/post/index.vue
+++ b/src/views/system/post/index.vue
@@ -1,198 +1,71 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
+
+
+
+
- 新增
-
-
+
+
- 导出
-
-
-
+ preIcon="ep:download"
+ :title="t('action.export')"
+ v-hasPermi="['system:post:export']"
+ @click="exportList('岗位列表.xls')"
+ />
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
+
+
-
diff --git a/src/views/system/post/post.data.ts b/src/views/system/post/post.data.ts
new file mode 100644
index 00000000..4926bcc6
--- /dev/null
+++ b/src/views/system/post/post.data.ts
@@ -0,0 +1,58 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+
+// 表单校验
+export const rules = reactive({
+ name: [required],
+ code: [required],
+ sort: [required]
+})
+
+// 增删改查 CrudSchema 配置
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '岗位编号',
+ action: true,
+ columns: [
+ {
+ title: '岗位名称',
+ field: 'name',
+ isSearch: true
+ },
+ {
+ title: '岗位编码',
+ field: 'code',
+ isSearch: true
+ },
+ {
+ title: '岗位顺序',
+ field: 'sort',
+ form: {
+ component: 'InputNumber'
+ }
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '备注',
+ field: 'remark',
+ isTable: false
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false,
+ table: {
+ width: 180
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 71f0c415..da4b8389 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -1,251 +1,331 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dataScopeForm.name }}
-
-
+
+ {{ dataScopeForm.code }}
+
+
+
+
-
-
-
-
- 搜索
- 重置
-
- 新增
-
-
- 导出
-
-
+
+
+
+
+
+
+ 父子联动(选中父节点,自动选择子节点):
+
+ 全选/全不选:
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
- 编辑
-
-
- 菜单权限
-
-
- 数据权限
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
diff --git a/src/views/system/role/role.data.ts b/src/views/system/role/role.data.ts
new file mode 100644
index 00000000..d55b5e21
--- /dev/null
+++ b/src/views/system/role/role.data.ts
@@ -0,0 +1,82 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+// 国际化
+const { t } = useI18n()
+// 表单校验
+export const rules = reactive({
+ name: [required],
+ code: [required],
+ sort: [required]
+})
+// CrudSchema
+const crudSchemas = reactive({
+ // primaryKey: 'id',
+ // primaryTitle: '角色编号',
+ // primaryType: 'seq',
+ action: true,
+ actionWidth: '400px',
+ columns: [
+ {
+ title: '角色编号',
+ field: 'id',
+ table: {
+ width: 200
+ }
+ },
+ {
+ title: '角色名称',
+ field: 'name',
+ isSearch: true
+ },
+ {
+ title: '角色类型',
+ field: 'type',
+ dictType: DICT_TYPE.SYSTEM_ROLE_TYPE,
+ dictClass: 'number',
+ isForm: false
+ },
+ {
+ title: '角色标识',
+ field: 'code',
+ isSearch: true
+ },
+ {
+ title: '显示顺序',
+ field: 'sort'
+ },
+ {
+ title: t('form.remark'),
+ field: 'remark',
+ isTable: false,
+ form: {
+ component: 'Input',
+ componentProps: {
+ type: 'textarea',
+ rows: 4
+ },
+ colProps: {
+ span: 24
+ }
+ }
+ },
+ {
+ 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,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/sensitiveWord/index.vue b/src/views/system/sensitiveWord/index.vue
index 5b73132b..c3de895d 100644
--- a/src/views/system/sensitiveWord/index.vue
+++ b/src/views/system/sensitiveWord/index.vue
@@ -1,241 +1,191 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
+
+
+
+
- 新增
-
-
+
+
+
+
+
- 导出
-
-
- 测试
-
-
-
+ {{ tag }}
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ tag }}
-
-
-
-
+
+
+
+
+
+
+ {{ tag }}
+
+
+
+
+
+
+
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/src/views/system/sensitiveWord/sensitiveWord.data.ts b/src/views/system/sensitiveWord/sensitiveWord.data.ts
new file mode 100644
index 00000000..d21bb94c
--- /dev/null
+++ b/src/views/system/sensitiveWord/sensitiveWord.data.ts
@@ -0,0 +1,74 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+
+// 表单校验
+export const rules = reactive({
+ name: [required],
+ tags: [required]
+})
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '敏感词编号',
+ action: true,
+ columns: [
+ {
+ title: '敏感词',
+ field: 'name',
+ isSearch: true
+ },
+ {
+ title: '标签',
+ field: 'tag',
+ isTable: false,
+ isForm: false,
+ isDetail: false,
+ isSearch: true
+ },
+ {
+ title: '标签',
+ field: 'tags',
+ table: {
+ slots: {
+ default: 'tags_default'
+ }
+ }
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '描述',
+ field: 'description',
+ form: {
+ component: 'Input',
+ componentProps: {
+ type: 'textarea',
+ rows: 4
+ },
+ colProps: {
+ span: 24
+ }
+ }
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/sms/smsChannel/index.vue b/src/views/system/sms/smsChannel/index.vue
new file mode 100644
index 00000000..ee47a51a
--- /dev/null
+++ b/src/views/system/sms/smsChannel/index.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/sms/smsChannel/sms.channel.data.ts b/src/views/system/sms/smsChannel/sms.channel.data.ts
new file mode 100644
index 00000000..71b096e5
--- /dev/null
+++ b/src/views/system/sms/smsChannel/sms.channel.data.ts
@@ -0,0 +1,76 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
+
+const { t } = useI18n() // 国际化
+
+const authorizedGrantOptions = getStrDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE)
+
+// 表单校验
+export const rules = reactive({
+ signature: [required],
+ code: [required],
+ apiKey: [required],
+ status: [required]
+})
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '渠道编号',
+ action: true,
+ columns: [
+ {
+ title: '短信签名',
+ field: 'signature',
+ isSearch: true
+ },
+ {
+ title: '渠道编码',
+ field: 'code',
+ // dictType: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE,
+ // dictClass: 'string',
+ isSearch: true,
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: authorizedGrantOptions,
+ multiple: false,
+ filterable: true
+ }
+ }
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '短信 API 的账号',
+ field: 'apiKey'
+ },
+ {
+ title: '短信 API 的密钥',
+ field: 'apiSecret'
+ },
+ {
+ title: '短信发送回调 URL',
+ field: 'callbackUrl'
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/sms/smsLog/index.vue b/src/views/system/sms/smsLog/index.vue
new file mode 100644
index 00000000..334da2ad
--- /dev/null
+++ b/src/views/system/sms/smsLog/index.vue
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/sms/smsLog/sms.log.data.ts b/src/views/system/sms/smsLog/sms.log.data.ts
new file mode 100644
index 00000000..c975bb0f
--- /dev/null
+++ b/src/views/system/sms/smsLog/sms.log.data.ts
@@ -0,0 +1,93 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
+
+const { t } = useI18n() // 国际化
+
+const authorizedGrantOptions = getStrDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE)
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '日志编号',
+ action: true,
+ columns: [
+ {
+ title: '手机号',
+ field: 'mobile',
+ isSearch: true
+ },
+ {
+ title: '短信内容',
+ field: 'templateContent'
+ },
+ {
+ title: '模板编号',
+ field: 'templateId',
+ isSearch: true
+ },
+ {
+ title: '短信渠道',
+ field: 'channelId',
+ // dictType: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE,
+ // dictClass: 'number',
+ isSearch: true,
+ // table: {
+ // component: 'Select',
+ componentProps: {
+ options: authorizedGrantOptions
+ // multiple: false,
+ // filterable: true
+ }
+ // }
+ },
+ {
+ title: '发送状态',
+ field: 'sendStatus',
+ dictType: DICT_TYPE.SYSTEM_SMS_SEND_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '发送时间',
+ field: 'sendTime',
+ formatter: 'formatDate',
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ },
+ {
+ title: '短信类型',
+ field: 'templateType',
+ dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '接收状态',
+ field: 'receiveStatus',
+ dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: '接收时间',
+ field: 'receiveTime',
+ formatter: 'formatDate',
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate'
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/sms/smsTemplate/index.vue b/src/views/system/sms/smsTemplate/index.vue
new file mode 100644
index 00000000..bbc7c863
--- /dev/null
+++ b/src/views/system/sms/smsTemplate/index.vue
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/sms/smsTemplate/sms.template.data.ts b/src/views/system/sms/smsTemplate/sms.template.data.ts
new file mode 100644
index 00000000..6178d6c2
--- /dev/null
+++ b/src/views/system/sms/smsTemplate/sms.template.data.ts
@@ -0,0 +1,107 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+import * as smsApi from '@/api/system/sms/smsChannel'
+const { t } = useI18n() // 国际化
+const tenantPackageOption = []
+const getTenantPackageOptions = async () => {
+ const res = await smsApi.getSimpleSmsChannels()
+ console.log(res, 'resresres')
+ res.forEach((tenantPackage: TenantPackageVO) => {
+ tenantPackageOption.push({
+ key: tenantPackage.id,
+ value: tenantPackage.id,
+ label: tenantPackage.signature
+ })
+ })
+}
+getTenantPackageOptions()
+// 表单校验
+export const rules = reactive({
+ type: [required],
+ status: [required],
+ code: [required],
+ name: [required],
+ content: [required],
+ apiTemplateId: [required],
+ channelId: [required]
+})
+
+// CrudSchema
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '模板编号',
+ action: true,
+ actionWidth: '280',
+ columns: [
+ {
+ title: '短信渠道编码',
+ field: 'channelId',
+ isSearch: false,
+ isForm: true,
+ isTable: false,
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: tenantPackageOption
+ }
+ }
+ },
+ {
+ title: '模板编码',
+ field: 'code',
+ isSearch: true
+ },
+ {
+ title: '模板名称',
+ field: 'name',
+ isSearch: true
+ },
+ {
+ title: '模板内容',
+ field: 'content'
+ },
+ {
+ title: '短信 API 的模板编号',
+ field: 'apiTemplateId',
+ isSearch: true
+ },
+ {
+ title: '短信类型',
+ field: 'type',
+ dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
+ dictClass: 'number',
+ isSearch: true,
+ table: {
+ width: 80
+ }
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true,
+ table: {
+ width: 80
+ }
+ },
+ {
+ title: t('form.remark'),
+ field: 'remark',
+ isTable: false
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue
index 1991fbea..bb1ca1a3 100644
--- a/src/views/system/tenant/index.vue
+++ b/src/views/system/tenant/index.vue
@@ -1,257 +1,197 @@
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
-
-
-
- 重置
-
-
-
- 新增
-
-
-
- 导出
-
-
-
+ @click="exportList('租户列表.xls')"
+ />
+
+
+ {{ row.accountCount }}
+
+
+ 系统租户
+ {{ getPackageName(row.packageId) }}
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- 系统租户
-
- {{ item.name }}
-
-
-
-
-
-
-
-
- {{ scope.row.accountCount }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
- 删除
-
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+ 系统租户
+ {{ getPackageName(row.packageId) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts
new file mode 100644
index 00000000..2c1e846a
--- /dev/null
+++ b/src/views/system/tenant/tenant.data.ts
@@ -0,0 +1,190 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+import { getTenantPackageList, TenantPackageVO } from '@/api/system/tenantPackage'
+import { ComponentOptions } from '@/types/components'
+
+const { t } = useI18n() // 国际化
+
+export const tenantPackageOption: ComponentOptions[] = []
+const getTenantPackageOptions = async () => {
+ const res = await getTenantPackageList()
+ res.forEach((tenantPackage: TenantPackageVO) => {
+ tenantPackageOption.push({
+ key: tenantPackage.id,
+ value: tenantPackage.id,
+ label: tenantPackage.name
+ })
+ })
+
+ return tenantPackageOption
+}
+getTenantPackageOptions()
+
+const validateName = (rule: any, value: any, callback: any) => {
+ const reg = /^[a-zA-Z0-9]{4,30}$/
+ if (value === '') {
+ callback(new Error('请输入用户名称'))
+ } else {
+ console.log(reg.test(rule), 'reg.test(rule)')
+ if (!reg.test(value)) {
+ callback(new Error('用户名称由 数字、字母 组成'))
+ } else {
+ callback()
+ }
+ }
+}
+const validateMobile = (rule: any, value: any, callback: any) => {
+ const reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
+ if (value === '') {
+ callback(new Error('请输入联系手机'))
+ } else {
+ if (!reg.test(value)) {
+ callback(new Error('请输入正确的手机号'))
+ } else {
+ callback()
+ }
+ }
+}
+
+// 表单校验
+export const rules = reactive({
+ name: [required],
+ packageId: [required],
+ contactName: [required],
+ contactMobile: [
+ required,
+ {
+ validator: validateMobile,
+ trigger: 'blur'
+ }
+ ],
+ accountCount: [required],
+ expireTime: [required],
+ username: [
+ required,
+ {
+ min: 4,
+ max: 30,
+ trigger: 'blur',
+ message: '用户名称长度为 4-30 个字符'
+ },
+ { validator: validateName, trigger: 'blur' }
+ ],
+ password: [
+ required,
+ {
+ min: 4,
+ max: 16,
+ trigger: 'blur',
+ message: '密码长度为 4-16 位'
+ }
+ ],
+ domain: [required],
+ status: [required]
+})
+
+// CrudSchema.
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryTitle: '租户编号',
+ primaryType: 'id',
+ action: true,
+ columns: [
+ {
+ title: '租户名称',
+ field: 'name',
+ isSearch: true
+ },
+ {
+ title: '租户套餐',
+ field: 'packageId',
+ table: {
+ slots: {
+ default: 'packageId_default'
+ }
+ },
+ form: {
+ component: 'Select',
+ componentProps: {
+ options: tenantPackageOption
+ }
+ }
+ },
+ {
+ title: '联系人',
+ field: 'contactName',
+ isSearch: true
+ },
+ {
+ title: '联系手机',
+ field: 'contactMobile',
+ isSearch: true
+ },
+ {
+ title: '用户名称',
+ field: 'username',
+ isTable: false,
+ isDetail: false
+ },
+ {
+ title: '用户密码',
+ field: 'password',
+ isTable: false,
+ isDetail: false,
+ form: {
+ component: 'InputPassword'
+ }
+ },
+ {
+ title: '账号额度',
+ field: 'accountCount',
+ table: {
+ slots: {
+ default: 'accountCount_default'
+ }
+ },
+ form: {
+ component: 'InputNumber',
+ value: null,
+ componentProps: {
+ min: 1
+ }
+ }
+ },
+ {
+ title: '过期时间',
+ field: 'expireTime',
+ formatter: 'formatDate',
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ type: 'datetime',
+ valueFormat: 'x'
+ }
+ }
+ },
+ {
+ title: '绑定域名',
+ field: 'domain'
+ },
+ {
+ title: '租户状态',
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true
+ },
+ {
+ title: t('table.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue
index 7e99815d..c8f5756a 100644
--- a/src/views/system/tenantPackage/index.vue
+++ b/src/views/system/tenantPackage/index.vue
@@ -1,172 +1,187 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
+
+
+
-
- 新增
-
-
-
+ preIcon="ep:zoom-in"
+ :title="t('action.add')"
+ @click="handleCreate()"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ formatDate(scope.row.createTime) }}
-
-
-
-
-
- 修改
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts
new file mode 100644
index 00000000..d57dee29
--- /dev/null
+++ b/src/views/system/tenantPackage/tenantPackage.data.ts
@@ -0,0 +1,73 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+const { t } = useI18n() // 国际化
+
+// 表单校验
+export const rules = reactive({
+ name: [required],
+ id: [required],
+ type: [required],
+ remark: [required],
+ status: [required],
+ menuIds: [required]
+})
+
+// CrudSchema
+const crudSchemas = reactive({
+ 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',
+ isSearch: true
+ },
+ {
+ title: '菜单权限',
+ field: 'menuIds',
+ isTable: false,
+ form: {
+ colProps: {
+ span: 24
+ }
+ }
+ },
+ {
+ title: t('form.remark'),
+ field: 'remark',
+ isTable: true,
+ isSearch: true,
+ form: {
+ component: 'Input',
+ componentProps: {
+ type: 'textarea',
+ rows: 4
+ },
+ colProps: {
+ span: 24
+ }
+ }
+ },
+ {
+ title: '创建时间',
+ field: 'createTime',
+ formatter: 'formatDate',
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index b0f7f964..c59e6d18 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -1,350 +1,577 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
- 新增
-
-
- 导入
-
-
- 导出
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 修改
-
- handleCommand(command, scope.row)"
- v-hasPermi="[
- 'system:user:delete',
- 'system:user:update-password',
- 'system:permission:assign-user-role'
- ]"
- >
- 更多
-
-
-
- 删除
-
-
- 重置密码
-
-
- 分配角色
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dataFormater(row.deptId) }}
+
+
+
+
+
+ {{ post === postObj.id ? postObj.name : '' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userRole.username }}
+
+
+ {{ userRole.nickname }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 将文件拖到此处,或点击上传
+
+ 请上传 .xls , .xlsx 标准格式文件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts
new file mode 100644
index 00000000..2ea4d268
--- /dev/null
+++ b/src/views/system/user/user.data.ts
@@ -0,0 +1,138 @@
+import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
+// 国际化
+const { t } = useI18n()
+const validateMobile = (rule: any, value: any, callback: any) => {
+ const reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
+ if (value === '') {
+ callback(new Error('请输入联系手机'))
+ } else {
+ if (!reg.test(value)) {
+ callback(new Error('请输入正确的手机号'))
+ } else {
+ callback()
+ }
+ }
+}
+// 表单校验
+export const rules = reactive({
+ username: [required],
+ nickname: [required],
+ password: [required],
+ deptId: [required],
+ email: [
+ { required: true, message: t('profile.rules.mail'), trigger: 'blur' },
+ {
+ type: 'email',
+ message: t('profile.rules.truemail'),
+ trigger: ['blur', 'change']
+ }
+ ],
+ status: [required],
+ postIds: [required],
+ mobile: [
+ required,
+ {
+ len: 11,
+ trigger: 'blur',
+ message: '请输入正确的手机号码'
+ },
+ { validator: validateMobile, trigger: 'blur' }
+ ]
+})
+// crudSchemas
+const crudSchemas = reactive({
+ primaryKey: 'id',
+ primaryType: 'id',
+ primaryTitle: '用户编号',
+ action: true,
+ actionWidth: '200px',
+ columns: [
+ {
+ title: '用户账号',
+ field: 'username',
+ isSearch: true
+ },
+ {
+ title: '用户密码',
+ field: 'password',
+ isDetail: false,
+ isTable: false,
+ form: {
+ component: 'InputPassword'
+ }
+ },
+ {
+ title: '用户' + t('profile.user.sex'),
+ field: 'sex',
+ dictType: DICT_TYPE.SYSTEM_USER_SEX,
+ dictClass: 'number',
+ table: { show: false }
+ },
+ {
+ title: '用户昵称',
+ field: 'nickname'
+ },
+ {
+ title: '用户邮箱',
+ field: 'email'
+ },
+ {
+ title: '手机号码',
+ field: 'mobile',
+ isSearch: true
+ },
+ {
+ title: '部门',
+ field: 'deptId',
+ isTable: false
+ },
+ {
+ title: t('common.status'),
+ field: 'status',
+ dictType: DICT_TYPE.COMMON_STATUS,
+ dictClass: 'number',
+ isSearch: true,
+ table: {
+ slots: {
+ default: 'status_default'
+ }
+ }
+ },
+ {
+ title: '岗位',
+ field: 'postIds',
+ isTable: false
+ },
+ {
+ title: '最后登录时间',
+ field: 'loginDate',
+ formatter: 'formatDate',
+ isForm: false
+ },
+ {
+ title: '最后登录IP',
+ field: 'loginIp',
+ isTable: false,
+ isForm: false
+ },
+ {
+ title: t('form.remark'),
+ field: 'remark',
+ isTable: false
+ },
+ {
+ title: t('common.createTime'),
+ field: 'createTime',
+ formatter: 'formatDate',
+ isTable: false,
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
+ }
+ ]
+})
+export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/tsconfig.json b/tsconfig.json
index b97c7079..6b412cd8 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -32,7 +32,6 @@
"vite-plugin-svg-icons/client",
"@form-create/element-ui/types"
],
- "outDir": "target", // 请保留这个属性,防止tsconfig.json文件报错
"typeRoots": ["./node_modules/@types/", "./types"]
},
"include": [
@@ -41,5 +40,5 @@
"src/types/auto-imports.d.ts",
"src/types/auto-components.d.ts"
],
- "exclude": ["dist", "target", "node_modules"]
+ "exclude": ["dist", "node_modules"]
}
diff --git a/types/components.d.ts b/types/components.d.ts
index 9d0ba09a..85db5663 100644
--- a/types/components.d.ts
+++ b/types/components.d.ts
@@ -1,7 +1,6 @@
declare module 'vue' {
export interface GlobalComponents {
- Icon: typeof import('@/components/Icon')['Icon']
- DictTag: typeof import('@/components/DictTag')['DictTag']
+ Icon: typeof import('../components/Icon/src/Icon.vue')['default']
}
}
diff --git a/types/global.d.ts b/types/global.d.ts
index 5e292687..3685ffbd 100644
--- a/types/global.d.ts
+++ b/types/global.d.ts
@@ -1,29 +1,29 @@
export {}
declare global {
- interface Fn {
+ declare interface Fn {
(...arg: T[]): T
}
- type Nullable = T | null
+ declare type Nullable = T | null
- type ElRef = Nullable
+ declare type ElRef = Nullable
- type Recordable = Record
+ declare type Recordable = Record
- type ComponentRef = InstanceType
+ declare type ComponentRef = InstanceType
- type LocaleType = 'zh-CN' | 'en'
+ declare type LocaleType = 'zh-CN' | 'en'
- type AxiosHeaders =
+ declare type AxiosHeaders =
| 'application/json'
| 'application/x-www-form-urlencoded'
| 'multipart/form-data'
- type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT'
+ declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT'
- type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
+ declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
- interface AxiosConfig {
+ declare interface AxiosConfig {
params?: any
data?: any
url?: string
@@ -32,17 +32,17 @@ declare global {
responseType?: AxiosResponseType
}
- interface IResponse {
+ declare interface IResponse {
code: string
data: T extends any ? T : T & any
}
- interface PageParam {
+ declare interface PageParam {
pageSize?: number
pageNo?: number
}
- interface Tree {
+ declare interface Tree {
id: number
name: string
children?: Tree[] | any[]
diff --git a/types/router.d.ts b/types/router.d.ts
index 9b08b805..10ba0c15 100644
--- a/types/router.d.ts
+++ b/types/router.d.ts
@@ -54,7 +54,7 @@ type Component =
| (() => Promise)
declare global {
- interface AppRouteRecordRaw extends Omit {
+ declare interface AppRouteRecordRaw extends Omit {
name: string
meta: RouteMeta
component?: Component | string
@@ -64,7 +64,7 @@ declare global {
keepAlive?: boolean
}
- interface AppCustomRouteRecordRaw extends Omit {
+ declare interface AppCustomRouteRecordRaw extends Omit {
icon: any
name: string
meta: RouteMeta
diff --git a/vite.config.ts b/vite.config.ts
index fe2d7131..6b54e183 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -42,7 +42,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
// },
},
// 项目使用的vite插件。 单独提取到build/vite/plugin中管理
- plugins: createVitePlugins(),
+ plugins: createVitePlugins(env.VITE_APP_TITLE),
css: {
preprocessorOptions: {
scss: {