From 173c375bce624f86513e0d5e794aefbb179aa8f6 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 6 Apr 2023 10:03:35 +0800 Subject: [PATCH 01/23] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 24 ++++++ src/types/auto-components.d.ts | 12 --- src/views/bpm/task/todo/index.vue | 122 +++++++++++++++++++++++---- src/views/bpm/task/todo/todo.data.ts | 58 ------------- 4 files changed, 128 insertions(+), 88 deletions(-) delete mode 100644 src/views/bpm/task/todo/todo.data.ts diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 671ca353..99543361 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -317,6 +317,30 @@ const remainingRouter: AppRouteRecordRaw[] = [ title: '查看 OA 请假', activeMenu: 'bpm/oa/leave/detail' } + }, + { + path: '/bpm/task/done', + component: () => import('@/views/bpm/task/done/index.vue'), + name: 'TaskDone', + meta: { + noCache: true, + hidden: true, + canTo: true, + title: '已办任务', + activeMenu: 'bpm/task/done/index' + } + }, + { + path: '/bpm/task/todo', + component: () => import('@/views/bpm/task/todo/index.vue'), + name: 'TaskTodo', + meta: { + noCache: true, + hidden: true, + canTo: true, + title: '代办任务', + activeMenu: 'bpm/task/todo/index' + } } ] }, diff --git a/src/types/auto-components.d.ts b/src/types/auto-components.d.ts index 8b5de138..b90b36ef 100644 --- a/src/types/auto-components.d.ts +++ b/src/types/auto-components.d.ts @@ -24,9 +24,6 @@ declare module '@vue/runtime-core' { DocAlert: typeof import('./../components/DocAlert/index.vue')['default'] Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] - ElAlert: typeof import('element-plus/es')['ElAlert'] - ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer'] - ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBadge: typeof import('element-plus/es')['ElBadge'] ElButton: typeof import('element-plus/es')['ElButton'] ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] @@ -56,34 +53,25 @@ declare module '@vue/runtime-core' { ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] - ElImage: typeof import('element-plus/es')['ElImage'] ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] ElInput: typeof import('element-plus/es')['ElInput'] - ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElLink: typeof import('element-plus/es')['ElLink'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] - ElRadio: typeof import('element-plus/es')['ElRadio'] - ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] - ElSpace: typeof import('element-plus/es')['ElSpace'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] - ElTableV2: typeof import('element-plus/es')['ElTableV2'] 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'] - ElTree: typeof import('element-plus/es')['ElTree'] - ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] ElUpload: typeof import('element-plus/es')['ElUpload'] Error: typeof import('./../components/Error/src/Error.vue')['default'] FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default'] diff --git a/src/views/bpm/task/todo/index.vue b/src/views/bpm/task/todo/index.vue index bc21c597..f43f1ee3 100644 --- a/src/views/bpm/task/todo/index.vue +++ b/src/views/bpm/task/todo/index.vue @@ -1,31 +1,113 @@ - 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) From d0bc7f081423747c0d09a498a4e5870828af5311 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 6 Apr 2023 16:13:18 +0800 Subject: [PATCH 02/23] =?UTF-8?q?VUE3=E3=80=90=E6=B5=81=E7=A8=8B=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E6=88=91=E7=9A=84=E6=B5=81=E7=A8=8B=E3=80=91elment-p?= =?UTF-8?q?lus=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 12 ++ src/views/bpm/processInstance/index.vue | 243 +++++++++++++++++++----- 2 files changed, 211 insertions(+), 44 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 99543361..45da96b8 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -341,6 +341,18 @@ const remainingRouter: AppRouteRecordRaw[] = [ title: '代办任务', activeMenu: 'bpm/task/todo/index' } + }, + { + path: '/bpm/processInstance', + component: () => import('@/views/bpm/processInstance/index.vue'), + name: 'processInstance', + meta: { + noCache: true, + hidden: true, + canTo: true, + title: '流程办理', + activeMenu: 'bpm/processInstance/index' + } } ] }, diff --git a/src/views/bpm/processInstance/index.vue b/src/views/bpm/processInstance/index.vue index 0d153cfb..9f43d087 100644 --- a/src/views/bpm/processInstance/index.vue +++ b/src/views/bpm/processInstance/index.vue @@ -1,64 +1,215 @@ From dbf51ff89c90de6f1f9db8fd45c26b07787418c7 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 6 Apr 2023 16:15:48 +0800 Subject: [PATCH 03/23] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=88=91=E7=9A=84?= =?UTF-8?q?=E6=B5=81=E7=A8=8Bprocess.data.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bpm/processInstance/process.data.ts | 94 ------------------- 1 file changed, 94 deletions(-) delete mode 100644 src/views/bpm/processInstance/process.data.ts 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) From 87ac04d9a737f4c1f9f2215b2ce59d87b64eb300 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 6 Apr 2023 19:49:58 +0800 Subject: [PATCH 04/23] =?UTF-8?q?Redis=20=E8=8F=9C=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=8C=E7=A7=BB=E9=99=A4=E5=AF=B9=20key=20?= =?UTF-8?q?=E7=9A=84=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 + src/api/infra/redis/index.ts | 36 ----------- src/api/infra/redis/types.ts | 9 --- src/main.ts | 2 + src/plugins/tongji/index.ts | 23 +++++++ src/utils/dict.ts | 1 - src/views/infra/redis/index.vue | 110 ++------------------------------ 7 files changed, 34 insertions(+), 150 deletions(-) create mode 100644 src/plugins/tongji/index.ts 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/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/main.ts b/src/main.ts index b3a9da16..f24560b5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -52,6 +52,8 @@ import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css' import hljs from 'highlight.js' //导入代码高亮文件 import 'highlight.js/styles/github.css' //导入代码高亮样式 新版 +import '@/plugins/tongji' // 百度统计 + import Logger from '@/utils/Logger' // 本地开发模式 全局引入 element-plus 样式,加快第一次进入速度 diff --git a/src/plugins/tongji/index.ts b/src/plugins/tongji/index.ts new file mode 100644 index 00000000..ec261a16 --- /dev/null +++ b/src/plugins/tongji/index.ts @@ -0,0 +1,23 @@ +import router from '@/router' + +// 用于 router push +window._hmt = window._hmt || [] +// HM_ID +const HM_ID = import.meta.env.VITE_APP_BAIDU_CODE +;(function () { + // 有值的时候,才开启 + if (!HM_ID) { + return + } + const hm = document.createElement('script') + hm.src = 'https://hm.baidu.com/hm.js?' + HM_ID + const s = document.getElementsByTagName('script')[0] + s.parentNode.insertBefore(hm, s) +})() + +router.afterEach(function (to) { + if (!HM_ID) { + return + } + _hmt.push(['_trackPageview', to.fullPath]) +}) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 05c70dad..d1d84242 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -112,7 +112,6 @@ export enum DICT_TYPE { // ========== INFRA 模块 ========== INFRA_BOOLEAN_STRING = 'infra_boolean_string', - INFRA_REDIS_TIMEOUT_TYPE = 'infra_redis_timeout_type', INFRA_JOB_STATUS = 'infra_job_status', INFRA_JOB_LOG_STATUS = 'infra_job_log_status', INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status', diff --git a/src/views/infra/redis/index.vue b/src/views/infra/redis/index.vue index 30d3cf65..1fd1a120 100644 --- a/src/views/infra/redis/index.vue +++ b/src/views/infra/redis/index.vue @@ -4,6 +4,7 @@ + @@ -47,106 +48,33 @@ +
+
- - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - {{ cacheForm.key }} - {{ cacheForm.value }} - - - - - From e22363d061eb31214bf2b8c8e0902a5d50952aba Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 7 Apr 2023 10:15:21 +0800 Subject: [PATCH 08/23] =?UTF-8?q?=E5=AE=8C=E5=96=84SSO=E5=8D=95=E7=82=B9?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login/index.ts | 13 ++++++-- src/views/Login/Login.vue | 33 ++++++-------------- src/views/Login/components/LoginForm.vue | 1 - src/views/Login/components/SSOLogin.vue | 38 +++++++++++++++--------- 4 files changed, 43 insertions(+), 42 deletions(-) diff --git a/src/api/login/index.ts b/src/api/login/index.ts index bc60e8c9..07d08370 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -76,7 +76,14 @@ export const reqCheckApi = (data) => { } // ========== OAUTH 2.0 相关 ========== - +export type scopesType = string[] +export interface paramsType { + responseType: string + clientId: string + redirectUri: string + state: string + scopes: scopesType +} export const getAuthorize = (clientId) => { return request.get({ url: '/system/oauth2/authorize?clientId=' + clientId }) } @@ -87,8 +94,8 @@ export function authorize( redirectUri: string, state: string, autoApprove: boolean, - checkedScopes: any, - uncheckedScopes: any + checkedScopes: scopesType, + uncheckedScopes: scopesType ) { // 构建 scopes const scopes = {} diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 4bd9ff90..a0186ab7 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -9,19 +9,19 @@ >
- + {{ underlineToHump(appStore.getTitle) }}
- -
{{ t('login.welcome') }}
-
+ +
{{ t('login.welcome') }}
+
{{ t('login.message') }}
@@ -31,7 +31,7 @@
- + {{ underlineToHump(appStore.getTitle) }}
@@ -52,18 +52,15 @@ - - + +
-