Prechádzať zdrojové kódy

feat: 碳排放智能体

sunxiao 2 týždňov pred
rodič
commit
f6c3d7a264

+ 383 - 2
package-lock.json

@@ -13,6 +13,7 @@
         "axios": "^1.6.8",
         "echarts": "^5.5.0",
         "echarts-gl": "^2.0.9",
+        "element-plus": "^2.8.1",
         "highlight.js": "^11.9.0",
         "katex": "^0.16.10",
         "load-awesome": "^1.1.0",
@@ -47,6 +48,8 @@
         "ssh2-sftp-client": "^10.0.3",
         "tailwindcss": "^3.4.4",
         "typescript": "~5.4.0",
+        "unplugin-auto-import": "^0.18.2",
+        "unplugin-vue-components": "^0.27.4",
         "vite": "^5.2.8",
         "vite-plugin-vue-devtools": "^7.0.25",
         "vue-tsc": "^2.0.11"
@@ -706,6 +709,14 @@
         "vue": "^3.0.11"
       }
     },
+    "node_modules/@ctrl/tinycolor": {
+      "version": "3.6.1",
+      "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
+      "integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==",
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/@digitalacorn/vite-plugin-svg-icons": {
       "version": "3.0.0-pre.1",
       "resolved": "https://registry.npmmirror.com/@digitalacorn/vite-plugin-svg-icons/-/vite-plugin-svg-icons-3.0.0-pre.1.tgz",
@@ -725,6 +736,14 @@
         "vite": ">=2.9.16"
       }
     },
+    "node_modules/@element-plus/icons-vue": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz",
+      "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==",
+      "peerDependencies": {
+        "vue": "^3.2.0"
+      }
+    },
     "node_modules/@emotion/hash": {
       "version": "0.8.0",
       "resolved": "https://registry.npmmirror.com/@emotion/hash/-/hash-0.8.0.tgz",
@@ -1098,6 +1117,28 @@
         "node": ">=12"
       }
     },
+    "node_modules/@floating-ui/core": {
+      "version": "1.6.7",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.6.7.tgz",
+      "integrity": "sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g==",
+      "dependencies": {
+        "@floating-ui/utils": "^0.2.7"
+      }
+    },
+    "node_modules/@floating-ui/dom": {
+      "version": "1.6.10",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.6.10.tgz",
+      "integrity": "sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A==",
+      "dependencies": {
+        "@floating-ui/core": "^1.6.0",
+        "@floating-ui/utils": "^0.2.7"
+      }
+    },
+    "node_modules/@floating-ui/utils": {
+      "version": "0.2.7",
+      "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.7.tgz",
+      "integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA=="
+    },
     "node_modules/@isaacs/cliui": {
       "version": "8.0.2",
       "resolved": "https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz",
@@ -1245,6 +1286,12 @@
       "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==",
       "dev": true
     },
+    "node_modules/@popperjs/core": {
+      "name": "@sxzz/popperjs-es",
+      "version": "2.11.7",
+      "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
+      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
+    },
     "node_modules/@rollup/pluginutils": {
       "version": "5.1.0",
       "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.1.0.tgz",
@@ -1871,6 +1918,18 @@
         "url": "https://github.com/sponsors/antfu"
       }
     },
+    "node_modules/acorn": {
+      "version": "8.12.1",
+      "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.12.1.tgz",
+      "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
+      "dev": true,
+      "bin": {
+        "acorn": "bin/acorn"
+      },
+      "engines": {
+        "node": ">=0.4.0"
+      }
+    },
     "node_modules/ansi-regex": {
       "version": "2.1.1",
       "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -2537,6 +2596,12 @@
         "typedarray": "^0.0.6"
       }
     },
+    "node_modules/confbox": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.1.7.tgz",
+      "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==",
+      "dev": true
+    },
     "node_modules/convert-source-map": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz",
@@ -2828,8 +2893,7 @@
     "node_modules/dayjs": {
       "version": "1.11.11",
       "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz",
-      "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==",
-      "dev": true
+      "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
     },
     "node_modules/de-indent": {
       "version": "1.0.2",
@@ -3076,6 +3140,69 @@
       "integrity": "sha512-rkg5/N3L+Y844JyfgPUyuKK0Hk0efo3JNxUDKvz3HgP6EmN4rNGhr2D8boLsfTV/hGo7ZGAL8djw+jlg99zQyA==",
       "dev": true
     },
+    "node_modules/element-plus": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.8.1.tgz",
+      "integrity": "sha512-p11/6w/O0+hGvPhiN3jrcgh+XG+eg5jZlLdQVYvcPHZYhhCh3J3YeZWW1JO/REPES1vevkboT6VAi+9wHA8Dsg==",
+      "dependencies": {
+        "@ctrl/tinycolor": "^3.4.1",
+        "@element-plus/icons-vue": "^2.3.1",
+        "@floating-ui/dom": "^1.0.1",
+        "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
+        "@types/lodash": "^4.14.182",
+        "@types/lodash-es": "^4.17.6",
+        "@vueuse/core": "^9.1.0",
+        "async-validator": "^4.2.5",
+        "dayjs": "^1.11.3",
+        "escape-html": "^1.0.3",
+        "lodash": "^4.17.21",
+        "lodash-es": "^4.17.21",
+        "lodash-unified": "^1.0.2",
+        "memoize-one": "^6.0.0",
+        "normalize-wheel-es": "^1.2.0"
+      },
+      "peerDependencies": {
+        "vue": "^3.2.0"
+      }
+    },
+    "node_modules/element-plus/node_modules/@types/web-bluetooth": {
+      "version": "0.0.16",
+      "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
+      "integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
+    },
+    "node_modules/element-plus/node_modules/@vueuse/core": {
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz",
+      "integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
+      "dependencies": {
+        "@types/web-bluetooth": "^0.0.16",
+        "@vueuse/metadata": "9.13.0",
+        "@vueuse/shared": "9.13.0",
+        "vue-demi": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      }
+    },
+    "node_modules/element-plus/node_modules/@vueuse/metadata": {
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz",
+      "integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==",
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      }
+    },
+    "node_modules/element-plus/node_modules/@vueuse/shared": {
+      "version": "9.13.0",
+      "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz",
+      "integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
+      "dependencies": {
+        "vue-demi": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      }
+    },
     "node_modules/emoji-regex": {
       "version": "9.2.2",
       "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz",
@@ -3285,6 +3412,11 @@
         "node": ">=6"
       }
     },
