Commit c60cb8d2 authored by 姬鋆屾's avatar 姬鋆屾

fixed:提交绩效汇总备注2分数计算

parent cfc05155
......@@ -20,18 +20,18 @@
<div class="user-right">
<!-- <div class="n">{{ form.otherScore }}</div>
<div class="m">{{ form.month }}月自评绩效得分</div> -->
<div class="n" style="margin-top: 10px;color: #409eff;">
<div class="n" style="margin-top: 10px; color: #409eff">
{{ form.totalScore }}
</div>
<div class="m">{{ form.month }}月绩效得分</div>
<div class="m" style="color: #aaa;">
<div class="m" style="color: #aaa">
绩效分数更新时间:{{ momentVal(form.updateTime) }}
</div>
</div>
</div>
<div class="dialog_box" v-if="pageInfo.type == 'view'">
<div
class="userName user-t-item "
class="userName user-t-item"
:class="{ t2: item.subAddType == 1, t1: item.subAddType == 2 }"
v-for="item in list"
:key="item.id"
......@@ -77,10 +77,10 @@
</div>
</div>
</div>
<div class="dialog_box" v-else style="margin-top: 20px;">
<div class="dialog_box" v-else style="margin-top: 20px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row v-if="form.label == '备注1'">
<el-col :span="2" style="width: 5.3333%;"> <div>备注:</div></el-col>
<el-col :span="2" style="width: 5.3333%"> <div>备注:</div></el-col>
<el-col :span="22">
<span>
<el-input
......@@ -88,14 +88,17 @@
v-model="form.remark"
:autosize="{ minRows: 2, maxRows: 8 }"
placeholder="请输入备注内容"
style="font-family: 'Microsoft Yahei', 'Helvetica Neue', Helvetica, STHeiTi, Arial, sans-serif;"
style="
font-family: 'Microsoft Yahei', 'Helvetica Neue', Helvetica,
STHeiTi, Arial, sans-serif;
"
></el-input>
</span>
</el-col>
</el-row>
<el-row v-if="form.label == '备注2'">
<el-col :span="2" style="width: 5.3333%;"> <div>备注:</div></el-col>
<el-col :span="2" style="width: 5.3333%"> <div>备注:</div></el-col>
<el-col :span="22">
<template v-if="typeof form.remarkAdd != 'string'">
<div
......@@ -103,14 +106,14 @@
v-for="(val, i) in form.remarkAdd"
:key="i"
>
<div class="text_box" style="width: 50%;">
<div class="text_box" style="width: 50%">
<el-autocomplete
class="inline-input"
v-model="val.name"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
style="width: 100%;"
style="width: 100%"
clearable
@clear="handleClear(val)"
@blur="handleBlur"
......@@ -127,7 +130,13 @@
<div class="icon_box">
<i
class="el-icon-circle-plus-outline"
style="width: 100%;height: 100%;font-size: 30px;color: #409eff;margin-right: 10px;"
style="
width: 100%;
height: 100%;
font-size: 30px;
color: #409eff;
margin-right: 10px;
"
@click="handlePlus"
v-if="i + 1 == form.remarkAdd.length"
></i>
......@@ -135,7 +144,12 @@
class="el-icon-remove-outline"
@click="handleRemove(i)"
v-if="form.remarkAdd.length > 1 && i != 0"
style="width: 100%;height: 100%;font-size: 30px;color: #F56C6C;"
style="
width: 100%;
height: 100%;
font-size: 30px;
color: #f56c6c;
"
></i>
</div>
</div>
......@@ -147,18 +161,14 @@
<div
slot="footer"
class="dialog-footer"
style="display: flex;align-items: center;"
style="display: flex; align-items: center"
>
<el-col :span="20">
<el-col :span="4" style="width: 15.7%;" v-if="form.label == '备注2'">
<el-col :span="4" style="width: 15.7%" v-if="form.label == '备注2'">
<div>当前累计加分:</div></el-col
>
<el-col
:span="1"
v-if="form.label == '备注2'"
style="text-align: left;"
>
<span style="color:#F56C6C;font-weight: 600;">
<el-col :span="1" v-if="form.label == '备注2'" style="text-align: left">
<span style="color: #f56c6c; font-weight: 600">
{{ form.addTotalScore ? form.addTotalScore : 0 }}
</span>
</el-col>
......@@ -203,12 +213,17 @@ export default {
methods: {
handleBlur() {
this.form.addTotalScore = 0;
this.form.remarkAdd && this.form.remarkAdd.length > 0
? this.form.remarkAdd.forEach((v) => {
v.score ? v.score : (v.score = 0);
this.form.addTotalScore += v.score;
})
: "";
console.log(this.form.remarkAdd);
this.form.addTotalScore = this.form.addTotalScore.toFixed(2);
this.$forceUpdate();
},
handlePlus() {
this.form.remarkAdd.push({
......@@ -309,6 +324,7 @@ export default {
score: 0,
});
}
this.handleBlur();
this.$forceUpdate();
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment