更新密码找回uniapp

This commit is contained in:
hero920103 committed 2026-11-16 17:22:50 +08:00
1 parent 7f9a66da0f
commit 3fdda89833
1304 files changed
+3503 -26132

No files matched your search

-12
View File
@@ -82,12 +82,6 @@
</template>
<script setup>
/**
* 员工档案(HR 视角):展示全公司员工的档案列表。
*
* 权限口径:租户角色里勾选了「员工档案」菜单即为 HR,可见全公司档案;
* 未开通该权限的用户自动降级为查看本人档案(跳详情页),与旧版行为一致。
*/
import { ref, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import {
@@ -95,11 +89,9 @@ import {
fetchEmployeeFiles,
getEmploymentStatusLabel
} from '@/api/oa.js'
// 组织树复用通讯录接口(同一套组织数据,仅用于部门筛选)
import { fetchContactOrgTree } from '@/api/contact.js'
import { isLoggedIn } from '@/utils/auth.js'
/** 在职状态 tab:全部 / 试用 / 正式 / 离职,索引与 employment_status 对应(0 表示不筛选) */
const STATUS_TABS = [{ name: '全部' }, { name: '试用' }, { name: '正式' }, { name: '离职' }]
const STATUS_VALUES = [0, 1, 2, 3]
@@ -131,7 +123,6 @@ async function init() {
canViewAll = false
}
if (!canViewAll) {
// 无 HR 权限:保持原有「只能看本人档案」的行为
uni.redirectTo({ url: '/pages/oa/employeefile/detail' })
return
}
@@ -139,14 +130,12 @@ async function init() {
loadFiles(true)
}
/** 部门下拉选项:全部 + 各部门(组织树含子级,展开为平铺列表) */
const deptOptions = computed(() => {
const options = [{ label: '全部部门', value: 0 }]
flattenOrgs(orgs.value, options)
return options
})
/** 组织树拍平为部门列表 */
function flattenOrgs(nodes, out) {
;(nodes || []).forEach((node) => {
if (node.org_name) {
@@ -160,7 +149,6 @@ function flattenOrgs(nodes, out) {
async function loadOrgTree() {
try {
// 复用通讯录的组织树接口:同一套组织数据,仅用于筛选,不涉及联系人明细
const tree = await fetchContactOrgTree()
orgs.value = Array.isArray(tree) ? tree : []
} catch (e) {