+    "node_modules/escape-html": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
+      "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
+    },
     "node_modules/escape-string-regexp": {
       "version": "1.0.5",
       "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@@ -4688,6 +4820,22 @@
         "node": ">=4.0.0"
       }
     },
+    "node_modules/local-pkg": {
+      "version": "0.5.0",
+      "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-0.5.0.tgz",
+      "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==",
+      "dev": true,
+      "dependencies": {
+        "mlly": "^1.4.2",
+        "pkg-types": "^1.0.3"
+      },
+      "engines": {
+        "node": ">=14"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      }
+    },
     "node_modules/lodash": {
       "version": "4.17.21",
       "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
@@ -4698,6 +4846,16 @@
       "resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
       "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
     },
+    "node_modules/lodash-unified": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmmirror.com/lodash-unified/-/lodash-unified-1.0.3.tgz",
+      "integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==",
+      "peerDependencies": {
+        "@types/lodash-es": "*",
+        "lodash": "*",
+        "lodash-es": "*"
+      }
+    },
     "node_modules/log-symbols": {
       "version": "6.0.0",
       "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-6.0.0.tgz",
@@ -4809,6 +4967,11 @@
       "resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-2.0.0.tgz",
       "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w=="
     },
+    "node_modules/memoize-one": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
+      "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
+    },
     "node_modules/memorystream": {
       "version": "0.3.1",
       "resolved": "https://registry.npmmirror.com/memorystream/-/memorystream-0.3.1.tgz",
@@ -5037,6 +5200,24 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/mlly": {
+      "version": "1.7.1",
+      "resolved": "https://registry.npmmirror.com/mlly/-/mlly-1.7.1.tgz",
+      "integrity": "sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==",
+      "dev": true,
+      "dependencies": {
+        "acorn": "^8.11.3",
+        "pathe": "^1.1.2",
+        "pkg-types": "^1.1.1",
+        "ufo": "^1.5.3"
+      }
+    },
+    "node_modules/mlly/node_modules/pathe": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmmirror.com/pathe/-/pathe-1.1.2.tgz",
+      "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
+      "dev": true
+    },
     "node_modules/mrmime": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-2.0.0.tgz",
@@ -5232,6 +5413,11 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/normalize-wheel-es": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
+      "integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw=="
+    },
     "node_modules/npm-normalize-package-bin": {
       "version": "3.0.1",
       "resolved": "https://registry.npmmirror.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz",
@@ -5703,6 +5889,23 @@
         "node": ">= 6"
       }
     },
+    "node_modules/pkg-types": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmmirror.com/pkg-types/-/pkg-types-1.2.0.tgz",
+      "integrity": "sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==",
+      "dev": true,
+      "dependencies": {
+        "confbox": "^0.1.7",
+        "mlly": "^1.7.1",
+        "pathe": "^1.1.2"
+      }
+    },
+    "node_modules/pkg-types/node_modules/pathe": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmmirror.com/pathe/-/pathe-1.1.2.tgz",
+      "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
+      "dev": true
+    },
     "node_modules/posix-character-classes": {
       "version": "0.1.1",
       "resolved": "https://registry.npmmirror.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
@@ -6445,6 +6648,12 @@
         }
       }
     },
+    "node_modules/scule": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
+      "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==",
+      "dev": true
+    },
     "node_modules/seemly": {
       "version": "0.3.8",
       "resolved": "https://registry.npmmirror.com/seemly/-/seemly-0.3.8.tgz",
@@ -7081,6 +7290,24 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/strip-literal": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmmirror.com/strip-literal/-/strip-literal-2.1.0.tgz",
+      "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==",
+      "dev": true,
+      "dependencies": {
+        "js-tokens": "^9.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      }
+    },
+    "node_modules/strip-literal/node_modules/js-tokens": {
+      "version": "9.0.0",
+      "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-9.0.0.tgz",
+      "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==",
+      "dev": true
+    },
     "node_modules/sucrase": {
       "version": "3.35.0",
       "resolved": "https://registry.npmmirror.com/sucrase/-/sucrase-3.35.0.tgz",
@@ -7590,6 +7817,12 @@
       "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz",
       "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A=="
     },
+    "node_modules/ufo": {
+      "version": "1.5.4",
+      "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.5.4.tgz",
+      "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==",
+      "dev": true
+    },
     "node_modules/unbox-primitive": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
@@ -7611,6 +7844,54 @@
       "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
       "dev": true
     },
