diff --git a/src/views/staff/perform/summary/dialogshow.vue b/src/views/staff/perform/summary/dialogshow.vue index 82b4b5bda15e0bcef31be6da0e71e13c19702a50..2f2b6b5637806c7026100770ce2bfad8c7da4017 100644 --- a/src/views/staff/perform/summary/dialogshow.vue +++ b/src/views/staff/perform/summary/dialogshow.vue @@ -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(); } });