diff --git a/src/views/home/csr/CSRContent2.vue b/src/views/home/csr/CSRContent2.vue
index 74b72f2..743b987 100644
--- a/src/views/home/csr/CSRContent2.vue
+++ b/src/views/home/csr/CSRContent2.vue
@@ -6,6 +6,7 @@ import AppBlock from '@/components/AppBlock.vue'
import { NIcon, useMessage, NCarousel } from 'naive-ui'
import { ChevronBack, ChevronForward } from '@vicons/ionicons5'
import { ElCarousel, ElCarouselItem } from 'element-plus'
+import { NPopover } from 'naive-ui'
import { getFootprintList } from '@/api/daikin/base'
@@ -18,7 +19,7 @@ const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(
store.user.roleCode
)
const swipeRef = ref
(null)
-const dataList = ref()
+const dataList = ref([])
const swipeActiveIndex = ref(0)
function handleIndex(x: any) {
swipeActiveIndex.value = x.realIndex
@@ -29,7 +30,7 @@ const setSwiperRef = (swiper: any) => {
}
// 2
const swipeSubRef = ref(null)
-const dataList2 = ref()
+const dataList2 = ref([])
const swipeActiveIndex2 = ref(0)
function handleIndex2(x: any) {
swipeActiveIndex2.value = x.realIndex
@@ -45,6 +46,8 @@ const pageInfo = reactive({
})
const swiperList = ref()
onMounted(async () => {
+ dataList.value = []
+ msgScoll.value?.addEventListener('scroll', handleVisitsScoll)
// 空调节能Solution活动
const { rows } = await getFootprintList({
pageNum: pageInfo.currentPage,
@@ -61,8 +64,11 @@ onMounted(async () => {
// };
// });
// }
-
- swiperList.value = rows
+ swiperList.value = rows
+ // if(rows.length>5 || rows.length < 3){
+ // }else{
+ // swiperList.value = [...rows,...rows]
+ // }
}
// 碳足迹
getZu(1)
@@ -163,20 +169,19 @@ const getZu = async (pageNum) => {
moduleId: '2'
})
- if (type === 0) {
- dataList.value = rows
- } else {
- dataList.value.push(...rows)
- }
- maxMsgLingth = total / 4
+ // if (type === 0) {
+ // dataList.value = rows
+ // } else {
+ // }
+ dataList.value.push(...rows)
+ maxMsgLingth = total / pageSize
console.log(dataList.value, type)
}
const msgScoll = ref(null)
-onMounted(() => {
- msgScoll.value?.addEventListener('scroll', handleVisitsScoll)
-})
+
const handleVisitsScoll = () => {
+ // if(pageNum >= 1) return
const container = msgScoll.value
if (container) {
const isAtBottom =
@@ -192,7 +197,7 @@ const handleVisitsScoll = () => {
-
+
@@ -229,7 +234,6 @@ const handleVisitsScoll = () => {
@@ -237,25 +241,32 @@ const handleVisitsScoll = () => {
+
-
+
+
{
v-if="i.imgUrl"
v-for="ite in i.imgUrl"
:src="ite.url"
- class="p10px w-full max-h-200px image-container"
+ class="p10px w-full max-h-200px image-container overflow-hidden"
/>
@@ -318,15 +329,21 @@ const handleVisitsScoll = () => {
src="../../../assets/images/lvbiao@2x.png"
class="mr-5px"
/>
- {{ i.filePath[0].originalFileName }}
-
+
+
+ {{ i.filePath[0]?.originalFileName }}
+
+
+
+ {{ i.filePath[0]?.originalFileName }}
+
+
{
+
diff --git a/src/views/home/csr/CSRContent22.vue b/src/views/home/csr/CSRContent22.vue
index dfffb1b..d7bbaac 100644
--- a/src/views/home/csr/CSRContent22.vue
+++ b/src/views/home/csr/CSRContent22.vue
@@ -8,11 +8,18 @@ import {
liQuids
} from './CSRDatas'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
-const { chartRef, option } = charData()
-const { chartRef: chartRef1, option: option1 } = charData2()
-const { chartRef: chartRefP1, option: optionP1 } = pieData1()
+// const { chartRef, option } = charData()
+// const { chartRef: chartRef1, option: option1 } = charData2()
+// const { chartRef: chartRefP1, option: optionP1 } = pieData1()
import { NNumberAnimation } from "naive-ui";
+import { ref, onMounted } from 'vue'
+const option = ref({});
+const option1 = ref({});
+const optionP1 = ref({});
+const chartRef = ref(null);
+const chartRef1 = ref(null);
+const chartRefP1 = ref(null);
const locale = computed(() => zhCn)
const YearTime1 = ref('2020')
const YearTime2 = ref('2023')
@@ -22,10 +29,22 @@ const cardsClick = (it) => {
console.log(flgs.value)
// dataInfo.treeSource = it
}
+
+onMounted(() => {
+ const char = charData()
+ option.value = char.option.value
+ chartRef.value = char.chartRef.value
+ const char1 = charData2()
+ option1.value = char1.option.value
+ chartRef1.value = char1.chartRef.value
+ const charP1 = pieData1()
+ optionP1.value = charP1.option.value
+ chartRefP1.value = charP1.chartRef.value
+})
-
+
@@ -91,14 +110,14 @@ const cardsClick = (it) => {
-
-