+    "node_modules/unimport": {
+      "version": "3.11.1",
+      "resolved": "https://registry.npmmirror.com/unimport/-/unimport-3.11.1.tgz",
+      "integrity": "sha512-DuB1Uoq01LrrXTScxnwOoMSlTXxyKcULguFxbLrMDFcE/CO0ZWHpEiyhovN0mycPt7K6luAHe8laqvwvuoeUPg==",
+      "dev": true,
+      "dependencies": {
+        "@rollup/pluginutils": "^5.1.0",
+        "acorn": "^8.12.1",
+        "escape-string-regexp": "^5.0.0",
+        "estree-walker": "^3.0.3",
+        "fast-glob": "^3.3.2",
+        "local-pkg": "^0.5.0",
+        "magic-string": "^0.30.11",
+        "mlly": "^1.7.1",
+        "pathe": "^1.1.2",
+        "pkg-types": "^1.2.0",
+        "scule": "^1.3.0",
+        "strip-literal": "^2.1.0",
+        "unplugin": "^1.12.2"
+      }
+    },
+    "node_modules/unimport/node_modules/escape-string-regexp": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+      "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+      "dev": true,
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/unimport/node_modules/estree-walker": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-3.0.3.tgz",
+      "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+      "dev": true,
+      "dependencies": {
+        "@types/estree": "^1.0.0"
+      }
+    },
+    "node_modules/unimport/node_modules/pathe": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmmirror.com/pathe/-/pathe-1.1.2.tgz",
+      "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
+      "dev": true
+    },
     "node_modules/union-value": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/union-value/-/union-value-1.0.1.tgz",
@@ -7635,6 +7916,91 @@
         "node": ">= 10.0.0"
       }
     },
