@ -34,20 +34,7 @@
< / div >
< ScrollView class = "relative h-[356px]" scrollbar observe -image :list ="customer.replyContent" >
< div class = "text-[##333333] text-24 font-normal leading-normal whitespace-normal pr-2" >
< div >
{ { customer . replyContent } }
< div v-if ="before(customer).length" class="mb-[14px]" >
< p class = "text-24 text-[#333] pb-[6px]" > 改善前 < / p >
< img v -for = " pic of before ( customer ) " :key ="pic.filePath" : src = "config.smallUrl + pic.filePath" class = "block w-full" alt = "" / >
< / div >
< div v-if ="before(customer).length" class="mb-[14px]" >
< p class = "text-24 text-[#333]" > 改善后 < / p >
< img v -for = " pic of after ( customer ) " :key ="pic.filePath" : src = "config.smallUrl + pic.filePath" class = "block w-full" alt = "" / >
< / div >
< template v-if ="filterPic?.length" >
< img v -for = " item of filterPic " :key ="item.fileName" : src = "config.smallUrl + item.filePath" class = "block w-full" alt = "" / >
< / template >
< / div >
< div v-html ="customer.replyContent" > < / div >
< div v-if ="customer.sign" class="text-[#333] text-24" > 店铺店长 : {{ customer.sign }} < / div >
< div class = "flex items-center text-[#333] text-24 pt-2" >
总经理 : 能岛拓也
@ -73,24 +60,16 @@
< / template >
< script setup lang = "ts" >
import { toRefs , computed } from 'vue'
import { useRootStore } from '@/store/root'
import ScrollView from '@/base/ScrollView/ScrollView.vue'
type Props = {
customer : Customer
}
const props = withDefaults ( defineProps < Props > ( ) , {
withDefaults ( defineProps < Props > ( ) , {
customer : ( ) => ( { } as Customer )
} )
/ / 筛 选 改 善 前 后 图 片
const filterPic = computed ( ( ) => props . customer . fileList ? . filter ( item => item . type !== 'before' && item . type !== 'after' ) )
const store = useRootStore ( )
const { config } = toRefs ( store )
function formatDate ( date : string ) {
if ( ! date ) {
return
@ -101,16 +80,6 @@ function formatDate(date: string) {
const week = String ( newDate . getDate ( ) ) . padStart ( 2 , '0' )
return ` ${ year } - ${ month } - ${ week } ${ newDate . getHours ( ) . toString ( ) . padStart ( 2 , '0' ) } : ${ newDate . getMinutes ( ) . toString ( ) . padStart ( 2 , '0' ) } `
}
/ / 改 善 前 图 片
function before ( item : Customer ) {
return item . fileList . filter ( _item => _item . type === 'before' )
}
/ / 改 善 后
function after ( item : Customer ) {
return item . fileList . filter ( _item => _item . type === 'after' )
}
< / script >
< style >