规范代码
This commit is contained in:
@@ -165,19 +165,16 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref,reactive, toRaw } from 'vue';
|
||||
import type { UnwrapRef } from 'vue';
|
||||
import { ref, toRaw } from 'vue';
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
import { Pagination,message,Modal } from 'ant-design-vue';
|
||||
import { InboxOutlined } from '@ant-design/icons-vue';
|
||||
import type { CascaderProps,TreeSelectProps,UploadChangeParam } from 'ant-design-vue';
|
||||
import { Pagination,message,Modal } from 'ant-design-vue';
|
||||
import type { TreeSelectProps,UploadChangeParam } from 'ant-design-vue';
|
||||
import { NsMessage } from '/nerv-lib/component';
|
||||
import dayjs, { Dayjs } from 'dayjs';
|
||||
import { http } from '/nerv-lib/util/http';
|
||||
import { tableColumns } from '../config';
|
||||
import { energyConsumption,carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary';
|
||||
import { group } from '/@/api/deviceManage';
|
||||
import { dict } from '/@/api';
|
||||
defineOptions({
|
||||
energyType: 'EnergyConsumption', // 与页面路由name一致缓存才可生效
|
||||
components: {
|
||||
|
@@ -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表单的必填
|
||||
|
Reference in New Issue
Block a user