{{ whole.ccer }}
CCER碳资产估值
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
index 773d362..bdfdf63 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
@@ -38,41 +38,37 @@
-
- {{
- data.emissionName.substring(0, data.emissionName.indexOf(selectTreeDataValue))
- }}
- {{ selectTreeDataValue }}
- {{
- data.emissionName.substring(
- data.emissionName.indexOf(selectTreeDataValue) + selectTreeDataValue.length,
- )
- }}
-
- {{ data.emissionName }}
+ {{ data.emissionName }}
- 编辑
- 新增子节点
- 上移编辑
+ 新增子节点
+
+ 上移
+
下移
+ 下移
+
+ 删除
- 删除
@@ -311,6 +307,7 @@
},
];
const checkedTreeNodeKeys = ref
();
+ const selectedKeys = ref();
// const generateData = (_level: number, _preKey?: string, _tns?: TreeProps['treeData']) => {
// const preKey = _preKey || '0';
@@ -565,7 +562,10 @@
// 被选中的树节点
const editTreeNode = ref({});
const onSelectKeys = ref([]);
- const onSelect = (selectedKeys: string[], info: any) => {
+ const onSelect = (selectedKey: string[], info: any) => {
+ if (selectedKey.length === 1) {
+ selectedKeys.value = selectedKey;
+ }
if (info.selected) {
// showOperation.value = true;
editTreeNode.value = {
@@ -575,7 +575,7 @@
sortNumber: info.selectedNodes[0].sortNumber,
parentEmissionId: info.selectedNodes[0].parentEmissionId,
};
- onSelectKeys.value.push(info.selectedNodes[0].id);
+ onSelectKeys.value = [info.selectedNodes[0].id];
emissionList.value = [...onSelectKeys.value, ...checkedIds.value];
mainRef.value?.nsTableRef.reload();
} else {
@@ -766,49 +766,60 @@
columns: [
{
title: 'id',
+ width: 50,
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '排放源',
+ width: 100,
dataIndex: 'emissionSources',
},
{
title: '排放类型',
+ width: 100,
dataIndex: 'emissionTypeColumn',
},
{
title: '排放气体',
+ width: 100,
dataIndex: 'emissionGas',
},
{
title: '排放环节',
+ width: 100,
dataIndex: 'emissionProcess',
},
{
title: '排放因子',
+ width: 100,
dataIndex: 'emissionFactors',
},
{
title: '排放因子单位',
+ width: 100,
dataIndex: 'emissionFactorUnits',
},
{
title: '数据来源',
+ width: 100,
dataIndex: 'dataSources',
},
{
title: '数据库',
+ width: 100,
dataIndex: 'carbonDatabase',
},
{
title: '参考文献',
+ width: 100,
dataIndex: 'bibliography',
ellipsis: true,
},
{
title: '引用数量',
+ width: 100,
dataIndex: 'numberOfReferences',
},
],
@@ -1224,13 +1235,17 @@
}
.treePart {
width: 70%;
- height: 100%;
+ height: calc(100% - 5vh);
display: flex;
border: 1px solid #bfbfbf;
margin-left: 10%;
flex-direction: column;
border-radius: 12px;
overflow: auto;
+ :deep(.ant-tree) {
+ height: 90%;
+ overflow: auto;
+ }
}
.actionMore {
display: none;
diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
index c113322..4022831 100644
--- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
+++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
@@ -5,7 +5,7 @@
:data-source="data"
:bordered="true"
:pagination="false"
- :scroll="{ x: 2000, y: 480 }">
+ :scroll="{ x: 1700, y: 480 }">
@@ -14,14 +14,14 @@
-
+ @change="onChange" /> -->
diff --git a/lib/component/form/input/textarea.vue b/lib/component/form/input/textarea.vue
index 89ad0fb..3fb0e0d 100644
--- a/lib/component/form/input/textarea.vue
+++ b/lib/component/form/input/textarea.vue
@@ -1,11 +1,22 @@
-
+
diff --git a/lib/component/table/table.vue b/lib/component/table/table.vue
index a9cc262..569c5a3 100644
--- a/lib/component/table/table.vue
+++ b/lib/component/table/table.vue
@@ -17,7 +17,7 @@
-
+
@@ -204,7 +204,7 @@
import { useTableSession } from '/nerv-lib/component/table/use-table-session';
import { useTableColumn } from '/nerv-lib/component/table/use-table-column';
import { useNavigate } from '/nerv-lib/use/use-navigate';
-import { object } from 'vue-types';
+ import { object } from 'vue-types';
export default defineComponent({
name: 'NsTable',
components: {
@@ -357,7 +357,6 @@ import { object } from 'vue-types';
}
const tableChangeEvent = (pagination: Props, filters: [], sorter: any) => {
-
if (sorter?.field) {
if (sorter.order) {
orderRef.value = {
@@ -482,12 +481,11 @@ import { object } from 'vue-types';
};
} else {
//判断是否是系统菜单页面过来,是的话修改分页总数dyfadd
- if(props.tableTitle=='系统菜单'){
+ if (props.tableTitle == '系统菜单') {
pageParams = {};
// [props.paramsPageField]: defaultPageRef.value, // 后端0 开始
// [props.paramsPageSizeField]:999,
-
- }else{
+ } else {
pageParams = {
[props.paramsPageField]: defaultPageRef.value, // 后端0 开始
[props.paramsPageSizeField]:
diff --git a/lib/component/tree/tree-api.vue b/lib/component/tree/tree-api.vue
index 7faf1ee..b9f86b7 100644
--- a/lib/component/tree/tree-api.vue
+++ b/lib/component/tree/tree-api.vue
@@ -35,7 +35,7 @@
defineOptions({
name: 'NsTreeApi',
});
- const emit = defineEmits(['update:treeData', 'select']);
+ const emit = defineEmits(['update:treeData', 'select', 'reload']);
// const model = defineModel('treeData');
const formElRef = ref();
@@ -73,6 +73,15 @@
const formFinish = debounce((data: object) => {
// selectedKeys.value = [];
getData(data);
+ // formConfig.value.schemas.forEach((item: any) => {
+ // if (item.callList) {
+ // emit('reload');
+ // }
+ // });
+ //只刷新列表
+ if (formConfig.value.callList && !formConfig.value.defaultSelection) {
+ emit('reload');
+ }
}, 200);
const handleSelect = (keys: any, selectedRows: any) => {
@@ -109,6 +118,20 @@
})
.then((res) => {
treeData.value = transform(get(res, resultField));
+ //默认选择第一个 并刷新列表
+ selectedKeys.value = [];
+ if (formConfig.value.callList && formConfig.value.defaultSelection) {
+ handleSelect([treeData.value[0].id], {
+ selected: true,
+ event: 'select',
+ selectedNodes: treeData.value,
+ node: {
+ ...treeData.value[0],
+ dataRef: { ...treeData.value[0] },
+ },
+ });
+ // 默认选择第一个
+ }
emit('update:treeData', treeData.value);
// model.value = treeData.value;
})