|
@@ -1,217 +1,138 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-card v-if="flow.staff == this.$store.state.user.name">
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <span style="font-weight:bold">绩效考核表</span>
|
|
|
- <div style="float: right; padding: 3px 0" type="text" v-if="flow.status == 0">
|
|
|
- <el-button size="mini" plain @click="btnTurnDown(1)">驳回</el-button>
|
|
|
- <el-button size="mini" type="primary" plain @click="btnverify(2)">评写完成</el-button>
|
|
|
- </div>
|
|
|
+ <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>
|
|
|
</div>
|
|
|
- <div v-loading="loading">
|
|
|
- <el-descriptions :column="6 ">
|
|
|
- <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="一级部门">{{form.oneDeptName}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="二级部门">{{form.twoDeptName}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="所属分组">{{form.deadlineTime}}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- <el-descriptions v-if="form.status > 3">
|
|
|
- <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- <div>
|
|
|
- 评语<el-input type="textarea" v-model="form.comment"></el-input>
|
|
|
- </div>
|
|
|
- <!-- <div style="float:right">
|
|
|
- <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 width="100" :show-overflow-tooltip="!isUnfold" 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 width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
|
|
|
- <el-table-column :show-overflow-tooltip="!isUnfold" label="评估说明" align="center" prop="instructions">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="100" label="角色" align="center" prop="role">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="80" label="权重" align="center" prop="weight"/>
|
|
|
- <el-table-column :show-overflow-tooltip="!isUnfold" label="绩效标准" align="center" prop="standard">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="100" label="数据来源" align="center" prop="source" />
|
|
|
- <el-table-column width="80" label="自评分" align="center" prop="selfScoring"/>
|
|
|
- <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment"/>
|
|
|
- <el-table-column width="80" label="上级评分" align="center" prop="leaderScoring">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input
|
|
|
- size="mini"
|
|
|
- v-model.number="scope.row.leaderScoring"
|
|
|
- onkeyup="value=value.replace(/[^\d||/.]/g,'')"
|
|
|
- oninput="if(value){value=value.replace(/[^\d]/g,'')} if(value<=0){value=0} if(value>100){value=100}"
|
|
|
- :maxlength="3"
|
|
|
- :minlength="1"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column :show-overflow-tooltip="!isUnfold" label="上级评语" align="center" prop="leaderComment">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input size="mini" type="textarea" v-model="scope.row.leaderComment"></el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
-
|
|
|
- <el-dialog title="" :visible.sync="turnDownOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
|
|
|
- <el-form size="mini" label-position="right" ref="flow" :model="flow" :rules="flowRules" label-width="80px">
|
|
|
- <el-form-item label="驳回原因" prop="result">
|
|
|
- <el-input type="textarea" v-model="flow.result"></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
|
|
|
+ <el-form-item label="员工" prop="staffName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.staffName"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="btnSearch"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="btnSearch">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="btnResetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="mini" @click="btnTurnDownClose">取 消</el-button>
|
|
|
- <el-button size="mini" type="primary" @click="btnTurnDownConfirm">确 定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
+ <div style="float:right">
|
|
|
+ </div>
|
|
|
+ <el-table size="mini" height="500px" v-loading="loading" :data="listData">
|
|
|
+ <el-table-column label="编号" align="center" prop="id" />
|
|
|
+ <el-table-column label="员工姓名" align="center" prop="staffName" />
|
|
|
+ <el-table-column label="评估周期" align="center" prop="name" />
|
|
|
+ <el-table-column label="月度" align="center" prop="month" />
|
|
|
+ <el-table-column label="自评分" align="center" prop="saMark" />
|
|
|
+ <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="btnPmVerify(scope.row)"
|
|
|
+ >待评分</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="paginationClass">
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getPerformance,superiorevaluation,savePerformance} from "@/api/business/ehr/pm/performance";
|
|
|
-import { getFlow} from "@/api/business/ehr/pm/flow";
|
|
|
+import { listPerformance} from "@/api/business/ehr/pm/pmmark";
|
|
|
|
|
|
export default {
|
|
|
- name: "verify",
|
|
|
- dicts: ['ehr_pm_aspect','ehr_pm_role'],
|
|
|
+ name: "PmMark",
|
|
|
+ dicts: ['ehr_pm_status'],
|
|
|
data() {
|
|
|
return {
|
|
|
- //遮罩层
|
|
|
+ // 遮罩层
|
|
|
loading: true,
|
|
|
- //表单
|
|
|
- form:{},
|
|
|
- //流程数据
|
|
|
- flow:{},
|
|
|
- //流程数据规则
|
|
|
- flowRules:{
|
|
|
- result: [
|
|
|
- { required: true, message: "驳回原因不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 表格数据
|
|
|
+ listData: [],
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ sourceId: null,
|
|
|
+ staffName: null,
|
|
|
},
|
|
|
- //是否展开
|
|
|
- isUnfold:false,
|
|
|
- //是否显驳回弹出层
|
|
|
- turnDownOpen:false,
|
|
|
+ //详情id
|
|
|
+ rowId: '',
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- console.log("this.$route.query.code",this.$route.query.code);
|
|
|
- console.log("this.$route.query.performanceId",this.$route.query.performanceId);
|
|
|
- console.log("this.$route.query.flowId",this.$route.query.flowId);
|
|
|
- this.fetchPerformance(this.$route.query.performanceId);
|
|
|
- this.fetchFlow(this.$route.query.flowId);
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- //查询详情
|
|
|
- async fetchPerformance(id){
|
|
|
+ /** 查询绩效列表 */
|
|
|
+ getList() {
|
|
|
this.loading = true;
|
|
|
- await getPerformance(id).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.form = res.data;
|
|
|
- this.id = res.data.id;
|
|
|
- }
|
|
|
- this.loading = false;
|
|
|
- })
|
|
|
- },
|
|
|
- //查询流程详情
|
|
|
- async fetchFlow(id){
|
|
|
- this.loading = true;
|
|
|
- await getFlow(id).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.flow = res.data;
|
|
|
- }
|
|
|
- this.loading = false;
|
|
|
- })
|
|
|
+ listPerformance(this.queryParams).then(response => {
|
|
|
+ this.listData = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
- //展开/收起
|
|
|
- btnUnfold(){
|
|
|
- this.isUnfold = !this.isUnfold;
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ btnSearch() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
- //合计
|
|
|
- getSummaries(param){
|
|
|
- const { columns, data } = param;
|
|
|
- let val = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
|
|
|
- this.weightSum = val;
|
|
|
- return ['合计','','','',val];
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ btnResetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.btnSearch();
|
|
|
},
|
|
|
- //驳回
|
|
|
- btnTurnDown(){
|
|
|
- this.turnDownOpen = true;
|
|
|
+ /** 刷新 */
|
|
|
+ refresh(){
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.getList();
|
|
|
},
|
|
|
- //驳回取消
|
|
|
- btnTurnDownClose(){
|
|
|
- this.turnDownOpen = false;
|
|
|
+ //调整分数
|
|
|
+ async btnPmVerify(row){
|
|
|
+ console.log('row',row);
|
|
|
+ this.$router.push({ name: 'PmMarkDetail', query: { performanceId: row.id,flowId: row.flowId } });
|
|
|
},
|
|
|
- //驳回确认
|
|
|
- btnTurnDownConfirm(){
|
|
|
- this.$refs["flow"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- this.btnverify(1);
|
|
|
- this.turnDownOpen = false;
|
|
|
- }
|
|
|
- });
|
|
|
+ //返回
|
|
|
+ btnBack(){
|
|
|
+ this.$router.back();
|
|
|
},
|
|
|
- //评写完成
|
|
|
- async btnverify(val){
|
|
|
- if(val == 2){
|
|
|
- let v = false;
|
|
|
- this.form.performanceItem.forEach((item) => {
|
|
|
- if(!item.leaderScoring || !item.leaderComment){
|
|
|
- v = true;
|
|
|
- }
|
|
|
- });
|
|
|
- if(v){
|
|
|
- this.$modal.msgWarning("请评分后再提交!");
|
|
|
- return;
|
|
|
- }
|
|
|
- if(!this.form.comment){
|
|
|
- this.$modal.msgWarning("请填写评语再提交!");
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- //保存绩效数据
|
|
|
- let r = await savePerformance(this.form);
|
|
|
- console.log("r",r);
|
|
|
- this.flow.status = val;
|
|
|
- await superiorevaluation(this.flow).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.fetchPerformance(this.$route.query.performanceId);
|
|
|
- this.fetchFlow(this.$route.query.flowId);
|
|
|
- this.$modal.msgSuccess("已确认");
|
|
|
- }
|
|
|
- this.loading = false;
|
|
|
- })
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.btn_grooup {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
+.paginationClass {
|
|
|
+ z-index: 500;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 10px;
|
|
|
+ right: 10px;
|
|
|
+ width: 100%;
|
|
|
+ line-height: var(--footer-height);
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
</style>
|