| | |
| | | <el-table-column label="操作" width="200" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button link @click="viewSealDetail(scope.row)">查看</el-button> |
| | | <el-button link type="warning" @click="openFilesFormDia(scope.row)">附件</el-button> |
| | | <el-button |
| | | v-if="scope.row.status === 'pending'" |
| | | link |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-show="total > 0" :total="total" layout="total, sizes, prev, pager, next, jumper" |
| | | :page="page.current" :limit="page.size" @pagination="paginationChange" /> |
| | | </div> |
| | | </el-card> |
| | | |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <files-dia ref="filesDia"></files-dia> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js"; |
| | | import useUserStore from '@/store/modules/user' |
| | | import { userLoginFacotryList } from "@/api/system/user.js" |
| | | |
| | | import FilesDia from "./filesDia.vue"; |
| | | // 响应式数据 |
| | | const currentUser = ref(null) |
| | | const activeTab = ref('seal') |
| | | const operationType = ref('add') |
| | | const tableData = ref([]) |
| | | const filesDia = ref() |
| | | // 用印申请相关 |
| | | const userStore = useUserStore() |
| | | const showSealApplyDialog = ref(false) |
| | |
| | | // 分页参数 |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 10, |
| | | size: 100, |
| | | total: 0 |
| | | }) |
| | | // 规章制度相关 |
| | |
| | | ElMessage.error('请完善申请信息') |
| | | } |
| | | } |
| | | // 打开附件弹框 |
| | | const openFilesFormDia = (row) => { |
| | | console.log(row) |
| | | nextTick(() => { |
| | | filesDia.value?.openDialog( row,'用印管理') |
| | | }) |
| | | }; |
| | | // 新增 |
| | | const handleAdd = () => { |
| | | operationType.value = 'add' |
| | |
| | | currentUser.value = res.data.userName |
| | | } |
| | | }) |
| | | staffJoinListPage({staffState: 1}).then(res => { |
| | | staffJoinListPage({staffState: 1, ...page}).then(res => { |
| | | tableLoading.value = false; |
| | | // tableData.value = res.data.records |
| | | // //筛选出和currentUser同名的人员 |
| | | tableData.value = res.data.records.filter(item => item.staffName === currentUser.value) |
| | | console.log("tableData",tableData.value) |
| | | page.total = res.data.total; |
| | | |
| | | if(tableData.value.length == 0){ |
| | |
| | | // 根据currentFactoryName过滤出department相同的数据 |
| | | sealApplications.value = res.data.records.filter(item => item.department === currentFactoryName) |
| | | // 更新过滤后的总数 |
| | | page.value.total = sealApplications.value.length |
| | | page.total = sealApplications.value.length |
| | | } else { |
| | | // 如果没有currentFactoryName,则显示所有数据 |
| | | sealApplications.value = res.data.records |
| | | page.value.total = res.data.total |
| | | page.total = res.data.total |
| | | } |
| | | // sealApplications.value = res.data.records |
| | | // page.value.total = res.data.total; |
| | |
| | | regulations.value = res.data.records |
| | | // 过滤掉已废弃的制度 |
| | | // regulations.value = res.data.records.filter(item => item.status !== 'repealed') |
| | | page.value.total = res.data.total; |
| | | page.total = res.data.total; |
| | | tableLoading.value = false; |
| | | |
| | | }).catch(err => { |