diff --git a/.gitignore b/.gitignore index 2500fdef..ac15926b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ dist-ssr /dist* *-lock.* pnpm-debug + .idea +.history diff --git a/package.json b/package.json index 8f1d24e7..683d09eb 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@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", @@ -58,6 +59,7 @@ "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", diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index d48253c3..95591ae3 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -4,6 +4,7 @@ export type Task = { id: string name: string } + export type ProcessInstanceVO = { id: number name: string diff --git a/src/api/infra/codegen/index.ts b/src/api/infra/codegen/index.ts index 54f00ff0..64701efe 100644 --- a/src/api/infra/codegen/index.ts +++ b/src/api/infra/codegen/index.ts @@ -1,57 +1,123 @@ import request from '@/config/axios' -import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types' + +export type CodegenTableVO = { + id: number + tableId: number + isParentMenuIdValid: boolean + dataSourceConfigId: number + scene: number + tableName: string + tableComment: string + remark: string + moduleName: string + businessName: string + className: string + classComment: string + author: string + createTime: Date + updateTime: Date + templateType: number + parentMenuId: number +} + +export type CodegenColumnVO = { + id: number + tableId: number + columnName: string + dataType: string + columnComment: string + nullable: number + primaryKey: number + autoIncrement: string + ordinalPosition: number + javaType: string + javaField: string + dictType: string + example: string + createOperation: number + updateOperation: number + listOperation: number + listOperationCondition: string + listOperationResult: number + htmlType: string +} + +export type DatabaseTableVO = { + name: string + comment: string +} + +export type CodegenDetailVO = { + table: CodegenTableVO + columns: CodegenColumnVO[] +} + +export type CodegenPreviewVO = { + filePath: string + code: string +} + +export type CodegenUpdateReqVO = { + table: CodegenTableVO | any + columns: CodegenColumnVO[] +} + +export type CodegenCreateListReqVO = { + dataSourceConfigId: number + tableNames: string[] +} // 查询列表代码生成表定义 -export const getCodegenTablePageApi = (params) => { +export const getCodegenTablePage = (params: PageParam) => { return request.get({ url: '/infra/codegen/table/page', params }) } // 查询详情代码生成表定义 -export const getCodegenTableApi = (id: number) => { +export const getCodegenTable = (id: number) => { return request.get({ url: '/infra/codegen/detail?tableId=' + id }) } // 新增代码生成表定义 -export const createCodegenTableApi = (data: CodegenCreateListReqVO) => { +export const createCodegenTable = (data: CodegenCreateListReqVO) => { return request.post({ url: '/infra/codegen/create', data }) } // 修改代码生成表定义 -export const updateCodegenTableApi = (data: CodegenUpdateReqVO) => { +export const updateCodegenTable = (data: CodegenUpdateReqVO) => { return request.put({ url: '/infra/codegen/update', data }) } // 基于数据库的表结构,同步数据库的表和字段定义 -export const syncCodegenFromDBApi = (id: number) => { +export const syncCodegenFromDB = (id: number) => { return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id }) } // 基于 SQL 建表语句,同步数据库的表和字段定义 -export const syncCodegenFromSQLApi = (id: number, sql: string) => { +export const syncCodegenFromSQL = (id: number, sql: string) => { return request.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql }) } // 预览生成代码 -export const previewCodegenApi = (id: number) => { +export const previewCodegen = (id: number) => { return request.get({ url: '/infra/codegen/preview?tableId=' + id }) } // 下载生成代码 -export const downloadCodegenApi = (id: number) => { +export const downloadCodegen = (id: number) => { return request.download({ url: '/infra/codegen/download?tableId=' + id }) } // 获得表定义 -export const getSchemaTableListApi = (params) => { +export const getSchemaTableList = (params) => { return request.get({ url: '/infra/codegen/db/table/list', params }) } // 基于数据库的表结构,创建代码生成器的表定义 -export const createCodegenListApi = (data) => { +export const createCodegenList = (data) => { return request.post({ url: '/infra/codegen/create-list', data }) } // 删除代码生成表定义 -export const deleteCodegenTableApi = (id: number) => { +export const deleteCodegenTable = (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 deleted file mode 100644 index be6a66ed..00000000 --- a/src/api/infra/codegen/types.ts +++ /dev/null @@ -1,61 +0,0 @@ -export type CodegenTableVO = { - id: number - tableId: number - isParentMenuIdValid: boolean - dataSourceConfigId: number - scene: number - tableName: string - tableComment: string - remark: string - moduleName: string - businessName: string - className: string - classComment: string - author: string - createTime: Date - updateTime: Date - templateType: number - parentMenuId: number -} - -export type CodegenColumnVO = { - id: number - tableId: number - columnName: string - dataType: string - columnComment: string - nullable: number - primaryKey: number - autoIncrement: string - ordinalPosition: number - javaType: string - javaField: string - dictType: string - example: string - createOperation: number - updateOperation: number - listOperation: number - listOperationCondition: string - listOperationResult: number - htmlType: string -} -export type DatabaseTableVO = { - name: string - comment: string -} -export type CodegenDetailVO = { - table: CodegenTableVO - columns: CodegenColumnVO[] -} -export type CodegenPreviewVO = { - filePath: string - code: string -} -export type CodegenUpdateReqVO = { - table: CodegenTableVO - columns: CodegenColumnVO[] -} -export type CodegenCreateListReqVO = { - dataSourceConfigId: number - tableNames: string[] -} diff --git a/src/api/infra/fileConfig/index.ts b/src/api/infra/fileConfig/index.ts index d6c00996..b72f18b7 100644 --- a/src/api/infra/fileConfig/index.ts +++ b/src/api/infra/fileConfig/index.ts @@ -17,7 +17,7 @@ export interface FileClientConfig { export interface FileConfigVO { id: number name: string - storage: number + storage: any master: boolean visible: boolean config: FileClientConfig diff --git a/src/api/system/notify/message/index.ts b/src/api/system/notify/message/index.ts index a42d75c2..e24c3f8c 100644 --- a/src/api/system/notify/message/index.ts +++ b/src/api/system/notify/message/index.ts @@ -15,31 +15,13 @@ 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 getNotifyMessagePageApi = async (params: NotifyMessagePageReqVO) => { +export const getNotifyMessagePage = async (params: PageParam) => { 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: NotifyMessageMyPageReqVO) => { +export const getMyNotifyMessagePage = async (params: PageParam) => { return await request.get({ url: '/system/notify-message/my-page', params }) } diff --git a/src/assets/imgs/profile.jpg b/src/assets/imgs/profile.jpg new file mode 100644 index 00000000..e4bcf879 Binary files /dev/null and b/src/assets/imgs/profile.jpg differ diff --git a/src/assets/imgs/wechat.png b/src/assets/imgs/wechat.png new file mode 100644 index 00000000..6afc5e41 Binary files /dev/null and b/src/assets/imgs/wechat.png differ diff --git a/src/plugins/formCreate/index.ts b/src/plugins/formCreate/index.ts index 69816d8a..0d72048e 100644 --- a/src/plugins/formCreate/index.ts +++ b/src/plugins/formCreate/index.ts @@ -10,6 +10,8 @@ import { ElTransfer, ElAlert, ElTabs, + ElTable, + ElTableColumn, ElTabPane } from 'element-plus' @@ -27,6 +29,8 @@ const components = [ ElTransfer, ElAlert, ElTabs, + ElTable, + ElTableColumn, ElTabPane ] diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 58d5601b..4d8c3dac 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -272,7 +272,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/process-instance/create', - component: () => import('@/views/bpm/processInstance/create.vue'), + component: () => import('@/views/bpm/processInstance/create/index.vue'), name: 'BpmProcessInstanceCreate', meta: { noCache: true, @@ -284,7 +284,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/process-instance/detail', - component: () => import('@/views/bpm/processInstance/detail.vue'), + component: () => import('@/views/bpm/processInstance/detail/index.vue'), name: 'BpmProcessInstanceDetail', meta: { noCache: true, diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts index 3607ce04..52d25d1e 100644 --- a/src/types/auto-components.d.ts +++ b/src/types/auto-components.d.ts @@ -68,6 +68,8 @@ declare module '@vue/runtime-core' { ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTransfer: typeof import('element-plus/es')['ElTransfer'] ElTree: typeof import('element-plus/es')['ElTree'] diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index 008bc929..d4dea9b5 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -196,3 +196,54 @@ export const dateFormatter = (row, column, cellValue) => { } return formatDate(cellValue) } + +/** + * 设置起始日期,时间为00:00:00 + * @param param 传入日期 + * @returns 带时间00:00:00的日期 + */ +export function beginOfDay(param: Date) { + return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 0, 0, 0, 0) +} + +/** + * 设置结束日期,时间为23:59:59 + * @param param 传入日期 + * @returns 带时间23:59:59的日期 + */ +export function endOfDay(param: Date) { + return new Date(param.getFullYear(), param.getMonth(), param.getDate(), 23, 59, 59, 999) +} + +/** + * 计算两个日期间隔天数 + * @param param1 日期1 + * @param param2 日期2 + */ +export function betweenDay(param1: Date, param2: Date) { + param1 = convertDate(param1) + param2 = convertDate(param2) + // 计算差值 + return Math.floor((param2.getTime() - param1.getTime()) / (24 * 3600 * 1000)) +} + +/** + * 日期计算 + * @param param1 日期 + * @param param2 添加的时间 + */ +export function addTime(param1: Date, param2: number) { + param1 = convertDate(param1) + return new Date(param1.getTime() + param2) +} + +/** + * 日期转换 + * @param param 日期 + */ +export function convertDate(param: Date | string) { + if (typeof param === 'string') { + return new Date(param) + } + return param +} diff --git a/src/views/bpm/definition/index.vue b/src/views/bpm/definition/index.vue index ce643ff6..66a6a23b 100644 --- a/src/views/bpm/definition/index.vue +++ b/src/views/bpm/definition/index.vue @@ -110,7 +110,7 @@ const queryParams = reactive({ key: query.key }) -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/bpm/form/index.vue b/src/views/bpm/form/index.vue index 7e14b3e3..616e60be 100644 --- a/src/views/bpm/form/index.vue +++ b/src/views/bpm/form/index.vue @@ -103,7 +103,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/bpm/group/index.vue b/src/views/bpm/group/index.vue index 5829ebad..0b52e9a2 100644 --- a/src/views/bpm/group/index.vue +++ b/src/views/bpm/group/index.vue @@ -132,7 +132,7 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const userList = ref([]) // 用户列表 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/bpm/model/index.vue b/src/views/bpm/model/index.vue index b19ed956..9a0d725f 100644 --- a/src/views/bpm/model/index.vue +++ b/src/views/bpm/model/index.vue @@ -248,7 +248,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/bpm/processInstance/create.vue b/src/views/bpm/processInstance/create.vue deleted file mode 100644 index b6fc0f49..00000000 --- a/src/views/bpm/processInstance/create.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - - diff --git a/src/views/bpm/processInstance/create/index.vue b/src/views/bpm/processInstance/create/index.vue new file mode 100644 index 00000000..dd043eae --- /dev/null +++ b/src/views/bpm/processInstance/create/index.vue @@ -0,0 +1,130 @@ + + diff --git a/src/views/bpm/processInstance/detail.vue b/src/views/bpm/processInstance/detail.vue deleted file mode 100644 index a34d8a1a..00000000 --- a/src/views/bpm/processInstance/detail.vue +++ /dev/null @@ -1,490 +0,0 @@ - - - - diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceBpmnViewer.vue b/src/views/bpm/processInstance/detail/ProcessInstanceBpmnViewer.vue new file mode 100644 index 00000000..3a3e244b --- /dev/null +++ b/src/views/bpm/processInstance/detail/ProcessInstanceBpmnViewer.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue new file mode 100644 index 00000000..3bbabcc6 --- /dev/null +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue @@ -0,0 +1,89 @@ + + diff --git a/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue b/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue new file mode 100644 index 00000000..7f9cfd48 --- /dev/null +++ b/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue @@ -0,0 +1,81 @@ + + diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue new file mode 100644 index 00000000..3a48b3b3 --- /dev/null +++ b/src/views/bpm/processInstance/detail/index.vue @@ -0,0 +1,277 @@ + + diff --git a/src/views/bpm/processInstance/process.create.ts b/src/views/bpm/processInstance/process.create.ts deleted file mode 100644 index 7516c0b4..00000000 --- a/src/views/bpm/processInstance/process.create.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// crudSchemas -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - columns: [ - { - title: '流程名称', - field: 'name' - }, - { - title: '流程分类', - field: 'category', - dictType: DICT_TYPE.BPM_MODEL_CATEGORY, - dictClass: 'number', - table: { - slots: { - default: 'category_default' - } - } - }, - { - title: '流程版本', - field: 'version', - table: { - slots: { - default: 'version_default' - } - } - }, - { - title: '流程描述', - field: 'description' - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/bpm/taskAssignRule/index.vue b/src/views/bpm/taskAssignRule/index.vue index feea80a2..4a4e76f8 100644 --- a/src/views/bpm/taskAssignRule/index.vue +++ b/src/views/bpm/taskAssignRule/index.vue @@ -56,7 +56,7 @@ const userOptions = ref([]) // 用户列表 const userGroupOptions = ref([]) // 用户组列表 const taskAssignScriptDictDatas = getIntDictOptions(DICT_TYPE.BPM_TASK_ASSIGN_SCRIPT) -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/infra/apiErrorLog/index.vue b/src/views/infra/apiErrorLog/index.vue index cfe4adb1..800b5043 100644 --- a/src/views/infra/apiErrorLog/index.vue +++ b/src/views/infra/apiErrorLog/index.vue @@ -182,7 +182,7 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/infra/codegen/EditTable.vue b/src/views/infra/codegen/EditTable.vue index 820d23ca..714b2761 100644 --- a/src/views/infra/codegen/EditTable.vue +++ b/src/views/infra/codegen/EditTable.vue @@ -1,67 +1,80 @@ diff --git a/src/views/infra/codegen/ImportTable.vue b/src/views/infra/codegen/ImportTable.vue new file mode 100644 index 00000000..b89b2923 --- /dev/null +++ b/src/views/infra/codegen/ImportTable.vue @@ -0,0 +1,142 @@ + + diff --git a/src/views/infra/codegen/components/Preview.vue b/src/views/infra/codegen/PreviewCode.vue similarity index 78% rename from src/views/infra/codegen/components/Preview.vue rename to src/views/infra/codegen/PreviewCode.vue index 2d9482ff..82307d59 100644 --- a/src/views/infra/codegen/components/Preview.vue +++ b/src/views/infra/codegen/PreviewCode.vue @@ -1,5 +1,11 @@ + diff --git a/src/views/infra/codegen/codegen.data.ts b/src/views/infra/codegen/codegen.data.ts deleted file mode 100644 index f3723a35..00000000 --- a/src/views/infra/codegen/codegen.data.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - title: [required], - type: [required], - status: [required] -}) - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'seq', - action: true, - actionWidth: '400px', - columns: [ - { - title: '表名称', - field: 'tableName', - isSearch: true - }, - { - title: '表描述', - field: 'tableComment', - isSearch: true - }, - { - title: '实体', - field: 'className', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: t('common.updateTime'), - field: 'updateTime', - formatter: 'formatDate', - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/codegen/components/BasicInfoForm.vue b/src/views/infra/codegen/components/BasicInfoForm.vue index 5ab820a2..21b280ee 100644 --- a/src/views/infra/codegen/components/BasicInfoForm.vue +++ b/src/views/infra/codegen/components/BasicInfoForm.vue @@ -1,183 +1,93 @@ diff --git a/src/views/infra/codegen/components/CloumInfoForm.vue b/src/views/infra/codegen/components/CloumInfoForm.vue deleted file mode 100644 index 5a60c546..00000000 --- a/src/views/infra/codegen/components/CloumInfoForm.vue +++ /dev/null @@ -1,137 +0,0 @@ - - diff --git a/src/views/infra/codegen/components/ColumInfoForm.vue b/src/views/infra/codegen/components/ColumInfoForm.vue new file mode 100644 index 00000000..33d29978 --- /dev/null +++ b/src/views/infra/codegen/components/ColumInfoForm.vue @@ -0,0 +1,157 @@ + + diff --git a/src/views/infra/codegen/components/GenerateInfoForm.vue b/src/views/infra/codegen/components/GenerateInfoForm.vue new file mode 100644 index 00000000..92bac8dd --- /dev/null +++ b/src/views/infra/codegen/components/GenerateInfoForm.vue @@ -0,0 +1,379 @@ + + diff --git a/src/views/infra/codegen/components/ImportTable.vue b/src/views/infra/codegen/components/ImportTable.vue deleted file mode 100644 index aebe7a8f..00000000 --- a/src/views/infra/codegen/components/ImportTable.vue +++ /dev/null @@ -1,123 +0,0 @@ - - diff --git a/src/views/infra/codegen/components/index.ts b/src/views/infra/codegen/components/index.ts index b84c5a03..1634a76f 100644 --- a/src/views/infra/codegen/components/index.ts +++ b/src/views/infra/codegen/components/index.ts @@ -1,5 +1,4 @@ import BasicInfoForm from './BasicInfoForm.vue' -import CloumInfoForm from './CloumInfoForm.vue' -import ImportTable from './ImportTable.vue' -import Preview from './Preview.vue' -export { BasicInfoForm, CloumInfoForm, ImportTable, Preview } +import ColumInfoForm from './ColumInfoForm.vue' +import GenerateInfoForm from './GenerateInfoForm.vue' +export { BasicInfoForm, ColumInfoForm, GenerateInfoForm } diff --git a/src/views/infra/codegen/index.vue b/src/views/infra/codegen/index.vue index 8337d2d4..64a270e5 100644 --- a/src/views/infra/codegen/index.vue +++ b/src/views/infra/codegen/index.vue @@ -1,107 +1,243 @@ diff --git a/src/views/infra/config/index.vue b/src/views/infra/config/index.vue index fcc3c12c..5fcafc07 100644 --- a/src/views/infra/config/index.vue +++ b/src/views/infra/config/index.vue @@ -153,7 +153,7 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/infra/dataSourceConfig/index.vue b/src/views/infra/dataSourceConfig/index.vue index ff44cdd5..ab3523e7 100644 --- a/src/views/infra/dataSourceConfig/index.vue +++ b/src/views/infra/dataSourceConfig/index.vue @@ -66,7 +66,7 @@ const { t } = useI18n() // 国际化 const loading = ref(true) // 列表的加载中 const list = ref([]) // 列表的数据 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/infra/file/index.vue b/src/views/infra/file/index.vue index adf9d3a4..32b35562 100644 --- a/src/views/infra/file/index.vue +++ b/src/views/infra/file/index.vue @@ -104,7 +104,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/infra/fileConfig/index.vue b/src/views/infra/fileConfig/index.vue index ed0cfed7..ca0fac15 100644 --- a/src/views/infra/fileConfig/index.vue +++ b/src/views/infra/fileConfig/index.vue @@ -130,7 +130,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/infra/job/JobLog.vue b/src/views/infra/job/JobLog.vue index ba397d51..daa20046 100644 --- a/src/views/infra/job/JobLog.vue +++ b/src/views/infra/job/JobLog.vue @@ -1,74 +1,179 @@ + diff --git a/src/views/infra/job/JobLogView.vue b/src/views/infra/job/JobLogView.vue new file mode 100644 index 00000000..c66e0d80 --- /dev/null +++ b/src/views/infra/job/JobLogView.vue @@ -0,0 +1,74 @@ + + diff --git a/src/views/infra/job/form.vue b/src/views/infra/job/form.vue new file mode 100644 index 00000000..24488fd7 --- /dev/null +++ b/src/views/infra/job/form.vue @@ -0,0 +1,172 @@ + + diff --git a/src/views/infra/job/index.vue b/src/views/infra/job/index.vue index 613f84c4..702b31fe 100644 --- a/src/views/infra/job/index.vue +++ b/src/views/infra/job/index.vue @@ -1,243 +1,175 @@ + diff --git a/src/views/infra/job/job.data.ts b/src/views/infra/job/job.data.ts deleted file mode 100644 index 38761cd7..00000000 --- a/src/views/infra/job/job.data.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 -// 表单校验 -export const rules = reactive({ - name: [required], - handlerName: [required], - cronExpression: [required], - retryCount: [required], - retryInterval: [required] -}) -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '任务编号', - action: true, - actionWidth: '280px', - columns: [ - { - title: '任务名称', - field: 'name', - isSearch: true - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.INFRA_JOB_STATUS, - dictClass: 'number', - isForm: false, - isSearch: true - }, - { - title: '处理器的名字', - field: 'handlerName', - isSearch: true - }, - { - title: '处理器的参数', - field: 'handlerParam', - isTable: false - }, - { - title: 'CRON 表达式', - field: 'cronExpression' - }, - { - title: '后续执行时间', - field: 'nextTimes', - isTable: false, - isForm: false - }, - { - title: '重试次数', - field: 'retryCount', - isTable: false - }, - { - title: '重试间隔', - field: 'retryInterval', - isTable: false - }, - { - title: '监控超时时间', - field: 'monitorTimeout', - isTable: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/job/jobLog.data.ts b/src/views/infra/job/jobLog.data.ts deleted file mode 100644 index ccca3d08..00000000 --- a/src/views/infra/job/jobLog.data.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -// 国际化 -const { t } = useI18n() -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '日志编号', - action: true, - columns: [ - { - title: '任务编号', - field: 'jobId', - isSearch: true - }, - { - title: '处理器的名字', - field: 'handlerName', - isSearch: true - }, - { - title: '处理器的参数', - field: 'handlerParam' - }, - { - title: '第几次执行', - field: 'executeIndex' - }, - { - title: '开始执行时间', - field: 'beginTime', - formatter: 'formatDate', - table: { - slots: { - default: 'beginTime_default' - } - }, - search: { - show: true, - itemRender: { - name: 'XDataPicker' - } - } - }, - { - title: '结束执行时间', - field: 'endTime', - formatter: 'formatDate', - isTable: false, - search: { - show: true, - itemRender: { - name: 'XDataPicker' - } - } - }, - { - title: '执行时长', - field: 'duration', - table: { - slots: { - default: 'duration_default' - } - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.INFRA_JOB_LOG_STATUS, - dictClass: 'number', - isSearch: true - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/job/utils.ts b/src/views/infra/job/utils.ts new file mode 100644 index 00000000..a3774f22 --- /dev/null +++ b/src/views/infra/job/utils.ts @@ -0,0 +1,44 @@ +export const parseTime = (time) => { + if (!time) { + return null + } + const format = '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if (typeof time === 'string' && /^[0-9]+$/.test(time)) { + time = parseInt(time) + } else if (typeof time === 'string') { + time = time + .replace(new RegExp(/-/gm), '/') + .replace('T', ' ') + .replace(new RegExp(/\.[\d]{3}/gm), '') + } + if (typeof time === 'number' && time.toString().length === 10) { + time = time * 1000 + } + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { + let value = formatObj[key] + // Note: getDay() returns 0 on Sunday + if (key === 'a') { + return ['日', '一', '二', '三', '四', '五', '六'][value] + } + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) + return time_str +} diff --git a/src/views/infra/job/view.vue b/src/views/infra/job/view.vue new file mode 100644 index 00000000..d195e0e3 --- /dev/null +++ b/src/views/infra/job/view.vue @@ -0,0 +1,89 @@ + + diff --git a/src/views/mp/account/index.vue b/src/views/mp/account/index.vue index 3489998b..2629c658 100644 --- a/src/views/mp/account/index.vue +++ b/src/views/mp/account/index.vue @@ -121,13 +121,13 @@ const queryFormRef = ref() // 搜索的表单 /** 查询列表 */ const getList = async () => { loading.value = true - // 处理查询参数 - let params = { ...queryParams } - // 执行查询 - const data = await AccountApi.getAccountPage(params) - list.value = data.list - total.value = data.total - loading.value = false + try { + const data = await AccountApi.getAccountPage(queryParams) + list.value = data.list + total.value = data.total + } finally { + loading.value = false + } } /** 搜索按钮操作 */ diff --git a/src/views/mp/components/wx-material-select/main.vue b/src/views/mp/components/wx-material-select/main.vue new file mode 100644 index 00000000..26b747e2 --- /dev/null +++ b/src/views/mp/components/wx-material-select/main.vue @@ -0,0 +1,302 @@ + + + + + + diff --git a/src/views/mp/components/wx-msg/main.vue b/src/views/mp/components/wx-msg/main.vue index b514a73e..215b4f97 100644 --- a/src/views/mp/components/wx-msg/main.vue +++ b/src/views/mp/components/wx-msg/main.vue @@ -6,7 +6,7 @@ ② 代码优化,补充注释,提升阅读性 --> - --> +.select-item { + width: 280px; + padding: 10px; + margin: 0 auto 10px auto; + border: 1px solid #eaeaea; +} + +.select-item2 { + padding: 10px; + margin: 0 auto 10px auto; + border: 1px solid #eaeaea; +} + +.ope-row { + padding-top: 10px; + text-align: center; +} + +.input-margin-bottom { + margin-bottom: 2%; +} + +.item-name { + font-size: 12px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + text-align: center; +} + +.el-form-item__content { + line-height: unset !important; +} + +.col-select { + border: 1px solid rgb(234, 234, 234); + padding: 50px 0px; + height: 160px; + width: 49.5%; +} + +.col-select2 { + border: 1px solid rgb(234, 234, 234); + padding: 50px 0px; + height: 160px; +} + +.col-add { + border: 1px solid rgb(234, 234, 234); + padding: 50px 0px; + height: 160px; + width: 49.5%; + float: right; +} + +.avatar-uploader-icon { + border: 1px solid #d9d9d9; + font-size: 28px; + color: #8c939d; + width: 100px !important; + height: 100px !important; + line-height: 100px !important; + text-align: center; +} + +.material-img { + width: 100%; +} + +.thumb-div { + display: inline-block; + text-align: center; +} + +.item-infos { + width: 30%; + margin: auto; +} + diff --git a/src/views/mp/components/wx-video-play/main.vue b/src/views/mp/components/wx-video-play/main.vue index 880d10f8..7dc4347c 100644 --- a/src/views/mp/components/wx-video-play/main.vue +++ b/src/views/mp/components/wx-video-play/main.vue @@ -8,110 +8,78 @@ 存在的问题:mediaId 有效期是 3 天,超过时间后无法播放 2)重构后的做法:后端接收到微信公众号的视频消息后,将视频消息的 media_id 的文件内容保存到文件服务器中,这样前端可以直接使用 URL 播放。 ② 体验优化:弹窗关闭后,自动暂停视频的播放 + --> - diff --git a/src/views/mp/components/wx-voice-play/main.vue b/src/views/mp/components/wx-voice-play/main.vue index 3260fc05..9ec8e2e9 100644 --- a/src/views/mp/components/wx-voice-play/main.vue +++ b/src/views/mp/components/wx-voice-play/main.vue @@ -25,6 +25,7 @@ diff --git a/src/views/mp/tag/index.vue b/src/views/mp/tag/index.vue index 84e6fc17..bedfbad8 100644 --- a/src/views/mp/tag/index.vue +++ b/src/views/mp/tag/index.vue @@ -28,13 +28,21 @@ /> - 搜索 - 重置 + + + 搜索 + + + + 重置 + - 新增 + + 新增 - 同步 + + 同步 @@ -91,6 +99,7 @@ import { dateFormatter } from '@/utils/formatTime' import * as MpTagApi from '@/api/mp/tag' import * as MpAccountApi from '@/api/mp/account' import TagForm from './TagForm.vue' + const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -106,7 +115,7 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const accountList = ref([]) // 公众号账号列表 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { // 如果没有选中公众号账号,则进行提示。 if (!queryParams.accountId) { diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue index 7b159481..8492262a 100644 --- a/src/views/system/dict/data.vue +++ b/src/views/system/dict/data.vue @@ -130,7 +130,7 @@ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 const dicts = ref() // 字典类型的列表 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/loginlog/index.vue b/src/views/system/loginlog/index.vue index 7b1aca5f..c48957a7 100644 --- a/src/views/system/loginlog/index.vue +++ b/src/views/system/loginlog/index.vue @@ -123,7 +123,7 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 3baf3148..8feb066b 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -126,7 +126,7 @@ const queryFormRef = ref() // 搜索的表单 const isExpandAll = ref(false) // 是否展开,默认全部折叠 const refreshTable = ref(true) // 重新渲染表格状态 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/notify/message/NotifyMessageDetail.vue b/src/views/system/notify/message/NotifyMessageDetail.vue new file mode 100644 index 00000000..283575bb --- /dev/null +++ b/src/views/system/notify/message/NotifyMessageDetail.vue @@ -0,0 +1,64 @@ + + diff --git a/src/views/system/notify/message/index.vue b/src/views/system/notify/message/index.vue index 93a8ed68..9a39e7f6 100644 --- a/src/views/system/notify/message/index.vue +++ b/src/views/system/notify/message/index.vue @@ -1,67 +1,208 @@ diff --git a/src/views/system/notify/message/message.data.ts b/src/views/system/notify/message/message.data.ts deleted file mode 100644 index 665311d2..00000000 --- a/src/views/system/notify/message/message.data.ts +++ /dev/null @@ -1,101 +0,0 @@ -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/MyNotifyMessageDetail.vue b/src/views/system/notify/my/MyNotifyMessageDetail.vue new file mode 100644 index 00000000..45af259d --- /dev/null +++ b/src/views/system/notify/my/MyNotifyMessageDetail.vue @@ -0,0 +1,46 @@ + + diff --git a/src/views/system/notify/my/index.vue b/src/views/system/notify/my/index.vue index 9f3e9b10..d423a98c 100644 --- a/src/views/system/notify/my/index.vue +++ b/src/views/system/notify/my/index.vue @@ -1,58 +1,213 @@ - diff --git a/src/views/system/notify/my/my.data.ts b/src/views/system/notify/my/my.data.ts deleted file mode 100644 index 103ed8ef..00000000 --- a/src/views/system/notify/my/my.data.ts +++ /dev/null @@ -1,58 +0,0 @@ -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/oauth2/token/index.vue b/src/views/system/oauth2/token/index.vue index 7e8aca22..a809e452 100644 --- a/src/views/system/oauth2/token/index.vue +++ b/src/views/system/oauth2/token/index.vue @@ -115,7 +115,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/operatelog/index.vue b/src/views/system/operatelog/index.vue index d7490ba8..c5713be1 100644 --- a/src/views/system/operatelog/index.vue +++ b/src/views/system/operatelog/index.vue @@ -156,7 +156,7 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/sensitiveWord/index.vue b/src/views/system/sensitiveWord/index.vue index cf1fdb82..5b73132b 100644 --- a/src/views/system/sensitiveWord/index.vue +++ b/src/views/system/sensitiveWord/index.vue @@ -168,7 +168,7 @@ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 const tagList = ref([]) // 标签数组 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/sms/channel/index.vue b/src/views/system/sms/channel/index.vue index 65d18029..62cd7cc2 100644 --- a/src/views/system/sms/channel/index.vue +++ b/src/views/system/sms/channel/index.vue @@ -146,7 +146,7 @@ const queryParams = reactive({ createTime: [] }) -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index e316992d..1991fbea 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -191,7 +191,7 @@ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 const packageList = ref([]) //租户套餐列表 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts index 47db56d4..d57dee29 100644 --- a/src/views/system/tenantPackage/tenantPackage.data.ts +++ b/src/views/system/tenantPackage/tenantPackage.data.ts @@ -43,7 +43,7 @@ const crudSchemas = reactive({ { title: t('form.remark'), field: 'remark', - isTable: false, + isTable: true, isSearch: true, form: { component: 'Input', diff --git a/src/views/system/user/RoleForm.vue b/src/views/system/user/RoleForm.vue index cb5603fe..0cb82df8 100644 --- a/src/views/system/user/RoleForm.vue +++ b/src/views/system/user/RoleForm.vue @@ -8,12 +8,12 @@ - + @@ -28,6 +28,7 @@ - - diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 138c7373..5b286cc7 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -269,6 +269,7 @@ import type { ElTree } from 'element-plus' import { handleTree, defaultProps } from '@/utils/tree' // 原vue3版本api方法都是Api结尾觉得见名知义,个人觉得这个可以形成规范 +// TODO 使用 DeptApi 这种形式哈 import { getSimpleDeptList as getSimpleDeptListApi } from '@/api/system/dept' import { getSimplePostList as getSimplePostListApi, PostVO } from '@/api/system/post' import { DICT_TYPE, getDictOptions } from '@/utils/dict' @@ -279,16 +280,15 @@ import { updateUserStatusApi, UserVO } from '@/api/system/user' -import { parseTime } from './utils' -import AddForm from './AddForm.vue' -import ImportForm from './ImportForm.vue' -import RoleForm from './RoleForm.vue' +import { parseTime } from './utils' // TODO 可以使用 formatTime 里的方法 +import AddForm from './AddForm.vue' // TODO 改成 UserForm +import ImportForm from './ImportForm.vue' // TODO 改成 UserImportForm +import RoleForm from './RoleForm.vue' // TODO 改成 UserAssignRoleForm import { getUserApi, getUserPageApi } from '@/api/system/user' import { getSimpleRoleList as getSimpleRoleListApi } from '@/api/system/role' import { listUserRolesApi } from '@/api/system/permission' import { CommonStatusEnum } from '@/utils/constants' import download from '@/utils/download' - const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -304,10 +304,11 @@ const queryParams = reactive({ const showSearch = ref(true) const showAddDialog = ref(false) -// 数据字典- +// 数据字典- // TODO 可以直接 vue 那 getIntDictOptions,这样一方面少个变量,也可以 getIntDictOptions const statusDictDatas = getDictOptions(DICT_TYPE.COMMON_STATUS) // ========== 创建部门树结构 ========== +// TODO 要不把部门树拆成一个左侧的组件,然后点击后触发 handleDeptNodeClick const deptName = ref('') watch( () => deptName.value, @@ -375,6 +376,7 @@ const resetQuery = () => { // 添加或编辑 const addEditFormRef = ref() // 添加用户 +// TODO 可以参考别的模块哈,openForm;然后 tree 和 position 可以里面在加载下,让组件自己维护自己哈。 const handleAdd = () => { addEditFormRef?.value.resetForm() // 获得下拉数据 @@ -389,6 +391,7 @@ const handleImport = () => { } // 用户导出 +// TODO 改成 await 的风格; const exportLoading = ref(false) const handleExport = () => { message @@ -432,6 +435,7 @@ const handleCommand = (command: string, index: number, row: UserVO) => { } // 用户状态修改 +// TODO 改成 await 的风格; const handleStatusChange = (row: UserVO) => { let text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用' message @@ -466,6 +470,7 @@ const handleUpdate = (row: UserVO) => { } // 删除用户 +// TODO 改成 await 的风格; const handleDelete = (row: UserVO) => { const ids = row.id message @@ -481,6 +486,7 @@ const handleDelete = (row: UserVO) => { } // 重置密码 +// TODO 改成 await 的风格; const handleResetPwd = (row: UserVO) => { message.prompt('请输入"' + row.username + '"的新密码', t('common.reminder')).then(({ value }) => { resetUserPwdApi(row.id, value)