zhaohy 4 months ago
parent
commit
223ceed5eb
  1. 107
      hx-ai-intelligent/src/App.vue
  2. 12
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
  3. 4
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index copy.vue
  4. 4
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
  5. 4
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
  6. 4
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue
  7. 310
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts
  8. 978
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
  9. 4
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
  10. 10
      lib/component/tree/tree-api.vue
  11. 8
      lib/saas/view/system/layout/header.vue

107
hx-ai-intelligent/src/App.vue

@ -79,24 +79,113 @@
// //
// .ns-list-table { // .ns-list-table {
// :deep(.ant-tabs) { :deep(.ant-tabs) {
// // overflow: visible; // // overflow: visible;
// box-shadow: @ns-content-box-shadow; // box-shadow: @ns-content-box-shadow;
// border-radius: @ns-border-radius; // border-radius: @ns-border-radius;
// .ns-table-search { .ns-table-search {
// box-shadow: none; border-top-left-radius: 0px !important;
// border-top-left-radius: 0px !important; border-top-right-radius: 0px !important;
// border-top-right-radius: 0px !important; }
// } .ns-table-main {
// .ns-table-main { border-bottom-left-radius: 0px !important;
// } border-bottom-right-radius: 0px !important;
}
// .ant-tabs-tabpane-active > div { // .ant-tabs-tabpane-active > div {
// height: 100%; // height: 100%;
// } // }
// } }
// .ant-tabs .ns-table-main { // .ant-tabs .ns-table-main {
// border-bottom-left-radius: 0px !important; // border-bottom-left-radius: 0px !important;
// border-bottom-right-radius: 0px !important; // border-bottom-right-radius: 0px !important;
// } // }
// } // }
// icon(icon)
:deep(.anticon) {
color: #8d96a3 !important;
}
:deep(.ant-menu-item-selected .ant-menu-item-only-child),
:deep(.ant-menu-submenu-selected .ant-menu-item-only-child),
:deep(.firstMenuItem-selected) {
.router-link-active > .anticon {
color: @white !important;
}
}
:deep(.ant-menu-item-active) {
.anticon {
color: @primary-color !important;
}
}
:deep(.ant-menu-submenu-active),
:deep(.ant-menu-submenu-open),
:deep(.ant-menu-item-selected) {
.ant-menu-submenu-title {
.anticon {
color: @primary-color !important;
}
}
}
@min-padding: 5px;
:deep(.ns-left-menu-space):not(.ns-left-menu-space-collapsed) {
.firstMenuItem-selected {
background-color: transparent !important;
}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
background-color: transparent;
&::before {
background-color: @primary-color;
opacity: 1;
height: calc(100% - @min-padding*2);
top: @min-padding;
border-radius: @ns-border-radius;
}
}
.ant-menu-item-active:not(.ant-menu-item-selected) {
background-color: transparent !important;
position: relative;
&::before {
content: '';
position: absolute;
width: 100%;
background-color: rgb(@primary-color, 0.1);
height: calc(100% - @min-padding*2);
top: @min-padding;
left: 0;
border-radius: @ns-border-radius;
z-index: 0;
}
}
// .ant-menu-inline .ant-menu-item-selected::after {
// content: '';
// position: absolute;
// top: 50%;
// right: -20px;
// transform: translateY(-50%);
// width: 3px !important;
// border-radius: 2px;
// background-color: red;
// height: 30px;
// z-index: 2;
// border: none;
// }
.ant-menu-title-content {
z-index: 1;
}
}
:deep(.nsHeader_action) {
.action {
font-size: 18px;
font-weight: bold;
letter-spacing: 0px;
line-height: 24px;
color: rgba(51, 51, 51, 1);
}
}
</style> </style>

12
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue

@ -739,27 +739,27 @@
options: [ options: [
{ {
label: 'CO2', label: 'CO2',
value: 'CO2', value: '1',
}, },
{ {
label: 'CO2e', label: 'CO2e',
value: 'CO2e', value: '2',
}, },
{ {
label: 'SF6', label: 'SF6',
value:'SF6', value:'3',
}, },
{ {
label: 'CH4', label: 'CH4',
value: 'CH4', value: '4',
}, },
{ {
label: 'PFCs', label: 'PFCs',
value: 'PFCs', value: '5',
}, },
{ {
label: 'HFCs', label: 'HFCs',
value: 'HFCs', value: '6',
}, },
], ],
}, },

4
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index copy.vue

@ -291,10 +291,10 @@
// }; // };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
::v-deep .ant-table-title{ :deep(.ant-table-title){
display: flex; display: flex;
} }
::v-deep .ant-table-container{ :deep(.ant-table-container){
padding: 0px 16px; padding: 0px 16px;
} }
</style> </style>

4
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue

@ -177,10 +177,10 @@
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
::v-deep .ant-table-title{ :deep(.ant-table-title){
display: flex; display: flex;
} }
::v-deep .ant-table-container{ :deep(.ant-table-container){
padding: 0px 16px; padding: 0px 16px;
} }
</style> </style>

4
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue

