Update survey-record.vue
This commit is contained in:
parent
1b46d70bea
commit
e47d5b4dd8
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="h-full flex flex-col">
|
<view class="h-full flex flex-col">
|
||||||
<view class="flex-shrink-0 px-10 pt-5 text-base font-semibold text-center truncate">{{ surery.name }}</view>
|
<view class="flex-shrink-0 px-10 pt-5 text-base font-semibold text-center truncate">{{ survey.name }}</view>
|
||||||
<view v-if="surery.description"
|
<view v-if="survey.description"
|
||||||
class="flex-shrink-0 px-10 mt-10 text-sm leading-normal text-gray line-clamp-2 text-center">
|
class="flex-shrink-0 px-10 mt-10 text-sm leading-normal text-gray line-clamp-2 text-center">
|
||||||
{{ surery.description }}
|
{{ survey.description }}
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center text-gray text-sm px-10 mt-10">
|
<view class="flex items-center text-gray text-sm px-10 mt-10">
|
||||||
<view v-if="surery.enableScore">
|
<view v-if="survey.enableScore">
|
||||||
当前得分:<text class="text-primary text-base font-semibold min-w-5 inline-block">{{ allScore }}
|
当前得分:<text class="text-primary text-base font-semibold min-w-5 inline-block">{{ allScore }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<view class="flex-grow pl-4 text-gray leading-normal"
|
<view class="flex-grow pl-4 text-gray leading-normal"
|
||||||
:class="quesiton.value && quesiton.value === opt.value ? 'text-primary' : ''">
|
:class="quesiton.value && quesiton.value === opt.value ? 'text-primary' : ''">
|
||||||
{{ opt.label }}
|
{{ opt.label }}
|
||||||
<text v-if="surery.enableScore && opt.score >= 0">
|
<text v-if="survey.enableScore && opt.score >= 0">
|
||||||
( {{ opt.score }}分)
|
( {{ opt.score }}分)
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
@ -52,7 +52,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
customerName: { type: String, default: '' },
|
customerName: { type: String, default: '' },
|
||||||
list: { type: Array, default: () => ([]) },
|
list: { type: Array, default: () => ([]) },
|
||||||
surery: { type: Object, default: () => ({}) }
|
survey: { type: Object, default: () => ({}) }
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
allScore() {
|
allScore() {
|
||||||
@ -66,6 +66,12 @@ export default {
|
|||||||
return score
|
return score
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
logScore() {
|
||||||
|
console.log(this.survey)
|
||||||
|
console.log(this.allScore)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user