|
@@ -108,7 +108,7 @@
|
|
|
</view>
|
|
|
<view class="box">
|
|
|
<text class="lable">本次得分</text>
|
|
|
- <text class="currentScore">{{currentScore}}</text>
|
|
|
+ <text class="currentScore">{{currentScore>0?currentScore:0}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="inputScore">
|
|
@@ -237,7 +237,7 @@ export default {
|
|
|
checkItemValue:null,//查核选中的分数占比
|
|
|
checkConfiglist:[],//查核情况可配置列表
|
|
|
totalScore:0,//总分
|
|
|
- // currentScore:0,//当前得分
|
|
|
+ currentScore:0,//当前得分
|
|
|
inputScore:null,//手动填写分值
|
|
|
selectedScore:0,//缺失项分值
|
|
|
checkedResponsibleList:[],
|
|
@@ -245,7 +245,7 @@ export default {
|
|
|
checkedResponsibleData:[],
|
|
|
checkedSelectResultListData:[],
|
|
|
multiSelectScore:[],
|
|
|
- deductPointFromRes:0,
|
|
|
+ deductPoint:0,//本次扣分
|
|
|
};
|
|
|
},
|
|
|
onShow() {
|
|
@@ -254,27 +254,6 @@ export default {
|
|
|
this.checkedResponsibleList = responsibleList.checkedResponsibleList.map(item=>item.main);
|
|
|
},
|
|
|
computed:{
|
|
|
- currentScore:{
|
|
|
- get: function () {
|
|
|
- if(this.inputScore>0){
|
|
|
- const tempCount = this.totalScore - this.inputScore;
|
|
|
- return tempCount > 0?tempCount:0;
|
|
|
- }
|
|
|
- const tempCount = (this.totalScore-this.selectedScore-this.checkItemScore-this.deductPointFromRes).toFixed(2);
|
|
|
- return tempCount>=0?tempCount:0;
|
|
|
- },
|
|
|
- set:function(newValue){
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- },
|
|
|
- deductPoint:function(){
|
|
|
- // console.log(Number(this.inputScore),Number(this.selectedScore),Number(this.checkItemScore));
|
|
|
- if(this.inputScore){
|
|
|
- return this.inputScore;
|
|
|
- }
|
|
|
- return (this.deductPointFromRes-Number(this.inputScore)+Number(this.selectedScore)+Number(this.checkItemScore)).toFixed(2)
|
|
|
- }
|
|
|
},
|
|
|
watch:{
|
|
|
checkedResponsibleList:function(){
|
|
@@ -330,7 +309,7 @@ export default {
|
|
|
},
|
|
|
onInputScore(e){
|
|
|
this.inputScore = e.target.value;
|
|
|
- this.currentScore = e.target.value;
|
|
|
+ this.currentScore = this.totalScore - e.target.value;
|
|
|
},
|
|
|
selectResultHandle(item){
|
|
|
|
|
@@ -395,6 +374,12 @@ export default {
|
|
|
this.talkList[this.currentEditTextAreaIndex].talkResult = this.checkedSelectResultList[this.currentEditTextAreaIndex].join(',');
|
|
|
this.multiSelectScore[this.currentEditTextAreaIndex] = tempScore;
|
|
|
this.selectedScore = this.multiSelectScore.reduce((prev,cur)=>(prev+cur),0);
|
|
|
+
|
|
|
+ if(!this.inputScore){
|
|
|
+ this.deductPoint = this.checkItemScore+this.selectedScore;
|
|
|
+ this.currentScore = this.totalScore - this.deductPoint;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}else {
|
|
|
const tempArr = this.checkedSelectResultListData.map(item=>item.percentScore);
|
|
@@ -403,6 +388,11 @@ export default {
|
|
|
},0);
|
|
|
this.recordList[0].seeResult = this.checkedSelectResultList.join(',');
|
|
|
this.selectedScore = tempScore;
|
|
|
+
|
|
|
+ if(this.inputScore){
|
|
|
+ this.deductPoint = this.checkItemScore+this.selectedScore;
|
|
|
+ this.currentScore = this.totalScore - this.deductPoint;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
this.showSelectModal = false;
|
|
@@ -421,15 +411,15 @@ export default {
|
|
|
this.deptId = res.deptId;
|
|
|
//再次编辑回显
|
|
|
const filePath = res.checkResultTxt?JSON.parse(res.checkResultTxt):[];
|
|
|
- this.filePath = filePath[0]&&filePath[0].checkResultUrl.split(',');
|
|
|
+ this.filePath = filePath[0]&&filePath[0].checkResultUrl != ''?filePath[0].checkResultUrl.split(','):[];
|
|
|
this.Index = res.checkResult;
|
|
|
this.totalScore = res.totalScore;
|
|
|
- this.deductPointFromRes = res.deductPoint;
|
|
|
-
|
|
|
- if(res.lastResult){
|
|
|
- const lastConfig = this.checkConfiglist.filter(item=>item.attr == res.lastResult);
|
|
|
- this.checkItemScore = lastConfig[0].score*lastConfig[0].value;
|
|
|
- }
|
|
|
+ this.deductPoint = res.deductPoint;
|
|
|
+ this.currentScore = res.score;
|
|
|
+ // if(res.lastResult){
|
|
|
+ // const lastConfig = this.checkConfiglist.filter(item=>item.attr == res.lastResult);
|
|
|
+ // this.checkItemScore = lastConfig[0].itemGetScore;
|
|
|
+ // }
|
|
|
|
|
|
// this.deductPoint = res.deductPoint;
|
|
|
if(res.checkResultRequestList&&res.checkResultRequestList.length>0){
|
|
@@ -462,7 +452,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
//设置回显分数
|
|
|
- // this.selectedScore = this.multiSelectScore.reduce((prev,cur)=>(prev+cur),0);
|
|
|
+ this.selectedScore = this.multiSelectScore.reduce((prev,cur)=>(prev+cur),0);
|
|
|
|
|
|
}else {
|
|
|
// console.log('非访谈');
|
|
@@ -537,6 +527,10 @@ export default {
|
|
|
this.checkItemScore = parsedData.itemGetScore;
|
|
|
this.checkItemValue = parsedData.value;
|
|
|
this.calScore = parsedData.calScore;
|
|
|
+ if(!this.inputScore){
|
|
|
+ this.deductPoint = parsedData.itemGetScore;
|
|
|
+ this.currentScore = this.totalScore - parsedData.itemGetScore;
|
|
|
+ }
|
|
|
|
|
|
// this.Index = data;
|
|
|
// this.data.checkResult = data;
|