..
This commit is contained in:
@@ -56,7 +56,6 @@ const SatisfactionEvaluate = {
|
||||
:key="idx"
|
||||
class="option-cell"
|
||||
:class="{'selected': getScoreLevel(formData[item.field], item) === idx}"
|
||||
@click="selectOption(index, idx)"
|
||||
>
|
||||
{{option.range}}
|
||||
</td>
|
||||
@@ -127,7 +126,7 @@ const SatisfactionEvaluate = {
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
@@ -170,7 +169,7 @@ const SatisfactionEvaluate = {
|
||||
{
|
||||
title: "车辆状况和司机服务",
|
||||
maxScore: 10,
|
||||
field: "guideScore",
|
||||
field: "carDriverScore",
|
||||
options: [
|
||||
{ label: "好", range: "10-9" },
|
||||
{ label: "较好", range: "8-7" },
|
||||
@@ -256,9 +255,11 @@ const SatisfactionEvaluate = {
|
||||
}, 0);
|
||||
},
|
||||
currentEvaluationItems() {
|
||||
return this.formData.type === 1
|
||||
? this.evaluationItems
|
||||
: this.evaluationItemsType2;
|
||||
if (this.formData && this.formData.selectLineId) {
|
||||
return this.evaluationItems;
|
||||
} else {
|
||||
return this.evaluationItemsType2;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -267,17 +268,6 @@ const SatisfactionEvaluate = {
|
||||
this.getBasicInfo();
|
||||
this.show = true;
|
||||
},
|
||||
selectOption(itemIndex, optionIndex) {
|
||||
const item = this.currentEvaluationItems[itemIndex];
|
||||
const range = item.options[optionIndex].range;
|
||||
if (range.includes("-")) {
|
||||
const highScore = Number(range.split("-")[0]);
|
||||
this.formData[item.field] = highScore;
|
||||
} else if (range.includes("<")) {
|
||||
const threshold = Number(range.replace("<", ""));
|
||||
this.formData[item.field] = threshold - 1;
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
|
||||
Reference in New Issue
Block a user