Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | "jsencrypt": "3.0.0-rc.1", |
| | | "jspdf": "^3.0.0", |
| | | "mammoth": "^1.9.0", |
| | | "moment": "^2.30.1", |
| | | "nprogress": "0.2.0", |
| | | "pako": "^2.1.0", |
| | | "print-js": "^1.6.0", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢å²ä½èè´£ |
| | | export function personJobResponsibilitiesSelect(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesSelect", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // æ°å¢å²ä½èè´£ |
| | | export function personJobResponsibilitiesSave(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesSave", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | } |
| | | // 导åºå²ä½èè´£ |
| | | export function exportPersonJobResponsibilities(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/exportPersonJobResponsibilities", |
| | | method: "post", |
| | | params: query, |
| | | responseType: "blob" |
| | | }); |
| | | } |
| | | // å é¤å²ä½èè´£ |
| | | export function personJobResponsibilitiesDelete(query) { |
| | | return request({ |
| | | url: "/personJobResponsibilities/personJobResponsibilitiesDelete", |
| | | method: "delete ", |
| | | params: query |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // 人å - 奿©è®°å½ å页æ¥è¯¢ |
| | | export function rewardPunishmentPage(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/rewardPunishmentPage", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | | // 人å - 奿©è®°å½ å¯¼åº |
| | | export function rewardPunishmentExport(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/rewardPunishmentExport", |
| | | method: "get", |
| | | params: query, |
| | | responseType: 'blob' |
| | | }); |
| | | } |
| | | // 人å - 奿©è®°å½ æ°å¢/æ´æ° |
| | | export function addOrUpdateRewardPunishment(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/addOrUpdateRewardPunishment", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // 人å - 奿©è®°å½ æ°å¢/æ´æ° |
| | | export function deleteRewardPunishment(query) { |
| | | return request({ |
| | | url: "/personRewardPunishmentRecord/deleteRewardPunishment", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // 导åºå¹è®è®°å½ |
| | | export function exportTrainingRecord(query) { |
| | | return request({ |
| | | url: "/personTrainingRecord/exportTrainingRecord", |
| | | method: "get", |
| | | params: query, |
| | | responseType: 'blob' |
| | | }); |
| | | } |
| | | // æ¥è¯¢äººå å¹è®è®°å½ |
| | | export function trainingSelectTrainingRecord(query) { |
| | | return request({ |
| | | url: "/personTrainingRecord/trainingSelectTrainingRecord", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ¥è¯¢äººåæç» å¹è®è®°å½ |
| | | export function queryPersonnelDetails(query) { |
| | | return request({ |
| | | url: "/personTrainingRecord/queryPersonnelDetails", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | // æ¥è¯¢äººåå¹è® |
| | | export function personTraining(query) { |
| | | return request({ |
| | | url: "/personTraining/personTraining", |
| | | url: "/personTraining/personTrainingSelect", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | |
| | | height: 32px; |
| | | margin-bottom: 10px; |
| | | margin-top: 15px; |
| | | padding: 10px 20px !important; |
| | | padding: 0 20px !important; |
| | | } |
| | | |
| | | /* tree border */ |
| | |
| | | <style scoped> |
| | | .pagination-container { |
| | | background: #fff; |
| | | padding: 32px 16px; |
| | | padding: 28px 16px; |
| | | margin-top: 10px; |
| | | } |
| | | .pagination-container.hidden { |
| | | display: none; |
| | |
| | | import DictData from "@/components/DictData"; |
| | | import { checkPermi } from "@/utils/permission"; // æé夿彿° |
| | | import { getToken } from "@/utils/auth"; |
| | | // æ¶é´è½¬æ¢ |
| | | import Moment from 'moment' |
| | | |
| | | // å
¨å±æ¹æ³æè½½ |
| | | Vue.prototype.getDicts = getDicts; |
| | |
| | | }); |
| | | } |
| | | }) |
| | | Vue.use(Moment) |
| | | Vue.prototype.$moment = Moment |
| | | |
| | | // å
¨å±ç»ä»¶æè½½ |
| | | Vue.component("DictTag", DictTag); |
| | |
| | | }, |
| | | addUserTableInfo: { |
| | | name: null, |
| | | departLimsId: '1', |
| | | }, |
| | | multipleSelection: [], |
| | | userList: [], |
| | |
| | | import filePreview from '@/components/Preview/filePreview.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {delTrainingDetailedFileList, getTrainingDetailedFileList} from "@/api/cnas/personal/personalTraining"; |
| | | import {delCustomById} from "@/api/system/customer"; |
| | | |
| | | export default { |
| | | name: 'ViewRecord', |
| | |
| | | }, |
| | | // å é¤ |
| | | delete (row) { |
| | | this.tableLoading = true |
| | | delTrainingDetailedFileList({detailedFileId: row.detailedFileId}).then(res => { |
| | | this.tableLoading = false |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | delTrainingDetailedFileList({detailedFileId: row.detailedFileId}).then(res => { |
| | | this.tableLoading = false |
| | | this.$message.success('å 餿å') |
| | | this.searchTableList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // ä¸ä¼ éªè¯ |
| | | fileBeforeUpload(file) { |
| | |
| | | }, |
| | | computed: { |
| | | fileAction() { |
| | | return this.javaApi + '/personTraining/delTrainingDetailedFileList' |
| | | return this.javaApi + '/personTraining/uploadTrainingDetailedFile' |
| | | |
| | | } |
| | | }, |
| | |
| | | @updatePerson="updatePerson"></PersonnelList> |
| | | <personnelInformation v-if="activeName === '人ååºæ¬ä¿¡æ¯' && !isShowAll" :clickNodeVal="clickNodeVal"></personnelInformation> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="å¹è®è®¡å" name="å¹è®è®¡å">--> |
| | | <!-- <PersonnelTraining v-if="activeName === 'å¹è®è®¡å'" ref="personnelTraining"--> |
| | | <!-- :departId="departId" :isDepartment="isDepartment"></PersonnelTraining>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="å²ä½èè´£" name="å²ä½èè´£">--> |
| | | <!-- <job-responsibilities v-if="activeName === 'å²ä½èè´£'" ref="jobResponsibilities"--> |
| | | <!-- :departId="departId"--> |
| | | <!-- :isDepartment="isDepartment"></job-responsibilities>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="奿©è®°å½" name="奿©è®°å½">--> |
| | | <!-- <rewardPunishmentRecord v-if="activeName === '奿©è®°å½'"--> |
| | | <!-- :departId="departId" :isDepartment="isDepartment"></rewardPunishmentRecord>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="å¹è®è®°å½" name="å¹è®è®°å½">--> |
| | | <!-- <training-record v-if="activeName === 'å¹è®è®°å½'" ref="trainingRecord"--> |
| | | <!-- :departId="departId"--> |
| | | <!-- :isDepartment="isDepartment"></training-record>--> |
| | | <!-- </el-tab-pane>--> |
| | | <el-tab-pane label="å¹è®è®¡å" name="å¹è®è®¡å"> |
| | | <PersonnelTraining v-if="activeName === 'å¹è®è®¡å'" ref="personnelTraining" |
| | | :departId="departId" :isDepartment="isDepartment"></PersonnelTraining> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å²ä½èè´£" name="å²ä½èè´£"> |
| | | <job-responsibilities v-if="activeName === 'å²ä½èè´£'" ref="jobResponsibilities" |
| | | :departId="departId" |
| | | :isDepartment="isDepartment"></job-responsibilities> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="奿©è®°å½" name="奿©è®°å½"> |
| | | <rewardPunishmentRecord v-if="activeName === '奿©è®°å½'" |
| | | :departId="departId" :isDepartment="isDepartment"></rewardPunishmentRecord> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å¹è®è®°å½" name="å¹è®è®°å½"> |
| | | <training-record v-if="activeName === 'å¹è®è®°å½'" ref="trainingRecord" |
| | | :departId="departId" |
| | | :isDepartment="isDepartment"></training-record> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="ä»»èææè®°å½" name="ä»»èææè®°å½">--> |
| | | <!-- <Mandate v-if="activeName === 'ä»»èææè®°å½'" ref="manDateRef" :departId="departId" :isDepartment="isDepartment"></Mandate>--> |
| | | <!-- </el-tab-pane>--> |
| | |
| | | height: 14px; |
| | | /* 设置æ»å¨æ¡å®½åº¦ */ |
| | | } |
| | | .node_i { |
| | | color: orange; |
| | | font-size: 18px; |
| | | } |
| | | .custom-tree-node { |
| | | width: 80%; |
| | | line-height: 32px; |
| | |
| | | <!-- å²ä½èè´£ --> |
| | | <template> |
| | | <div class="view"> |
| | | <div style="text-align: left; margin-bottom: 15px;padding: 0 10px"> |
| | | <label>åå·¥ï¼</label> |
| | | <el-input v-model="userName" clearable placeholder="请è¾å
¥åå·¥" size="small" style="width: 20vh;"></el-input> |
| | | <el-button size="small" type="primary" @click="refreshTable">æ¥è¯¢</el-button> |
| | | <div v-if="isDepartment" style="float: right;"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form ref="page" size="small" :inline="true"> |
| | | <el-form-item label="åå·¥"> |
| | | <el-input v-model="userName" clearable placeholder="请è¾å
¥åå·¥" size="small" style="width: 20vh;"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="refreshTable">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="addPost">æ°å¢</el-button> |
| | | <!-- <el-button size="small" type="primary">导åºexcel</el-button>--> |
| | | </div> |
| | | </div> |
| | | <div class="table" style="padding: 0 10px"> |
| | | <el-table :data="tableData" height="70vh" style="width: 100%"> |
| | | <div class="table"> |
| | | <el-table :data="tableData" v-loading="tableLoading" height="66.5vh" style="width: 100%"> |
| | | <el-table-column label="åºå·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="åå·¥ç¼å·" min-width="120" prop="account"></el-table-column> |
| | | <el-table-column label="å²ä½åç§°" min-width="180" prop="postName"></el-table-column> |
| | |
| | | <el-table-column label="ä»»èäººå®¡æ ¸æ¥æ" min-width="180" prop="incumbentDate"></el-table-column> |
| | | <el-table-column label="主管" min-width="180" prop="supervisorName"></el-table-column> |
| | | <el-table-column label="ä¸»ç®¡å®¡æ ¸æ¥æ" min-width="180" prop="supervisorDate"></el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="140"> |
| | | <el-table-column fixed="right" label="æä½" width="140" align="center"> |
| | | <template v-slot="scope"> |
| | | <el-button v-if="!isDepartment || scope.row.currentState === 'å
³é'" size="small" type="text" |
| | | @click="handleViewClick(scope.row, 'view')">æ¥ç |
| | |
| | | @click="handleViewClick(scope.row, 'edit')">ç¼è¾ |
| | | </el-button> |
| | | <el-button size="small" type="text" @click="downLoadPost(scope.row)">导åº</el-button> |
| | | <el-button v-if="isDepartment" size="small" type="text" @click="deletePost(scope.row)">å é¤</el-button> |
| | | <el-button v-if="isDepartment" size="small" style="color: #f56c6c" type="text" @click="deletePost(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | background |
| | | style="margin-top: 10px" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import { dateFormat } from '../../../util/date'; |
| | | import { dateFormat } from '@/utils/date' |
| | | import { |
| | | exportPersonJobResponsibilities, personJobResponsibilitiesDelete, |
| | | personJobResponsibilitiesSave, |
| | | personJobResponsibilitiesSelect |
| | | } from "@/api/cnas/personal/personJobResponsibilities"; |
| | | import {selectUserCondition} from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | userName: '', |
| | | tableData: [], |
| | | tableLoading: false, |
| | | responsibleOptions: [], |
| | | search: { |
| | | size: 20, |
| | |
| | | // æ¥è¯¢åè¡¨ä¿¡æ¯ |
| | | getPostList(userId) { |
| | | this.search.userId = userId; |
| | | const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | this.$axios.get(this.$api.personnel.personJobResponsibilitiesSelect + '?userName=' + this.userName + `&${name}=` + this.search.userId + '&size=' + this.search.size + '¤t=' + this.search.current).then(res => { |
| | | if (res.code === 201) return; |
| | | const params = this.isDepartment ? { |
| | | userName: this.userName, |
| | | departmentId: this.search.userId, |
| | | size: this.search.size, |
| | | current: this.search.current, |
| | | }: { |
| | | userName: this.userName, |
| | | userId: this.search.userId, |
| | | size: this.search.size, |
| | | current: this.search.current, |
| | | } |
| | | this.tableLoading = true |
| | | personJobResponsibilitiesSelect(params).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }); |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | //æäº¤è¡¨å |
| | | async submitForm(saveState) { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid === true || saveState !== '1submit') { |
| | | // ç»å½åç¯è设置åå»ºäººä¸æ¶é´ |
| | | let user = JSON.parse(localStorage.getItem('user')); |
| | | let user = this.nickName; |
| | | const dateTime = dateFormat(new Date()); |
| | | // è·åå½åç¯èæä½äººä¸æ¥æ |
| | | switch (this.currentStep) { |
| | |
| | | } |
| | | // è·åå½åç¶æ |
| | | this.form.currentState = currentStepAction === 3 ? 'å
³é' : this.steps[currentStepAction]; |
| | | this.$axios.post(this.$api.personnel.personJobResponsibilitiesSave, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | personJobResponsibilitiesSave(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå'); |
| | | this.getPostList(this.departId); |
| | |
| | | }, |
| | | // ä¸è½½å²ä½èè´£ |
| | | downLoadPost(row) { |
| | | this.$axios.post(this.$api.personPostAuthorizationRecord.exportPersonJobResponsibilities,{id:row.id},{responseType: "blob"}).then(res => { |
| | | exportPersonJobResponsibilities({id:row.id}).then(res => { |
| | | const blob = new Blob([res],{ type: 'application/octet-stream' }); |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.incumbentName+'-å²ä½èè´£'+'.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.incumbentName+'-å²ä½èè´£'+'.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, row.incumbentName+'-å²ä½èè´£'+'.docx'); |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // å é¤å²ä½èè´£ |
| | |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.personnel.personJobResponsibilitiesDelete + '?id=' + row.id).then(res => { |
| | | personJobResponsibilitiesDelete({id: row.id}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getPostList(this.departId); |
| | |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data; |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | choiceStep(index) { |
| | | this.currentStepClick = index; |
| | |
| | | this.getPostList(newId); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['nickName']) |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | |
| | | :total="page.total" |
| | | background |
| | | layout="->,total, sizes, prev, pager, next, jumper" |
| | | style="margin-top: 16px" |
| | | style="margin-top: 10px" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | > |
| | |
| | | <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> |
| | |
| | | <!-- 奿©è®°å½ --> |
| | | <template> |
| | | <div> |
| | | <div style="text-align: left; margin-bottom: 15px;"> |
| | | <label>å§å</label> |
| | | <el-input v-model="search.userName" clearable placeholder="请è¾å
¥å
³é®å" size="small" style="width: 20vh;"></el-input> |
| | | <label style="margin-left: 1em">奿©æ¥æ</label> |
| | | <el-date-picker |
| | | v-model="search.searchTimeList" |
| | | :picker-options="pickerOptions" |
| | | align="right" |
| | | clearable |
| | | end-placeholder="ç»ææ¥æ" |
| | | format="yyyy-MM-dd" |
| | | range-separator="è³" |
| | | size="small" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | style="width: 20%" |
| | | type="daterange" |
| | | unlink-panels |
| | | value-format="yyyy-MM-dd 00:00:00"> |
| | | </el-date-picker> |
| | | <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">æ¥è¯¢</el-button> |
| | | <div style="float: right;"> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">导åº</el-button> |
| | | <el-button size="small" type="primary" @click="addRow">æ°å¢</el-button> |
| | | <div class="view"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="search" ref="page" size="small" :inline="true"> |
| | | <el-form-item label="å§å"> |
| | | <el-input v-model="search.userName" clearable placeholder="请è¾å
¥å
³é®å" size="small" style="width: 20vh;"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="奿©æ¥æ"> |
| | | <el-date-picker |
| | | v-model="search.searchTimeList" |
| | | :picker-options="pickerOptions" |
| | | align="right" |
| | | clearable |
| | | end-placeholder="ç»ææ¥æ" |
| | | format="yyyy-MM-dd" |
| | | range-separator="è³" |
| | | size="small" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | style="width: 100%" |
| | | type="daterange" |
| | | unlink-panels |
| | | value-format="yyyy-MM-dd 00:00:00"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">导åº</el-button> |
| | | <el-button size="small" type="primary" @click="addRow">æ°å¢</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table :data="tableData" height="70vh" style="width: 100%"> |
| | | <el-table :data="tableData" v-loading="tableLoading" height="66.5vh" style="width: 100%"> |
| | | <el-table-column label="åºå·" type="index" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="å建人" min-width="180" prop="createUserName"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="100"> |
| | | <el-table-column fixed="right" label="æä½" width="100" align="center"> |
| | | <template v-slot="scope"> |
| | | <el-button size="small" type="text" @click="editForm(scope.row)">ç¼è¾</el-button> |
| | | <el-button size="small" type="text" @click="deleteRow(scope.row)">å é¤</el-button> |
| | | <el-button size="small" type="text" style="color: #f56c6c" @click="deleteRow(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | <el-pagination :current-page="1" :page-size="search.size" |
| | | :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="search.total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | background |
| | | style="margin-top: 10px" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog |
| | | :visible.sync="dialogVisible" |
| | | title="æç¤º" |
| | | title="奿©è®°å½" |
| | | width="50%" |
| | | @open="getUserList"> |
| | | <div style="height: 40vh"> |
| | |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveOrUpdate">ç¡® å®</el-button> |
| | | </span> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveOrUpdate">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addOrUpdateRewardPunishment, deleteRewardPunishment, |
| | | rewardPunishmentExport, |
| | | rewardPunishmentPage |
| | | } from "@/api/cnas/personal/personRewardPunishmentRecord"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | import {delCustomById} from "@/api/system/customer"; |
| | | |
| | | export default { |
| | | props: { |
| | | departId: { |
| | |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | tableLoading: false, |
| | | search: { |
| | | size: 20, |
| | | current: 1, |
| | |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | async getPersonnelTraining() { |
| | | const {code, data} = await this.$axios({ |
| | | method: 'get', |
| | | url: rewardPunishmentPageApi, |
| | | params: { |
| | | userId: this.isDepartment ? '' : this.departId, |
| | | const params = { |
| | | userId: this.isDepartment ? '' : this.departId, |
| | | departmentId: this.isDepartment ? this.departId : '', |
| | | current: this.search.curent, |
| | | size: this.search.size, |
| | | userName: this.search.userName, |
| | | startTime: this.search.searchTimeList && this.search.searchTimeList[0], |
| | | endTime: this.search.searchTimeList && this.search.searchTimeList[1], |
| | | } |
| | | }) |
| | | if (code == 200) { |
| | | this.tableData = data.records |
| | | this.search.total = data.total |
| | | } |
| | | this.tableLoading = true |
| | | rewardPunishmentPage(params).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records |
| | | this.search.total = res.data.total |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | addRow () { |
| | | this.dialogVisible = true |
| | |
| | | }, |
| | | handleDown(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.deviceCheck.rewardPunishmentExport,{ |
| | | rewardPunishmentExport({ |
| | | userId: this.isDepartment ? '' : this.departId, |
| | | departmentId: this.isDepartment ? this.departId : '', |
| | | userName: this.search.userName, |
| | | startTime: this.search.searchTimeList && this.search.searchTimeList[0], |
| | | endTime: this.search.searchTimeList && this.search.searchTimeList[1] |
| | | },{responseType: 'blob'}).then(res => { |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { |
| | | type: 'application/force-download' |
| | | }) |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | // å建ä¸ä¸ªè¶
龿¥ï¼å°æä»¶æµèµè¿å»ï¼ç¶åå®ç°è¿ä¸ªè¶
龿¥çåå»äºä»¶ |
| | | const elink = document.createElement('a') |
| | | elink.download = decodeURI('奿©è®°å½'+'.xlsx') |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click(); |
| | | URL.revokeObjectURL(elink.href) // éæ¾URL 对象 |
| | | document.body.removeChild(elink) |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | // å建ä¸ä¸ªè¶
龿¥ï¼å°æä»¶æµèµè¿å»ï¼ç¶åå®ç°è¿ä¸ªè¶
龿¥çåå»äºä»¶ |
| | | const elink = document.createElement('a') |
| | | elink.download = decodeURI('奿©è®°å½'+'.xlsx') |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click(); |
| | | URL.revokeObjectURL(elink.href) // éæ¾URL 对象 |
| | | document.body.removeChild(elink) |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, '奿©è®°å½.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // è·åè´è´£äººä¿¡æ¯æ¥å£ |
| | | getUserList() { |
| | | this.$axios.get(this.$api.deviceScope.selectUserList).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | selectUserChange(val) { |
| | | const index = this.responsibleOptions.findIndex(item => item.id === val) |
| | |
| | | this.form.account = this.responsibleOptions[index].account |
| | | } |
| | | }, |
| | | // æå¼è¡¨åå¼¹æ¡ |
| | | editForm(row) { |
| | | this.dialogVisible = true |
| | | this.form = {...row}; |
| | | }, |
| | | // æäº¤è¡¨åæ°æ® |
| | | saveOrUpdate() { |
| | | this.$refs.form.validate(async (valid) => { |
| | | if (valid) { |
| | | this.dialogVisible = false |
| | | const {code, data} = await this.$axios({ |
| | | method: 'post', |
| | | url: addOrUpdateRewardPunishmentApi, |
| | | data: this.form, |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }) |
| | | if (code == 200) { |
| | | this.$message.success("æä½æåï¼") |
| | | addOrUpdateRewardPunishment(this.form).then(res => { |
| | | this.dialogVisible = false |
| | | this.$message.success("æä½æå") |
| | | this.getPersonnelTraining(this.departId); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | async deleteRow(row) { |
| | | const {code, data} = await this.$axios({ |
| | | method: 'delete', |
| | | url: deleteRewardPunishmentApi, |
| | | params: { |
| | | id: row.id |
| | | } |
| | | }) |
| | | if (code == 200) { |
| | | this.$message.success("æä½æåï¼") |
| | | this.getPersonnelTraining(this.departId); |
| | | } |
| | | deleteRow(row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | deleteRewardPunishment({id: row.id}).then(res => { |
| | | if (res.code === 500) { |
| | | return |
| | | } |
| | | this.$message.success('å 餿å') |
| | | this.getPersonnelTraining(this.departId); |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | }) |
| | | }).catch(() => {}) |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | <template> |
| | | <div> |
| | | <div class="flex_table"> |
| | | <div v-if="isDepartment" style="width: 50%"> |
| | | <!-- <TableCard :showTitle="false">--> |
| | | <!-- <template v-slot:form>--> |
| | | <!-- <div class="items_center">--> |
| | | <!-- <span>å§å</span>--> |
| | | <!-- <el-input v-model="trainingPagination.userName" class="search" clearable placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">æ¥è¯¢</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- <div>--> |
| | | <!--<!– <el-button :loading="outLoading" size="small" type="primary" @click="exportExcel">导åº</el-button>–>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- <template v-slot:table>--> |
| | | <!-- <ZTTable--> |
| | | <!-- :column="trainingColumn"--> |
| | | <!-- :currentChange="currentChange"--> |
| | | <!-- :height="'calc(100vh - 18em)'"--> |
| | | <!-- :highlightCurrentRow="true"--> |
| | | <!-- :table-data="trainingTableData"--> |
| | | <!-- :table-loading="trainingLoading"--> |
| | | <!-- style="padding: 0 15px;">--> |
| | | <!-- </ZTTable>--> |
| | | <!-- <div class="pagination">--> |
| | | <!-- <div></div>--> |
| | | <!-- <el-pagination--> |
| | | <!-- :page-size="trainingPagination.size"--> |
| | | <!-- :page-sizes="[10, 20, 30, 40]"--> |
| | | <!-- :total="trainingPagination.total"--> |
| | | <!-- layout="total, sizes, prev, pager, next, jumper"--> |
| | | <!-- @current-change="handleYearCurrentTraining"--> |
| | | <!-- @size-change="handleYearSizeChangeTraining">--> |
| | | <!-- </el-pagination>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </TableCard>--> |
| | | <!-- </div>--> |
| | | <!-- <div :style="`width: ${isDepartment ? '50%' : '100%'};`">--> |
| | | <!-- <TableCard :showTitle="false">--> |
| | | <!-- <template v-slot:form>--> |
| | | <!-- <div class="items_center">--> |
| | | <!-- <span>年份</span>--> |
| | | <!-- <el-date-picker--> |
| | | <!-- v-model="searchForm.trainingDate"--> |
| | | <!-- clearable--> |
| | | <!-- format="yyyy"--> |
| | | <!-- placeholder="鿩年"--> |
| | | <!-- size="small"--> |
| | | <!-- style="margin: 0 10px"--> |
| | | <!-- type="year"--> |
| | | <!-- value-format="yyyy">--> |
| | | <!-- </el-date-picker>--> |
| | | <!-- <el-button size="small" type="primary" @click="queryPersonnelDetailsPage(currentChangeRow.userId)">æ¥è¯¢</el-button>--> |
| | | <!-- <el-button size="small" type="primary" @click="openDownloadDia(currentChangeRow)">导åº</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- <template v-slot:table>--> |
| | | <!-- <ZTTable--> |
| | | <!-- :column="trainingPersonColumn"--> |
| | | <!-- :height="'calc(100vh - 18em)'"--> |
| | | <!-- :table-data="trainingPersonTableData"--> |
| | | <!-- :table-loading="trainingPersonLoading"--> |
| | | <!-- style="padding: 0 15px;">--> |
| | | <!-- </ZTTable>--> |
| | | <!-- <div class="pagination">--> |
| | | <!-- <div></div>--> |
| | | <!-- <el-pagination--> |
| | | <!-- :page-size="trainingPersonPagination.size"--> |
| | | <!-- :page-sizes="[10, 20, 30, 40]"--> |
| | | <!-- :total="trainingPersonPagination.total"--> |
| | | <!-- layout="total, sizes, prev, pager, next, jumper"--> |
| | | <!-- @current-change="handleYearCurrentPagination"--> |
| | | <!-- @size-change="handleYearSizeChangePagination">--> |
| | | <!-- </el-pagination>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </TableCard>--> |
| | | <div v-if="isDepartment" style="width: 49%"> |
| | | <div class="title"> |
| | | <span style="font-weight: bold">年度计å</span> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="trainingPagination" ref="trainingPagination" size="small" :inline="true"> |
| | | <el-form-item label="å§å"> |
| | | <el-input v-model="trainingPagination.userName" class="search" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="getPersonnelTraining(departId)">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <lims-table :tableData="trainingTableData" :column="trainingColumn" |
| | | ref="trainingTableData" |
| | | :currentChange="currentChange" :highlightCurrentRow="true" |
| | | @pagination="pagination" :height="'calc(100vh - 22em)'" |
| | | :page="trainingPagination" :tableLoading="trainingLoading"></lims-table> |
| | | </div> |
| | | <div :style="`width: ${isDepartment ? '49%' : '100%'};`"> |
| | | <div class="title"> |
| | | <span style="font-weight: bold">年度计åæç»</span> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="年份"> |
| | | <el-date-picker |
| | | v-model="searchForm.trainingDate" |
| | | clearable |
| | | format="yyyy" |
| | | placeholder="鿩年" |
| | | size="small" |
| | | type="year" |
| | | value-format="yyyy"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="queryPersonnelDetailsPage(currentChangeRow.userId)">æ¥è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openDownloadDia(currentChangeRow)">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <lims-table :tableData="trainingPersonTableData" :column="trainingPersonColumn" |
| | | :height="'calc(100vh - 22em)'" @pagination="pagination1" |
| | | :page="trainingPersonPagination" :tableLoading="trainingPersonLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | exportTrainingRecord, |
| | | queryPersonnelDetails, |
| | | trainingSelectTrainingRecord |
| | | } from "@/api/cnas/personal/personTrainingRecord"; |
| | | |
| | | export default { |
| | | components: {}, |
| | | components: {limsTable}, |
| | | props: { |
| | | departId: { |
| | | type: Number, |
| | |
| | | if (!date) { |
| | | date = this.$moment().format('YYYY') |
| | | } |
| | | console.log('date----', date); |
| | | this.$axios.get( this.$api.personnel.exportTrainingRecord+ '?userId=' + row.userId + '&trainingDate=' + date,{responseType: "blob"}).then(res => { |
| | | exportTrainingRecord({userId: row.userId, trainingDate: date}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res],{ type: 'application/msword' }); |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'å¹è®è®°å½å¯¼åº' + '.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'å¹è®è®°å½å¯¼åº' + '.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, 'å¹è®è®°å½å¯¼åº.docx'); |
| | | }) |
| | | }, |
| | | // è·åå®éªå®¤-å¹è®è®¡ååè¡¨ä¿¡æ¯ |
| | | getPersonnelTraining(departId) { |
| | | // const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | this.$axios.get(`${this.$api.personnel.trainingSelectTrainingRecord}?departmentId=${departId}&size=${this.trainingPagination.size}¤t=${this.trainingPagination.current}&userName=${this.trainingPagination.userName}`).then(res => { |
| | | const params = { |
| | | departmentId: departId, |
| | | size: this.trainingPagination.size, |
| | | current: this.trainingPagination.current, |
| | | userName: this.trainingPagination.userName, |
| | | } |
| | | this.trainingLoading = true |
| | | trainingSelectTrainingRecord(params).then(res => { |
| | | this.trainingLoading = false |
| | | this.trainingTableData = res.data.records; |
| | | this.trainingPagination.total = res.data.total; |
| | | if (this.trainingTableData.length > 0) { |
| | | this.currentChange(this.trainingTableData[0]); |
| | | this.$refs.trainingTableData.setCurrentRow(this.trainingTableData[0]) |
| | | } |
| | | }); |
| | | }).catch(err => { |
| | | this.trainingLoading = false |
| | | }) |
| | | }, |
| | | // è·å个人-å¹è®è®¡ååè¡¨ä¿¡æ¯ |
| | | currentChange(row) { |
| | |
| | | if (this.searchForm.trainingDate === null) { |
| | | this.searchForm.trainingDate = '' |
| | | } |
| | | this.$axios.get(`${this.$api.personnel.queryPersonnelDetails}?userId=${userId}&size=${this.trainingPersonPagination.size}¤t=${this.trainingPersonPagination.current}&trainingDate=${this.searchForm.trainingDate}`).then(res => { |
| | | const params = { |
| | | userId: userId, |
| | | size: this.trainingPersonPagination.size, |
| | | current: this.trainingPersonPagination.current, |
| | | trainingDate: this.searchForm.trainingDate, |
| | | } |
| | | this.trainingPersonLoading = true |
| | | queryPersonnelDetails(params).then(res => { |
| | | this.trainingPersonLoading = false |
| | | this.trainingPersonTableData = res.data.records; |
| | | this.trainingPersonPagination.total = res.data.total; |
| | | }); |
| | | }).catch(err => { |
| | | this.trainingPersonLoading = false |
| | | }) |
| | | }, |
| | | // å页 |
| | | handleYearCurrentTraining(page) { |
| | | this.trainingPagination.curent = page; |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | handleYearSizeChangeTraining(size) { |
| | | this.trainingPagination.size = size; |
| | | pagination(page) { |
| | | this.trainingPagination.size = page.limit; |
| | | this.getPersonnelTraining(this.departId); |
| | | }, |
| | | // å页 |
| | | handleYearCurrentPagination(page) { |
| | | this.trainingPersonPagination.curent = page; |
| | | pagination1(page) { |
| | | this.trainingPersonPagination.size = page.limit; |
| | | this.queryPersonnelDetailsPage(this.currentChangeRow.userId); |
| | | }, |
| | | handleYearSizeChangePagination(size) { |
| | | this.trainingPersonPagination.size = size; |
| | | this.queryPersonnelDetailsPage(this.currentChangeRow.userId); |
| | | } |
| | | }, |
| | | watch: { |
| | | departId: { |
| | |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | >>> .el-form-item { |
| | | margin-bottom: 13px; |
| | | } |
| | | |
| | | .flex_table { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .items_center { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search { |
| | | width: 150px; |
| | | padding: 0 6px; |
| | | } |
| | | .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> |