Pārlūkot izejas kodu

feat: 碳排放修改

sunxiao 2 mēneši atpakaļ
vecāks
revīzija
94a31aaaca

+ 0 - 1
components.d.ts

@@ -25,7 +25,6 @@ declare module 'vue' {
     EditPassword: typeof import('./src/components/Dialog/editPassword.vue')['default']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
-    ElIcon: typeof import('element-plus/es')['ElIcon']
     RecodeCardItem: typeof import('./src/components/RecodeCardItem/index.vue')['default']
     RecodeSquareCardItem: typeof import('./src/components/RecodeSquareCardItem/index.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']

+ 14 - 3
src/views/carbon/components/TheDrawerForm.vue

@@ -183,6 +183,7 @@ const handleAddTableRow = (key) => {
 
     const ids = [181, 182];
 
+
     if (!selectValue.value.hsrl) {
       return message.warning("请先选择固液气-化石燃料");
     }
@@ -191,14 +192,24 @@ const handleAddTableRow = (key) => {
       key: 'hsrlOptions',
       code: selectValue.value.hsrl
     });
-
+  
     const isExists = ids.includes(codeSet.dictCode);
+    let unit = '';
+    if (isExists) {
+      unit = '万m³/月';
+    } else {
+      if ( selectValue.value.hsrl === 180 ) {
+        unit = '10⁴Nm³';
+      } else {
+        unit = 't/月'; 
+      }
+    }
 
     option = {
-      columns: ['替代的燃料名称', '燃料消耗量', '操作'],
+      columns: ['燃料名称', '燃料消耗量', '操作'],
       data: [
         { type: 'name', value: codeSet.dictLabel },
-        { type: 'input', value: null, unit: isExists ? '万m³/月' : 't/月' },
+        { type: 'input', value: null, unit: unit },
         { type: 'text' }
       ],
       codeSet,

+ 166 - 129
src/views/carbon/components/TheDrawerList.vue

@@ -47,9 +47,18 @@ const list = computed(() => {
   let carbonTwoList = [];
   let carbonThreeList = [];
 
-  if ( Object.keys(props.data).length ) {
+  if (Object.keys(props.data).length) {
     sewageOneList = props.data.extraMap['0'] || [];
-    energyOneList = props.data.extraMap['1'] || [];
+    energyOneList = (props.data.extraMap['1'] || []).map((item) => {
+      if ( [181, 182].includes(item.dictCode) ) {
+        item.unit = '万m³/月'
+      } else if ( [180].includes(item.dictCode) ) {
+        item.unit = '10⁴Nm³'
+      } else {
+        item.unit = 't/月'
+      }
+      return item;
+    });
     energyTwoList = props.data.extraMap['2'] || [];
     carbonOneList = props.data.extraMap['3'] || [];
     carbonTwoList = props.data.extraMap['4'] || [];
@@ -68,7 +77,6 @@ const list = computed(() => {
 
 const handleTabItem = (index) => {
   const top = cardNodelist[index]?.offsetTop;
-  console.log( scrollRef.value );
   scrollRef.value.scrollTo({
     top,
     behavior: 'smooth'
@@ -82,17 +90,15 @@ const onAfterdEnter = () => {
 </script>
 
 <template>
-  <NDrawer :width="1220" placement="right" v-model:show="isVisibleDrawer" class="drawer-wrapper" :on-after-enter="onAfterdEnter" :close-on-esc="false" :mask-closable="false">
-    <n-drawer-content closable title="申报信息" header-class="drawer-header" body-content-class="drawer-body" footer-class="drawer-footer" :block-scroll="false">
+  <NDrawer :width="1220" placement="right" v-model:show="isVisibleDrawer" class="drawer-wrapper"
+    :on-after-enter="onAfterdEnter" :close-on-esc="false" :mask-closable="false">
+    <n-drawer-content closable title="申报信息" header-class="drawer-header" body-content-class="drawer-body"
+      footer-class="drawer-footer" :block-scroll="false">
       <div class="main-container">
         <div class="header">
           <ul class="tab-list space-x-[4px]">
-            <li
-              v-for="item, index in tabList"
-              :key="item"
-              :class="['tab-item', { active: tabActive === index }]"
-              @click="handleTabItem(index)"
-            >{{ item }}</li>
+            <li v-for="item, index in tabList" :key="item" :class="['tab-item', { active: tabActive === index }]"
+              @click="handleTabItem(index)">{{ item }}</li>
           </ul>
           <!-- <button class="btn">下载核算结果</button> -->
         </div>
@@ -113,7 +119,7 @@ const onAfterdEnter = () => {
               </BaseCard>
 
               <BaseCard title="污水处理" sub-title="">
-                <BasePanel isNoPadding title="石源碳矿化产生的碳排放量">
+                <BasePanel isNoPadding title="石源碳矿化产生的碳排放量">
                   <ul class="list-info">
                     <li class="item space-x-[10px]">
                       <span class="label">月处理水量</span>
@@ -134,21 +140,23 @@ const onAfterdEnter = () => {
                   </ul>
                 </BasePanel>
                 <BasePanel isNoPadding title="外加碳源矿化产生的化石源CO₂碳排放量" class="space-y-[14px]">
-                  <ul class="list-info" v-for="item in list.sewageOneList">
-                    <li class="item space-x-[10px]">
-                      <span class="label">碳源名称</span>
-                      <span class="value bold">{{ item.dictLabel }}</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">外加碳源用量</span>
-                      <span class="value">{{ item.amount }} (Kg/月)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">外加碳源的化石源CO₂排放量</span>
-                      <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
-                    </li>
-                  </ul>
-                  <!-- <div class="line"></div> -->
+                  <div v-for="item,index in list.sewageOneList" :key="index">
+                    <ul class="list-info">
+                      <li class="item space-x-[10px]">
+                        <span class="label">碳源名称</span>
+                        <span class="value bold">{{ item.dictLabel }}</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">外加碳源用量</span>
+                        <span class="value">{{ item.amount }} (Kg/月)</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">外加碳源的化石源CO₂排放量</span>
+                        <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
+                      </li>
+                    </ul>
+                    <div class="h-[1px] w-[1000px] bg-[#ebebeb] mx-auto my-[5px]" v-if="list.sewageOneList.length && index != list.sewageOneList.length - 1"></div>
+                  </div>
                 </BasePanel>
                 <BasePanel isNoPadding title="污水收集提升和处理阶段排放的CH₄的CO₂当量">
                   <ul class="list-info">
@@ -166,11 +174,11 @@ const onAfterdEnter = () => {
                     </li>
                     <li class="item space-x-[10px]">
                       <span class="label">出水COD</span>
-                      <span class="value">{{ data.wsSjclCh4CsCod }}  (mg/L)</span>
+                      <span class="value">{{ data.wsSjclCh4CsCod }} (mg/L)</span>
                     </li>
                     <li class="item space-x-[10px]">
                       <span class="label">污水处理阶段CH₄的排放因子</span>
-                      <span class="value">{{ data.wsSjclCh4Pfyz }}  (kg CH₄/kg COD)</span>
+                      <span class="value">{{ data.wsSjclCh4Pfyz }} (kg CH₄/kg COD)</span>
                     </li>
 
                     <li class="item space-x-[10px]" v-if="data.wsSjclCh4Tsb">
@@ -179,7 +187,7 @@ const onAfterdEnter = () => {
                     </li>
                     <li class="item space-x-[10px]" v-if="data.wsSjclCh4Csc">
                       <span class="label">沉砂池逸散的CH₄量</span>
-                      <span class="value">{{ data.wsSjclCh4Csc }}  (kg/月)</span>
+                      <span class="value">{{ data.wsSjclCh4Csc }} (kg/月)</span>
                     </li>
                     <li class="item space-x-[10px]">
                       <span class="label">污水处理阶段排放的CH₄的CO₂当量</span>
@@ -298,7 +306,7 @@ const onAfterdEnter = () => {
                     </li>
                     <li class="item space-x-[10px]">
                       <span class="label">对应焓值</span>
-                      <span class="value">{{data.nyyjGrrlDyhz}} (KJ/Kg)</span>
+                      <span class="value">{{ data.nyyjGrrlDyhz }} (KJ/Kg)</span>
                     </li>
                     <!-- <li class="item space-x-[10px]">
                       <span class="label">热力</span>
@@ -311,36 +319,43 @@ const onAfterdEnter = () => {
                   </ul>
                 </BasePanel>
                 <BasePanel isNoPadding title="固定式能源燃料消耗产生的碳排放量">
-                  <ul class="list-info" v-for="item, index in list.energyOneList" :key="index">
-                    <li class="item space-x-[10px]">
-                      <span class="label">燃料名称</span>
-                      <span class="value bold">{{ item.dictLabel }}</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">燃料消耗量</span>
-                      <span class="value">{{ item.amount }} (t/月)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">燃料消耗产生的碳排放量</span>
-                      <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
-                    </li>
-                  </ul>
+                  <div v-for="item, index in list.energyOneList" :key="index">
+                    <ul class="list-info">
+                      <li class="item space-x-[10px]">
+                        <span class="label">燃料名称</span>
+                        <span class="value bold">{{ item.dictLabel }}</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">燃料消耗量</span>
+                        <span class="value">{{ item.amount }} ({{ item.unit }})</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">燃料消耗产生的碳排放量</span>
+                        <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
+                      </li>
+                    </ul>
+                    <div class="h-[1px] w-[1000px] bg-[#ebebeb] mx-auto my-[5px]" v-if="list.energyOneList.length && index != list.energyOneList.length - 1"></div>
+                  </div>
                 </BasePanel>
                 <BasePanel isNoPadding title="污水处理阶段药剂消耗产生的碳排放量">
-                  <ul class="list-info" v-for="item, index in list.energyTwoList" :key="index">
-                    <li class="item space-x-[10px]">
-                      <span class="label">药剂名称</span>
-                      <span class="value bold">{{ item.dictLabel }}</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">药剂消耗量</span>
-                      <span class="value">{{ item.amount }} (t/月)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">燃料消耗产生的碳排放量</span>
-                      <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
-                    </li>
-                  </ul>
+                  <div v-for="item, index in list.energyTwoList" class="other">
+                    <ul class="list-info" :key="index">
+                      <li class="item space-x-[10px]">
+                        <span class="label">药剂名称</span>
+                        <span class="value bold">{{ item.dictLabel }}</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">药剂消耗量</span>
+                        <span class="value">{{ item.amount }} (kg/月)</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">药剂消耗产生的碳排放量</span>
+                        <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
+                      </li>
+                    </ul>
+                    <div class="h-[1px] w-[1000px] bg-[#ebebeb] mx-auto my-[5px]"
+                      v-if="list.energyTwoList.length && index != list.energyTwoList.length - 1"></div>
+                  </div>
                 </BasePanel>
               </BaseCard>
 
@@ -405,14 +420,14 @@ const onAfterdEnter = () => {
                   <ul class="list-info">
                     <li class="item space-x-[10px]">
                       <span class="label">燃料消耗量</span>
-                      <span class="value bold">{{ data.wnclWnfsXhl }} (m3/月)</span>
+                      <span class="value bold">{{ data.wnclWnfsXhl }} (kg 干污泥/月)</span>
                     </li>
                     <li class="item space-x-[10px]">
                       <span class="label">污泥干物质中含碳比例</span>
                       <span class="value">{{ data.wnclWnfsHtbl }} (%)</span>
                     </li>
                     <li class="item space-x-[10px]">
-                      <span class="label">污泥好氧发酵过程排放的CH₄的CO₂当量</span>
+                      <span class="label">污泥焚烧过程化石源碳CO₂碳排放量</span>
                       <span class="value blue">{{ data.wnclWnfsCo2 }} (t CO₂-eq/月)</span>
                     </li>
                   </ul>
@@ -441,7 +456,7 @@ const onAfterdEnter = () => {
                     </li>
                   </ul>
                 </BasePanel>
-                <BasePanel isNoPadding title="污泥热解碳化或气化过程化石源CO">
+                <BasePanel isNoPadding title="污泥热解碳化或气化过程化石源CO₂排放当量">
                   <ul class="list-info">
                     <li class="item space-x-[10px]">
                       <span class="label">污泥热解消耗量</span>
@@ -452,7 +467,7 @@ const onAfterdEnter = () => {
                       <span class="value">{{ data.wnclWnrjByhHtbl }} (%)</span>
                     </li>
                     <li class="item space-x-[10px]">
-                      <span class="label">污泥热解过程排放的CH₄的CO₂当量</span>
+                      <span class="label">污泥热解过程化石源CO₂碳排放量</span>
                       <span class="value">{{ data.wnclWnrjByhCo2 }} (t CO₂-eq/月)</span>
                     </li>
                   </ul>
@@ -467,10 +482,10 @@ const onAfterdEnter = () => {
                       <span class="label">污泥热解消耗量</span>
                       <span class="value">{{ data.wnclWnrjQtXhl }} (t干污泥/月)</span>
                     </li>
-                    <li class="item space-x-[10px]">
+                    <!-- <li class="item space-x-[10px]">
                       <span class="label">污泥热解过程N₂O的排放因子</span>
                       <span class="value">{{ data.wnclWnrjQtPfyz }} (kg N₂O/t 干污泥)</span>
-                    </li>
+                    </li> -->
                     <li class="item space-x-[10px]">
                       <span class="label">污泥热解过程排放的CH₄的CO₂当量</span>
                       <span class="value blue">{{ data.wnclWnrjQtCh4Co2 }} (t CO₂-eq/月)</span>
@@ -485,30 +500,33 @@ const onAfterdEnter = () => {
 
               <BaseCard title="替碳、碳汇" sub-title="">
                 <BasePanel isNoPadding title="热泵技术-替碳量">
-                  <ul class="list-info" v-for="item, index in list.carbonOneList" :key="index">
-                    <li class="item space-x-[10px]">
-                      <span class="label">燃料名称</span>
-                      <span class="value bold">{{ item.dictLabel }}</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">污水厂电力消耗产生的总碳排放量</span>
-                      <span class="value blue">{{ item.amount }} (t CO₂-eq/月)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">热泵替碳量</span>
-                      <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
-                    </li>
-                  </ul>
+                  <div v-for="item, index in list.carbonOneList" :key="index">
+                    <ul class="list-info">
+                      <li class="item space-x-[10px]">
+                        <span class="label">替代的燃料名称</span>
+                        <span class="value bold">{{ item.dictLabel }}</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">热泵供热,供冷量</span>
+                        <span class="value blue">{{ item.amount }} (KJ/月)</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">热泵替碳量</span>
+                        <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
+                      </li>
+                    </ul>
+                    <div class="h-[1px] w-[1000px] bg-[#ebebeb] mx-auto my-[5px]" v-if="list.carbonOneList.length && index != list.carbonOneList.length - 1"></div>
+                  </div>
                 </BasePanel>
                 <BasePanel isNoPadding title="光伏-替碳量" class="space-y-[14px]">
                   <ul class="list-info">
                     <li class="item space-x-[10px]">
-                      <span class="label">总耗电量</span>
-                      <span class="value bold">{{ data.thGfZhdl }} (t/月)</span>
+                      <span class="label">光伏发电量</span>
+                      <span class="value bold">{{ data.thGfZhdl }} (kW·h/月)</span>
                     </li>
                     <li class="item space-x-[10px]">
                       <span class="label">光伏发电替碳量</span>
-                      <span class="value blue">{{data.thGfCo2}} (KJ/Kg)</span>
+                      <span class="value blue">{{ data.thGfCo2 }} (t CO₂-eq/月)</span>
                     </li>
                   </ul>
                 </BasePanel>
@@ -529,52 +547,58 @@ const onAfterdEnter = () => {
                   </ul>
                 </BasePanel>
                 <BasePanel isNoPadding title="污泥厌氧消化沼气利用的替碳量">
-                  <ul class="list-info" v-for="item in list.carbonTwoList" :key="index">
-                    <li class="item space-x-[10px]">
-                      <span class="label">燃料名称</span>
-                      <span class="value bold">{{ item.dictLabel }}</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">污泥厌氧消化沼气发电量</span>
-                      <span class="value">{{ item.amount }} (t/月)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">厌氧消化沼气富余热能利用量</span>
-                      <span class="value">{{ item.lyl }} (t CO₂-eq/月)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">沼气提纯并网的天然气量</span>
-                      <span class="value">{{ item.hz }} (t CO₂-eq/月)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">污泥厌氧消化沼气利用的替碳量</span>
-                      <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
-                    </li>
-                  </ul>
+                  <div v-for="item in list.carbonTwoList" :key="index">
+                    <ul class="list-info">
+                      <li class="item space-x-[10px]">
+                        <span class="label">替代的燃料名称</span>
+                        <span class="value bold">{{ item.dictLabel }}</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">污泥厌氧消化沼气发电量</span>
+                        <span class="value">{{ item.amount }} (kW·h/月)</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">厌氧消化沼气富余热能利用量</span>
+                        <span class="value">{{ item.lyl }} (TJ/月)</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">沼气提纯并网的天然气量</span>
+                        <span class="value">{{ item.hz }} (m³ CH₄/月)</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">污泥厌氧消化沼气利用的替碳量</span>
+                        <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
+                      </li>
+                    </ul>
+                    <div class="h-[1px] w-[1000px] bg-[#ebebeb] mx-auto my-[5px]" v-if="list.carbonTwoList.length && index != list.carbonTwoList.length - 1"></div>
+                  </div>
                 </BasePanel>
                 <BasePanel isNoPadding title="污泥焚烧或热解热能利用的替碳量">
-                  <ul class="list-info" v-for="item in list.carbonThreeList" :key="index">
-                    <li class="item space-x-[10px]">
-                      <span class="label">燃料名称</span>
-                      <span class="value bold">{{ item.dictLabel }}</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">污泥焚烧或热解的电力利用量</span>
-                      <span class="value">{{ item.amount }} (kW·h/d)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">污泥焚烧或热解热能利用量</span>
-                      <span class="value blue">{{ item.lyl }} (t CO₂-eq/月)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">对应焓值</span>
-                      <span class="value blue">{{ item.hz }} (KJ/Kg)</span>
-                    </li>
-                    <li class="item space-x-[10px]">
-                      <span class="label">污泥焚烧或热解热能利用的替碳量</span>
-                      <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
-                    </li>
-                  </ul>
+                  <div v-for="item in list.carbonThreeList" :key="index">
+                    <ul class="list-info" >
+                      <li class="item space-x-[10px]">
+                        <span class="label">替代的燃料名称</span>
+                        <span class="value bold">{{ item.dictLabel }}</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">污泥焚烧或热解的电力利用量</span>
+                        <span class="value">{{ item.amount }} (kW·h/月)</span>
+                      </li>
+                      <li class="item space-x-[10px]">
+                        <span class="label">污泥焚烧或热解热能利用量</span>
+                        <span class="value blue">{{ item.lyl }} (GJ/月)</span>
+                      </li>
+                      <!-- <li class="item space-x-[10px]">
+                        <span class="label">对应焓值</span>
+                        <span class="value blue">{{ item.hz }} (KJ/Kg)</span>
+                      </li> -->
+                      <li class="item space-x-[10px]">
+                        <span class="label">污泥焚烧或热解热能利用的替碳量</span>
+                        <span class="value blue">{{ item.val }} (t CO₂-eq/月)</span>
+                      </li>
+                    </ul>
+                    <div class="h-[1px] w-[1000px] bg-[#ebebeb] mx-auto my-[5px]" v-if="list.carbonThreeList.length && index != list.carbonThreeList.length - 1"></div>
+                  </div>
                 </BasePanel>
                 <BasePanel isNoPadding title="污泥经过厌氧、好氧或碳化处理后,产生的替碳量">
                   <ul class="list-info">
@@ -614,7 +638,7 @@ const onAfterdEnter = () => {
     padding: 12px 16px;
     border-radius: 10px;
     background: #fff;
-    
+
     .btn {
       border-radius: 4px;
       padding: 5px 16px;
@@ -649,7 +673,7 @@ const onAfterdEnter = () => {
   .content {
     height: calc(100% - 76px);
     margin-top: 12px;
-    
+
     .main {
 
       .line {
@@ -663,6 +687,7 @@ const onAfterdEnter = () => {
         display: flex;
         flex-wrap: wrap;
         justify-content: flex-end;
+
         .item {
           display: flex;
           width: 50%;
@@ -670,7 +695,7 @@ const onAfterdEnter = () => {
           line-height: 32px;
 
           .label {
-            width: 260px;
+            width: 266px;
             text-align: right;
             color: #86909C;
           }
@@ -692,11 +717,21 @@ const onAfterdEnter = () => {
   }
 }
 
+// .data-group:last-child {
+//   display: none;
+// }
+
 .card {
   padding: 20px 16px;
   border-radius: 10px;
   background: #fff;
 }
+.main-container .content .main .other .list-info .item {
+  .label {
+    width: 200px;
+  }
+}
+
 
 /** reset drawer css**/
 .drawer-wrapper {
@@ -705,11 +740,13 @@ const onAfterdEnter = () => {
       padding: 20px;
       background: linear-gradient(180deg, #F3F7FC 0%, #E4EAF7 100%);
     }
+
     :deep(.drawer-header) {
       padding: 16px !important;
       border: 0;
       line-height: 24px;
     }
+
     :deep(.drawer-footer) {
       justify-content: center !important;
       align-items: center;

+ 2 - 2
src/views/carbon/components/screen/DataBorad.vue

@@ -72,7 +72,7 @@ const boardList = ref([
     <div class="board-item" v-for="item, index in boardList" :key="item.key">
       <p class="title">{{ item.label }}</p>
       <p class="statement">
-        <span class="num">{{ data[item.key] }} </span>
+        <span class="num">{{ data[item.key] || 0}} </span>
         <span class="unit"> {{ item.unit }}</span>
       </p>
       <div class="info-wrapper">
@@ -84,7 +84,7 @@ const boardList = ref([
           <span v-else>{{ item.desc }}</span>
         </p>
         <p :class="['info', 'space-x-[5px]', { down: data[item.hbKey] < 0 }]" v-if="index !== 1">
-          <span class="num">{{ data[item.hbKey ]}} %</span>
+          <span class="num">{{ data[item.hbKey ] || 0}} %</span>
           <span class="icon" v-if="data[item.hbKey]"></span>
         </p>
       </div>

+ 2 - 13
src/views/carbon/components/screen/DataScroll.vue

@@ -1,9 +1,7 @@
 <script setup>
-import { ref, watch } from 'vue';
-
 import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
 
-import LayoutCard from './LayoutCard.vue'
+import LayoutCard from './LayoutCard.vue';
 
 const props = defineProps({
   data: {
@@ -11,15 +9,6 @@ const props = defineProps({
     default: () => []
   }
 })
-
-const seamlessScroll = ref(null);
-
-watch(() => props.data, (newVal) => {
-  console.log("发生了变化");
-  console.log(seamlessScroll.value);
-  // seamlessScroll.value?.reset()
-});
-
 </script>
 
 <template>
@@ -30,7 +19,7 @@ watch(() => props.data, (newVal) => {
         <li>碳排放</li>
       </ul>
       <div class="main">
-        <vue3SeamlessScroll 
+        <vue3SeamlessScroll
           :list="data"
           :limitScrollNum="7"
           :singleHeight="40"

+ 2 - 2
src/views/carbon/echartOptions/index.js

@@ -247,7 +247,7 @@ export const echartGraphOptions = (d = []) => {
     xAxis: [
       {
         type: "value",
-        max: maxData,
+        // max: maxData,
         show: false,
       },
       {
@@ -314,7 +314,7 @@ export const echartGraphOptions = (d = []) => {
             return `{a|${val}}  {b|tCO₂-eq}`;
           },
         },
-        data: data,
+        data: data.reverse(),
       },
     ],
     series: [

+ 42 - 16
src/views/carbon/index.vue

@@ -56,10 +56,11 @@ const scrollMapping = [
   { label: '污泥厌氧消化过程排放的CH₄的CO₂当量', key: 'wnclYyzqCo2', value: '' },
   { label: '单独处理污泥厌氧消化产生沼液的CO₂当量', key: 'wnclDdclCo2', value: '' },
   { label: '污泥好氧发酵过程排放的N₂O的CO₂当量', key: 'wnclHyfjN2oCo2', value: '' },
+  // { label: '污泥焚烧过程化石源碳CO₂碳排放量', key: 'wnclWnfsCo2', value: '' },
   { label: '污泥好氧发酵过程排放的CH₄的CO₂当量', key: 'wnclWnfsCo2', value: '' },
   { label: '污泥焚烧过程排放的CH₄的CO₂当量', key: 'wnclBwqrsCh4Co2', value: '' },
   { label: '污泥焚烧过程排放的N₂O的CO₂当量', key: 'wnclBwqrsN2oCo2', value: '' },
-  { label: '污泥热解过程排放的CH₄的CO₂当量', key: 'wnclWnrjByhCo2', value: '' },
+  { label: '污泥热解过程化石源CO₂碳排放量', key: 'wnclWnrjByhCo2', value: '' },
   { label: '污泥热解过程排放的N₂O的CO₂当量', key: 'wnclWnrjQtN2oCo2', value: '' },
   { label: '光伏发电替碳量', key: 'thGfCo2', value: '' },
   { label: '回用水替代供水的替碳量', key: 'thZssCo2', value: '' },
@@ -99,13 +100,13 @@ const initAllMonth = async () => {
 const initEchart = () => {
   const { 
     recent7Datas, extraMap, wsTdN2oCo2, wsSjclCh4Co2, wjtykuCo2, wsHsytkhCo2,
-    wnclYyzqCo2,
-    wnclDdclCo2,
-    wnclHyfjCh4Co2, wnclHyfjN2oCo2,
-    wnclWnfsCo2,
-    wnclBwqrsCh4Co2, wnclBwqrsN2oCo2,
-    wnclWnrjQtCh4Co2, wnclWnrjQtN2oCo2,
-    nyyjDlxhZhdlCo = 0,  wscljdyjxhCo = 0, gdsnyrlCo2 = 0, nyyjGrrlCo = 0
+    wnclYyzqCo2 = 0,
+    wnclDdclCo2 = 0,
+    wnclHyfjCh4Co2 = 0, wnclHyfjN2oCo2 = 0,
+    wnclWnfsCo2 = 0,
+    wnclBwqrsCh4Co2 = 0, wnclBwqrsN2oCo2 = 0,
+    wnclWnrjQtCh4Co2 = 0, wnclWnrjQtN2oCo2 = 0, wnclWnrjByhCo2 = 0,
+    nyyjDlxhZhdlCo2 = 0,  wscljdyjxhCo2 = 0, gdsnyrlCo2 = 0, nyyjGrrlCo2 = 0
   } = historyDetails.value;
 
   // 近7月碳排放趋势
@@ -116,22 +117,45 @@ const initEchart = () => {
 
   // echartEnergy.dispose();
   // 能源、药剂
-  echartEnergy.setOption(echart3DOptions([nyyjDlxhZhdlCo,  wscljdyjxhCo, gdsnyrlCo2, nyyjGrrlCo]));
+  echartEnergy.setOption(echart3DOptions([nyyjDlxhZhdlCo2,  wscljdyjxhCo2, gdsnyrlCo2, nyyjGrrlCo2]));
 
   // 污泥处理-生化反应
   echartMdu.setOption(echartColumnarOptions([
-    wnclYyzqCo2,
-    wnclDdclCo2,
-    wnclHyfjCh4Co2 + wnclHyfjN2oCo2,
-    wnclWnfsCo2,
-    wnclBwqrsCh4Co2 + wnclBwqrsN2oCo2,
-    wnclWnrjQtCh4Co2 + wnclWnrjQtN2oCo2
+    wnclYyzqCo2.toFixed(2),
+    wnclDdclCo2.toFixed(2),
+    (wnclHyfjCh4Co2 + wnclHyfjN2oCo2).toFixed(2),
+    (wnclWnfsCo2).toFixed(2),
+    (wnclBwqrsCh4Co2 + wnclBwqrsN2oCo2 + wnclWnrjByhCo2).toFixed(2),
+    (wnclWnrjQtCh4Co2 + wnclWnrjQtN2oCo2).toFixed(2)
   ]));
 
+  const baseEnum = {
+    "0": {
+      label: '外加碳源矿化产生的化石源CO₂碳排放量 - '
+    },
+    "1": {
+      label: '固定式能源燃料消耗产生的碳排放量 - '
+    },
+    "2": {
+      label: '药剂消耗碳排 - '
+    },
+    "3": {
+      label: '热泵技术-替碳量 - '
+    },
+    "4": {
+      label: '污泥厌氧消化沼气利用的替碳量 - ',
+    },
+    "5": {
+      label: '污泥焚烧或热解热能利用的替碳量 - ',
+    }
+  }
+
   const scrollList = Object.entries(extraMap).map(([k, v], i) => {
+    const item = baseEnum[k] || {};
     return v.map((child, index) => {
+      const label = item.isFinal ? item.label : (item.label || '') + child.dictLabel;
       return {
-        label: child.dictLabel,
+        label,
         key: index + i,
         value: child.val
       }
@@ -149,6 +173,8 @@ const initEchart = () => {
     return temp;
   }).filter(({ value }) => value);
 
+  console.log("scrollData", scrollData.value);
+
 }
 
 const initPageData = async () => {