@ -576,10 +576,10 @@
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
::v-deep .ant-table-title{ :deep(.ant-table-title) {
display: flex; display: flex;
} }
::v-deep .ant-table-container{ :deep(.ant-table-container) {
padding: 0px 16px; padding: 0px 16px;
} }
.buttonGroup{ .buttonGroup{

4
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue

@ -490,7 +490,7 @@
height: 100%; height: 100%;
background: #ffffff; background: #ffffff;
} }
::v-deep .ant-table-container{ :deep(.ant-table-container) {
padding: 0px 16px; padding: 0px 16px;
} }
:deep(.ns-table-main) { :deep(.ns-table-main) {
@ -527,7 +527,7 @@
border-radius: 1px; border-radius: 1px;
background-color: #2778FF; background-color: #2778FF;
} }
::v-deep .ant-table-title{ :deep(.ant-table-title) {
display: flex; display: flex;
height: 100%; height: 100%;
align-items: center; align-items: center;

310
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts

@ -1,283 +1,97 @@
import { ref } from 'vue'; // 填报页表头
import { http } from '/nerv-lib/util'; export const columns = [
import { origanizemanage } from '/@/api/origanizemanage';
import { carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary';
export const formConfig = (disabled) => {
return ref([
{ {
field: 'fields', title: '日期',
component: 'NsChildForm', dataIndex: 'name',
componentProps: { key: 'name',
schemas: [ width: 100,
{ fixed: 'left',
label: '排放源',
field: 'emissionSources',
component: 'NsInput',
componentProps: {
placeholder: '请输入排放源',
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入排放源',
},
],
},
{
field: 'emissionType',
label: '排放分类',
component: 'NsCascader',
fieldMap: ['emissionType'],
componentProps: {
placeholder: '请选择排放分类',
api: carbonEmissionFactorLibrary.getCarbonFactorTree,
fieldNames: { label: 'emissionName', value: 'id' },
showSearch: true,
},
rules: [
{
required: true,
message: '请选择排放分类',
},
],
}, },
{ {
field: 'emissionGas', title: '消耗量',
label: '排放气体', children: [
component: 'NsSelect',
componentProps: {
allowClear: true,
placeholder: '请选择排放气体',
options: [
{
label: 'CO2',
value: 'CO2',
},
{
label: 'CO2e',
value: 'CO2e',
},
{
label: 'SF6',
value:'SF6',
},
{
label: 'CH4',
value: 'CH4',
},
{
label: 'PFCs',
value: 'PFCs',
},
{ {
label: 'HFCs', title: '数据来源',
value: 'HFCs', dataIndex: 'companyAddress',
key: 'companyAddress',
width: 200,
}, },
],
},
rules: [
{ {
required: true, title: '数值',
message: '请选择排放气体', dataIndex: 'companyName',
key: 'companyName',
}, },
], ],
}, },
// {
// field: 'emissionProcess',
// label: '排放环节',
// component: 'NsSelectApi',
// componentProps: {
// api: carbonEmissionFactorLibrary.getEmissionProcess,
// params: {
// emissionType: sessionStorage.getItem('checkedTreeNode'),
// },
// resultField: 'data',
// labelField: 'emissionProcess',
// valueField: 'emissionProcess',
// immediate: true,
// autoSelectFirst: false,
// filterOption:false,
// showSearch:true,
// autoClearSearchValue:false
// },
// },
{ {
label: '排放环节', title: '碳排因子',
field: 'emissionProcess', children: [
component: 'NsInput',
componentProps: {
placeholder: '请输入排放环节',
maxLength: 20,
},
rules: [
{ {
required: true, title: '数据来源',
message: '请输入排放环节', dataIndex: 'companyAddress',
}, key: 'companyAddress',
], width: 200,
}, },
{ {
label: '排放因子', title: '数值',
field: 'emissionFactors', dataIndex: 'companyName',
component: 'NsInputNumber', key: 'companyName',
componentProps: {
placeholder: '请输入排放因子值',
maxLength: 20,
},
rules: [
{
required: true,
message: '请输入排放因子值',
trigger: 'change',
}, },
], ],
}, },
{ {
field: 'carbonEmissionPrefix', title: '排放量',
label: '碳排前缀', dataIndex: 'gender',
component: 'NsSelect', key: 'gender',
componentProps: { width: 80,
disabled: true, fixed: 'right',
allowClear: true,
defaultValue: 't',
placeholder: '请选择碳排前缀',
options: [
{
label: 'g',
value: 'g',
}, },
{ {
label: 'kg', title: '操作',
value: 'kg', dataIndex: 'action',
key: 'action',
width: 80,
fixed: 'right',
}, },
];
// 凭证弹窗表头
export const voucherColumns = [
{ {
label: 't', title: '序号',
value: 't', customRender: (text: any) => {
return text.index + 1;
}, },
],
}, },
rules: [
{ {
required: true, title: '日期',
message: '请选择碳排前缀', dataIndex: 'age',
}, key: 'age',
],
}, },
{ {
label: '碳排后缀', title: '文件名称',
field: 'carbonEmissionSuffix', dataIndex: 'address',
component: 'NsInput', key: 'address 1',
componentProps: { ellipsis: true,
placeholder: '请输入碳排后缀',
maxLength: 20,
}, },
rules: [ ];
// 编辑页中表头
export const drawerColumns = [
{ {
required: true, title: '名称',
message: '请输入碳排后缀', dataIndex: 'emissionSources',
},
],
}, },
{ {
label: '已引用数', title: '因子值',
field: 'numberOfReferences', dataIndex: 'emissionFactors',
component: 'NsInput',
componentProps: {
defaultValue: 10,
disabled: true,
maxLength: 20,
},
}, },
{ {
label: '参考文献', title: '排放环节',
field: 'reference', className: 'emissionProcess',
component: 'NsTextarea', dataIndex: 'emissionProcess',
componentProps: {
placeholder: '请输入参考文献',
maxLength: 20,
},
},
],
},
}, },
]);
};
const options = ref([]);
const getUserPerList = (transform, params = {}) => {
return http.post(origanizemanage.queryUserPerList, { ...params }).then((res) => {
return res.data?.map((item) => {
item = { ...item, ...transform(item) };
return item;
});
});
};
export const formConfig2 = (casData: any) => {
return ref([
{ {
field: 'information', title: '数据来源',
component: 'NsCascader', className: 'dataSources',
componentProps: { dataIndex: 'dataSources',
placeholder: '请选择',
displayRender: ({ labels, selectedOptions }: any) => {
console.log(labels, selectedOptions);
casData.value = selectedOptions.map(({ label, value }) => {
return { label, value };
});
return labels.join('/');
},
loadData: (selectedOptions, options) => {
console.log(selectedOptions, options, 'selectedOptions, options');
const targetOption = selectedOptions[selectedOptions.length - 1];
let transForm, params;
// load options lazily
if (!selectedOptions.length) {
transForm = (data) => {
data['label'] = data.orgName;
data['value'] = data.orgId;
data['isLeaf'] = false;
data['level'] = 1;
return data;
};
getUserPerList(transForm).then((res) => {
options.value = [...res];
});
}
const id = targetOption?.value;
const level = targetOption?.level;
if (targetOption) {
targetOption.loading = true;
}
if (level === 1) {
transForm = (data) => {
data['label'] = data.deptName;
data['value'] = data.deptId;
data['isLeaf'] = false;
data['level'] = 2;
return data;
};
params = { orgId: id };
} else if (level === 2) {
transForm = (data) => {
data['label'] = data.roleName;
data['value'] = data.roleId;
data['level'] = 3;
return data;
};
params = { deptId: id };
}
if (targetOption) {
getUserPerList(transForm, { ...params }).then((res) => {
targetOption.loading = false;
targetOption.children = [...res];
});
}
},
},
}, },
]); ];
};

978
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue

File diff suppressed because it is too large

4
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue

@ -61,8 +61,8 @@
return http.post(api, params); return http.post(api, params);
}; };
// //
const isMainPage = ref(true); const isMainPage = ref(false);
const fillInPage = ref(false); const fillInPage = ref(true);
// //
const visible = ref(false); const visible = ref(false);
const formState = ref({}) const formState = ref({})

