|
@@ -1,10 +1,7 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import {
|
|
import {
|
|
|
ref,
|
|
ref,
|
|
|
- reactive,
|
|
|
|
|
- toRefs,
|
|
|
|
|
onMounted,
|
|
onMounted,
|
|
|
- watch,
|
|
|
|
|
computed,
|
|
computed,
|
|
|
onBeforeUnmount,
|
|
onBeforeUnmount,
|
|
|
} from "vue";
|
|
} from "vue";
|
|
@@ -34,6 +31,16 @@ const nameMapping = {
|
|
|
defects: "评分详解"
|
|
defects: "评分详解"
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const maxScoreMap = {
|
|
|
|
|
+ introduction_profession: 15,
|
|
|
|
|
+ product_advantage: 35,
|
|
|
|
|
+ purchase_intent: 10,
|
|
|
|
|
+ basic_information:20,
|
|
|
|
|
+ invitation_results: 20,
|
|
|
|
|
+ penalty_points: 0,
|
|
|
|
|
+ defects: 0
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const handleResult = async () => {
|
|
const handleResult = async () => {
|
|
|
let res;
|
|
let res;
|
|
|
let shouldContinue = true; // 控制是否继续调用接口的标志
|
|
let shouldContinue = true; // 控制是否继续调用接口的标志
|
|
@@ -63,6 +70,7 @@ const handleResult = async () => {
|
|
|
acc[key] = {
|
|
acc[key] = {
|
|
|
...res.body[key],
|
|
...res.body[key],
|
|
|
name: nameMapping[key], // 添加 name 字段
|
|
name: nameMapping[key], // 添加 name 字段
|
|
|
|
|
+ maxScore: maxScoreMap[key] || 20
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
return acc;
|
|
return acc;
|
|
@@ -134,7 +142,7 @@ onBeforeUnmount(() => {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="standard-content" v-for="(item, key) in scoresList" :key="key">
|
|
<div class="standard-content" v-for="(item, key) in scoresList" :key="key">
|
|
|
<div class="standard-subtitle">
|
|
<div class="standard-subtitle">
|
|
|
- <span class="pro">{{ item.name == "扣分项" ? item.name : `${item.name}(20分)` }}:</span>
|
|
|
|
|
|
|
+ <span class="pro">{{ item.name == "扣分项" ? item.name : `${item.name}(${item.maxScore}分)` }}:</span>
|
|
|
<span>{{ item.score }}</span>
|
|
<span>{{ item.score }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<p>
|
|
<p>
|