diff --git a/.env b/.env index 5f2334a3..a77d490d 100644 --- a/.env +++ b/.env @@ -15,3 +15,6 @@ VITE_APP_CAPTCHA_ENABLE=true # 验证码的开关 VITE_APP_CAPTCHA_ENABLE=true + +# 百度统计 +VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc diff --git a/.env.dev b/.env.dev index 3b85e481..a52eec30 100644 --- a/.env.dev +++ b/.env.dev @@ -16,7 +16,7 @@ VITE_API_BASEPATH=/dev-api VITE_API_URL=/admin-api # 打包路径 -VITE_BASE_PATH=/dist-dev/ +VITE_BASE_PATH=/ # 是否删除debugger VITE_DROP_DEBUGGER=false diff --git a/package.json b/package.json index 48858528..def1f5c7 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "private": false, "scripts": { "i": "pnpm install", - "dev": "pnpm vite", + "dev": "vite --mode base", "front": "vite --mode front", "ts:check": "vue-tsc --noEmit", "build:pro": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode pro", diff --git a/src/api/bpm/leave/index.ts b/src/api/bpm/leave/index.ts index d4e1be73..d4fe8d58 100644 --- a/src/api/bpm/leave/index.ts +++ b/src/api/bpm/leave/index.ts @@ -22,6 +22,6 @@ export const getLeave = async (id: number) => { } // 获得请假申请分页 -export const getLeavePage = async (params) => { +export const getLeavePage = async (params: PageParam) => { return await request.get({ url: '/bpm/oa/leave/page', params }) } diff --git a/src/api/infra/redis/index.ts b/src/api/infra/redis/index.ts index 9856fa64..f27be77f 100644 --- a/src/api/infra/redis/index.ts +++ b/src/api/infra/redis/index.ts @@ -6,39 +6,3 @@ import request from '@/config/axios' export const getCache = () => { return request.get({ url: '/infra/redis/get-monitor-info' }) } - -// 获取模块 -export const getKeyDefineList = () => { - return request.get({ url: '/infra/redis/get-key-define-list' }) -} - -/** - * 获取redis key列表 - */ -export const getKeyList = (keyTemplate: string) => { - return request.get({ - url: '/infra/redis/get-key-list', - params: { - keyTemplate - } - }) -} - -// 获取缓存内容 -export const getKeyValue = (key: string) => { - return request.get({ url: '/infra/redis/get-key-value?key=' + key }) -} - -// 根据键名删除缓存 -export const deleteKey = (key: string) => { - return request.delete({ url: '/infra/redis/delete-key?key=' + key }) -} - -export const deleteKeys = (keyTemplate: string) => { - return request.delete({ - url: '/infra/redis/delete-keys?', - params: { - keyTemplate - } - }) -} diff --git a/src/api/infra/redis/types.ts b/src/api/infra/redis/types.ts index 2342e543..548bfe96 100644 --- a/src/api/infra/redis/types.ts +++ b/src/api/infra/redis/types.ts @@ -174,12 +174,3 @@ export interface RedisCommandStatsVO { calls: number usec: number } - -export interface RedisKeyInfo { - keyTemplate: string - keyType: string - valueType: string - timeoutType: number - timeout: number - memo: string -} diff --git a/src/api/login/index.ts b/src/api/login/index.ts index 2255e3cf..536f6a66 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -2,15 +2,11 @@ import request from '@/config/axios' import { getRefreshToken } from '@/utils/auth' import type { UserLoginVO } from './types' -export interface CodeImgResult { - captchaOnOff: boolean - img: string - uuid: string -} export interface SmsCodeVO { mobile: string scene: number } + export interface SmsLoginVO { mobile: string code: string diff --git a/src/api/login/oauth2/index.ts b/src/api/login/oauth2/index.ts new file mode 100644 index 00000000..aef1820d --- /dev/null +++ b/src/api/login/oauth2/index.ts @@ -0,0 +1,41 @@ +import request from '@/config/axios' + +// 获得授权信息 +export const getAuthorize = (clientId: string) => { + return request.get({ url: '/system/oauth2/authorize?clientId=' + clientId }) +} + +// 发起授权 +export const authorize = ( + responseType: string, + clientId: string, + redirectUri: string, + state: string, + autoApprove: boolean, + checkedScopes: string[], + uncheckedScopes: string[] +) => { + // 构建 scopes + const scopes = {} + for (const scope of checkedScopes) { + scopes[scope] = true + } + for (const scope of uncheckedScopes) { + scopes[scope] = false + } + // 发起请求 + return request.post({ + url: '/system/oauth2/authorize', + headers: { + 'Content-type': 'application/x-www-form-urlencoded' + }, + params: { + response_type: responseType, + client_id: clientId, + redirect_uri: redirectUri, + state: state, + auto_approve: autoApprove, + scope: JSON.stringify(scopes) + } + }) +} diff --git a/src/api/login/types.ts b/src/api/login/types.ts index 1a91aecc..b2173f72 100644 --- a/src/api/login/types.ts +++ b/src/api/login/types.ts @@ -26,17 +26,3 @@ export type UserVO = { loginIp: string loginDate: string } - -export type UserInfoVO = { - permissions: [] - roles: [] - user: { - avatar: string - id: number - nickname: string - } -} - -export type TentantNameVO = { - name: string -} diff --git a/src/api/mall/product/brand.ts b/src/api/mall/product/brand.ts new file mode 100644 index 00000000..dc8acc2a --- /dev/null +++ b/src/api/mall/product/brand.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +/** + * 商品品牌 + */ +export interface BrandVO { + /** + * 品牌编号 + */ + id?: number + /** + * 品牌名称 + */ + name: string + /** + * 品牌图片 + */ + picUrl: string + /** + * 品牌排序 + */ + sort?: number + /** + * 品牌描述 + */ + description?: string + /** + * 开启状态 + */ + status: number +} + +// 创建商品品牌 +export const createBrand = (data: BrandVO) => { + return request.post({ url: '/product/brand/create', data }) +} + +// 更新商品品牌 +export const updateBrand = (data: BrandVO) => { + return request.put({ url: '/product/brand/update', data }) +} + +// 删除商品品牌 +export const deleteBrand = (id: number) => { + return request.delete({ url: `/product/brand/delete?id=${id}` }) +} + +// 获得商品品牌 +export const getBrand = (id: number) => { + return request.get({ url: `/product/brand/get?id=${id}` }) +} + +// 获得商品品牌列表 +export const getBrandParam = (params: PageParam) => { + return request.get({ url: '/product/brand/page', params }) +} diff --git a/src/api/mp/mpuser/index.ts b/src/api/mp/user/index.ts similarity index 100% rename from src/api/mp/mpuser/index.ts rename to src/api/mp/user/index.ts diff --git a/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue b/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue index cb96a2fb..cea05550 100644 --- a/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue +++ b/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue @@ -33,9 +33,15 @@ /> @@ -97,7 +103,10 @@ - diff --git a/src/views/bpm/oa/leave/detail.vue b/src/views/bpm/oa/leave/detail.vue index e35de6e5..31e54de3 100644 --- a/src/views/bpm/oa/leave/detail.vue +++ b/src/views/bpm/oa/leave/detail.vue @@ -1,42 +1,40 @@ - diff --git a/src/views/bpm/oa/leave/index.vue b/src/views/bpm/oa/leave/index.vue index 22d86dfe..ebf10d72 100644 --- a/src/views/bpm/oa/leave/index.vue +++ b/src/views/bpm/oa/leave/index.vue @@ -1,83 +1,236 @@ - diff --git a/src/views/bpm/oa/leave/leave.data.ts b/src/views/bpm/oa/leave/leave.data.ts deleted file mode 100644 index 5b6f2c52..00000000 --- a/src/views/bpm/oa/leave/leave.data.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// 表单校验 -export const rules = reactive({ - startTime: [{ required: true, message: '开始时间不能为空', trigger: 'blur' }], - endTime: [{ required: true, message: '结束时间不能为空', trigger: 'blur' }], - type: [{ required: true, message: '请假类型不能为空', trigger: 'change' }] -}) - -// crudSchemas -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '申请编号', - action: true, - actionWidth: '260', - searchSpan: 8, - columns: [ - { - title: t('common.status'), - field: 'result', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - dictClass: 'number', - isSearch: true, - isForm: false - }, - { - title: t('common.startTimeText'), - field: 'startTime', - formatter: 'formatDay', - table: { - width: 180 - }, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - form: { - component: 'DatePicker' - } - }, - { - title: t('common.endTimeText'), - field: 'endTime', - formatter: 'formatDay', - table: { - width: 180 - }, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - form: { - component: 'DatePicker' - } - }, - { - title: '请假类型', - field: 'type', - dictType: DICT_TYPE.BPM_OA_LEAVE_TYPE, - dictClass: 'number', - isSearch: true - }, - { - title: '原因', - field: 'reason', - isSearch: true, - componentProps: { - type: 'textarea', - rows: 4 - } - }, - { - title: '申请时间', - field: 'createTime', - formatter: 'formatDate', - table: { - width: 180 - }, - isSearch: true, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - }, - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/bpm/processInstance/create/index.vue b/src/views/bpm/processInstance/create/index.vue index d616e495..11cf929b 100644 --- a/src/views/bpm/processInstance/create/index.vue +++ b/src/views/bpm/processInstance/create/index.vue @@ -46,7 +46,7 @@ - diff --git a/src/views/bpm/processInstance/process.data.ts b/src/views/bpm/processInstance/process.data.ts deleted file mode 100644 index 317e143d..00000000 --- a/src/views/bpm/processInstance/process.data.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - primaryTitle: '编号', - action: true, - actionWidth: '200px', - columns: [ - { - title: '编号', - field: 'id', - table: { - width: 320 - } - }, - { - title: '流程名', - field: 'name', - isSearch: true - }, - { - title: '所属流程', - field: 'processDefinitionId', - isSearch: true, - isTable: false - }, - { - title: '流程分类', - field: 'category', - dictType: DICT_TYPE.BPM_MODEL_CATEGORY, - dictClass: 'number', - isSearch: true, - table: { - slots: { - default: 'category_default' - } - } - }, - { - title: '当前审批任务', - field: 'tasks', - table: { - width: 140, - slots: { - default: 'tasks_default' - } - } - }, - { - title: t('common.status'), - field: 'status', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS, - dictClass: 'number', - isSearch: true - }, - { - title: '结果', - field: 'result', - dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, - dictClass: 'number', - isSearch: true - }, - { - title: '提交时间', - field: 'createTime', - formatter: 'formatDate', - table: { - width: 180 - }, - isForm: false, - isSearch: true, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '结束时间', - field: 'endTime', - formatter: 'formatDate', - table: { - width: 180 - }, - isForm: false - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/bpm/task/done/index.vue b/src/views/bpm/task/done/index.vue index 75ba0fef..ae3352d9 100644 --- a/src/views/bpm/task/done/index.vue +++ b/src/views/bpm/task/done/index.vue @@ -74,7 +74,7 @@ - diff --git a/src/views/bpm/task/todo/todo.data.ts b/src/views/bpm/task/todo/todo.data.ts deleted file mode 100644 index 419a80fe..00000000 --- a/src/views/bpm/task/todo/todo.data.ts +++ /dev/null @@ -1,58 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -const { t } = useI18n() // 国际化 - -// crudSchemas -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: null, - action: true, - searchSpan: 8, - columns: [ - { - title: '任务编号', - field: 'id', - table: { - width: 320 - } - }, - { - title: '任务名称', - field: 'name', - isSearch: true - }, - { - title: '所属流程', - field: 'processInstance.name' - }, - { - title: '流程发起人', - field: 'processInstance.startUserNickname' - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - table: { - width: 180 - }, - isSearch: true, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - }, - { - title: '任务状态', - field: 'suspensionState', - table: { - slots: { - default: 'suspensionState_default' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/bpm/taskAssignRule/index.vue b/src/views/bpm/taskAssignRule/index.vue index 4a4e76f8..d54fe168 100644 --- a/src/views/bpm/taskAssignRule/index.vue +++ b/src/views/bpm/taskAssignRule/index.vue @@ -32,7 +32,7 @@ - diff --git a/src/views/infra/file/FileForm.vue b/src/views/infra/file/FileForm.vue index 36f251e8..5485870d 100644 --- a/src/views/infra/file/FileForm.vue +++ b/src/views/infra/file/FileForm.vue @@ -2,17 +2,19 @@
将文件拖到此处,或 点击上传
@@ -29,44 +31,47 @@
diff --git a/src/views/infra/file/index.vue b/src/views/infra/file/index.vue index 6e709ec7..91d7639e 100644 --- a/src/views/infra/file/index.vue +++ b/src/views/infra/file/index.vue @@ -1,9 +1,14 @@ - - diff --git a/src/views/infra/server/index.vue b/src/views/infra/server/index.vue index dad3047c..57a5bc5c 100644 --- a/src/views/infra/server/index.vue +++ b/src/views/infra/server/index.vue @@ -1,10 +1,25 @@