|
@@ -43,16 +43,28 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column label="专家评分" align="center" fixed="right" width="80">
|
|
|
|
|
|
|
+ <el-table-column label="最终评分" align="center" width="120">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
<span v-if="getExpertScore(row.value)">{{ getExpertScore(row.value) }}</span>
|
|
<span v-if="getExpertScore(row.value)">{{ getExpertScore(row.value) }}</span>
|
|
|
- <el-button v-else-if="isEXPERT" @click="addScore(row)" type="primary" size="mini" plain
|
|
|
|
|
- >评分</el-button
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <div v-else>
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ style="width:100%"
|
|
|
|
|
+ v-model="form[row.value]"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ :min="1"
|
|
|
|
|
+ :max="row.score"
|
|
|
|
|
+ :step="1"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-input-number>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
- <div style="margin-top: 10px"><el-button @click="$router.go(-1)">返回</el-button></div>
|
|
|
|
|
|
|
+ <div style="margin-top: 10px;display:flex">
|
|
|
|
|
+ <el-button @click="$router.go(-1)">返回</el-button>
|
|
|
|
|
+ <div style="flex-grow:1"></div>
|
|
|
|
|
+ <el-button type="primary" v-if="submitList.length !== 0" @click="saveExpertScore">最终评分</el-button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -69,7 +81,9 @@ export default {
|
|
|
downloading: false,
|
|
downloading: false,
|
|
|
spanArr: [],
|
|
spanArr: [],
|
|
|
tableHeight1: 620,
|
|
tableHeight1: 620,
|
|
|
- rateList: []
|
|
|
|
|
|
|
+ rateList: [],
|
|
|
|
|
+ info: {},
|
|
|
|
|
+ form: {}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -83,12 +97,34 @@ export default {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
return !!info;
|
|
return !!info;
|
|
|
|
|
+ },
|
|
|
|
|
+ submitList() {
|
|
|
|
|
+ return [...this.rateList]
|
|
|
|
|
+ .filter(item => {
|
|
|
|
|
+ return !item.expertScore;
|
|
|
|
|
+ })
|
|
|
|
|
+ .map(item => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ expertScore: this.form[item.type]
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.getGride();
|
|
this.getGride();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ saveExpertScore() {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/rateExpertAudit/batchSave', {
|
|
|
|
|
+ audits: JSON.stringify(this.submitList)
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.$message.success('添加成功');
|
|
|
|
|
+ this.getGride();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
getGride() {
|
|
getGride() {
|
|
|
this.$http
|
|
this.$http
|
|
|
.post(
|
|
.post(
|
|
@@ -104,6 +140,16 @@ export default {
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (!res.empty) {
|
|
if (!res.empty) {
|
|
|
this.rateList = res.content;
|
|
this.rateList = res.content;
|
|
|
|
|
+
|
|
|
|
|
+ let form = {};
|
|
|
|
|
+ console.log(this.categories);
|
|
|
|
|
+
|
|
|
|
|
+ [...this.categories].forEach(item => {
|
|
|
|
|
+ form[item.value] = this.getValue(item.value);
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(form);
|
|
|
|
|
+
|
|
|
|
|
+ this.form = form;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -251,6 +297,11 @@ export default {
|
|
|
return total + this.getValue(currentValue.value);
|
|
return total + this.getValue(currentValue.value);
|
|
|
}, 0);
|
|
}, 0);
|
|
|
return;
|
|
return;
|
|
|
|
|
+ } else if (index === 6) {
|
|
|
|
|
+ sums[index] = data.reduce((total, currentValue) => {
|
|
|
|
|
+ return total + this.form[currentValue.value];
|
|
|
|
|
+ }, 0);
|
|
|
|
|
+ return;
|
|
|
} else {
|
|
} else {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|