|
@@ -0,0 +1,313 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-card>
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span style="font-weight:bold">绩效考核表</span>
|
|
|
+ <div style="float: right; padding: 3px 0" type="text">
|
|
|
+ <el-button size="mini" plain @click="btnBack">返回</el-button>
|
|
|
+ <el-button size="mini" plain @click="btnSubmit">提交</el-button>
|
|
|
+ <el-button size="mini" plain @click="btnCopyItem">复制指标</el-button>
|
|
|
+ <el-button size="mini" plain @click="btnLog">指标修改记录</el-button>
|
|
|
+ <el-button size="mini" plain @click="btnPreviou">上一个</el-button>
|
|
|
+ <el-button size="mini" plain @click="btnNext">下一个</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-loading="loading">
|
|
|
+ <el-descriptions :column="4">
|
|
|
+ <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="入职日期">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="转正日期">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="一级部门">{{form.year}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="二级部门">{{form.startTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="三级部门">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="职位">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="评估周期">{{form.year}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="评估人编号">{{form.startTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="评估人姓名">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="现任职开始日期">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="平衡计分卡">{{form.year}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="职位描述">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <el-descriptions :column="4">
|
|
|
+ <el-descriptions-item label="个人总结">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="评语">{{form.year}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="奖惩意见">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ <div style="float:right">
|
|
|
+ <el-button type="primary" size="mini" @click="btnAddRow">增加指标</el-button>
|
|
|
+ <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table size="mini" :data="form.performanceItem" show-summary :summary-method="getSummaries">
|
|
|
+ <el-table-column label="评估方面" align="center" prop="aspect">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
|
|
|
+ <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions" />
|
|
|
+ <!-- <el-table-column label="评估指标" align="center" prop="target" />
|
|
|
+ <el-table-column label="评估说明" align="center" prop="instructions" /> -->
|
|
|
+ <el-table-column label="角色" align="center" prop="role">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.aspect"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="权重(%)" align="center" prop="weight" sortable/>
|
|
|
+ <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard" />
|
|
|
+ <!-- <el-table-column label="绩效标准" align="center" prop="standard" /> -->
|
|
|
+ <el-table-column label="数据来源" align="center" prop="source" />
|
|
|
+ <el-table-column label="自评分(0-100)" align="center" prop="selfScoring" />
|
|
|
+ <el-table-column label="自评语" align="center" prop="selfComment" />
|
|
|
+ <el-table-column label="上级评分(0-100)" align="center" prop="leaderScoring" />
|
|
|
+ <el-table-column label="上级评语" align="center" prop="leaderComment" />
|
|
|
+ <el-table-column label="加权得分" align="center" prop="weightedScore" />
|
|
|
+ <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" @click="btnEdit(scope.row)">修改</el-button>
|
|
|
+ <el-button size="mini" type="text" @click="btnDelete(scope.row)">删行</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <el-dialog title="指标明细" :visible.sync="rowDataOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
|
|
|
+ <el-form size="mini" label-position="right" ref="rowDataForm" :model="rowData" :rules="rowRules" label-width="80px">
|
|
|
+ <el-form-item label="评估方面" prop="aspect">
|
|
|
+ <el-select v-model="rowData.aspect" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.ehr_pm_aspect"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="评估指标" prop="target">
|
|
|
+ <el-input v-model="rowData.target"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="评估说明" prop="instructions">
|
|
|
+ <el-input type="textarea" v-model="rowData.instructions"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="角色" prop="role">
|
|
|
+ <el-select v-model="rowData.role" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.ehr_pm_role"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="权重(%)" prop="weight">
|
|
|
+ <el-input v-model="rowData.weight"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="加/减分项" prop="asItem">
|
|
|
+ <el-checkbox v-model="rowData.asItem"></el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="绩效标准" prop="standard">
|
|
|
+ <el-input type="textarea" v-model="rowData.standard"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="数据来源" prop="source">
|
|
|
+ <el-input v-model="rowData.source"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="mini" @click="btnRowClose">取 消</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="btnRowConfirm">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getPerformance} from "@/api/business/ehr/pm/performance";
|
|
|
+import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'detail',
|
|
|
+ dicts: ['ehr_pm_aspect','ehr_pm_role'],
|
|
|
+ props: ['pageStu','rowId',"ids"],
|
|
|
+ model: {
|
|
|
+ prop: 'isList',
|
|
|
+ event: 'jugislist'
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ //id
|
|
|
+ id:null,
|
|
|
+ //表单
|
|
|
+ form:{},
|
|
|
+ //遮罩
|
|
|
+ loading: false,
|
|
|
+ //单行明细
|
|
|
+ rowData:{},
|
|
|
+ //是否显示行明细弹出层
|
|
|
+ rowDataOpen:false,
|
|
|
+ //当行明细校验规则
|
|
|
+ rowRules:{
|
|
|
+ aspect: [
|
|
|
+ { required: true, message: "评估方面不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ target: [
|
|
|
+ { required: true, message: "评估指标不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ instructions: [
|
|
|
+ { required: true, message: "评估说明不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ role: [
|
|
|
+ { required: true, message: "角色不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ weight: [
|
|
|
+ { required: true, message: "权重", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ standard: [
|
|
|
+ { required: true, message: "绩效标准不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ source: [
|
|
|
+ { required: true, message: "数据来源不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ //是否展开
|
|
|
+ isUnfold:false,
|
|
|
+ //明细权重合计值
|
|
|
+ weightSum: 0,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.id = this.rowId;
|
|
|
+ this.fetchPerformance(this.id);
|
|
|
+ if(this.pageStu == 'add'){
|
|
|
+ }
|
|
|
+ if(this.pageStu == 'edit' || this.pageStu == 'see') {
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //返回
|
|
|
+ btnBack(){
|
|
|
+ this.$emit('jugislist', true)
|
|
|
+ this.$emit('refresh')
|
|
|
+ },
|
|
|
+ //查询详情
|
|
|
+ async fetchPerformance(id){
|
|
|
+ this.loading = true;
|
|
|
+ await getPerformance(id).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.form = res.data;
|
|
|
+ this.id = res.data.id;
|
|
|
+ }
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //增行
|
|
|
+ btnAddRow(){
|
|
|
+ this.rowData = {assessId: this.form.id};
|
|
|
+ this.rowDataOpen = true;
|
|
|
+ },
|
|
|
+ //修改
|
|
|
+ async btnEdit(row){
|
|
|
+ await getPerformanceItem(row.id).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.rowData = res.data
|
|
|
+ this.rowDataOpen = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //删行
|
|
|
+ btnDelete(row){
|
|
|
+ this.$modal.confirm('是否确认删除【"' + row.aspect + '"】数据项?').then(function() {
|
|
|
+ return delPerformanceItem(row.id);
|
|
|
+ }).then(() => {
|
|
|
+ this.fetchPerformance(this.id);
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+ //单行明细取消
|
|
|
+ btnRowClose(){
|
|
|
+ this.rowDataOpen = false;
|
|
|
+ },
|
|
|
+ //单行明细确认
|
|
|
+ btnRowConfirm(){
|
|
|
+ this.$refs["rowDataForm"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.rowData.id != undefined) {
|
|
|
+ updatePerformanceItem(this.rowData).then(response => {
|
|
|
+ this.$modal.msgSuccess("保存成功");
|
|
|
+ this.rowDataOpen = false;
|
|
|
+ this.fetchPerformance(this.id);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addPerformanceItem(this.rowData).then(response => {
|
|
|
+ this.$modal.msgSuccess("保存成功");
|
|
|
+ this.rowDataOpen = false;
|
|
|
+ this.fetchPerformance(this.id);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //展开/收起
|
|
|
+ btnUnfold(){
|
|
|
+ this.isUnfold = !this.isUnfold;
|
|
|
+ },
|
|
|
+ //上一个
|
|
|
+ btnPreviou(){
|
|
|
+ let i = this.ids.indexOf(this.id) - 1;
|
|
|
+ if(i > -1){
|
|
|
+ let id = this.ids[i];
|
|
|
+ this.fetchPerformance(id);
|
|
|
+ }else{
|
|
|
+ this.$modal.msgSuccess("已经是当前页第一条了!");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //下一个
|
|
|
+ btnNext(){
|
|
|
+ let i = this.ids.indexOf(this.id) + 1;
|
|
|
+ if(i < this.ids.length){
|
|
|
+ let id = this.ids[i];
|
|
|
+ this.fetchPerformance(id);
|
|
|
+ }else{
|
|
|
+ this.$modal.msgSuccess("已经是当前页最后一条了!");
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //合计
|
|
|
+ getSummaries(param){
|
|
|
+ const { columns, data } = param;
|
|
|
+ let val = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
|
|
|
+ this.weightSum = val;
|
|
|
+ return ['合计','','','',val];
|
|
|
+ },
|
|
|
+ //提交
|
|
|
+ btnSubmit(){
|
|
|
+ if(this.weightSum != 100){
|
|
|
+ this.$modal.msgWarning("权重不为100%无法提交!");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //复制指标
|
|
|
+ btnCopyItem(){
|
|
|
+
|
|
|
+ },
|
|
|
+ //指标修改记录
|
|
|
+ btnLog(){
|
|
|
+
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+
|
|
|
+.btn_group {
|
|
|
+ z-index: 500;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ line-height: var(--footer-height);
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+</style>
|