+    "node_modules/unplugin": {
+      "version": "1.12.3",
+      "resolved": "https://registry.npmmirror.com/unplugin/-/unplugin-1.12.3.tgz",
+      "integrity": "sha512-my8DH0/T/Kx33KO+6QXAqdeMYgyy0GktlOpdQjpagfHKw5DrD0ctPr7SHUyOT3g4ZVpzCQGt/qcpuoKJ/pniHA==",
+      "dev": true,
+      "dependencies": {
+        "acorn": "^8.12.1",
+        "webpack-sources": "^3.2.3",
+        "webpack-virtual-modules": "^0.6.2"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      }
+    },
+    "node_modules/unplugin-auto-import": {
+      "version": "0.18.2",
+      "resolved": "https://registry.npmmirror.com/unplugin-auto-import/-/unplugin-auto-import-0.18.2.tgz",
+      "integrity": "sha512-Dwb3rAic75harVBrVjwiq6H24PT+nBq2dpxV5BH8NNI6sDFaTytvP+iyo4xy7prQbR3r5K6nMs4f5Wp9PE4g8A==",
+      "dev": true,
+      "dependencies": {
+        "@antfu/utils": "^0.7.10",
+        "@rollup/pluginutils": "^5.1.0",
+        "fast-glob": "^3.3.2",
+        "local-pkg": "^0.5.0",
+        "magic-string": "^0.30.10",
+        "minimatch": "^9.0.5",
+        "unimport": "^3.9.0",
+        "unplugin": "^1.11.0"
+      },
+      "engines": {
+        "node": ">=14"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      },
+      "peerDependencies": {
+        "@nuxt/kit": "^3.2.2",
+        "@vueuse/core": "*"
+      },
+      "peerDependenciesMeta": {
+        "@nuxt/kit": {
+          "optional": true
+        },
+        "@vueuse/core": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/unplugin-vue-components": {
+      "version": "0.27.4",
+      "resolved": "https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.27.4.tgz",
+      "integrity": "sha512-1XVl5iXG7P1UrOMnaj2ogYa5YTq8aoh5jwDPQhemwO/OrXW+lPQKDXd1hMz15qxQPxgb/XXlbgo3HQ2rLEbmXQ==",
+      "dev": true,
+      "dependencies": {
+        "@antfu/utils": "^0.7.10",
+        "@rollup/pluginutils": "^5.1.0",
+        "chokidar": "^3.6.0",
+        "debug": "^4.3.6",
+        "fast-glob": "^3.3.2",
+        "local-pkg": "^0.5.0",
+        "magic-string": "^0.30.11",
+        "minimatch": "^9.0.5",
+        "mlly": "^1.7.1",
+        "unplugin": "^1.12.1"
+      },
+      "engines": {
+        "node": ">=14"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      },
+      "peerDependencies": {
+        "@babel/parser": "^7.15.8",
+        "@nuxt/kit": "^3.2.2",
+        "vue": "2 || 3"
+      },
+      "peerDependenciesMeta": {
+        "@babel/parser": {
+          "optional": true
+        },
+        "@nuxt/kit": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/unset-value": {
       "version": "1.0.0",
       "resolved": "https://registry.npmmirror.com/unset-value/-/unset-value-1.0.0.tgz",
@@ -8039,6 +8405,21 @@
         "vue": "^3.0.11"
       }
     },
+    "node_modules/webpack-sources": {
+      "version": "3.2.3",
+      "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz",
+      "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
+      "dev": true,
+      "engines": {
+        "node": ">=10.13.0"
+      }
+    },
+    "node_modules/webpack-virtual-modules": {
+      "version": "0.6.2",
+      "resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
+      "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==",
+      "dev": true
+    },
     "node_modules/which": {
       "version": "2.0.2",
       "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz",

+ 3 - 0
package.json

@@ -20,6 +20,7 @@
     "axios": "^1.6.8",
     "echarts": "^5.5.0",
     "echarts-gl": "^2.0.9",
+    "element-plus": "^2.8.1",
     "highlight.js": "^11.9.0",
     "katex": "^0.16.10",
     "load-awesome": "^1.1.0",
@@ -54,6 +55,8 @@
     "ssh2-sftp-client": "^10.0.3",
     "tailwindcss": "^3.4.4",
     "typescript": "~5.4.0",
+    "unplugin-auto-import": "^0.18.2",
+    "unplugin-vue-components": "^0.27.4",
     "vite": "^5.2.8",
     "vite-plugin-vue-devtools": "^7.0.25",
     "vue-tsc": "^2.0.11"

+ 0 - 13
src/composables/useTable.js

@@ -1,19 +1,6 @@
 import { ref, onMounted } from 'vue';
 
 export const useTable = () => {
-
-  const config = {
-    test : {
-      a: {
-        columns: ['碳源名称', '外加碳源用量', '操作']
-      },
-      b: {
-        columns: ['碳源名称', '外加碳源用量', '操作']
-      }
-    }
-
-  }
-
   const tableData = ref({
     sewageCo2First: [],
     energyFirst: [],

+ 2 - 0
src/views/carbon/components/BaseTable.vue

@@ -159,6 +159,8 @@ const onRemove = (index) => {
     .header .th:last-child, .t-row_tr .td {
       flex-shrink: 1 !important;
       width: 50% !important;
+      justify-content: start;
+      // background: red;
     }
   }
 }

+ 182 - 76
src/views/carbon/components/TheDrawerForm.vue

@@ -2,7 +2,8 @@
 import { ref, unref, onMounted } from 'vue';
 import { NDrawer, NDrawerContent, NForm, NSelect, NFormItem, NDatePicker, useMessage, NScrollbar } from 'naive-ui';
 import { SvgIcon, BaseNumberInput } from '@/components';
-import { BaseCard, BaseStep, BaseTable, BasePanel, BaseDatePicker } from './index';
+import { BaseCard, BaseStep, BaseTable, BasePanel } from './index';
+import zhCn from 'element-plus/es/locale/lang/zh-cn'
 import { useTable } from '@/composables/useTable';
 import { inputConfig } from './config';
 import { inputHasBorderThemeOverrides } from '../tools/resetTheme';
@@ -11,6 +12,13 @@ import { carbonApi } from '@/api/carbon'
 import dayjs from 'dayjs';
 
 const emit = defineEmits(['on-submit']);
+const isVisibleDrawer = defineModel();
+const props = defineProps({
+  allMonth: {
+    type: String,
+    default: () => []
+  }
+})
 
 const BASE_RULES = { required: true, type: 'number' };
 
@@ -21,9 +29,9 @@ const inpConfig = ref(inputConfig);
 
 const spliceInpData = ref([]);
 
+const elementDatePicker = ref(null);
 const disabledMonth = ref(null);
 
-const isVisibleDrawer = defineModel();
 const formValue = ref({});
 const selectCodeSet = ref({});
 const selectValue = ref({});
@@ -36,6 +44,9 @@ const rules = {
   provinceId: [
     { required: true, type: 'number' }
   ],
+  addYearMonth: [
+    { required: true }
+  ],
   wsSjclCh4Clsl: [
     { required: true, type: 'number' }
   ],
@@ -49,26 +60,55 @@ 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)}],
-
-  wnclYyzqZqcl: [{validator: (_, val) => (formValue.value.wnclYyzqChZlfs && !val ? new Error() : true)}],
-  wnclYyzqChZlfs: [{validator: (_, val) => (formValue.value.wnclYyzqZqcl && !val ? new Error() : true)}],
-
-  wnclDdclZycll: [{ required: true, type: 'number' }],
-  wnclDdclClqnd: [{ required: true, type: 'number' }],
-  wnclDdclClhnd: [{ required: true, type: 'number' }],
-
-
-  wnclWnrjByhXhl: [{validator: (_, val) => (formValue.value.wnclWnrjByhHtbl && !val ? new Error() : true)}],
-  wnclWnrjByhHtbl: [{validator: (_, val) => (formValue.value.wnclWnrjByhXhl && !val ? new Error() : true)}],
-  
+  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) }],
+
+  wnclYyzqZqcl: [{ validator: (_, val) => (formValue.value.wnclYyzqChZlfs && !val ? new Error() : true) }],
+  wnclYyzqChZlfs: [{ validator: (_, val) => (formValue.value.wnclYyzqZqcl && !val ? new Error() : true) }],
+
+  wnclDdclZycll: [{
+    required: true, validator: (_, val) => {
+      const { wnclDdclClqnd, wnclDdclClhnd } = formValue.value;
+      if ((wnclDdclClqnd || wnclDdclClhnd) && !val) {
+        return new Error();
+      } else {
+        return true
+      }
+    }
+  }],
+  wnclDdclClqnd: [{
+    required: true, validator: (_, val) => {
+      const { wnclDdclZycll, wnclDdclClhnd } = formValue.value;
+      if ((wnclDdclZycll || wnclDdclClhnd) && !val) {
+        return new Error();
+      } else {
+        return true
+      }
+    }
+  }],
+  wnclDdclClhnd: [{
+    required: true, validator: (_, val) => {
+      const { wnclDdclClqnd, wnclDdclZycll } = formValue.value;
+      if ((wnclDdclClqnd || wnclDdclZycll) && !val) {
+        return new Error();
+      } else {
+        return true
+      }
+    }
+  }],
+
+  wnclWnfsXhl: [{ validator: (_, val) => (formValue.value.wnclWnfsHtbl && !val ? new Error() : true) }],
+  wnclWnfsHtbl: [{ validator: (_, val) => (formValue.value.wnclWnfsXhl && !val ? new Error() : true) }],
+
+  wnclWnrjByhXhl: [{ validator: (_, val) => (formValue.value.wnclWnrjByhHtbl && !val ? new Error() : true) }],
+  wnclWnrjByhHtbl: [{ validator: (_, val) => (formValue.value.wnclWnrjByhXhl && !val ? new Error() : true) }],
+
 }
 
 const switchTabs = (index) => {
@@ -209,7 +249,7 @@ const handleAddTableRow = (key) => {
     });
 
     option = {
-      columns: ['燃料名称', '污泥厌氧消化沼气发电量', '厌氧消化沼气富余热能用量', '沼气提纯并网的天然气量', '操作'],
+      columns: ['燃料名称', '污泥厌氧消化沼气发电量', '厌氧消化沼气富余热能用量', '沼气提纯并网的天然气量', '操作'],
       data: [
         { type: 'name', value: codeSet.dictLabel },
         { type: 'input', value: null, unit: 'kW·h/月' },
@@ -250,7 +290,7 @@ const handleAddTableRow = (key) => {
 
   tableData.value[key].isEmpty = false;
 
-  addTable(key, option); 
+  addTable(key, option);
 }
 
 // 格式化时间
@@ -260,12 +300,12 @@ const formatData = () => {
   const tempObj = {};
 
   const extraList = Object.keys(tableData.value).map(key => {
-    const whiteList = ['sewageCo2First', 'energyFirst', 'energySecond', 'carbonFirst', 'carbonThird', 'carbonFourth' ];
+    const whiteList = ['sewageCo2First', 'energyFirst', 'energySecond', 'carbonFirst', 'carbonThird', 'carbonFourth'];
     const tempArr = [];
     const commonItem = unref(tableData)[key];
-    if ( whiteList.includes(key) ) {
+    if (whiteList.includes(key)) {
       const result = commonItem.map(({ codeSet, data, type }) => {
-        const [_, amount, lyl, hz] = data || []; 
+        const [_, amount, lyl, hz] = data || [];
         return {
           dictCode: codeSet.dictCode,
           dictLabel: codeSet.dictLabel,
@@ -277,7 +317,7 @@ const formatData = () => {
       });
       tempArr.push(result)
     } else {
-      const [ item ] = commonItem;
+      const [item] = commonItem;
       item.data.forEach(child => tempObj[child.key] = child.value);
     }
     return tempArr;
@@ -296,26 +336,24 @@ const formatData = () => {
 
 const validateTableData = () => {
   let result = true;
-  const whiteList = ['sewageCo2First', 'energySecond', 'carbonFirst', 'carbonThird', 'carbonFourth'];
+  const whiteList = ['sewageCo2First', 'energySecond'];
   const otherWhiteList = ['energyFirst', 'energySecond',];
   const onlyWhiteList = ['mudFirst', 'mudSecond', 'carbonSecond',];
   const tableInnerInpWhiteList = ['sewageCo2First', 'energyFirst', 'energySecond', 'carbonFirst', 'carbonThird', 'carbonFourth']
 
   Object.keys(tableData.value).forEach(key => {
     const item = tableData.value[key];
-    console.log( "上", item );
-    if ( !item.length && whiteList.includes(key)) {
-      console.log(item);
+    if (!item.length && whiteList.includes(key)) {
       item.isEmpty = true;
       result = false;
       return
     }
 
-    if ( item.length && tableInnerInpWhiteList.includes(key) ) {
+    if (item.length && tableInnerInpWhiteList.includes(key)) {
 
       item.forEach(item => {
         item.data.forEach((child) => {
-          if ( (child.type === 'input' || child.type === 'select') && !child.value && child.value !== 0 ) {
+          if ((child.type === 'input' || child.type === 'select') && !child.value && child.value !== 0) {
             child.isEmpty = true;
             result = false
           } else {
@@ -325,10 +363,10 @@ const validateTableData = () => {
       })
     }
 
-    if ( item.length && otherWhiteList.includes(key) ) {
+    if (item.length && otherWhiteList.includes(key)) {
       item.forEach(item => {
         item.data.forEach(child => {
-          if ( child.type === 'input' && !child.value && child.value !== 0 ) {
+          if (child.type === 'input' && !child.value && child.value !== 0) {
             child.isEmpty = true;
             result = false
           } else {
@@ -338,12 +376,12 @@ const validateTableData = () => {
       })
     }
 
-    if ( onlyWhiteList.includes(key) ) {
+    if (onlyWhiteList.includes(key)) {
       const { data } = tableData.value[key][0];
       const isExists = data.filter(({ value }) => value || value === 0).length;
-      if ( isExists && isExists < data.length) {
+      if (isExists && isExists < data.length) {
         data.forEach(child => {
-          if ( (child.type === 'input' || child.type === 'select') && !child.value && child.value !== 0 ) {
+          if ((child.type === 'input' || child.type === 'select') && !child.value && child.value !== 0) {
             child.isEmpty = true;
             result = false
           } else {
@@ -359,18 +397,70 @@ const validateTableData = () => {
   return result;
 }
 
-const onSubmit = ( e ) => {
+const onReset = () => {
+  formRef.value?.restoreValidation();
+  Object.keys(formValue.value).forEach(key => {
+    formValue.value[key] = null;
+  })
+  Object.keys(tableData.value).forEach(key => {
+    const item = tableData.value[key];
+    item.isEmpty = false;
+  })
+  Object.keys(selectValue.value).forEach(key => {
+    selectValue.value[key] = null;
+  })
+  tableData.value = {
+    sewageCo2First: [],
+    energyFirst: [],
+    energySecond: [],
+    mudFirst: [
+      {
+        columns: ['燃烧类型', '污泥处理焚烧量', '污泥焚烧过程N₂O的排放因子'],
+        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' }
+        ]
+      }
+    ],
+    mudSecond: [
+      {
+        columns: ['反应堆类型', '污泥热解消耗量', '污泥热解过程N₂O的排放因子'],
+        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' }
+        ]
+      }
+    ],
+    carbonFirst: [],
+    carbonSecond: [
+      {
+        columns: ['水厂规模', '回用水供应量'],
+        data: [
+          { type: 'select', value: '', key: 'thZssScgm' },
+          { type: 'input', value: null, unit: 'm³/月', key: '', key: 'thZssGyl' },
+        ]
+      }
+    ],
+    carbonThird: [],
+    carbonFourth: []
+  }
+}
+
+const onSubmit = (e) => {
   e.preventDefault();
-  const isVerifying  = !validateTableData();
-  formRef.value?.validate( async (errors) => {
+  const isVerifying = !validateTableData();
+  formRef.value?.validate(async (errors) => {
     if (!errors) {
-      if ( isVerifying ) {
+      if (isVerifying) {
         return message.error("提交失败, 请检查");
       }
       const params = formatData();
       await carbonApi.postCarbonSmart(params);
-      message.error("提供成功");
+      onReset();
       emit(['on-submit']);
+      message.success("提交成功");
     } else {
       message.error("提交失败, 请检查");
     }
@@ -401,13 +491,13 @@ const getAllCodeSet = async () => {
       { label: '连续燃烧', value: 4 }
     ],
     reactOptions: [
-    { label: '选择', value: "" },
+      { label: '选择', value: "" },
       { label: '竖井类型', value: 0 },
       { label: '流化床式', value: 1 },
       { label: '回转窑式', value: 2 }
     ],
     scgmOptions: [
-    { label: '选择', value: "" },
+      { label: '选择', value: "" },
       { label: '小型', value: 0 },
       { label: '中型', value: 1 },
       { label: '大型', value: 2 }
@@ -416,19 +506,22 @@ const getAllCodeSet = async () => {
 
 }
 
+const disabledDate = (t) => {
+  return props.allMonth?.includes(dayjs(t).format('YYYY-MM'))
+}
+
+const handleInpFocus = () => {
+  elementDatePicker.value.focus();
+}
+
 onMounted(async () => {
   getAllCodeSet();
 })
 
-const dateDisabled = (ts) => {
-  return disabledMonth.value.includes(dayjs(ts).format('YYYY-MM'));
-}
-
 onMounted(async () => {
   const { data: month } = await carbonApi.getAllMonth();
   disabledMonth.value = month;
 })
-
 </script>
 
 <template>
@@ -444,25 +537,30 @@ onMounted(async () => {
             <BaseStep></BaseStep>
           </BaseCard>
 
-          <NForm class="space-y-[12px] from-wrapper" ref="formRef" :model="formValue" :show-feedback="false" :rules="rules">
+          <NForm class="space-y-[12px] from-wrapper" ref="formRef" :model="formValue" :show-feedback="false"
+            :rules="rules">
             <BaseCard title="基础信息" sub-title="碳排放管理基础信息填写">
               <div class="flex space-x-[24px]">
-
                 <NFormItem label="省/直辖市" path="provinceId" label-placement="left" class="w-[343px]">
                   <NSelect v-model:value="formValue.provinceId" :options="selectCodeSet.areaOptions"
-                    value-field="dictCode" label-field="dictLabel" :rule="BASE_RULES"/>
+                    value-field="dictCode" label-field="dictLabel" :rule="BASE_RULES" />
                 </NFormItem>
-
-                <NFormItem label="核算时间" path="addYearMonth" label-placement="left" class="w-[343px]" :rule="BASE_RULES">
+                <NFormItem label="核算时间" path="addYearMonth" label-placement="left" class="w-[343px]"
+                  style="position: relative;">
                   <NDatePicker type="month" placeholder="请选择" v-model:value="formValue.addYearMonth"
-                    class="w-full custom-date-picker" :is-date-disabled="dateDisabled"
-                    :theme-overrides="inputHasBorderThemeOverrides" actions="confirm"></NDatePicker>
+                    class="w-full custom-date-picker" :theme-overrides="inputHasBorderThemeOverrides" actions="confirm"
+                    @click="handleInpFocus" :show="false" input-readonly style="position: relative; z-index: 100;">
+                  </NDatePicker>
+                  <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" />
+                  </el-config-provider>
                 </NFormItem>
-
               </div>
             </BaseCard>
 
-            <BaseCard title="污水处理" sub-title="生化碳排">
+            <BaseCard title="污水处理" sub-title="生化反应碳排">
               <BasePanel isXScroll required title="化石源碳矿化产生的碳排放量">
                 <NFormItem label-placement="top" :label="item.label" :path="item.key"
                   v-for="item, index in inpConfig.sewage.oneBlock" :key="index" :rule="BASE_RULES">
@@ -481,7 +579,7 @@ onMounted(async () => {
                     </button>
                   </div>
                 </template>
-                
+
                 <BaseTable :data="tableData.sewageCo2First" name="sewageCo2First"
                   @on-remove="(name, index) => removeTable(name, index)"></BaseTable>
               </BasePanel>
@@ -508,7 +606,7 @@ onMounted(async () => {
               </BasePanel>
             </BaseCard>
 
-            <BaseCard title="能源、药剂碳排" sub-title="生化反应碳排">
+            <BaseCard title="能源、药剂碳排" sub-title="能源、药剂碳排">
               <BasePanel isXScroll required title="污水厂电力消耗产生的碳排放量">
                 <NFormItem label-placement="top" :path="item.key" :label="item.label"
                   v-for="item, index in inpConfig.energy.oneBlock" :key="index">
@@ -556,7 +654,7 @@ onMounted(async () => {
 
             </BaseCard>
 
-            <BaseCard title="污泥处理" sub-title="生化反应碳排">
+            <BaseCard title="污泥处理" sub-title="生化反应碳排">
               <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>
@@ -573,14 +671,14 @@ onMounted(async () => {
 
               <BasePanel isXScroll title="污泥好氧发酵过程生化反应的碳排放">
                 <NFormItem label-placement="top" :path="item.key" :label="item.label"
-                  v-for="item, index in inpConfig.sludge.threeBlock" :key="index" :rule="BASE_RULES">
+                  v-for="item, index in inpConfig.sludge.threeBlock" :key="index" required>
                   <BaseNumberInput :unit="item.unit" v-model:value="formValue[item.key]"></BaseNumberInput>
                 </NFormItem>
               </BasePanel>
 
               <BasePanel isXScroll title="污泥干化焚烧或协同焚烧过程,化石源碳被氧化产生的化石源CO₂碳排放量">
                 <NFormItem label-placement="top" :path="item.key" :label="item.label"
-                  v-for="item, index in inpConfig.sludge.fourBlock" :key="index" :rule="BASE_RULES">
+                  v-for="item, index in inpConfig.sludge.fourBlock" :key="index" required>
                   <BaseNumberInput :unit="item.unit" v-model:value="formValue[item.key]"></BaseNumberInput>
                 </NFormItem>
               </BasePanel>
@@ -604,12 +702,12 @@ onMounted(async () => {
               </BasePanel>
             </BaseCard>
 
-            <BaseCard title="替碳、碳汇" sub-title="是不是写一些什么">
+            <BaseCard title="替碳、碳汇" sub-title="替碳、碳汇基础信息填写">
               <BasePanel title="热泵技术-替碳量">
                 <template #side>
                   <div class="flex items-center space-x-[14px]">
-                    <NSelect v-model:value="selectValue.gyittOne" :options="selectCodeSet.gyittOptions" class="w-[200px]"
-                      label-field="dictLabel" value-field="dictCode" />
+                    <NSelect v-model:value="selectValue.gyittOne" :options="selectCodeSet.gyittOptions"
+                      class="w-[200px]" label-field="dictLabel" value-field="dictCode" />
                     <button class="add-btn space-x-[4px]" @click="handleAddTableRow('carbonFirst')">
                       <SvgIcon name="tool-add-symbol"></SvgIcon>
                       <span>添加</span>
@@ -637,8 +735,8 @@ onMounted(async () => {
               <BasePanel title="污泥厌氧消化沼气利用的替碳量">
                 <template #side>
                   <div class="flex items-center space-x-[14px]">
-                    <NSelect v-model:value="selectValue.gyittTwo" :options="selectCodeSet.gyittOptions" class="w-[200px]"
-                      label-field="dictLabel" value-field="dictCode" />
+                    <NSelect v-model:value="selectValue.gyittTwo" :options="selectCodeSet.gyittOptions"
+                      class="w-[200px]" label-field="dictLabel" value-field="dictCode" />
                     <button class="add-btn space-x-[4px]" @click="handleAddTableRow('carbonThird')">
                       <SvgIcon name="tool-add-symbol"></SvgIcon>
                       <span>添加</span>
@@ -653,8 +751,8 @@ onMounted(async () => {
               <BasePanel title="污泥焚烧或热解热能利用的替碳量">
                 <template #side>
                   <div class="flex items-center space-x-[14px]">
-                    <NSelect v-model:value="selectValue.gyittThree" :options="selectCodeSet.gyittOptions" class="w-[200px]"
-                      label-field="dictLabel" value-field="dictCode" />
+                    <NSelect v-model:value="selectValue.gyittThree" :options="selectCodeSet.gyittOptions"
+                      class="w-[200px]" label-field="dictLabel" value-field="dictCode" />
                     <button class="add-btn space-x-[4px]" @click="handleAddTableRow('carbonFourth')">
                       <SvgIcon name="tool-add-symbol"></SvgIcon>
                       <span>添加</span>
@@ -713,10 +811,6 @@ onMounted(async () => {
 
   .from-wrapper {
 
-    .panel-item {
-      // padding-top: 26px;
-    }
-
     .form-item_inner {
       padding-top: 16px;
 
@@ -827,6 +921,18 @@ onMounted(async () => {
 </style>
 
 <style lang="scss">
+.custom-date-picker {
+
+  .el-input__wrapper,
+  .el-input__wrapper.is-focus {
+    box-shadow: none;
+
+    &:hover {
+      box-shadow: none;
+    }
+  }
+}
+
 .drawer-picker {
   .el-input__wrapper {
     height: 34px;

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

@@ -65,8 +65,6 @@ const boardList = ref([
     value: ''
   },
 ]);
-
-
 </script>
 
 <template>

+ 4 - 4
src/views/carbon/components/screen/DataScroll.vue

@@ -1,9 +1,8 @@
 <script setup>
-import { ref } from 'vue';
 import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
 import LayoutCard from './LayoutCard.vue'
 
-defineProps({
+const props = defineProps({
   data: {
     type: Array,
     default: () => []
@@ -20,7 +19,7 @@ defineProps({
         <li>碳排放</li>
       </ul>
       <div class="main">
-        <vue3-seamless-scroll :list="data" class="scroll" hover :singleHeight="40" :singleWaitTime="3000">
+        <vue3-seamless-scroll :dataList="data" :singleHeight="40" :singleWaitTime="3000"  class="scroll" hover :limitMoveNum="7">
           <ul class="item" v-for="(item, index) in data" :key="index">
             <li>{{ item.label }}(t CO₂-eq/月)</li>
             <li>{{ item.value }}</li>
@@ -59,7 +58,9 @@ defineProps({
   }
 
   .main {
+    width: 100%;
     height: calc(100% - 40px);
+    height: 240px;
     overflow: hidden;
 
     .scroll {
@@ -78,7 +79,6 @@ defineProps({
   }
 }
 
-
 .scroll .item {
   display: flex;
   align-items: center;

+ 6 - 7
src/views/carbon/echartOptions/index.js

@@ -321,11 +321,9 @@ export const echartGraphOptions = (d = []) => {
           },
           formatter: function (value) {
             let val = value;
-            console.log(typeof value);
             if ( value === 'null' || ( !value && value !== 0 ) ) {
               val = ''
             } 
-            console.log("valuevaluevaluevalue", typeof value);
             return `{a|${val}}  {b|tCO₂-eq}`;
           },
         },
@@ -405,12 +403,12 @@ export const echartGraphOptions = (d = []) => {
 };
 
 // 能源药剂
-export const echart3DOptions = () => {
+export const echart3DOptions = (data = []) => {
   // 传入数据生成 option
   const dataList = [
     {
       name: "电力消耗",
-      val: 1230, //存储数据的地方
+      val: data[0] || 0,
       itemStyle: {
         color: "rgba(245, 184, 77, 1)",
       },
@@ -418,14 +416,14 @@ export const echart3DOptions = () => {
 
     {
       name: "药剂消耗",
-      val: 800, //存储数据的地方
+      val: data[1]  || 0,
       itemStyle: {
         color: "rgba(32, 159, 237, 1)",
       },
     },
     {
       name: "燃料消耗",
-      val: 500, //存储数据的地方
+      val: data[2]  || 0,
       itemStyle: {
         color: "rgba(128, 142, 199, 1)",
       },
@@ -433,7 +431,7 @@ export const echart3DOptions = () => {
 
     {
       name: "净购入热力",
-      val: 220, //存储数据的地方
+      val: data[3] || 0,
       itemStyle: {
         color: "rgba(239, 127, 53, 1)",
       },
@@ -871,6 +869,7 @@ export const echartColumnarOptions = (data) => {
           color: "#fff",
         },
       },
+      splitNumber: 3,
       // interval: 20,
       type: "value",
       axisLine: {

+ 14 - 13
src/views/carbon/index.vue

@@ -104,7 +104,8 @@ const initEchart = () => {
     wnclHyfjCh4Co2, wnclHyfjN2oCo2,
     wnclWnfsCo2,
     wnclBwqrsCh4Co2, wnclBwqrsN2oCo2,
-    wnclWnrjQtCh4Co2, wnclWnrjQtN2oCo2
+    wnclWnrjQtCh4Co2, wnclWnrjQtN2oCo2,
+    nyyjDlxhZhdlCo = 0,  wscljdyjxhCo = 0, gdsnyrlCo2 = 0, nyyjGrrlCo = 0
   } = historyDetails.value;
 
   echartMonth = echarts.init(echartMonthRef.value, 'light');
@@ -119,7 +120,7 @@ const initEchart = () => {
   echartSewage.setOption(echartGraphOptions([wsTdN2oCo2, wsSjclCh4Co2, wjtykuCo2, wsHsytkhCo2]));
 
   // 能源、药剂
-  echartEnergy.setOption(echart3DOptions());
+  echartEnergy.setOption(echart3DOptions([nyyjDlxhZhdlCo,  wscljdyjxhCo, gdsnyrlCo2, nyyjGrrlCo]));
 
   // 污泥处理-生化反应
   echartMdu.setOption(echartColumnarOptions([
@@ -168,6 +169,11 @@ const handleSelectChecked = (time) => {
   initPageData();
 }
 
+const onSubmit = () => {
+  isVisibleDrawerForm.value = false;
+  initAllMonth();
+}
+
 const windowResize = () => {
   echartMonth.resize();
   echartSewage.resize();
@@ -176,17 +182,16 @@ const windowResize = () => {
 };
 
 onMounted(async () => {
-  const months = await initAllMonth();
-  const lastMonth = months[months.length - 1];
+  const [ firstMonth ] = await initAllMonth();
 
   autofit.init({
     dw: 1920,
     dh: 1080,
-    el:"#test",
+    el:"#screenViewport",
     resize: true
   })
 
-  inpVal.value = lastMonth;
+  inpVal.value = firstMonth;
 
   initPageData();
 
@@ -195,10 +200,6 @@ onMounted(async () => {
   timerId = setInterval(() => currentTimer.value = getCurrentTimer(), 1000)
 })
 
-const onSubmit = () => {
-  isVisibleDrawerForm.value = false;
-}
-
 onUnmounted(() => {
   window.removeEventListener("resize", windowResize);
   clearInterval(timerId);
@@ -212,7 +213,7 @@ onUnmounted(() => {
 </script>
 
 <template>
-  <div class="screen-viewprot" id="test">
+  <div class="screen-viewprot" id="screenViewport">
     <header class="header">
       <div class="flex items-center">
         <NPopselect :options="selectOptions" v-model:value="inpVal" scrollable :on-update:value="handleSelectChecked">
@@ -263,7 +264,7 @@ onUnmounted(() => {
     </ul>
   </div>
 
-  <TheDrawerForm v-model="isVisibleDrawerForm" @on-submit="onSubmit"/>
+  <TheDrawerForm v-model="isVisibleDrawerForm" @on-submit="onSubmit" :all-month="allMonth"/>
   <TheDrawerList v-model="isVisibleDrawerList" :data="historyDetails" />
   <TheModalTable v-model="isVisibleDrawerTable"/>
 </template>
@@ -393,7 +394,7 @@ $text-color_primary: #C2D8EF;
   }
 }
 
-.el-month-table td.current:not(.disabled) .el-date-table-cell__text {
+.el-month-table td.current:not(.disabled) .el-date-table-cell__text, .el-year-table td.current:not(.disabled) .el-date-table-cell__text {
   background: #3153f5;
 }
 </style>

+ 10 - 1
vite.config.ts

@@ -6,6 +6,9 @@ import vue from '@vitejs/plugin-vue'
 import vueJsx from '@vitejs/plugin-vue-jsx'
 import VueDevTools from 'vite-plugin-vue-devtools'
 import path from 'path'
+import AutoImport from 'unplugin-auto-import/vite'
+import Components from 'unplugin-vue-components/vite'
+import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
 
 // https://vitejs.dev/config/
 export default defineConfig({
@@ -23,7 +26,13 @@ export default defineConfig({
       svgoOptions: true,
 
       replaceStrokeWithCurrentColor: false
-    })
+    }),
+    AutoImport({
+      resolvers: [ElementPlusResolver()],
+    }),
+    Components({
+      resolvers: [ElementPlusResolver()],
+    }),
   ],
   resolve: {
     alias: {