@utogether/udp-core 2.0.0-beta.26 → 2.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/403-CyoOD-Ik.js +65 -0
- package/dist/404-Ch_OHTw0.js +65 -0
- package/dist/500-Cf9am7HK.js +67 -0
- package/dist/AuthorityInfo-BJ427cqG.js +4 -0
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-D9y7AwbB.js +99 -0
- package/dist/AuthorityPanel-lVnZ5bce.js +4 -0
- package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-nsfhDlvV.js +113 -0
- package/dist/Company-qo-lKPkv.js +25 -0
- package/dist/CompanyPanel-DkKWAKvY.js +204 -0
- package/dist/DataSet-iBHzs75s.js +147 -0
- package/dist/Department-CHUQByKX.js +25 -0
- package/dist/DepartmentPanel-C742dfOO.js +248 -0
- package/dist/DesignPanel-D9oE5R7m.js +4 -0
- package/dist/DesignPanel.vue_vue_type_style_index_0_lang-hYldVEbo.js +1097 -0
- package/dist/DictView-CrFXprP9.js +110 -0
- package/dist/InvOrganization-Cz8SzIgs.js +73 -0
- package/dist/Org-Bzt6yKox.js +38 -0
- package/dist/Preview-jonigfMQ.js +48 -0
- package/dist/ReportDefine-BpiM5Ovq.js +10 -0
- package/dist/ReportDesign-fp09cXJ7.js +164 -0
- package/dist/ReportQuery-52ZP1PYP.js +74 -0
- package/dist/ReportQueryFrom-DSYavJb1.js +4 -0
- package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-DBGYEp0u.js +177 -0
- package/dist/ReportTemplate-CA_UW0eD.js +161 -0
- package/dist/Role-DqOt8Bk0.js +25 -0
- package/dist/RoleAssign-BdxhefhQ.js +26 -0
- package/dist/RolePanel-2gZ3H0ET.js +4 -0
- package/dist/RolePanel-BsNd0svJ.js +4 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DLOwgF99.js +152 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DmzD9kab.js +131 -0
- package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-B9ptUMeI.js +99 -0
- package/dist/Staff-D3L8fEoY.js +26 -0
- package/dist/StaffInfo-DYRw6ZYJ.js +4 -0
- package/dist/StaffInfo.vue_vue_type_script_setup_true_lang-xqEOQnMs.js +107 -0
- package/dist/StaffPanel-DkrNH6Px.js +4 -0
- package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-BPBMnliy.js +152 -0
- package/dist/SysUser-Bl1-cIpJ.js +15 -0
- package/dist/SysUserPanel-yxNLaBwt.js +4 -0
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BDcsgSl5.js +352 -0
- package/dist/SystemMenu-C4_Arn12.js +155 -0
- package/dist/UserInfo-QcNwJCUR.js +4 -0
- package/dist/UserInfo.vue_vue_type_style_index_0_lang-DLIeUphX.js +159 -0
- package/dist/childView-B23DEO2u.js +4 -0
- package/dist/childView-saDZQv9x.js +4 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-RsKR6CAC.js +182 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-ZFEfavUY.js +142 -0
- package/dist/code-rule-2_Ihx_by.js +147 -0
- package/dist/core.es.js +26 -6
- package/dist/cron-task-BFOPJQIk.js +134 -0
- package/dist/flow-task-PoDnE_kE.js +10 -0
- package/dist/frameView-f7Ya0Knj.js +43 -0
- package/dist/index-BpdTDaTk.js +3213 -0
- package/dist/layout-home-v3DPJ7rB.js +231 -0
- package/dist/layoutView-DZHoQDH1.js +3190 -0
- package/dist/log-in-BPAMJTwH.js +115 -0
- package/dist/log-out-DZACF0jg.js +129 -0
- package/dist/login-B8cwozax.js +216 -0
- package/dist/login-log-CVvRgZSu.js +70 -0
- package/dist/lov-view-Ba7Y7xy0.js +98 -0
- package/dist/menuInfo-BpRKFYK8.js +4 -0
- package/dist/menuInfo.vue_vue_type_style_index_0_lang-DJ5sUC6m.js +359 -0
- package/dist/pda-app-C0jJecrL.js +706 -0
- package/dist/redirect-DTz8GSnv.js +15 -0
- package/dist/resource-BG22Cw4P.js +97 -0
- package/dist/su-welcome-DaxhbrC6.js +879 -0
- package/dist/sys-config-CG2fMtak.js +384 -0
- package/dist/udp-core.css +1 -2
- package/dist/useNav-_u2UAQWk.js +84 -0
- package/dist/utogether-MlnyYtNS.js +4 -0
- package/dist/wecom-push-B75FLee5.js +70 -0
- package/index.ts +54 -50
- package/package.json +21 -21
- package/src/App.vue +79 -78
- package/src/api/http.ts +10 -4
- package/src/api/index.ts +51 -51
- package/src/api/user.ts +64 -64
- package/src/components/SuQrcode/src/index.tsx +231 -236
- package/src/components/udp/content/index.vue +93 -93
- package/src/components/udp/form-upload/form-upload.vue +496 -496
- package/src/components/udp/grid/index.vue +643 -544
- package/src/components/udp/index.ts +2 -1
- package/src/components/udp/modal-form/index.vue +326 -0
- package/src/components/udp/utils.ts +420 -420
- package/src/layout/components/lay-navbar/index.vue +240 -240
- package/src/layout/components/lay-panel/index.vue +2 -6
- package/src/layout/components/lay-search/components/SearchModal.vue +185 -181
- package/src/layout/components/lay-sidebar/mixNav.vue +261 -261
- package/src/layout/components/lay-sidebar/sidebarItem.vue +199 -195
- package/src/layout/components/lay-sidebar/vertical.vue +92 -92
- package/src/layout/layoutView.vue +1 -0
- package/src/main.ts +111 -109
- package/src/plugins/i18n/zh.ts +5 -1
- package/src/plugins/vxe-table/index.ts +116 -116
- package/src/router/index.ts +5 -34
- package/src/router/utils.ts +434 -430
- package/src/store/modules/permission.ts +1 -1
- package/src/store/modules/system.ts +193 -186
- package/src/style/print-lock.css +380 -375
- package/src/style/suprint.css +990 -985
- package/src/style/vxetable.scss +372 -364
- package/src/utils/authority/index.ts +19 -2
- package/src/utils/dataFormat/index.ts +309 -222
- package/src/utils/udp/http/index.ts +126 -67
- package/src/utils/udp/http/types.d.ts +15 -14
- package/src/views/login/login-view.vue +4 -21
- package/src/views/organization/department/DepartmentPanel.vue +3 -4
- package/src/views/system/sys/sys-config.vue +344 -344
- package/src/views/uhome/components/home-todo.vue +191 -178
- package/src/views/uhome/dynamic-card.vue +31 -31
- package/src/views/uhome/su-welcome.vue +310 -310
- package/src/views/ulogin/login.vue +292 -296
- package/src/views/urpt/design/DesignPanel.vue +538 -507
- package/src/views/urpt/design/print-data.ts +39 -59
- package/tsconfig.json +2 -3
- package/types/global.d.ts +234 -234
- package/vite.config.ts +2 -1
- package/dist/403-D6Wb3JJh.js +0 -72
- package/dist/404-B_HNbPNV.js +0 -72
- package/dist/500-BMemTTy1.js +0 -77
- package/dist/AuthorityInfo-6wHxwiFM.js +0 -91
- package/dist/AuthorityPanel-OqF_DvXA.js +0 -98
- package/dist/Company-BLXSfow0.js +0 -21
- package/dist/CompanyPanel-B4kRZ5Cg.js +0 -199
- package/dist/DataSet-CuGZcKC-.js +0 -141
- package/dist/Department-oFhsa7cd.js +0 -21
- package/dist/DepartmentPanel-B1UGpu-r.js +0 -242
- package/dist/DepartmentPanel-BL58AdoT.js +0 -2
- package/dist/DesignPanel-DmkFVw1N.js +0 -1196
- package/dist/DictView-CC5yMzOq.js +0 -100
- package/dist/File-WJXjGYxr.js +0 -89
- package/dist/InvOrganization-BwMmD8Ua.js +0 -76
- package/dist/Org-HgnOWubi.js +0 -76
- package/dist/Preview-CAzWxLmP.js +0 -45
- package/dist/ReIcon-DecitXmg.js +0 -413
- package/dist/ReportDefine-BgLM-Rjk.js +0 -10
- package/dist/ReportDesign-DwchGG2P.js +0 -158
- package/dist/ReportQuery-D5jaRJEn.js +0 -101
- package/dist/ReportQueryFrom-CNlmtYey.js +0 -198
- package/dist/ReportTemplate-CNcTmccs.js +0 -162
- package/dist/Role-Be8WfdCA.js +0 -21
- package/dist/RoleAssign-CtehGAUf.js +0 -22
- package/dist/RolePanel-CAwITg_q.js +0 -131
- package/dist/RolePanel-SN0FGFZ7.js +0 -176
- package/dist/ScrollPanel-DW30pGz1.js +0 -88
- package/dist/Staff-V2YsNKcj.js +0 -22
- package/dist/StaffInfo-CKRPW0r4.js +0 -149
- package/dist/StaffPanel-BxcgMg7u.js +0 -143
- package/dist/SysUser-Dxyj5w5m.js +0 -12
- package/dist/SysUserPanel-DI6CWcZo.js +0 -365
- package/dist/SystemMenu-BBHREM8T.js +0 -154
- package/dist/UserInfo-BMVQ0xwE.js +0 -194
- package/dist/_plugin-vue_export-helper-C6QCLu9I.js +0 -8
- package/dist/api-BFNxcxSN.js +0 -30
- package/dist/authority-BJFEUdrh.js +0 -20
- package/dist/await-to-js.es5-DkWYmPXW.js +0 -10
- package/dist/childView-BBjPEraB.js +0 -184
- package/dist/childView-DNqG2UVm.js +0 -181
- package/dist/code-rule-QFrhqFrW.js +0 -151
- package/dist/contant-Q77dU_V3.js +0 -4
- package/dist/cron-task-BpUDKEAU.js +0 -131
- package/dist/flow-task-DAc2NrDU.js +0 -11
- package/dist/frameView-Di0zJZUR.js +0 -39
- package/dist/layout-home-BVp7vYLR.js +0 -239
- package/dist/layoutView-B6Mx2ERA.js +0 -2662
- package/dist/log-in-BrNB0mLz.js +0 -117
- package/dist/log-out-dYfqvzy6.js +0 -111
- package/dist/login-D_Hjy3Jd.js +0 -231
- package/dist/login-log-CJak-ANA.js +0 -79
- package/dist/lov-view-DM5Nm5tW.js +0 -95
- package/dist/menuInfo-BlOY1KZW.js +0 -346
- package/dist/mitt-CQgI7DYU.js +0 -27
- package/dist/pda-app-CA7YI37u.js +0 -589
- package/dist/redirect-N0k4tImU.js +0 -16
- package/dist/resource-CfQTHFcs.js +0 -94
- package/dist/su-welcome-DVD3S_du.js +0 -799
- package/dist/sys-config-Ddb3vBpK.js +0 -316
- package/dist/system-Cm3lyBas.js +0 -1528
- package/dist/udp-core-DaQd5CF1.js +0 -2028
- package/dist/useDataThemeChange-DJ4K3VGp.js +0 -226
- package/dist/useNav-BhOJIdrJ.js +0 -106
- package/dist/utogether-l7JXs4Lv.js +0 -4
- package/dist/water-mark-WDQZ9YqB.js +0 -119
- package/dist/wecom-push-kWkAVRCj.js +0 -77
|
@@ -1,310 +1,310 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: levi7754 levi7754@163.com
|
|
3
|
-
* @Date: 2023-11-02 10:04:05
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2026-02-02 14:31:54
|
|
6
|
-
* @FilePath: /front-web-mes/src/views/uhome/su-welcome.vue
|
|
7
|
-
* @Description: 欢迎页面
|
|
8
|
-
-->
|
|
9
|
-
<template>
|
|
10
|
-
<div class="ut-home m-3">
|
|
11
|
-
<!-- 顶部 -->
|
|
12
|
-
<div v-if="systemLayout.UserProfile" class="h-32 mb-4 p-4 flex justify-between items-center bg-white home-page">
|
|
13
|
-
<div class="flex flex-row items-center flex-[2]">
|
|
14
|
-
<div>
|
|
15
|
-
<el-avatar size="large" class="text-4xl font-bold bg-[var(--el-color-primary)]">{{ firstName }}</el-avatar>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="ml-4 text-xs flex-[2]">
|
|
18
|
-
<div class="flex justify-center items-center">
|
|
19
|
-
<span> {{ getCurrentPeriod() }}, {{ systemHook.getUserInfo?.name || '' }},欢迎回来! </span>
|
|
20
|
-
<div class="flex flex-[2] justify-center items-center font-bold" style="color: var(--el-color-primary)">
|
|
21
|
-
星光不问赶路人,岁月不负有心人,以梦为马,不负韶华!
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="py-2 text-gray-500 flex">
|
|
25
|
-
<span class="inline-block"> 所属角色: </span>
|
|
26
|
-
<div class="w-2/3">{{ getRole() }}</div>
|
|
27
|
-
</div>
|
|
28
|
-
<div v-if="getRole() !== '系统管理员'" class="text-gray-500 flex">
|
|
29
|
-
<span class="inline-block"> 所属组织: </span>
|
|
30
|
-
<div class="w-2/3">{{ getOrg() }}</div>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="flex flex-col">
|
|
35
|
-
<span class="text-4xl">
|
|
36
|
-
<ut-flip-down :show-days="false" :show-labels="false" />
|
|
37
|
-
</span>
|
|
38
|
-
<div class="mt-1 ml-3">{{ getLunarDay() }}</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
<el-row v-if="has2upversion">
|
|
42
|
-
<dynamic-card :list="dataList" />
|
|
43
|
-
</el-row>
|
|
44
|
-
<el-row class="m-2" :gutter="10">
|
|
45
|
-
<el-col v-if="systemLayout.FavorityMenu" :lg="24" :md="24" class="">
|
|
46
|
-
<commonMenu />
|
|
47
|
-
</el-col>
|
|
48
|
-
<el-col v-if="systemLayout.ToDo" :lg="24" :md="24" class="">
|
|
49
|
-
<el-card>
|
|
50
|
-
<template #header>
|
|
51
|
-
<div class="font-bold">
|
|
52
|
-
<span>流程审批</span>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
55
|
-
|
|
56
|
-
<div>
|
|
57
|
-
<homeTodo />
|
|
58
|
-
</div>
|
|
59
|
-
</el-card>
|
|
60
|
-
</el-col>
|
|
61
|
-
|
|
62
|
-
<el-col v-if="systemLayout.LoginInfo" :xl="16" :lg="12" :md="24">
|
|
63
|
-
<el-card class="mb-2">
|
|
64
|
-
<template #header>
|
|
65
|
-
<div class="font-bold">
|
|
66
|
-
<span>个人动态</span>
|
|
67
|
-
</div>
|
|
68
|
-
</template>
|
|
69
|
-
<div class="p-3">
|
|
70
|
-
<ul class="p-0 w-full h-full">
|
|
71
|
-
<li v-for="item in logList" :key="item.id" class="w-full list-none p-2 border-b border-gray-200">
|
|
72
|
-
<div class="flex">
|
|
73
|
-
<div>
|
|
74
|
-
<el-avatar class="text-base">{{ firstName }}</el-avatar>
|
|
75
|
-
</div>
|
|
76
|
-
<div class="ml-3">
|
|
77
|
-
<div>
|
|
78
|
-
<span class="text-blue-600 mr-3">{{ item.browser }}</span>
|
|
79
|
-
<span>{{ item.browserVersion || item.platformVersion }}</span>
|
|
80
|
-
</div>
|
|
81
|
-
<div class="text-gray-400 text-sm">{{ item.loginTime }}</div>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</li>
|
|
85
|
-
</ul>
|
|
86
|
-
</div>
|
|
87
|
-
</el-card>
|
|
88
|
-
</el-col>
|
|
89
|
-
|
|
90
|
-
<!-- 右侧 -->
|
|
91
|
-
<el-col v-if="systemLayout.Calendar" :xl="8" :lg="12" :md="24" class="">
|
|
92
|
-
<el-card class="mb-2">
|
|
93
|
-
<template #header>
|
|
94
|
-
<div class="font-bold">
|
|
95
|
-
<span>日历</span>
|
|
96
|
-
</div>
|
|
97
|
-
</template>
|
|
98
|
-
<div class="p-1">
|
|
99
|
-
<ut-calendar :holidays="holidays" :statutory-holiday="statutoryHoliday" />
|
|
100
|
-
</div>
|
|
101
|
-
</el-card>
|
|
102
|
-
</el-col>
|
|
103
|
-
</el-row>
|
|
104
|
-
|
|
105
|
-
<!-- 重置密码 -->
|
|
106
|
-
<ut-modal-form
|
|
107
|
-
v-if="showModal"
|
|
108
|
-
:record="data"
|
|
109
|
-
:items="passwordItems()"
|
|
110
|
-
:width="360"
|
|
111
|
-
:height="250"
|
|
112
|
-
:modal-options="{ showClose: false }"
|
|
113
|
-
:show-cancle-button="false"
|
|
114
|
-
data-status="update"
|
|
115
|
-
:title="$t('message.udp.passwordReset')"
|
|
116
|
-
url="/uums/user/updatePwd"
|
|
117
|
-
method="put"
|
|
118
|
-
@close="showModal = false"
|
|
119
|
-
@confirm="logout()"
|
|
120
|
-
/>
|
|
121
|
-
</div>
|
|
122
|
-
</template>
|
|
123
|
-
|
|
124
|
-
<script setup lang="ts">
|
|
125
|
-
import { ref, onMounted, computed, onBeforeMount } from 'vue';
|
|
126
|
-
import { cookies, lunarCalendar, storageLocal, getDictChildren } from '@utogether/utils';
|
|
127
|
-
import CryptoJS from 'crypto-js';
|
|
128
|
-
import to from 'await-to-js';
|
|
129
|
-
import dayjs from 'dayjs';
|
|
130
|
-
import { useSystemStoreHook } from '../../store/modules/system';
|
|
131
|
-
import commonMenu from './components/common-menu.vue';
|
|
132
|
-
import homeTodo from './components/home-todo.vue';
|
|
133
|
-
import dynamicCard from './dynamic-card.vue';
|
|
134
|
-
import { kSYSCONFIG, kPASSWORD, kCRYPTO } from '../../contant';
|
|
135
|
-
import pkg from '../../../package.json';
|
|
136
|
-
import { getServiceApi } from '../../api';
|
|
137
|
-
|
|
138
|
-
import { useNav } from '../../layout/hooks/useNav';
|
|
139
|
-
|
|
140
|
-
defineOptions({ name: 'UdpWelcome' });
|
|
141
|
-
|
|
142
|
-
const systemHook = useSystemStoreHook();
|
|
143
|
-
|
|
144
|
-
const logList = ref([]);
|
|
145
|
-
const dataList = ref([]);
|
|
146
|
-
|
|
147
|
-
const showModal = ref(false);
|
|
148
|
-
const data = ref<IRecord>({});
|
|
149
|
-
|
|
150
|
-
const systemLayout = ref({ UserProfile: false, ToDo: false, FavorityMenu: false, Calendar: false, LoginInfo: false });
|
|
151
|
-
|
|
152
|
-
const firstName = computed(() => {
|
|
153
|
-
return systemHook.getUserInfo.name?.slice(0, 1);
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
const { passwordItems, logout } = useNav();
|
|
157
|
-
|
|
158
|
-
const has2upversion = ref(pkg.version.substring(0, 1) === '2');
|
|
159
|
-
|
|
160
|
-
let intervalId = null;
|
|
161
|
-
// 角色
|
|
162
|
-
const getRole = () => {
|
|
163
|
-
const isAdmin = systemHook.isAdminRole;
|
|
164
|
-
if (isAdmin) {
|
|
165
|
-
return '系统管理员';
|
|
166
|
-
} else {
|
|
167
|
-
return systemHook.getUserInfo?.sysRoles?.map(m => m.roleName).join(',');
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
// 组织
|
|
172
|
-
const getOrg = () => {
|
|
173
|
-
const isAdmin = systemHook.isAdminRole;
|
|
174
|
-
if (isAdmin) {
|
|
175
|
-
return '【系统管理员】拥有所有组织';
|
|
176
|
-
} else {
|
|
177
|
-
return systemHook.getOrglist?.map(m => m.orgName).join(',');
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
// 获取时间段
|
|
182
|
-
const getCurrentPeriod = () => {
|
|
183
|
-
const hour = Number(dayjs().format('HH'));
|
|
184
|
-
return hour < 12 ? '上午好' : hour < 18 ? '下午好' : '晚上好';
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
const getLunarDay = () => {
|
|
188
|
-
const time = new Date();
|
|
189
|
-
const lunarday = lunarCalendar.solar2lunar(time.getFullYear(), time.getMonth() + 1, time.getDate()) as IRecord;
|
|
190
|
-
const { gzYear, IMonthCn, IDayCn, cMonth, cDay, ncWeek } = lunarday;
|
|
191
|
-
return `${cMonth}月${cDay}日 ${gzYear}${IMonthCn}${IDayCn} ${ncWeek}`;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
const getUserLog = () => {
|
|
195
|
-
const url = '/upfm/v1/userMonitor';
|
|
196
|
-
const query = { pageSize: 8, pageNum: 1, employeeName: systemHook.getUserInfo?.name };
|
|
197
|
-
getServiceApi()
|
|
198
|
-
.get(url, query)
|
|
199
|
-
.then((res: IResponseData) => {
|
|
200
|
-
logList.value = res?.list || [];
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
const getLayoutList = async () => {
|
|
205
|
-
const api = getServiceApi();
|
|
206
|
-
const [err, res]: any = await to(
|
|
207
|
-
api.get('/upfm/sysHomeConfig', { pageSize: 1000, pageNum: 1, enabled: '1', isRoleFilter: 'Y' })
|
|
208
|
-
);
|
|
209
|
-
if (err) return;
|
|
210
|
-
systemLayout;
|
|
211
|
-
res?.list.forEach(m => {
|
|
212
|
-
if (m.type === 'custom') {
|
|
213
|
-
console.log(m);
|
|
214
|
-
dataList.value.push(m);
|
|
215
|
-
} else {
|
|
216
|
-
systemLayout.value[m.code] = !!m.code;
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
const getInitPassword = async () => {
|
|
222
|
-
const passWord = CryptoJS.AES.decrypt(cookies.get(kPASSWORD), kCRYPTO).toString(CryptoJS.enc.Utf8);
|
|
223
|
-
const dict = getDictChildren('SU.DEFAULT_PASSWORD')?.find(f => f.dictCode === 'default');
|
|
224
|
-
if (dict && dict.dictName === passWord) {
|
|
225
|
-
// 密码和默认密码一致,提示修改密码
|
|
226
|
-
data.value = {
|
|
227
|
-
id: systemHook.getUserInfo.id,
|
|
228
|
-
oldUserPwd: passWord
|
|
229
|
-
};
|
|
230
|
-
showModal.value = true;
|
|
231
|
-
window.clearInterval(intervalId);
|
|
232
|
-
} else if (dict && dict.dictName !== passWord) {
|
|
233
|
-
// 密码已重置
|
|
234
|
-
window.clearInterval(intervalId);
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
onBeforeMount(() => {
|
|
239
|
-
const sysConfig = storageLocal.getItem(kSYSCONFIG);
|
|
240
|
-
if (sysConfig.initialPasswordModification === 'Y') {
|
|
241
|
-
const passWord = CryptoJS.AES.decrypt(cookies.get(kPASSWORD), kCRYPTO).toString(CryptoJS.enc.Utf8);
|
|
242
|
-
const dict = getDictChildren('SU.DEFAULT_PASSWORD')?.find(f => f.dictCode === 'default');
|
|
243
|
-
if (!dict || dict?.dictName === passWord) {
|
|
244
|
-
intervalId = setInterval(() => {
|
|
245
|
-
getInitPassword();
|
|
246
|
-
}, 1000);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
onMounted(() => {
|
|
252
|
-
getUserLog();
|
|
253
|
-
if (pkg.version.substring(0, 1) === '2') {
|
|
254
|
-
getLayoutList();
|
|
255
|
-
} else {
|
|
256
|
-
systemLayout.value = { UserProfile: false, ToDo: false, FavorityMenu: false, Calendar: false, LoginInfo: true };
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
// 假期设置
|
|
261
|
-
const holidays = [
|
|
262
|
-
{
|
|
263
|
-
2023: { 12: { 30: '班', 31: '班' } }
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
2024: {
|
|
267
|
-
1: { 1: '假' },
|
|
268
|
-
2: {
|
|
269
|
-
4: '班',
|
|
270
|
-
10: '假',
|
|
271
|
-
11: '假',
|
|
272
|
-
12: '假',
|
|
273
|
-
13: '假',
|
|
274
|
-
14: '假',
|
|
275
|
-
15: '假',
|
|
276
|
-
16: '假',
|
|
277
|
-
17: '假',
|
|
278
|
-
18: '班'
|
|
279
|
-
},
|
|
280
|
-
4: { 4: '假', 5: '假', 6: '假', 7: '班', 28: '班' },
|
|
281
|
-
5: { 1: '假', 2: '假', 3: '假', 4: '假', 5: '假', 11: '班' },
|
|
282
|
-
6: { 8: '假', 9: '假', 10: '假' },
|
|
283
|
-
9: { 15: '假', 16: '假', 17: '假', 14: '班', 29: '班' },
|
|
284
|
-
10: { 1: '假', 2: '假', 3: '假', 4: '假', 5: '假', 6: '假', 7: '假', 12: '班' }
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
];
|
|
288
|
-
// 法定假日;
|
|
289
|
-
const statutoryHoliday = [
|
|
290
|
-
{ name: '元旦', date: '2024-01-01' },
|
|
291
|
-
{ name: '春节', date: '2024-02-10' },
|
|
292
|
-
{ name: '清明节', date: '2024-04-04' },
|
|
293
|
-
{ name: '劳动节', date: '2024-05-01' },
|
|
294
|
-
{ name: '端午节', date: '2024-06-10' },
|
|
295
|
-
{ name: '中秋节', date: '2024-09-17' },
|
|
296
|
-
{ name: '国庆节', date: '2024-10-01' }
|
|
297
|
-
];
|
|
298
|
-
</script>
|
|
299
|
-
|
|
300
|
-
<style lang="scss" scoped>
|
|
301
|
-
.ut-home {
|
|
302
|
-
.el-avatar--large {
|
|
303
|
-
--el-avatar-size: 72px;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
::v-deep(.el-card__body) {
|
|
307
|
-
padding: 0 !important;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
</style>
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: levi7754 levi7754@163.com
|
|
3
|
+
* @Date: 2023-11-02 10:04:05
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2026-02-02 14:31:54
|
|
6
|
+
* @FilePath: /front-web-mes/src/views/uhome/su-welcome.vue
|
|
7
|
+
* @Description: 欢迎页面
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div class="ut-home m-3">
|
|
11
|
+
<!-- 顶部 -->
|
|
12
|
+
<div v-if="systemLayout.UserProfile" class="h-32 mb-4 p-4 flex justify-between items-center bg-white home-page">
|
|
13
|
+
<div class="flex flex-row items-center flex-[2]">
|
|
14
|
+
<div>
|
|
15
|
+
<el-avatar size="large" class="text-4xl font-bold bg-[var(--el-color-primary)]">{{ firstName }}</el-avatar>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="ml-4 text-xs flex-[2]">
|
|
18
|
+
<div class="flex justify-center items-center">
|
|
19
|
+
<span> {{ getCurrentPeriod() }}, {{ systemHook.getUserInfo?.name || '' }},欢迎回来! </span>
|
|
20
|
+
<div class="flex flex-[2] justify-center items-center font-bold" style="color: var(--el-color-primary)">
|
|
21
|
+
星光不问赶路人,岁月不负有心人,以梦为马,不负韶华!
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="py-2 text-gray-500 flex">
|
|
25
|
+
<span class="inline-block"> 所属角色: </span>
|
|
26
|
+
<div class="w-2/3">{{ getRole() }}</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div v-if="getRole() !== '系统管理员'" class="text-gray-500 flex">
|
|
29
|
+
<span class="inline-block"> 所属组织: </span>
|
|
30
|
+
<div class="w-2/3">{{ getOrg() }}</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="flex flex-col">
|
|
35
|
+
<span class="text-4xl">
|
|
36
|
+
<ut-flip-down :show-days="false" :show-labels="false" />
|
|
37
|
+
</span>
|
|
38
|
+
<div class="mt-1 ml-3">{{ getLunarDay() }}</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<el-row v-if="has2upversion">
|
|
42
|
+
<dynamic-card :list="dataList" />
|
|
43
|
+
</el-row>
|
|
44
|
+
<el-row class="m-2" :gutter="10">
|
|
45
|
+
<el-col v-if="systemLayout.FavorityMenu" :lg="24" :md="24" class="">
|
|
46
|
+
<commonMenu />
|
|
47
|
+
</el-col>
|
|
48
|
+
<el-col v-if="systemLayout.ToDo" :lg="24" :md="24" class="">
|
|
49
|
+
<el-card>
|
|
50
|
+
<template #header>
|
|
51
|
+
<div class="font-bold">
|
|
52
|
+
<span>流程审批</span>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<div>
|
|
57
|
+
<homeTodo />
|
|
58
|
+
</div>
|
|
59
|
+
</el-card>
|
|
60
|
+
</el-col>
|
|
61
|
+
|
|
62
|
+
<el-col v-if="systemLayout.LoginInfo" :xl="16" :lg="12" :md="24">
|
|
63
|
+
<el-card class="mb-2">
|
|
64
|
+
<template #header>
|
|
65
|
+
<div class="font-bold">
|
|
66
|
+
<span>个人动态</span>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
<div class="p-3">
|
|
70
|
+
<ul class="p-0 w-full h-full">
|
|
71
|
+
<li v-for="item in logList" :key="item.id" class="w-full list-none p-2 border-b border-gray-200">
|
|
72
|
+
<div class="flex">
|
|
73
|
+
<div>
|
|
74
|
+
<el-avatar class="text-base">{{ firstName }}</el-avatar>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="ml-3">
|
|
77
|
+
<div>
|
|
78
|
+
<span class="text-blue-600 mr-3">{{ item.browser }}</span>
|
|
79
|
+
<span>{{ item.browserVersion || item.platformVersion }}</span>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="text-gray-400 text-sm">{{ item.loginTime }}</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</li>
|
|
85
|
+
</ul>
|
|
86
|
+
</div>
|
|
87
|
+
</el-card>
|
|
88
|
+
</el-col>
|
|
89
|
+
|
|
90
|
+
<!-- 右侧 -->
|
|
91
|
+
<el-col v-if="systemLayout.Calendar" :xl="8" :lg="12" :md="24" class="">
|
|
92
|
+
<el-card class="mb-2">
|
|
93
|
+
<template #header>
|
|
94
|
+
<div class="font-bold">
|
|
95
|
+
<span>日历</span>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
<div class="p-1">
|
|
99
|
+
<ut-calendar :holidays="holidays" :statutory-holiday="statutoryHoliday" />
|
|
100
|
+
</div>
|
|
101
|
+
</el-card>
|
|
102
|
+
</el-col>
|
|
103
|
+
</el-row>
|
|
104
|
+
|
|
105
|
+
<!-- 重置密码 -->
|
|
106
|
+
<ut-modal-form
|
|
107
|
+
v-if="showModal"
|
|
108
|
+
:record="data"
|
|
109
|
+
:items="passwordItems()"
|
|
110
|
+
:width="360"
|
|
111
|
+
:height="250"
|
|
112
|
+
:modal-options="{ showClose: false }"
|
|
113
|
+
:show-cancle-button="false"
|
|
114
|
+
data-status="update"
|
|
115
|
+
:title="$t('message.udp.passwordReset')"
|
|
116
|
+
url="/uums/user/updatePwd"
|
|
117
|
+
method="put"
|
|
118
|
+
@close="showModal = false"
|
|
119
|
+
@confirm="logout()"
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
</template>
|
|
123
|
+
|
|
124
|
+
<script setup lang="ts">
|
|
125
|
+
import { ref, onMounted, computed, onBeforeMount } from 'vue';
|
|
126
|
+
import { cookies, lunarCalendar, storageLocal, getDictChildren } from '@utogether/utils';
|
|
127
|
+
import CryptoJS from 'crypto-js';
|
|
128
|
+
import to from 'await-to-js';
|
|
129
|
+
import dayjs from 'dayjs';
|
|
130
|
+
import { useSystemStoreHook } from '../../store/modules/system';
|
|
131
|
+
import commonMenu from './components/common-menu.vue';
|
|
132
|
+
import homeTodo from './components/home-todo.vue';
|
|
133
|
+
import dynamicCard from './dynamic-card.vue';
|
|
134
|
+
import { kSYSCONFIG, kPASSWORD, kCRYPTO } from '../../contant';
|
|
135
|
+
import pkg from '../../../package.json';
|
|
136
|
+
import { getServiceApi } from '../../api';
|
|
137
|
+
|
|
138
|
+
import { useNav } from '../../layout/hooks/useNav';
|
|
139
|
+
|
|
140
|
+
defineOptions({ name: 'UdpWelcome' });
|
|
141
|
+
|
|
142
|
+
const systemHook = useSystemStoreHook();
|
|
143
|
+
|
|
144
|
+
const logList = ref([]);
|
|
145
|
+
const dataList = ref([]);
|
|
146
|
+
|
|
147
|
+
const showModal = ref(false);
|
|
148
|
+
const data = ref<IRecord>({});
|
|
149
|
+
|
|
150
|
+
const systemLayout = ref({ UserProfile: false, ToDo: false, FavorityMenu: false, Calendar: false, LoginInfo: false });
|
|
151
|
+
|
|
152
|
+
const firstName = computed(() => {
|
|
153
|
+
return systemHook.getUserInfo.name?.slice(0, 1);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
const { passwordItems, logout } = useNav();
|
|
157
|
+
|
|
158
|
+
const has2upversion = ref(pkg.version.substring(0, 1) === '2');
|
|
159
|
+
|
|
160
|
+
let intervalId = null;
|
|
161
|
+
// 角色
|
|
162
|
+
const getRole = () => {
|
|
163
|
+
const isAdmin = systemHook.isAdminRole;
|
|
164
|
+
if (isAdmin) {
|
|
165
|
+
return '系统管理员';
|
|
166
|
+
} else {
|
|
167
|
+
return systemHook.getUserInfo?.sysRoles?.map(m => m.roleName).join(',');
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
// 组织
|
|
172
|
+
const getOrg = () => {
|
|
173
|
+
const isAdmin = systemHook.isAdminRole;
|
|
174
|
+
if (isAdmin) {
|
|
175
|
+
return '【系统管理员】拥有所有组织';
|
|
176
|
+
} else {
|
|
177
|
+
return systemHook.getOrglist?.map(m => m.orgName).join(',');
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// 获取时间段
|
|
182
|
+
const getCurrentPeriod = () => {
|
|
183
|
+
const hour = Number(dayjs().format('HH'));
|
|
184
|
+
return hour < 12 ? '上午好' : hour < 18 ? '下午好' : '晚上好';
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const getLunarDay = () => {
|
|
188
|
+
const time = new Date();
|
|
189
|
+
const lunarday = lunarCalendar.solar2lunar(time.getFullYear(), time.getMonth() + 1, time.getDate()) as IRecord;
|
|
190
|
+
const { gzYear, IMonthCn, IDayCn, cMonth, cDay, ncWeek } = lunarday;
|
|
191
|
+
return `${cMonth}月${cDay}日 ${gzYear}${IMonthCn}${IDayCn} ${ncWeek}`;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const getUserLog = () => {
|
|
195
|
+
const url = '/upfm/v1/userMonitor';
|
|
196
|
+
const query = { pageSize: 8, pageNum: 1, employeeName: systemHook.getUserInfo?.name };
|
|
197
|
+
getServiceApi()
|
|
198
|
+
.get(url, query)
|
|
199
|
+
.then((res: IResponseData) => {
|
|
200
|
+
logList.value = res?.list || [];
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const getLayoutList = async () => {
|
|
205
|
+
const api = getServiceApi();
|
|
206
|
+
const [err, res]: any = await to(
|
|
207
|
+
api.get('/upfm/sysHomeConfig', { pageSize: 1000, pageNum: 1, enabled: '1', isRoleFilter: 'Y' })
|
|
208
|
+
);
|
|
209
|
+
if (err) return;
|
|
210
|
+
systemLayout;
|
|
211
|
+
res?.list.forEach(m => {
|
|
212
|
+
if (m.type === 'custom') {
|
|
213
|
+
console.log(m);
|
|
214
|
+
dataList.value.push(m);
|
|
215
|
+
} else {
|
|
216
|
+
systemLayout.value[m.code] = !!m.code;
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const getInitPassword = async () => {
|
|
222
|
+
const passWord = CryptoJS.AES.decrypt(cookies.get(kPASSWORD), kCRYPTO).toString(CryptoJS.enc.Utf8);
|
|
223
|
+
const dict = getDictChildren('SU.DEFAULT_PASSWORD')?.find(f => f.dictCode === 'default');
|
|
224
|
+
if (dict && dict.dictName === passWord) {
|
|
225
|
+
// 密码和默认密码一致,提示修改密码
|
|
226
|
+
data.value = {
|
|
227
|
+
id: systemHook.getUserInfo.id,
|
|
228
|
+
oldUserPwd: passWord
|
|
229
|
+
};
|
|
230
|
+
showModal.value = true;
|
|
231
|
+
window.clearInterval(intervalId);
|
|
232
|
+
} else if (dict && dict.dictName !== passWord) {
|
|
233
|
+
// 密码已重置
|
|
234
|
+
window.clearInterval(intervalId);
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
onBeforeMount(() => {
|
|
239
|
+
const sysConfig = storageLocal.getItem(kSYSCONFIG);
|
|
240
|
+
if (sysConfig.initialPasswordModification === 'Y') {
|
|
241
|
+
const passWord = CryptoJS.AES.decrypt(cookies.get(kPASSWORD), kCRYPTO).toString(CryptoJS.enc.Utf8);
|
|
242
|
+
const dict = getDictChildren('SU.DEFAULT_PASSWORD')?.find(f => f.dictCode === 'default');
|
|
243
|
+
if (!dict || dict?.dictName === passWord) {
|
|
244
|
+
intervalId = setInterval(() => {
|
|
245
|
+
getInitPassword();
|
|
246
|
+
}, 1000);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
onMounted(() => {
|
|
252
|
+
getUserLog();
|
|
253
|
+
if (pkg.version.substring(0, 1) === '2') {
|
|
254
|
+
getLayoutList();
|
|
255
|
+
} else {
|
|
256
|
+
systemLayout.value = { UserProfile: false, ToDo: false, FavorityMenu: false, Calendar: false, LoginInfo: true };
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// 假期设置
|
|
261
|
+
const holidays = [
|
|
262
|
+
{
|
|
263
|
+
2023: { 12: { 30: '班', 31: '班' } }
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
2024: {
|
|
267
|
+
1: { 1: '假' },
|
|
268
|
+
2: {
|
|
269
|
+
4: '班',
|
|
270
|
+
10: '假',
|
|
271
|
+
11: '假',
|
|
272
|
+
12: '假',
|
|
273
|
+
13: '假',
|
|
274
|
+
14: '假',
|
|
275
|
+
15: '假',
|
|
276
|
+
16: '假',
|
|
277
|
+
17: '假',
|
|
278
|
+
18: '班'
|
|
279
|
+
},
|
|
280
|
+
4: { 4: '假', 5: '假', 6: '假', 7: '班', 28: '班' },
|
|
281
|
+
5: { 1: '假', 2: '假', 3: '假', 4: '假', 5: '假', 11: '班' },
|
|
282
|
+
6: { 8: '假', 9: '假', 10: '假' },
|
|
283
|
+
9: { 15: '假', 16: '假', 17: '假', 14: '班', 29: '班' },
|
|
284
|
+
10: { 1: '假', 2: '假', 3: '假', 4: '假', 5: '假', 6: '假', 7: '假', 12: '班' }
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
];
|
|
288
|
+
// 法定假日;
|
|
289
|
+
const statutoryHoliday = [
|
|
290
|
+
{ name: '元旦', date: '2024-01-01' },
|
|
291
|
+
{ name: '春节', date: '2024-02-10' },
|
|
292
|
+
{ name: '清明节', date: '2024-04-04' },
|
|
293
|
+
{ name: '劳动节', date: '2024-05-01' },
|
|
294
|
+
{ name: '端午节', date: '2024-06-10' },
|
|
295
|
+
{ name: '中秋节', date: '2024-09-17' },
|
|
296
|
+
{ name: '国庆节', date: '2024-10-01' }
|
|
297
|
+
];
|
|
298
|
+
</script>
|
|
299
|
+
|
|
300
|
+
<style lang="scss" scoped>
|
|
301
|
+
.ut-home {
|
|
302
|
+
.el-avatar--large {
|
|
303
|
+
--el-avatar-size: 72px;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
::v-deep(.el-card__body) {
|
|
307
|
+
padding: 0 !important;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
</style>
|