|
@@ -1,90 +1,90 @@
|
|
|
<template>
|
|
|
<div class="u-OA-jixiao">
|
|
|
<div class="head">第三部分 项目过程实施</div>
|
|
|
+ <el-form ref="xnJiesuanForm" :model="stepEdit" :rules="rules">
|
|
|
<table class="main-table">
|
|
|
- <tr v-for="(item, index) in stepEdit.assessmentLog" :key="index">
|
|
|
+ <tr v-for="(item, key) in stepEdit.assessmentLog" :key="key">
|
|
|
<!-- <td :rowspan="12" style="width: 80px">项目成员<br/>考核日志</td> -->
|
|
|
<td class="title" style="width: 100px;">
|
|
|
- <div>{{index + 1}}</div>
|
|
|
+ <div>{{key + 1}}</div>
|
|
|
<input v-model="item.name" style="width: 80px;height: 30px;text-align: center" placeholder="" :disabled="stepParameter.disabled"/>
|
|
|
<input v-model="item.job" style="width: 80px;height: 30px;text-align: center" placeholder="" :disabled="stepParameter.disabled"/>
|
|
|
</td>
|
|
|
- <td class="content" colspan="8">
|
|
|
+ <td class="content" colspan="6">
|
|
|
<div style="display: flex; align-items: flex-end;">
|
|
|
<div style="width: 500px;">
|
|
|
- <div>——★考核结果★——工作质量10×积极性10×工作量{{item.resultData.gongshi * item.resultData.qiangdu}}=得分{{10*10*item.resultData.gongshi * item.resultData.qiangdu}}</div>
|
|
|
- <table>
|
|
|
- <thead>
|
|
|
- <td style="width: 80px;">序号</td>
|
|
|
- <td style="width: 80px;">日期</td>
|
|
|
- <td style="width: 80px;">工时</td>
|
|
|
- <td style="width: 80px;">强度</td>
|
|
|
- <td style="width: 80px;">工作量</td>
|
|
|
- <!-- <td style="width: 80px;">告知数</td>
|
|
|
- <td style="width: 80px;">差错数</td>
|
|
|
- <td style="width: 80px;">催促数</td>
|
|
|
- <td style="width: 80px;">警告数</td> -->
|
|
|
- <!-- <td style="width: 60px">操作</td> -->
|
|
|
- </thead>
|
|
|
- <tr style="height: 30px;">
|
|
|
- <td>1</td>
|
|
|
- <td><input style="width: 80px;height: 20px;" v-model="item.resultData.date" :disabled="stepParameter.disabled" /></td>
|
|
|
- <td><input style="width: 80px;height: 20px;" v-model="item.resultData.gongshi" :disabled="stepParameter.disabled" /></td>
|
|
|
- <td><input style="width: 80px;height: 20px;" v-model="item.resultData.qiangdu" :disabled="stepParameter.disabled" /></td>
|
|
|
- <td>{{item.resultData.gongshi*item.resultData.qiangdu}}</td>
|
|
|
- </tr>
|
|
|
- <!-- <td><input style="width: 80px;" v-model="item.resultData.gaozhiNum" /></td>
|
|
|
- <td><input style="width: 80px;" v-model="item.resultData.chacuoNum" /></td>
|
|
|
- <td><input style="width: 80px;" v-model="item.resultData.cuicuNum" /></td>
|
|
|
- <td><input style="width: 80px;" v-model="item.resultData.jinggaoNum" /></td> -->
|
|
|
- <!-- <td><div class="delBtn" @click="delRow(index)" v-show="stepEdit.cleanPrice.length >= 2">删除</div></td> -->
|
|
|
- </table>
|
|
|
+ <div>——★考核结果★——工作质量10×积极性10×工作量{{item.gzlItemTotal}}=得分{{item.itemDefen}}</div>
|
|
|
+ <el-table :data="item.resultData" class="u-dynamic-table" border ref="table" style="width: 800px;">
|
|
|
+ <el-table-column type="index" label="序号" align="center" min-width="60"></el-table-column>
|
|
|
+ <el-table-column prop="date" label="日期" align="center" min-width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.date" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="gongshi" label="工时" align="center" min-width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item :prop="`assessmentLog[${key}].resultData[${scope.$index}].gongshi`" :rules="rules.gongshi">
|
|
|
+ <el-input-number v-model="scope.row.gongshi" controls-position="right" @change="handleInputChange(item, key, scope.$index)" :min="0" :readonly="stepParameter.disabled"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="qiangdu" label="强度" align="center" min-width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item :prop="`assessmentLog[${key}].resultData[${scope.$index}].qiangdu`" :rules="rules.qiangdu">
|
|
|
+ <el-input-number v-model="scope.row.qiangdu" controls-position="right" @change="handleInputChange(item, key, scope.$index)" :min="0" :readonly="stepParameter.disabled"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="gzliang" label="工作量" align="center" min-width="120"></el-table-column>
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
- <div v-if="index !== 0" class="addRow" @click="delRow(index)" :style="{'pointer-events':stepParameter.disabled?'none':'auto'}">删除</div>
|
|
|
- <div v-if="index === stepEdit.assessmentLog.length - 1" class="addRow" @click="addRow" :style="{'pointer-events':stepParameter.disabled?'none':'auto'}">添加</div>
|
|
|
+ <el-button v-if="key !== 0" class="addRow" @click="delPersonRow(key)" :disabled='stepParameter.disabled'>删除</el-button>
|
|
|
+ <el-button v-if="key === stepEdit.assessmentLog.length - 1" class="addRow" @click="addPersonRow" :disabled='stepParameter.disabled'>添加</el-button>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <!-- <td class="content" style="width: 100px">量化积分</td> -->
|
|
|
+ <td class="content" colspan="2" style="width: 200px;font-weight: bold;color: #e52727;font-size: 15px;">★量化积分—{{ item.lhJifen }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="title" style="width: 100px;">非考核<br/>支持人员</td>
|
|
|
<td class="content" colspan="4">
|
|
|
- <el-table :data="stepEdit.feikaohePersons" class="u-dynamic-table" style="width: 100%" border>
|
|
|
- <el-table-column type="index" label="序号" min-width="50" align="center"></el-table-column>
|
|
|
- <el-table-column prop="person" label="人员" min-width="60" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.person" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="content" label="支持内容" min-width="80" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.content" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="time" label="支持工时" min-width="80" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.time" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="remark" label="备注" min-width="80" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.remark" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" min-width="100" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="stepEdit.feikaohePersons.splice(scope.$index, 1)" :style="{'pointer-events':stepParameter.disabled?'none':'auto'}">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div @click="stepEdit.feikaohePersons.push({})">添加</div>
|
|
|
+ <div style="display: flex;align-items: flex-end;">
|
|
|
+ <el-table :data="stepEdit.feikaohePersons" class="u-dynamic-table" style="width: 90%" border>
|
|
|
+ <el-table-column type="index" label="序号" min-width="50" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="person" label="人员" min-width="60" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.person" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="content" label="支持内容" min-width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.content" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="time" label="支持工时" min-width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.time" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="remark" label="备注" min-width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.remark" placeholder="请输入" :readonly="stepParameter.disabled"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" min-width="100" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" size="small" @click="stepEdit.feikaohePersons.splice(scope.$index, 1)" :disabled="stepParameter.disabled">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-button class="addRow" @click="stepEdit.feikaohePersons.push({})" :disabled='stepParameter.disabled'>添加</el-button>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td class="title white" style="width: 100px;">项目成员<br/>考核汇总</td>
|
|
|
<td class="content" colspan="3">
|
|
|
<span>工时:{{ zongGongshi }}</span>
|
|
|
<span>强度:{{ zongQiangdu }}</span>
|
|
|
<span>工作量:{{ zongGongzuoliang }}</span>
|
|
|
- <span>总得分:{{ zongFen }}</span>
|
|
|
+ <span>总得分:{{ stepEdit.zongfen }}</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
@@ -102,6 +102,7 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -118,30 +119,51 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 第三部分所需步骤参数
|
|
|
stepParameter: {
|
|
|
disabled: true,
|
|
|
fqUserName: null,
|
|
|
shenheTime: null,
|
|
|
},
|
|
|
stepEdit: {
|
|
|
+ // 考核人员量化积分情况
|
|
|
assessmentLog: [
|
|
|
- { name: '', job: '', resultData: {gongshi: 0, qiangdu: 0} }
|
|
|
+ {
|
|
|
+ name: '',
|
|
|
+ job: '',
|
|
|
+ gzlItemTotal: 0, // 每个人的工作量和
|
|
|
+ itemDefen: 0, // 每个人的得分和
|
|
|
+ lhJifen: 0, // 每个人的量化积分
|
|
|
+ resultData: [{gongshi: 0, qiangdu: 0, gzliang: 0}], // 每个人单条工作量(目前只设置一条不能增)
|
|
|
+ }
|
|
|
],
|
|
|
- feikaohePersons: [],
|
|
|
- isApply: 0,
|
|
|
+ zongfen: 0, // 所有人的总分(该项目的总分)
|
|
|
+ feikaohePersons: [], // 非考核支持人员
|
|
|
+ isApply: 0, // 是否申请完工
|
|
|
},
|
|
|
+ rules: {
|
|
|
+ gongshi: [
|
|
|
+ { required: true, message: "不能为空", trigger: "change" }
|
|
|
+ ],
|
|
|
+ qiangdu: [
|
|
|
+ { required: true, message: "不能为空", trigger: "change" }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ // 绩效总额(第一步之后按照第五步显示的计算的绩效总额)
|
|
|
+ xnJixiaoZonge: 0,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
tableData3: {
|
|
|
handler(newV, oldV){
|
|
|
- if(newV && newV[0]){
|
|
|
+ if(newV && newV[1]){
|
|
|
console.log(newV)
|
|
|
- var arrData = newV[0]
|
|
|
+ var arrData = newV[1]
|
|
|
this.stepEdit = arrData.saveData ? JSON.parse(arrData.saveData) : this.stepEdit
|
|
|
this.stepParameter = arrData
|
|
|
this.stepParameter.disabled = !(arrData.dangqian && arrData.isUpdate)
|
|
|
console.log(this.stepParameter)
|
|
|
+ this.xnJixiaoZonge = JSON.parse(newV[0].saveData).xnJixiaoZonge
|
|
|
}
|
|
|
},
|
|
|
// deep: true,
|
|
@@ -209,12 +231,44 @@ export default {
|
|
|
console.log(33333,this.tableData3)
|
|
|
},
|
|
|
methods: {
|
|
|
- addRow(){
|
|
|
- this.stepEdit.assessmentLog.push({ name: '', job: '', resultData: {gongshi: 0, qiangdu: 0} })
|
|
|
+ // 添加一行考核人员及其绩效
|
|
|
+ addPersonRow(){
|
|
|
+ this.stepEdit.assessmentLog.push({
|
|
|
+ name: '',
|
|
|
+ job: '',
|
|
|
+ gzlItemTotal: 0,
|
|
|
+ itemDefen: 0,
|
|
|
+ lhJifen: 0,
|
|
|
+ resultData: [{gongshi: 0, qiangdu: 0, gzliang: 0}] })
|
|
|
+ },
|
|
|
+ // 删除当前考核人员及其绩效
|
|
|
+ delPersonRow(key){
|
|
|
+ this.stepEdit.assessmentLog.splice(key, 1)
|
|
|
},
|
|
|
- delRow(index){
|
|
|
- this.stepEdit.assessmentLog.splice(index, 1)
|
|
|
+ // 当工时或强度改变时,计算工作量和量化积分
|
|
|
+ handleInputChange(item, key, index){
|
|
|
+ // 计算当前人员当前行工作量
|
|
|
+ var gzliang = item.resultData[index].gongshi * item.resultData[index].qiangdu
|
|
|
+ this.stepEdit.assessmentLog[key].resultData[index].gzliang = gzliang
|
|
|
+ // 计算当前人员工作量(现在是只有一行,即只有一个工作量,万一以后有多个工作量需要求和,如下)
|
|
|
+ var gzlItemTotal = this.stepEdit.assessmentLog[key].resultData.reduce((old, now) => {
|
|
|
+ console.log(old, now)
|
|
|
+ return old + now.gzliang
|
|
|
+ }, 0)
|
|
|
+ this.stepEdit.assessmentLog[key].gzlItemTotal = gzlItemTotal
|
|
|
+ // 计算当前人员个人得分和
|
|
|
+ this.stepEdit.assessmentLog[key].itemDefen = 10 * 10 * gzlItemTotal
|
|
|
+ // 计算总分
|
|
|
+ this.stepEdit.zongfen = this.stepEdit.assessmentLog.reduce((old, now) => {
|
|
|
+ return old + now.itemDefen
|
|
|
+ }, 0)
|
|
|
+ // 计算量化积分
|
|
|
+ this.stepEdit.assessmentLog.forEach(res => {
|
|
|
+ res.lhJifen = ((res.itemDefen / this.stepEdit.zongfen) * this.xnJixiaoZonge).toFixed(2)
|
|
|
+ })
|
|
|
+ console.log(this.stepEdit.assessmentLog)
|
|
|
},
|
|
|
+
|
|
|
submitData() {
|
|
|
var saveData = {
|
|
|
runFlowPathStep: this.stepParameter.id,
|
|
@@ -254,15 +308,10 @@ tr {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
.addRow {
|
|
|
- width: 60px;
|
|
|
- height: 24px;
|
|
|
- background-color: #fff;
|
|
|
- border-radius: 4px;
|
|
|
+ padding: 6px 10px;
|
|
|
text-align: center;
|
|
|
- line-height: 24px;
|
|
|
font-size: 12px;
|
|
|
margin-left: 20px;
|
|
|
- cursor: pointer;
|
|
|
}
|
|
|
.btn {
|
|
|
display: inline-block;
|