10
lib/component/tree/tree-api.vue

@ -3,8 +3,8 @@
<div class="ns-tree-container"> <div class="ns-tree-container">
<div class="ns-tree-form"> <div class="ns-tree-form">
<div v-if="header" class="ns-tree-title"> <div v-if="header" class="ns-tree-title">
<ns-icon :name="header.icon" size="14" /> <!-- <ns-icon :name="header.icon" size="14" /> -->
<span>{{ header.title }}</span> <span class="ns-title-extra-box">{{ header.title }}</span>
</div> </div>
<div v-if="!formConfig?.schema"> <div v-if="!formConfig?.schema">
<ns-form ref="formElRef" v-bind="formConfig" :model="formModel" @finish="formFinish" /> <ns-form ref="formElRef" v-bind="formConfig" :model="formModel" @finish="formFinish" />
@ -155,9 +155,9 @@
// padding-bottom: 10px; // padding-bottom: 10px;
// border-bottom: 1px solid #e9e9e9; // border-bottom: 1px solid #e9e9e9;
> span { // > span {
padding-left: 6px; // padding-left: 6px;
} // }
& ~ div { & ~ div {
padding: 0 @gap !important; padding: 0 @gap !important;
width: 100%; width: 100%;

8
lib/saas/view/system/layout/header.vue

@ -93,7 +93,7 @@
" "
>{{ userName }}</span >{{ userName }}</span
> >
<ns-icon class="downArrow" name="downArrow" size="20" /> <!-- <ns-icon class="downArrow" name="downArrow" size="20" /> -->
</div> </div>
<template #overlay> <template #overlay>
@ -536,9 +536,9 @@
.action { .action {
cursor: pointer; cursor: pointer;
&:hover { // &:hover {
background-color: @layout-header-hover; // background-color: @layout-header-hover;
} // }
} }
.projectName { .projectName {

Loading…
Cancel
Save