Răsfoiți Sursa

feat: 碳排放讨论后的修改

sunxiao 2 luni în urmă
părinte
comite
a94e7455d7

+ 1 - 0
components.d.ts

@@ -25,6 +25,7 @@ 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']

+ 5 - 0
src/api/carbon.js

@@ -25,5 +25,10 @@ export const carbonApi = {
    * 列表数据
    */
   getTableList: params => http.get(`/front/bigModel/carbonSmart/pageList`, { params }),
+
+  /**
+   * 依据月份,获取基础数据
+   */
+  getBaseData: params => http.get(`/front/bigModel/carbonSmart/getDBDatas/${params}`),
 }
 

+ 20 - 3
src/components/BaseNumberInput/index.vue

@@ -1,6 +1,7 @@
 <script setup>
 import { NInputNumber } from 'naive-ui';
-defineProps({
+
+const props = defineProps({
   unit: {
     type: String,
     default: ''
@@ -12,9 +13,19 @@ defineProps({
   status: {
     type: String,
     default: ''
+  },
+  name: {
+    type: String,
+    default: ''
+  },
+  disabled: {
+    type: Boolean,
+    default: false
   }
 });
 
+const emit = defineEmits(['on-input']);
+
 const modelValue = defineModel('value');
 
 const inputThemeOverrides = {
@@ -29,11 +40,17 @@ const inputThemeOverrides = {
     }
   }
 }
+
+const emitInpVal = (value) => {
+  emit('on-input', { value, name: props.name });
+  modelValue.value = value;
+};
+
 </script>
 
 <template>
-  <NInputNumber :placeholder="placeholder" :show-button="false" v-model:value="modelValue"
-    :theme-overrides="inputThemeOverrides" class="custom-input-number" :min="-90000000" :max="90000000">
+  <NInputNumber :placeholder="placeholder" :show-button="false" :disabled="disabled" v-model:value="modelValue"
+    :theme-overrides="inputThemeOverrides" class="custom-input-number" :min="-90000000" :max="90000000" :on-update:value="emitInpVal">
     <template #suffix>
       <div class="unit" v-if="unit">{{ unit }}</div>
     </template>

+ 5 - 5
src/composables/useTable.js

@@ -11,24 +11,24 @@ export const useTable = () => {
         data: [
             { type: 'select', value: '', key: 'wnclBwqrsRslx' },
             { type: 'input', value: null, unit: 't干污泥/月', key: 'wnclBwqrsFsl' },
-            { type: 'input', value: null, unit: 'tkg N₂O/t 干污泥', key: 'wnclBwqrsPfyz' }
+            { type: 'input', value: null, unit: 'tkg N₂O/t 干污泥', key: 'wnclBwqrsPfyz', tips: '若无实测,填写0.99' }
         ]
       }
     ],
     mudSecond: [
       {
-        columns: ['反应堆类型', '污泥热解消耗量', '污泥热解过程N₂O的排放因子'],
+        columns: ['反应堆类型', '污泥热解消耗量'],
         data: [
             { type: 'select', value: '', key: 'wnclWnrjQtLx' },
             { type: 'input', value: null, unit: 't干污泥/月',  key: 'wnclWnrjQtXhl' },
-            { type: 'input', value: null, unit: 'tkg N₂O/t 干污泥', key: 'wnclWnrjQtPfyz' }
+            // { type: 'input', value: null, unit: 'tkg N₂O/t 干污泥', key: 'wnclWnrjQtPfyz' }
         ]
       }
     ],
     carbonFirst: [],
     carbonSecond: [
       {
-        columns: ['水厂规模', '回用水供应量'],
+        columns: ['替代的供水厂规模', '回用水供应量'],
         data: [
             { type: 'select', value: '', key: 'thZssScgm' },
             { type: 'input', value: null, unit: 'm³/月', key: '', key: 'thZssGyl' },
@@ -40,7 +40,7 @@ export const useTable = () => {
   });
 
   const addTable = (key, option) => {
-    tableData.value[key].push(option);
+    tableData.value[key].unshift(option);
   }
 
   const removeTable = ({ name: key, index }) => {

+ 20 - 0
src/views/carbon/components/BaseCard.vue

@@ -1,4 +1,5 @@
 <script setup>
+import { NTooltip } from 'naive-ui';
 defineProps({
   title: {
     type: String,
@@ -11,6 +12,10 @@ defineProps({
   bgColorType: {
     type: String,
     default: 'default'
+  },
+  tips: {
+    type: String,
+    default: ''
   }
 })
 </script>
@@ -20,6 +25,19 @@ defineProps({
     <div class="header" v-if="title">
       <h4 class="title">{{ title }}</h4>
       <span class="subtitle">{{ subTitle }}</span>
+      <p class="w-[14px] h-[14px] ml-[4px]" v-if="tips">
+        <NTooltip>
+          <template #trigger>
+            <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
+              <path fill="none" d="M240 304h32l6-160h-44l6 160z"></path>
+              <path
+                d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm20 319.91h-40v-40h40zM272 304h-32l-6-160h44z"
+                fill="currentColor"></path>
+            </svg>
+          </template>
+          <span>{{ tips }}</span>
+        </NTooltip>
+      </p>
     </div>
     <div class="content space-y-[14px]">
       <slot />
@@ -37,12 +55,14 @@ defineProps({
     @include flex(x, center, start);
     margin-bottom: 24px;
     line-height: 24px;
+
     .title {
       margin-right: 10px;
       font-size: 15px;
       font-weight: bold;
       color: #1A2029;
     }
+
     .subtitle {
       font-size: 14px;
       color: #B0B7C0;

+ 24 - 3
src/views/carbon/components/BasePanel.vue

@@ -1,5 +1,5 @@
 <script setup>
-import { NScrollbar } from 'naive-ui';
+import { NScrollbar, NTooltip } from 'naive-ui';
 
 defineProps({
   isXScroll: {
@@ -17,6 +17,14 @@ defineProps({
   required: {
     type: Boolean,
     default: false
+  },
+  trigger: {
+    type: String,
+    default: 'hover'
+  },
+  tips: {
+    type: String,
+    default: ''
   }
 })
 </script>
@@ -24,16 +32,29 @@ defineProps({
 <template>
   <div :class="['panel-item']" :style="{ paddingBottom: isNoPadding ? 0 : isXScroll ? '0' : '14px' }">
     <div class="sub-title_inner">
-      <h4 class="title">
+      <h4 class="title flex items-center">
         <span>{{ title }}</span>
         <span class="text-[#d03050] pl-[5px]" v-if="required">*</span>
+        <p class="w-[14px] h-[14px] ml-[4px]" v-if="tips">
+          <NTooltip>
+            <template #trigger>
+              <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
+                <path fill="none" d="M240 304h32l6-160h-44l6 160z"></path>
+                <path
+                  d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm20 319.91h-40v-40h40zM272 304h-32l-6-160h44z"
+                  fill="currentColor"></path>
+              </svg>
+            </template>
+            <span>{{ tips }}</span>
+          </NTooltip>
+        </p>
       </h4>
       <slot name="side" />
     </div>
 
     <div class="content">
       <template v-if="isXScroll">
-        <NScrollbar style="width: 100%;" x-scrollable>
+        <NScrollbar style="width: 100%;" x-scrollable :trigger="trigger">
           <div class="inner space-x-[24px]">
             <slot></slot>
           </div>

+ 39 - 20
src/views/carbon/components/BaseTable.vue

@@ -1,6 +1,5 @@
 <script setup>
-import { ref } from 'vue';
-import { NSelect, NInputNumber } from 'naive-ui';
+import { NSelect, NInputNumber, NTooltip } from 'naive-ui';
 
 const props = defineProps({
   data: {
@@ -57,17 +56,34 @@ const onRemove = (index) => {
 
 <template>
   <div class="table-wrapper">
-  
-    <div :class="[{ 'empty-box': data.isEmpty }, 'tip-box','flex', 'items-center', 'justify-center', ' py-[10px]', 'bg-[#fff]', 'text-[#B0B7C0]' ]" v-if="data.length == 0">
+
+    <div
+      :class="[{ 'empty-box': data.isEmpty }, 'tip-box', 'flex', 'items-center', 'justify-center', ' py-[10px]', 'bg-[#fff]', 'text-[#B0B7C0]']"
+      v-if="data.length == 0">
       <span>未添加</span>
     </div>
 
     <template v-if="data.length > 0">
       <div :class="['table-box', { 'table-avg-column': avgColumn }]" v-for="item, index in data" :key="index">
         <ul class="header">
-          <li :class="['th', { 'text-center': item.columns.length - 1 === index }]" :key="index" v-for="val, index in item.columns">
+          <li :class="['th', { 'text-center': item.columns.length - 1 === index }]" :key="index"
+            v-for="val, index in item.columns">
             <span>{{ val }}</span>
             <span class="text-[#d03050] ml-[5px]" v-show="index != item.columns.length - 1">*</span>
+            <p class="w-[14px] h-14px" v-if="item.data[index]?.tips">
+              <NTooltip>
+                <template #trigger>
+                  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
+                    viewBox="0 0 512 512">
+                    <path fill="none" d="M240 304h32l6-160h-44l6 160z"></path>
+                    <path
+                      d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm20 319.91h-40v-40h40zM272 304h-32l-6-160h44z"
+                      fill="currentColor"></path>
+                  </svg>
+                </template>
+                <span>{{ item.data[index].tips }}</span>
+              </NTooltip>
+            </p>
           </li>
         </ul>
         <div class="body">
@@ -76,11 +92,12 @@ const onRemove = (index) => {
               <template v-if="val.type === 'name'">
                 <span class="text-left pl-[12px] name">{{ val.value }}</span>
               </template>
-  
+
               <template v-if="val.type === 'select'">
-                <NSelect v-model:value="val.value" :options="options" :theme-overrides="selectThemeOverrides" :status="val.isEmpty ? 'error' : ''"/>
+                <NSelect v-model:value="val.value" :options="options" :theme-overrides="selectThemeOverrides"
+                  :status="val.isEmpty ? 'error' : ''" />
               </template>
-  
+
               <template v-if="val.type === 'input'">
                 <NInputNumber v-model:value="val.value" :show-button="false" class="w-full"
                   :theme-overrides="inputThemeOverrides" :status="val.isEmpty ? 'error' : ''">
@@ -89,16 +106,16 @@ const onRemove = (index) => {
                   </template>
                 </NInputNumber>
               </template>
-  
+
               <template v-if="val.type === 'text'">
-                <li class="td text-center cursor-pointer text-[#2454FF]" @click="onRemove(index)">删除</li>
-              </template>
-            </li>
-          </ul>
-        </div>
-      </div>
+            <li class="td text-center cursor-pointer text-[#2454FF]" @click="onRemove(index)">删除</li>
     </template>
+    </li>
+    </ul>
   </div>
+  </div>
+</template>
+</div>
 </template>
 
 <style lang="scss" scoped>
@@ -130,7 +147,7 @@ const onRemove = (index) => {
         padding: 0px 24px;
         font-size: 14px;
         overflow: hidden;
-        
+
         &:not(:last-child) {
           border-right: 1px solid #E6EAEE;
         }
@@ -143,9 +160,9 @@ const onRemove = (index) => {
 
         .name {
           display: inline-block;
-          overflow:hidden;
-          text-overflow:ellipsis;
-          white-space:nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
         }
       }
     }
@@ -156,7 +173,9 @@ const onRemove = (index) => {
   }
 
   .table-avg-column {
-    .header .th:last-child, .t-row_tr .td {
+
+    .header .th:last-child,
+    .t-row_tr .td {
       flex-shrink: 1 !important;
       width: 50% !important;
       justify-content: start;

+ 133 - 38
src/views/carbon/components/TheDrawerForm.vue

@@ -1,6 +1,6 @@
 <script setup>
 import { ref, unref, onMounted } from 'vue';
-import { NDrawer, NDrawerContent, NForm, NSelect, NFormItem, NDatePicker, useMessage, NScrollbar } from 'naive-ui';
+import { NDrawer, NDrawerContent, NForm, NSelect, NFormItem, NDatePicker, useMessage, NScrollbar, NTooltip } from 'naive-ui';
 import { SvgIcon, BaseNumberInput } from '@/components';
 import { BaseCard, BaseStep, BaseTable, BasePanel } from './index';
 import zhCn from 'element-plus/es/locale/lang/zh-cn'
@@ -29,6 +29,8 @@ const inpConfig = ref(inputConfig);
 
 const spliceInpData = ref([]);
 
+const today = dayjs();
+const firstDayOfMonth = today.startOf('month');
 const elementDatePicker = ref(null);
 
 const formValue = ref({});
@@ -37,6 +39,7 @@ const selectValue = ref({});
 
 const formRef = ref(null);
 const switchCo2State = ref(0);
+const disableEnthalpyValue = ref(false);
 const tabCo2Data = ['泵站和沉砂池逸散的CH₄量(实测)', '泵站和沉砂池逸散的CH₄量(未实测)']
 
 const rules = {
@@ -59,15 +62,19 @@ const rules = {
   wsTdN2oCsTn: [{ required: true, type: 'number' }],
 
   nyyjDlxhZhdl: [{ required: true, type: 'number' }],
-  nyyjDlxhJsbf: [{ validator: (_, val) => ((formValue.value.nyyjDlxhZhdl && !val) ? new Error() : true) }],
-  nyyjDlxhGfjf: [{ validator: (_, val) => ((formValue.value.nyyjDlxhZhdl && !val) ? new Error() : true) }],
-  nyyjDlxhTsjf: [{ validator: (_, val) => ((formValue.value.nyyjDlxhZhdl && !val) ? new Error() : true) }],
-  nyyjDlxhXdj: [{ validator: (_, val) => ((formValue.value.nyyjDlxhZhdl && !val) ? new Error() : true) }],
-  nyyjDlxhSdcl: [{ validator: (_, val) => ((formValue.value.nyyjDlxhZhdl && !val) ? new Error() : true) }],
-  nyyjDlxhWncz: [{ validator: (_, val) => ((formValue.value.nyyjDlxhZhdl && !val) ? new Error() : true) }],
-  nyyjDlxhShq: [{ validator: (_, val) => ((formValue.value.nyyjDlxhZhdl && !val) ? new Error() : true) }],
-  nyyjDlxhQt: [{ validator: (_, val) => ((formValue.value.nyyjDlxhZhdl && !val) ? new Error() : true) }],
-
+  nyyjGrrlZq: [
+    { required: true, type: 'number' }
+  ],
+  nyyjGrrlDyhz: [
+    { validator: (_, val) => {
+      if ( formValue.value.nyyjGrrlZq === 0 ) {
+        return true;
+      }
+      if (!val && val != 0) {
+        return new Error() 
+      }
+    }}
+  ],
   wnclYyzqZqcl: [{ validator: (_, val) => (formValue.value.wnclYyzqChZlfs && !val ? new Error() : true) }],
   wnclYyzqChZlfs: [{ validator: (_, val) => (formValue.value.wnclYyzqZqcl && !val ? new Error() : true) }],
 
@@ -110,6 +117,22 @@ const rules = {
 
 }
 
+const handleDatePicker = async (month) => {
+  const { data } = await carbonApi.getBaseData(dayjs(month).format('YYYY-MM'));
+
+  const { jsl, jsCod, csCod, jsTn, csTn } = data;
+  formValue.value.wsHsytkhClsl = jsl;
+  formValue.value.wsHsytkhJsCod = jsCod;
+  formValue.value.wsHsytkhCsCod = csCod;
+  formValue.value.wsSjclCh4Clsl = jsl;
+  formValue.value.wsSjclCh4JsCod = jsCod;
+  formValue.value.wsSjclCh4CsCod = csCod;
+
+  formValue.value.wsTdN2oClsl = jsl;
+  formValue.value.wsTdN2oJsTn = jsTn;
+  formValue.value.wsTdN2oCsTn = csTn;
+}
+
 const switchTabs = (index) => {
   switchCo2State.value = index;
   if (index == 1) {
@@ -172,10 +195,10 @@ const handleAddTableRow = (key) => {
     const isExists = ids.includes(codeSet.dictCode);
 
     option = {
-      columns: ['燃料名称', '燃料消耗量', '操作'],
+      columns: ['替代的燃料名称', '燃料消耗量', '操作'],
       data: [
         { type: 'name', value: codeSet.dictLabel },
-        { type: 'input', value: null, unit: isExists ? 'm³/月' : 't/月' },
+        { type: 'input', value: null, unit: isExists ? 'm³/月' : 't/月' },
         { type: 'text' }
       ],
       codeSet,
@@ -224,10 +247,10 @@ const handleAddTableRow = (key) => {
     });
 
     option = {
-      columns: ['燃料名称', '热泵供热、供冷量', '操作'],
+      columns: ['替代的燃料名称', '热泵供热、供冷量', '操作'],
       data: [
         { type: 'name', value: codeSet.dictLabel },
-        { type: 'input', value: null, unit: 'Kg/月' },
+        { type: 'input', value: null, unit: 'KJ/月' },
         { type: 'text' }
       ],
       codeSet,
@@ -248,7 +271,7 @@ const handleAddTableRow = (key) => {
     });
 
     option = {
-      columns: ['燃料名称', '污泥厌氧消化沼气发电量', '厌氧消化沼气富余热能用量', '沼气提纯并网的天然气量', '操作'],
+      columns: ['替代的燃料名称', '污泥厌氧消化沼气发电量', '厌氧消化沼气富余热能用量', '沼气提纯并网的天然气量', '操作'],
       data: [
         { type: 'name', value: codeSet.dictLabel },
         { type: 'input', value: null, unit: 'kW·h/月' },
@@ -274,12 +297,13 @@ const handleAddTableRow = (key) => {
     });
 
     option = {
-      columns: ['燃料名称', '污泥焚烧或热解电力利用量', '污泥焚烧或热解热能利用量', '沼气提纯并网的天然气量', '操作'],
+      // 沼气提纯并网的天然气量
+      columns: ['替代的燃料名称', '污泥焚烧或热解电力利用量', '污泥焚烧或热解热能利用量', '操作'],
       data: [
         { type: 'name', value: codeSet.dictLabel },
         { type: 'input', value: null, unit: 'kW·h/月' },
-        { type: 'input', value: null, unit: 't/d' },
-        { type: 'input', value: null, unit: 'mKJ/Kg' },
+        { type: 'input', value: null, unit: 'GJ/月' },
+        // { type: 'input', value: null, unit: 'mKJ/Kg' },
         { type: 'text' }
       ],
       codeSet,
@@ -418,24 +442,24 @@ const onReset = () => {
         data: [
           { type: 'select', value: '', key: 'wnclBwqrsRslx' },
           { type: 'input', value: null, unit: 't干污泥/月', key: 'wnclBwqrsFsl' },
-          { type: 'input', value: null, unit: 'tkg N₂O/t 干污泥', key: 'wnclBwqrsPfyz' }
+          { type: 'input', value: null, unit: 'tkg N₂O/t 干污泥', key: 'wnclBwqrsPfyz', tips: '若无实测,填写0.99' }
         ]
       }
     ],
     mudSecond: [
       {
-        columns: ['反应堆类型', '污泥热解消耗量', '污泥热解过程N₂O的排放因子'],
+        columns: ['反应堆类型', '污泥热解消耗量'],
         data: [
           { type: 'select', value: '', key: 'wnclWnrjQtLx' },
           { type: 'input', value: null, unit: 't干污泥/月', key: 'wnclWnrjQtXhl' },
-          { type: 'input', value: null, unit: 'tkg N₂O/t 干污泥', key: 'wnclWnrjQtPfyz' }
+          // { type: 'input', value: null, unit: 'tkg N₂O/t 干污泥', key: 'wnclWnrjQtPfyz' }
         ]
       }
     ],
     carbonFirst: [],
     carbonSecond: [
       {
-        columns: ['水厂规模', '回用水供应量'],
+        columns: ['替代的供水厂规模', '回用水供应量'],
         data: [
           { type: 'select', value: '', key: 'thZssScgm' },
           { type: 'input', value: null, unit: 'm³/月', key: '', key: 'thZssGyl' },
@@ -456,10 +480,14 @@ const onSubmit = (e) => {
         return message.error("提交失败, 请检查");
       }
       const params = formatData();
-      await carbonApi.postCarbonSmart(params);
-      onReset();
-      emit('on-submit');
-      message.success("提交成功");
+      try {
+        await carbonApi.postCarbonSmart(params);
+        onReset();
+        emit('on-submit');
+        message.success("提交成功");
+      } catch (e) {
+        message.error(e.msg, { duration: 3500 });
+      }
     } else {
       message.error("提交失败, 请检查");
     }
@@ -497,22 +525,35 @@ const getAllCodeSet = async () => {
     ],
     scgmOptions: [
       { label: '选择', value: "" },
-      { label: '小型', value: 0 },
-      { label: '中型', value: 1 },
-      { label: '大型', value: 2 }
+      { label: '< 5万,为小型', value: 0 },
+      { label: '5万 ~ 10万,为中型', value: 1 },
+      { label: '>10万,为大型', value: 2 }
     ]
   }
 
 }
 
 const disabledDate = (t) => {
-  return props.allMonth?.includes(dayjs(t).format('YYYY-MM'))
+  console.log( );
+
+  return props.allMonth?.includes(dayjs(t).format('YYYY-MM')) || !dayjs(t).isBefore(firstDayOfMonth)
 }
 
 const handleInpFocus = () => {
   elementDatePicker.value.focus();
 }
 
+const onInput = ({ value, name }) => {
+  if ( name === 'nyyjGrrlZq' ) {
+    if ( value === 0 ) {
+      formValue.value.nyyjGrrlDyhz = null;
+      disableEnthalpyValue.value = true;
+    } else {
+      disableEnthalpyValue.value = false;
+    }
+  }
+}
+
 onMounted(async () => {
   getAllCodeSet();
 })
@@ -549,7 +590,7 @@ onMounted(async () => {
                   <el-config-provider :locale="zhCn">
                     <el-date-picker class="custom-date-picker" v-model="formValue.addYearMonth" type="month"
                       placeholder="请选择" :teleported="false" ref="elementDatePicker" style="position: absolute;"
-                      :disabledDate="disabledDate" />
+                      :disabledDate="disabledDate" @change="handleDatePicker"/>
                   </el-config-provider>
                 </NFormItem>
               </div>
@@ -579,7 +620,7 @@ onMounted(async () => {
                   @on-remove="(name, index) => removeTable(name, index)"></BaseTable>
               </BasePanel>
 
-              <BasePanel isXScroll required title="污水收集提升和处理阶段排放的CH₄的CO₂当量">
+              <BasePanel isXScroll trigger="none" required title="污水收集提升和处理阶段排放的CH₄的CO₂当量">
                 <template #side>
                   <ul class="tabs space-x-[12px]">
                     <li v-for="item, index in tabCo2Data"
@@ -589,6 +630,19 @@ onMounted(async () => {
                 </template>
                 <NFormItem label-placement="top" :label="item.label" :path="item.key"
                   v-for="item, index in inpConfig.sewage.twoBlock" :key="index">
+                  <template #label>
+                    <div class="flex items-center space-x-[2px]">
+                      <span>{{ item.label }}</span>
+                      <span class="w-[14px] h-[14px]"  v-if="item.key === 'wsSjclCh4Pfyz'">
+                        <NTooltip>
+                          <template #trigger>
+                            <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><path fill="none" d="M240 304h32l6-160h-44l6 160z"></path><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm20 319.91h-40v-40h40zM272 304h-32l-6-160h44z" fill="currentColor"></path></svg>
+                          </template>
+                          <span>若未实测,请填写0.0075</span>
+                        </NTooltip>
+                      </span>
+                    </div>
+                  </template>
                   <BaseNumberInput :unit="item.unit" v-model:value="formValue[item.key]"></BaseNumberInput>
                 </NFormItem>
               </BasePanel>
@@ -596,23 +650,51 @@ onMounted(async () => {
               <BasePanel isXScroll required title="污水生物处理脱氮过程排放的N₂O的CO₂当量">
                 <NFormItem label-placement="top" :path="item.key" :label="item.label"
                   v-for="item, index in inpConfig.sewage.threeBlock" :key="index">
+                  <template #label>
+                    <div class="flex items-center space-x-[2px]">
+                      <span>{{ item.label }}</span>
+                      <span class="w-[14px] h-[14px]"  v-if="item.key === 'wsTdN2oPfyz'">
+                        <NTooltip>
+                          <template #trigger>
+                            <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><path fill="none" d="M240 304h32l6-160h-44l6 160z"></path><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm20 319.91h-40v-40h40zM272 304h-32l-6-160h44z" fill="currentColor"></path></svg>
+                          </template>
+                          <span>若未实测,请填写0.01</span>
+                        </NTooltip>
+                      </span>
+                    </div>
+                  </template>
                   <BaseNumberInput :unit="item.unit" v-model:value="formValue[item.key]"></BaseNumberInput>
                 </NFormItem>
               </BasePanel>
             </BaseCard>
 
             <BaseCard title="能源、药剂碳排" sub-title="能源、药剂碳排">
-              <BasePanel isXScroll required title="污水厂电力消耗产生的碳排放量">
+              <BasePanel isXScroll required title="污水厂电力消耗产生的碳排放量" tips="*为必填项,若有各分项电量,请填写,若无,可不填">
                 <NFormItem label-placement="top" :path="item.key" :label="item.label"
                   v-for="item, index in inpConfig.energy.oneBlock" :key="index">
+                  <template #label>
+                    <div class="flex items-center space-x-[2px]">
+                      <span>{{ item.label }}</span>
+                      <span class="w-[14px] h-[14px]"  v-if="item.key === 'nyyjDlxhQt'">
+                        <NTooltip>
+                          <template #trigger>
+                            <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><path fill="none" d="M240 304h32l6-160h-44l6 160z"></path><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm20 319.91h-40v-40h40zM272 304h-32l-6-160h44z" fill="currentColor"></path></svg>
+                          </template>
+                          <span>其他耗电量=总耗电量-各分项电量,若分项填写不全,则不填</span>
+                        </NTooltip>
+                      </span>
+                    </div>
+                  </template>
                   <BaseNumberInput :unit="item.unit" v-model:value="formValue[item.key]"></BaseNumberInput>
                 </NFormItem>
               </BasePanel>
 
               <BasePanel isXScroll required title="净购入热力消耗产生的碳排放量">
-                <NFormItem label-placement="top" :path="item.key" :label="item.label"
-                  v-for="item, index in inpConfig.energy.twoBlock" :key="index" :rule="BASE_RULES">
-                  <BaseNumberInput :unit="item.unit" v-model:value="formValue[item.key]"></BaseNumberInput>
+                <NFormItem label-placement="top" path="nyyjGrrlZq" label="蒸汽">
+                  <BaseNumberInput unit="t/月" v-model:value="formValue.nyyjGrrlZq" @on-input="onInput" name="nyyjGrrlZq"></BaseNumberInput>
+                </NFormItem>
+                <NFormItem label-placement="top" path="nyyjGrrlDyhz" label="对应焓值" required="">
+                  <BaseNumberInput unit="KJ/Kg" v-model:value="formValue.nyyjGrrlDyhz" name="nyyjGrrlDyhz" :disabled="disableEnthalpyValue"></BaseNumberInput>
                 </NFormItem>
               </BasePanel>
 
@@ -649,7 +731,7 @@ onMounted(async () => {
 
             </BaseCard>
 
-            <BaseCard title="污泥处理" sub-title="生化反应总碳排">
+            <BaseCard title="污泥处理" sub-title="生化反应总碳排" tips="污泥处理生化反应总碳排模块中,企业涉及的过程对应填写相应数据,不涉及的不填写">
               <BasePanel isXScroll title="污泥厌氧消化沼气收集管路无意泄露的CH₄或沼气火炬燃烧不充分导致的碳排放">
                 <NFormItem label-placement="top" :path="item.key" :label="item.label"
                   v-for="item, index in inpConfig.sludge.oneBlock" :key="index" required>
@@ -660,6 +742,19 @@ onMounted(async () => {
               <BasePanel isXScroll title="单独处理污泥厌氧消化过程产生的碳排放量">
                 <NFormItem label-placement="top" :path="item.key" :label="item.label"
                   v-for="item, index in inpConfig.sludge.twoBlock" :key="index">
+                  <template #label>
+                    <div class="flex items-center space-x-[2px]">
+                      <span>{{ item.label }}</span>
+                      <span class="w-[14px] h-[14px]"  v-if="item.key === 'wnclDdclPfyz'">
+                        <NTooltip>
+                          <template #trigger>
+                            <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><path fill="none" d="M240 304h32l6-160h-44l6 160z"></path><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm20 319.91h-40v-40h40zM272 304h-32l-6-160h44z" fill="currentColor"></path></svg>
+                          </template>
+                          <span>若未实测,请填写0.01</span>
+                        </NTooltip>
+                      </span>
+                    </div>
+                  </template>
                   <BaseNumberInput :unit="item.unit" v-model:value="formValue[item.key]"></BaseNumberInput>
                 </NFormItem>
               </BasePanel>
@@ -697,7 +792,7 @@ onMounted(async () => {
               </BasePanel>
             </BaseCard>
 
-            <BaseCard title="替碳、碳汇" sub-title="替碳、碳汇基础信息填写">
+            <BaseCard title="替碳、碳汇" sub-title="替碳、碳汇基础信息填写" tips="替碳、碳汇模块中,企业涉及的过程对应填写相应数据,不涉及的不填写">
               <BasePanel title="热泵技术-替碳量">
                 <template #side>
                   <div class="flex items-center space-x-[14px]">

+ 4 - 4
src/views/carbon/components/config.js

@@ -17,7 +17,7 @@ export const inputConfig = {
       { label: '月处理水量', unit: 'm³/月', key: 'wsTdN2oClsl' },
       { label: '进水TN', unit: 'mg/L', key: 'wsTdN2oJsTn' },
       { label: '出水TN', unit: 'mg/L', key: 'wsTdN2oCsTn' },
-      { label: '污水处理阶段N₂O的排放因子', unit: 'kg CH₄/kg COD', key: 'wsTdN2oPfyz' },
+      { label: '污水处理阶段N₂O的排放因子', unit: 'kg N₂O-N/kg N', key: 'wsTdN2oPfyz' },
     ]
   },
   energy: {
@@ -41,7 +41,7 @@ export const inputConfig = {
   sludge: {
     oneBlock: [
       { label: '沼气产量', unit: 'm³/月', key: 'wnclYyzqZqcl' },
-      { label: '沼气中CH的质量分数 ', unit: '%', key: 'wnclYyzqChZlfs' },
+      { label: '沼气中CH的质量分数 ', unit: '%', key: 'wnclYyzqChZlfs' },
     ],
     twoBlock: [
       { label: '沼液处理量', unit: 'm³/月', key: 'wnclDdclZycll' },
@@ -63,10 +63,10 @@ export const inputConfig = {
   },
   carbon: {
     oneBlock: [
-      { label: '总耗电量 ', unit: 'kW·h/月', key: 'thGfZhdl' }
+      { label: '光伏发电量 ', unit: 'kW·h/月', key: 'thGfZhdl' }
     ],
     twoBlock: [
-      { label: '回收作为肥料的污泥量', unit: 'kg 干污泥/d', key: 'thWnClhFlwnl' }
+      { label: '回收作为肥料的污泥量', unit: 'kg 干污泥/', key: 'thWnClhFlwnl' }
     ]
   }
 }

+ 0 - 15
src/views/carbon/components/screen/DataScroll.vue

@@ -1,6 +1,5 @@
 <script setup>
 import { ref, watch } from 'vue';
-import { vue3ScrollSeamless } from 'vue3-scroll-seamless';
 
 import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
 
@@ -44,19 +43,6 @@ watch(() => props.data, (newVal) => {
             <li>{{ item.value }}</li>
           </ul>
         </vue3SeamlessScroll>
-
-        <!-- <vue3ScrollSeamless
-          :dataList="data"
-          :data="data"
-          :classOptions="{singleHeight: 40, waitTime: 3000, limitMoveNum: 10}"
-          ref="seamlessScroll"
-          class="scroll"
-          >
-          <ul class="item" v-for="(item, index) in data" :key="index">
-            <li>{{ item.label }}(t CO₂-eq/月)</li>
-            <li>{{ item.value }}</li>
-          </ul>
-        </vue3ScrollSeamless> -->
       </div>
     </div>
   </LayoutCard>
@@ -92,7 +78,6 @@ watch(() => props.data, (newVal) => {
   .main {
     width: 100%;
     height: calc(100% - 40px);
-    // height: 240px;
     overflow: hidden;
 
     .scroll {

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

@@ -703,7 +703,7 @@ export const echart3DOptions = (data = []) => {
     },
     grid3D: {
       show: false,
-      boxHeight: boxHeight,
+      boxHeight: 3.5,
       top: "-6%",
       left: "-22%",
       width: "100%",

+ 4 - 4
src/views/carbon/index.vue

@@ -302,17 +302,17 @@ $text-color_primary: #C2D8EF;
   background-size: cover;
 
   .calendar {
-    width: 86px;
-    height: 22px;
+    width: 90px;
+    height: 30px;
     padding-left: 8px;
     margin-right: 54px;
     background: url("@/assets/images/carbon/bg-calendar.png") no-repeat,
       url("@/assets/images/carbon/bg-calendar-direction.png") 62px center no-repeat;
     background-size: 100% 100%, 10px 10px;
-    font-size: 12px;
+    font-size: 14px;
     color: #fff;
     text-shadow: 0px 1px 0px rgba(0, 22, 35, 0.75);
-    line-height: 22px;
+    line-height: 30px;
     font-family: D-DIN-PRO-700-Bold;
     cursor: pointer;