| | |
| | | <template> |
| | | <div class="flex_column"> |
| | | <div v-if="!editPlanShow && isDepartment"> |
| | | <div class="title"> |
| | | <span style="font-weight: bold">年度计划</span> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="page" ref="page" size="small" :inline="true"> |
| | | <el-form-item label="编制人"> |
| | |
| | | </div> |
| | | <lims-table :tableData="yearPlanTableData" :column="yearPlanColumn" |
| | | :currentChange="currentChange" |
| | | @pagination="pagination" :height="'calc(100vh - 290px)'" |
| | | @pagination="pagination" height="40vh" |
| | | :page="page" :tableLoading="yearLoading"></lims-table> |
| | | </div> |
| | | <div v-if="!editPlanShow" class="table"> |
| | | <div v-if="!editPlanShow && isDepartment"> |
| | | <div> |
| | | <div class="title"> |
| | | <span style="font-weight: bold">年度计划明细</span> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="inDetailForm" ref="inDetailForm" size="small" :inline="true"> |
| | | <el-form-item label="培训讲师"> |
| | |
| | | </div> |
| | | </div> |
| | | <lims-table :tableData="inDetailPlanTableData" :column="inDetailPlanColumn" |
| | | :currentChange="currentChange" :height="isDepartment ? '45vh' : '68vh' " |
| | | :height="isDepartment ? '40vh' : '62vh' " |
| | | :isSelection="true" :handleSelectionChange="handleSelectionChange" |
| | | @pagination="pagination1" |
| | | :page="inDetailPagination" :tableLoading="yearLoading"></lims-table> |
| | | :page="inDetailPagination" :tableLoading="yearDetailLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | <Add ref="addPlan" :currentChangeRow="currentChangeRow" @search="getInDetailPlan(currentRowId, departId)"></Add> |
| | |
| | | trainingDate: '', |
| | | }, |
| | | yearLoading: false, |
| | | yearDetailLoading: false, |
| | | yearPlanTableData: [], // 年度计划表数据 |
| | | yearPlanColumn: [ |
| | | { |
| | |
| | | name: '批准', |
| | | type: 'text', |
| | | disabled: (row) => { |
| | | if(row.approvalStatus === 1 || this.userId != row.approverId) { |
| | | if(row.approvalStatus === 1 || this.userId != row.approverId || row.reviewerStatus != 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | }, |
| | | // 查询-年度计划表 |
| | | getYearPlanList(userId) { |
| | | this.yearLoading = true |
| | | const params = this.isDepartment ? |
| | | { |
| | | departmentId: userId, |
| | |
| | | compilerName: this.page.compilerName, |
| | | } |
| | | personTraining(params).then(res => { |
| | | this.yearLoading = false |
| | | this.yearPlanTableData = res.data.records; |
| | | this.pagination.total = res.data.total; |
| | | if (this.yearPlanTableData.length > 0) { |
| | | this.currentRowId = this.yearPlanTableData[0].id |
| | | this.currentChange(this.yearPlanTableData[0]) |
| | | } |
| | | }); |
| | | }).catch(err => { |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.limit |
| | |
| | | trainingLecturerName: this.inDetailForm.trainingLecturerName, |
| | | trainingDate: this.inDetailForm.trainingDate, |
| | | } |
| | | this.yearDetailLoading = true |
| | | queryTheAnnualPlanDetailsTable(params).then(res => { |
| | | this.yearDetailLoading = false |
| | | this.inDetailPlanTableData = res.data.records; |
| | | this.inDetailPagination.total = res.data.total; |
| | | }); |
| | | }).catch(err => { |
| | | this.yearDetailLoading = false |
| | | }) |
| | | }, |
| | | pagination1 (page) { |
| | | this.inDetailPagination.size = page.limit |
| | |
| | | this.uploadDia = false |
| | | this.uploading = false |
| | | if (response.code != 200) { |
| | | this.$message.error(response.message) |
| | | this.$message.error(response.msg) |
| | | return |
| | | } |
| | | this.$message.success('上传成功') |
| | |
| | | overflow: auto; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .date_box { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | margin: 0 16px; |
| | | } |
| | | .title { |
| | | position: relative; |
| | | font-size: 16px; |
| | | color: #333; |
| | | font-weight: 400; |
| | | padding-left: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .title::before { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 4px; |
| | | content: ''; |
| | | width: 4px; |
| | | height: 16px; |
| | | background-color: #3A7BFA; |
| | | border-radius: 2px; |
| | | } |
| | | </style> |