Compare commits

...

2 Commits

  1. 2
      CHANGELOG.md
  2. 2
      package-lock.json
  3. 2
      package.json
  4. 35
      src/components/ScrollListItem/ScrollListItem.vue

2
CHANGELOG.md

@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.0.0-B.12](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.11...v1.0.0-B.12) (2024-01-03)
## [1.0.0-B.11](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.10...v1.0.0-B.11) (2023-12-29)
## [1.0.0-B.10](https://git.1000my.com/project_yongwangyun/YongWang_Customer/compare/v1.0.0-B.9...v1.0.0-B.10) (2023-11-17)

2
package-lock.json

@ -1,6 +1,6 @@
{
"name": "vue_cli_ts",
"version": "1.0.0-B.11",
"version": "1.0.0-B.12",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

2
package.json

@ -1,6 +1,6 @@
{
"name": "vue_cli_ts",
"version": "1.0.0-B.11",
"version": "1.0.0-B.12",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

35
src/components/ScrollListItem/ScrollListItem.vue

@ -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>

Loading…
Cancel
Save