| | |
| | | import { el } from 'element-plus/es/locales.mjs' |
| | | import { getUserProfile } from '@/api/system/user.js' |
| | | import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js"; |
| | | import useUserStore from '@/store/modules/user' |
| | | import { userLoginFacotryList } from "@/api/system/user.js" |
| | | |
| | | // 响应式数据 |
| | | const currentUser = ref(null) |
| | |
| | | const operationType = ref('add') |
| | | const tableData = ref([]) |
| | | // 用印申请相关 |
| | | const userStore = useUserStore() |
| | | const showSealApplyDialog = ref(false) |
| | | const tableLoading = ref(false) |
| | | const showSealDetailDialog = ref(false) |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | // 获取印章申请列表数据 |
| | | const getSealApplicationList = async () => { |
| | | tableLoading.value = true |
| | | listSealApplication(page,sealSearchForm) |
| | | .then(res => { |
| | | |
| | | //获取当前登录的部门信息 |
| | | // 获取当前登录的部门信息并过滤数据 |
| | | const currentFactoryName = userStore.currentFactoryName |
| | | if (currentFactoryName) { |
| | | // 根据currentFactoryName过滤出department相同的数据 |
| | | sealApplications.value = res.data.records.filter(item => item.department === currentFactoryName) |
| | | // 更新过滤后的总数 |
| | | page.value.total = sealApplications.value.length |
| | | } else { |
| | | // 如果没有currentFactoryName,则显示所有数据 |
| | | sealApplications.value = res.data.records |
| | | page.value.total = res.data.total; |
| | | page.value.total = res.data.total |
| | | } |
| | | // sealApplications.value = res.data.records |
| | | // page.value.total = res.data.total; |
| | | tableLoading.value = false; |
| | | |
| | | }).catch(err => { |