From aebb04a7c2f6d97406c04d510b873c1045f7a9b8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 29 Feb 2024 00:08:44 +0800 Subject: [PATCH 01/73] =?UTF-8?q?2023=E5=B9=B406=E6=9C=8801=E6=97=A5?= =?UTF-8?q?=EF=BC=9AContentWrap=20=E6=94=AF=E6=8C=81=20header=20=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ContentWrap/src/ContentWrap.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/ContentWrap/src/ContentWrap.vue b/src/components/ContentWrap/src/ContentWrap.vue index e3bd5972..454e95c9 100644 --- a/src/components/ContentWrap/src/ContentWrap.vue +++ b/src/components/ContentWrap/src/ContentWrap.vue @@ -25,6 +25,9 @@ defineProps({ +
+ +
From 4231a7d1336d56593885b622e650abfaf925c432 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 29 Feb 2024 00:10:24 +0800 Subject: [PATCH 02/73] =?UTF-8?q?2023=E5=B9=B406=E6=9C=8815=E6=97=A5?= =?UTF-8?q?=EF=BC=9Afix:=20expand=20clickable=20area=20of=20collapse-icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Collapse/src/Collapse.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/layout/components/Collapse/src/Collapse.vue b/src/layout/components/Collapse/src/Collapse.vue index ecb6890f..a8fc7ee8 100644 --- a/src/layout/components/Collapse/src/Collapse.vue +++ b/src/layout/components/Collapse/src/Collapse.vue @@ -24,13 +24,12 @@ const toggleCollapse = () => { From 4e39c11d7c0189d741c3bf12b5f0f61c13b5c9d0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 29 Feb 2024 08:46:46 +0800 Subject: [PATCH 03/73] =?UTF-8?q?=E2=9C=A8=20=E5=8D=87=E7=BA=A7=20vite=20?= =?UTF-8?q?=E7=AD=89=E7=9B=B8=E5=85=B3=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 84 ++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 9bcd5c65..cf7142a3 100644 --- a/package.json +++ b/package.json @@ -30,12 +30,12 @@ "@form-create/element-ui": "^3.1.24", "@iconify/iconify": "^3.1.1", "@videojs-player/vue": "^1.0.0", - "@vueuse/core": "^10.6.1", + "@vueuse/core": "^10.9.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^3.0.4", "animate.css": "^4.1.1", - "axios": "^1.6.1", + "axios": "^1.6.7", "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "^0.10.0", "camunda-bpmn-moddle": "^7.0.1", @@ -44,9 +44,9 @@ "dayjs": "^1.11.10", "diagram-js": "^12.8.0", "driver.js": "^1.3.1", - "echarts": "^5.4.3", + "echarts": "^5.5.0", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.4.2", + "element-plus": "2.4.4", "fast-xml-parser": "^4.3.2", "highlight.js": "^11.9.0", "jsencrypt": "^3.3.2", @@ -60,71 +60,71 @@ "steady-xml": "^0.1.0", "url": "^0.11.3", "video.js": "^7.21.5", - "vue": "^3.3.8", + "vue": "3.4.20", "vue-dompurify-html": "^4.1.4", - "vue-i18n": "^9.6.5", - "vue-router": "^4.2.5", + "vue-i18n": "9.9.1", + "vue-router": "^4.3.0", "vue-types": "^5.1.1", "vuedraggable": "^4.1.0", "web-storage-cache": "^1.1.1", "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^18.4.1", - "@commitlint/config-conventional": "^18.4.0", - "@iconify/json": "^2.2.142", - "@intlify/unplugin-vue-i18n": "^1.5.0", + "@commitlint/cli": "^19.0.1", + "@commitlint/config-conventional": "^19.0.0", + "@iconify/json": "^2.2.187", + "@intlify/unplugin-vue-i18n": "^2.0.0", "@purge-icons/generated": "^0.9.0", - "@types/lodash-es": "^4.17.11", - "@types/node": "^20.9.0", + "@types/lodash-es": "^4.17.12", + "@types/node": "^20.11.21", "@types/nprogress": "^0.2.3", "@types/qrcode": "^1.5.5", - "@types/qs": "^6.9.10", - "@typescript-eslint/eslint-plugin": "^6.11.0", - "@typescript-eslint/parser": "^6.11.0", - "@unocss/transformer-variant-group": "^0.57.4", + "@types/qs": "^6.9.12", + "@typescript-eslint/eslint-plugin": "^7.1.0", + "@typescript-eslint/parser": "^7.1.0", + "@unocss/transformer-variant-group": "^0.58.5", "@unocss/eslint-config": "^0.57.4", - "@vitejs/plugin-legacy": "^4.1.1", - "@vitejs/plugin-vue": "^4.4.1", - "@vitejs/plugin-vue-jsx": "^3.0.2", - "autoprefixer": "^10.4.16", + "@vitejs/plugin-legacy": "^5.3.1", + "@vitejs/plugin-vue": "^5.0.4", + "@vitejs/plugin-vue-jsx": "^3.1.0", + "autoprefixer": "^10.4.17", "bpmn-js": "8.9.0", "bpmn-js-properties-panel": "0.46.0", "consola": "^3.2.3", - "eslint": "^8.53.0", - "eslint-config-prettier": "^9.0.0", - "eslint-define-config": "^1.24.1", - "eslint-plugin-prettier": "^5.0.1", - "eslint-plugin-vue": "^9.18.1", - "lint-staged": "^15.1.0", - "postcss": "^8.4.31", - "postcss-html": "^1.5.0", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-define-config": "^2.1.0", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-vue": "^9.22.0", + "lint-staged": "^15.2.2", + "postcss": "^8.4.35", + "postcss-html": "^1.6.0", "postcss-scss": "^4.0.9", - "prettier": "^3.1.0", + "prettier": "^3.2.5", "rimraf": "^5.0.5", - "rollup": "^4.4.1", + "rollup": "^4.12.0", "sass": "^1.69.5", - "stylelint": "^15.11.0", + "stylelint": "^16.2.1", "stylelint-config-html": "^1.1.0", - "stylelint-config-recommended": "^13.0.0", - "stylelint-config-standard": "^34.0.0", - "stylelint-order": "^6.0.3", - "terser": "^5.24.0", - "typescript": "5.2.2", - "unocss": "^0.57.4", + "stylelint-config-recommended": "^14.0.0", + "stylelint-config-standard": "^36.0.0", + "stylelint-order": "^6.0.4", + "terser": "^5.28.1", + "typescript": "5.3.3", + "unocss": "^0.58.5", "unplugin-auto-import": "^0.16.7", "unplugin-element-plus": "^0.8.0", "unplugin-vue-components": "^0.25.2", - "vite": "4.5.0", + "vite": "5.1.4", "vite-plugin-compression": "^0.5.1", - "vite-plugin-ejs": "^1.6.4", + "vite-plugin-ejs": "^1.7.0", "vite-plugin-eslint": "^1.8.1", "vite-plugin-progress": "^0.0.7", - "vite-plugin-purge-icons": "^0.9.2", + "vite-plugin-purge-icons": "^0.10.0", "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-top-level-await": "^1.3.1", "vue-eslint-parser": "^9.3.2", - "vue-tsc": "^1.8.22" + "vue-tsc": "^1.8.27" }, "license": "MIT", "repository": { From ca8858a33fd1bacb90870d9396cfb8135356c7b1 Mon Sep 17 00:00:00 2001 From: moon69 <1016830869@qq.com> Date: Thu, 29 Feb 2024 05:40:40 +0000 Subject: [PATCH 04/73] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: moon69 <1016830869@qq.com> --- src/views/system/role/RoleForm.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/system/role/RoleForm.vue b/src/views/system/role/RoleForm.vue index 01f29b8b..161b7571 100644 --- a/src/views/system/role/RoleForm.vue +++ b/src/views/system/role/RoleForm.vue @@ -59,11 +59,11 @@ const formData = ref({ remark: '' }) const formRules = reactive({ - name: [{ required: true, message: '岗位标题不能为空', trigger: 'blur' }], - code: [{ required: true, message: '岗位编码不能为空', trigger: 'change' }], - sort: [{ required: true, message: '岗位顺序不能为空', trigger: 'change' }], - status: [{ required: true, message: '岗位状态不能为空', trigger: 'change' }], - remark: [{ required: false, message: '岗位内容不能为空', trigger: 'blur' }] + name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }], + code: [{ required: true, message: '角色标识不能为空', trigger: 'change' }], + sort: [{ required: true, message: '显示顺序不能为空', trigger: 'change' }], + status: [{ required: true, message: '状态不能为空', trigger: 'change' }], + remark: [{ required: false, message: '备注不能为空', trigger: 'blur' }] }) const formRef = ref() // 表单 Ref From f8580fdf2a07f9f72eeb79e38a3f6ed79f0f9db9 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 29 Feb 2024 18:52:46 +0800 Subject: [PATCH 05/73] =?UTF-8?q?=E2=9C=A8=202023-05-10=EF=BC=9Afeat:=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=94=81=E5=B1=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/assets/imgs/avatar.jpg | Bin 0 -> 6264 bytes src/components/Editor/src/Editor.vue | 2 +- .../components/UserInfo/src/UserInfo.vue | 45 ++- .../UserInfo/src/components/LockDialog.vue | 98 +++++++ .../UserInfo/src/components/LockPage.vue | 272 ++++++++++++++++++ .../UserInfo/src/components/useNow.ts | 60 ++++ src/locales/en.ts | 10 + src/locales/zh-CN.ts | 10 + src/store/index.ts | 2 + src/store/modules/lock.ts | 52 ++++ src/utils/dateUtil.ts | 18 ++ types/global.d.ts | 3 + 13 files changed, 570 insertions(+), 3 deletions(-) create mode 100644 src/assets/imgs/avatar.jpg create mode 100644 src/layout/components/UserInfo/src/components/LockDialog.vue create mode 100644 src/layout/components/UserInfo/src/components/LockPage.vue create mode 100644 src/layout/components/UserInfo/src/components/useNow.ts create mode 100644 src/store/modules/lock.ts create mode 100644 src/utils/dateUtil.ts diff --git a/package.json b/package.json index cf7142a3..e6e33e39 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "mitt": "^3.0.1", "nprogress": "^0.2.0", "pinia": "^2.1.7", + "pinia-plugin-persist": "^1.0.0", "qrcode": "^1.5.3", "qs": "^6.11.2", "steady-xml": "^0.1.0", diff --git a/src/assets/imgs/avatar.jpg b/src/assets/imgs/avatar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d46a70a46430e31744420865138cc7eedb8b77e1 GIT binary patch literal 6264 zcmbuDWmMGNx5t0O&^aUB-GkEIDM;r~(j~)yH1YsLHwXesHv>qAlqeFC(jYM)4I&{S zWpMHN-*xZ0ukYUH)p>E&=dAr*`<(r~UASEXAX@60>Hr7?0HC`BZkK^5fZ#3&2?&Xa z3CSR&5Hd=Nd-o_PS*U66l0}G_gZXX=!NmA^_{CtlauO19x)$0GwJnhL_Q-_DgqD_5 z(Es;<+g<>Q58MDZU=SOC1qFejpxb_c9ssbgz;}@U8z3wkFg7mU?Gk|h_X+@TAqs#X zia80nZ-z*uFcD zP)Y!!L(=9e+rcumPh+2YXE(J-QejRVpO0I!gpo~}BLMlcHz=;JP-D~&6C7Ho@}#Q6+@<03;Kb8wmX_-jgx(e>OVud(P*XF^Vl16sN3 zL9VSB`M_g%o1P)BrQX9$svj~GgHrVO^-|)7rKENg&rc-;oC!k)8e~5)HYqtZ2DASDJ8VEC2{_$OcaQB$S8L5D^GQ? z+s$*j6EqD70RKm}|D$LS78v_qHDf{U_Uv61dt8A`-ZyYSRaJk{$HGGBBjlXX+YC8V zKwC6zGPAqf`cyz$pIyrm(T+CDOVQ!GC`}aSwxBW1ad%G@#B25L_H>uJj_SdwyELe? z%Fe*gzZu@k_u1M3aj&S$SqNz`-S2$GASYKgNd~J_^|UX_DG1h-kMkwvwcS#nMa04V7ZUszQk&4N$!hAgCTqpAQhQTk8ON*f0ofdV2=AQy@IIWQN=Pws^DCr*gw;EVe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-+ME&*W8Y&h_W&^6ePb80sWE(HDAh^ zi4~Lruc+lyf@zd+`#r0mg>i9E1YaGvm^(YcAKZ}u!yy2)i(^i{M->%1R<$YCVFrlXzFW1YXmrAb z)KGK^FX!mv^4#>o<|N&HW%_2uUyNKAuMMnSznr=&F${X=!u$>Fe=V55CBE}-!H_!> zMv2A14qNysIh$cP4!ekQ+J6kBzZGs_q2k1)JRjdyJZfZsyvu>XDZ}BE5g+WSz)jH! z{;YURbaD4rY^gw4mRqpF4Skk_XHWHujU|&Mcx!hSuHl)9T@*@G0!lNbZELl9Eukai zbh-8=6Z2KyBTXZ1-}`fraU%Ux)$%yF+9gRskBo9GIqpgGF<5AS>jg8XM;hx+BK&r! zE;rJg*Y;rabcZV?9Sw-Hcu8E@-LpjYEWy&GXL~VkR^a(MJgtdG{ojJ?4>5}t-j+P^+(<;A4L=tRZB~w^*Ys`;%i8B)xY+a}hH{7crjc+B=^6+Oo zH*Y&-{z2Uk)}URh-CaU3r=g>zo-K#=y=+}n#QG_*Ta{ap?J75@#D9$knHK|BvqUI^ z_46Fh)wAfUx!fAAsP2QLMmc}Qr)mFM_MdRY_n8)#DArG~RSr>3R@QnToH%m3_+J|q BLq7lj literal 0 HcmV?d00001 diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index ec40bca2..fd31bcd2 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -185,7 +185,7 @@ defineExpose({ userStore.user.avatar ?? avatarImg) const userName = computed(() => userStore.user.nickname ?? 'Admin') +// 锁定屏幕 +const lockStore = useLockStore() +const getIsLock = computed(() => lockStore.getLockInfo?.isLock ?? false) +const dialogVisible = ref(false) +const lockScreen = () => { + dialogVisible.value = true +} + const loginOut = async () => { try { await ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), { @@ -33,8 +44,7 @@ const loginOut = async () => { await userStore.loginOut() tagsViewStore.delAllViews() replace('/login?redirect=/index') - } - catch { } + } catch {} } const toProfile = async () => { push('/user/profile') @@ -62,6 +72,10 @@ const toDocument = () => {
{{ t('common.document') }}
+ + +
{{ t('lock.lockScreen') }}
+
{{ t('common.loginOut') }}
@@ -69,4 +83,31 @@ const toDocument = () => { + + + + + + + + + + diff --git a/src/layout/components/UserInfo/src/components/LockDialog.vue b/src/layout/components/UserInfo/src/components/LockDialog.vue new file mode 100644 index 00000000..f4ab7d4f --- /dev/null +++ b/src/layout/components/UserInfo/src/components/LockDialog.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/layout/components/UserInfo/src/components/LockPage.vue b/src/layout/components/UserInfo/src/components/LockPage.vue new file mode 100644 index 00000000..0e153e7e --- /dev/null +++ b/src/layout/components/UserInfo/src/components/LockPage.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/src/layout/components/UserInfo/src/components/useNow.ts b/src/layout/components/UserInfo/src/components/useNow.ts new file mode 100644 index 00000000..10795965 --- /dev/null +++ b/src/layout/components/UserInfo/src/components/useNow.ts @@ -0,0 +1,60 @@ +import { dateUtil } from '@/utils/dateUtil' +import { reactive, toRefs } from 'vue' +import { tryOnMounted, tryOnUnmounted } from '@vueuse/core' + +export function useNow(immediate = true) { + let timer: IntervalHandle + + const state = reactive({ + year: 0, + month: 0, + week: '', + day: 0, + hour: '', + minute: '', + second: 0, + meridiem: '' + }) + + const update = () => { + const now = dateUtil() + + const h = now.format('HH') + const m = now.format('mm') + const s = now.get('s') + + state.year = now.get('y') + state.month = now.get('M') + 1 + state.week = '星期' + ['日', '一', '二', '三', '四', '五', '六'][now.day()] + state.day = now.get('date') + state.hour = h + state.minute = m + state.second = s + + state.meridiem = now.format('A') + } + + function start() { + update() + clearInterval(timer) + timer = setInterval(() => update(), 1000) + } + + function stop() { + clearInterval(timer) + } + + tryOnMounted(() => { + immediate && start() + }) + + tryOnUnmounted(() => { + stop() + }) + + return { + ...toRefs(state), + start, + stop + } +} diff --git a/src/locales/en.ts b/src/locales/en.ts index 4f4d4895..6562c9b7 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -56,6 +56,16 @@ export default { copySuccess: 'Copy Success', copyError: 'Copy Error' }, + lock: { + lockScreen: 'Lock screen', + lock: 'Lock', + lockPassword: 'Lock screen password', + unlock: 'Click to unlock', + backToLogin: 'Back to login', + entrySystem: 'Entry the system', + placeholder: 'Please enter the lock screen password', + message: 'Lock screen password error' + }, error: { noPermission: `Sorry, you don't have permission to access this page.`, pageError: 'Sorry, the page you visited does not exist.', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 6346a3d3..0721651d 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -56,6 +56,16 @@ export default { copySuccess: '复制成功', copyError: '复制失败' }, + lock: { + lockScreen: '锁定屏幕', + lock: '锁定', + lockPassword: '锁屏密码', + unlock: '点击解锁', + backToLogin: '返回登录', + entrySystem: '进入系统', + placeholder: '请输入锁屏密码', + message: '锁屏密码错误' + }, error: { noPermission: `抱歉,您无权访问此页面。`, pageError: '抱歉,您访问的页面不存在。', diff --git a/src/store/index.ts b/src/store/index.ts index 65964ea8..7740bdd3 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,7 +1,9 @@ import type { App } from 'vue' import { createPinia } from 'pinia' +import piniaPersist from 'pinia-plugin-persist' const store = createPinia() +store.use(piniaPersist) export const setupStore = (app: App) => { app.use(store) diff --git a/src/store/modules/lock.ts b/src/store/modules/lock.ts new file mode 100644 index 00000000..bf6ceb49 --- /dev/null +++ b/src/store/modules/lock.ts @@ -0,0 +1,52 @@ +import { defineStore } from 'pinia' +import { store } from '@/store' + +interface lockInfo { + isLock?: boolean + password?: string +} + +interface LockState { + lockInfo: lockInfo +} + +// TODO 芋艿:【锁屏】这里有报错,后续解决下 +export const useLockStore = defineStore('lock', { + state: (): LockState => { + return { + lockInfo: { + // isLock: false, // 是否锁定屏幕 + // password: '' // 锁屏密码 + } + } + }, + getters: { + getLockInfo(): lockInfo { + return this.lockInfo + } + }, + actions: { + setLockInfo(lockInfo: lockInfo) { + this.lockInfo = lockInfo + }, + resetLockInfo() { + this.lockInfo = {} + }, + unLock(password: string) { + if (this.lockInfo?.password === password) { + this.resetLockInfo() + return true + } else { + return false + } + } + }, + persist: { + enabled: true, + strategies: [{ key: 'lock', storage: localStorage }] + } +}) + +export const useLockStoreWithOut = () => { + return useLockStore(store) +} diff --git a/src/utils/dateUtil.ts b/src/utils/dateUtil.ts new file mode 100644 index 00000000..316b870b --- /dev/null +++ b/src/utils/dateUtil.ts @@ -0,0 +1,18 @@ +/** + * Independent time operation tool to facilitate subsequent switch to dayjs + */ +// TODO 芋艿:【锁屏】可能后面删除掉 +import dayjs from 'dayjs' + +const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss' +const DATE_FORMAT = 'YYYY-MM-DD' + +export function formatToDateTime(date?: dayjs.ConfigType, format = DATE_TIME_FORMAT): string { + return dayjs(date).format(format) +} + +export function formatToDate(date?: dayjs.ConfigType, format = DATE_FORMAT): string { + return dayjs(date).format(format) +} + +export const dateUtil = dayjs diff --git a/types/global.d.ts b/types/global.d.ts index 5e292687..e91e1fe4 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -14,6 +14,9 @@ declare global { type LocaleType = 'zh-CN' | 'en' + declare type TimeoutHandle = ReturnType + declare type IntervalHandle = ReturnType + type AxiosHeaders = | 'application/json' | 'application/x-www-form-urlencoded' From d884f71d5701bd3b9242d5a5076bbfd783ee9ba9 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 29 Feb 2024 19:34:04 +0800 Subject: [PATCH 06/73] =?UTF-8?q?=E2=9C=A8=202023-06-25=EF=BC=9Aperf:=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=94=81=E5=B1=8F=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/src/Editor.vue | 2 +- .../UserInfo/src/components/LockPage.vue | 2 +- .../UserInfo/src/components/useNow.ts | 60 ------------------- 3 files changed, 2 insertions(+), 62 deletions(-) delete mode 100644 src/layout/components/UserInfo/src/components/useNow.ts diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index fd31bcd2..eff82745 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -180,7 +180,7 @@ defineExpose({ @@ -160,7 +169,13 @@ const resetTaskForm = () => { userTaskForm.value.assignType = undefined } if (businessObject.assignOptions && businessObject.assignOptions.length > 0) { - userTaskForm.value.assignOptions = businessObject.assignOptions?.split(',').map((item) => +item) + if (userTaskForm.value.assignType === 60) { + userTaskForm.value.assignOptions = [businessObject.assignOptions] + } else { + userTaskForm.value.assignOptions = businessObject.assignOptions + .split(',') + .map((item) => +item) + } } else { userTaskForm.value.assignOptions = [] } From 5f7ccd4e7ce73ebc8f74825902cbcd13d4b68f4d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 15 Mar 2024 00:19:23 +0800 Subject: [PATCH 25/73] =?UTF-8?q?BPM=EF=BC=9A=E9=87=8D=E6=9E=84=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=88=86=E9=85=8D=E4=BA=BA=E7=9A=84=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=EF=BC=8C=E9=80=9A=E8=BF=87=20BpmTaskCandidateStrategy=20?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../descriptor/activitiDescriptor.json | 4 +- .../plugins/descriptor/camundaDescriptor.json | 4 +- .../descriptor/flowableDescriptor.json | 4 +- .../penal/task/task-components/UserTask.vue | 103 +++++++++--------- src/utils/dict.ts | 3 +- .../detail/TaskCCDialogForm.vue | 2 +- 6 files changed, 57 insertions(+), 63 deletions(-) diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json index ef1371e2..94ba8f6c 100644 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json @@ -334,12 +334,12 @@ "type": "String" }, { - "name": "assignType", + "name": "candidateStrategy", "isAttr": true, "type": "String" }, { - "name": "assignOptions", + "name": "candidateParam", "isAttr": true, "type": "String" } diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json index ccf06d4e..8322561e 100644 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json @@ -321,12 +321,12 @@ "type": "String" }, { - "name": "assignType", + "name": "candidateStrategy", "isAttr": true, "type": "String" }, { - "name": "assignOptions", + "name": "candidateParam", "isAttr": true, "type": "String" } diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json index 3a80c232..4ea632a0 100644 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json +++ b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json @@ -321,12 +321,12 @@ "type": "String" }, { - "name": "assignType", + "name": "candidateStrategy", "isAttr": true, "type": "String" }, { - "name": "assignOptions", + "name": "candidateParam", "isAttr": true, "type": "String" } diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue index 18553b9f..013719ea 100644 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue +++ b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue @@ -1,23 +1,27 @@ diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index 3ce665f6..800ff2f3 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -31,6 +31,16 @@ type="textarea" /> + + + + +
@@ -118,6 +128,7 @@ import TaskDelegateForm from './TaskDelegateForm.vue' import TaskAddSignDialogForm from './TaskAddSignDialogForm.vue' import { registerComponent } from '@/utils/routerHelper' import { isEmpty } from '@/utils/is' +import * as UserApi from '@/api/system/user' defineOptions({ name: 'BpmProcessInstanceDetail' }) @@ -161,7 +172,8 @@ const handleAudit = async (task, pass) => { // 2.1 提交审批 const data = { id: task.id, - reason: auditForms.value[index].reason + reason: auditForms.value[index].reason, + copyUserIds: auditForms.value[index].copyUserIds } if (pass) { await TaskApi.approveTask(data) @@ -180,21 +192,20 @@ const openTaskUpdateAssigneeForm = (id: string) => { taskUpdateAssigneeFormRef.value.open(id) } -const taskDelegateForm = ref() /** 处理审批退回的操作 */ +const taskDelegateForm = ref() const handleDelegate = async (task) => { taskDelegateForm.value.open(task.id) } -//回退弹框组件 -const taskReturnDialogRef = ref() /** 处理审批退回的操作 */ +const taskReturnDialogRef = ref() const handleBack = async (task) => { taskReturnDialogRef.value.open(task.id) } -const taskAddSignDialogForm = ref() /** 处理审批加签的操作 */ +const taskAddSignDialogForm = ref() const handleSign = async (task) => { taskAddSignDialogForm.value.open(task.id) } @@ -304,13 +315,17 @@ const loadRunningTask = (tasks) => { // 2.3 添加到处理任务 runningTasks.value.push({ ...task }) auditForms.value.push({ - reason: '' + reason: '', + copyUserIds: [] }) }) } /** 初始化 */ -onMounted(() => { +const userOptions = ref([]) // 用户列表 +onMounted(async () => { getDetail() + // 获得用户列表 + userOptions.value = await UserApi.getSimpleUserList() }) diff --git a/src/views/bpm/task/cc/index.vue b/src/views/bpm/task/copy/index.vue similarity index 74% rename from src/views/bpm/task/cc/index.vue rename to src/views/bpm/task/copy/index.vue index 50ddf889..dd41b2e1 100644 --- a/src/views/bpm/task/cc/index.vue +++ b/src/views/bpm/task/copy/index.vue @@ -11,14 +11,6 @@ placeholder="请输入流程名称" /> - - - - - - - - - + + + + + - + @@ -78,14 +75,14 @@ import { dateFormatter } from '@/utils/formatTime' import * as ProcessInstanceApi from '@/api/bpm/processInstance' -defineOptions({ name: 'BpmCCProcessInstance' }) +defineOptions({ name: 'BpmProcessInstanceCopy' }) const { push } = useRouter() // 路由 const loading = ref(false) // 列表的加载中 const total = ref(0) // 列表的总页数 const list = ref([]) // 列表的数据 -const queryParams = ref({ +const queryParams = reactive({ pageNo: 1, pageSize: 10, processInstanceId: '', @@ -98,7 +95,7 @@ const queryFormRef = ref() // 搜索的表单 const getList = async () => { loading.value = true try { - const data = await ProcessInstanceApi.getProcessInstanceCCPage(queryParams) + const data = await ProcessInstanceApi.getProcessInstanceCopyPage(queryParams) list.value = data.list total.value = data.total } finally { @@ -118,7 +115,7 @@ const handleAudit = (row: any) => { /** 搜索按钮操作 */ const handleQuery = () => { - queryParams.value.pageNo = 1 + queryParams.pageNo = 1 getList() } diff --git a/src/views/bpm/task/done/TaskDetail.vue b/src/views/bpm/task/done/TaskDetail.vue deleted file mode 100644 index ff8f313d..00000000 --- a/src/views/bpm/task/done/TaskDetail.vue +++ /dev/null @@ -1,51 +0,0 @@ - - diff --git a/src/views/bpm/task/done/index.vue b/src/views/bpm/task/done/index.vue index b190bd4f..d9b32803 100644 --- a/src/views/bpm/task/done/index.vue +++ b/src/views/bpm/task/done/index.vue @@ -46,27 +46,50 @@ - - - - - + + + + + + + + + + - - - + + + @@ -78,15 +101,11 @@ @pagination="getList" /> - - - diff --git a/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue b/src/views/bpm/processInstance/detail/dialog/TaskSignCreateForm.vue similarity index 85% rename from src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue rename to src/views/bpm/processInstance/detail/dialog/TaskSignCreateForm.vue index 40cd200e..9e4998c1 100644 --- a/src/views/bpm/processInstance/detail/TaskAddSignDialogForm.vue +++ b/src/views/bpm/processInstance/detail/dialog/TaskSignCreateForm.vue @@ -7,8 +7,8 @@ :rules="formRules" label-width="110px" > - - + + { formLoading.value = true formData.value.type = type try { - await TaskApi.taskAddSign(formData.value) + await TaskApi.signCreateTask(formData.value) message.success('加签成功') dialogVisible.value = false // 发送操作成功的事件 @@ -89,8 +90,9 @@ const submitForm = async (type: string) => { const resetForm = () => { formData.value = { id: '', - userIdList: [], - type: '' + userIds: [], + type: '', + reason: '' } formRef.value?.resetFields() } diff --git a/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue b/src/views/bpm/processInstance/detail/dialog/TaskSignDeleteForm.vue similarity index 80% rename from src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue rename to src/views/bpm/processInstance/detail/dialog/TaskSignDeleteForm.vue index 61f7d68c..19bb2dce 100644 --- a/src/views/bpm/processInstance/detail/TaskSubSignDialogForm.vue +++ b/src/views/bpm/processInstance/detail/dialog/TaskSignDeleteForm.vue @@ -9,8 +9,10 @@ > - - {{ item.name }}({{ item.assigneeUser.deptName }}{{ item.assigneeUser.nickname }}--审批) + + {{ item.name }} + ({{ item.assigneeUser?.deptName || item.ownerUser?.deptName }} - + {{ item.assigneeUser?.nickname || item.ownerUser?.nickname }}) @@ -24,10 +26,12 @@ - diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index 4f889b8f..2aac5fad 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -92,7 +92,7 @@ - + - + diff --git a/src/views/bpm/category/index.vue b/src/views/bpm/category/index.vue new file mode 100644 index 00000000..0e11e819 --- /dev/null +++ b/src/views/bpm/category/index.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/bpm/definition/index.vue b/src/views/bpm/definition/index.vue index 923a5901..9ebd28b1 100644 --- a/src/views/bpm/definition/index.vue +++ b/src/views/bpm/definition/index.vue @@ -11,11 +11,7 @@ - - - + @@ -200,9 +203,10 @@ const resetQuery = () => { } /** 发起流程操作 **/ -const handleCreate = () => { +const handleCreate = (id) => { router.push({ - name: 'BpmProcessInstanceCreate' + name: 'BpmProcessInstanceCreate', + query: { processInstanceId: id } }) } From c2f98043df94ef78503cc1f25dd7eb2f3c5a7301 Mon Sep 17 00:00:00 2001 From: AhJindeg Date: Thu, 21 Mar 2024 17:20:01 +0800 Subject: [PATCH 41/73] =?UTF-8?q?fix:=20=F0=9F=90=9E=20add=20inputChange?= =?UTF-8?q?=20for=20crontab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Crontab/src/Crontab.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Crontab/src/Crontab.vue b/src/components/Crontab/src/Crontab.vue index 90b40b2f..e61fef89 100644 --- a/src/components/Crontab/src/Crontab.vue +++ b/src/components/Crontab/src/Crontab.vue @@ -503,9 +503,13 @@ const submit = () => { emit('update:modelValue', defaultValue.value) dialogVisible.value = false } + +const inputChange = () => { + emit('update:modelValue', defaultValue.value) +} diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue index 6da1d415..f3072e56 100644 --- a/src/views/bpm/processInstance/detail/index.vue +++ b/src/views/bpm/processInstance/detail/index.vue @@ -24,15 +24,15 @@ {{ processInstance?.startUser.nickname }} {{ processInstance?.startUser.deptName }} - + @@ -91,7 +91,7 @@ - \ No newline at end of file diff --git a/src/views/report/ureport/index.vue b/src/views/report/ureport/index.vue deleted file mode 100644 index e9d6c0e4..00000000 --- a/src/views/report/ureport/index.vue +++ /dev/null @@ -1,13 +0,0 @@ -