| | |
| | | <!-- 人员能力 --> |
| | | <template> |
| | | <div> |
| | | <div style="text-align: left; margin-bottom: 15px;padding: 0 16px"> |
| | | <label>姓名</label> |
| | | <el-input v-model="userName" 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;"> |
| | | <el-button size="small" type="primary" @click="addAppointPost('add')">新增</el-button> |
| | | <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" placeholder="请输入姓名" size="small" clearable></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 v-if="!isDepartment" size="small" type="primary" @click="addAppointPost('add')">新增</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="yearColumnData" |
| | | :height="'calc(100vh - 20em)'" |
| | | :table-data="tableData" |
| | | :table-loading="yearLoading" |
| | | style="padding: 0 15px;margin-bottom: 16px" |
| | | > |
| | | <div slot="jobResponsibilities" slot-scope="scope"> |
| | | <div v-html="changeLine(scope.row.responsibilities)"></div> |
| | | </div> |
| | | <div slot="placeWorkSlot" slot-scope="scope"> |
| | | <div v-html="changeLine(scope.row.placeWork)"></div> |
| | | </div> |
| | | </ZTTable> |
| | | </template> |
| | | </TableCard> |
| | | <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" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <lims-table :tableData="tableData" :column="yearColumnData" |
| | | @pagination="pagination" :height="'calc(100vh - 20em)'" |
| | | :page="search" :tableLoading="yearLoading"> |
| | | <div slot="jobResponsibilities" slot-scope="scope"> |
| | | <div v-html="changeLine(scope.row.responsibilities)"></div> |
| | | </div> |
| | | <div slot="placeWorkSlot" slot-scope="scope"> |
| | | <div v-html="changeLine(scope.row.placeWork)"></div> |
| | | </div> |
| | | </lims-table> |
| | | <!--新增能力认定弹框--> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" |
| | | :visible.sync="dialogVisible" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="职称:" label-width="110px" prop="technicalPost">--> |
| | | <!-- <el-input v-model="form.technicalPost" :disabled="operationType === 'view'" clearable size="small" style="width: 100%;"/>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="24"> |
| | | <div style="display: flex;justify-content: space-evenly;font-weight: 600"> |
| | | <span>查核结果</span> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="academicConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.academicConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> |
| | | <el-radio-group v-model="form.academicConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <el-radio :label="1">符合</el-radio> |
| | | <el-radio :label="2">不符合</el-radio> |
| | | <el-radio :label="3">不适用</el-radio> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="relatedYearsConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.relatedYearsConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> |
| | | <el-radio-group v-model="form.relatedYearsConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <el-radio :label="1">符合</el-radio> |
| | | <el-radio :label="2">不符合</el-radio> |
| | | <el-radio :label="3">不适用</el-radio> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="relatedTrainingConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.relatedTrainingConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> |
| | | <el-radio-group v-model="form.relatedTrainingConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <el-radio :label="1">符合</el-radio> |
| | | <el-radio :label="2">不符合</el-radio> |
| | | <el-radio :label="3">不适用</el-radio> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="relevantExperienceConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.relevantExperienceConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> |
| | | <el-radio-group v-model="form.relevantExperienceConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <el-radio :label="1">符合</el-radio> |
| | | <el-radio :label="2">不符合</el-radio> |
| | | <el-radio :label="3">不适用</el-radio> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="workLicenseConformNot" style="text-align: center"> |
| | | <el-radio-group v-model="form.workLicenseConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> |
| | | <el-radio-group v-model="form.workLicenseConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <el-radio :label="1">符合</el-radio> |
| | | <el-radio :label="2">不符合</el-radio> |
| | | <el-radio :label="3">不适用</el-radio> |
| | |
| | | <el-form-item label="岗位职责:" label-width="110px" prop="jobResponsibilitiesTem" style="height: 450px"> |
| | | <el-checkbox-group v-model="form.jobResponsibilitiesTem" :disabled="operationType === 'view' || operationType === 'confirm'" |
| | | @change="selectResponsibilities"> |
| | | <el-checkbox v-for="city in responsibilities" :key="city.value" :label="city.label" |
| | | <el-checkbox v-for="city in dict.type.responsibilities_list" :key="city.value" :label="city.label" |
| | | :value="city.value"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | |
| | | <el-col :span="8"> |
| | | <el-form-item class="radio-group" prop="jobResponsibilitiesConformNot" |
| | | style="text-align: center;height: 420px"> |
| | | <el-radio-group v-model="form.jobResponsibilitiesConformNot" :disabled="operationType === 'view' || operationType === 'confirm'"> |
| | | <el-radio-group v-model="form.jobResponsibilitiesConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <el-radio :label="1">符合</el-radio> |
| | | <el-radio :label="2">不符合</el-radio> |
| | | <el-radio :label="3">不适用</el-radio> |
| | |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-form-item label="综合评价:" label-width="110px" prop="comprehensiveAssessment"> |
| | | <el-radio-group v-model="form.comprehensiveAssessment" :disabled="operationType === 'view' || operationType === 'confirm'"> |
| | | <el-radio-group v-model="form.comprehensiveAssessment" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden> |
| | | <el-radio label="Qualified this position">可胜任该岗位</el-radio> |
| | | <el-radio label="You can work while training">可边培训边上岗</el-radio> |
| | | <el-radio label="Iconpetent for the position">不胜任该岗位</el-radio> |
| | |
| | | |
| | | <script> |
| | | |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | addOrUpdatePersonPersonnelCapacity, |
| | | confirmPersonnelCapability, |
| | | deletePersonPersonnelCapacity, |
| | | exportPersonnelCapacity, |
| | | personPersonnelCapacityPage, |
| | | submitConfirmPersonnelCapability |
| | | } from "@/api/cnas/personal/personPersonnelCapacity"; |
| | | import {selectUserCondition} from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | props: { |
| | | departId: { |
| | |
| | | } |
| | | }, |
| | | components: { |
| | | |
| | | limsTable |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userId"]), |
| | | }, |
| | | dicts: ['responsibilities_list'], |
| | | data() { |
| | | return { |
| | | userName: '', |
| | |
| | | this.handleViewClick('confirm', row); |
| | | }, |
| | | disabled: (row) => { |
| | | if (row.confirmDate || JSON.parse(localStorage.getItem("user")).userId != row.confirmOperatingPersonnelId) { |
| | | if (row.confirmDate || this.userId != row.confirmOperatingPersonnelId) { |
| | | return true |
| | | } else { |
| | | return false |
| | |
| | | methods: { |
| | | // 下载 |
| | | downLoadPost(row) { |
| | | this.$axios.get(this.$api.personnel.exportPersonnelCapacity + '?id=' + row.id,{responseType: "blob"}).then(res => { |
| | | exportPersonnelCapacity({id: row.id}).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') |
| | | }) |
| | | }, |
| | | // 查询 |
| | |
| | | // 获取人员能力列表信息 |
| | | getList(userId) { |
| | | this.search.userId = userId; |
| | | const name = this.isDepartment ? 'departmentId' : 'userId'; |
| | | const params = this.isDepartment ? |
| | | { |
| | | 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, |
| | | userName: this.userName, |
| | | } |
| | | this.yearLoading = true |
| | | this.$axios.get(this.$api.personnel.personPersonnelCapacityPage + '?userName=' + this.userName + `&${name}=` + this.search.userId + '&size=' + this.search.size + '¤t=' + this.search.current).then(res => { |
| | | personPersonnelCapacityPage(params).then(res => { |
| | | this.yearLoading = false |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.search.total = res.data.total; |
| | | }).catch(err => { |
| | |
| | | this.yearLoading = false |
| | | }) |
| | | }, |
| | | pagination (page) { |
| | | this.search.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | selectResponsibilities(arr) { |
| | | let arrTem = []; |
| | | arr.map(val => { |
| | | const index = this.responsibilities.findIndex(item => item.label === val); |
| | | const index = this.dict.type.responsibilities_list.findIndex(item => item.label === val); |
| | | if (index > -1) { |
| | | arrTem.push(this.responsibilities[index].value); |
| | | arrTem.push(this.dict.type.responsibilities_list[index].value); |
| | | } |
| | | }); |
| | | this.form.jobResponsibilities = arrTem.join(','); |
| | | }, |
| | | getResponsibilities() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: '岗位职责' |
| | | }).then(res => { |
| | | this.responsibilities = res.data; |
| | | }); |
| | | }, |
| | | changeLine (val) { |
| | | if(val) { |
| | |
| | | this.operationType = type; |
| | | this.title = '新增能力认定' |
| | | this.dialogVisible = true; |
| | | console.log('this.departId---', this.departId) |
| | | this.form = { |
| | | jobResponsibilitiesTem: [] |
| | | } |
| | | this.form.userId = this.departId |
| | | this.getUserList(); |
| | | this.getResponsibilities(); |
| | | |
| | | }, |
| | | // 编辑/查看 |
| | |
| | | this.$set(this.form, 'jobResponsibilitiesTem', []) |
| | | } |
| | | this.getUserList(); |
| | | this.getResponsibilities(); |
| | | }, |
| | | // 保存 |
| | | submitForm() { |
| | | this.$refs.infoForm.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.personnel.addOrUpdatePersonPersonnelCapacity, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | addOrUpdatePersonPersonnelCapacity(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('提交成功'); |
| | | this.getList(this.departId); |
| | |
| | | submitForm1() { |
| | | this.$refs.infoForm.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.personnel.submitConfirmPersonnelCapability, this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | submitConfirmPersonnelCapability(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('提交成功'); |
| | | this.getList(this.departId); |
| | |
| | | }); |
| | | }, |
| | | verifyGet () { |
| | | this.$axios.get(this.$api.personnel.confirmPersonnelCapability + '?id=' + this.verifyGetId).then(res => { |
| | | confirmPersonnelCapability({id: this.verifyGetId}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('确认成功'); |
| | | this.resetForm() |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.delete(this.$api.personnel.deletePersonPersonnelCapacity + '?id=' + id).then(res => { |
| | | deletePersonPersonnelCapacity({id: id}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('删除成功'); |
| | | this.getList(this.departId); |
| | |
| | | this.dialogVisible = false; |
| | | }, |
| | | getUserList(){ |
| | | this.$axios.get(this.$api.user.selectDepartmentLimsUserList).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code == 200) { |
| | | this.responsibleOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.search.size = val; |
| | | this.getList(this.departId); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.search.current = val; |
| | | this.getList(this.departId); |
| | | } |
| | | }, |
| | | watch: { |
| | | // 监听点击el-tree的数据,进行数据刷新 |
| | |
| | | this.getList(newId); |
| | | } |
| | | }, |
| | | // 监听点击el-tree的数据,进行数据刷新 |
| | | isDepartment: { |
| | | handler(newId, oldId) { |
| | | this.getList(this.departId); |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | >>> .el-dialog__body { |
| | | max-height: 70vh; |
| | | max-height: 74vh; |
| | | overflow-y: auto; |
| | | } |
| | | |