规范代码

This commit is contained in:
fks-xuxinyue
2024-07-25 15:19:41 +08:00
parent 6478070bd8
commit 61dcbfeacd
5 changed files with 53 additions and 52 deletions

View File

@@ -138,6 +138,7 @@
quickCalculation,
carbonEmissionFactorLibrary,
} from '/@/api/carbonEmissionFactorLibrary';
import { or } from '@vueuse/core';
defineOptions({
energyType: 'quickCalculation', // 与页面路由name一致缓存才可生效
components: {
@@ -249,7 +250,7 @@
const statsId = ref();
// 获取因子分类树数据
const getTreeData = () => {
fetch(quickCalculation.carbonQuickTree).then((res) => {
fetch(quickCalculation.carbonQuickTree, { orgId: orgId.value }).then((res) => {
gData.value = res.data;
energyType.value = gData.value[0].children[0].id;
statsId.value = gData.value[0].children[0].id;
@@ -366,7 +367,9 @@
const formRef = ref();
const labelCol = { span: 6 };
const wrapperCol = { span: 18 };
const formState = ref({});
const formState = ref({
orgId: orgId.value,
});
const visible = ref(false);
// 定义form表单的必填