|
@@ -159,6 +159,11 @@
|
|
|
<div>存在分差总人数:{{ evaScoDigPerC }}</div>
|
|
|
</div>
|
|
|
<div class="diaScoreRight">
|
|
|
+
|
|
|
+ <el-button size="small" @click="useAiScore" type="primary"
|
|
|
+ >使用AI评分</el-button
|
|
|
+ >
|
|
|
+
|
|
|
<el-button size="small" @click="allSubmit" type="primary"
|
|
|
>保存</el-button
|
|
|
>
|
|
@@ -1533,9 +1538,12 @@ export default {
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + _fnStr, params)
|
|
|
.then(res => {
|
|
|
+ let _data = res.data[0];
|
|
|
+
|
|
|
+ console.log("_data",_data)
|
|
|
// console.log("resresresres", res.data[0]);
|
|
|
// console.log(res.data[0]);
|
|
|
- resolve(res.data[0]);
|
|
|
+ resolve(_data);
|
|
|
})
|
|
|
.catch(error => {
|
|
|
console.log(error);
|
|
@@ -1695,8 +1703,32 @@ export default {
|
|
|
this.ajax
|
|
|
.post(this.$store.state.api + _fnStr, params)
|
|
|
.then(res => {
|
|
|
- console.log("selectExamineTestName", res.data[0]);
|
|
|
- resolve(res.data[0]);
|
|
|
+ let _data = res.data[0];
|
|
|
+
|
|
|
+ console.log('sfasfaafaf',_data)
|
|
|
+ _data[0].average = "";
|
|
|
+ let _total = 0;
|
|
|
+ let _num = 0;
|
|
|
+
|
|
|
+ _data.forEach(i=>{
|
|
|
+ let _scoreJson = [];
|
|
|
+ if(i.scoreJson){
|
|
|
+ _scoreJson = JSON.parse(i.scoreJson)
|
|
|
+ _scoreJson = _scoreJson.filter(i2=>i.testId.indexOf(i2.id)!=-1);
|
|
|
+ i.scoreJson = _scoreJson;
|
|
|
+ _num += _scoreJson.length;
|
|
|
+ _total += _scoreJson.reduce((sum, i2) => sum + i2.sco, 0);
|
|
|
+ console.log(_num,_total)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ if(_total>0&&_num>0){
|
|
|
+ _data[0].average = (_total / _num).toFixed(0);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ console.log("_data",_data)
|
|
|
+ resolve(_data);
|
|
|
})
|
|
|
.catch(error => {
|
|
|
console.log(error);
|
|
@@ -1864,6 +1896,20 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ // 使用ai的评分数据
|
|
|
+ useAiScore(){
|
|
|
+ this.tableData.forEach(i=>{
|
|
|
+ if(i.orgData.length>0 && i.orgData[0].average){
|
|
|
+ if(parseInt(i.orgData[0].average)>i.score){
|
|
|
+ i.cogSco = i.score
|
|
|
+ }else{
|
|
|
+ i.cogSco = parseInt(i.orgData[0].average)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
// 处理一键保存
|
|
|
async handleAllSubmit() {
|
|
|
for (const e of this.tableData) {
|